This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Version-code is a TypeScript library for version number management and comparison (版本号管理、比较).
- Build:
pnpm buildortsup- Builds the project using tsup - Development:
pnpm devortsup --watch- Watch mode for development - Test:
pnpm testorvitest- Run tests using Vitest
This project uses pnpm (version 10.33.0). Always use pnpm commands instead of npm or yarn.
src/index.ts- Main entry point for the librarydist/- Build output directory (generated by tsup)tsup.config.ts- Build configurationtsconfig.json- TypeScript configuration
The project uses tsup for building, which is a zero-config TypeScript bundler powered by esbuild. The build produces:
- CommonJS output:
dist/index.cjs - Source maps enabled
Uses Vitest (v4.1.5) for testing. Vitest is a Vite-native test runner that provides fast unit testing for TypeScript/JavaScript projects.
- 2-space indentation
- UTF-8 encoding
- LF line endings
- Trailing whitespace trimmed
- Final newline inserted
- TypeScript strict mode enabled
This project uses ES modules ("type": "module" in package.json).