@cloudflare/vite-plugin 1.37.1 → 1.37.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1503,7 +1503,7 @@ async function assertWranglerVersion() {
1503
1503
  * The default compatibility date to use when the user omits one.
1504
1504
  * This value is injected at build time and remains fixed for each release.
1505
1505
  */
1506
- const DEFAULT_COMPAT_DATE = "2026-05-15";
1506
+ const DEFAULT_COMPAT_DATE = "2026-05-21";
1507
1507
 
1508
1508
  //#endregion
1509
1509
  //#region ../../node_modules/.pnpm/@remix-run+node-fetch-server@0.8.0/node_modules/@remix-run/node-fetch-server/dist/node-fetch-server.js
@@ -34640,7 +34640,7 @@ function writeDeployConfig(resolvedPluginConfig, resolvedViteConfig) {
34640
34640
  }
34641
34641
 
34642
34642
  //#endregion
34643
- //#region ../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.mjs
34643
+ //#region ../../node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs
34644
34644
  var astralIdentifierCodes = [
34645
34645
  509,
34646
34646
  0,
@@ -34672,8 +34672,8 @@ var astralIdentifierCodes = [
34672
34672
  4,
34673
34673
  318,
34674
34674
  1,
34675
- 80,
34676
- 3,
34675
+ 78,
34676
+ 5,
34677
34677
  71,
34678
34678
  10,
34679
34679
  50,
@@ -34818,7 +34818,9 @@ var astralIdentifierCodes = [
34818
34818
  10,
34819
34819
  47,
34820
34820
  15,
34821
- 343,
34821
+ 199,
34822
+ 7,
34823
+ 137,
34822
34824
  9,
34823
34825
  54,
34824
34826
  7,
@@ -34850,7 +34852,9 @@ var astralIdentifierCodes = [
34850
34852
  4,
34851
34853
  9,
34852
34854
  9,
34853
- 330,
34855
+ 55,
34856
+ 9,
34857
+ 266,
34854
34858
  3,
34855
34859
  10,
34856
34860
  1,
@@ -34950,7 +34954,15 @@ var astralIdentifierCodes = [
34950
34954
  1,
34951
34955
  2,
34952
34956
  9,
34953
- 726,
34957
+ 233,
34958
+ 0,
34959
+ 3,
34960
+ 0,
34961
+ 8,
34962
+ 1,
34963
+ 6,
34964
+ 0,
34965
+ 475,
34954
34966
  6,
34955
34967
  110,
34956
34968
  6,
@@ -35060,7 +35072,9 @@ var astralIdentifierStartCodes = [
35060
35072
  21,
35061
35073
  11,
35062
35074
  25,
35063
- 71,
35075
+ 7,
35076
+ 25,
35077
+ 39,
35064
35078
  55,
35065
35079
  7,
35066
35080
  1,
@@ -35105,8 +35119,8 @@ var astralIdentifierStartCodes = [
35105
35119
  7,
35106
35120
  1,
35107
35121
  17,
35108
- 2,
35109
- 60,
35122
+ 5,
35123
+ 57,
35110
35124
  28,
35111
35125
  11,
35112
35126
  0,
@@ -35290,7 +35304,9 @@ var astralIdentifierStartCodes = [
35290
35304
  31,
35291
35305
  15,
35292
35306
  0,
35293
- 328,
35307
+ 24,
35308
+ 43,
35309
+ 261,
35294
35310
  18,
35295
35311
  16,
35296
35312
  0,
@@ -35338,7 +35354,11 @@ var astralIdentifierStartCodes = [
35338
35354
  44,
35339
35355
  212,
35340
35356
  63,
35341
- 129,
35357
+ 33,
35358
+ 24,
35359
+ 3,
35360
+ 24,
35361
+ 45,
35342
35362
  74,
35343
35363
  6,
35344
35364
  0,
@@ -35348,13 +35368,15 @@ var astralIdentifierStartCodes = [
35348
35368
  1,
35349
35369
  2,
35350
35370
  0,
35351
- 29,
35352
- 6135,
35353
- 9,
35354
- 1237,
35371
+ 15,
35372
+ 4,
35373
+ 10,
35374
+ 7381,
35355
35375
  42,
35356
- 9,
35357
- 8936,
35376
+ 31,
35377
+ 98,
35378
+ 114,
35379
+ 8702,
35358
35380
  3,
35359
35381
  2,
35360
35382
  6,
@@ -35462,7 +35484,19 @@ var astralIdentifierStartCodes = [
35462
35484
  29,
35463
35485
  3,
35464
35486
  0,
35465
- 496,
35487
+ 208,
35488
+ 30,
35489
+ 2,
35490
+ 2,
35491
+ 2,
35492
+ 1,
35493
+ 2,
35494
+ 6,
35495
+ 3,
35496
+ 4,
35497
+ 10,
35498
+ 1,
35499
+ 225,
35466
35500
  6,
35467
35501
  2,
35468
35502
  3,
@@ -35545,12 +35579,10 @@ var astralIdentifierStartCodes = [
35545
35579
  4421,
35546
35580
  42719,
35547
35581
  33,
35548
- 4153,
35549
- 7,
35550
- 221,
35582
+ 4381,
35583
+ 3,
35584
+ 5773,
35551
35585
  3,
35552
- 5761,
35553
- 15,
35554
35586
  7472,
35555
35587
  16,
35556
35588
  621,
@@ -35559,10 +35591,10 @@ var astralIdentifierStartCodes = [
35559
35591
  1507,
35560
35592
  4938,
35561
35593
  6,
35562
- 4191
35594
+ 8489
35563
35595
  ];
35564
- var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
35565
- var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
35596
+ var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
35597
+ var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
35566
35598
  var reservedWords = {
35567
35599
  3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
35568
35600
  5: "class enum extends super const export import",
@@ -35865,6 +35897,7 @@ function getOptions(opts) {
35865
35897
  };
35866
35898
  }
35867
35899
  if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
35900
+ if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
35868
35901
  return options;
35869
35902
  }
35870
35903
  function pushComment(options, array) {
@@ -35880,7 +35913,7 @@ function pushComment(options, array) {
35880
35913
  array.push(comment);
35881
35914
  };
35882
35915
  }
35883
- var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
35916
+ var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_SWITCH = 1024, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
35884
35917
  function functionFlags(async, generator) {
35885
35918
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
35886
35919
  }
@@ -35925,7 +35958,7 @@ var Parser = function Parser$2(options, input, startPos) {
35925
35958
  this.undefinedExports = Object.create(null);
35926
35959
  if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
35927
35960
  this.scopeStack = [];
35928
- this.enterScope(SCOPE_TOP);
35961
+ this.enterScope(this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP);
35929
35962
  this.regexpState = null;
35930
35963
  this.privateNameStack = [];
35931
35964
  };
@@ -35934,10 +35967,12 @@ var prototypeAccessors = {
35934
35967
  inGenerator: { configurable: true },
35935
35968
  inAsync: { configurable: true },
35936
35969
  canAwait: { configurable: true },
35970
+ allowReturn: { configurable: true },
35937
35971
  allowSuper: { configurable: true },
35938
35972
  allowDirectSuper: { configurable: true },
35939
35973
  treatFunctionsAsVar: { configurable: true },
35940
35974
  allowNewDotTarget: { configurable: true },
35975
+ allowUsing: { configurable: true },
35941
35976
  inClassStaticBlock: { configurable: true }
35942
35977
  };
35943
35978
  Parser.prototype.parse = function parse$10() {
@@ -35949,24 +35984,26 @@ prototypeAccessors.inFunction.get = function() {
35949
35984
  return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
35950
35985
  };
35951
35986
  prototypeAccessors.inGenerator.get = function() {
35952
- return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit;
35987
+ return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
35953
35988
  };
35954
35989
  prototypeAccessors.inAsync.get = function() {
35955
- return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit;
35990
+ return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
35956
35991
  };
35957
35992
  prototypeAccessors.canAwait.get = function() {
35958
35993
  for (var i$1 = this.scopeStack.length - 1; i$1 >= 0; i$1--) {
35959
- var scope = this.scopeStack[i$1];
35960
- if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) return false;
35961
- if (scope.flags & SCOPE_FUNCTION) return (scope.flags & SCOPE_ASYNC) > 0;
35994
+ var flags = this.scopeStack[i$1].flags;
35995
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) return false;
35996
+ if (flags & SCOPE_FUNCTION) return (flags & SCOPE_ASYNC) > 0;
35962
35997
  }
35963
35998
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
35964
35999
  };
36000
+ prototypeAccessors.allowReturn.get = function() {
36001
+ if (this.inFunction) return true;
36002
+ if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP) return true;
36003
+ return false;
36004
+ };
35965
36005
  prototypeAccessors.allowSuper.get = function() {
35966
- var ref$1 = this.currentThisScope();
35967
- var flags = ref$1.flags;
35968
- var inClassFieldInit = ref$1.inClassFieldInit;
35969
- return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
36006
+ return (this.currentThisScope().flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
35970
36007
  };
35971
36008
  prototypeAccessors.allowDirectSuper.get = function() {
35972
36009
  return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
@@ -35975,10 +36012,17 @@ prototypeAccessors.treatFunctionsAsVar.get = function() {
35975
36012
  return this.treatFunctionsAsVarInScope(this.currentScope());
35976
36013
  };
35977
36014
  prototypeAccessors.allowNewDotTarget.get = function() {
35978
- var ref$1 = this.currentThisScope();
35979
- var flags = ref$1.flags;
35980
- var inClassFieldInit = ref$1.inClassFieldInit;
35981
- return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit;
36015
+ for (var i$1 = this.scopeStack.length - 1; i$1 >= 0; i$1--) {
36016
+ var flags = this.scopeStack[i$1].flags;
36017
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) || flags & SCOPE_FUNCTION && !(flags & SCOPE_ARROW)) return true;
36018
+ }
36019
+ return false;
36020
+ };
36021
+ prototypeAccessors.allowUsing.get = function() {
36022
+ var flags = this.currentScope().flags;
36023
+ if (flags & SCOPE_SWITCH) return false;
36024
+ if (!this.inModule && flags & SCOPE_TOP) return false;
36025
+ return true;
35982
36026
  };
35983
36027
  prototypeAccessors.inClassStaticBlock.get = function() {
35984
36028
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
@@ -36104,7 +36148,7 @@ pp$8.parseTopLevel = function(node) {
36104
36148
  }
36105
36149
  this.adaptDirectivePrologue(node.body);
36106
36150
  this.next();
36107
- node.sourceType = this.options.sourceType;
36151
+ node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
36108
36152
  return this.finishNode(node, "Program");
36109
36153
  };
36110
36154
  var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
@@ -36112,15 +36156,17 @@ pp$8.isLet = function(context) {
36112
36156
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
36113
36157
  skipWhiteSpace.lastIndex = this.pos;
36114
36158
  var skip = skipWhiteSpace.exec(this.input);
36115
- var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
36159
+ var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
36116
36160
  if (nextCh === 91 || nextCh === 92) return true;
36117
36161
  if (context) return false;
36118
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) return true;
36119
- if (isIdentifierStart(nextCh, true)) {
36120
- var pos = next + 1;
36121
- while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) ++pos;
36122
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) return true;
36123
- var ident = this.input.slice(next, pos);
36162
+ if (nextCh === 123) return true;
36163
+ if (isIdentifierStart(nextCh)) {
36164
+ var start = next;
36165
+ do
36166
+ next += nextCh <= 65535 ? 1 : 2;
36167
+ while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
36168
+ if (nextCh === 92) return true;
36169
+ var ident = this.input.slice(start, next);
36124
36170
  if (!keywordRelationalOperator.test(ident)) return true;
36125
36171
  }
36126
36172
  return false;
@@ -36130,7 +36176,38 @@ pp$8.isAsyncFunction = function() {
36130
36176
  skipWhiteSpace.lastIndex = this.pos;
36131
36177
  var skip = skipWhiteSpace.exec(this.input);
36132
36178
  var next = this.pos + skip[0].length, after;
36133
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
36179
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
36180
+ };
36181
+ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
36182
+ if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return false;
36183
+ skipWhiteSpace.lastIndex = this.pos;
36184
+ var skip = skipWhiteSpace.exec(this.input);
36185
+ var next = this.pos + skip[0].length;
36186
+ if (lineBreak.test(this.input.slice(this.pos, next))) return false;
36187
+ if (isAwaitUsing) {
36188
+ var usingEndPos = next + 5, after;
36189
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) return false;
36190
+ skipWhiteSpace.lastIndex = usingEndPos;
36191
+ var skipAfterUsing = skipWhiteSpace.exec(this.input);
36192
+ next = usingEndPos + skipAfterUsing[0].length;
36193
+ if (skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return false;
36194
+ }
36195
+ var ch = this.fullCharCodeAt(next);
36196
+ if (!isIdentifierStart(ch) && ch !== 92) return false;
36197
+ var idStart = next;
36198
+ do
36199
+ next += ch <= 65535 ? 1 : 2;
36200
+ while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
36201
+ if (ch === 92) return true;
36202
+ var id = this.input.slice(idStart, next);
36203
+ if (keywordRelationalOperator.test(id) || isFor && id === "of") return false;
36204
+ return true;
36205
+ };
36206
+ pp$8.isAwaitUsing = function(isFor) {
36207
+ return this.isUsingKeyword(true, isFor);
36208
+ };
36209
+ pp$8.isUsing = function(isFor) {
36210
+ return this.isUsingKeyword(false, isFor);
36134
36211
  };
36135
36212
  pp$8.parseStatement = function(context, topLevel, exports$1) {
36136
36213
  var starttype = this.type, node = this.startNode(), kind;
@@ -36183,6 +36260,18 @@ pp$8.parseStatement = function(context, topLevel, exports$1) {
36183
36260
  this.next();
36184
36261
  return this.parseFunctionStatement(node, true, !context);
36185
36262
  }
36263
+ var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
36264
+ if (usingKind) {
36265
+ if (!this.allowUsing) this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
36266
+ if (usingKind === "await using") {
36267
+ if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
36268
+ this.next();
36269
+ }
36270
+ this.next();
36271
+ this.parseVar(node, false, usingKind);
36272
+ this.semicolon();
36273
+ return this.finishNode(node, "VariableDeclaration");
36274
+ }
36186
36275
  var maybeName = this.value, expr = this.parseExpression();
36187
36276
  if (starttype === types$1$1.name && expr.type === "Identifier" && this.eat(types$1$1.colon)) return this.parseLabeledStatement(node, maybeName, expr, context);
36188
36277
  else return this.parseExpressionStatement(node, expr);
@@ -36240,16 +36329,21 @@ pp$8.parseForStatement = function(node) {
36240
36329
  this.next();
36241
36330
  this.parseVar(init$1, true, kind);
36242
36331
  this.finishNode(init$1, "VariableDeclaration");
36243
- if ((this.type === types$1$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
36244
- if (this.options.ecmaVersion >= 9) if (this.type === types$1$1._in) {
36245
- if (awaitAt > -1) this.unexpected(awaitAt);
36246
- } else node.await = awaitAt > -1;
36247
- return this.parseForIn(node, init$1);
36248
- }
36249
- if (awaitAt > -1) this.unexpected(awaitAt);
36250
- return this.parseFor(node, init$1);
36332
+ return this.parseForAfterInit(node, init$1, awaitAt);
36251
36333
  }
36252
36334
  var startsWithLet = this.isContextual("let"), isForOf = false;
36335
+ var usingKind = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
36336
+ if (usingKind) {
36337
+ var init$2 = this.startNode();
36338
+ this.next();
36339
+ if (usingKind === "await using") {
36340
+ if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
36341
+ this.next();
36342
+ }
36343
+ this.parseVar(init$2, true, usingKind);
36344
+ this.finishNode(init$2, "VariableDeclaration");
36345
+ return this.parseForAfterInit(node, init$2, awaitAt);
36346
+ }
36253
36347
  var containsEsc = this.containsEsc;
36254
36348
  var refDestructuringErrors = new DestructuringErrors();
36255
36349
  var initPos = this.start;
@@ -36270,6 +36364,16 @@ pp$8.parseForStatement = function(node) {
36270
36364
  if (awaitAt > -1) this.unexpected(awaitAt);
36271
36365
  return this.parseFor(node, init);
36272
36366
  };
36367
+ pp$8.parseForAfterInit = function(node, init, awaitAt) {
36368
+ if ((this.type === types$1$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
36369
+ if (this.options.ecmaVersion >= 9) if (this.type === types$1$1._in) {
36370
+ if (awaitAt > -1) this.unexpected(awaitAt);
36371
+ } else node.await = awaitAt > -1;
36372
+ return this.parseForIn(node, init);
36373
+ }
36374
+ if (awaitAt > -1) this.unexpected(awaitAt);
36375
+ return this.parseFor(node, init);
36376
+ };
36273
36377
  pp$8.parseFunctionStatement = function(node, isAsync$2, declarationPosition) {
36274
36378
  this.next();
36275
36379
  return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync$2);
@@ -36282,7 +36386,7 @@ pp$8.parseIfStatement = function(node) {
36282
36386
  return this.finishNode(node, "IfStatement");
36283
36387
  };
36284
36388
  pp$8.parseReturnStatement = function(node) {
36285
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
36389
+ if (!this.allowReturn) this.raise(this.start, "'return' outside of function");
36286
36390
  this.next();
36287
36391
  if (this.eat(types$1$1.semi) || this.insertSemicolon()) node.argument = null;
36288
36392
  else {
@@ -36297,7 +36401,7 @@ pp$8.parseSwitchStatement = function(node) {
36297
36401
  node.cases = [];
36298
36402
  this.expect(types$1$1.braceL);
36299
36403
  this.labels.push(switchLabel);
36300
- this.enterScope(0);
36404
+ this.enterScope(SCOPE_SWITCH);
36301
36405
  var cur;
36302
36406
  for (var sawDefault = false; this.type !== types$1$1.braceR;) if (this.type === types$1$1._case || this.type === types$1$1._default) {
36303
36407
  var isCase = this.type === types$1$1._case;
@@ -36456,6 +36560,7 @@ pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
36456
36560
  this.parseVarId(decl, kind);
36457
36561
  if (this.eat(types$1$1.eq)) decl.init = this.parseMaybeAssign(isFor);
36458
36562
  else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) this.unexpected();
36563
+ else if (!allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$1$1._in && !this.isContextual("of")) this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration");
36459
36564
  else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1$1._in || this.isContextual("of")))) this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
36460
36565
  else decl.init = null;
36461
36566
  node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
@@ -36464,7 +36569,7 @@ pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
36464
36569
  return node;
36465
36570
  };
36466
36571
  pp$8.parseVarId = function(decl, kind) {
36467
- decl.id = this.parseBindingAtom();
36572
+ decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
36468
36573
  this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
36469
36574
  };
36470
36575
  var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
@@ -36591,11 +36696,9 @@ pp$8.parseClassField = function(field) {
36591
36696
  if (checkKeyName(field, "constructor")) this.raise(field.key.start, "Classes can't have a field named 'constructor'");
36592
36697
  else if (field.static && checkKeyName(field, "prototype")) this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
36593
36698
  if (this.eat(types$1$1.eq)) {
36594
- var scope = this.currentThisScope();
36595
- var inClassFieldInit = scope.inClassFieldInit;
36596
- scope.inClassFieldInit = true;
36699
+ this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
36597
36700
  field.value = this.parseMaybeAssign();
36598
- scope.inClassFieldInit = inClassFieldInit;
36701
+ this.exitScope();
36599
36702
  } else field.value = null;
36600
36703
  this.semicolon();
36601
36704
  return this.finishNode(field, "PropertyDefinition");
@@ -36691,6 +36794,7 @@ pp$8.parseExport = function(node, exports$1) {
36691
36794
  else this.checkExport(exports$1, node.declaration.id, node.declaration.id.start);
36692
36795
  node.specifiers = [];
36693
36796
  node.source = null;
36797
+ if (this.options.ecmaVersion >= 16) node.attributes = [];
36694
36798
  } else {
36695
36799
  node.declaration = null;
36696
36800
  node.specifiers = this.parseExportSpecifiers(exports$1);
@@ -36706,6 +36810,7 @@ pp$8.parseExport = function(node, exports$1) {
36706
36810
  if (spec.local.type === "Literal") this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
36707
36811
  }
36708
36812
  node.source = null;
36813
+ if (this.options.ecmaVersion >= 16) node.attributes = [];
36709
36814
  }
36710
36815
  this.semicolon();
36711
36816
  }
@@ -37553,7 +37658,7 @@ pp$5.parseLiteral = function(value) {
37553
37658
  var node = this.startNode();
37554
37659
  node.value = value;
37555
37660
  node.raw = this.input.slice(this.start, this.end);
37556
- if (node.raw.charCodeAt(node.raw.length - 1) === 110) node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
37661
+ if (node.raw.charCodeAt(node.raw.length - 1) === 110) node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, "");
37557
37662
  this.next();
37558
37663
  return this.finishNode(node, "Literal");
37559
37664
  };
@@ -37728,9 +37833,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
37728
37833
  return this.finishNode(prop, "Property");
37729
37834
  };
37730
37835
  pp$5.parseGetterSetter = function(prop) {
37731
- prop.kind = prop.key.name;
37836
+ var kind = prop.key.name;
37732
37837
  this.parsePropertyName(prop);
37733
37838
  prop.value = this.parseMethod(false);
37839
+ prop.kind = kind;
37734
37840
  var paramCount = prop.kind === "get" ? 0 : 1;
37735
37841
  if (prop.value.params.length !== paramCount) {
37736
37842
  var start = prop.value.start;
@@ -37745,9 +37851,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync$2, star
37745
37851
  prop.kind = "init";
37746
37852
  } else if (this.options.ecmaVersion >= 6 && this.type === types$1$1.parenL) {
37747
37853
  if (isPattern) this.unexpected();
37748
- prop.kind = "init";
37749
37854
  prop.method = true;
37750
37855
  prop.value = this.parseMethod(isGenerator, isAsync$2);
37856
+ prop.kind = "init";
37751
37857
  } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types$1$1.comma && this.type !== types$1$1.braceR && this.type !== types$1$1.eq) {
37752
37858
  if (isGenerator || isAsync$2) this.unexpected();
37753
37859
  this.parseGetterSetter(prop);
@@ -37755,12 +37861,12 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync$2, star
37755
37861
  if (isGenerator || isAsync$2) this.unexpected();
37756
37862
  this.checkUnreserved(prop.key);
37757
37863
  if (prop.key.name === "await" && !this.awaitIdentPos) this.awaitIdentPos = startPos;
37758
- prop.kind = "init";
37759
37864
  if (isPattern) prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
37760
37865
  else if (this.type === types$1$1.eq && refDestructuringErrors) {
37761
37866
  if (refDestructuringErrors.shorthandAssign < 0) refDestructuringErrors.shorthandAssign = this.start;
37762
37867
  prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
37763
37868
  } else prop.value = this.copyNode(prop.key);
37869
+ prop.kind = "init";
37764
37870
  prop.shorthand = true;
37765
37871
  } else this.unexpected();
37766
37872
  };
@@ -37870,7 +37976,7 @@ pp$5.checkUnreserved = function(ref$1) {
37870
37976
  var name = ref$1.name;
37871
37977
  if (this.inGenerator && name === "yield") this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator");
37872
37978
  if (this.inAsync && name === "await") this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
37873
- if (this.currentThisScope().inClassFieldInit && name === "arguments") this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
37979
+ if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments") this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
37874
37980
  if (this.inClassStaticBlock && (name === "arguments" || name === "await")) this.raise(start, "Cannot use " + name + " in class static initialization block");
37875
37981
  if (this.keywords.test(name)) this.raise(start, "Unexpected keyword '" + name + "'");
37876
37982
  if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) return;
@@ -37933,6 +38039,7 @@ var pp$4 = Parser.prototype;
37933
38039
  pp$4.raise = function(pos, message) {
37934
38040
  var loc = getLineInfo(this.input, pos);
37935
38041
  message += " (" + loc.line + ":" + loc.column + ")";
38042
+ if (this.sourceFile) message += " in " + this.sourceFile;
37936
38043
  var err = new SyntaxError(message);
37937
38044
  err.pos = pos;
37938
38045
  err.loc = loc;
@@ -37949,7 +38056,6 @@ var Scope = function Scope$1(flags) {
37949
38056
  this.var = [];
37950
38057
  this.lexical = [];
37951
38058
  this.functions = [];
37952
- this.inClassFieldInit = false;
37953
38059
  };
37954
38060
  pp$3.enterScope = function(flags) {
37955
38061
  this.scopeStack.push(new Scope(flags));
@@ -37994,13 +38100,13 @@ pp$3.currentScope = function() {
37994
38100
  pp$3.currentVarScope = function() {
37995
38101
  for (var i$1 = this.scopeStack.length - 1;; i$1--) {
37996
38102
  var scope = this.scopeStack[i$1];
37997
- if (scope.flags & SCOPE_VAR) return scope;
38103
+ if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) return scope;
37998
38104
  }
37999
38105
  };
38000
38106
  pp$3.currentThisScope = function() {
38001
38107
  for (var i$1 = this.scopeStack.length - 1;; i$1--) {
38002
38108
  var scope = this.scopeStack[i$1];
38003
- if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) return scope;
38109
+ if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) && !(scope.flags & SCOPE_ARROW)) return scope;
38004
38110
  }
38005
38111
  };
38006
38112
  var Node = function Node$1(parser, pos, loc) {
@@ -38036,7 +38142,7 @@ pp$2.copyNode = function(node) {
38036
38142
  for (var prop in node) newNode[prop] = node[prop];
38037
38143
  return newNode;
38038
38144
  };
38039
- var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
38145
+ var scriptValuesAddedInUnicode = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz";
38040
38146
  var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
38041
38147
  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
38042
38148
  var ecma11BinaryProperties = ecma10BinaryProperties;
@@ -39042,12 +39148,15 @@ pp.readToken = function(code) {
39042
39148
  if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) return this.readWord();
39043
39149
  return this.getTokenFromCode(code);
39044
39150
  };
39045
- pp.fullCharCodeAtPos = function() {
39046
- var code = this.input.charCodeAt(this.pos);
39151
+ pp.fullCharCodeAt = function(pos) {
39152
+ var code = this.input.charCodeAt(pos);
39047
39153
  if (code <= 55295 || code >= 56320) return code;
39048
- var next = this.input.charCodeAt(this.pos + 1);
39154
+ var next = this.input.charCodeAt(pos + 1);
39049
39155
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
39050
39156
  };
39157
+ pp.fullCharCodeAtPos = function() {
39158
+ return this.fullCharCodeAt(this.pos);
39159
+ };
39051
39160
  pp.skipBlockComment = function() {
39052
39161
  var startLoc = this.options.onComment && this.curPosition();
39053
39162
  var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
@@ -39591,7 +39700,7 @@ pp.readWord = function() {
39591
39700
  if (this.keywords.test(word)) type = keywords[word];
39592
39701
  return this.finishToken(type, word);
39593
39702
  };
39594
- var version$1 = "8.14.0";
39703
+ var version$1 = "8.16.0";
39595
39704
  Parser.acorn = {
39596
39705
  Parser,
39597
39706
  version: version$1,
@@ -49797,12 +49906,39 @@ const isDockerRunning = async (dockerPath) => {
49797
49906
  }
49798
49907
  return true;
49799
49908
  };
49800
- /** throws when docker is not installed */
49801
- const verifyDockerInstalled = async (dockerPath, isDev = true) => {
49802
- if (!await isDockerRunning(dockerPath)) throw new UserError(`The Docker CLI could not be launched. Please ensure that the Docker CLI is installed and the daemon is running.
49803
- Other container tooling that is compatible with the Docker CLI and engine may work, but is not yet guaranteed to do so. You can specify an executable with the environment variable WRANGLER_DOCKER_BIN and a socket with DOCKER_HOST.${isDev ? "\nTo suppress this error if you do not intend on triggering any container instances, set dev.enable_containers to false in your Wrangler config or passing in --enable-containers=false." : ""}`, { telemetryMessage: false });
49909
+ /**
49910
+ * Verifies that Docker is installed and the daemon is running.
49911
+ *
49912
+ * @throws {UserError} If the Docker CLI cannot be reached.
49913
+ *
49914
+ * @param options - Docker verification options.
49915
+ */
49916
+ const verifyDockerInstalled = async ({ dockerPath, numberOfContainers, isDev = true, isDryRun = false }) => {
49917
+ if (!await isDockerRunning(dockerPath)) throw new UserError(getFailedToRunDockerErrorMessage({
49918
+ numberOfContainers,
49919
+ isDev,
49920
+ isDryRun
49921
+ }), { telemetryMessage: false });
49804
49922
  };
49805
49923
  /**
49924
+ * Builds the user-facing error message shown when Docker cannot be reached.
49925
+ *
49926
+ * @param options - Docker verification options.
49927
+ *
49928
+ * @returns The formatted error message string.
49929
+ */
49930
+ function getFailedToRunDockerErrorMessage({ numberOfContainers, isDev, isDryRun }) {
49931
+ const headline = `The Docker CLI is needed to build the configured ${numberOfContainers !== 1 ? "images" : "image"} before ${isDev ? "running dev" : `deploying${isDryRun ? " (even in dry-run mode)" : ""}`} but could not be launched.`;
49932
+ let daemonHint;
49933
+ if (process.platform === "darwin") daemonHint = "open the Docker Desktop app or run `open -a Docker`";
49934
+ else if (process.platform === "win32") daemonHint = "open the Docker Desktop app";
49935
+ else daemonHint = "run `sudo systemctl start docker`";
49936
+ return `${headline}\n${`To fix this, try the following:
49937
+ - If Docker is not installed, download it from https://docs.docker.com/get-started/get-docker/
49938
+ - If Docker is installed but the daemon is not running,\n ${daemonHint}.\n - If you use an alternative Docker-compatible CLI (e.g. Podman),
49939
+ set the WRANGLER_DOCKER_BIN environment variable to its path and DOCKER_HOST to its socket.`}\n\nNote: Other container tooling that is compatible with the Docker CLI and engine may work, but is not yet guaranteed to do so.\n\n${isDev ? "To suppress this error if you do not intend on triggering any container instances, set dev.enable_containers to false in your Wrangler config or pass --enable-containers=false." : "If you cannot run Docker locally, you can still deploy your Worker by passing --containers-rollout=none. This will not deploy or update your Container."}`;
49940
+ }
49941
+ /**
49806
49942
  * Kills and removes any containers which come from the given image tag
49807
49943
  */
49808
49944
  const cleanupContainers = (dockerPath, imageTags) => {
@@ -49911,10 +50047,16 @@ async function getImageRepoTags(dockerPath, imageTag) {
49911
50047
  */
49912
50048
  async function cleanupDuplicateImageTags(dockerPath, imageTag) {
49913
50049
  try {
49914
- const tagsToRemove = (await getImageRepoTags(dockerPath, imageTag)).filter((tag) => tag !== imageTag && tag.startsWith("cloudflare-dev"));
50050
+ const repoTags = await getImageRepoTags(dockerPath, imageTag);
50051
+ const currentBuildId = getImageTag(imageTag);
50052
+ const tagsToRemove = repoTags.filter((tag) => tag.startsWith("cloudflare-dev") && getImageTag(tag) !== currentBuildId);
49915
50053
  if (tagsToRemove.length > 0) runDockerCmdWithOutput(dockerPath, ["rmi", ...tagsToRemove]);
49916
50054
  } catch {}
49917
50055
  }
50056
+ function getImageTag(imageTag) {
50057
+ const tagSeparatorIndex = imageTag.lastIndexOf(":");
50058
+ return tagSeparatorIndex === -1 ? void 0 : imageTag.slice(tagSeparatorIndex + 1);
50059
+ }
49918
50060
 
49919
50061
  //#endregion
49920
50062
  //#region ../containers-shared/src/images.ts
@@ -49972,7 +50114,10 @@ async function prepareContainerImagesForDev(args) {
49972
50114
  const { dockerPath, containerOptions, onContainerImagePreparationStart, onContainerImagePreparationEnd } = args;
49973
50115
  let aborted = false;
49974
50116
  if (process.platform === "win32") throw new UserError("Local development with containers is currently not supported on Windows. You should use WSL instead. You can also set `enable_containers` to false if you do not need to develop the container part of your application.", { telemetryMessage: false });
49975
- await verifyDockerInstalled(dockerPath);
50117
+ await verifyDockerInstalled({
50118
+ dockerPath,
50119
+ numberOfContainers: containerOptions.length
50120
+ });
49976
50121
  for (const options of containerOptions) {
49977
50122
  if ("dockerfile" in options) {
49978
50123
  const build$8 = await buildImage(dockerPath, options);