Skip to content

Commit 013602c

Browse files
Merge branch 'main' into marcl/update-docs-for-testing
2 parents b7dbd76 + 5b54b0b commit 013602c

File tree

226 files changed

+25652
-23302
lines changed

Some content is hidden

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

226 files changed

+25652
-23302
lines changed

.eslintignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
.next
22
node_modules
3-
test
43
lib
54
demos
65
packages/runtime/src/templates/edge
76
packages/runtime/src/templates/edge-shared
87
packages/runtime/lib
98
packages/runtime/dist-types
10-
jestSetup.js
9+
jestSetup.js
10+
test/e2e
11+
test/fixtures/broken_next_config/next.config.js
12+
test/integration/fixtures

.eslintrc.js

+32
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ module.exports = {
4848
'n/no-unsupported-features/es-syntax': 'off',
4949
'@typescript-eslint/no-extra-semi': 'off',
5050
'n/no-missing-import': 'off',
51+
// https://github.com/typescript-eslint/typescript-eslint/issues/2483
52+
'no-shadow': 'off',
53+
'@typescript-eslint/no-shadow': 'error',
5154
},
5255
},
5356
{
@@ -59,5 +62,34 @@ module.exports = {
5962
'promise/catch-or-return': 0,
6063
},
6164
},
65+
{
66+
files: ['test/**', 'packages/**/test/**'],
67+
plugins: ['jest'],
68+
extends: ['plugin:jest/recommended'],
69+
rules: {
70+
// Disable global rules
71+
'max-nested-callbacks': 'off',
72+
'@typescript-eslint/no-empty-function': 0,
73+
'max-lines-per-function': 0,
74+
'unicorn/no-empty-file': 0,
75+
'prefer-destructuring': 0,
76+
'@typescript-eslint/no-unused-vars': 0,
77+
'unicorn/no-await-expression-member': 0,
78+
'import/no-anonymous-default-export': 0,
79+
'no-shadow': 0,
80+
'@typescript-eslint/no-shadow': 0,
81+
'@typescript-eslint/no-var-requires': 0,
82+
'require-await': 0,
83+
'n/no-sync': 0,
84+
'promise/prefer-await-to-then': 0,
85+
'no-async-promise-executor': 0,
86+
'import/no-dynamic-require': 0,
87+
// esling-plugin-jest specific rules
88+
'jest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
89+
'jest/no-disabled-tests': 0,
90+
'jest/no-conditional-expect': 0,
91+
'jest/no-standalone-expect': [2, { additionalTestBlockFunctions: ['beforeAll'] }],
92+
},
93+
},
6294
],
6395
}

.github/ISSUE_TEMPLATE/bug_report.yml

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ body:
4949
validations:
5050
required: true
5151

52+
- type: checkboxes
53+
id: more-nextjs-info
54+
attributes:
55+
label: Is your issue related to the `app` directory (beta)?
56+
options:
57+
- label: Yes, I am using the `app` directory
58+
5259
- type: checkboxes
5360
id: more-info
5461
attributes:

.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Before opening a pull request, ensure you've read our contributing guildines, https://github.com/netlify/next-runtime/blob/main/CONTRIBUTING.md. -->
1+
<!-- Before opening a pull request, ensure you've read our contributing guidelines, https://github.com/netlify/next-runtime/blob/main/CONTRIBUTING.md. -->
22

33
### Summary
44

.github/workflows/add-to-project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
app_id: ${{ secrets.TOKENS_APP_ID }}
1515
private_key: ${{ secrets.TOKENS_PRIVATE_KEY }}
1616
- name: Add issue to Project
17-
uses: actions/add-to-project@v0.3.0
17+
uses: actions/add-to-project@v0.5.0
1818
with:
1919
project-url: https://github.com/orgs/netlify/projects/199
2020
github-token: ${{ steps.generate_token.outputs.token }}

.github/workflows/cypress-canary.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ on:
77
- main
88
paths:
99
- 'demos/canary/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/canary/**/*.{ts,js}'
10+
- 'cypress/e2e/canary/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
1414
name: Cypress
1515
runs-on: ubuntu-latest
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
containers: [1, 2, 3, 4]
2016
steps:
2117
- name: Checkout
22-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
2319

2420
- name: Generate Github token
2521
uses: navikt/github-app-token-generator@v1
@@ -29,7 +25,7 @@ jobs:
2925
app-id: ${{ secrets.TOKENS_APP_ID }}
3026

3127
- name: Checkout @netlify/wait-for-deploy-action
32-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
3329
with:
3430
repository: netlify/wait-for-deploy-action
3531
token: ${{ steps.get-token.outputs.token }}
@@ -47,7 +43,7 @@ jobs:
4743
run: echo ${{ steps.deploy.outputs.origin-url }}
4844

4945
- name: Node
50-
uses: actions/setup-node@v2
46+
uses: actions/setup-node@v3
5147
with:
5248
node-version: '16'
5349

@@ -56,15 +52,13 @@ jobs:
5652
- name: Cypress run
5753
if: ${{ steps.deploy.outputs.origin-url }}
5854
id: cypress
59-
uses: cypress-io/github-action@v2
55+
uses: cypress-io/github-action@v5
6056
with:
6157
browser: chrome
62-
headless: true
6358
record: true
64-
parallel: true
65-
config-file: cypress/config/canary.json
59+
config-file: cypress/config/canary.config.ts
6660
group: 'Next Runtime - Demo Canary'
67-
spec: cypress/integration/canary/*
61+
spec: cypress/e2e/canary/*
6862
env:
6963
DEBUG: '@cypress/github-action'
7064
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo-nx.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ on:
77
- main
88
paths:
99
- 'demos/nx-next-monorepo-demo/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/nx/**/*.{ts,js}'
10+
- 'cypress/e2e/nx/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
1414
name: Cypress
1515
runs-on: ubuntu-latest
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
containers: [1, 2, 3, 4]
2016
steps:
2117
- name: Checkout
22-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
2319

2420
- name: Generate Github token
2521
uses: navikt/github-app-token-generator@v1
@@ -29,7 +25,7 @@ jobs:
2925
app-id: ${{ secrets.TOKENS_APP_ID }}
3026

3127
- name: Checkout @netlify/wait-for-deploy-action
32-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
3329
with:
3430
repository: netlify/wait-for-deploy-action
3531
token: ${{ steps.get-token.outputs.token }}
@@ -47,7 +43,7 @@ jobs:
4743
run: echo ${{ steps.deploy.outputs.origin-url }}
4844

4945
- name: Node
50-
uses: actions/setup-node@v2
46+
uses: actions/setup-node@v3
5147
with:
5248
node-version: '16'
5349

@@ -56,15 +52,13 @@ jobs:
5652
- name: Cypress run
5753
if: ${{ steps.deploy.outputs.origin-url }}
5854
id: cypress
59-
uses: cypress-io/github-action@v2
55+
uses: cypress-io/github-action@v5
6056
with:
6157
browser: chrome
62-
headless: true
6358
record: true
64-
parallel: true
65-
config-file: cypress/config/nx-demo.json
59+
config-file: cypress/config/nx-demo.config.ts
6660
group: 'Next Runtime - Demo NX'
67-
spec: cypress/integration/nx/*
61+
spec: cypress/e2e/nx/*
6862
env:
6963
DEBUG: '@cypress/github-action'
7064
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo-static.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/static-root/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/static/**/*.{ts,js}'
10+
- 'cypress/e2e/static/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
containers: [1, 2, 3, 4]
19+
containers: [1, 2]
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323

2424
- name: Generate Github token
2525
uses: navikt/github-app-token-generator@v1
@@ -29,7 +29,7 @@ jobs:
2929
app-id: ${{ secrets.TOKENS_APP_ID }}
3030

3131
- name: Checkout @netlify/wait-for-deploy-action
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3333
with:
3434
repository: netlify/wait-for-deploy-action
3535
token: ${{ steps.get-token.outputs.token }}
@@ -47,7 +47,7 @@ jobs:
4747
run: echo ${{ steps.deploy.outputs.origin-url }}
4848

4949
- name: Node
50-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v3
5151
with:
5252
node-version: '16'
5353

@@ -56,15 +56,14 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
62-
headless: true
6362
record: true
6463
parallel: true
65-
config-file: cypress/config/static-root.json
64+
config-file: cypress/config/static-root.config.ts
6665
group: 'Next Runtime - Demo Static'
67-
spec: cypress/integration/static-root/*
66+
spec: cypress/e2e/static-root/*
6867
env:
6968
DEBUG: '@cypress/github-action'
7069
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/default/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/default/**/*.{ts,js}'
10+
- 'cypress/e2e/default/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -19,7 +19,7 @@ jobs:
1919
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323

2424
- name: Generate Github token
2525
uses: navikt/github-app-token-generator@v1
@@ -29,7 +29,7 @@ jobs:
2929
app-id: ${{ secrets.TOKENS_APP_ID }}
3030

3131
- name: Checkout @netlify/wait-for-deploy-action
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3333
with:
3434
repository: netlify/wait-for-deploy-action
3535
token: ${{ steps.get-token.outputs.token }}
@@ -47,7 +47,7 @@ jobs:
4747
run: echo ${{ steps.deploy.outputs.origin-url }}
4848

4949
- name: Node
50-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v3
5151
with:
5252
node-version: '16'
5353

@@ -56,15 +56,14 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
62-
headless: true
6362
record: true
6463
parallel: true
65-
config-file: cypress/config/ci.json
64+
config-file: cypress/config/ci.config.ts
6665
group: 'Next Runtime - Demo'
67-
spec: cypress/integration/default/*
66+
spec: cypress/e2e/default/*
6867
env:
6968
DEBUG: '@cypress/github-action'
7069
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-middleware.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/middleware/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/middleware/**/*.{ts,js}'
10+
- 'cypress/e2e/middleware/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
containers: [1, 2, 3, 4]
19+
containers: [1, 2]
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323

2424
- name: Generate Github token
2525
uses: navikt/github-app-token-generator@v1
@@ -29,7 +29,7 @@ jobs:
2929
app-id: ${{ secrets.TOKENS_APP_ID }}
3030

3131
- name: Checkout @netlify/wait-for-deploy-action
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3333
with:
3434
repository: netlify/wait-for-deploy-action
3535
token: ${{ steps.get-token.outputs.token }}
@@ -47,7 +47,7 @@ jobs:
4747
run: echo ${{ steps.deploy.outputs.origin-url }}
4848

4949
- name: Node
50-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v3
5151
with:
5252
node-version: '16'
5353

@@ -56,15 +56,14 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
62-
headless: true
6362
record: true
6463
parallel: true
65-
config-file: cypress/config/middleware.json
64+
config-file: cypress/config/middleware.config.ts
6665
group: 'Next Runtime - Middleware'
67-
spec: cypress/integration/middleware/*
66+
spec: cypress/e2e/middleware/*
6867
env:
6968
DEBUG: '@cypress/github-action'
7069
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

0 commit comments

Comments
 (0)