Skip to content

Commit

Permalink
Merge branch 'canary' into stable-tsconfig-json
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 27, 2021
2 parents 5187423 + ff926d5 commit 77de9ef
Show file tree
Hide file tree
Showing 27 changed files with 73 additions and 75 deletions.
62 changes: 28 additions & 34 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,13 @@ jobs:
- name: Check examples
run: ./scripts/check-examples.sh

checkIsRelease:
runs-on: ubuntu-latest
outputs:
isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 25
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- id: check-release
run: |
if [[ $(git describe --exact-match 2> /dev/null || :) = v* ]];
then
echo "::set-output name=IS_RELEASE::true"
else
echo "::set-output name=IS_RELEASE::false"
fi
build:
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: 1
outputs:
docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }}
isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -49,12 +32,24 @@ jobs:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: yarn install --frozen-lockfile --check-files
- run: node run-tests.js --timings --write-timings -g 1/1
- name: Check docs only change
run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change
- run: echo ${{steps.docs-change.outputs.DOCS_CHANGE}}
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: git describe
- id: check-release
run: |
if [[ $(git describe --exact-match 2> /dev/null || :) = v* ]];
then
echo "::set-output name=IS_RELEASE::true"
else
echo "::set-output name=IS_RELEASE::false"
fi
- uses: actions/cache@v2
id: cache-build
with:
Expand Down Expand Up @@ -410,11 +405,10 @@ jobs:
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

publishRelease:
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: Potentially publish release
runs-on: ubuntu-latest
needs:
- checkIsRelease
- build
- build-native
- build-windows-i686
Expand Down Expand Up @@ -587,8 +581,8 @@ jobs:
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

build-windows-i686:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - windows-i686 - node@14
runs-on: windows-latest
env:
Expand Down Expand Up @@ -646,8 +640,8 @@ jobs:
path: packages/next/native/next-swc.win32-ia32-msvc.node

build-windows-aarch64:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - windows-aarch64 - node@14
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -693,8 +687,8 @@ jobs:
path: packages/next/native/next-swc.win32-arm64-msvc.node

build-linux-musl:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - linux-musl - node@lts
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -747,8 +741,8 @@ jobs:
path: packages/next/native/next-swc.linux-x64-musl.node

build-linux-aarch64:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - aarch64-unknown-linux-gnu - node@14
runs-on: ubuntu-18.04
steps:
Expand Down Expand Up @@ -809,8 +803,8 @@ jobs:
path: packages/next/native/next-swc.linux-arm64-gnu.node

build-linux-aarch64-musl:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - aarch64-unknown-linux-musl - node@14
runs-on: ubuntu-18.04
steps:
Expand Down Expand Up @@ -869,8 +863,8 @@ jobs:
path: packages/next/native/next-swc.linux-arm64-musl.node

build-linux-arm7:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - arm7-unknown-linux-gnu - node@14
runs-on: ubuntu-18.04
steps:
Expand Down Expand Up @@ -931,8 +925,8 @@ jobs:
path: packages/next/native/next-swc.linux-arm-gnueabihf.node

build-android-aarch64:
needs: checkIsRelease
if: ${{ needs.checkIsRelease.outputs.isRelease == 'true' }}
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - Android - aarch64
runs-on: macos-latest
steps:
Expand Down
10 changes: 1 addition & 9 deletions docs/basic-features/image-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,7 @@ Loaders can be defined per-image, or at the application level.

You should add the `priority` property to the image that will be the [Largest Contentful Paint (LCP) element](https://web.dev/lcp/#what-elements-are-considered) for each page. Doing so allows Next.js to specially prioritize the image for loading (e.g. through preload tags or priority hints), leading to a meaningful boost in LCP.

The LCP element is typically the largest image or text block visible within the viewport of the page. You can verify which element this is by running the following code in the console of your page and looking at the latest result:

```javascript
new PerformanceObserver((entryList) => {
for (const entry of entryList.getEntries()) {
console.log('LCP candidate:', entry.startTime, entry.element)
}
}).observe({ type: 'largest-contentful-paint', buffered: true })
```
The LCP element is typically the largest image or text block visible within the viewport of the page. When you run `next dev`, you'll see a console warning if the LCP element is an `<Image>` without the `priority` property.

Once you've identified the LCP image, you can add the property like this:

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "12.0.1-canary.3"
"version": "12.0.1"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "12.0.1-canary.3",
"@next/eslint-plugin-next": "12.0.1",
"@rushstack/eslint-patch": "^1.0.6",
"@typescript-eslint/parser": "^4.20.0",
"eslint-import-resolver-node": "^0.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "12.0.1-canary.3",
"version": "12.0.1",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down

0 comments on commit 77de9ef

Please sign in to comment.