Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"build:cjs:generatePackageJson": "echo '{\\n \"type\": \"commonjs\"\\n}' > dist/commonjs/package.json",
"build:watch": "chokidar 'tsconfig*.json' 'src/**/*.{ts,tsx}' -c 'npm run build' --initial",
"typecheck": "tsc --noEmit",
"prepare": "npm run build",
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

The prepare script runs during npm install for all consumers, which could significantly slow down installation times. Consider using prepublishOnly (which is already present) for build automation before publishing, or use postinstall only if absolutely necessary. The prepare script is typically reserved for development dependencies setup, not full builds.

Suggested change
"prepare": "npm run build",

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

prepare is not run when a package is installed via the npm registry, which is the most relevant case. This change will not increase the install time for developers using a tagged version.

"prepack": "node node10stubs.mjs",
"prepublishOnly": "npm run build",
"postpack": "node node10stubs.mjs --cleanup",
Expand Down