You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm RFC #868 will block this package's install script by default #926
I'm reaching out because node-pty is a package that runs an install script, and an accepted npm RFC is going to change how those scripts behave.
The RFC blocks dependency install scripts by default during npm install. That's the same thing pnpm, Yarn Berry, Bun, and Deno already do. Users opt back in per package through a new allowScripts field in package.json (or the npm approve-scripts command). The motivation is the run of supply-chain attacks over the last couple of years that used postinstall hooks to run code the moment a package landed in the tree.
That script compiles a native addon, so under the new default it won't run unless the user adds node-pty to their allowScripts. The change that helps your users most is shipping prebuilt binaries as optionalDependencies, the pattern esbuild, sharp, and @swc/core moved to. Most installs then need no compile step and no allowlist entry. If prebuilds aren't practical for node-pty, a short note in your README showing the allowScripts line people should add will save a lot of confused issues.
I wanted to flag this early so you've got time to plan rather than find out when the install warnings start showing up. The full RFC is here: npm/rfcs#868. Happy to answer any questions.
node-pty@beta already ships with prebuilt binaries and works without the postinstall script – the postinstall script just does some extra checks and falls back to building from source if there are no prebuilt binaries available.
❯ npm i node-pty@beta --ignore-scripts
changed 1 package, and audited 3 packages in 350ms
found 0 vulnerabilities
❯ node
Welcome to Node.js v24.14.1.
Type ".help" for more information.
> require("node-pty").spawn("node", ["-p", "1337"]).onData(console.log)
{ dispose: [Function: dispose] }
> 1337
Currently, all prebuilt binaries for all platforms and architectures are shipped in the same npm package. There is an issue about splitting it up: #864
Activity
lydell commentedon Jun 2, 2026
node-pty@beta already ships with prebuilt binaries and works without the postinstall script – the postinstall script just does some extra checks and falls back to building from source if there are no prebuilt binaries available.
Currently, all prebuilt binaries for all platforms and architectures are shipped in the same npm package. There is an issue about splitting it up: #864
fix(deps): node-pty 1.2.0-beta.14 — ships the linux prebuilds 1.1.0 l…