conventional-branch-name
v0.1.0
Published
Conventional branch name validation
Readme
TypeScript Package Template
A template repository for authoring npm packages with TypeScript.
Features
- Modern build setup with tsdown
- Dual ESM/CJS distribution with TypeScript definitions
- Automated CI/CD with GitHub Actions
- Semantic versioning and automated releases via semantic-release
- Code quality tools:
- Biome for linting/formatting,
- knip for unused code detection,
- bun-security-scanner for dependencies vulnerabilities
- Pre-commit hooks with Lefthook
- Conventional commits enforcement with commitlint and czg
- Test setup with Bun test runner
Setup
Click the green Use this template button to create a new repository from this template.
Then, update the following placeholders:
package.json: Updatename,description,keywords,homepage,bugs,repository,funding, andauthorLICENSE: Update the copyright year and author name if neededREADME.md: Replace this entire file with documentation for your actual package
Configuration
The template is configured with sensible defaults, but you can customize:
tsconfig.json- TypeScript compiler options (extends@tsconfig/bun)tsdown.config.ts- Build configuration (entry points, formats, minification)biome.json- Linting and formatting ruleslefthook.json- Git hooks for pre-commit checks.releaserc.json- Semantic release configurationknip.jsonc- Unused code and dependencies detection
Available Scripts
# Development
bun run dev # Type check in watch mode
bun run typecheck # Type check once
# Code Quality
bun run lint # Lint and auto-fix with Biome
bun run check # Run all checks (lint, typecheck, test)
# Testing & Building
bun test # Run tests
bun run build # Build for productionPublishing
This template uses semantic-release for automated versioning and publishing.
Automated Releases (Recommended)
When you push commits to the main or next branch, the CI/CD pipeline will:
- Analyze commit messages to determine the version bump (major, minor, patch)
- Create a git tag
- Publish to npm with provenance
- Create a GitHub release
Commit message format follows Conventional Commits:
feat: add new feature- minor version bumpfix: resolve bug- patch version bumpperf: improve performance- patch version bumprefactor: restructure code- patch version bumpfeat!: breaking changeorBREAKING CHANGE:in body - major version bumpdocs:,chore:,ci:,test:,build:,style:- no release
Manual Publishing
If you prefer manual releases:
- Remove or disable the
releasejob in.github/workflows/ci.yml - Use npm's standard workflow:
npm version patch # or minor, or major
git push --follow-tags
npm publish --provenanceNPM Authentication
The CI/CD pipeline uses npm's OIDC authentication for secure, token-free publishing. No manual setup required for public packages.
For scoped/private packages, configure npm access in .releaserc.json under the @semantic-release/npm plugin.
License
MIT
