-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Load *.{m,c}ts{x}
last in node_modules
#7259
Merged
Jarred-Sumner
merged 12 commits into
main
from
jarred/disable-ts-by-default-in-node-modules
Nov 22, 2023
Merged
Load *.{m,c}ts{x}
last in node_modules
#7259
Jarred-Sumner
merged 12 commits into
main
from
jarred/disable-ts-by-default-in-node-modules
Nov 22, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❌ @Jarred-Sumner 4 files with test failures on bun-darwin-aarch64:
|
❌ @Jarred-Sumner 7 files with test failures on bun-darwin-x64-baseline:
|
❌ @Jarred-Sumner 5 files with test failures on bun-darwin-x64:
|
* feat(console-log): fix className not printed for objects that are instances of classes Uses getClassName native method instead of getName * test(console-log): objects with class names are printed correctly * test(esbuild): add class name to log message
Co-authored-by: Jarred Sumner <[email protected]>
dylan-conway
approved these changes
Nov 22, 2023
Jarred-Sumner
deleted the
jarred/disable-ts-by-default-in-node-modules
branch
November 22, 2023 22:11
ryoppippi
pushed a commit
to ryoppippi/bun
that referenced
this pull request
Feb 1, 2024
* Load `.{m,c}ts{x}` last in node_modules * feat(console.log): Print className for an object if present (oven-sh#6508) * feat(console-log): fix className not printed for objects that are instances of classes Uses getClassName native method instead of getName * test(console-log): objects with class names are printed correctly * test(esbuild): add class name to log message * Fix failing `which` test (oven-sh#7258) Co-authored-by: Jarred Sumner <[email protected]> * Make test less flaky * Get it working and add test * Handle relative paths * Add comment * Consolidate + add test * Bump * Fix getObjectName * Update dir_info.zig --------- Co-authored-by: Jarred Sumner <[email protected]> Co-authored-by: Jibran Kalia <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Bun currently loads
.ts
and.tsx
files first. This usually works great in local development. This doesn't always work innode_modules
because some projects will need special tsconfig.json options which we do not support to work:import {Foo}
rather thanimport {type Foo}
orexport {Foo}
rather thanexport {type Foo}
This fixes that by only choosing
.{m,c}ts{x}
first when not in node_modulesI'm marking this as a draft because the logic currently only applies to the main/index file and it needs to also apply to the extension order. We can't merge this until that's fixed.FixedFixes #5426
How did you verify your code works?
There are tests