Skip to content

Remove stray top-level prepare key from package.json - #133

Merged
spaceninja merged 1 commit into
mainfrom
remove-stray-prepare
Aug 26, 2026
Merged

Remove stray top-level prepare key from package.json#133
spaceninja merged 1 commit into
mainfrom
remove-stray-prepare

Conversation

@spaceninja

Copy link
Copy Markdown
Member

Overview

package.json carried a prepare key at the top level, outside the scripts block. npm only reads lifecycle scripts from scripts, so it never ran — the real scripts.prepare is what executes on install and publish, and it's correct. The problem is that the stray key is self-referential ("prepare": "npm run prepare"), so anyone who noticed it and "fixed" it by moving it into scripts would have replaced a working build script with an infinite loop. Deleting it removes that trap.

Since the whole claim here is that the key was inert, I confirmed it rather than assuming: npm pack --dry-run lists the same nine files before and after, and the prepare lifecycle still runs the build and doc generation as it did.

Screenshots

Testing

  • Check out this branch and run npm ci — installation should complete normally, running the build and generating the manifests along the way
  • Run npm test — 53 tests should pass
  • Run npm run prepare on its own — it should build dist/ and regenerate manifests/, then exit rather than looping

Closes #131

npm only reads lifecycle scripts from `scripts`, so this key never ran.
It was also self-referential — `npm run prepare` calling `prepare` —
so anyone moving it into `scripts` to "fix" it would have replaced the
working script with an infinite loop.

Verified inert: `npm pack --dry-run` lists the same nine files before
and after, and the real `scripts.prepare` still runs.
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for image-compare-component ready!

Name Link
🔨 Latest commit d6f5308
🔍 Latest deploy log https://app.netlify.com/projects/image-compare-component/deploys/6a8f2c2863047800092c1a3f
😎 Deploy Preview https://deploy-preview-133--image-compare-component.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@spaceninja
spaceninja merged commit b1a0774 into main Aug 26, 2026
6 checks passed
@spaceninja
spaceninja deleted the remove-stray-prepare branch August 26, 2026 18:12
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.

Remove stray top-level prepare key from package.json

1 participant