this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: `response.validate` with the turbo pages runtime (#1017)

authored by

Victor Berchet and committed by
GitHub
a6904a4a 2200b4b7

+17 -20
+5
.changeset/orange-pets-poke.md
··· 1 + --- 2 + "@opennextjs/cloudflare": patch 3 + --- 4 + 5 + fix: `response.validate` with the turbo pages runtime
-1
examples/e2e/pages-router/next.config.ts
··· 9 9 cleanDistDir: true, 10 10 reactStrictMode: true, 11 11 output: "standalone", 12 - // outputFileTracingRoot: "../sst", 13 12 typescript: { 14 13 ignoreBuildErrors: true, 15 14 },
+12 -19
packages/cloudflare/src/cli/build/patches/plugins/res-revalidate.ts
··· 14 14 kind: if_statement 15 15 stopBy: end 16 16 has: 17 - kind: parenthesized_expression 18 - has: { kind: property_identifier , stopBy: end, regex: trustHostHeader} 17 + field: condition 18 + stopBy: end 19 + pattern: $$$_.trustHostHeader 19 20 has: 20 21 kind: call_expression 21 22 all: 22 - - has: {kind: identifier, pattern: fetch} 23 + - has: { kind: identifier, pattern: fetch} 23 24 - has: 24 25 kind: arguments 25 26 all: ··· 29 30 - has: 30 31 kind: pair 31 32 all: 32 - - has: {kind: property_identifier, regex: method } 33 - - has: {kind: string, regex: 'HEAD'} 33 + - has: { kind: property_identifier, regex: method } 34 + - has: { kind: string, regex: 'HEAD'} 34 35 - has: 35 36 kind: pair 36 37 all: 37 - - has: {kind: property_identifier, regex: headers} 38 - - has: {kind: identifier, pattern: $HEADERS} 38 + - has: { kind: property_identifier, regex: headers} 39 + - has: { kind: identifier, pattern: $HEADERS} 39 40 - has: 40 41 kind: template_string 41 42 all: 42 - - has: 43 - kind: string_fragment 44 - regex: https:// 43 + - has: { kind: string_fragment, regex: ^https://$ } 45 44 - has: 46 45 kind: template_substitution 47 46 all: 48 47 - has: { kind: identifier, stopBy: end, pattern: $REQ } 49 - - has: 50 - kind: property_identifier 51 - regex: headers 52 - stopBy: end 53 - - has: 54 - kind: property_identifier 55 - regex: host 56 - stopBy: end 48 + - has: { kind: property_identifier, regex: ^headers$, stopBy: end } 49 + - has: { kind: property_identifier, regex: ^host$, stopBy: end } 57 50 - has: 58 51 kind: template_substitution 59 52 pattern: $URL_PATH ··· 69 62 { 70 63 versions: ">=14.2.0", 71 64 pathFilter: getCrossPlatformPathRegex( 72 - String.raw`(pages-api\.runtime\.prod\.js|node/api-resolver\.js)$`, 65 + String.raw`(pages-api(?:-turbo)?\.runtime\.prod\.js|node/api-resolver\.js)$`, 73 66 { 74 67 escape: false, 75 68 }