From 9909b85c3fe3ca908bb2a68178cbba91975e80b4 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 19:30:37 +0200 Subject: [PATCH 1/6] test zero-width dogfood --- .../tests/ascii/dir with zero-width spaces/index.mdx | 3 +++ .../index.mdx" | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx create mode 100644 "website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" diff --git a/website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx b/website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx new file mode 100644 index 000000000000..9a5c7aefface --- /dev/null +++ b/website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx @@ -0,0 +1,3 @@ +This dir does NOT have zero-width `\u200b` chars + +See https://github.com/facebook/docusaurus/issues/12005 diff --git "a/website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" "b/website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" new file mode 100644 index 000000000000..e4fbedee1d61 --- /dev/null +++ "b/website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" @@ -0,0 +1,3 @@ +This dir has zero-width `\u200b` chars + +See https://github.com/facebook/docusaurus/issues/12005 From 8ad31b47b0e21bf05a84964fb9d8e5995e8defe7 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 19:40:17 +0200 Subject: [PATCH 2/6] add file from repro --- .../vulnerability-report\342\200\213\342\200\213/index.mdx" | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 "packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" diff --git "a/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" "b/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" new file mode 100644 index 000000000000..a950d7f9b64a --- /dev/null +++ "b/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" @@ -0,0 +1,3 @@ +# foo + +bar From 66b885031261224698ddb7c05ae1ea10539f6b94 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 19:49:14 +0200 Subject: [PATCH 3/6] fix cross-compiler cache bug for the repro --- packages/docusaurus-mdx-loader/src/loader.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/docusaurus-mdx-loader/src/loader.ts b/packages/docusaurus-mdx-loader/src/loader.ts index 3aa7fc35ba54..96dc63550e55 100644 --- a/packages/docusaurus-mdx-loader/src/loader.ts +++ b/packages/docusaurus-mdx-loader/src/loader.ts @@ -147,6 +147,15 @@ async function loadMDXWithCaching({ options, compilerName, }); + } else if (crossCompilerCache) { + // TODO only useful for the repro + // There's definitively a cross-compiler cache bug + return loadMDX({ + fileContent, + filePath, + options, + compilerName, + }); } // Note we "resource" as cache key, not "filePath" nor "fileContent" From 0091cb560558c37f15bc1273798d1586562a477f Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 19:52:53 +0200 Subject: [PATCH 4/6] fix cross-compiler cache bug for the repro --- packages/docusaurus-mdx-loader/src/loader.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/docusaurus-mdx-loader/src/loader.ts b/packages/docusaurus-mdx-loader/src/loader.ts index 96dc63550e55..a57c0df70fe3 100644 --- a/packages/docusaurus-mdx-loader/src/loader.ts +++ b/packages/docusaurus-mdx-loader/src/loader.ts @@ -140,16 +140,8 @@ async function loadMDXWithCaching({ compilerName: WebpackCompilerName; }): Promise { const {crossCompilerCache} = options; - if (!crossCompilerCache) { - return loadMDX({ - fileContent, - filePath, - options, - compilerName, - }); - } else if (crossCompilerCache) { - // TODO only useful for the repro - // There's definitively a cross-compiler cache bug + // For the repro only + if (!crossCompilerCache || !process.env.DOES_NOT_EXIST) { return loadMDX({ fileContent, filePath, From 89411fce8d81722c6f03cf9ad35f37ee4dba436d Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 20:07:06 +0200 Subject: [PATCH 5/6] make our own website fail --- .../vulnerability-report\342\200\213\342\200\213/index.mdx" | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 "website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" diff --git "a/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" "b/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" new file mode 100644 index 000000000000..a950d7f9b64a --- /dev/null +++ "b/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" @@ -0,0 +1,3 @@ +# foo + +bar From 40d7dc08b21c16476c3009ebe860326b1dd531be Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 21 May 2026 20:14:31 +0200 Subject: [PATCH 6/6] cleanup repro --- .../vulnerability-report\342\200\213\342\200\213/index.mdx" | 3 --- packages/docusaurus-mdx-loader/src/loader.ts | 3 +-- .../tests/zero-width-spaces/end\342\200\213/index.mdx" | 2 -- .../tests/zero-width-spaces/mi\342\200\213ddle/index.mdx" | 2 -- .../tests/zero-width-spaces/\342\200\213start/index.mdx" | 1 + .../vulnerability-report\342\200\213\342\200\213/index.mdx" | 3 --- 6 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 "packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" rename "website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" => "website/_dogfooding/_docs tests/tests/zero-width-spaces/end\342\200\213/index.mdx" (58%) rename website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx => "website/_dogfooding/_docs tests/tests/zero-width-spaces/mi\342\200\213ddle/index.mdx" (52%) create mode 100644 "website/_dogfooding/_docs tests/tests/zero-width-spaces/\342\200\213start/index.mdx" delete mode 100644 "website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" diff --git "a/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" "b/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" deleted file mode 100644 index a950d7f9b64a..000000000000 --- "a/packages/create-docusaurus/templates/shared/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" +++ /dev/null @@ -1,3 +0,0 @@ -# foo - -bar diff --git a/packages/docusaurus-mdx-loader/src/loader.ts b/packages/docusaurus-mdx-loader/src/loader.ts index a57c0df70fe3..3aa7fc35ba54 100644 --- a/packages/docusaurus-mdx-loader/src/loader.ts +++ b/packages/docusaurus-mdx-loader/src/loader.ts @@ -140,8 +140,7 @@ async function loadMDXWithCaching({ compilerName: WebpackCompilerName; }): Promise { const {crossCompilerCache} = options; - // For the repro only - if (!crossCompilerCache || !process.env.DOES_NOT_EXIST) { + if (!crossCompilerCache) { return loadMDX({ fileContent, filePath, diff --git "a/website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/end\342\200\213/index.mdx" similarity index 58% rename from "website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" rename to "website/_dogfooding/_docs tests/tests/zero-width-spaces/end\342\200\213/index.mdx" index e4fbedee1d61..388d30736382 100644 --- "a/website/_dogfooding/_docs tests/tests/ascii/dir \342\200\213with \342\200\213zero-width spaces\342\200\213/index.mdx" +++ "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/end\342\200\213/index.mdx" @@ -1,3 +1 @@ -This dir has zero-width `\u200b` chars - See https://github.com/facebook/docusaurus/issues/12005 diff --git a/website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/mi\342\200\213ddle/index.mdx" similarity index 52% rename from website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx rename to "website/_dogfooding/_docs tests/tests/zero-width-spaces/mi\342\200\213ddle/index.mdx" index 9a5c7aefface..388d30736382 100644 --- a/website/_dogfooding/_docs tests/tests/ascii/dir with zero-width spaces/index.mdx +++ "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/mi\342\200\213ddle/index.mdx" @@ -1,3 +1 @@ -This dir does NOT have zero-width `\u200b` chars - See https://github.com/facebook/docusaurus/issues/12005 diff --git "a/website/_dogfooding/_docs tests/tests/zero-width-spaces/\342\200\213start/index.mdx" "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/\342\200\213start/index.mdx" new file mode 100644 index 000000000000..388d30736382 --- /dev/null +++ "b/website/_dogfooding/_docs tests/tests/zero-width-spaces/\342\200\213start/index.mdx" @@ -0,0 +1 @@ +See https://github.com/facebook/docusaurus/issues/12005 diff --git "a/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" "b/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" deleted file mode 100644 index a950d7f9b64a..000000000000 --- "a/website/docs/contribute/vulnerability-report\342\200\213\342\200\213/index.mdx" +++ /dev/null @@ -1,3 +0,0 @@ -# foo - -bar