diff --git a/package.json b/package.json index ac01a5fdb..48c2c44be 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "prettier-plugin-tailwindcss": "^0.6.12", "pretty-quick": "^4.0.0", "qwik-nx": "^3.2.0", + "rollup": "4.50.0", "sass": "^1.77.2", "shiki": "^3.4.2", "simple-git-hooks": "2.11.1", diff --git a/patches/rollup.patch b/patches/rollup.patch new file mode 100644 index 000000000..08edab7e3 --- /dev/null +++ b/patches/rollup.patch @@ -0,0 +1,33 @@ +diff --git a/dist/es/shared/node-entry.js b/dist/es/shared/node-entry.js +index 5700a270678df36456ae65dcad01a2be4a28189b..58ec105e925c9f7c9c41ebef3946fb175fabd61c 100644 +--- a/dist/es/shared/node-entry.js ++++ b/dist/es/shared/node-entry.js +@@ -19384,7 +19384,7 @@ function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) { + const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys()); + const manualChunkModulesByAlias = Object.create(null); + for (const [entry, alias] of manualChunkAliasByEntry) { +- addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks); ++ (manualChunkModulesByAlias[alias] ||= []).push(entry); + } + const manualChunks = Object.entries(manualChunkModulesByAlias); + const chunkDefinitions = new Array(manualChunks.length); +@@ -19394,18 +19394,7 @@ function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) { + } + return { chunkDefinitions, modulesInManualChunks }; + } +-function addStaticDependenciesToManualChunk(entry, manualChunkModules, modulesInManualChunks) { +- const modulesToHandle = new Set([entry]); +- for (const module of modulesToHandle) { +- modulesInManualChunks.add(module); +- manualChunkModules.push(module); +- for (const dependency of module.dependencies) { +- if (!(dependency instanceof ExternalModule || modulesInManualChunks.has(dependency))) { +- modulesToHandle.add(dependency); +- } +- } +- } +-} ++ + function analyzeModuleGraph(entries) { + const dynamicEntryModules = new Set(); + const awaitedDynamicEntryModules = new Set(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a3f6b8725..a9b726b01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + rollup: + hash: 571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36 + path: patches/rollup.patch + importers: .: @@ -16,7 +21,7 @@ importers: version: 1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) '@builder.io/qwik-city': specifier: 1.16.0 - version: 1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0)(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1) + version: 1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1) '@changesets/cli': specifier: ^2.29.4 version: 2.29.6(@types/node@22.15.29) @@ -43,7 +48,7 @@ importers: version: 3.5.0(@nx/devkit@21.1.2(nx@21.1.2(@swc-node/register@1.11.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(@swc/types@0.1.24)(typescript@5.7.3))(@swc/core@1.13.5(@swc/helpers@0.5.17))))(@nx/node@21.4.1(@babel/traverse@7.28.3)(@swc-node/register@1.11.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(@swc/types@0.1.24)(typescript@5.7.3))(@swc/core@1.13.5(@swc/helpers@0.5.17))(@types/node@22.15.29)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@8.57.1)(nx@21.1.2(@swc-node/register@1.11.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(@swc/types@0.1.24)(typescript@5.7.3))(@swc/core@1.13.5(@swc/helpers@0.5.17)))(ts-node@10.9.2(@swc/core@1.13.5(@swc/helpers@0.5.17))(@types/node@22.15.29)(typescript@5.7.3))(typescript@5.7.3)(verdaccio@6.1.2(typanion@3.14.0)))(esbuild@0.25.9)(wrangler@3.114.14) '@modular-forms/qwik': specifier: ^0.29.1 - version: 0.29.1(@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0)(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1))(@builder.io/qwik@1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)))(typescript@5.7.3) + version: 0.29.1(@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1))(@builder.io/qwik@1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)))(typescript@5.7.3) '@nx/devkit': specifier: 21.1.2 version: 21.1.2(nx@21.1.2(@swc-node/register@1.11.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(@swc/types@0.1.24)(typescript@5.7.3))(@swc/core@1.13.5(@swc/helpers@0.5.17))) @@ -212,6 +217,9 @@ importers: qwik-nx: specifier: ^3.2.0 version: 3.2.1(8c2cb93d5aa553274fed2efce5fe60ff) + rollup: + specifier: 4.50.0 + version: 4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) sass: specifier: ^1.77.2 version: 1.92.0 @@ -265,13 +273,13 @@ importers: version: 6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1) vite-plugin-dts: specifier: 4.5.4 - version: 4.5.4(@types/node@22.15.29)(rollup@4.50.0)(typescript@5.7.3)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) + version: 4.5.4(@types/node@22.15.29)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(typescript@5.7.3)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) vite-plugin-eslint: specifier: ^1.8.1 version: 1.8.1(eslint@8.57.1)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) vite-plugin-inspect: specifier: ^0.8.4 - version: 0.8.9(rollup@4.50.0)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) + version: 0.8.9(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) vite-plugin-static-copy: specifier: 1.0.4 version: 1.0.4(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) @@ -9889,7 +9897,7 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0)(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1)': + '@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1)': dependencies: '@mdx-js/mdx': 3.1.1 '@types/mdx': 2.0.13 @@ -9899,7 +9907,7 @@ snapshots: valibot: 1.1.0(typescript@5.7.3) vfile: 6.0.3 vite: 6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1) - vite-imagetools: 7.1.1(rollup@4.50.0) + vite-imagetools: 7.1.1(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36)) zod: 3.25.48 transitivePeerDependencies: - '@types/node' @@ -9920,7 +9928,7 @@ snapshots: '@builder.io/qwik@1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1))': dependencies: csstype: 3.1.3 - rollup: 4.50.0 + rollup: 4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) vite: 6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1) '@changesets/apply-release-plan@7.0.12': @@ -11193,10 +11201,10 @@ snapshots: '@microsoft/tsdoc@0.15.1': {} - '@modular-forms/qwik@0.29.1(@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0)(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1))(@builder.io/qwik@1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)))(typescript@5.7.3)': + '@modular-forms/qwik@0.29.1(@builder.io/qwik-city@1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1))(@builder.io/qwik@1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)))(typescript@5.7.3)': dependencies: '@builder.io/qwik': 1.16.0(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)) - '@builder.io/qwik-city': 1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0)(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1) + '@builder.io/qwik-city': 1.16.0(@types/node@22.15.29)(jiti@1.21.7)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(sass@1.92.0)(typescript@5.7.3)(yaml@2.8.1) decode-formdata: 0.8.0 valibot: 1.1.0(typescript@5.7.3) transitivePeerDependencies: @@ -11945,13 +11953,13 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.2.0(rollup@4.50.0)': + '@rollup/pluginutils@5.2.0(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: - rollup: 4.50.0 + rollup: 4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) '@rollup/rollup-android-arm-eabi@4.50.0': optional: true @@ -17969,11 +17977,11 @@ snapshots: dependencies: estree-walker: 0.6.1 - rollup@2.79.2: + rollup@2.79.2(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36): optionalDependencies: fsevents: 2.3.3 - rollup@4.50.0: + rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36): dependencies: '@types/estree': 1.0.8 optionalDependencies: @@ -19146,9 +19154,9 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-imagetools@7.1.1(rollup@4.50.0): + vite-imagetools@7.1.1(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36)): dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + '@rollup/pluginutils': 5.2.0(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36)) imagetools-core: 7.1.0 sharp: 0.34.3 transitivePeerDependencies: @@ -19172,10 +19180,10 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.5.4(@types/node@22.15.29)(rollup@4.50.0)(typescript@5.7.3)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)): + vite-plugin-dts@4.5.4(@types/node@22.15.29)(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(typescript@5.7.3)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)): dependencies: '@microsoft/api-extractor': 7.52.11(@types/node@22.15.29) - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + '@rollup/pluginutils': 5.2.0(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36)) '@volar/typescript': 2.4.23 '@vue/language-core': 2.2.0(typescript@5.7.3) compare-versions: 6.1.1 @@ -19196,13 +19204,13 @@ snapshots: '@rollup/pluginutils': 4.2.1 '@types/eslint': 8.56.12 eslint: 8.57.1 - rollup: 2.79.2 + rollup: 2.79.2(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) vite: 6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1) - vite-plugin-inspect@0.8.9(rollup@4.50.0)(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)): + vite-plugin-inspect@0.8.9(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36))(vite@6.3.5(@types/node@22.15.29)(jiti@1.21.7)(sass@1.92.0)(yaml@2.8.1)): dependencies: '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + '@rollup/pluginutils': 5.2.0(rollup@4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36)) debug: 4.4.1 error-stack-parser-es: 0.1.5 fs-extra: 11.3.1 @@ -19238,7 +19246,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.5.6 - rollup: 4.50.0 + rollup: 4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) optionalDependencies: '@types/node': 22.15.29 fsevents: 2.3.3 @@ -19250,7 +19258,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.50.0 + rollup: 4.50.0(patch_hash=571a1997f82431122fbd9d3cbbe4e9296a5578c2bbe7fabfec60a31f698e0b36) tinyglobby: 0.2.14 optionalDependencies: '@types/node': 22.15.29 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 855fab960..912b2b53e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -14,3 +14,6 @@ onlyBuiltDependencies: - tree-sitter-typescript - unrs-resolver - workerd + +patchedDependencies: + rollup: patches/rollup.patch