Skip to content

fix: allow npm consumers to install without preinstall failure - #92

Merged
heyMP merged 1 commit into
mainfrom
fix/npm-consumer-preinstall
Sep 11, 2026
Merged

heyMP merged 1 commit into
mainfrom
fix/npm-consumer-preinstall

Conversation

@heyMP

@heyMP heyMP commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes the published preinstall script that caused npm install to fail when @heymp/scratchpad is installed as a dependency (e.g. Do not run yarn install directly. Use: yarn setup).
  • Adopts LavaMoat's intended dev-only install protection: .yarnrc with ignore-scripts true and @lavamoat/preinstall-always-fail as a devDependency.
  • Updates the Development section in the README to document yarn setup.

Context

The preinstall guard added in #84 runs for all installs of the published package, including when consumers run npm install in their own projects. LavaMoat's documented pattern keeps install guards in devDependencies and repo-local config instead.

Test plan

  • yarn setup
  • yarn test (50 tests pass)
  • After release, verify npm install @heymp/scratchpad@next succeeds in a consumer project

Made with Cursor

Remove the published preinstall guard that blocked npm install when
scratchpad is used as a dependency. Adopt LavaMoat's dev-only install
protection via .yarnrc and @lavamoat/preinstall-always-fail instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b679c1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@heymp/scratchpad Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@heyMP
heyMP merged commit 62c9c51 into main Sep 11, 2026
1 check passed
@heyMP
heyMP deleted the fix/npm-consumer-preinstall branch September 11, 2026 16:04
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