Skip to content

Commit b25f147

Browse files
committed
Merge branch 'canary' of https://github.com/vercel/next.js into koukou
2 parents 12062ac + 67bc262 commit b25f147

File tree

89 files changed

+1666
-915
lines changed

Some content is hidden

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

89 files changed

+1666
-915
lines changed

.github/workflows/build_test_deploy.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -347,35 +347,6 @@ jobs:
347347
- run: xvfb-run node run-tests.js test/integration/with-electron/test/index.test.js
348348
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
349349

350-
testYarnPnP:
351-
runs-on: ubuntu-latest
352-
needs: [build, build-native-dev]
353-
env:
354-
NODE_OPTIONS: '--unhandled-rejections=strict'
355-
YARN_COMPRESSION_LEVEL: '0'
356-
steps:
357-
- name: Setup node
358-
uses: actions/setup-node@v2
359-
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
360-
with:
361-
node-version: 14
362-
363-
- uses: actions/cache@v2
364-
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
365-
id: restore-build
366-
with:
367-
path: ./*
368-
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}
369-
370-
- uses: actions/download-artifact@v2
371-
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
372-
with:
373-
name: next-swc-dev-binary
374-
path: packages/next-swc/native
375-
376-
- run: bash ./scripts/test-pnp.sh
377-
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
378-
379350
testsPass:
380351
name: thank you, next
381352
runs-on: ubuntu-latest
@@ -387,7 +358,6 @@ jobs:
387358
checkPrecompiled,
388359
testIntegration,
389360
testUnit,
390-
testYarnPnP,
391361
testDev,
392362
testProd,
393363
]

contributing.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ examples](#adding-examples)** below.
66

77
## Developing
88

9-
The development branch is `canary`, and this is the branch that all pull
10-
requests should be made against. After publishing a stable release, the changes
11-
in the `canary` branch are rebased into `master`. The changes on the `canary`
12-
branch are published to the `@canary` dist-tag daily.
9+
The development branch is `canary`. This is the branch that all pull
10+
requests should be made against. The changes on the `canary`
11+
branch are published to the `@canary` tag on npm regularly.
1312

1413
To develop locally:
1514

docs/advanced-features/compiler.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,34 @@ const customJestConfig = {
9494
module.exports = createJestConfig(customJestConfig)
9595
```
9696

97+
### Remove React Properties
98+
99+
Allows to remove JSX properties. This is often used for testing. Similar to `babel-plugin-react-remove-properties`.
100+
101+
To remove properties matching the default regex `^data-test`:
102+
103+
```js
104+
// next.config.js
105+
module.exports = {
106+
experimental: {
107+
reactRemoveProperties: true,
108+
},
109+
}
110+
```
111+
112+
To remove custom properties:
113+
114+
```js
115+
// next.config.js
116+
module.exports = {
117+
experimental: {
118+
// The regexes defined here are processed in Rust so the syntax is different from
119+
// JavaScript `RegExp`s. See https://docs.rs/regex.
120+
reactRemoveProperties: { properties: ['^data-custom$'] },
121+
},
122+
}
123+
```
124+
97125
### Legacy Decorators
98126

99127
Next.js will automatically detect `experimentalDecorators` in `jsconfig.json` or `tsconfig.json` and apply that. This is commonly used with older versions of libraries like `mobx`.
@@ -110,6 +138,34 @@ First, update to the latest version of Next.js: `npm install next@latest`. Then,
110138
}
111139
```
112140

141+
### Remove Console
142+
143+
This transform allows for removing all `console.*` calls in application code (not `node_modules`). Similar to `babel-plugin-transform-remove-console`.
144+
145+
Remove all `console.*` calls:
146+
147+
```js
148+
// next.config.js
149+
module.exports = {
150+
experimental: {
151+
removeConsole: true,
152+
},
153+
}
154+
```
155+
156+
Remove `console.*` output except `console.error`:
157+
158+
```js
159+
// next.config.js
160+
module.exports = {
161+
experimental: {
162+
removeConsole: {
163+
exclude: ['error'],
164+
},
165+
},
166+
}
167+
```
168+
113169
### importSource
114170

115171
Next.js will automatically detect `jsxImportSource` in `jsconfig.json` or `tsconfig.json` and apply that. This is commonly used with libraries like Theme UI.

docs/advanced-features/security-headers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
return [
1919
{
2020
// Apply these headers to all routes in your application.
21-
source: '/(.*)',
21+
source: '/:path*',
2222
headers: securityHeaders,
2323
},
2424
]

docs/api-reference/next/script.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The loading strategy of the script.
4646

4747
A method that returns additional JavaScript that should be executed after the script has finished loading.
4848

49+
> **Note: `onLoad` can't be used with the `beforeInteractive` loading strategy.**
50+
4951
The following is an example of how to use the `onLoad` property:
5052

5153
```jsx

errors/export-image-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
#### Why This Error Occurred
44

5-
You are attempting to run `next export` while importing the `next/image` component configured using the default `loader`.
5+
You are attempting to run `next export` while importing the `next/image` component using the default `loader` configuration.
66

77
However, the default `loader` relies on the Image Optimization API which is not available for exported applications.
88

99
This is because Next.js optimizes images on-demand, as users request them (not at build time).
1010

1111
#### Possible Ways to Fix It
1212

13-
- Use `next start` to run a server, which includes the Image Optimization API.
14-
- Use any provider which supports Image Optimization (like [Vercel](https://vercel.com/docs/next.js/image-optimization)).
15-
- Configure a third-party [loader](https://nextjs.org/docs/basic-features/image-optimization#loader) in `next.config.js`.
16-
- Use the [`loader`](https://nextjs.org/docs/api-reference/next/image#loader) prop for `next/image`.
13+
- Use [`next start`](https://nextjs.org/docs/api-reference/cli#production) to run a server, which includes the Image Optimization API.
14+
- Use any provider which supports Image Optimization (such as [Vercel](https://vercel.com)).
15+
- [Configure the loader](https://nextjs.org/docs/api-reference/next/image#loader-configuration) in `next.config.js`.
16+
- Use the [`loader`](https://nextjs.org/docs/api-reference/next/image#loader) prop for each instance of `next/image`.
1717

1818
### Useful Links
1919

20-
- [Deployment Documentation](https://nextjs.org/docs/deployment#vercel-recommended)
20+
- [Deployment Documentation](https://nextjs.org/docs/deployment#managed-nextjs-with-vercel)
2121
- [Image Optimization Documentation](https://nextjs.org/docs/basic-features/image-optimization)
2222
- [`next export` Documentation](https://nextjs.org/docs/advanced-features/static-html-export)
2323
- [`next/image` Documentation](https://nextjs.org/docs/api-reference/next/image)
24-
- [Vercel Documentation](https://vercel.com/docs/next.js/image-optimization)
24+
- [Vercel Documentation](https://vercel.com/docs/concepts/next.js/image-optimization)

examples/blog-starter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"react": "^17.0.2",
1414
"react-dom": "^17.0.2",
1515
"remark": "13.0.0",
16-
"remark-html": "13.0.1"
16+
"remark-html": "13.0.2"
1717
},
1818
"devDependencies": {
1919
"autoprefixer": "^10.4.0",

examples/with-supabase-auth-realtime-db/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
},
88
"dependencies": {
99
"@supabase/supabase-js": "^1.2.1",
10-
"@supabase/ui": "^0.6.1",
10+
"@supabase/ui": "^0.36.2",
1111
"next": "latest",
1212
"react": "^17.0.2",
1313
"react-dom": "^17.0.2",
14-
"swr": "0.2.3"
14+
"swr": "1.1.2"
1515
}
1616
}

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
"registry": "https://registry.npmjs.org/"
1717
}
1818
},
19-
"version": "12.0.8"
19+
"version": "12.0.9-canary.0"
2020
}

packages/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-next-app",
3-
"version": "12.0.8",
3+
"version": "12.0.9-canary.0",
44
"keywords": [
55
"react",
66
"next",

0 commit comments

Comments
 (0)