Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opennextjs/opennextjs-netlify
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.9.4
Choose a base ref
...
head repository: opennextjs/opennextjs-netlify
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.10.0
Choose a head ref
  • 15 commits
  • 53 files changed
  • 4 contributors

Commits on Jan 23, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5a2d6fa View commit details

Commits on Jan 29, 2025

  1. ci: increase number of shards when running Next.js repo e2e tests (#2748

    )
    
    * ci: increase number of shards when running Next.js repo e2e tests
    
    * test: set NEXT_PRIVATE_TEST_MODE when running Next.js repo tests
    
    * test: re-enable running tests against canary for upcoming changes visibility
    pieh authored Jan 29, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8e852ca View commit details

Commits on Jan 30, 2025

  1. test: use branch/alias deploys for e2e test suite to enable automatic…

    … deploy cleanup (#2752)
    
    * test: use branch/alias deploys for e2e test suite to allow automatic cleanup
    
    * chore: deletion is now automated by the system
    
    * chore: use constant for deploy alias
    
    * test: fix deploy url regex
    
    * test: use deploy preview for test url
    
    * chore: leverage regex named capture groups for deploy id and site name
    
    * test: use branch/alias deploys for vercel tests
    
    * chore: remove unused import
    
    * test: remove trailing slashes from deploy urls
    
    * chore: format with prettier
    
    * test: skip og image integration test in windows
    
    ---------
    
    Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
    mrstork and pieh authored Jan 30, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4bcb34f View commit details

Commits on Feb 12, 2025

  1. test: fix test setup (#2749)

    * test: fail prepare fixtures script if fixtures fail to install deps or build a fixture
    
    * test: intentionally break deps installation / fixture build to test prepare script changes
    
    * Revert "test: intentionally break deps installation / fixture build to test prepare script changes"
    
    This reverts commit 0d9c1f4.
    
    * ci: upgrade corepack
    
    * test: don't prepare e2e-only fixtures ahead of time
    pieh authored Feb 12, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f13a454 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9b4a13d View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc111b4 View commit details
  4. chore(deps): update dependency esbuild to ^0.25.0 [security] (#2758)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 12, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a3e083e View commit details
  5. chore(deps): update dependency vitest to v1.6.1 [security] (#2755)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 12, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f4b59b6 View commit details

Commits on Feb 21, 2025

  1. fix: set immutable cache-control for _next/static (#2767)

    * test: assert that _next/static have immutable cache control
    
    * fix: set immutable cache-control for _next/static
    pieh authored Feb 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5bd68dd View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    28217d4 View commit details

Commits on Feb 25, 2025

  1. fix: narrow down middleware i18n locale matcher to concrete locales (#…

    …2768)
    
    * test: add test cases to i18n middleware with exclusions
    
    * fix: narrow down middleware i18n locale matcher to concrete locales
    pieh authored Feb 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f3e24b1 View commit details

Commits on Mar 3, 2025

  1. feat: make CDN SWR background revalidation discard stale cache conten…

    …t in order to produce fresh responses (#2765)
    
    * feat: make CDN SWR background revalidation discard stale cache content in order to produce fresh responses
    
    * test: add e2e case testing storing fresh responses in cdn when handling background SWR requests
    
    * fix: apply code review comments/suggestions
    pieh authored Mar 3, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f8004d7 View commit details

Commits on Mar 6, 2025

  1. fix: apply caching headers to pages router 404 with getStaticProps (#…

    …2764)
    
    * fix: apply caching headers to pages router 404 with getStaticProps
    
    * chore: don't store revalidate on request context for app router pages to limit potentially unwanted impact of the change
    
    * chore: don't apply new 404 caching header code path, if existing method would have set cacheable header
    
    * test: add notFound cases for 404 with getStaticProps without revalidate
    
    * test: add fixture for 404 with getStaticProps with revalidate
    
    * tmp: outline 404 integration test cases for page router
    
    * test: update 404 caching tests
    
    * fix: relax the conditions for caching 404s
    
    * test: remove only
    
    * feat: hide 404 caching behind env var
    
    * test: remove only and console logs
    
    * test: update static 404 test
    
    * feat: reduce 404 caching scope to just the 404 page itself
    
    * test: remove only modifier
    
    * test: fix tests for new custom 404 pate
    
    ---------
    
    Co-authored-by: Rob Stanford <me@robstanford.com>
    pieh and orinokai authored Mar 6, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3301077 View commit details

Commits on Mar 7, 2025

  1. fix: dynamic not-prerendered routes revalidate tracking (#2771)

    * fix: dynamic not-prerendered routes revalidate tracking
    
    * fix: correct typeof check
    
    * test: adjust cache-status assertions for stale responses serverd by durable
    
    * test: ensure we don't prerender API responses for og image in test fixture
    pieh authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b242927 View commit details

Commits on Mar 9, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    23b1f37 View commit details
Showing with 1,406 additions and 475 deletions.
  1. +2 −1 .github/workflows/e2e-report.yml
  2. +14 −2 .github/workflows/run-tests.yml
  3. +7 −7 .github/workflows/test-e2e.yml
  4. +1 −1 .release-please-manifest.json
  5. +16 −0 CHANGELOG.md
  6. +290 −265 package-lock.json
  7. +2 −2 package.json
  8. +4 −0 src/build/content/prerendered.ts
  9. +14 −0 src/build/content/static.ts
  10. +12 −2 src/build/functions/edge.ts
  11. +0 −1 src/build/plugin-context.test.ts
  12. +2 −1 src/build/templates/handler-monorepo.tmpl.js
  13. +2 −1 src/build/templates/handler.tmpl.js
  14. +3 −1 src/index.ts
  15. +110 −33 src/run/handlers/cache.cts
  16. +19 −5 src/run/handlers/request-context.cts
  17. +28 −7 src/run/handlers/server.ts
  18. +36 −26 src/run/headers.ts
  19. +26 −2 src/shared/cache-types.cts
  20. +147 −0 tests/e2e/edge-middleware.test.ts
  21. +0 −1 tests/e2e/export.test.ts
  22. +62 −5 tests/e2e/page-router.test.ts
  23. +36 −0 tests/fixtures/middleware-i18n-excluded-paths/middleware.ts
  24. +5 −0 tests/fixtures/middleware-i18n-excluded-paths/next-env.d.ts
  25. +10 −0 tests/fixtures/middleware-i18n-excluded-paths/next.config.js
  26. +20 −0 tests/fixtures/middleware-i18n-excluded-paths/package.json
  27. +21 −0 tests/fixtures/middleware-i18n-excluded-paths/pages/[[...catchall]].tsx
  28. +11 −0 tests/fixtures/middleware-i18n-excluded-paths/pages/api/[[...catchall]].ts
  29. +19 −0 tests/fixtures/middleware-i18n-excluded-paths/tsconfig.json
  30. +10 −0 tests/fixtures/page-router-404-get-static-props-with-revalidate/next.config.js
  31. +15 −0 tests/fixtures/page-router-404-get-static-props-with-revalidate/package.json
  32. +17 −0 tests/fixtures/page-router-404-get-static-props-with-revalidate/pages/404.js
  33. +40 −0 tests/fixtures/page-router-404-get-static-props-with-revalidate/pages/products/[slug].js
  34. +12 −0 tests/fixtures/page-router-base-path-i18n/pages/products/[slug].js
  35. +41 −0 tests/fixtures/page-router/netlify/functions/purge-cdn.ts
  36. +3 −0 tests/fixtures/page-router/pages/404.js
  37. +0 −25 tests/fixtures/page-router/pages/api/purge-cdn.js
  38. +7 −0 tests/fixtures/page-router/pages/products/[slug].js
  39. +35 −0 tests/fixtures/page-router/pages/revalidate-60/[slug].js
  40. +2 −0 tests/fixtures/wasm-src/src/app/og-node/route.js
  41. +2 −0 tests/fixtures/wasm-src/src/app/og/route.js
  42. +2 −0 tests/fixtures/wasm/app/og-node/route.js
  43. +2 −0 tests/fixtures/wasm/app/og/route.js
  44. +187 −3 tests/integration/page-router.test.ts
  45. +1 −1 tests/integration/static.test.ts
  46. +0 −46 tests/integration/turborepo.test.ts
  47. +11 −5 tests/integration/wasm.test.ts
  48. +17 −11 tests/netlify-deploy.ts
  49. +50 −1 tests/prepare.mjs
  50. +16 −6 tests/utils/create-e2e-fixture.ts
  51. +1 −2 tests/utils/fixture.ts
  52. +16 −0 tests/utils/playwright-helpers.ts
  53. +0 −12 tools/e2e/cleanup-deploys.ts
3 changes: 2 additions & 1 deletion .github/workflows/e2e-report.yml
Original file line number Diff line number Diff line change
@@ -57,4 +57,5 @@ jobs:
- name: Deploy e2e page
if: success()
run: |
npx netlify deploy --build --cwd e2e-report
npx netlify deploy --build --cwd .
working-directory: e2e-report
16 changes: 14 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -60,7 +60,9 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- uses: oven-sh/setup-bun@v1
- name: setup pnpm/yarn
run: corepack enable
run: |
npm install -g corepack
corepack enable
shell: bash
- name: Install Deno
uses: denoland/setup-deno@v1
@@ -127,8 +129,18 @@ jobs:
node-version: '18.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Prefer npm global on windows
if: runner.os == 'Windows'
# On Windows by default PATH prefers corepack bundled with Node.js
# This prepends npm global to PATH to ensure that npm installed global corepack is used instead
run: |
echo "$(npm config get prefix)" >> "$GITHUB_PATH"
shell: bash
- name: setup pnpm/yarn
run: corepack enable
run: |
# global corepack installation requires --force on Windows, otherwise EEXIST errors occur
npm install -g corepack --force
corepack enable
shell: bash
- name: Install Deno
uses: denoland/setup-deno@v1
14 changes: 7 additions & 7 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -56,16 +56,16 @@ jobs:
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION_SELECTORS=[${{ github.event.inputs.versions }}]
echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT
echo "total=4" >> $GITHUB_OUTPUT
echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT
echo "total=6" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "pull_request" ]; then
VERSION_SELECTORS=[\"latest\"]
echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT
echo "total=4" >> $GITHUB_OUTPUT
echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT
echo "total=6" >> $GITHUB_OUTPUT
else
VERSION_SELECTORS=[\"latest\",\"canary\",\"14.2.15\",\"13.5.1\"]
echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT
echo "total=4" >> $GITHUB_OUTPUT
VERSION_SELECTORS=[\"latest\",\"canary\"]
echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT
echo "total=6" >> $GITHUB_OUTPUT
fi
VERSION_SPEC="["
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.9.4"
".": "5.10.0"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [5.10.0](https://github.com/opennextjs/opennextjs-netlify/compare/v5.9.4...v5.10.0) (2025-03-07)


### Features

* make CDN SWR background revalidation discard stale cache content in order to produce fresh responses ([#2765](https://github.com/opennextjs/opennextjs-netlify/issues/2765)) ([f8004d7](https://github.com/opennextjs/opennextjs-netlify/commit/f8004d76ba7bb669ffc17c744a0df8e132473979))


### Bug Fixes

* apply caching headers to pages router 404 with getStaticProps ([#2764](https://github.com/opennextjs/opennextjs-netlify/issues/2764)) ([3301077](https://github.com/opennextjs/opennextjs-netlify/commit/3301077e8dd902241f79bb983ea7b73509e8d982))
* don't cache POST when serving embedded static html ([#2766](https://github.com/opennextjs/opennextjs-netlify/issues/2766)) ([28217d4](https://github.com/opennextjs/opennextjs-netlify/commit/28217d47b3fd7b3ec639f860fb03fd9137ab5128))
* dynamic not-prerendered routes revalidate tracking for next@&gt;=v15.2.1-canary.4 ([b242927](https://github.com/opennextjs/opennextjs-netlify/commit/b242927cdc3a1f0df227889b333f3be7e921c73b))
* narrow down middleware i18n locale matcher to concrete locales ([#2768](https://github.com/opennextjs/opennextjs-netlify/issues/2768)) ([f3e24b1](https://github.com/opennextjs/opennextjs-netlify/commit/f3e24b1d2e4674574eef4c628d58b2d2a41e0be9))
* set immutable cache-control for _next/static ([#2767](https://github.com/opennextjs/opennextjs-netlify/issues/2767)) ([5bd68dd](https://github.com/opennextjs/opennextjs-netlify/commit/5bd68ddb13109cb838056bbfcc8eca1113b69099))

## [5.9.4](https://github.com/opennextjs/opennextjs-netlify/compare/v5.9.3...v5.9.4) (2025-01-22)


Loading