Skip to content

feat: Handle disabled install scripts#41

Open
timfish wants to merge 4 commits into
mainfrom
timfish/feat/no-install-script
Open

feat: Handle disabled install scripts#41
timfish wants to merge 4 commits into
mainfrom
timfish/feat/no-install-script

Conversation

@timfish

@timfish timfish commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

npm is changing the default to no longer run install script.

This PR moves the install script logic into the side-effects of loading the module. Things become a little more complex because this library is loaded from multiple threads so we have to lock the rebuilding so it only runs once. It's even tricker to do if you want to be able to recover from all the possbible failures states.

I had to inlcude a dummy install script otherwise npm and yarn v1 automatically run node-gyp rebuild.

@timfish timfish force-pushed the timfish/feat/no-install-script branch from d7aa878 to 3ba75a5 Compare June 15, 2026 10:04
@timfish timfish changed the title feat: No install script feat: Handle install scripts disabled Jun 15, 2026
@timfish timfish marked this pull request as ready for review June 15, 2026 10:30
Comment thread src/copy-binary.ts
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts
Comment thread package.json
Comment thread src/index.ts
Comment thread src/index.ts Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread package.json Outdated
Comment thread src/index.ts
Comment thread src/index.ts Outdated
Comment thread .github/workflows/ci.yml
@timfish timfish force-pushed the timfish/feat/no-install-script branch from 536820a to 7ad75d0 Compare June 15, 2026 13:38
@timfish timfish changed the title feat: Handle install scripts disabled feat: Handle disabled install scripts Jun 15, 2026
Comment thread src/index.ts Outdated
Comment thread src/rebuild-lock.ts
Comment thread src/rebuild-lock.ts
@timfish timfish force-pushed the timfish/feat/no-install-script branch from 60e60b1 to 3f5c888 Compare June 15, 2026 14:47

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3f5c888. Configure here.

Comment thread src/rebuild-lock.ts
Comment thread src/index.ts
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