| paths |
|
|---|
- Follow existing project's package manager (check for
pnpm-lock.yaml,yarn.lock,package-lock.json) - Default to pnpm for new projects
- Never commit
package-lock.jsonoryarn.lockif project uses pnpm
- Check existing dependencies before adding new ones
- In workspaces: add packages to specific workspace projects, not root
- Do not downgrade a dependency to fix an issue without explicit user approval
- When debugging and you think there is a problem with a dependency, check the latest APIs of the dependency based on the version currently being used
- Use project scripts over direct tool invocation
- Prefer
pnpm typecheckovernpx tsc --noEmit - Use
pnpm auditinstead ofnpm audit
- Follow semantic versioning for all version-related decisions
- Apply semver classification when updating dependencies
- Use appropriate version ranges based on compatibility requirements
| Change Type | Version Bump | Examples |
|---|---|---|
| Breaking changes | MAJOR (X.0.0) | Removed APIs, changed signatures, renamed exports |
| New features | MINOR (x.Y.0) | Added methods, new optional parameters |
| Bug fixes | PATCH (x.y.Z) | Fixed bugs, performance improvements |