How we version, tag, and publish packages in the claude-code-hooks monorepo.
We follow Semantic Versioning (semver):
- MAJOR (
1.0.0→2.0.0): breaking changes - MINOR (
0.1.0→0.2.0): new features, backward-compatible - PATCH (
0.2.0→0.2.1): bug fixes, backward-compatible
While packages are pre-1.0, minor bumps may include breaking changes. After 1.0, we follow strict semver.
| Directory | npm name | Published? |
|---|---|---|
packages/core |
@claude-code-hooks/core |
No (internal) |
packages/security |
@claude-code-hooks/security |
Yes |
packages/secrets |
@claude-code-hooks/secrets |
Yes |
packages/sound |
@claude-code-hooks/sound |
Yes |
@claude-code-hooks/core is a workspace dependency only — not published to npm.
- Bump the version in the target package's
package.json:
cd packages/sound
npm version patch # or minor / major- Commit and tag:
git add .
git commit -m "release: @claude-code-hooks/sound@0.2.6"
git tag @claude-code-hooks/sound@0.2.6- Publish from the package directory:
cd packages/sound
npm publish --access publicFor scoped packages:
cd packages/security
npm publish --access public- Push tags:
git push && git push --tagsTags follow the pattern <package-name>@<version>:
@claude-code-hooks/sound@0.2.5
@claude-code-hooks/security@0.1.0
@claude-code-hooks/secrets@0.1.0
-
npm installsucceeds from root -
npm audit --audit-level=lowpasses - Package
filesarray inpackage.jsononly includes what's needed -
README.mdis up to date in the package directory - Version bump is correct (check semver)
- All changes are committed
@claude-code-hooks/core is referenced by exact version in consumer packages. When bumping core, also bump the dependency version in packages/security and packages/secrets.
- We do not use a publish-all script — each package is published independently.
- The root
package.jsonisprivate: trueand is never published. - Prefer
npm versionover hand-editingpackage.json— it handles the git tag too if you pass--git-tag-version.
claude-code-hooks 모노레포에서 버전 관리, 태그, 패키지 배포 방법을 설명합니다.
Semantic Versioning (semver)을 따릅니다:
- MAJOR (
1.0.0→2.0.0): 호환성을 깨는 변경 - MINOR (
0.1.0→0.2.0): 새 기능, 하위 호환 - PATCH (
0.2.0→0.2.1): 버그 수정, 하위 호환
1.0 이전 패키지에서는 마이너 범프에 호환성을 깨는 변경이 포함될 수 있습니다. 1.0 이후에는 엄격한 semver를 따릅니다.
- 대상 패키지의
package.json에서 버전을 올립니다:
cd packages/sound
npm version patch # 또는 minor / major- 커밋하고 태그합니다:
git add .
git commit -m "release: @claude-code-hooks/sound@0.2.6"
git tag @claude-code-hooks/sound@0.2.6- 패키지 디렉토리에서 배포합니다:
cd packages/sound
npm publish --access public스코프 패키지의 경우:
cd packages/security
npm publish --access public- 태그를 푸시합니다:
git push && git push --tags태그는 <패키지이름>@<버전> 형식을 따릅니다:
@claude-code-hooks/sound@0.2.5
@claude-code-hooks/security@0.1.0
@claude-code-hooks/secrets@0.1.0
- 루트에서
npm install성공 -
npm audit --audit-level=low통과 -
package.json의files배열에 필요한 것만 포함 - 패키지 디렉토리의
README.md가 최신 상태 - 버전 범프가 올바른지 확인 (semver)
- 모든 변경 사항이 커밋됨
@claude-code-hooks/core는 소비자 패키지에서 정확한 버전으로 참조됩니다. core를 범프할 때 packages/security와 packages/secrets의 의존성 버전도 함께 올려야 합니다.
- "모두 배포" 스크립트를 사용하지 않습니다 — 각 패키지를 독립적으로 배포합니다.
- 루트
package.json은private: true이며 절대 배포되지 않습니다. package.json을 직접 편집하는 것보다npm version을 선호합니다 —--git-tag-version을 전달하면 git 태그도 처리합니다.