-
Notifications
You must be signed in to change notification settings - Fork 28
Commit b336b3a
Update dependency esbuild to v0.25.2 (#36871)
This PR contains the following updates:
| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [esbuild](https://redirect.github.com/evanw/esbuild) | dependencies | patch | [`0.25.1` -> `0.25.2`](https://renovatebot.com/diffs/npm/esbuild/0.25.1/0.25.2) | `0.25.3` |
| [esbuild](https://redirect.github.com/evanw/esbuild) | devDependencies | patch | [`0.25.1` -> `0.25.2`](https://renovatebot.com/diffs/npm/esbuild/0.25.1/0.25.2) | `0.25.3` |
---
### Release Notes
<details>
<summary>evanw/esbuild (esbuild)</summary>
### [`v0.25.2`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0252)
[Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.1...v0.25.2)
- Support flags in regular expressions for the API ([#​4121](https://redirect.github.com/evanw/esbuild/issues/4121))
The JavaScript plugin API for esbuild takes JavaScript regular expression objects for the `filter` option. Internally these are translated into Go regular expressions. However, this translation previously ignored the `flags` property of the regular expression. With this release, esbuild will now translate JavaScript regular expression flags into Go regular expression flags. Specifically the JavaScript regular expression `/\.[jt]sx?$/i` is turned into the Go regular expression `` `(?i)\.[jt]sx?$` `` internally inside of esbuild's API. This should make it possible to use JavaScript regular expressions with the `i` flag. Note that JavaScript and Go don't support all of the same regular expression features, so this mapping is only approximate.
- Fix node-specific annotations for string literal export names ([#​4100](https://redirect.github.com/evanw/esbuild/issues/4100))
When node instantiates a CommonJS module, it scans the AST to look for names to expose via ESM named exports. This is a heuristic that looks for certain patterns such as `exports.NAME = ...` or `module.exports = { ... }`. This behavior is used by esbuild to "annotate" CommonJS code that was converted from ESM with the original ESM export names. For example, when converting the file `export let foo, bar` from ESM to CommonJS, esbuild appends this to the end of the file:
```js
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
bar,
foo
});
```
However, this feature previously didn't work correctly for export names that are not valid identifiers, which can be constructed using string literal export names. The generated code contained a syntax error. That problem is fixed in this release:
```js
// Original code
let foo
export { foo as "foo!" }
// Old output (with --format=cjs --platform=node)
...
0 && (module.exports = {
"foo!"
});
// New output (with --format=cjs --platform=node)
...
0 && (module.exports = {
"foo!": null
});
```
- Basic support for index source maps ([#​3439](https://redirect.github.com/evanw/esbuild/issues/3439), [#​4109](https://redirect.github.com/evanw/esbuild/pull/4109))
The source map specification has an optional mode called [index source maps](https://tc39.es/ecma426/#sec-index-source-map) that makes it easier for tools to create an aggregate JavaScript file by concatenating many smaller JavaScript files with source maps, and then generate an aggregate source map by simply providing the original source maps along with some offset information. My understanding is that this is rarely used in practice. I'm only aware of two uses of it in the wild: [ClojureScript](https://clojurescript.org/) and [Turbopack](https://turbo.build/pack/).
This release provides basic support for indexed source maps. However, the implementation has not been tested on a real app (just on very simple test input). If you are using index source maps in a real app, please try this out and report back if anything isn't working for you.
Note that this is also not a complete implementation. For example, index source maps technically allows nesting source maps to an arbitrary depth, while esbuild's implementation in this release only supports a single level of nesting. It's unclear whether supporting more than one level of nesting is important or not given the lack of available test cases.
This feature was contributed by [@​clyfish](https://redirect.github.com/clyfish).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "on the first day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
GitOrigin-RevId: bc7642349e5a425c263985327799fe172493a7e31 parent 2a4b3c2 commit b336b3aCopy full SHA for b336b3a
1 file changed
+2
-2
lines changed+2-2
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
236 |
| - | |
| 236 | + | |
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
| |||
295 | 295 |
| |
296 | 296 |
| |
297 | 297 |
| |
298 |
| - | |
| 298 | + | |
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
|
0 commit comments