Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-8506: Gh Action To Publish Protected Eval #6

Merged
merged 6 commits into from
Jul 19, 2024

Conversation

ryanformio
Copy link
Contributor

@ryanformio ryanformio commented Jun 21, 2024

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 to src/utils/lodash.ts to bring in the lodashOperators directly from lodash. I was not able to retrieve them like was previously done from formiojs/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.

image

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 of formio @ 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.

"test": "echo \"Error: no test specified\" && exit 1"

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@ryanformio ryanformio marked this pull request as ready for review June 24, 2024 17:41
Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I understand. Rather than pin a dependency over 20+ versions back, couldn't we just fix the export in the dependency?

@travist travist merged commit 9a4b5c7 into master Jul 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants