Skip to content

Commit dc3743a

Browse files
authored
Merge branch 'main' into template-updates
2 parents 0c4908b + 8a67a6c commit dc3743a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11041
-6172
lines changed

.github/workflows/e2e-appdir.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
push:
77
branches: [main]
88

9+
env:
10+
NEXT_SPLIT_API_ROUTES: true
11+
912
jobs:
1013
setup:
1114
runs-on: ubuntu-latest

.github/workflows/e2e-next.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
schedule:
99
- cron: '0 0 * * *'
1010

11+
env:
12+
NEXT_SPLIT_API_ROUTES: true
13+
1114
jobs:
1215
setup:
1316
runs-on: ubuntu-latest

.github/workflows/test-integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1010
cancel-in-progress: true
1111

12+
env:
13+
NEXT_SPLIT_API_ROUTES: true
14+
1215
jobs:
1316
build:
1417
name: Integration tests

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1212
cancel-in-progress: true
1313

14+
env:
15+
NEXT_SPLIT_API_ROUTES: true
16+
1417
jobs:
1518
build:
1619
name: Unit tests

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,6 @@ packages/*/lib
152152
cypress/screenshots
153153

154154
# Test cases have node module fixtures
155-
!test/**/node_modules
155+
!test/**/node_modules
156+
157+
/tmp

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/runtime": "4.36.0",
3-
"packages/next": "1.4.5"
2+
"packages/runtime": "4.36.1",
3+
"packages/next": "1.4.6"
44
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ The Next.js Runtime fully supports ISR on Netlify. For more details see
8989

9090
Note that Netlify has a minimum TTL of 60 seconds for revalidation.
9191

92+
## Disable Static 404 on Dynamic Routes with fallback:false
93+
94+
Currently when hitting a non-prerendered path with `fallback=false` it will default to a 404 page. You can now change this default setting by using the environemnt variable `LEGACY_FALLBACK_FALSE=true`. With the environment variable set, those non-prerendered paths will now be routed through using the ISR Handler and will allow you to add redirects for those non-prerendered paths.
95+
9296
## Use with `next export`
9397

9498
If you are using `next export` to generate a static site, you do not need most of the functionality of this Next.js

cypress/e2e/default/revalidate.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('On-demand revalidation', () => {
3333
cy.request({ url: '/api/revalidate/?select=5', failOnStatusCode: false }).then((res) => {
3434
expect(res.status).to.eq(500)
3535
expect(res.body).to.have.property('message')
36-
expect(res.body.message).to.include('Invalid response 404')
36+
expect(res.body.message).to.include('could not refresh content for path /getStaticProps/withRevalidate/3/, path is not handled by an odb')
3737
})
3838
})
3939
it('revalidates dynamic non-prerendered ISR route with fallback blocking', () => {

demos/default/netlify.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
1010
# set TERM variable for terminal output
1111
TERM = "xterm"
1212
NODE_VERSION = "16.15.1"
13+
NEXT_SPLIT_API_ROUTES = "true"
1314

1415
[[headers]]
1516
for = "/_next/image/*"

demos/default/next.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ module.exports = {
6767
destination: '/',
6868
permanent: true,
6969
},
70+
{
71+
source: '/getStaticProps/4/',
72+
destination: '/',
73+
permanent: true,
74+
},
7075
]
7176
},
7277
// https://nextjs.org/docs/basic-features/image-optimization#domains

demos/middleware/netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ command = "npm run build"
33
publish = ".next"
44
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
55

6+
[build.environment]
7+
NEXT_SPLIT_API_ROUTES = "true"
8+
69
[[plugins]]
710
package = "@netlify/plugin-nextjs"
811

demos/nx-next-monorepo-demo/netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ command = "npm run build"
33
publish = "dist/apps/demo-monorepo/.next"
44
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
55

6+
[build.environment]
7+
NEXT_SPLIT_API_ROUTES = "true"
8+
69
[dev]
710
command = "npm run start"
811
targetPort = 4200

0 commit comments

Comments
 (0)