Skip to content

Commit c5a9f6a

Browse files
authored
Merge branch 'main' into ci/dont-install-fixture-deps-if-next-version-is-not-satisfied
2 parents aa91ca0 + 85cb5d5 commit c5a9f6a

File tree

3 files changed

+51
-54
lines changed

3 files changed

+51
-54
lines changed

package-lock.json

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@
5454
"devDependencies": {
5555
"@fastly/http-compute-js": "1.1.5",
5656
"@netlify/blobs": "^8.2.0",
57-
"@netlify/build": "^35.1.5",
57+
"@netlify/build": "^35.1.6",
5858
"@netlify/config": "^24.0.3",
5959
"@netlify/edge-bundler": "^14.5.4",
6060
"@netlify/edge-functions-bootstrap": "^2.14.0",
6161
"@netlify/edge-functions": "^2.17.1",
6262
"@netlify/eslint-config-node": "^7.0.1",
6363
"@netlify/functions": "^4.2.5",
64-
"@netlify/serverless-functions-api": "^2.4.0",
65-
"@netlify/zip-it-and-ship-it": "^14.1.6",
64+
"@netlify/serverless-functions-api": "^2.5.0",
65+
"@netlify/zip-it-and-ship-it": "^14.1.7",
6666
"@opentelemetry/api": "^1.8.0",
6767
"@playwright/test": "^1.43.1",
6868
"@types/node": "^20.12.7",

tests/e2e/page-router.test.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,17 +1392,10 @@ test.describe('Page Router with basePath and i18n', () => {
13921392

13931393
expect(await page.textContent('p')).toBe('Custom 404 page for locale: en')
13941394

1395-
// https://github.com/vercel/next.js/pull/69802 made changes to returned cache-control header,
1396-
// after that 404 pages would have `private` directive, before that it would not
1397-
const shouldHavePrivateDirective = nextVersionSatisfies('^14.2.10 || >=15.0.0-canary.147')
1398-
expect(headers['debug-netlify-cdn-cache-control']).toBe(
1399-
(shouldHavePrivateDirective ? 'private, ' : '') +
1400-
'no-cache, no-store, max-age=0, must-revalidate, durable',
1401-
)
1402-
expect(headers['cache-control']).toBe(
1403-
(shouldHavePrivateDirective ? 'private,' : '') +
1404-
'no-cache,no-store,max-age=0,must-revalidate',
1395+
expect(headers['debug-netlify-cdn-cache-control']).toMatch(
1396+
/no-cache, no-store, max-age=0, must-revalidate, durable/m,
14051397
)
1398+
expect(headers['cache-control']).toMatch(/no-cache,no-store,max-age=0,must-revalidate/m)
14061399
})
14071400

14081401
test('requesting a non existing page route that needs to be fetched from the blob store like 404.html (notFound: true)', async ({
@@ -1417,12 +1410,16 @@ test.describe('Page Router with basePath and i18n', () => {
14171410

14181411
expect(await page.textContent('p')).toBe('Custom 404 page for locale: en')
14191412

1420-
expect(headers['debug-netlify-cdn-cache-control']).toBe(
1421-
nextVersionSatisfies('>=15.0.0-canary.187')
1422-
? 's-maxage=31536000, durable'
1423-
: 's-maxage=31536000, stale-while-revalidate=31536000, durable',
1424-
)
1425-
expect(headers['cache-control']).toBe('public,max-age=0,must-revalidate')
1413+
// Prior to v14.2.4 notFound pages are not cacheable
1414+
// https://github.com/vercel/next.js/pull/66674
1415+
if (nextVersionSatisfies('>= 14.2.4')) {
1416+
expect(headers['debug-netlify-cdn-cache-control']).toBe(
1417+
nextVersionSatisfies('>=15.0.0-canary.187')
1418+
? 's-maxage=31536000, durable'
1419+
: 's-maxage=31536000, stale-while-revalidate=31536000, durable',
1420+
)
1421+
expect(headers['cache-control']).toBe('public,max-age=0,must-revalidate')
1422+
}
14261423
})
14271424

14281425
test.describe('static assets and function invocations', () => {

0 commit comments

Comments
 (0)