publish-npm-version

작성자: prisma

Prisma Next의 다음 마이너 릴리스를 준비합니다: 루트 package.json 버전을 올리고, 모든 워크스페이스 패키지에 반영하며, 제목이...인 PR을 엽니다.

npx skills add https://github.com/prisma/prisma-next --skill publish-npm-version

Publish next npm version

Audience

Maintainers of Prisma Next who have permission to push branches and open PRs in the repository. The skill is invoked locally by the maintainer; it does not run as a GitHub Action. Running locally is what makes the resulting PR trigger CI normally — PRs opened by a workflow's GITHUB_TOKEN do not, which defeats the point of cutting a reviewable release.

Background reading

Read docs/oss/versioning.md before running this skill. It covers:

  • The source-of-truth model (root package.json version).
  • The lockstep guarantee (every workspace package matches the root).
  • The dist-tag convention (latest / dev / beta).
  • The full release procedure (this skill is step 2 of 3; merging the PR is the publish trigger — there is no separate dispatch step).
  • The emergency-patch path (this skill does not handle patches).

This SKILL.md covers only the mechanics of step 2 — opening the bump PR.

Pre-flight

The skill does not require the maintainer to be on main or to have a clean working tree — it does all the work in a fresh worktree off origin/main, so the maintainer's current worktree (typically a feature branch in worktrees/<feature>/) is left undisturbed.

Before invoking this skill, confirm:

  1. The maintainer can fetch from origin (git fetch origin main succeeds).
  2. You are ready to draft the release notes for this bump. The draft-release-notes skill (invoked in step 7 below) enumerates the merged PRs since the previous stable tag and surfaces the release-notes-worthy changes — including any breaking changes — so this no longer rests on the maintainer's unaided recollection. If you already know of an in-flight breaking change that must be called out, note it so the authoring step gives it prominence.

If either precondition is unmet, stop and surface the issue. Do not try to auto-resolve.

Procedure

  1. Fetch and determine the target version. Run git fetch origin main, then read the current root version from origin/main and compute the next minor:

    git fetch origin main
    CURRENT=$(git show origin/main:package.json | node -e 'process.stdout.write(JSON.parse(require("fs").readFileSync(0,"utf8")).version)')
    NEXT=$(node -e "const [a,b] = process.argv[1].split('.'); process.stdout.write(\`\${a}.\${Number(b)+1}.0\`)" "$CURRENT")
    echo "$CURRENT → $NEXT"
    

    (Patch component is reset to 0 by design — see docs/oss/versioning.md.)

  2. Create a fresh worktree off origin/main. Use the convention release/<version> for both the branch and the sibling worktree path:

    git worktree add -b "release/$NEXT" "../release-$NEXT" origin/main
    cd "../release-$NEXT"
    

    This is what makes the skill safe to invoke from any worktree: the bump happens against a fresh checkout of origin/main, not against the maintainer's current branch. The branch name encodes the target version so reviewers can tell at a glance what the PR ships.

  3. Bump. From the new worktree, run pnpm bump-minor. The script reads the root package.json version from git show HEAD:package.json (in this worktree, HEAD is origin/main), computes the next minor, and writes it to every workspace package.json via scripts/set-version.ts.

    Note: bump-minor requires node_modules to resolve its dependencies (e.g. pathe). If the fresh worktree has no node_modules, run pnpm install --frozen-lockfile --ignore-scripts first.

  4. Refresh the lockfile. Workspace-internal dependencies in this repo are pinned as workspace:<version> (not workspace:*), so the bump changes their specifiers in pnpm-lock.yaml. Run:

    pnpm install --lockfile-only
    

    to update pnpm-lock.yaml in lockstep. Without this step, CI fails with ERR_PNPM_OUTDATED_LOCKFILE on the release PR.

  5. Sanity-check the diff. Confirm:

    • Every modified file is either a package.json or pnpm-lock.yaml.
    • The package.json diffs are exactly version field changes plus internal workspace:<old> → workspace:<new> specifier bumps (no other fields).
    • The pnpm-lock.yaml diff is exactly specifier: workspace:<old> → workspace:<new> lines (no resolution churn for external packages).
  6. Commit. Stage package.json files and pnpm-lock.yaml together in a single commit:

    chore(release): bump to <version>
    

    No body is required — the PR description will explain the bump in detail.

  7. Draft the release notes. From inside this release/<version> worktree, run the draft-release-notes skill for <version>. It enumerates the merged PRs since the previous stable v* tag, triages which are user-facing, categorizes them (breaking changes first), writes docs/releases/v<version>.md, and prepends a matching CHANGELOG.md entry — committing both on the release branch as their own commit. Committing the notes here is what lands them in the bump PR diff, so the PR-mode check:release-notes gate passes and the maintainer reviews the notes as part of the release PR.

  8. Push the branch to origin.

  9. Open the PR with gh pr create. Use the title:

    Bump to version <version>
    

    The body should:

    • State the previous and new version (<previous> → <new>).
    • Link to docs/oss/versioning.md for context.
    • Point reviewers at the committed docs/releases/v<version>.md (authored by the draft-release-notes skill in step 7) as the human-review surface for the release's user-facing changes.
    • Note that merging this PR ships the release: the resulting push to main carries the bumped root version, the Publish to npm workflow detects the change and publishes <new> under dist-tag latest, and a matching GitHub Release is created automatically.
  10. Stop and report the PR URL and the worktree path to the maintainer. The maintainer can git worktree remove ../release-<version> after the PR merges. Do not merge the PR yourself; the merge is a human gate where someone confirms the release notes are acceptable. (Merging triggers the publish — there is no separate dispatch step.)

Idempotency

pnpm bump-minor is idempotent because it reads the root version from git show HEAD:package.json rather than from the working tree. A maintainer who runs the skill twice without committing in between still ends up with the same target version, not a double-bump. If you find yourself in that situation (working tree dirty with a previous bump), reset and re-run; do not stack bumps.

Out of scope

  • Merging the PR. The skill stops at "PR opened" so a human can confirm the release notes. Merging is what triggers the actual publish, but it remains a human gate by design.
  • Patch releases. Patches use a different bump shape (patch+1 from a release tag); the manual procedure in docs/oss/versioning.md applies.
  • Pre-release / beta tags. The beta dist-tag is hand-cut via a manual workflow_dispatch of Publish to npm; this skill always advances to a stable minor.

prisma의 다른 스킬

prisma-cli-migrate-reset
prisma
prisma 마이그레이션 리셋
official
prisma-cli-validate
prisma
prisma 검증. 이 Prisma 기능을 사용할 때 참조하세요.
official
prisma-next-extension-upgrade
prisma
Upgrade Prisma Next in your extension. Bumps every `@prisma-next/*` dependency to the requested target (or npm `latest`), runs the per-transition upgrade…
official
adr-review
prisma
하나 이상의 ADR을 새로운 시각으로(사전 맥락이 없는 팀원으로서) 검토하고, 서사 및 구조적 문제를 식별한 후 재작성합니다. 다음과 같은 경우에 사용하세요…
official
prisma-next-upgrade
prisma
Upgrade Prisma Next in your app. Bumps every `@prisma-next/*` dependency from the version pinned in the lockfile to the requested target (or npm `latest`),…
official
prisma-cli
prisma
Prisma CLI 명령어, 옵션, 워크플로우에 대한 완전한 참조로, 설정, 마이그레이션, 데이터베이스 작업 전반을 다룹니다. 우선순위별로 정리된 20개 이상의 명령어를 포함합니다: 설정(init), 생성(generate), 개발(dev), 데이터베이스 작업(db pull/push/seed/execute), 마이그레이션(migrate dev/deploy/reset/status/diff/resolve). Prisma 7.x 변경 사항을 포함합니다: 새로운 prisma.config.ts 설정 파일, 제거된 플래그(--skip-generate, --skip-seed, --schema, --url), 명시적...
official
prisma-client-api
prisma
Prisma Client API 전체 참조: 모델 쿼리, CRUD 작업, 필터링, 관계 및 트랜잭션. findUnique, findMany, create, update, delete, upsert 및 반환 변형이 있는 대량 작업을 포함한 17가지 모델 쿼리 메서드를 다룹니다. select, include, omit, orderBy, take, skip, cursor 및 distinct를 포함한 결과 형태를 지정하는 쿼리 옵션을 제공합니다. equals, in, contains, startsWith, lt, gt와 같은 스칼라 및 논리 필터 연산자와 some,...을 포함한 관계 필터를 포함합니다.
official
prisma-compute
prisma
Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, `auth workspace`, Compute apps/deployments/build logs/domains, `@prisma/cli agent install`, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte,...
developmentdevopsofficial