-
-
Notifications
You must be signed in to change notification settings - Fork 607
feat(init)!: add --package-manager flag
#4107
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2a3b750
feat(init): add explicit package manager selection (npm/yarn/pnpm) to…
youaresoyoung 8cb1323
feat(core-utils): cache explicit package manager selection and skip e…
youaresoyoung 9945598
test(core-utils): add reset helper and specs for explicit package man…
youaresoyoung 556a5da
feat(cli): unify package manager prompt via helper across init paths
youaresoyoung 09fdf0a
feat(init): add `--package-manager` flag
erickzhao ecd41d0
commit
erickzhao aaaae22
add missing verdaccio flag
erickzhao dfebe33
modify verdaccio script
erickzhao b1ee6e3
remove pnpm install from ci
erickzhao 052e518
try to put a version number for yarn
erickzhao c24bf97
fixup
erickzhao 92294ba
Revert "remove pnpm install from ci"
erickzhao d62a4bc
attempt to prune
erickzhao 22303f7
replace cache clearing fn with dynamic import in tests
erickzhao 57be48c
chore: don't use corepack for npm
erickzhao 891668a
Revert "chore: don't use corepack for npm"
erickzhao 0faa24e
fix typo in test name
erickzhao 4b84a7f
chore: only use corepack for non-npm
erickzhao c082951
Merge branch 'next' into node_installer_explicit
erickzhao 31c7e32
add debug log
erickzhao 2273a37
Merge branch 'node_installer_explicit' of github.com:electron/forge i…
erickzhao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 seems that
corepackcommand is executed here regardless of whether the user passes in--package-manageror not. Would it be better to add a check here? When the user does not pass in--package-manager, the original behavior should be restored.Also, if the
--package-managervalue is "npm", it can be skipped directly to avoid an unnecessary spawn call. This can also prevent the following description information from appearing when the user is using npm but has not installed corepack.Overall, I support the changes in the current PR.
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.
Great suggestions @BlackHole1! I'm going to incorporate those into the PR this week.
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.
4b84a7f
I disabled the
corepackstep for npm, but after thinking about it a bit more, I think we should keep it even if--package-managerisn't passed in since you could get inferred package managers (e.g. viapnpm init)