diff --git a/package.json b/package.json index ff5b773bbf3b..ea9ada61a75a 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "@babel/generator": "7.24.7", "@babel/helper-annotate-as-pure": "7.24.7", "@babel/helper-split-export-declaration": "7.24.7", + "@babel/plugin-syntax-import-attributes": "7.24.7", "@babel/plugin-transform-async-generator-functions": "7.24.7", "@babel/plugin-transform-async-to-generator": "7.24.7", "@babel/plugin-transform-runtime": "7.24.7", diff --git a/packages/angular/build/BUILD.bazel b/packages/angular/build/BUILD.bazel index 9c337ffa1675..0b7b78e9a1d6 100644 --- a/packages/angular/build/BUILD.bazel +++ b/packages/angular/build/BUILD.bazel @@ -67,6 +67,7 @@ ts_library( "@npm//@babel/core", "@npm//@babel/helper-annotate-as-pure", "@npm//@babel/helper-split-export-declaration", + "@npm//@babel/plugin-syntax-import-attributes", "@npm//@inquirer/confirm", "@npm//@types/babel__core", "@npm//@types/less", diff --git a/packages/angular/build/package.json b/packages/angular/build/package.json index a1746c963481..7e3f59d080ea 100644 --- a/packages/angular/build/package.json +++ b/packages/angular/build/package.json @@ -23,6 +23,7 @@ "@babel/core": "7.24.7", "@babel/helper-annotate-as-pure": "7.24.7", "@babel/helper-split-export-declaration": "7.24.7", + "@babel/plugin-syntax-import-attributes": "7.24.7", "@inquirer/confirm": "3.1.11", "@vitejs/plugin-basic-ssl": "1.1.0", "ansi-colors": "4.1.3", diff --git a/packages/angular/build/src/tools/esbuild/javascript-transformer-worker.ts b/packages/angular/build/src/tools/esbuild/javascript-transformer-worker.ts index 18555276c42c..44396473f954 100644 --- a/packages/angular/build/src/tools/esbuild/javascript-transformer-worker.ts +++ b/packages/angular/build/src/tools/esbuild/javascript-transformer-worker.ts @@ -60,7 +60,9 @@ async function transformWithBabel( options.sourcemap && (!!options.thirdPartySourcemaps || !/[\\/]node_modules[\\/]/.test(filename)); - const plugins: PluginItem[] = []; + // @ts-expect-error Import attribute syntax plugin does not currently have type definitions + const { default: importAttributePlugin } = await import('@babel/plugin-syntax-import-attributes'); + const plugins: PluginItem[] = [importAttributePlugin]; // Lazy load the linker plugin only when linking is required if (shouldLink) { diff --git a/yarn.lock b/yarn.lock index d7c157c1e5d1..c6a1091fe499 100644 --- a/yarn.lock +++ b/yarn.lock @@ -399,6 +399,7 @@ __metadata: "@babel/core": "npm:7.24.7" "@babel/helper-annotate-as-pure": "npm:7.24.7" "@babel/helper-split-export-declaration": "npm:7.24.7" + "@babel/plugin-syntax-import-attributes": "npm:7.24.7" "@inquirer/confirm": "npm:3.1.11" "@vitejs/plugin-basic-ssl": "npm:1.1.0" ansi-colors: "npm:4.1.3" @@ -657,6 +658,7 @@ __metadata: "@babel/generator": "npm:7.24.7" "@babel/helper-annotate-as-pure": "npm:7.24.7" "@babel/helper-split-export-declaration": "npm:7.24.7" + "@babel/plugin-syntax-import-attributes": "npm:7.24.7" "@babel/plugin-transform-async-generator-functions": "npm:7.24.7" "@babel/plugin-transform-async-to-generator": "npm:7.24.7" "@babel/plugin-transform-runtime": "npm:7.24.7" @@ -1487,7 +1489,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.7": +"@babel/plugin-syntax-import-attributes@npm:7.24.7, @babel/plugin-syntax-import-attributes@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" dependencies: @@ -2998,9 +3000,11 @@ __metadata: linkType: hard "@inquirer/type@npm:^1.3.3": - version: 1.3.3 - resolution: "@inquirer/type@npm:1.3.3" - checksum: 10c0/84048694410bb5b2c55dc4e48da6369ce942b9e8f8016d15ef63ab3f9873832a56cc12a50582b5b2b626821bfe29973dfcc19edc90f58490b51df1f4d9d0a074 + version: 1.4.0 + resolution: "@inquirer/type@npm:1.4.0" + dependencies: + mute-stream: "npm:^1.0.0" + checksum: 10c0/927b46eef9195523a5c4d9467fa43dcd8fde6376131c777012dd899b96b5f5c0d7276e03379f61d3209206e65ef82dc45b129eb79fb4dfe61de29d7aed437cd4 languageName: node linkType: hard @@ -5430,12 +5434,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:^20.14.6": - version: 20.14.8 - resolution: "@types/node@npm:20.14.8" +"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:^20.14.9": + version: 20.14.9 + resolution: "@types/node@npm:20.14.9" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/06d4643fa3b179b41fe19f9c75c240278ca1f7a313b3b837bc36ea119499c7ad77f06bbe72694ac04aa91ec77fe747baa09b889f4c435450c1724a26bd55f160 + checksum: 10c0/911ffa444dc032897f4a23ed580c67903bd38ea1c5ec99b1d00fa10b83537a3adddef8e1f29710cbdd8e556a61407ed008e06537d834e48caf449ce59f87d387 languageName: node linkType: hard @@ -5455,12 +5459,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.14.9": - version: 20.14.9 - resolution: "@types/node@npm:20.14.9" +"@types/node@npm:^20.14.6": + version: 20.14.8 + resolution: "@types/node@npm:20.14.8" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/911ffa444dc032897f4a23ed580c67903bd38ea1c5ec99b1d00fa10b83537a3adddef8e1f29710cbdd8e556a61407ed008e06537d834e48caf449ce59f87d387 + checksum: 10c0/06d4643fa3b179b41fe19f9c75c240278ca1f7a313b3b837bc36ea119499c7ad77f06bbe72694ac04aa91ec77fe747baa09b889f4c435450c1724a26bd55f160 languageName: node linkType: hard @@ -10926,7 +10930,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:7.0.4, https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2, https-proxy-agent@npm:^7.0.3": +"https-proxy-agent@npm:7.0.4, https-proxy-agent@npm:^7.0.2": version: 7.0.4 resolution: "https-proxy-agent@npm:7.0.4" dependencies: @@ -10936,7 +10940,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:7.0.5": +"https-proxy-agent@npm:7.0.5, https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.3": version: 7.0.5 resolution: "https-proxy-agent@npm:7.0.5" dependencies: @@ -12022,14 +12026,14 @@ __metadata: languageName: node linkType: hard -"jsonc-parser@npm:3.2.1, jsonc-parser@npm:^3.2.0": +"jsonc-parser@npm:3.2.1": version: 3.2.1 resolution: "jsonc-parser@npm:3.2.1" checksum: 10c0/ada66dec143d7f9cb0e2d0d29c69e9ce40d20f3a4cb96b0c6efb745025ac7f9ba647d7ac0990d0adfc37a2d2ae084a12009a9c833dbdbeadf648879a99b9df89 languageName: node linkType: hard -"jsonc-parser@npm:3.3.1": +"jsonc-parser@npm:3.3.1, jsonc-parser@npm:^3.2.0": version: 3.3.1 resolution: "jsonc-parser@npm:3.3.1" checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6 @@ -14605,7 +14609,7 @@ __metadata: languageName: node linkType: hard -"piscina@npm:4.6.0, piscina@npm:^4.4.0": +"piscina@npm:4.6.0": version: 4.6.0 resolution: "piscina@npm:4.6.0" dependencies: @@ -14617,7 +14621,7 @@ __metadata: languageName: node linkType: hard -"piscina@npm:4.6.1": +"piscina@npm:4.6.1, piscina@npm:^4.4.0": version: 4.6.1 resolution: "piscina@npm:4.6.1" dependencies: @@ -14777,7 +14781,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.38, postcss@npm:^8.2.14, postcss@npm:^8.4.23, postcss@npm:^8.4.31, postcss@npm:^8.4.33, postcss@npm:^8.4.38": +"postcss@npm:8.4.38": version: 8.4.38 resolution: "postcss@npm:8.4.38" dependencies: @@ -14788,6 +14792,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.2.14, postcss@npm:^8.4.23, postcss@npm:^8.4.31, postcss@npm:^8.4.33, postcss@npm:^8.4.38": + version: 8.4.39 + resolution: "postcss@npm:8.4.39" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.0.1" + source-map-js: "npm:^1.2.0" + checksum: 10c0/16f5ac3c4e32ee76d1582b3c0dcf1a1fdb91334a45ad755eeb881ccc50318fb8d64047de4f1601ac96e30061df203f0f2e2edbdc0bfc49b9c57bc9fb9bedaea3 + languageName: node + linkType: hard + "preact-render-to-string@npm:^6.2.1": version: 6.5.5 resolution: "preact-render-to-string@npm:6.5.5" @@ -16350,17 +16365,17 @@ __metadata: linkType: hard "socks-proxy-agent@npm:^8.0.2, socks-proxy-agent@npm:^8.0.3": - version: 8.0.3 - resolution: "socks-proxy-agent@npm:8.0.3" + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" dependencies: agent-base: "npm:^7.1.1" debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10c0/4950529affd8ccd6951575e21c1b7be8531b24d924aa4df3ee32df506af34b618c4e50d261f4cc603f1bfd8d426915b7d629966c8ce45b05fb5ad8c8b9a6459d + socks: "npm:^2.8.3" + checksum: 10c0/345593bb21b95b0508e63e703c84da11549f0a2657d6b4e3ee3612c312cb3a907eac10e53b23ede3557c6601d63252103494caa306b66560f43af7b98f53957a languageName: node linkType: hard -"socks@npm:^2.7.1": +"socks@npm:^2.8.3": version: 2.8.3 resolution: "socks@npm:2.8.3" dependencies: