-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(init): reify on init new workspace #4892
Conversation
* Default: true | ||
* Type: Boolean | ||
|
||
If set to true, the npm cli will run an update after operations that may |
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.
what does "run an update" mean?
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 means the npm cli will run a npm update <workspace-name>
cmd behind the scenes, to be clear this text is already there, ref: https://docs.npmjs.com/cli/v8/using-npm/config#workspaces-update - in case you want to propose improvements here, I'm due to a follow up PR improving docs and would appreciate the feedback 😊
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.
sure, but it doesn't seem clear that "run an update" means this. Perhaps:
If set to true, the npm cli will run an update after operations that may | |
If set to true, the npm cli will run an update (`npm update <workspace-name>`) after operations that may |
?
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.
I think that's very close to what I want, I'll follow up with a docs PR once this lands 😊 thanks!
Adds a minimalistic reify step that updates the installed tree after initializing a new workspace. Moved the shared update logic from `lib/commands/version.js` to a `lib/workspaces/update-workspaces.js` module that is reused between both `npm version` and `npm init`. Relates to: npm/rfcs#556 Relates to: npm#4588
c459a76
to
974d1ce
Compare
}) | ||
const init = new Init(npm) | ||
await init.execWorkspaces([], ['a']) | ||
const output = npm._mockOutputs.map(arr => arr.map(i => i.replace(/[0-9]*ms$/, '100ms'))) |
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.
nit: this could be a t.cleanSnapshot
Adds a minimalistic reify step that updates the installed tree after
initializing a new workspace.
Moved the shared update logic from
lib/commands/version.js
to alib/workspaces/update-workspaces.js
module that is reused betweenboth
npm version
andnpm init
.References
Relates to: npm/rfcs#556
Relates to: #4588