-
Notifications
You must be signed in to change notification settings - Fork 8
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
delete lock file when package is updated #179
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ class Launcher { | |
|
||
this.files = { | ||
packageJSON: path.join(this.projectDir, 'package.json'), | ||
packageLockJSON: path.join(this.projectDir, 'package-lock.json'), | ||
flows: path.join(this.projectDir, 'flows.json'), | ||
credentials: path.join(this.projectDir, 'flows_cred.json'), | ||
settings: path.join(this.projectDir, 'settings.js'), | ||
|
@@ -54,6 +55,13 @@ class Launcher { | |
await fs.writeFile(this.files.packageJSON, JSON.stringify(packageData, ' ', 2)) | ||
await fs.rm(path.join(this.projectDir, '.config.nodes.json'), { force: true }) | ||
await fs.rm(path.join(this.projectDir, '.config.nodes.json.backup'), { force: true }) | ||
|
||
// as the package.json file has been re-written, we will "assume" different versions | ||
// of the modules and therefore remove the package-lock.json file to permit modules | ||
// to be updated to the versions specified in package.json | ||
if (existsSync(this.files.packageLockJSON)) { | ||
await fs.rm(this.files.packageLockJSON) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't an Or are you wanting to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pez, was discussed in slack
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me, this could lead to unexpected upgrades outside of the package changes, but so would running an explicit npm upgrade, so unblocking until we find a better solution for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On second thought, this still doesn't fully grok for me actually, an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Result of my tests in #178 (comment) |
||
} | ||
} | ||
|
||
async readPackage () { | ||
|
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.
It may be worth noting that this is only because of the
--production
flag, a normalnpm install
would update the package-lock.