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

feat: Bump esbuild 0.15 -> 0.16 #805

Merged
merged 2 commits into from
Feb 7, 2023
Merged

Conversation

amitdahan
Copy link
Contributor

Summary

This PR bumps ESBuild 0.15 to 0.16.

According to 0.16's changelog we can't use non-strings with define, so I tweaked the only failing test accordingly.

  • Add additional validation of API parameters
    The JavaScript API now does some additional validation of API parameters to catch incorrect uses of esbuild's API. The biggest impact of this is likely that esbuild now strictly only accepts strings with the define parameter. This would already have been a type error with esbuild's TypeScript type definitions, but it was previously not enforced for people using esbuild's API JavaScript without TypeScript.

    The define parameter appears at first glance to take a JSON object if you aren't paying close attention, but this actually isn't true. Values for define are instead strings of JavaScript code. This means you have to use define: { foo: '"bar"' } to replace foo with the string "bar". Using define: { foo: 'bar' } actually replaces foo with the identifier bar. Previously esbuild allowed you to pass define: { foo: false } and false was automatically converted into a string, which made it more confusing to understand what define actually represents. Starting with this release, passing non-string values such as with define: { foo: false } will no longer be allowed. You will now have to write define: { foo: 'false' } instead.

@vercel
Copy link

vercel bot commented Dec 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
tsup ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 7, 2023 at 0:15AM (UTC)

@egoist egoist changed the title Bump esbuild 0.15 -> 0.16 feat: Bump esbuild 0.15 -> 0.16 Feb 7, 2023
@egoist egoist merged commit 904e07a into egoist:dev Feb 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

🎉 This PR is included in version 6.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants