Skip to content

fix: run the npx fallback from @prisma/composer-cli and default to 0.7.0 - #6

Merged
kristof-siket merged 2 commits into
mainfrom
fix/composer-cli-package-and-default-version
Aug 18, 2026
Merged

fix: run the npx fallback from @prisma/composer-cli and default to 0.7.0#6
kristof-siket merged 2 commits into
mainfrom
fix/composer-cli-package-and-default-version

Conversation

@kristof-siket

Copy link
Copy Markdown
Collaborator

Problems

1. Wrong package in the npx fallback

When a repo has no local node_modules/.bin/prisma-composer, the action falls back to npx --package=@prisma/composer@<version> prisma-composer. From 0.7.0 the prisma-composer bin moved out of @prisma/composer into a new dedicated package, @prisma/composer-cli. Fetching @prisma/composer@0.7.0 via npx finds the package but not the bin, so the fallback command fails for any 0.7.0+ version.

The fix changes the fallback to --package=@prisma/composer-cli@<version>.

2. Stale default version

The composer-version input defaulted to 0.6.0. Setup PRs generated by the platform now pin ^0.7.0 and add @prisma/composer-cli as an explicit devDependency, so the local bin is present and the fallback does not run for those repos. The default matters for hand-written workflows or repos that omit the devDependency. Updated to 0.7.0.

3. Misleading startup log

The startup log printed composer=<version> regardless of whether the local bin or the npx fallback ran. In a real 0.7.0 run with a local bin the log would say composer=0.6.0 (the old default), which is wrong on both counts.

The fix moves the composer label to after the local-bin check: it now prints composer=local bin when the repo's own install provides the bin, and composer=<version> (npx fallback) only when npx actually runs.

Scope note

Today's generated setup PRs ship @prisma/composer-cli as a devDependency, so the local bin is always present for repos connected through the Console. The fallback only matters for hand-written workflows or repos without that devDependency.

Changes

  • main.mjs: default "0.6.0""0.7.0"; fallback package @prisma/composer@prisma/composer-cli; log label moved and made path-aware
  • action.yml: default and description updated to match
  • README.md: table default updated to 0.7.0; Node 22 limitation de-versioned; inline YAML comment about the 0.6.0 crash removed

From 0.7.0 the prisma-composer bin moved from @prisma/composer into the
separate @prisma/composer-cli package. The old fallback command fetched
@prisma/composer, which no longer contains the bin, so npx would 404.

Also updates the default version from 0.6.0 to 0.7.0 and makes the startup
log honest: the composer label now prints after the local-bin check, so it
reports "composer=local bin" when the repo's own install provides the bin
and "composer=<version> (npx fallback)" only when npx actually runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kristof-siket
kristof-siket marked this pull request as ready for review August 18, 2026 08:24
@kristof-siket
kristof-siket merged commit bca0702 into main Aug 18, 2026
5 checks 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