You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,23 @@
2
2
3
3
## Unreleased
4
4
5
+
* Update support for import assertions and import attributes in node ([#3778](https://github.com/evanw/esbuild/issues/3778))
6
+
7
+
Import assertions (the `assert` keyword) have been removed from node starting in v22.0.0. So esbuild will now strip them and generate a warning with `--target=node22` or above:
8
+
9
+
```
10
+
▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with]
Import attributes (the `with` keyword) have been backported to node 18 starting in v18.20.0. So esbuild will no longer strip them with `--target=node18.N` if `N` is 20 or greater.
21
+
5
22
* Fix `for await` transform when a label is present
6
23
7
24
This release fixes a bug where the `for await` transform, which wraps the loop in a `try` statement, previously failed to also move the loop's label into the `try` statement. This bug only affects code that uses both of these features in combination. Here's an example of some affected code:
"<stdin>: WARNING: The \"assert\" keyword is not supported in the configured target environment\nNOTE: Did you mean to use \"with\" instead of \"assert\"?\n")
"export {default} from 'y' assert {type: 'json'}",
6239
+
"<stdin>: WARNING: The \"assert\" keyword is not supported in the configured target environment\nNOTE: Did you mean to use \"with\" instead of \"assert\"?\n")
"<stdin>: WARNING: The \"assert\" keyword is not supported in the configured target environment\nNOTE: Did you mean to use \"with\" instead of \"assert\"?\n")
0 commit comments