From aeae3002d21f3327aab604ad1149749b58d1fabe Mon Sep 17 00:00:00 2001 From: Thanasis Katsios Date: Thu, 28 May 2026 17:33:02 +0300 Subject: [PATCH 1/3] =?UTF-8?q?fix(mdx-loader):=20avoid=20transforming=20d?= =?UTF-8?q?otted=20directory=20links=20into=20asset=E2=80=A6=20(#11944)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thanasis Katsios Co-authored-by: sebastien --- .../dotted-directory.whatever/README.md | 1 + .../transformLinks/__tests__/index.test.ts | 102 +++++++++++++++++- .../src/remark/transformLinks/index.ts | 18 +++- 3 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/dotted-directory.whatever/README.md diff --git a/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/dotted-directory.whatever/README.md b/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/dotted-directory.whatever/README.md new file mode 100644 index 000000000000..ca69e6d08b5b --- /dev/null +++ b/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/dotted-directory.whatever/README.md @@ -0,0 +1 @@ +# Fixture diff --git a/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/index.test.ts b/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/index.test.ts index 29bcad267a10..e33ce8fc785b 100644 --- a/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/index.test.ts +++ b/packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/index.test.ts @@ -80,10 +80,29 @@ describe('transformLinks plugin', () => { expect(result).toMatchInlineSnapshot(`"[file](dir/file.zip)"`); }); + it('does not transform existing dotted directory links to asset requires', async () => { + const result = await processContent( + `[directory](../dotted-directory.whatever)`, + ); + expect(result).toMatchInlineSnapshot( + `"[directory](../dotted-directory.whatever)"`, + ); + }); + + it('does not transform absolute dotted directory links to asset requires', async () => { + const result = await processContent( + `[directory](/static-dotted-directory.test)`, + ); + expect(result).toMatchInlineSnapshot( + `"[directory](/static-dotted-directory.test)"`, + ); + }); + describe('onBrokenMarkdownLinks', () => { const fixtures = { urlEmpty: `[empty]()`, fileDoesNotExistSiteAlias: `[file](@site/file.zip)`, + directoryWithDotSiteAlias: `[dir](@site/dotted-directory.whatever)`, }; describe('throws', () => { @@ -103,6 +122,15 @@ describe('transformLinks plugin', () => { To ignore this error, use the \`siteConfig.markdown.hooks.onBrokenMarkdownLinks\` option, or apply the \`pathname://\` protocol to the broken link URLs.] `); }); + + it('if site alias points to a directory with a dot', async () => { + await expect(processContent(fixtures.directoryWithDotSiteAlias)).rejects + .toThrowErrorMatchingInlineSnapshot(` + [Error: Markdown link with URL \`@site/dotted-directory.whatever\` in source file "packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/docs/myFile.mdx" (1:1) couldn't be resolved. + Make sure it references a local Markdown file that exists within the current plugin. + To ignore this error, use the \`siteConfig.markdown.hooks.onBrokenMarkdownLinks\` option, or apply the \`pathname://\` protocol to the broken link URLs.] + `); + }); }); describe('warns', () => { @@ -138,6 +166,23 @@ describe('transformLinks plugin', () => { ] `); }); + + it('if site alias points to a directory with a dot', async () => { + using warn = vi.spyOn(console, 'warn'); + const result = await processWarn(fixtures.directoryWithDotSiteAlias); + expect(result).toMatchInlineSnapshot( + `"[dir](@site/dotted-directory.whatever)"`, + ); + expect(warn).toHaveBeenCalledTimes(1); + expect(warn.mock.calls).toMatchInlineSnapshot(` + [ + [ + "[WARNING] Markdown link with URL \`@site/dotted-directory.whatever\` in source file "packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/docs/myFile.mdx" (1:1) couldn't be resolved. + Make sure it references a local Markdown file that exists within the current plugin.", + ], + ] + `); + }); }); describe('function form', () => { @@ -156,7 +201,6 @@ describe('transformLinks plugin', () => { it('if url is empty', async () => { using log = vi.spyOn(console, 'log'); - const result = await processWarn(fixtures.urlEmpty); expect(result).toMatchInlineSnapshot( `"[empty](/404 "fixed link title")"`, @@ -212,7 +256,6 @@ describe('transformLinks plugin', () => { it('if file with site alias does not exist', async () => { using log = vi.spyOn(console, 'log'); - const result = await processWarn(fixtures.fileDoesNotExistSiteAlias); expect(result).toMatchInlineSnapshot( `"[file](/404 "fixed link title")"`, @@ -265,6 +308,61 @@ describe('transformLinks plugin', () => { ] `); }); + + it('if site alias points to a directory with a dot', async () => { + using log = vi.spyOn(console, 'log'); + const result = await processWarn(fixtures.directoryWithDotSiteAlias); + expect(result).toMatchInlineSnapshot( + `"[dir](/404 "fixed link title")"`, + ); + expect(log).toHaveBeenCalledTimes(1); + expect(log.mock.calls).toMatchInlineSnapshot(` + [ + [ + "onBrokenMarkdownLinks called with", + { + "node": { + "children": [ + { + "position": { + "end": { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": { + "column": 2, + "line": 1, + "offset": 1, + }, + }, + "type": "text", + "value": "dir", + }, + ], + "position": { + "end": { + "column": 39, + "line": 1, + "offset": 38, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "title": "fixed link title", + "type": "link", + "url": "/404", + }, + "sourceFilePath": "packages/docusaurus-mdx-loader/src/remark/transformLinks/__tests__/__fixtures__/docs/myFile.mdx", + "url": "@site/dotted-directory.whatever", + }, + ], + ] + `); + }); }); }); }); diff --git a/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts b/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts index 192c1e9f8cee..2642880fa885 100644 --- a/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts +++ b/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts @@ -171,26 +171,38 @@ async function toAssetRequireNode( }); } +/** + * Checks if the given file path exists and is a file. + * Returns true if it exists, false otherwise. + */ +async function isExistingFile(filePath: string): Promise { + try { + return (await fs.stat(filePath)).isFile(); + } catch { + return false; + } +} + async function getLocalFileAbsolutePath( assetPath: string, {siteDir, filePath, staticDirs}: Context, ) { if (assetPath.startsWith('@site/')) { const assetFilePath = path.join(siteDir, assetPath.replace('@site/', '')); - if (await fs.pathExists(assetFilePath)) { + if (await isExistingFile(assetFilePath)) { return assetFilePath; } } else if (path.isAbsolute(assetPath)) { const assetFilePath = await findAsyncSequential( staticDirs.map((dir) => path.join(dir, assetPath)), - fs.pathExists, + isExistingFile, ); if (assetFilePath) { return assetFilePath; } } else { const assetFilePath = path.join(path.dirname(filePath), assetPath); - if (await fs.pathExists(assetFilePath)) { + if (await isExistingFile(assetFilePath)) { return assetFilePath; } } From d98843579ba187ce23c19d89b75446ec1f17768f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 28 May 2026 17:44:18 +0200 Subject: [PATCH 2/3] fix(gtag.js, faster): Fix StackBlitz, vendor `@types/gtag.js`, upgrade `@swc/html` (#12080) --- admin/scripts/generateExamples.js | 4 +- package.json | 2 +- packages/docusaurus-faster/package.json | 4 +- .../package.json | 7 +- .../src/index.ts | 3 + .../src/vendor-gtag.ts | 196 +++++++++++ .../tsconfig.client.json | 6 +- project-words.txt | 2 + website/src/types.d.ts | 2 +- yarn.lock | 309 +++++++++--------- 10 files changed, 365 insertions(+), 170 deletions(-) create mode 100644 packages/docusaurus-plugin-google-gtag/src/vendor-gtag.ts diff --git a/admin/scripts/generateExamples.js b/admin/scripts/generateExamples.js index 56e0bb87f6f1..f4e9b3495441 100644 --- a/admin/scripts/generateExamples.js +++ b/admin/scripts/generateExamples.js @@ -69,9 +69,9 @@ async function generateTemplateExample(template) { hardReloadOnChange: true, view: 'browser', template: 'docusaurus', - node: '18', + node: '24', container: { - node: '18', + node: '24', }, }; await fs.writeFile( diff --git a/package.json b/package.json index fdd214634ee2..2d284b5b1fa3 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@ai-sdk/react": "^2.0.30", "@crowdin/cli": "^4.14.2", "@eslint/js": "^10.0.1", - "@swc/core": "^1.15.32", + "@swc/core": "^1.15.40", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index e3c2c7cba34e..9604004830f1 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -20,8 +20,8 @@ "dependencies": { "@docusaurus/types": "3.10.1", "@rspack/core": "^1.7.10", - "@swc/core": "^1.15.32", - "@swc/html": "^1.15.32", + "@swc/core": "^1.15.40", + "@swc/html": "^1.15.40", "browserslist": "^4.28.2", "lightningcss": "^1.32.0", "semver": "^7.7.4", diff --git a/packages/docusaurus-plugin-google-gtag/package.json b/packages/docusaurus-plugin-google-gtag/package.json index 15fa8a303ec6..0cf4b2a08bda 100644 --- a/packages/docusaurus-plugin-google-gtag/package.json +++ b/packages/docusaurus-plugin-google-gtag/package.json @@ -5,8 +5,10 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build": "tsc --build", - "watch": "tsc --build --watch" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" @@ -21,7 +23,6 @@ "@docusaurus/core": "3.10.1", "@docusaurus/types": "3.10.1", "@docusaurus/utils-validation": "3.10.1", - "@types/gtag.js": "^0.0.20", "tslib": "^2.6.0" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-google-gtag/src/index.ts b/packages/docusaurus-plugin-google-gtag/src/index.ts index 01ceb43713d6..15009ee38e78 100644 --- a/packages/docusaurus-plugin-google-gtag/src/index.ts +++ b/packages/docusaurus-plugin-google-gtag/src/index.ts @@ -8,6 +8,9 @@ import type {LoadContext, Plugin} from '@docusaurus/types'; import type {PluginOptions, Options} from './options'; +// Not sure why it's needed to expose vendored types 🤷‍️ +export {} from './vendor-gtag'; + function createConfigSnippet({ trackingID, anonymizeIP, diff --git a/packages/docusaurus-plugin-google-gtag/src/vendor-gtag.ts b/packages/docusaurus-plugin-google-gtag/src/vendor-gtag.ts new file mode 100644 index 000000000000..078aaf3dcd2d --- /dev/null +++ b/packages/docusaurus-plugin-google-gtag/src/vendor-gtag.ts @@ -0,0 +1,196 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// Types directly copied from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gtag.js +// I'd prefer not do that, but this should fix our StackBlitz playground +// See https://github.com/facebook/docusaurus/pull/12080 +// See https://github.com/facebook/docusaurus/issues/11615 + +/* eslint-disable */ +declare var gtag: Gtag.Gtag; +declare namespace Gtag { + interface GtagCommands { + config: [ + targetId: string, + config?: ControlParams | EventParams | ConfigParams | CustomParams, + ]; + // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type + set: + | [targetId: string, config: CustomParams | boolean | string] + | [config: CustomParams]; + // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type + js: [config: Date]; + event: [ + eventName: EventNames | (string & {}), + eventParams?: ControlParams | EventParams | CustomParams, + ]; + get: [ + targetId: string, + fieldName: FieldNames | string, + callback?: (field: string | CustomParams | undefined) => any, + ]; + consent: [ + consentArg: ConsentArg | (string & {}), + consentParams: ConsentParams, + ]; + } + + interface Gtag { + ( + command: Command, + ...args: GtagCommands[Command] + ): void; + } + + interface ConfigParams { + page_title?: string | undefined; + page_location?: string | undefined; + page_path?: string | undefined; + send_page_view?: boolean | undefined; + } + + interface CustomParams { + [key: string]: any; + } + + interface ControlParams { + groups?: string | string[] | undefined; + send_to?: string | string[] | undefined; + event_callback?: (() => void) | undefined; + event_timeout?: number | undefined; + } + + type EventNames = + | 'add_payment_info' + | 'add_shipping_info' + | 'add_to_cart' + | 'add_to_wishlist' + | 'begin_checkout' + | 'checkout_progress' + | 'earn_virtual_currency' + | 'exception' + | 'generate_lead' + | 'join_group' + | 'level_end' + | 'level_start' + | 'level_up' + | 'login' + | 'page_view' + | 'post_score' + | 'purchase' + | 'refund' + | 'remove_from_cart' + | 'screen_view' + | 'search' + | 'select_content' + | 'select_item' + | 'select_promotion' + | 'set_checkout_option' + | 'share' + | 'sign_up' + | 'spend_virtual_currency' + | 'tutorial_begin' + | 'tutorial_complete' + | 'unlock_achievement' + | 'timing_complete' + | 'view_cart' + | 'view_item' + | 'view_item_list' + | 'view_promotion' + | 'view_search_results'; + + interface EventParams { + checkout_option?: string | undefined; + checkout_step?: number | undefined; + content_id?: string | undefined; + content_type?: string | undefined; + coupon?: string | undefined; + currency?: string | undefined; + description?: string | undefined; + fatal?: boolean | undefined; + items?: Item[] | undefined; + method?: string | undefined; + number?: string | undefined; + promotions?: Promotion[] | undefined; + screen_name?: string | undefined; + search_term?: string | undefined; + shipping?: Currency | undefined; + tax?: Currency | undefined; + transaction_id?: string | undefined; + value?: number | undefined; + event_label?: string | undefined; + event_category?: string | undefined; + /** @see {@link https://developers.google.com/analytics/devguides/collection/gtagjs/sending-data#specify_different_transport_mechanisms specify_different_transport_mechanisms} */ + transport_type?: 'image' | 'xhr' | 'beacon' | undefined; + } + + type Currency = string | number; + + /** + * Interface of an item object used in lists for this event. + * + * Reference: + * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_item_item view_item_item} + * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_item_list_item view_item_list_item} + * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#select_item_item select_item_item} + * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#add_to_cart_item add_to_cart_item} + * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_cart_item view_cart_item} + */ + interface Item { + item_id?: string | undefined; + item_name?: string | undefined; + affiliation?: string | undefined; + coupon?: string | undefined; + currency?: string | undefined; + creative_name?: string | undefined; + creative_slot?: string | undefined; + discount?: Currency | undefined; + index?: number | undefined; + item_brand?: string | undefined; + item_category?: string | undefined; + item_category2?: string | undefined; + item_category3?: string | undefined; + item_category4?: string | undefined; + item_category5?: string | undefined; + item_list_id?: string | undefined; + item_list_name?: string | undefined; + item_variant?: string | undefined; + location_id?: string | undefined; + price?: Currency | undefined; + promotion_id?: string | undefined; + promotion_name?: string | undefined; + quantity?: number | undefined; + } + + interface Promotion { + creative_name?: string | undefined; + creative_slot?: string | undefined; + promotion_id?: string | undefined; + promotion_name?: string | undefined; + } + + type FieldNames = 'client_id' | 'session_id' | 'gclid'; + + type ConsentArg = 'default' | 'update'; + + /** + * Reference: + * @see {@link https://support.google.com/tagmanager/answer/10718549#consent-types consent-types} + * @see {@link https://developers.google.com/tag-platform/devguides/consent consent} + */ + interface ConsentParams { + ad_personalization?: 'granted' | 'denied' | undefined; + ad_user_data?: 'granted' | 'denied' | undefined; + ad_storage?: 'granted' | 'denied' | undefined; + analytics_storage?: 'granted' | 'denied' | undefined; + functionality_storage?: 'granted' | 'denied' | undefined; + personalization_storage?: 'granted' | 'denied' | undefined; + security_storage?: 'granted' | 'denied' | undefined; + wait_for_update?: number | undefined; + region?: string[] | undefined; + } +} diff --git a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json index 8ce90029c715..0d1acfcfb203 100644 --- a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json +++ b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.base.client.json", - "compilerOptions": { - "types": ["gtag.js"] - }, - "include": ["src/gtag.ts", "src/*.d.ts"], + "compilerOptions": {}, + "include": ["src/gtag.ts", "src//vendor-gtag.ts", "src/*.d.ts"], "exclude": ["**/__tests__/**"] } diff --git a/project-words.txt b/project-words.txt index dbf4e671161c..600eddac630a 100644 --- a/project-words.txt +++ b/project-words.txt @@ -59,6 +59,7 @@ Datagit datagit Datagit's dedup +definitelytyped devto dingers Dmitry @@ -95,6 +96,7 @@ FOUC Français froms gabrielcsapo +gclid getcanary Gifs gingergeek diff --git a/website/src/types.d.ts b/website/src/types.d.ts index 38cd6c8dab2a..c6bbb28c89f8 100644 --- a/website/src/types.d.ts +++ b/website/src/types.d.ts @@ -6,4 +6,4 @@ */ /// -/// +/// diff --git a/yarn.lock b/yarn.lock index b37e0f170e84..15fc0b9ed6fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4203,171 +4203,171 @@ "@svgr/plugin-jsx" "8.1.0" "@svgr/plugin-svgo" "8.1.0" -"@swc/core-darwin-arm64@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.32.tgz#3592714588fdbb8b7a869f81ff96c7236fcf1c09" - integrity sha512-/YWMvJDPu+AAwuUsM2G+DNQ/7zhodURGzdQyewEqcvgklAdDHs3LwQmLLnyn6SJl8DT8UOxkbzK+D1PmPeelRg== - -"@swc/core-darwin-x64@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.15.32.tgz#965044b632933146e319862ea7e4b717eb9f83dd" - integrity sha512-KOTXJXdAhWL+hZ77MYP3z+4pcMFaQhQ74yqyN1uz093q0YnbxpqMtYpPISbYvMHzVRNNx5kN+9RZAXEaadhWVA== - -"@swc/core-linux-arm-gnueabihf@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.32.tgz#70e70ad6ad961055f4a9be9e4947e455c18239e6" - integrity sha512-oOoxLweljlc0A4X8ybsgxV7cVaYTwBOg2iMDJcFR3Sr48C+lsv9VzSmqdK/IVIXF4W4GjLc3VqTAdSMXlfVLuQ== - -"@swc/core-linux-arm64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.32.tgz#7b82e2cc5995e8f919e29f6ce702285f5f1c3ad1" - integrity sha512-oDzEkdl6D6BAWdMtU5KGO7y3HR5fJcvByNLyEk9+ugj8nP5Ovb7P4kBcStBXc4MPExFGQryehiINMlmY8HlclA== - -"@swc/core-linux-arm64-musl@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.32.tgz#16c581b9f859b0175a8bab5cbf694bef7dbf95b8" - integrity sha512-omcqjoZP/b8D8PuczVoRwJieC6ibj7qIxTftNYokz4/aSmKFHvsd7nIFfPk5ZvtzncbH4AY7+Dkr/Lp2gWxYeA== - -"@swc/core-linux-ppc64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.32.tgz#420f7744dae327c8e4917c87ced5c1b3e0a38f96" - integrity sha512-KGkTMyz/Tbn3PBNu0AVZ4GTDFKnICrYcTiNPZq8DrvK42pnFsf3GNDrIG9E5AtQlTmC0YigkWKmu0eMcfTrmgA== - -"@swc/core-linux-s390x-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.32.tgz#9b563a3a73c544f29454e53894bfe533b9a27ffe" - integrity sha512-G3Aa4tVS/3OGZBkoNIwUF9F6RAy+Osb4GOlo62SinLmDiErz/ykmM7KH0wkz6l9kM8jJq1HyAM6atJTUEbBk7g== - -"@swc/core-linux-x64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.32.tgz#615c7bcc1890379dffcc74b6780e2277e65f4b61" - integrity sha512-ERsjfGcj6CBmj3vJnGDO8m8rTvw6RqMcWo1dogOtNx3/+/0+NNpJiXDobJrr1GwInI/BHAEkvSFIH6d2LqPcUQ== - -"@swc/core-linux-x64-musl@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.32.tgz#038604d25bdebb1d1ad780d827a44654fa4b5bdd" - integrity sha512-N4Ggahe/8SUbTX50P6EdhbW9YWcgbZVb52R4cq6MK+zsoMjRq7rGvV5ztA05QnbaCYqMYx8rTY7KAIA3Crdo4Q== - -"@swc/core-win32-arm64-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.32.tgz#c82006e6ef92a998e96d2160b1657f5334af4d54" - integrity sha512-01yN0o9jvo8xBTP12aPK2wW8b41jmOlGbDDlAnoynotc4pO6xA0zby9f1z6j++qXDpGBttLySq1omgVrlQKYcw== - -"@swc/core-win32-ia32-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.32.tgz#e2ae1c95bd6599322bc6e9a82685b7537a193f7b" - integrity sha512-fLagI9XZYNpTcmlqAcp3KBtmj7E19WCmYD80Jxj1Kn5tGNa7yxNLd3NNdWxuZGUPl5iC0/KqZru7g08gF6Fsrw== - -"@swc/core-win32-x64-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.32.tgz#2535c791821054072a511dee0d13e5de9c5cd29b" - integrity sha512-gbc2bQ/T2CiR+w0OvcVKwLOFAcPZBvmWmolbwpg1E8UrpeC03DGtyMUApOHNXNYWA3SHFrYXCQtosrcMza1YFg== - -"@swc/core@^1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.15.32.tgz#2333d66f4b8e7c4fded087ead13c135ff84ab9d6" - integrity sha512-/eWL0n43D64QWEUHLtTE+jDqjkJhyidjkDhv6f0uJohOUAhywxQ9wXYp845DNNds0JpCdI4Uo0a9bl+vbXf+ew== +"@swc/core-darwin-arm64@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.40.tgz#b05d715b04c4fd47baf59288233da85a683cc0bc" + integrity sha512-PaYyclfmQ++77D8ityYvmmVzHv9aG8ROwt2GfG6/ccloy4Hgf80qtOnzb9VYvPsUT7Ty1uhuDRhv3XYpf62qhQ== + +"@swc/core-darwin-x64@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.15.40.tgz#3180daef5c1e47b435f8edd084509e0a5c0d883b" + integrity sha512-HbbPzvfLBUXjIB1Ezks+//lNUjmLjfyd63XSwprJgrZaXYdm70kohXPJUWdqKZozolFxbPaO+xtBaiUp6BoueA== + +"@swc/core-linux-arm-gnueabihf@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.40.tgz#18fcd3c70e48fdfae07c9f18751b1409ce1e5e84" + integrity sha512-SlRZsCjOCPR2LvFs0Ri/Xrx/5o5TCt8vl4gW6mX1hEZOG0a625RxzRHpHdAQNGykmAN/7IeaFAJG+QnNmxlHcA== + +"@swc/core-linux-arm64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.40.tgz#26304933922f2a8e3194770e404403fc25a19c89" + integrity sha512-Q8byxJt2fh8CR3EUX6snBpy47AoBVm+In/+Z3rjDHMjC38ZvR9/gtUUNCT0tfrn4EdVsO8/QPi59nxrxvqxvBQ== + +"@swc/core-linux-arm64-musl@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.40.tgz#3402dfba04ba7b8ea81f243e2f8fa2c336b54d03" + integrity sha512-4z0MgHU+7M0pZDqBN1El7mFXDI1SBwinfcUkAyA4v8QrhOIUOZltySt2aStQLZGrdXVXM4Y4ylfiTC04ED+MoQ== + +"@swc/core-linux-ppc64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.40.tgz#b3df9065cad352328c1eeef08a28fc9fe98785aa" + integrity sha512-fLI4iUgeSZu0eRWUXwe6YzPFx9gHbFiPkl8Rp3mJfP8OpNR3nTQCGPvHdDh9xniW7mVvgMY4ni7A4VzqI1KrpA== + +"@swc/core-linux-s390x-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.40.tgz#58e5b601f641dde81b30626ef66a668701ec918f" + integrity sha512-YqeKMAb7d4nQSGMJQ454IlaCENpzcDqhvBE9+CPfdnYpnUXxd+BSrB6Xk0YjW8UyoEhUj4p6quATCxbsp6J3jg== + +"@swc/core-linux-x64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.40.tgz#cf057dce0c148c53f2d30152baaf60ea29e5d59c" + integrity sha512-7HOuS1iGcme/j/TuL1TfmmLGiMQrjv/GmjyZeydl00FKPtpGXEldwqfI56xgd1YzrzoB2svWjxbGGyQ0TEASxg== + +"@swc/core-linux-x64-musl@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.40.tgz#21fb1a4d0193e9bbcd1469ecd36166d2e96e4006" + integrity sha512-h4kZYHc7dpc9P9u4brRJaS8Pl7tPVHAeiLSzw7T5RfIJgAoSdaCMKzI/2Uay9gFhaw8uyCDl0L5q37r0EpAfIA== + +"@swc/core-win32-arm64-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.40.tgz#1dba23b2b0db86b3d6d65da2abd627cc607a1fbc" + integrity sha512-+mQgKZXSj6mV38Zh05QaxSjUDmGP/R2JWlXZTDLSPkDzHU6p3GxN9eeSf5dfyDVU86946fmCvSzyl/ucImx8+A== + +"@swc/core-win32-ia32-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.40.tgz#b2da1e33165d469467b1046a2189db468da488eb" + integrity sha512-yvwdPLGd25mcj/mNatjNQ0lZujtQD6psH3v9PNmMb+fSzjbNG8KIDxjFWrcV+fsFVLOkyOmdJsFmX7NAFjVyPw== + +"@swc/core-win32-x64-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.40.tgz#3563f7e8ce8708f5fda43eb8e0956ef11e0da320" + integrity sha512-OXtKsLU1bVtInzzDEAY2sYiF/rl4tvAnLLLpuMp3HzAOQZ5A+i69AKDhA1YLQTaMAqO3vzyYNVAYVRMPtSYD4w== + +"@swc/core@^1.15.32", "@swc/core@^1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.15.40.tgz#941c949aa88c0d8d291f102f519f3c2c77701b90" + integrity sha512-2kwzJikRvgtNAG7MwVZY2vEzZjTxKIq5jXOihuSV/8U+Hej8Va22t65aKnJZs3P+NwojZvR8Mf8kyM7O+V8sQg== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.26" optionalDependencies: - "@swc/core-darwin-arm64" "1.15.32" - "@swc/core-darwin-x64" "1.15.32" - "@swc/core-linux-arm-gnueabihf" "1.15.32" - "@swc/core-linux-arm64-gnu" "1.15.32" - "@swc/core-linux-arm64-musl" "1.15.32" - "@swc/core-linux-ppc64-gnu" "1.15.32" - "@swc/core-linux-s390x-gnu" "1.15.32" - "@swc/core-linux-x64-gnu" "1.15.32" - "@swc/core-linux-x64-musl" "1.15.32" - "@swc/core-win32-arm64-msvc" "1.15.32" - "@swc/core-win32-ia32-msvc" "1.15.32" - "@swc/core-win32-x64-msvc" "1.15.32" + "@swc/core-darwin-arm64" "1.15.40" + "@swc/core-darwin-x64" "1.15.40" + "@swc/core-linux-arm-gnueabihf" "1.15.40" + "@swc/core-linux-arm64-gnu" "1.15.40" + "@swc/core-linux-arm64-musl" "1.15.40" + "@swc/core-linux-ppc64-gnu" "1.15.40" + "@swc/core-linux-s390x-gnu" "1.15.40" + "@swc/core-linux-x64-gnu" "1.15.40" + "@swc/core-linux-x64-musl" "1.15.40" + "@swc/core-win32-arm64-msvc" "1.15.40" + "@swc/core-win32-ia32-msvc" "1.15.40" + "@swc/core-win32-x64-msvc" "1.15.40" "@swc/counter@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== -"@swc/html-darwin-arm64@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-darwin-arm64/-/html-darwin-arm64-1.15.32.tgz#e23503640b0a5b57a7e0f754c9b47db4565c26ea" - integrity sha512-WgY386nwyz24cTJ+Nztd4cKvfPJexLYAzurSYDmuYxS3HihWoTFZWMDomTfM8yr2UCi8SwW+zTNAWxJxUaKESg== - -"@swc/html-darwin-x64@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-darwin-x64/-/html-darwin-x64-1.15.32.tgz#b117b6255fc78ef823762d943d1609997575d150" - integrity sha512-uge7XExmbPREWO+2dZQvAbeiAvUlR+3TxxgYETJw39f8Nlclc3rWXaievpO3iRPbg1s8BsZ9fGGhoN7yYrwUwg== - -"@swc/html-linux-arm-gnueabihf@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-arm-gnueabihf/-/html-linux-arm-gnueabihf-1.15.32.tgz#d3878afdc2e04a37d5910e3ed672ac7d6a7c77a1" - integrity sha512-EuserzRHqXX6R6KScuBn+U3IX9ll3j4+sHM2Y3J/vIH7TbQ5IrvCFuu8w7El5R9j0ByCWvsDa2QdiLCQtsmFlw== - -"@swc/html-linux-arm64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-arm64-gnu/-/html-linux-arm64-gnu-1.15.32.tgz#3b2a613a3997da30a28ed426d885090c777ba846" - integrity sha512-gvlByySjNDWX2FUIGVBWOhd00rySz0AOydQpuXCK0ldYbFVMby9oXbp2JVmE5UsB6J4YZqZh4ajmmqCGvFHi4Q== - -"@swc/html-linux-arm64-musl@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-arm64-musl/-/html-linux-arm64-musl-1.15.32.tgz#bda38cc74442e9ec901592e62f22dc4cd3d7e8ac" - integrity sha512-iTrXjSeVwhHp+w7I5srCSpG9prebj+j/lmWalljNXGagTuVmtEWdH/EDvtSq1JfJyKQ6KRKyeB3Qg6yGHhjr+Q== - -"@swc/html-linux-ppc64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-ppc64-gnu/-/html-linux-ppc64-gnu-1.15.32.tgz#07f81c31e99ba12c77630faf643c0d9645073719" - integrity sha512-sh6yGlZk7YqaQ4XisqEe0tBSTy0WcwmEnMEq9EG6mIU16PCGTbROHMfTw0W81jtvUyjqtCQC9axbSJLAW3zIeA== - -"@swc/html-linux-s390x-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-s390x-gnu/-/html-linux-s390x-gnu-1.15.32.tgz#ae81f055b84e5bc7964bc6c805b2b9b19f737df4" - integrity sha512-zBavh0QnsvjM9QMPmtOqMaUGSLr5tdj2gxEx4xXzOXBFkUKKRA+qEfx6LdTzIbrqqtK5Xf6CPBPT9kzhDLuaCA== - -"@swc/html-linux-x64-gnu@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-x64-gnu/-/html-linux-x64-gnu-1.15.32.tgz#97c896d9d44df9d6181033e95063e63e28e26008" - integrity sha512-IveuScZfAwDZEBs6pTvdG/MwGyMPuxp74l9ngp2PbUboVBIfUS894kATBaBuSBYXajZ4v4wqv01PGM81rUhGQg== - -"@swc/html-linux-x64-musl@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-linux-x64-musl/-/html-linux-x64-musl-1.15.32.tgz#80020178bb09da23ef74deb3a1508dc582577368" - integrity sha512-wRXdcS0eaYU1Pm15gNGmVM7fsJ/xCxy3BnfNH52MC/ObgCIzBcFl3Yjn6yr6nkqNtDZyEt8IlQFQno5zEEvIpw== - -"@swc/html-win32-arm64-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-win32-arm64-msvc/-/html-win32-arm64-msvc-1.15.32.tgz#dedf30e0aec1f21457493280e36ccc1ce770c5f9" - integrity sha512-GzQQkdi4kC5ZjKloTQXgsI9FNQYb3z1mmF9ZbVDykdRgzKnqWGbx/gwTcWUhiurI9KsyL1t95PmOnU11Jw/mqg== - -"@swc/html-win32-ia32-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-win32-ia32-msvc/-/html-win32-ia32-msvc-1.15.32.tgz#f5e98851375d4284875fd7904771cbc7abf7613b" - integrity sha512-BJqmiTbCWcd1hG9nLEktIASTv0SD91cIKHdt8Zza7AvSjH+BmDX0AW8krVDsJpXWQEtWEYzroe9rweNOMSVfjQ== - -"@swc/html-win32-x64-msvc@1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html-win32-x64-msvc/-/html-win32-x64-msvc-1.15.32.tgz#1264fd79a637858df4746b02f7faeaf9b0576fce" - integrity sha512-8uOl327V1nCISIILtpQWrY8dl4JFo8UK5TCFcpMJ8ldt4wggr7cPnvkp2bJkT/pL7djjrDJQZ2BpNfu62M2zWA== - -"@swc/html@^1.15.32": - version "1.15.32" - resolved "https://registry.yarnpkg.com/@swc/html/-/html-1.15.32.tgz#478cb5463a964bcf1b532b2cc1a713aceeffd69e" - integrity sha512-Mv37uFfZQt7j89U3KJPqeQt6vl5Bxk7aqOrNDKWRAmrQOJ+lYJKq4hmYWW6Rk3wdGw03SlEfK3RmnzCN9gsqAA== +"@swc/html-darwin-arm64@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-darwin-arm64/-/html-darwin-arm64-1.15.40.tgz#f3154aaf76ebd12918485c9132d328cfc464f3a6" + integrity sha512-A9oxSh60pMEsX/4VBpn3e6s8DfGWsHzAeG+Vd9mXgkTqt/ouX12owP6RyqfqK8v0WuEsBKkGY0+MbwLvlOG8NQ== + +"@swc/html-darwin-x64@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-darwin-x64/-/html-darwin-x64-1.15.40.tgz#7c9695aeacc799a1f12beaa8481e677f8a9bafa2" + integrity sha512-GZ5KxJ/1pqnpOAjaa9hnkSk3M1LHjc5ci5GCt5/llAgDKFLDHzydIflHXTOIaS4nRCtfVMmD0joKX+ZWruSkJw== + +"@swc/html-linux-arm-gnueabihf@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-arm-gnueabihf/-/html-linux-arm-gnueabihf-1.15.40.tgz#ce2d0f6b43bb147f957a382a03c4344ab260f314" + integrity sha512-Bbwtl0G6vYcWlDQmjeuyFx8YIvqi1StlQWjRNB1ZtvrRNL3JadFARhijBONiUIyTK9MgUbWtTV3QU69qzjNENQ== + +"@swc/html-linux-arm64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-arm64-gnu/-/html-linux-arm64-gnu-1.15.40.tgz#fc604873631a96f9e1c74d48f8dd27b6f82c5100" + integrity sha512-buu4fGyCIhkwmCetI4CfWOPn7cphJHwQ9ksK685hlL0R0PUaDCNdIxo+JAz0mK2JgPhoGqnKsVEmV6gLIL5GBw== + +"@swc/html-linux-arm64-musl@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-arm64-musl/-/html-linux-arm64-musl-1.15.40.tgz#b6d23f8e475c66ffe9a2aea8d1ab2c1702f055fb" + integrity sha512-BwWtpAGEHIP1QwKExWqBIjGpAHMahjT26ORZv3+TbwW4IuEl2QP5FrcYc30O8abCG5J1lWRl1vXKYDpzbIDz1A== + +"@swc/html-linux-ppc64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-ppc64-gnu/-/html-linux-ppc64-gnu-1.15.40.tgz#fc9f8e5c4b86401fe4d778312898c6ced61efba4" + integrity sha512-wLtHgwmZu5K7PvuTROklgWJO6D+KwywpYR1geI8dSWX/AYnx/KCGVK9ncPzWVfnLXWhXbkgua3Ujdrfoxf+qSw== + +"@swc/html-linux-s390x-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-s390x-gnu/-/html-linux-s390x-gnu-1.15.40.tgz#198c771e2dc6493b898f565efade542b44f55a32" + integrity sha512-WbWzQBCmvECZG6ep9D5SMMZTFCbFmRSCc7lPD3YhhaK16BNqr1AybvybZYOgxX9Ot5tq7gTWCgjFZXLDOn6Y/g== + +"@swc/html-linux-x64-gnu@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-x64-gnu/-/html-linux-x64-gnu-1.15.40.tgz#5b7ac2a96dbcd4947cb5375c11b3c647ca3d9949" + integrity sha512-i+/JqL5j9mTGMcVshWLMzciqyE3Np+gN5+UqMyO1D5zSmniJD5MHRlGXCtLaWx/MIKX0Q4Xkre33o56fmxp+uA== + +"@swc/html-linux-x64-musl@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-linux-x64-musl/-/html-linux-x64-musl-1.15.40.tgz#f78fc3fc68f976121d2a1c95e8a8987375bc7ae1" + integrity sha512-mroZnb5omFc4iE01UsJgta+Nm0sIFWpGfTPk+BHfH165MZAM4wNndeczX5RpGZbQSF1nNpCoNgqJyT7l3hITMg== + +"@swc/html-win32-arm64-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-win32-arm64-msvc/-/html-win32-arm64-msvc-1.15.40.tgz#1a11bfa36e0e7d14c63b118413fe3e151f24111a" + integrity sha512-qg1LXRrsY9FXy0S7vouSF0kkn1vdkTD//FW66iuezH7HMm5/DJGwEj7oc1zTKPWU0HnwOINOUbl6rUHrRuXHAQ== + +"@swc/html-win32-ia32-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-win32-ia32-msvc/-/html-win32-ia32-msvc-1.15.40.tgz#3a1976de161087add90f2cf86c88d8a261433cbc" + integrity sha512-5NwMmgt9A70LQzcYOl4OiIJk5AhsGP69fNRfkmXXop+iIcAGUmYy+d6F2/Gc0u05j9G0R04NPWcHBQrHQhr0Gw== + +"@swc/html-win32-x64-msvc@1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html-win32-x64-msvc/-/html-win32-x64-msvc-1.15.40.tgz#769327f061bbdb4ed77877758dd4a20ff18170b7" + integrity sha512-WUNZqCZ+8WY1pr8t3X3fq4gI5+FL/tCCzlrJ2lLn0s+TyA2SLm/RPfXxQIr94EnjJWcIV21G//6/uXeBN8cPzw== + +"@swc/html@^1.15.40": + version "1.15.40" + resolved "https://registry.yarnpkg.com/@swc/html/-/html-1.15.40.tgz#84614c328988ae2dd579724a0ddaa55116c875f1" + integrity sha512-YVWNrh3wZWH2oXz7uL+s1WZbFIsnAp9cCl/b+C7ufDJqhsOvbr0un9IOYZ/CxRIRdnHGfhVD199n8baD/kRQew== dependencies: "@swc/counter" "^0.1.3" optionalDependencies: - "@swc/html-darwin-arm64" "1.15.32" - "@swc/html-darwin-x64" "1.15.32" - "@swc/html-linux-arm-gnueabihf" "1.15.32" - "@swc/html-linux-arm64-gnu" "1.15.32" - "@swc/html-linux-arm64-musl" "1.15.32" - "@swc/html-linux-ppc64-gnu" "1.15.32" - "@swc/html-linux-s390x-gnu" "1.15.32" - "@swc/html-linux-x64-gnu" "1.15.32" - "@swc/html-linux-x64-musl" "1.15.32" - "@swc/html-win32-arm64-msvc" "1.15.32" - "@swc/html-win32-ia32-msvc" "1.15.32" - "@swc/html-win32-x64-msvc" "1.15.32" + "@swc/html-darwin-arm64" "1.15.40" + "@swc/html-darwin-x64" "1.15.40" + "@swc/html-linux-arm-gnueabihf" "1.15.40" + "@swc/html-linux-arm64-gnu" "1.15.40" + "@swc/html-linux-arm64-musl" "1.15.40" + "@swc/html-linux-ppc64-gnu" "1.15.40" + "@swc/html-linux-s390x-gnu" "1.15.40" + "@swc/html-linux-x64-gnu" "1.15.40" + "@swc/html-linux-x64-musl" "1.15.40" + "@swc/html-win32-arm64-msvc" "1.15.40" + "@swc/html-win32-ia32-msvc" "1.15.40" + "@swc/html-win32-x64-msvc" "1.15.40" "@swc/types@^0.1.26": version "0.1.26" @@ -4942,11 +4942,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/gtag.js@^0.0.20": - version "0.0.20" - resolved "https://registry.yarnpkg.com/@types/gtag.js/-/gtag.js-0.0.20.tgz#e47edabb4ed5ecac90a079275958e6c929d7c08a" - integrity sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg== - "@types/hast@^3.0.0": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" From 1dba8e8e1b047070a0191177347cc8c272462c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 28 May 2026 18:39:51 +0200 Subject: [PATCH 3/3] break(google-analytics): remove deprecated Google Analytics plugin (#12081) --- admin/publish-legacy.md | 1 - .../.npmignore | 3 - .../README.md | 7 -- .../package.json | 33 ------- .../src/analytics.ts | 32 ------- .../src/index.ts | 91 ------------------- .../src/options.ts | 13 --- .../src/types.d.ts | 12 --- .../tsconfig.client.json | 5 - .../tsconfig.json | 9 -- .../docusaurus-preset-classic/package.json | 1 - .../docusaurus-preset-classic/src/index.ts | 17 ++-- .../docusaurus-preset-classic/src/options.ts | 6 -- website/blog/releases/2.3/index.mdx | 2 +- website/docs/api/plugins/overview.mdx | 1 - .../api/plugins/plugin-google-analytics.mdx | 77 ---------------- website/docs/using-plugins.mdx | 3 - 17 files changed, 10 insertions(+), 303 deletions(-) delete mode 100644 packages/docusaurus-plugin-google-analytics/.npmignore delete mode 100644 packages/docusaurus-plugin-google-analytics/README.md delete mode 100644 packages/docusaurus-plugin-google-analytics/package.json delete mode 100644 packages/docusaurus-plugin-google-analytics/src/analytics.ts delete mode 100644 packages/docusaurus-plugin-google-analytics/src/index.ts delete mode 100644 packages/docusaurus-plugin-google-analytics/src/options.ts delete mode 100644 packages/docusaurus-plugin-google-analytics/src/types.d.ts delete mode 100644 packages/docusaurus-plugin-google-analytics/tsconfig.client.json delete mode 100644 packages/docusaurus-plugin-google-analytics/tsconfig.json delete mode 100644 website/docs/api/plugins/plugin-google-analytics.mdx diff --git a/admin/publish-legacy.md b/admin/publish-legacy.md index bd5a21786d1c..51904a31c271 100644 --- a/admin/publish-legacy.md +++ b/admin/publish-legacy.md @@ -172,7 +172,6 @@ npm access ls-packages "@docusaurus/theme-search-algolia": "read-write", "@docusaurus/theme-classic": "read-write", "@docusaurus/theme-live-codeblock": "read-write", - "@docusaurus/plugin-google-analytics": "read-write", "@docusaurus/plugin-google-gtag": "read-write", "@docusaurus/plugin-content-docs-legacy": "read-write", "@docusaurus/plugin-ideal-image": "read-write", diff --git a/packages/docusaurus-plugin-google-analytics/.npmignore b/packages/docusaurus-plugin-google-analytics/.npmignore deleted file mode 100644 index 03c9ae1e1b54..000000000000 --- a/packages/docusaurus-plugin-google-analytics/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -.tsbuildinfo* -tsconfig* -__tests__ diff --git a/packages/docusaurus-plugin-google-analytics/README.md b/packages/docusaurus-plugin-google-analytics/README.md deleted file mode 100644 index 41f4141555e5..000000000000 --- a/packages/docusaurus-plugin-google-analytics/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# `@docusaurus/plugin-google-analytics` - -Google analytics plugin for Docusaurus. - -## Usage - -See [plugin-google-analytics documentation](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-analytics). diff --git a/packages/docusaurus-plugin-google-analytics/package.json b/packages/docusaurus-plugin-google-analytics/package.json deleted file mode 100644 index 33b09d2286be..000000000000 --- a/packages/docusaurus-plugin-google-analytics/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@docusaurus/plugin-google-analytics", - "version": "3.10.1", - "description": "Global analytics (analytics.js) plugin for Docusaurus.", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "tsc --build", - "watch": "tsc --build --watch" - }, - "repository": { - "type": "git", - "url": "https://github.com/facebook/docusaurus.git", - "directory": "packages/docusaurus-plugin-google-analytics" - }, - "license": "MIT", - "dependencies": { - "@docusaurus/core": "3.10.1", - "@docusaurus/types": "3.10.1", - "@docusaurus/utils-validation": "3.10.1", - "tslib": "^2.6.0" - }, - "peerDependencies": { - "react": "^19.2.5", - "react-dom": "^19.2.5" - }, - "engines": { - "node": ">=24.14" - } -} diff --git a/packages/docusaurus-plugin-google-analytics/src/analytics.ts b/packages/docusaurus-plugin-google-analytics/src/analytics.ts deleted file mode 100644 index b127d3c43c81..000000000000 --- a/packages/docusaurus-plugin-google-analytics/src/analytics.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type {ClientModule} from '@docusaurus/types'; - -const clientModule: ClientModule = { - onRouteDidUpdate({location, previousLocation}) { - if ( - previousLocation && - (location.pathname !== previousLocation.pathname || - location.search !== previousLocation.search || - location.hash !== previousLocation.hash) - ) { - // Set page so that subsequent hits on this page are attributed - // to this page. This is recommended for Single-page Applications. - window.ga( - 'set', - 'page', - location.pathname + location.search + location.hash, - ); - // Always refer to the variable on window in-case it gets - // overridden elsewhere. - window.ga('send', 'pageview'); - } - }, -}; - -export default clientModule; diff --git a/packages/docusaurus-plugin-google-analytics/src/index.ts b/packages/docusaurus-plugin-google-analytics/src/index.ts deleted file mode 100644 index 971b435060d2..000000000000 --- a/packages/docusaurus-plugin-google-analytics/src/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import {Joi} from '@docusaurus/utils-validation'; -import type { - LoadContext, - Plugin, - OptionValidationContext, - ThemeConfig, - ThemeConfigValidationContext, -} from '@docusaurus/types'; -import type {PluginOptions, Options} from './options'; - -export default function pluginGoogleAnalytics( - context: LoadContext, - options: PluginOptions, -): Plugin | null { - if (process.env.NODE_ENV !== 'production') { - return null; - } - - const {trackingID, anonymizeIP} = options; - - return { - name: 'docusaurus-plugin-google-analytics', - - getClientModules() { - return ['./analytics']; - }, - - injectHtmlTags() { - return { - headTags: [ - { - tagName: 'link', - attributes: { - rel: 'preconnect', - href: 'https://www.google-analytics.com', - }, - }, - // https://developers.google.com/analytics/devguides/collection/analyticsjs/#alternative_async_tag - { - tagName: 'script', - innerHTML: ` - window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; - ga('create', '${trackingID}', 'auto'); - ${anonymizeIP ? "ga('set', 'anonymizeIp', true);\n" : ''} - ga('send', 'pageview'); - `, - }, - { - tagName: 'script', - attributes: { - async: true, - src: 'https://www.google-analytics.com/analytics.js', - }, - }, - ], - }; - }, - }; -} - -const pluginOptionsSchema = Joi.object({ - trackingID: Joi.string().required(), - anonymizeIP: Joi.boolean().default(false), -}); - -export function validateOptions({ - validate, - options, -}: OptionValidationContext): PluginOptions { - return validate(pluginOptionsSchema, options); -} - -export function validateThemeConfig({ - themeConfig, -}: ThemeConfigValidationContext): ThemeConfig { - if ('googleAnalytics' in themeConfig) { - throw new Error( - 'The "googleAnalytics" field in themeConfig should now be specified as option for plugin-google-analytics. More information at https://github.com/facebook/docusaurus/pull/5832.', - ); - } - return themeConfig; -} - -export type {PluginOptions, Options}; diff --git a/packages/docusaurus-plugin-google-analytics/src/options.ts b/packages/docusaurus-plugin-google-analytics/src/options.ts deleted file mode 100644 index c23d43a7b424..000000000000 --- a/packages/docusaurus-plugin-google-analytics/src/options.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -export type PluginOptions = { - trackingID: string; - anonymizeIP: boolean; -}; - -export type Options = Partial; diff --git a/packages/docusaurus-plugin-google-analytics/src/types.d.ts b/packages/docusaurus-plugin-google-analytics/src/types.d.ts deleted file mode 100644 index 5a68f4690419..000000000000 --- a/packages/docusaurus-plugin-google-analytics/src/types.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/// - -interface Window { - ga: (command: string, ...fields: string[]) => void; -} diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json deleted file mode 100644 index 830d13ddd749..000000000000 --- a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.base.client.json", - "include": ["src/analytics.ts", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] -} diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.json b/packages/docusaurus-plugin-google-analytics/tsconfig.json deleted file mode 100644 index 8cf281304425..000000000000 --- a/packages/docusaurus-plugin-google-analytics/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "references": [{"path": "./tsconfig.client.json"}], - "compilerOptions": { - "noEmit": false - }, - "include": ["src"], - "exclude": ["src/analytics.ts", "**/__tests__/**"] -} diff --git a/packages/docusaurus-preset-classic/package.json b/packages/docusaurus-preset-classic/package.json index 872f6c26e6b0..8621eea76bbb 100644 --- a/packages/docusaurus-preset-classic/package.json +++ b/packages/docusaurus-preset-classic/package.json @@ -24,7 +24,6 @@ "@docusaurus/plugin-content-pages": "3.10.1", "@docusaurus/plugin-css-cascade-layers": "3.10.1", "@docusaurus/plugin-debug": "3.10.1", - "@docusaurus/plugin-google-analytics": "3.10.1", "@docusaurus/plugin-google-gtag": "3.10.1", "@docusaurus/plugin-google-tag-manager": "3.10.1", "@docusaurus/plugin-sitemap": "3.10.1", diff --git a/packages/docusaurus-preset-classic/src/index.ts b/packages/docusaurus-preset-classic/src/index.ts index 661be7e325c8..7834d67dd6fa 100644 --- a/packages/docusaurus-preset-classic/src/index.ts +++ b/packages/docusaurus-preset-classic/src/index.ts @@ -39,7 +39,6 @@ export default function preset( sitemap, svgr, theme, - googleAnalytics, gtag, googleTagManager, ...rest @@ -55,9 +54,16 @@ export default function preset( 'The "gtag" field in themeConfig should now be specified as option for plugin-google-gtag. For preset-classic, simply move themeConfig.gtag to preset options. More information at https://github.com/facebook/docusaurus/pull/5832.', ); } - if ('googleAnalytics' in themeConfig) { + + // TODO Docusaurus v5: remove + if ('googleAnalytics' in opts || 'googleAnalytics' in themeConfig) { throw new Error( - 'The "googleAnalytics" field in themeConfig should now be specified as option for plugin-google-analytics. For preset-classic, simply move themeConfig.googleAnalytics to preset options. More information at https://github.com/facebook/docusaurus/pull/5832.', + `In Docusaurus v4, the Google Analytics plugin has been removed. +You can now use either: +- @docusaurus/plugin-google-gtag - presetOptions.gtag +- @docusaurus/plugin-google-tag-manager - presetOptions.googleTagManager + +See also: https://github.com/facebook/docusaurus/issues/7221`, ); } @@ -78,11 +84,6 @@ export default function preset( if (pages !== false) { plugins.push(makePluginConfig('@docusaurus/plugin-content-pages', pages)); } - if (googleAnalytics) { - plugins.push( - makePluginConfig('@docusaurus/plugin-google-analytics', googleAnalytics), - ); - } if (debug || (debug === undefined && !isProd)) { plugins.push(require.resolve('@docusaurus/plugin-debug')); } diff --git a/packages/docusaurus-preset-classic/src/options.ts b/packages/docusaurus-preset-classic/src/options.ts index 98c4087ac696..2057b797a51c 100644 --- a/packages/docusaurus-preset-classic/src/options.ts +++ b/packages/docusaurus-preset-classic/src/options.ts @@ -10,7 +10,6 @@ import type {Options as BlogPluginOptions} from '@docusaurus/plugin-content-blog import type {Options as PagesPluginOptions} from '@docusaurus/plugin-content-pages'; import type {Options as SitemapPluginOptions} from '@docusaurus/plugin-sitemap'; import type {Options as SVGRPluginOptions} from '@docusaurus/plugin-svgr'; -import type {Options as GAPluginOptions} from '@docusaurus/plugin-google-analytics'; import type {Options as GtagPluginOptions} from '@docusaurus/plugin-google-gtag'; import type {Options as GTMPluginOptions} from '@docusaurus/plugin-google-tag-manager'; import type {Options as ThemeOptions} from '@docusaurus/theme-classic'; @@ -36,11 +35,6 @@ export type Options = { svgr?: false | SVGRPluginOptions; /** Options for `@docusaurus/theme-classic`. */ theme?: ThemeOptions; - /** - * Options for `@docusaurus/plugin-google-analytics`. Only enabled when the - * key is present. - */ - googleAnalytics?: GAPluginOptions; /** * Options for `@docusaurus/plugin-google-gtag`. Only enabled when the key * is present. diff --git a/website/blog/releases/2.3/index.mdx b/website/blog/releases/2.3/index.mdx index d5e3b53320cf..5d3a85f34886 100644 --- a/website/blog/releases/2.3/index.mdx +++ b/website/blog/releases/2.3/index.mdx @@ -26,7 +26,7 @@ We now have a [`@docusaurus/plugin-google-tag-manager`](/docs/api/plugins/@docus [Google will sunset its Universal Analytics](https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/) on **July 1, 2023**, and ask users to migrate to **Google Analytics 4**. -Therefore, we are also **deprecating our existing [`@docusaurus/plugin-google-analytics`](/docs/api/plugins/@docusaurus/plugin-google-analytics)** package. Docusaurus users should create a new Google Analytics 4 property, and migrate to the [gtag.js plugin](/docs/api/plugins/@docusaurus/plugin-google-gtag/), or the [Google Tag Manager plugin](/docs/api/plugins/@docusaurus/plugin-google-tag-manager/). Refer to the [dedicated Docusaurus issue](https://github.com/facebook/docusaurus/issues/7221) for details and questions. +Therefore, we are also **deprecating our existing [`@docusaurus/plugin-google-analytics`](https://github.com/facebook/docusaurus/issues/7221)** package. Docusaurus users should create a new Google Analytics 4 property, and migrate to the [gtag.js plugin](/docs/api/plugins/@docusaurus/plugin-google-gtag/), or the [Google Tag Manager plugin](/docs/api/plugins/@docusaurus/plugin-google-tag-manager/). Refer to the [dedicated Docusaurus issue](https://github.com/facebook/docusaurus/issues/7221) for details and questions. ::: diff --git a/website/docs/api/plugins/overview.mdx b/website/docs/api/plugins/overview.mdx index f4479ef40183..0071d517279a 100644 --- a/website/docs/api/plugins/overview.mdx +++ b/website/docs/api/plugins/overview.mdx @@ -28,7 +28,6 @@ These plugins will add a useful behavior to your Docusaurus site. - [@docusaurus/plugin-pwa](./plugin-pwa.mdx) - [@docusaurus/plugin-client-redirects](./plugin-client-redirects.mdx) - [@docusaurus/plugin-ideal-image](./plugin-ideal-image.mdx) -- [@docusaurus/plugin-google-analytics](./plugin-google-analytics.mdx) - [@docusaurus/plugin-google-gtag](./plugin-google-gtag.mdx) - [@docusaurus/plugin-google-tag-manager](./plugin-google-tag-manager.mdx) - [@docusaurus/plugin-css-cascade-layers](./plugin-css-cascade-layers.mdx) diff --git a/website/docs/api/plugins/plugin-google-analytics.mdx b/website/docs/api/plugins/plugin-google-analytics.mdx deleted file mode 100644 index e8aa8ace973e..000000000000 --- a/website/docs/api/plugins/plugin-google-analytics.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -sidebar_position: 6 -slug: /api/plugins/@docusaurus/plugin-google-analytics ---- - -# 📦 plugin-google-analytics - -import APITable from '@site/src/components/APITable'; - -The default [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) plugin. It is a JavaScript library for measuring how users interact with your website **in the production build**. If you are using Google Analytics 4 you might need to consider using [plugin-google-gtag](./plugin-google-gtag.mdx) instead. - -:::danger Deprecated - -This plugin is **deprecated** and became useless on July 1, 2023. - -Google is [moving away from Universal Analytics](https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/). - -If you are still using this plugin with a `UA-*` tracking id, you should create a Google Analytics 4 account as soon as possible, and use [`@docusaurus/plugin-google-gtag`](./plugin-google-gtag.mdx) instead of this plugin. More details [here](https://github.com/facebook/docusaurus/issues/7221). - -::: - -:::warning production only - -This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics. - -::: - -## Installation {/* #installation */} - -```bash npm2yarn -npm install --save @docusaurus/plugin-google-analytics -``` - -:::tip - -If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency. - -You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic). - -::: - -## Configuration {/* #configuration */} - -Accepted fields: - -```mdx-code-block - -``` - -| Name | Type | Default | Description | -| --- | --- | --- | --- | -| `trackingID` | `string` | **Required** | The tracking ID of your analytics service. | -| `anonymizeIP` | `boolean` | `false` | Whether the IP should be anonymized when sending requests. | - -```mdx-code-block - -``` - -### Example configuration {/* #ex-config */} - -You can configure this plugin through preset options or plugin options. - -:::tip - -Most Docusaurus users configure this plugin through the preset options. - -::: - -```js config-tabs -// Preset Options: googleAnalytics -// Plugin Options: @docusaurus/plugin-google-analytics - -const config = { - trackingID: 'UA-141789564-1', - anonymizeIP: true, -}; -``` diff --git a/website/docs/using-plugins.mdx b/website/docs/using-plugins.mdx index 44a1ff9c38ce..750beee11e3e 100644 --- a/website/docs/using-plugins.mdx +++ b/website/docs/using-plugins.mdx @@ -146,7 +146,6 @@ The classic preset is shipped by default to new Docusaurus websites created with - [`@docusaurus/plugin-debug`](./api/plugins/plugin-debug.mdx) - [`@docusaurus/plugin-google-gtag`](./api/plugins/plugin-google-gtag.mdx) - [`@docusaurus/plugin-google-tag-manager`](./api/plugins/plugin-google-tag-manager.mdx) -- [`@docusaurus/plugin-google-analytics`](./api/plugins/plugin-google-analytics.mdx) (**deprecated**) - [`@docusaurus/plugin-sitemap`](./api/plugins/plugin-sitemap.mdx) - [`@docusaurus/plugin-svgr`](./api/plugins/plugin-svgr.mdx) @@ -178,8 +177,6 @@ export default { gtag: {}, // Will be passed to @docusaurus/plugin-google-tag-manager (only enabled when explicitly specified) googleTagManager: {}, - // DEPRECATED: Will be passed to @docusaurus/plugin-google-analytics (only enabled when explicitly specified) - googleAnalytics: {}, }, ], ],