-
-
Notifications
You must be signed in to change notification settings - Fork 954
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(plugin-commands-init): add init configs and flags w/ npm compat #8113
base: main
Are you sure you want to change the base?
Conversation
💖 Thanks for opening this pull request! 💖 |
I wonder if we want this. We already have the |
I wouldn't consider this an initializer like |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@pnpm/plugin-commands-init", | |||
"version": "4.0.5", | |||
"version": "4.1.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.
Version updates happen automatically. You just need to add changesets as described in CONTRIBUTING.md
. No need to change the version fields.
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.
we use camelCase for file names.
// The custom cancel function prevents that behavior. | ||
// Otherwise, pnpm CLI would print an error and confuse users. | ||
// See related issue: https://github.com/enquirer/enquirer/issues/225 | ||
globalInfo('Package.json Init canceled') |
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.
probably it should be
globalInfo('Package.json Init canceled') | |
globalInfo('package.json Init canceled') |
usages: ['pnpm init'], | ||
}) | ||
} | ||
const getManifestDefaults = () => ({ |
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.
our convention is to use regular functions
const getManifestDefaults = () => ({ | |
function getManifestDefaults () { |
closes #7711
Still working on adding the documentation and tests, but wanted to get some feedback in the meantime.
Added all the settings npm exposes from npmrc and cli flags, as well as adding the interactive prompts behind a flag, so the default behavior should not have changed, but can in a future major version if people want it to.
I did add a few more settings that npm wasn't exposing that would make sense to control from npmrc settings, like using the global npmrc to set a policy of
"type":"module"
for new projects