-
Notifications
You must be signed in to change notification settings - Fork 363
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(deps): frozen installation fails during ugprade workflow #801
fix(deps): frozen installation fails during ugprade workflow #801
Conversation
src/upgrade-dependencies.ts
Outdated
|
||
// we use projen to install the dependencies and thus update the lock file, | ||
// so we need to make it think its not running inside CI. | ||
task.exec(`CI=0 ${this._project.projenCommand}`); |
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.
task.exec(`CI=0 ${this._project.projenCommand}`); | |
task.exec(this._project.projenCommand, { | |
env: { CI: '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.
Cool
@@ -118,7 +118,11 @@ export class UpgradeDependencies extends Component { | |||
} | |||
|
|||
task.exec(ncuCommand.join(' ')); | |||
task.exec(this._project.package.renderInstallCommand(false)); |
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.
Does that mean we can make this private again?
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.
Yes
Codecov Report
@@ Coverage Diff @@
## main #801 +/- ##
==========================================
+ Coverage 78.46% 83.59% +5.12%
==========================================
Files 88 96 +8
Lines 3181 3620 +439
Branches 809 805 -4
==========================================
+ Hits 2496 3026 +530
+ Misses 683 593 -90
+ Partials 2 1 -1
Continue to review full report at Codecov.
|
Fixes #800.
The problem was that projen itself can change
package.json
files due to its own requirements.Which causes the
package.json
file to change after runningyarn install
- and a subsequent frozen installation would fail.This PR uses projen itself to install the dependencies and update the lock file, so this happens after all
package.json
mutations have happened.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.