From e4022e259c27c90158ed0dbb5278df5aa714118f Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 14 Mar 2024 17:41:22 +0100 Subject: [PATCH] feat: add .js file extension to built output + unwrap folder import/export to support native ESM within browser (#30770) --- ...-7b6f098e-f611-4292-adb9-4c0351d335cb.json | 7 + package.json | 6 +- packages/tokens/.swcrc | 1 + scripts/tasks/src/swc/index.ts | 1 + scripts/tasks/src/{ => swc}/swc.ts | 32 ++-- scripts/tasks/src/swc/types.ts | 9 + scripts/tasks/src/swc/utils.spec.ts | 59 +++++++ scripts/tasks/src/swc/utils.ts | 37 ++++ yarn.lock | 159 +++++++++--------- 9 files changed, 217 insertions(+), 94 deletions(-) create mode 100644 change/@fluentui-tokens-7b6f098e-f611-4292-adb9-4c0351d335cb.json create mode 100644 scripts/tasks/src/swc/index.ts rename scripts/tasks/src/{ => swc}/swc.ts (68%) create mode 100644 scripts/tasks/src/swc/types.ts create mode 100644 scripts/tasks/src/swc/utils.spec.ts create mode 100644 scripts/tasks/src/swc/utils.ts diff --git a/change/@fluentui-tokens-7b6f098e-f611-4292-adb9-4c0351d335cb.json b/change/@fluentui-tokens-7b6f098e-f611-4292-adb9-4c0351d335cb.json new file mode 100644 index 00000000000000..03c26135ee81c4 --- /dev/null +++ b/change/@fluentui-tokens-7b6f098e-f611-4292-adb9-4c0351d335cb.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "feat: enable .js extension addition and directory import/export unwrapping in build output", + "packageName": "@fluentui/tokens", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/package.json b/package.json index 0aba09ff124ccb..bf9c67aba0de16 100644 --- a/package.json +++ b/package.json @@ -120,8 +120,8 @@ "@storybook/manager-webpack5": "6.5.15", "@storybook/react": "6.5.15", "@storybook/theming": "6.5.15", - "@swc/cli": "0.1.62", - "@swc/core": "1.3.87", + "@swc/cli": "0.1.65", + "@swc/core": "1.4.7", "@swc/helpers": "0.5.1", "@testing-library/dom": "8.11.3", "@testing-library/jest-dom": "5.16.5", @@ -320,7 +320,7 @@ "strip-ansi": "6.0.0", "style-loader": "2.0.0", "swc-loader": "0.2.3", - "swc-plugin-de-indent-template-literal": "1.0.0", + "swc-plugin-de-indent-template-literal": "1.4.0", "syncpack": "10.6.1", "tachometer": "0.7.0", "terser": "5.28.1", diff --git a/packages/tokens/.swcrc b/packages/tokens/.swcrc index b4ffa86dee3067..a5d9d62d2f9c8f 100644 --- a/packages/tokens/.swcrc +++ b/packages/tokens/.swcrc @@ -10,6 +10,7 @@ "/**/*.test.tsx" ], "jsc": { + "baseUrl": ".", "parser": { "syntax": "typescript", "tsx": true, diff --git a/scripts/tasks/src/swc/index.ts b/scripts/tasks/src/swc/index.ts new file mode 100644 index 00000000000000..2ac1f24de30002 --- /dev/null +++ b/scripts/tasks/src/swc/index.ts @@ -0,0 +1 @@ +export { swc } from './swc'; diff --git a/scripts/tasks/src/swc.ts b/scripts/tasks/src/swc/swc.ts similarity index 68% rename from scripts/tasks/src/swc.ts rename to scripts/tasks/src/swc/swc.ts index 1ff17d1dcc274d..7548b60cb48f3f 100644 --- a/scripts/tasks/src/swc.ts +++ b/scripts/tasks/src/swc/swc.ts @@ -2,33 +2,35 @@ import fs from 'fs'; import path from 'path'; import { transform } from '@swc/core'; -import type { Options as SwcOptions } from '@swc/core'; import glob from 'glob'; -import * as match from 'micromatch'; +import * as micromatch from 'micromatch'; -type Options = SwcOptions & { module: { type: 'es6' | 'commonjs' | 'amd' }; outputPath: string }; +import { Options } from './types'; +import { postprocessOutput } from './utils'; async function swcTransform(options: Options) { - const { outputPath, module } = options; - const packageRoot = process.cwd(); - const sourceRootDirName = module.type === 'es6' ? 'src' : 'lib'; + const { outputPath, module, root: packageRoot = process.cwd() } = options; + + const moduleType = module.type; + const sourceRootDirName = moduleType === 'es6' ? 'src' : 'lib'; let sourceFiles: string[] = []; - if (module.type === 'es6') { + if (moduleType === 'es6') { sourceFiles = glob.sync(`${sourceRootDirName}/**/*.{ts,tsx}`); } - if (module.type === 'commonjs' || module.type === 'amd') { + if (moduleType === 'commonjs' || moduleType === 'amd') { sourceFiles = glob.sync(`${sourceRootDirName}/**/*.js`); } const swcConfig = JSON.parse(fs.readFileSync(path.resolve(packageRoot, '.swcrc'), 'utf-8')); + const enableResolveFully = Boolean(swcConfig.jsc.baseUrl); const tsFileExtensionRegex = /\.(tsx|ts)$/; for (const fileName of sourceFiles) { const srcFilePath = path.resolve(packageRoot, fileName); - const isFileExcluded = match.isMatch(srcFilePath, swcConfig.exclude, { contains: true }); + const isFileExcluded = micromatch.isMatch(srcFilePath, swcConfig.exclude, { contains: true }); if (isFileExcluded) { continue; @@ -38,19 +40,19 @@ async function swcTransform(options: Options) { const result = await transform(sourceCode, { filename: fileName, - module: { type: module.type }, + module: { type: moduleType, resolveFully: enableResolveFully }, sourceFileName: path.basename(fileName), outputPath, }); - // Strip @jsx comments, see https://github.com/microsoft/fluentui/issues/29126 - const resultCode = result.code - .replace('/** @jsxRuntime automatic */', '') - .replace('/** @jsxImportSource @fluentui/react-jsx-runtime */', ''); + const resultCode = postprocessOutput(result.code, { + addExplicitJsExtensionToImports: enableResolveFully, + moduleType, + }); const compiledFilePath = path.resolve(packageRoot, fileName.replace(`${sourceRootDirName}`, outputPath)); - //Create directory folder for new compiled file(s) to live in. + // Create directory folder for new compiled file(s) to live in. await fs.promises.mkdir(compiledFilePath.replace(path.basename(compiledFilePath), ''), { recursive: true }); const compiledFilePathJS = `${compiledFilePath.replace(tsFileExtensionRegex, '.js')}`; diff --git a/scripts/tasks/src/swc/types.ts b/scripts/tasks/src/swc/types.ts new file mode 100644 index 00000000000000..14adc69342d53c --- /dev/null +++ b/scripts/tasks/src/swc/types.ts @@ -0,0 +1,9 @@ +import { type Options as SwcOptions } from '@swc/core'; + +declare module '@swc/core' { + interface BaseModuleConfig { + resolveFully?: boolean; + } +} + +export type Options = SwcOptions & Required> & { root?: string }; diff --git a/scripts/tasks/src/swc/utils.spec.ts b/scripts/tasks/src/swc/utils.spec.ts new file mode 100644 index 00000000000000..6fb013a8b02ed8 --- /dev/null +++ b/scripts/tasks/src/swc/utils.spec.ts @@ -0,0 +1,59 @@ +import { stripIndents } from '@nx/devkit'; + +import { addJsExtensionToImports } from './utils'; + +describe(`utils`, () => { + describe(`#addJsExtensionToImports`, () => { + it(`should not transform anything if non supported module type is specified`, () => { + const code = stripIndents` + export { themeToTokensObject } from './themeToTokensObject'; + `; + + let actual = addJsExtensionToImports(code, 'umd'); + + expect(actual).toEqual(code); + + actual = addJsExtensionToImports(code, 'amd'); + + expect(actual).toEqual(code); + + actual = addJsExtensionToImports(code, 'systemjs'); + + expect(actual).toEqual(code); + }); + + it(`should add .js extensions for esm`, () => { + const code = stripIndents` + export { themeToTokensObject } from './themeToTokensObject'; + export { tokens } from './tokens'; + export { typographyStyles } from './global/index.js'; + `; + + const actual = addJsExtensionToImports(code, 'es6'); + const expected = stripIndents` + export { themeToTokensObject } from './themeToTokensObject.js'; + export { tokens } from './tokens.js'; + export { typographyStyles } from './global/index.js'; + `; + + expect(actual).toEqual(expected); + }); + + it(`should add .js extensions for commonjs`, () => { + const code = stripIndents` + const _themeToTokensObject = require("./themeToTokensObject"); + const _tokens = require("./tokens"); + const _index2 = require("./global/index.js"); + `; + + const actual = addJsExtensionToImports(code, 'commonjs'); + const expected = stripIndents` + const _themeToTokensObject = require("./themeToTokensObject.js"); + const _tokens = require("./tokens.js"); + const _index2 = require("./global/index.js"); + `; + + expect(actual).toEqual(expected); + }); + }); +}); diff --git a/scripts/tasks/src/swc/utils.ts b/scripts/tasks/src/swc/utils.ts new file mode 100644 index 00000000000000..0aad2841500a74 --- /dev/null +++ b/scripts/tasks/src/swc/utils.ts @@ -0,0 +1,37 @@ +import { type Options } from './types'; + +const importPaths = { + es6: /from\s+["']([^"']+)["']/g, + commonjs: /require\(["']([^"']+)["']\)/g, +}; +export function addJsExtensionToImports(code: string, type: Options['module']['type'] = 'es6') { + if (!(type === 'es6' || type === 'commonjs')) { + return code; + } + + const regex = importPaths[type]; + + return code.replace(regex, (match, importPath) => { + if (importPath.endsWith('.js')) { + return match; + } + return match.replace(importPath, importPath + '.js'); + }); +} + +export function postprocessOutput( + code: string, + options: { moduleType: Options['module']['type']; addExplicitJsExtensionToImports: boolean }, +) { + // Strip @jsx comments, see https://github.com/microsoft/fluentui/issues/29126 + let resultCode = code + .replace('/** @jsxRuntime automatic */', '') + .replace('/** @jsxImportSource @fluentui/react-jsx-runtime */', ''); + + // TODO: Remove after swc implement proper js extension addition https://github.com/microsoft/fluentui/issues/30634 + resultCode = options.addExplicitJsExtensionToImports + ? addJsExtensionToImports(resultCode, options.moduleType) + : resultCode; + + return resultCode; +} diff --git a/yarn.lock b/yarn.lock index 79cca81bde5144..4dd59cf8fd80b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4496,85 +4496,92 @@ regenerator-runtime "^0.13.7" resolve-from "^5.0.0" -"@swc/cli@0.1.62": - version "0.1.62" - resolved "https://registry.yarnpkg.com/@swc/cli/-/cli-0.1.62.tgz#6442fde2fcf75175a300fb4fcf30f8c60bbb3ab3" - integrity sha512-kOFLjKY3XH1DWLfXL1/B5MizeNorHR8wHKEi92S/Zi9Md/AK17KSqR8MgyRJ6C1fhKHvbBCl8wboyKAFXStkYw== +"@swc/cli@0.1.65": + version "0.1.65" + resolved "https://registry.yarnpkg.com/@swc/cli/-/cli-0.1.65.tgz#bb51ce6f088a78ac99a07507c15a8d74c9336ecb" + integrity sha512-4NcgsvJVHhA7trDnMmkGLLvWMHu2kSy+qHx6QwRhhJhdiYdNUrhdp+ERxen73sYtaeEOYeLJcWrQ60nzKi6rpg== dependencies: "@mole-inc/bin-wrapper" "^8.0.1" commander "^7.1.0" fast-glob "^3.2.5" + minimatch "^9.0.3" semver "^7.3.8" slash "3.0.0" source-map "^0.7.3" -"@swc/core-darwin-arm64@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.87.tgz#0547ec3297424ff89de503a07509646f48519e2a" - integrity sha512-/LxLjPat1LA9CXS7Cn2M4MIqwNOoDF4KjcikPkO08H54rd6WubhaJnr0sLDjms3adRr+pmcCL0yfsUBTX//85A== - -"@swc/core-darwin-x64@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.87.tgz#cbbe47ce93d7893db1649d6b16b0be187d12438b" - integrity sha512-hjSQNcW9BN8gEz3UQZ7Ye80ymbkFHLkUDeEek4lorRyq6S+uxvbL1f1mJAZnFPBpove7AXusykIalWMPvyOR2A== - -"@swc/core-linux-arm-gnueabihf@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.87.tgz#b1c066f49232caacde9300dd12c2a4d13b495d30" - integrity sha512-JVyNIO3tGLPSQ59rJXeKaykTpPhRNozB+7PtYMvMcxpUbYGpEzWxTPkFAX2KKPvl0ejBdA0GW5OXeuPMvTwE0w== - -"@swc/core-linux-arm64-gnu@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.87.tgz#36c2c7ea1ec0622858e16fa16a706922c12cb4ac" - integrity sha512-gLdZKIoql5vjrNjrwwsiS7d3vOAIzYUWqN97iGCSscQOg0MgYbfUnSTO4UEvH4BYlwRNlHepfTZ7ALoG8areUQ== - -"@swc/core-linux-arm64-musl@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.87.tgz#b7f34b2dd352a2f71aecd1c093452cfa9d5f8983" - integrity sha512-WQ5tirVBiU8lUODQ25dt8JRCZHyRDInBe4fkGuxzImMa017zYPWa2WxrKK8LdDF7DzrAITlGl9VeoeE/l0WJbw== - -"@swc/core-linux-x64-gnu@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.87.tgz#42a9fff0212893b0868e048686443dac148f4e9f" - integrity sha512-/vQSH7ZKOuT1It9GzpJ9UFnsOP/dQr1VLUrKQFBlHp9owIWNb2oUrZdNla+KhljCIIahh0JfQ08sycKeycCNzQ== - -"@swc/core-linux-x64-musl@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.87.tgz#b21a089d785895eb71fbcfe695ccfc454b70017f" - integrity sha512-C1NUeISJDyMlIk4919bjcpHvjyjzbkjW7v53gUdN41Y4BPlEk7UKcLez7UHMjdMGA/o9721SLqYVp4/NrQErUw== - -"@swc/core-win32-arm64-msvc@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.87.tgz#c32366a5782cb1fd2a7484c34fd879cefbb883e4" - integrity sha512-AE7JKDJ0OsV9LsYGFfYKMTkGNfsy1au4RT5jT1rxr5MTOsmMD7P2mgiRF8drgc1WX3uOJbTHQfgdVTYroAGfdA== - -"@swc/core-win32-ia32-msvc@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.87.tgz#c2e0de986c733c6fbeecdf99330c5b6260560974" - integrity sha512-2V+5uvisaTPXd5lvTujNLNlEC2LPo07gEUQVGdKGsbhtLAYAggVXBnHjxU1TkuyA6NlciMS59tPKW+L2u2KpTw== - -"@swc/core-win32-x64-msvc@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.87.tgz#24b5b50814062fb3cee0945ee5c09da2313b7f0c" - integrity sha512-2Xak7TidlRuNQamLZC3fEOdUCmMiBzD2BW8+Dnn29f4odzamgAFfeYJ/PnqN7jdTWOINLn95tex4JBm3Pm11HQ== - -"@swc/core@1.3.87": - version "1.3.87" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.87.tgz#b84cffd0d03f49e04b165088bc733a43ac59281e" - integrity sha512-u33Mi/EBvb+g/xpYKyxODB5XvKYqISmy81J+lhFS/Oahja0PbJWZdKEGwSQEFvBecp6E+PfaTOLPOoF1EWcRrw== - dependencies: - "@swc/types" "^0.1.4" +"@swc/core-darwin-arm64@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.7.tgz#158c7d1a5d1aa0d1e57f24f7a58fa23389d4b666" + integrity sha512-IhfP2Mrrh9WcdlBJQbPNBhfdOhW/SC910SiuzvxaLgJmzq1tw6TVDNUz4Zf85TbK5uzgR0emtPc9hTGxynl57A== + +"@swc/core-darwin-x64@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.4.7.tgz#4a7a9a935d1a23402d45a1602026e4f677983776" + integrity sha512-MO01pnxJDS6st5IiqyTnAOz9kpAPP/O4lzEUH9E80XdXBzwptS5hNTM0egBlqueWDFrPM26RI81JLtyTU7kR8w== + +"@swc/core-linux-arm-gnueabihf@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.7.tgz#54f80af37fae84676d50f729312bd5ff384a8c42" + integrity sha512-+cDaXW6PZqGhXIq9C4xE+/QuyUsLkXf8d8uSXep+rZYDl4YHS9Fi7HpZQnqLX6al/iVhwe3VnxHMGw50gxcr/g== + +"@swc/core-linux-arm64-gnu@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.7.tgz#0f0a47b6e6d2d5404c755a73ba52a71240763500" + integrity sha512-RNnVHRKhEtA3pM34wgb3Vumf5M6/XlWzFdkHEMZIkOKyNSUhZiv8X3tsEK+n1rZQWIDkvlw4YyHtB8vK18WdCA== + +"@swc/core-linux-arm64-musl@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.7.tgz#baafa993ae121f43162a00fdb774b8456c0079bc" + integrity sha512-p7Xm4Pib02d1SFS9XXMoOcCTDIkFWMspspptPX00VcjAdZYnXWujWGuD2W+KN1gq5syHB1g3TsYs9LP2dGsKqw== + +"@swc/core-linux-x64-gnu@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.7.tgz#88cfbc497c997aff209b57115d9cbaf597393ff9" + integrity sha512-ViI5jy03cFYPETsye1J+oPbHE4v8oIDN34qebzvgHUlNKOXfc1ig0Zha5oQnKp3zj1rmjcSLIMqK++WR021G5A== + +"@swc/core-linux-x64-musl@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.7.tgz#12f6277d3f7167a698a5c87d0796dd810f8eb273" + integrity sha512-Nf3Axcx/ILl7XE44eidNNPF39rg/KIeqg2545vrOXJG02iu7pEjZuu8wm6w+23BpP4COjZJymlg9LzPT1ZBD5Q== + +"@swc/core-win32-arm64-msvc@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.7.tgz#591ea5067d3ee0d1f45b313dde2b8d8fb6be5eb2" + integrity sha512-MFkJEaC59AO2HpndmHhCkaj8NJus5etjMtBphOe9em7jmmfdQ7mLenKHbZ/CspHNl8yNPO9Qzpa/at2838x+RQ== + +"@swc/core-win32-ia32-msvc@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.7.tgz#bc603df8aff3a21d4f9f2b834e751d3ec1bf45ef" + integrity sha512-nwrfERocUei9sxqd6URrWcEC3KDcTBD+beMerB9idvuzy4rcm5k1O1ClUlZ9pJOZn+vMN1tqZjLze4hJMT9STQ== + +"@swc/core-win32-x64-msvc@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.7.tgz#b4683ad864591e127f865fd1fbca2cfbae9e672a" + integrity sha512-d5T8Z/axAml8FTA+T9RS2mwJDNIbSSz5jcEiWaGuKVDIoSZib2HpMvnMydOGsIrmjfS1Z4ZhdAawivPhAZ3M8Q== + +"@swc/core@1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.4.7.tgz#94ac45187fa2fdbd6cbb34dbda089c174ec64c1d" + integrity sha512-I7a9sUxB+z+UCf6KudqrQH/RgLal/S+E+t4uBdbggycLyJe7WvBgPrQlcN5UpEuD9YC2PJ0CN6kgD6ARStg+pg== + dependencies: + "@swc/counter" "^0.1.2" + "@swc/types" "^0.1.5" optionalDependencies: - "@swc/core-darwin-arm64" "1.3.87" - "@swc/core-darwin-x64" "1.3.87" - "@swc/core-linux-arm-gnueabihf" "1.3.87" - "@swc/core-linux-arm64-gnu" "1.3.87" - "@swc/core-linux-arm64-musl" "1.3.87" - "@swc/core-linux-x64-gnu" "1.3.87" - "@swc/core-linux-x64-musl" "1.3.87" - "@swc/core-win32-arm64-msvc" "1.3.87" - "@swc/core-win32-ia32-msvc" "1.3.87" - "@swc/core-win32-x64-msvc" "1.3.87" + "@swc/core-darwin-arm64" "1.4.7" + "@swc/core-darwin-x64" "1.4.7" + "@swc/core-linux-arm-gnueabihf" "1.4.7" + "@swc/core-linux-arm64-gnu" "1.4.7" + "@swc/core-linux-arm64-musl" "1.4.7" + "@swc/core-linux-x64-gnu" "1.4.7" + "@swc/core-linux-x64-musl" "1.4.7" + "@swc/core-win32-arm64-msvc" "1.4.7" + "@swc/core-win32-ia32-msvc" "1.4.7" + "@swc/core-win32-x64-msvc" "1.4.7" + +"@swc/counter@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" + integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== "@swc/helpers@0.5.1", "@swc/helpers@^0.5.1": version "0.5.1" @@ -4583,7 +4590,7 @@ dependencies: tslib "^2.4.0" -"@swc/types@^0.1.4": +"@swc/types@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.5.tgz#043b731d4f56a79b4897a3de1af35e75d56bc63a" integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw== @@ -17659,7 +17666,7 @@ minimatch@9.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3: +minimatch@9.0.3, minimatch@^9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== @@ -22818,10 +22825,10 @@ swc-loader@0.2.3, swc-loader@^0.1.15, swc-loader@^0.2.3: resolved "https://registry.yarnpkg.com/swc-loader/-/swc-loader-0.2.3.tgz#6792f1c2e4c9ae9bf9b933b3e010210e270c186d" integrity sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A== -swc-plugin-de-indent-template-literal@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/swc-plugin-de-indent-template-literal/-/swc-plugin-de-indent-template-literal-1.0.0.tgz#ec0fc840f5b10b8631aaa20c71b04cac56db223e" - integrity sha512-Qb4G8h8hKlwWYFCJUVbmiELRmjzBM1hPmJh5+p0GiY/b6imGSIuEWV2zBAYcQyNvR2DI2MJ3OxJC2SCT9Ld7lA== +swc-plugin-de-indent-template-literal@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/swc-plugin-de-indent-template-literal/-/swc-plugin-de-indent-template-literal-1.4.0.tgz#c03e8f9fbd9a4a982f067b634a9bf5a045ce6e17" + integrity sha512-CuZ44v2ObBcULusfoPm2JXhV+egYB8KoZZNQ8KfPXbOY90wevDTCK+Qhi9pbuzDtZuyUGKcauZ9C3BM7QgOFNw== symbol-tree@^3.2.4: version "3.2.4"