fix: drop --scripts-prepend-node-path from npm start - #3028
Open
kalayciburak wants to merge 2 commits into
Open
Conversation
npm 12 treats unknown CLI flags as errors. Node is already on PATH via the process environment, so the flag is unnecessary. Fixes diffplug#3024
Member
|
lgtm, needs 3 changelog entries under the |
Add Unreleased Fixed bullets in lib, gradle, and maven changelogs.
Contributor
Author
|
added the 3 changelog entries under Fixed |
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.
Fixes
Fixes #3024
Changes and Review
npm startwas launched with--scripts-prepend-node-path=true. npm 11 warns that this is an unknown CLI config; npm 12 fails withEUNKNOWNCONFIGand the prettier (and other npm-based) formatter server never starts.Node is already prepended onto
PATHinenvironmentVariables(), which is what that flag used to do. Drop the flag and keepnpm start -- --node-server-instance-id=....Test Plan
./gradlew :lib:test --tests com.diffplug.spotless.npm.StandardNpmProcessFactoryTest— RED then GREEN./gradlew :lib:test --tests 'com.diffplug.spotless.npm.*'— 15/15 GREEN./gradlew :lib:spotlessJavaCheck— GREENPlease DO NOT FORCE PUSH. Don't worry about messy history.