-
-
Notifications
You must be signed in to change notification settings - Fork 5
Revert "fix: custom condition_names should take higher priority than target in package.json (#115)"
#131
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
WalkthroughThis change removes the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Resolver
Caller->>Resolver: package_target_resolve(target, conditions)
alt target is object
loop for each (key, value) in target (in insertion order)
alt key == "default" or key in conditions
Resolver->>Resolver: package_target_resolve(value, conditions)
alt resolution found
Resolver-->>Caller: return resolution
end
end
end
Resolver-->>Caller: return None
else
Resolver-->>Caller: (handle other types)
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
💤 Files with no reviewable changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (10)
🔇 Additional comments (6)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
|
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.
Important
Looks good to me! 👍
Reviewed everything up to b56962d in 1 minute and 22 seconds. Click for details.
- Reviewed
123lines of code in6files - Skipped
1files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/resolve_test.rs:1
- Draft comment:
Overall, the test cases are comprehensive and cover many scenarios (including Unicode paths, symlink handling, different module formats, and long Windows paths). - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. tests/resolve_test.rs:125
- Draft comment:
In the 'ipaddr_js' test, the second resolver uses extensions: vec![('.ts'.into())]. Consider using consistent syntax, e.g. vec![".ts".into()], for clarity. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. tests/resolve_test.rs:218
- Draft comment:
The 'windows_symlinked_longfilename' test correctly asserts that the long Windows path is handled and includes a comment on canonicalization behavior, aiding cross-platform testing. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. tests/resolve_test.rs:240
- Draft comment:
The 'package_json_with_bom' test verifies BOM removal from package JSON files. Consider adding a brief comment or renaming the test for clarity. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. tests/resolve_test.rs:20
- Draft comment:
Tests for styled-components, axios and others are clearly separated with specific ResolveOptions. Usage of condition names and alias_fields is appropriate. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_rb6aTAjDG66tqHBQ
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #131 +/- ##
==========================================
- Coverage 93.41% 93.40% -0.02%
==========================================
Files 13 13
Lines 2899 2894 -5
==========================================
- Hits 2708 2703 -5
Misses 191 191 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #131 will not alter performanceComparing Summary
|



This reverts commit 1e51e82.
Spec: https://nodejs.org/api/packages.html#conditional-exports
Test multiple
--conditionflags: JounQin/test#4Important
Reverts prioritization of custom
condition_namesovertargetinpackage.json, adjusting resolution logic and test expectations accordingly.condition_namesovertargetinpackage.jsoninsrc/lib.rs.defaultcondition to conditions list insrc/lib.rs.test_cases()inexports_field.rsandimports_field.rsto reflect reverted behavior.dual_condition_namestest inresolve_test.rs.fixtures/dual-condition-names/package.json.fixtures/dual-condition-namesfrompnpm-workspace.yaml.This description was created by
for b56962d. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit