Skip to content

Latest commit

 

History

History
172 lines (117 loc) · 4.62 KB

File metadata and controls

172 lines (117 loc) · 4.62 KB

Releasing

How we version, tag, and publish packages in the claude-code-hooks monorepo.

Versioning

We follow Semantic Versioning (semver):

  • MAJOR (1.0.02.0.0): breaking changes
  • MINOR (0.1.00.2.0): new features, backward-compatible
  • PATCH (0.2.00.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.

Package Names

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.

Publishing a Package

  1. Bump the version in the target package's package.json:
cd packages/sound
npm version patch   # or minor / major
  1. 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
  1. Publish from the package directory:
cd packages/sound
npm publish --access public

For scoped packages:

cd packages/security
npm publish --access public
  1. Push tags:
git push && git push --tags

Tag Format

Tags 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

Pre-publish Checklist

  • npm install succeeds from root
  • npm audit --audit-level=low passes
  • Package files array in package.json only includes what's needed
  • README.md is up to date in the package directory
  • Version bump is correct (check semver)
  • All changes are committed

Internal Dependencies

@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.

Notes

  • We do not use a publish-all script — each package is published independently.
  • The root package.json is private: true and is never published.
  • Prefer npm version over hand-editing package.json — it handles the git tag too if you pass --git-tag-version.

릴리즈 가이드 (한국어)

claude-code-hooks 모노레포에서 버전 관리, 태그, 패키지 배포 방법을 설명합니다.

버전 관리

Semantic Versioning (semver)을 따릅니다:

  • MAJOR (1.0.02.0.0): 호환성을 깨는 변경
  • MINOR (0.1.00.2.0): 새 기능, 하위 호환
  • PATCH (0.2.00.2.1): 버그 수정, 하위 호환

1.0 이전 패키지에서는 마이너 범프에 호환성을 깨는 변경이 포함될 수 있습니다. 1.0 이후에는 엄격한 semver를 따릅니다.

패키지 배포 방법

  1. 대상 패키지의 package.json에서 버전을 올립니다:
cd packages/sound
npm version patch   # 또는 minor / major
  1. 커밋하고 태그합니다:
git add .
git commit -m "release: @claude-code-hooks/sound@0.2.6"
git tag @claude-code-hooks/sound@0.2.6
  1. 패키지 디렉토리에서 배포합니다:
cd packages/sound
npm publish --access public

스코프 패키지의 경우:

cd packages/security
npm publish --access public
  1. 태그를 푸시합니다:
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.jsonfiles 배열에 필요한 것만 포함
  • 패키지 디렉토리의 README.md가 최신 상태
  • 버전 범프가 올바른지 확인 (semver)
  • 모든 변경 사항이 커밋됨

내부 의존성

@claude-code-hooks/core는 소비자 패키지에서 정확한 버전으로 참조됩니다. core를 범프할 때 packages/securitypackages/secrets의 의존성 버전도 함께 올려야 합니다.

참고

  • "모두 배포" 스크립트를 사용하지 않습니다 — 각 패키지를 독립적으로 배포합니다.
  • 루트 package.jsonprivate: true이며 절대 배포되지 않습니다.
  • package.json을 직접 편집하는 것보다 npm version을 선호합니다 — --git-tag-version을 전달하면 git 태그도 처리합니다.