Update support for import assertions and import attributes in node (#3778)
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:
▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with]
example.mjs:1:40:
1 │ import json from "esbuild/package.json" assert { type: "json" }
│ ~~~~~~
╵ with
Did you mean to use "with" instead of "assert"?
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.
Fix for await transform when a label is present
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:
// Original code
async function test() {
outer: for await (const x of [Promise.resolve([0, 1])]) {
for (const y of x) if (y) break outer
throw 'fail'
}
}
// Old output (with --target=es6)
function test() {
return __async(this, null, function* () {
outer: try {
for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
const x = temp.value;
for (const y of x) if (y) break outer;
throw "fail";
}
} catch (temp) {
error = [temp];
} finally {
try {
more && (temp = iter.return) && (yield temp.call(iter));
} finally {
if (error)
throw error[0];
}
}
Update support for import assertions and import attributes in node (#3778)
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:
▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with]
example.mjs:1:40:
1 │ import json from "esbuild/package.json" assert { type: "json" }
│ ~~~~~~
╵ with
Did you mean to use "with" instead of "assert"?
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.
Fix for await transform when a label is present
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:
// Original code
async function test() {
outer: for await (const x of [Promise.resolve([0, 1])]) {
for (const y of x) if (y) break outer
throw 'fail'
}
}
// Old output (with --target=es6)
function test() {
return __async(this, null, function* () {
outer: try {
for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
const x = temp.value;
for (const y of x) if (y) break outer;
throw "fail";
}
} catch (temp) {
error = [temp];
} finally {
try {
more && (temp = iter.return) && (yield temp.call(iter));
} finally {
if (error)
throw error[0];
}
Don't set retainLines: true when the React compiler is used. This creates whitespace issues and the compiler is modifying the JSX too much to get correct line numbers after that. If you want to use the React compiler and get back correct line numbers for tools like vite-plugin-react-click-to-component to work, you should update your config to something like:
Don't set retainLines: true when the React compiler is used. This creates whitespace issues and the compiler is modifying the JSX too much to get correct line numbers after that. If you want to use the React compiler and get back correct line numbers for tools like vite-plugin-react-click-to-component to work, you should update your config to something like:
Bumps the dev-dependencies group with 14 updates in the / directory:
1.7.0
1.7.3
13.7.3
13.10.0
0.20.2
0.21.4
7.6.0
7.6.2
16.3.1
16.6.1
4.7.2
4.11.2
4.2.1
4.3.0
18.2.0
18.3.1
18.2.79
18.3.3
18.2.0
18.3.1
18.2.25
18.3.0
5.2.8
5.2.12
18.2.0
18.3.1
24.0.0
24.1.0
Updates
@biomejs/biome
from 1.7.0 to 1.7.3Release notes
Sourced from
@biomejs/biome
's releases.... (truncated)
Changelog
Sourced from
@biomejs/biome
's changelog.... (truncated)
Commits
b9f90b7
release: v1.7.3 (#2722)cb0182e
feat(linter): implementNoUnmatchableAnbSelector
(#2706)f77ab54
feat(linter): implementuseExplicitLengthCheck
(#2631)afa5004
feat(biome_css_analyzer): noUnknownSelectorPseudoElement (#2655)150dd0e
feat(biome_css_analyzer): implement noDuplicateAtImportRules (#2658)773a735
fix(linter): fix typo in rule name.useConsistentBuiltinInstatiation
to `us...2c70d3f
release: v1.7.2 (#2651)46c378e
feat(biome_css_analyzer): noUnknownFunction (#2570)de063b4
feat(lint/useDefaultSwitchClause): add rule (#2605)b3ed181
feat(linter): ImplementuseGenericFontNames
(#2573)Updates
cypress
from 13.7.3 to 13.10.0Release notes
Sourced from cypress's releases.
Commits
374ceb2
chore: change path created in prevous PR to make windows compliant (#29551)2567b72
chore: release@cypress/vite-dev-server-v5
.1.027471ad
chore: release 13.10.0 (#29549)079030b
feat: support vite v5 (#29518)3a3d877
fix: Encode fileServerFolder to fix #25839 (#29162)297abbb
fix: Add optional regex check for comma preceding 'but' in assertions for com...9c11188
chore: Update Chrome (beta) to 126.0.6478.7 (#29531)e39e748
fix: preserve orphaned process electron (#29515)3a00948
chore: Move what-is-circular dep within Cypress repo (#29530)5a23501
chore: turn off protocol element highlight selector tests (#29533)Updates
esbuild
from 0.20.2 to 0.21.4Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
67cbf87
publish 0.21.4 to npm4ad11c3
fix #3639, fix #3646: passwith
toonResolve
516ca31
fix #3343: allow bundle-internal string aliases9e2f304
fix #3416, fix #3425: better enum constant folding8f1faf7
implement late constant-folding for&& || ??
7d50a50
implement late constant-folding of string enums1b29ac7
fold equality checks after cross-module inliningd7a8bf3
formatting support for@position-try
(for #3773)5069410
fix #3778: import assertions/attributes for node11d568c
runmake update-compat-table
Updates
semver
from 7.6.0 to 7.6.2Release notes
Sourced from semver's releases.
Changelog
Sourced from semver's changelog.
Commits
eb1380b
chore: release 7.6.2 (#714)6466ba9
fix(lru): use map.delete() directly (#713)d777418
chore: release 7.6.1 (#706)988a8de
deps: uninstalllru-cache
(#709)5feeb7f
chore: postinstall for dependabot template-oss PRdd09b60
chore: bump@npmcli/template-oss
to 4.22.0c570a34
fix(linting): no-unused-varsad8ff11
fix: use internal cache implementation3fabe4d
deps: remove lru-cacheec49cdc
chore: chore: chore: postinstall for dependabot template-oss PRUpdates
stylelint
from 16.3.1 to 16.6.1Release notes
Sourced from stylelint's releases.
Changelog
Sourced from stylelint's changelog.
Commits
d902c0b
16.6.142d08bd
Prepare 16.6.1 (#7721)b4f74e5
Ignoretmp/
from Prettier (#7726)62b58bc
Fixno-descending-specificity
false positives for nested selectors (#7724)72ec18a
Refactor to use shared constant fordisabledRanges
object (#7722)b85be3c
Fix typo in rules.md (#7717)9478c71
Bump file-entry-cache from 8.0.0 to 9.0.0 (#7720)211908b
Fixselector-type-no-unknown
false positive formodel
(#7718)fa85a70
Bump lint-staged from 15.2.4 to 15.2.5 (#7719)44de825
Bump lint-staged from 15.2.2 to 15.2.4 (#7713)Updates
tsx
from 4.7.2 to 4.11.2Release notes
Sourced from tsx's releases.
... (truncated)
Commits
aa2b639
fix(cjs): esm interop in.mjs
files (#32)5e70105
fix(cjs/api): resolve correct module and types when imported (#566)59bb4ed
test: log util39507b8
refactor(cjs): type extensionsf30b296
test: external source maps3d7bce7
refactor(esm): resolve missing formate7dae3b
chore(deps): update dependency node to v20.13.1 (#547)b6bf39b
fix: only error on invalid tsconfig if explicitly passed in (#30)3f42ae3
feat(esm api): configurabletsconfig
52d696c
docs: use .md extension in linksUpdates
@vitejs/plugin-react
from 4.2.1 to 4.3.0Release notes
Sourced from
@vitejs/plugin-react
's releases.Changelog
Sourced from
@vitejs/plugin-react
's changelog.Commits
7e7322a
release: plugin-react@4.3.04b4a95c
fix: don't use retainLines with react compiler (#319)2b7f2ae
fix: support HMR for class components (#320)302a323
docs: add minimum react version (#321)9ebfe68
chore: bump deps (#318)Updates
react
from 18.2.0 to 18.3.1Release notes
Sourced from react's releases.
Changelog
Sourced from react's changelog.
Commits
f1338f8
ExportReact.act
from 18.3d6c42f7
Bump to 18.3.173bfaa1
Turn on key spread warning in jsx-runtime for everyone (#25697)c2a246e
Turn on string ref deprecation warning for everybody (not codemoddable) (#25383)2cfb474
Bump version from 18.2 to 18.3Maintainer changes
This version was pushed to npm by react-bot, a new releaser for react since your current version.
Updates
@types/react
from 18.2.79 to 18.3.3Commits
Updates
react-dom
from 18.2.0 to 18.3.1Release notes
Sourced from react-dom's releases.