-
-
Notifications
You must be signed in to change notification settings - Fork 17
fix: add missing "files" entries to package.json #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThree package.json files were updated to add a top-level Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
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 |
|
Claude finished @ymc9's task —— View job PR Review: Missing "files" entries in package.jsonTodo List:
Review SummaryThis PR correctly adds missing ✅ Positive Changes
🚨 Critical Issue: CLI Package Missing BinaryThe Required Fix: "files": [
"dist",
"bin"
],Evidence:
🔍 Other Observations
📋 Recommendations
🔒 Security & Performance
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds the "files" field to three package.json files to explicitly specify which files should be included when the packages are published to npm. Without this field, npm may include unwanted files or rely on default inclusion rules.
- Adds "files" array containing "dist" to @zenstackhq/zod
- Adds "files" array containing "dist" to @zenstackhq/client-helpers
- Adds "files" array containing "dist" to @zenstackhq/cli
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/zod/package.json | Adds "files" field with "dist" directory to control package contents |
| packages/clients/client-helpers/package.json | Adds "files" field with "dist" directory to control package contents |
| packages/cli/package.json | Adds "files" field with "dist" directory, but missing required "bin" directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI Agents
In @packages/cli/package.json:
- Around line 24-26: The package.json "files" array excludes the CLI executable,
so the bin/cli file (which provides the zen and zenstack commands and imports
../dist/index.js) won't be published; update the "files" array in package.json
to include "bin" in addition to "dist" (e.g., change "files": ["dist"] to
include "bin") so the bin/cli executable is packaged and the zen/zenstack
commands work for users.
🧹 Nitpick comments (1)
packages/zod/package.json (1)
13-15: Unnecessary "files" field for private package.This package is marked as
"private": true(line 7), meaning it will never be published to npm. The"files"field only affects published packages, so adding it here has no effect and may cause confusion.Consider removing this field from private packages.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/cli/package.jsonpackages/clients/client-helpers/package.jsonpackages/zod/package.json
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : ZModel schema files should define database structure and policies that compile to TypeScript via `zenstack generate`
Applied to files:
packages/clients/client-helpers/package.json
📚 Learning: 2025-12-30T15:07:10.092Z
Learnt from: mwillbanks
Repo: zenstackhq/zenstack-v3 PR: 550
File: packages/orm/src/client/crud/operations/base.ts:158-159
Timestamp: 2025-12-30T15:07:10.092Z
Learning: In the zenstackhq/zenstack-v3 codebase, ts-expect-error should be heavily avoided in production code (packages/*). It is acceptable in test files but production code should use proper type annotations, type assertions, or refactoring to resolve type errors instead.
Applied to files:
packages/clients/client-helpers/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Agent
- GitHub Check: claude-review
- GitHub Check: build-test (22.x, sqlite)
- GitHub Check: build-test (22.x, postgresql)
🔇 Additional comments (1)
packages/clients/client-helpers/package.json (1)
16-18: LGTM! Files field correctly includes the dist directory.The
"files"field appropriately restricts the published package to thedistdirectory, which aligns with all the package exports. Standard files likepackage.json,README, andLICENSEare automatically included by npm.
Co-authored-by: Copilot <[email protected]>
|
Claude finished @ymc9's task —— View job PR Review: Missing "files" entries in package.jsonTodo List:
✅ Overall AssessmentThis PR correctly addresses missing Code Quality & Best Practices✅ Positive Changes:
Potential Bugs & Issues🚨 Critical Issue Found Outside This PR:
✅ No Other Issues Found:
Performance Considerations✅ Improvements:
Security Concerns✅ Security Improvements:
✅ No Security Issues Found:
Test Coverageℹ️ Test Considerations:
Architecture & Consistency✅ Excellent Consistency:
SummaryThis is a high-quality fix that addresses an important packaging issue. The critical CLI binary problem has been properly resolved, and the changes follow monorepo best practices. The only suggestion is to consider removing the unnecessary Recommendation: ✅ Approve and merge after verifying package contents with |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.