-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: debug dont print full import object #29
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces modifications to the module import functionality in Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 87.50% 86.94% -0.56%
==========================================
Files 6 6
Lines 600 605 +5
Branches 91 95 +4
==========================================
+ Hits 525 526 +1
- Misses 75 79 +4 ☔ View full report in Codecov by Sentry. |
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: 0
🧹 Nitpick comments (1)
src/import.ts (1)
256-258
: Keys-based logging improves privacy
By limiting the debug log to the object’s keys, the output is more concise and less likely to contain sensitive or overly verbose data, while still providing enough information for debugging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/import.ts
(4 hunks)test/fixtures/esm/config/plugin.js
(1 hunks)test/import.test.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- test/fixtures/esm/config/plugin.js
🔇 Additional comments (4)
test/import.test.ts (1)
14-17
: Thorough test coverage for ESM plugin resolution
These newly added assertions validate both the successful resolution of esm/config/plugin
and the expected error behavior for esm/config/plugin.default
. The coverage effectively tests a key edge case to ensure that an erroneous path triggers the correct exception.
src/import.ts (3)
191-192
: Ensure omission of sensitive data in debug logs
Logging options
directly can inadvertently reveal sensitive information if such data is ever added to the ImportResolveOptions
. Consider filtering or sanitizing the output if options
can contain credentials or other private data in the future.
203-203
: Concise and relevant debug statement
Logging the fileUrl
instead of the entire imported object is a good way to keep debug logs uncluttered and maintain privacy.
246-246
: Consistent logging across ESM and CJS imports
This debug statement mirrors the ESM counterpart, improving readability and consistency when tracing import flows.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected] |
[skip ci] ## [4.1.3](v4.1.2...v4.1.3) (2024-12-24) ### Bug Fixes * debug dont print full import object ([#29](#29)) ([daa5edf](daa5edf))
Summary by CodeRabbit
New Features
Bug Fixes
Tests
importResolve
to verify module path resolution and error handling.importModule
across various module types.Chores
package.json
for theegg-app
project.