Skip to content

chore: disable lifecycle scripts#43

Open
mparker13 wants to merge 3 commits into
mainfrom
chore/disable-lifecycle-scripts
Open

chore: disable lifecycle scripts#43
mparker13 wants to merge 3 commits into
mainfrom
chore/disable-lifecycle-scripts

Conversation

@mparker13

Copy link
Copy Markdown

Description

Disables lifecycle scripts (preinstall, install, postinstall, prepare) from running
during package install to reduce supply chain attack surface.

Configured using the repo's existing package manager — no package manager migration required:

  • yarn — adds enableScripts: false to .yarnrc.yml
  • npm — adds ignore-scripts=true to .npmrc

Repos already using pnpm are skipped (lifecycle scripts are blocked by default).

References

@mparker13 mparker13 marked this pull request as ready for review June 1, 2026 16:32
@mparker13 mparker13 requested a review from a team as a code owner June 1, 2026 16:32
byrdsd and others added 2 commits June 15, 2026 16:03
With ignore-scripts=true in .npmrc, npm no longer runs prepublishOnly,
so dist/ would not be populated before changeset publish. Add an
explicit build step in release.yml to preserve publish, and mirror it
in test.yml so build regressions fail PR CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Node 22+ removed support for the legacy `import ... assert { type: 'json' }`
syntax, breaking the build on the current Node matrix entry. TypeScript is
pinned at 5.1.6, which predates the replacement `with { type: 'json' }`
import-attributes syntax, so switching to `with` would not parse either.
Use createRequire to load package.json instead — works across all Node
versions in the matrix and requires no TS syntax support.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants