-
Notifications
You must be signed in to change notification settings - Fork 653
chore: run some test cases in bun in CI #6635
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6635 +/- ##
=======================================
Coverage 94.75% 94.75%
=======================================
Files 584 584
Lines 46560 46560
Branches 6539 6539
=======================================
Hits 44116 44116
Misses 2401 2401
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
"paths": { | ||
"@std/assert": ["./assert/mod.ts"], | ||
"@std/assert/greater-or-equal": ["./assert/greater_or_equal.ts"], | ||
"@std/path": ["./path/mod.ts"], | ||
"@std/internal/format": ["./internal/format.ts"], | ||
"@std/internal/styles": ["./internal/styles.ts"], | ||
"@std/internal/build-message": ["./internal/build_message.ts"], | ||
"@std/internal/diff": ["./internal/diff.ts"], | ||
"@std/internal/diff-str": ["./internal/diff_str.ts"], | ||
"@std/semver": ["./semver/mod.ts"], | ||
} |
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.
register
function of node:module
didn't seem working in Bun (which is used for resolving specifiers like @std/path
in Node test runner), but instead Bun allows users to remap specifiers via compilerOptions.paths
option. ref https://bun.sh/docs/runtime/modules#path-re-mapping
In the spirit of treating TypeScript as a first-class citizen, the Bun runtime will re-map import paths according to the compilerOptions.paths field in tsconfig.json. This is a major divergence from Node.js, which doesn't support any form of import path re-mapping.
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.
LGTM, pretty cool!
This PR starts running node compatible test cases in Bun in CI. This makes it easier to accept PRs like #6630 which says the change improves the bun compatibility.
In JSR pages, we already mark some of std packages compatible with Bun. So I believe this addition is reasonable