Skip to content

Commit ff45167

Browse files
committed
Merge remote-tracking branch 'origin/main' into mk/dev-watch
2 parents 7bbf3ed + c2797e8 commit ff45167

File tree

689 files changed

+16910
-6844
lines changed

Some content is hidden

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

689 files changed

+16910
-6844
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = {
2929
'unicorn/filename-case': 0,
3030
'unicorn/no-array-push-push': 0,
3131
'unicorn/numeric-separators-style': 0,
32+
'max-lines': 0,
3233
},
3334
parserOptions: {
3435
sourceType: 'module',

.github/ISSUE_TEMPLATE/bug_report.yml

+9-2
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:
@@ -90,7 +97,7 @@ body:
9097
<details>
9198
<summary>`_redirects`</summary>
9299
93-
```toml
100+
```
94101
# Paste content of your `_redirects` file here
95102
```
96103
@@ -105,7 +112,7 @@ body:
105112
<details>
106113
<summary>`next.config.js`</summary>
107114
108-
```toml
115+
```js
109116
# Paste content of your `next.config.js` file here. Check there is no private info in there.
110117
```
111118

.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.4.1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run e2e (canary demo)
22
on:
33
pull_request:
4-
types: [opened, labeled, unlabeled, synchronize]
4+
types: [opened, synchronize]
55
push:
66
branches:
77
- main

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run e2e (Nx monorepo)
22
on:
33
pull_request:
4-
types: [opened, labeled, unlabeled, synchronize]
4+
types: [opened, synchronize]
55
push:
66
branches:
77
- main

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run e2e (static root)
22
on:
33
pull_request:
4-
types: [opened, labeled, unlabeled, synchronize]
4+
types: [opened, synchronize]
55
push:
66
branches:
77
- main

.github/workflows/cypress-demo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run e2e (default demo)
22
on:
33
pull_request:
4-
types: [opened, labeled, unlabeled, synchronize]
4+
types: [opened, synchronize]
55
push:
66
branches:
77
- main

.github/workflows/cypress-middleware.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run e2e (middleware demo)
22
on:
33
pull_request:
4-
types: [opened, labeled, unlabeled, synchronize]
4+
types: [opened, synchronize]
55
push:
66
branches:
77
- main

.github/workflows/e2e-appdir.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Next.js appdir test suite
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
setup:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
test-files: ${{ steps['set-test-files'].outputs['test-files'] }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
- run: npm install
17+
- id: set-test-files
18+
name: Get test files
19+
# Extracts the list of all test files as JSON and trims to be relative to the test dir to be easier to read
20+
run:
21+
echo "test-files=$(npx jest -c test/e2e/jest.config.appdir.js --listTests --json | jq -cM 'map(.[env.PWD |
22+
length + 10:])')" >> $GITHUB_OUTPUT
23+
# echo "test-files=$(npx jest -c test/e2e/jest.config.all.js --listTests --json | jq -cM 'map(.[env.PWD | length
24+
# + 10:])')" >> $GITHUB_OUTPUT
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
name: test (${{ matrix.test-file }})
29+
needs:
30+
- setup
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
# Creates a job for each chunk ID. This will be assigned one or more test files to run
35+
test-file: ${{ fromJson(needs.setup.outputs['test-files']) }}
36+
steps:
37+
- uses: actions/checkout@v3
38+
- run: npm install
39+
- name: Run tests
40+
run: npx jest --reporters=jest-junit --reporters=default -c test/e2e/jest.config.all.js ${{ matrix.test-file }}
41+
env:
42+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }}
43+
NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
44+
- uses: actions/upload-artifact@v3
45+
if: ${{ always() }}
46+
name: Upload test results
47+
with:
48+
name: test-results
49+
path: reports/jest-*.xml
50+
report:
51+
name: Report appDir e2e test results
52+
runs-on: ubuntu-latest
53+
if: ${{ always() }}
54+
needs:
55+
- test
56+
steps:
57+
- uses: actions/checkout@v3
58+
- uses: actions/download-artifact@v3
59+
with:
60+
path: reports
61+
- name: Combine reports
62+
# The test reporter can handle multiple files, but these have random filenames so the output is better when combined
63+
run: npx junit-report-merger test-results.xml reports/**/*.xml
64+
- uses: phoenix-actions/test-reporting@v10
65+
with:
66+
name: Jest Tests
67+
output-to: 'step-summary'
68+
path: 'test-results.xml'
69+
max-annotations: 49
70+
reporter: jest-junit

.github/workflows/e2e-next.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Next.js e2e test suite
22

33
on:
44
pull_request:
5+
types: [opened, synchronize]
56
push:
67
branches: [main]
78

@@ -41,17 +42,6 @@ jobs:
4142
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }}
4243
NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
4344
# RUN_SKIPPED_TESTS: true
44-
# - uses: phoenix-actions/test-reporting@v10
45-
# if: ${{ always() }}
46-
# name: Report Test Results
47-
# # Generates annotations for the test failures
48-
# id: test-report
49-
# with:
50-
# name: E2E Test chunk ${{ matrix.chunk }}
51-
# path: 'reports/**/*.xml' # Path to test results (inside artifact .zip)
52-
# output-to: 'checks'
53-
# max-annotations: 49 # Maximum number of annotations to be created
54-
# reporter: jest-junit # Format of test results
5545

5646
- uses: actions/upload-artifact@v3
5747
# upload test results
@@ -61,6 +51,7 @@ jobs:
6151
name: test-results
6252
path: reports/jest-*.xml
6353
report:
54+
name: Report Next.js e2e test results
6455
runs-on: ubuntu-latest
6556
if: ${{ always() }}
6657
needs:

.github/workflows/pre-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
tag_version=${branch:9}
2626
tag=${tag_version%/*}
2727
version=${tag_version##*/}
28-
echo "::set-output name=tag::${tag}"
29-
echo "::set-output name=version::${version}"
28+
echo "tag=${tag}" >> $GITHUB_OUTPUT
29+
echo "version=${version}" >> $GITHUB_OUTPUT
3030
- name: Log versions
3131
run: |-
3232
echo tag=${{ steps.extract.outputs.tag }}

.github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
release-please:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: navikt/github-app-token-generator@a9cd374e271b8aef573b8c16ac46c44fb89b02db
10+
- uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
1111
id: get-token
1212
with:
1313
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}

.github/workflows/test-deno.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deno tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Git Checkout Deno Module
15+
uses: actions/checkout@v2
16+
- name: Use Deno Version ${{ matrix.deno-version }}
17+
uses: denolib/setup-deno@v2
18+
with:
19+
deno-version: vx.x.x
20+
- name: Test Deno
21+
run: deno test packages/runtime/src/templates/edge-shared/

.github/workflows/test.yml

+2-27
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,19 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [ubuntu-latest, macOS-latest, windows-latest]
22-
node-version: [14, '*']
23-
exclude:
24-
- os: macOS-latest
25-
node-version: 14
26-
- os: windows-latest
27-
node-version: 14
2822
fail-fast: false
2923

3024
steps:
3125
- uses: actions/checkout@v2
3226
- name: Installing with LTS Node.js
3327
uses: actions/setup-node@v2
3428
with:
35-
node-version: 'lts/*'
29+
node-version: 16
3630
check-latest: true
3731
- name: NPM Install
3832
run: npm install
39-
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
40-
uses: actions/setup-node@v2
41-
if: "${{ matrix.node-version != 'lts/*' }}"
42-
with:
43-
node-version: ${{ matrix.node-version }}
44-
check-latest: true
4533
- name: Linting
4634
run: npm run format:ci
47-
if: "${{ matrix.node-version == 'lts/*' }}"
4835
- name: Run tests against next@latest
4936
run: npm test
5037
canary:
@@ -54,12 +41,6 @@ jobs:
5441
strategy:
5542
matrix:
5643
os: [ubuntu-latest, macOS-latest, windows-latest]
57-
node-version: [14, '*']
58-
exclude:
59-
- os: macOS-latest
60-
node-version: 14
61-
- os: windows-latest
62-
node-version: 14
6344
fail-fast: false
6445

6546
if: github.ref_name == 'main'
@@ -68,17 +49,11 @@ jobs:
6849
- name: Installing with LTS Node.js
6950
uses: actions/setup-node@v2
7051
with:
71-
node-version: 'lts/*'
52+
node-version: 16
7253
check-latest: true
7354
- name: NPM Install
7455
run: npm install
7556
- name: Install Next.js Canary
7657
run: npm install -D next@canary --legacy-peer-deps
77-
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
78-
uses: actions/setup-node@v2
79-
if: "${{ matrix.node-version != 'lts/*' }}"
80-
with:
81-
node-version: ${{ matrix.node-version }}
82-
check-latest: true
8358
- name: Run tests against next@canary
8459
run: npm test

.release-please-manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/runtime": "4.29.3",
3-
"packages/next": "1.4.2"
2+
"packages/runtime": "4.32.2",
3+
"packages/next": "1.4.4"
44
}

0 commit comments

Comments
 (0)