Conversation
Author
|
@microsoft-github-policy-service agree
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A
.npmrcfile was added into templates that usepnpm, for the purpose of ensuring pre/post-scripts being executed (Issue #370 and PR #372).However,
pnpmv11 and later do not read these settings in.npmrc; they are instead expected to be defined inpnpm-workspace.yamlin a bit different format. In https://pnpm.io/11.x/settings it is written that:pnpmv10 reads them form both.npmrcandpnpm-workspace.yaml, probably intending to provide the transition period from.npmrctopnpm-workspace.yaml(See https://pnpm.io/10.x/settings).pnpmv9 has already reached the EOL. I think most extension developers don't have reasons to use such an oldpnpmfor a newly created project/workspace using this generator. There is also a minor flow due to the existence of the.npmrcfile. The following warning is printed when runningvsce package --no-dependenciesorvsce publish --no-dependenciesfor extension publishing:Also note that
pnpmre-enabled the pre/post-scripts by default since v9.0 (See pnpm/pnpm#7634). Therefore, in fact it is usually not necessary to enable it explicitly. However,pnpm-workspace.yamlis often needed for other purposes, such as forallowBuildssetting, and the setting can be disabled globally. Therefore, I think it is better to set it there for clarity.