Repository navigation
docs: npm 11 allow-scripts note for the postinstall binary download - #16
Merged
Merged
Conversation
npm 11 gates install scripts behind allowScripts: it warns by default and skips the postinstall under strict-allow-scripts or --ignore-scripts, leaving no binary. Document --allow-scripts / npm config set allow-scripts, the package.json allowScripts form, and go install / release binaries as the npm-free path.
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.
What does this PR do?
Adds a short npm 11 note to the root README and the npm wrapper README. npm 11 gates install scripts behind
allowScripts:not yet covered by allowScripts, and the postinstall still runsstrict-allow-scriptsor--ignore-scripts, the postinstall is skipped and no binary is installedDocumented fixes, each verified on npm 11.17.0 (Windows):
npm install -g --allow-scripts=@togo-framework/cli @togo-framework/cliinstalls the binary even under--strict-allow-scriptsnpm config set allow-scripts=@togo-framework/cli --location=userpersists it"allowScripts": { "@togo-framework/cli": true }in package.json. The array form is rejected under strict mode, and--allow-scriptserrors with EALLOWSCRIPTS in project-scoped installsgo install github.com/togo-framework/cli/cmd/togo@latest(printstogo 0.2.34) or the GitHub release binariesDocs only. No change to
npm/install.jsornpm/bin/togo.js.Related issues
Closes #
Type of change
Checklist
go build ./...,go vet ./..., andgo test ./...pass (docs only)togo generatewhere relevant)