Skip to content

docs: npm 11 allow-scripts note for the postinstall binary download - #16

Merged
fadymondy merged 1 commit into
mainfrom
docs/npm-11-allow-scripts
Oct 13, 2026
Merged

fadymondy merged 1 commit into
mainfrom
docs/npm-11-allow-scripts

Conversation

@fadymondy

Copy link
Copy Markdown
Contributor

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:

  • by default (npm 11.17) it only warns: not yet covered by allowScripts, and the postinstall still runs
  • with strict-allow-scripts or --ignore-scripts, the postinstall is skipped and no binary is installed

Documented fixes, each verified on npm 11.17.0 (Windows):

  • npm install -g --allow-scripts=@togo-framework/cli @togo-framework/cli installs the binary even under --strict-allow-scripts
  • npm config set allow-scripts=@togo-framework/cli --location=user persists it
  • project installs use "allowScripts": { "@togo-framework/cli": true } in package.json. The array form is rejected under strict mode, and --allow-scripts errors with EALLOWSCRIPTS in project-scoped installs
  • npm-free path: go install github.com/togo-framework/cli/cmd/togo@latest (prints togo 0.2.34) or the GitHub release binaries

Docs only. No change to npm/install.js or npm/bin/togo.js.

Related issues

Closes #

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Docs
  • Chore / refactor

Checklist

  • go build ./..., go vet ./..., and go test ./... pass (docs only)
  • Generated code still compiles (togo generate where relevant)
  • Docs / README updated if behavior changed
  • Conventional commit message

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.
@fadymondy
fadymondy merged commit b0d7272 into main Oct 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant