-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix(build): build executables with correct dependency versions #654
Conversation
@@ -22,18 +22,18 @@ | |||
}, | |||
"dependencies": { | |||
"@ibm-cloud/openapi-ruleset-utilities": "1.3.1", | |||
"@stoplight/spectral-formats": "^1.5.0", | |||
"@stoplight/spectral-formats": "^1.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed like a good time to bump some of our dependencies. This addressed the "ip"-related vulnerability that npm install
was reporting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
This commit modifies the create-binaries.sh script so that it removes the packages/validator/node_modules/@IBM-Cloud and packages/ruleset/node_modules/@IBM-Cloud directories prior to invoking pkg to build the executables. This fixes a problem where the executables would end up with the "old" versions of the openapi-ruleset and openapi-ruleset-utilities dependencies in situations where we're also publishing a new version of those dependencies in the same build. Removing the dependencies from packages/[validator,ruleset] means that pkg would end up using the dependencies in the project's top-level "node_modules" directory instead, which will have the correct versions of the dependencies, whether or not we've published a new version of them during the same build. Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
ef2d204
to
8a4919c
Compare
@@ -50,9 +50,6 @@ | |||
"node": ">=16.0.0", | |||
"npm": ">=8.3.0" | |||
}, | |||
"pkg": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change gets rid of the warnings that are displayed by "pkg".
🎉 This PR is included in version 1.3.2 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.15.5 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
## ibm-openapi-validator [1.16.5](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.16.4...ibm-openapi-validator@1.16.5) (2024-03-22) ### Bug Fixes * **build:** build executables with correct dependency versions ([#654](#654)) ([7b8192d](7b8192d)) ### Dependencies * **@ibm-cloud/openapi-ruleset:** upgraded to 1.15.5
## @ibm-cloud/openapi-ruleset-utilities [1.3.2](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset-utilities@1.3.1...@ibm-cloud/openapi-ruleset-utilities@1.3.2) (2024-03-22) ### Bug Fixes * **build:** build executables with correct dependency versions ([#654](#654)) ([7b8192d](7b8192d))
🎉 This PR is included in version 1.16.5 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
## @ibm-cloud/openapi-ruleset [1.15.5](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.15.4...@ibm-cloud/openapi-ruleset@1.15.5) (2024-03-22) ### Bug Fixes * **build:** build executables with correct dependency versions ([#654](#654)) ([7b8192d](7b8192d)) ### Dependencies * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.3.2
PR summary
This commit modifies the create-binaries.sh script so that it removes the packages/validator/node_moduels/@IBM-Cloud directory prior to invoking pkg to build the executables.
This fixes a problem where the executables would end up with the "old" version of the openapi-ruleset dependency in situations where we're also publishing a new version of that dependency. Removing the dependency from packages/validator/node_modules means that pkg would end up using the dependencies in the project's top-level "node_modules" directory instead, which will have the correct version of the dependency.
PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:
Checklist for adding a new validation rule: