Thank you for your interest in contributing to cdk-agc!
- Node.js 24+
- Vite+ (
vp)
This project pins Node.js in .node-version. Enable Vite+'s managed runtime once, then let vp env install and select that pinned version for you.
# Install Vite+
curl -fsSL https://vite.plus | bash
# Use Vite+'s managed Node.js for this machine
vp env on
# Install the version pinned in .node-version
vp env installpnpm is pinned in package.json via packageManager, and Vite+ resolves that automatically when you run vp install.
# Clone the repository
git clone https://github.com/go-to-k/cdk-agc.git
cd cdk-agc
# Install the pinned Node.js version from .node-version
vp env install
# Install dependencies (workspace includes test-cdk)
vp install
# Package the CLI
vp pack
# Run unit tests
vp test
# Run integration tests (requires Node.js 24)
vp run test:integgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix# Development mode (auto-rebuild)
vp pack --watch# Run the default verification flow
vp check
# Format only
vp fmt
# Lint only
vp lint
# Format check (used in CI)
vp fmt --checkUnit Tests:
# Run unit tests
vp test
# Watch mode
vp test --watch
# Generate coverage report
vp test --coverageIntegration Tests:
# Run all integration tests (requires Node.js 24)
vp run test:integ
# Run specific integration test
vp run test:integ:basic # Basic cleanup test
vp run test:integ:multiple # Multiple synth test
vp run test:integ:keep-hours # Keep hours option testNote: Integration tests use Node.js 24's TypeScript execution support with --experimental-strip-types. If vp env current does not show the pinned Node.js version, run vp env install again before testing.
# Production build
vp pack
# Test CLI execution
vp run cligit add .
git commit -m "feat: add support for custom manifest paths"Commit Message Convention (Conventional Commits):
feat:New feature → Minor version bump (1.1.0 → 1.2.0)fix:Bug fix → Patch version bump (1.1.0 → 1.1.1)feat!:orBREAKING CHANGE:→ Major version bump (1.1.0 → 2.0.0)docs:,style:,refactor:,test:,chore:,ci:→ No release
Examples:
git commit -m "feat: add support for custom manifest paths"
git commit -m "fix: correctly handle nested asset directories"
git commit -m "feat!: remove deprecated --force option"git push origin feature/your-feature-nameThen create a pull request on GitHub.
Your PR title MUST follow Conventional Commits format, or CI will fail.
Format: <type>(<scope>): <description>
Allowed types:
feat: New feature → Minor version bumpfix: Bug fix → Patch version bumpdocs: Documentation onlystyle: Code style changes (formatting, missing semi-colons, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI configuration changeschore: Other changes (dependencies, tooling, etc.)revert: Revert a previous commit
Scope (optional): Component or area affected (e.g., api, cli, parser)
Breaking changes: Add ! after type (e.g., feat!:) or include BREAKING CHANGE: in description
Examples:
- ✅
feat: add support for custom manifest paths - ✅
fix: correctly handle nested asset directories - ✅
feat(cli): add --verbose flag - ✅
feat!: remove deprecated --force option - ❌
Add new feature(missing type) - ❌
feature: add something(invalid type)
Before creating a pull request, ensure:
- PR title follows Conventional Commits format
- Code passes checks (
vp check) - All tests pass (
vp test) - New features include appropriate tests
- Documentation is updated (if needed)
Tests use Vitest through Vite+.
New test files should follow the *.test.ts naming convention.
import { describe, it, expect } from "vite-plus/test";
describe("Feature name", () => {
it("should work as expected", () => {
expect(result).toBe(expected);
});
});Releases are fully automated using semantic-release.
-
Create PR with Conventional Commits
# Create feature branch git checkout -b feature/new-feature # Make changes and commit with conventional format git commit -m "feat: add new feature" # Push and create PR git push origin feature/new-feature
-
Merge PR to main
- semantic-release analyzes all commits since last release
- Automatically determines version bump based on commit types:
feat:→ Minor version (0.1.0 → 0.2.0)fix:→ Patch version (0.1.0 → 0.1.1)feat!:orBREAKING CHANGE:→ Major version (0.1.0 → 1.0.0)
- Updates
package.jsonandCHANGELOG.md - Publishes to npm with provenance
- Creates GitHub Release with release notes
Analyzing commits...
✔ Found 3 commits since last release
✔ Determined next version: 0.2.0
✔ Updated package.json and CHANGELOG.md
✔ Published to npm: cdk-agc@0.2.0
✔ Created GitHub Release: v0.2.0
If GitHub Actions fails:
# Run semantic-release locally
vp exec semantic-release --no-ci.github/workflows/ci.yml - Runs on PRs and pushes:
- Lint & format check, build, unit tests, integration tests, coverage upload
.github/workflows/release.yml - Runs on pushes to main:
- Analyzes commits with semantic-release
- Determines version based on Conventional Commits
- Updates package.json and CHANGELOG.md
- Publishes to npm with provenance
- Creates GitHub Release with auto-generated notes
- TypeScript: Type-safe development
- Node.js 24+: Native TypeScript support for integration tests
- Vite+: Unified toolchain (build, test, lint, format)
- pnpm: Fast, efficient package manager with workspace support
- Vitest (via Vite+): Fast unit test framework
- Oxlint (via Vite+): Ultra-fast linter (Rust-based)
- Oxfmt (via Vite+): Ultra-fast formatter (Rust-based)
- Commander: CLI framework
- semantic-release: Automated version management and publishing
- GitHub Actions: CI/CD automation
- Issues: GitHub Issues
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.