pnpm change
추가된 버전: v11.13.0
변경 의도를 기록합니다. 변경이 영향을 주는 패키지, 각 패키지의 버전 증가 유형, 그리고 변경 로그 항목이 되는 요약을 기록합니다. 의도 파일은 changesets 형식으로 .changeset/에 기록됩니다.
pnpm change [--bump <type>] [--summary <text>] [<pkg>...]
pnpm change status
pnpm change check
변경 의도는 나중에 pnpm version -r이 사용합니다. 전체 워크플로는 릴리스 관리를 참고하세요.
사용#
인수 없이 실행하면 대화형으로 의도를 기록합니다:
pnpm change
다음 세 가지 질문을 받게 됩니다:
- 이 변경은 어떤 패키지에 영향을 줍니까?
main(또는master)과의 병합 기준 이후 변경된 패키지가 미리 선택됩니다. - 어떤 패키지의 major 버전을 올려야 합니까? 이어서
minor에 대해서도 같은 질문을 합니다. 나머지 패키지는patch버전이 올라갑니다. - 변경 요약, 이 내용이 변경 로그 항목이 됩니다.
결과는 .changeset/calm-cats-resolve.md 같은 파일입니다:
---
"@example/core": minor
"@example/cli": patch
---
Added a `--watch` flag to the build command.
이 파일을 변경 사항과 함께 커밋하세요.
패키지 이름을 --bump 및 --summary와 함께 전달하면 프롬프트 없이 의도를 기록하며, 스크립트에서 유용합니다:
pnpm change --bump patch --summary "Fixed a crash on empty input" @example/core
하위 명령#
status#
대기 중인 변경 의도와 그로부터 생성되는 릴리스 계획을 표시합니다.
pnpm change status
Pending change intents:
.changeset/calm-cats-resolve.md
Release plan:
@example/core: 1.2.0 → 1.3.0 (minor, via intent)
@example/cli: 0.4.1 → 0.4.2 (patch, via intent+dependencies)
각 버전 증가의 원인은 intent (변경 의도가 패키지를 지정함), dependencies (전파로 종속 패키지가 포함됨), fixed (고정 그룹의 동반 패키지), epic (에픽 리베이스) 중 하나입니다.
Private packages ("private": true) are never checked against the registry for a first release, so their pending change intents always show up as bumps, and a workspace of only private packages needs no registry access to plan a release.
check#
Added in: v11.26.0
Validate the pending change intents, and check the versions committed in the workspace against the epic bands and fixed group lockstep declared in pnpm-workspace.yaml.
pnpm change check
Unlike pnpm change status, which reports the release the pending intents produce, check plans the release from the pending intents without reporting it, and checks only the versions already in the manifests. An intent that would fail at release time, such as one naming a package outside the workspace, fails the command. Run it on every pull request: a package whose version drifted out of its epic's band, or out of step with its fixed group, fails the command. Every violation is listed, including ones in packages the current release does not touch.
옵션#
--bump <type>#
지정한 패키지의 버전 증가 유형: none, patch, minor 또는 major. none records an explicit decline: the change needs no release.
--summary <text>#
변경 로그 항목의 요약입니다. 패키지 이름과 함께 사용하면 이 명령이 비대화형으로 실행됩니다.
디렉터리로 패키지 참조하기#
두 워크스페이스 프로젝트가 같은 이름으로 게시되는 경우, 패키지를 워크스페이스 기준 상대 디렉터리로 대신 참조할 수 있으며 ./ 접두사를 사용합니다:
---
"./packages/cli": minor
---
이것은 pnpm이 changesets 형식에 추가한 유일한 확장입니다. pnpm change는 이름이 모호할 때 이를 자동으로 기록합니다.