FIO-8506: Gh Action To Publish Protected Eval #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-8506
Description
What changed?
SUPER IMPORTANT!!!
Was not able to build with the latest tag of
@formio/js (5.0.0-rc.59)
. Code was removed in@formio/js @ 5.0.0-rc.20
that allowed@formio/protected-eval
to build properly.The way I was able to resolve this was to change the package.json of
@formio/protected-eval
to use@formio/js @ 5.0.0-rc.19
, and make a minimal change tosrc/utils/lodash.ts
to bring in the lodashOperators directly from lodash. I was not able to retrieve them like was previously done fromformiojs/utils/jsonlogic/operators
.Upon doing these was able to get the project to build successfully and pass the pipeline.
New Publish Strategy Implemented per Dev-Ex Conversations
This pipeline utilizes a new strategy discussed in Dev-Ex to merge the target branch into the current feature branch to verify that it will build properly upon merge. It then utilizes an artifact in this step to collect the publishable directories & files (during build step) to share with the artifact contents with the following step to publish the contents to NPM.
We DO NOT publish to the dev tag UNLESS the target branch is equal to "master"
Why have you chosen this solution?
There is code that was removed in
@formio/js @5.0.0-rc.20
that this library depends on. I locked the package.json to@formio/js @ 5.0.0-rc.19
and was able to get the repository to build with some minimal changes should in the PR changes.This job shows that the changes were effective for building the repository -> https://github.com/formio/protected-eval/actions/runs/9618803500
Breaking Changes / Backwards Compatibility
Would just like to restate that
formio @ 5.0.0-rc.19
was used instead offormio @ 5.0.0-rc.59
in order to build project.Dependencies
n/a
How has this PR been tested?
Pipeline Pass (Build & Publish)
https://github.com/formio/protected-eval/actions/runs/9649555762
NPM Dev Tag Publish
https://www.npmjs.com/package/@formio/protected-eval/v/2.0.0-dev.6.b39ed92?activeTab=versions
Tests?
package.json does not appear to be equipped with tests.
protected-eval/package.json
Line 14 in 93103b8
Checklist: