Skip to content
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

CSS fixes #16514

Merged
merged 3 commits into from
Jan 19, 2025
Merged

CSS fixes #16514

merged 3 commits into from
Jan 19, 2025

Conversation

zackradisic
Copy link
Contributor

What does this PR do?

Add a lot more tests and fix a lot of stuff

@robobun
Copy link

robobun commented Jan 19, 2025

Updated 9:35 PM PT - Jan 18th, 2025

@zackradisic, your commit 2057ea9 has passed in #10084! 🎉


🧪   try this PR locally:

bunx bun-pr 16514

var error_string = ArrayList(u8){};
defer error_string.deinit(allocator);
error_string.writer(allocator).print("{}", .{this.kind}) catch unreachable;
return bun.String.fromBytes(error_string.items).toJS(globalThis);
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about:

pub fn toString(this: @This()) !bun.String {
   return try bun.String.createFormat("{}", .{this});
}

pub fn toJS(this: @This(), globalObject: *JSC.JSGlobalObject) !JSC.JSValue {
   var str = try this.toString();
   return str.transferToJS();
}

@Jarred-Sumner Jarred-Sumner merged commit d40f971 into main Jan 19, 2025
69 checks passed
@Jarred-Sumner Jarred-Sumner deleted the zack/more-css-fixes branch January 19, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants