fix(zmodel): change decimal.js to dev dependency for "@zenstackhq/schema"#667
fix(zmodel): change decimal.js to dev dependency for "@zenstackhq/schema"#667
Conversation
|
Claude finished @ymc9's task —— View job PR Review: Move decimal.js to devDependency ✅I've reviewed this pull request that moves Todo List:
Review Feedback✅ Code Quality & Best PracticesThis change correctly follows dependency management best practices:
✅ No Runtime Impact
✅ Package Structure
✅ Performance Considerations
✅ Security & Test Coverage
SummaryThis is a well-executed optimization that properly categorizes decimal.js as a development-only dependency in the schema package. The change aligns with TypeScript best practices and reduces unnecessary runtime dependencies without breaking functionality. Recommendation: ✅ Approve - This change improves package dependency hygiene without any functional impact. |
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts dependency classification for decimal.js in @zenstackhq/schema, aiming to treat it as a development-only dependency rather than a runtime dependency.
Changes:
- Moved
decimal.jsfromdependenciestodevDependenciesinpackages/schema/package.json. - Updated
pnpm-lock.yamlimporter entry forpackages/schemaaccordingly. - Lockfile snapshot entries were also updated as part of the regeneration.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
packages/schema/package.json |
Moves decimal.js to devDependencies for @zenstackhq/schema. |
pnpm-lock.yaml |
Updates lockfile to reflect the dependency move (plus additional snapshot churn). |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "devDependencies": { | ||
| "@zenstackhq/eslint-config": "workspace:*", | ||
| "@zenstackhq/typescript-config": "workspace:*" | ||
| "@zenstackhq/typescript-config": "workspace:*", | ||
| "decimal.js": "catalog:" | ||
| } |
There was a problem hiding this comment.
@zenstackhq/schema's public type surface references Decimal from decimal.js (see src/schema.ts exporting MappedBuiltinType with Decimal). Moving decimal.js to devDependencies means consumers installing this package won't get decimal.js, and TypeScript will fail to resolve the generated .d.ts types under pnpm's strict node_modules layout. Keep decimal.js in dependencies (or make it a peerDependency and adjust the exported types to avoid hard-requiring the module).
| eslint-config-next@16.0.1(@typescript-eslint/parser@8.46.2(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3): | ||
| dependencies: | ||
| '@next/eslint-plugin-next': 16.0.1 | ||
| eslint: 9.29.0(jiti@2.6.1) | ||
| eslint-import-resolver-node: 0.3.9 | ||
| eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.46.2(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) | ||
| eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.2(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) | ||
| eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.2(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.46.2(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) | ||
| eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.6.1)) |
There was a problem hiding this comment.
The lockfile includes changes to eslint-plugin-import/resolver snapshot entries in addition to the intended decimal.js dependency move. If possible, regenerate pnpm-lock.yaml with the repo-pinned pnpm@10.23.0 and ensure only dependency graph changes related to the decimal.js move are included to reduce review/merge noise.
Summary by CodeRabbit