-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix(runtime): policy plugin exports #270
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
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 fixes the export paths for the policy plugin module by updating the package.json entry points to reference the correct index files instead of policy-specific files.
- Updates export paths from policy-specific files to index files for both import and require conditions
- Corrects file extensions for TypeScript declarations and CommonJS modules
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WalkthroughUpdated the export map in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 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 Pull Request ReviewTodo List:
❌ Critical Issue FoundThis PR contains incorrect export paths that will break the policy plugin functionality. Problem AnalysisThe changes modify the export paths from: "./plugins/policy": {
"import": {
"types": "./dist/plugins/policy.d.ts",
"default": "./dist/plugins/policy.js"
},
"require": {
"types": "./dist/plugins/policy.d.cts",
"default": "./dist/plugins/policy.cjs"
}
}To: "./plugins/policy": {
"import": {
"types": "./dist/plugins/index.d.ts",
"default": "./dist/plugins/index.js"
},
"require": {
"types": "./dist/plugins/index.d.cts",
"default": "./dist/plugins/index.cjs"
}
}Why This is Wrong
Correct FixThe export paths should be: "./plugins/policy": {
"import": {
"types": "./dist/plugins/policy/index.d.ts",
"default": "./dist/plugins/policy/index.js"
},
"require": {
"types": "./dist/plugins/policy/index.d.cts",
"default": "./dist/plugins/policy/index.cjs"
}
}Recommendations
Security & Performance
This change will cause runtime errors when trying to import the policy plugin, making this a critical issue that needs immediate correction. |
|
Claude finished @ymc9's task —— View job Pull Request ReviewTodo List:
✅ Excellent Fix!This PR correctly fixes the policy plugin export paths. My analysis shows this is a well-implemented solution. What This PR DoesThe PR updates the package.json export paths from incorrect paths: "./plugins/policy": {
"import": {
"types": "./dist/plugins/index.d.ts", // ❌ Wrong
"default": "./dist/plugins/index.js" // ❌ Wrong
}
}To the correct paths: "./plugins/policy": {
"import": {
"types": "./dist/plugins/policy/index.d.ts", // ✅ Correct
"default": "./dist/plugins/policy/index.js" // ✅ Correct
}
}Analysis Results✅ Code Quality & Best Practices
✅ Bug Fixes
✅ Performance Considerations
✅ Security Concerns
✅ Test Coverage
Technical Verification
SummaryThis is a high-quality bug fix that resolves critical module resolution issues. The changes are:
Recommendation: Approve and merge - this fixes a critical issue properly. |
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: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/runtime/package.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
packages/runtime/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). (3)
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: build-test (20.x, sqlite)
- GitHub Check: claude-review
Summary by CodeRabbit
Bug Fixes
Chores