Skip to content

Improve prpack CLI import safety#2

Merged
rogerchappel merged 1 commit into
mainfrom
garden/import-safe-cli
May 9, 2026
Merged

Improve prpack CLI import safety#2
rogerchappel merged 1 commit into
mainfrom
garden/import-safe-cli

Conversation

@rogerchappel
Copy link
Copy Markdown
Owner

What changed

  • Guarded the CLI entrypoint so importing dist/src/cli.js no longer runs prpack generate as a side effect.
  • Added a regression test that imports the built CLI module, confirms run is exported, and verifies no PR_PACK.md is created.

Why it matters

Prpack exports its CLI runner for automation and tests. Import-time side effects can surprise toolchains, create files in the caller's working directory, and make programmatic use less trustworthy.

Verification

  • npm ci && npm run check && npm test && npm run smoke && npm run release:check — passed.

Remaining limitations / follow-up

  • The version command is still hard-coded to 0.1.0; a future PR could read it from package metadata like the library export path does.

@rogerchappel rogerchappel merged commit d77b701 into main May 9, 2026
1 check passed
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