fix: strip streamed hydration code when disabled #125
Mergedtannerlinsleymerged 2 commits into
main fromtaren/strip-streamed-hydrationmerged by tannerlinsley - packages/redact/src/vite/index.ts line 450Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -434,8 +434,8 @@434434435435 // Peer imports must use the same feature selection as the registration436436 // entrypoint, or an enabled feature can bring a disabled one back in.437- const peer = id.match(/[\\/](context|hydration|fragment-refs|view-transition|class|suspense-runtime)(?:[\\/]index\.js)?$/)438- const peerKey = peer?.[1] === 'suspense-runtime' ? 'suspense' : peer?.[1] === 'fragment-refs' ? 'fragmentRefs' : peer?.[1] === 'view-transition' ? 'viewTransitions' : peer?.[1] === 'class' ? 'classComponents' : peer?.[1] as 'context' | 'hydration' | undefined437+ const peer = id.match(/[\\/](context|hydration|fragment-refs|view-transition|class|suspense-runtime|suspense-hydration)(?:[\\/]index\.js)?$/)438+ const peerKey = peer?.[1] === 'suspense-hydration' ? 'hydration' : peer?.[1] === 'suspense-runtime' ? 'suspense' : peer?.[1] === 'fragment-refs' ? 'fragmentRefs' : peer?.[1] === 'view-transition' ? 'viewTransitions' : peer?.[1] === 'class' ? 'classComponents' : peer?.[1] as 'context' | 'hydration' | undefined439439 if (importer && peer && peerKey && !features[peerKey]) {440440 const r = await this.resolve(id, importer, { ...opts, skipSelf: true })441- const resolvedFeature = r?.id.match(/features[\\/](context|hydration|fragment-refs|view-transition|class|suspense-runtime)[\\/]index\.(ts|js)$/)441+ const resolvedFeature = r?.id.match(/features[\\/](context|hydration|fragment-refs|view-transition|class|suspense-runtime|suspense-hydration)[\\/]index\.(ts|js)$/)scripts/compatibility-size-budget.mjs line 56Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -38,3 +41,16 @@3841 }3942 }404344+// Approved 2026-11-01 for the streamed-hydration split only. Pin both the45+// comparison base and all build/runtime inputs so another patch cannot reuse it.46+// The second base only adds the independent SSR change from #123; the affected47+// client inputs and approved row limits are identical.48+const hydrationSplitBases = {49+ "37c051c92cb2cda0f5b609aa29745c164e258d72": "4fae66ed73b8f06d4b912d2317cac2ec4c85c3de4c75f4318b7ec1990e3228c2",50+ "82da568053c186552325a12fdd48a1fb32e27dc1": "dc8c950b2a9961f6e84ee88c1d7e10473f741fe5e8c71703c08e82d2710b70f8"51+}52+const hydrationSplitInputs = [53+ "packages/redact/src",54+ "packages/redact/package.json",55+ "scripts/build.mjs",56+ "scripts/measure-size.mjs",
tannerlinsley merged thisf696c27
tannerlinsley closed this
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 8e01130fb304fed6214a415d69fd8a6c6e39e24e
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR