-
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
random fixes that help vite/sveltekit #3140
Conversation
✅ |
❌ @paperdave 2 files with test failures on linux-x64-baseline:
|
❌ @paperdave 2 files with test failures on linux-x64:
|
❌ @paperdave 4 files with test failures on bun-darwin-x64-baseline:
|
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
78e60da
to
77374ee
Compare
@@ -1129,6 +1129,41 @@ pub const Resolver = struct { | |||
return .{ .not_found = {} }; | |||
} | |||
|
|||
if (strings.hasPrefixComptime(import_path, "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.
This doesn't handle space characters or anything percent-encoded
but it is better than status quo
return Exists{ | ||
.path = path, | ||
.path = PathLike.fromJS(ctx, arguments, exception), |
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.
I don't like this fix, it should be handled earlier in the function instead of these extra null checks.
But it does fix the issue. Please add a TODO note to address this.
Status — hello worlds work, but real applications including the sveltekit demo do not fully work
This PR makes progress towards #250 and #600, fixing small random bugs in places to help vite and sveltekit run within bun's runtime:
existsSync(null)
and other invalid paths must not throwimport "file:///..."
Path.isAbsoluteString
supports utf16 stringsBun.readableStreamToArrayBuffer
sync if possible.this also (temporarily) contains changes from #2913 which I think help out vite