Skip to content

Commit

Permalink
Merge branch 'canary' into fix/cookies-type
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehsu committed Jan 26, 2021
2 parents 0df9a0a + 235b4cd commit 4cf9784
Show file tree
Hide file tree
Showing 44 changed files with 395 additions and 124 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
- 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 'docs-only')
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}}
- uses: actions/cache@v2
Expand Down Expand Up @@ -47,13 +47,13 @@ jobs:
NEXT_TELEMETRY_DISABLED: 1
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: ./check-pre-compiled.sh
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testUnit:
name: Test Unit
Expand All @@ -65,14 +65,14 @@ jobs:
HEADLESS: true
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}

- run: node run-tests.js --timings --type unit -g 1/1
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testIntegration:
name: Test Integration
Expand All @@ -89,18 +89,18 @@ jobs:
steps:
- run: echo ${{needs.build.outputs.docsChange}}
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testElectron:
name: Test Electron
Expand All @@ -113,21 +113,21 @@ jobs:
TEST_ELECTRON: 1
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: yarn add -W --dev spectron@7.0.0 electron@5.0.0
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: xvfb-run node run-tests.js test/integration/with-electron/test/index.test.js
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testYarnPnP:
runs-on: ubuntu-latest
Expand All @@ -137,14 +137,14 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'docs-only')
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- run: yarn install --frozen-lockfile --check-files
if: ${{steps.docs-change.outputs.DOCS_CHANGE != 'docs-only'}}
if: ${{steps.docs-change.outputs.DOCS_CHANGE != 'docs only change'}}

- run: bash ./test-pnp.sh
if: ${{steps.docs-change.outputs.DOCS_CHANGE != 'docs-only'}}
if: ${{steps.docs-change.outputs.DOCS_CHANGE != 'docs only change'}}

testsPass:
name: thank you, next
Expand All @@ -165,17 +165,17 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'docs-only')
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: yarn install --check-files
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

testLegacyReact:
name: React 16 + Webpack 4 (Basic, Production, Acceptance)
Expand All @@ -188,26 +188,26 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'docs-only')
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: cat package.json | jq '.resolutions.react = "^16.14.0"' > package.json.tmp && mv package.json.tmp package.json
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: cat package.json | jq '.resolutions."react-dom" = "^16.14.0"' > package.json.tmp && mv package.json.tmp package.json
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: yarn install --check-files
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: yarn list react react-dom
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

- run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx,worker-loader}/test/index.test.js test/acceptance/*.test.js
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}

testFirefox:
name: Test Firefox (production)
Expand All @@ -219,13 +219,13 @@ jobs:
NEXT_TELEMETRY_DISABLED: 1
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: node run-tests.js test/integration/production/test/index.test.js
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testSafari:
name: Test Safari (production)
Expand All @@ -240,13 +240,13 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js test/integration/production/test/index.test.js'
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testSafariOld:
name: Test Safari 10.1 (nav)
Expand All @@ -262,13 +262,13 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
steps:
- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js test/integration/production-nav/test/index.test.js'
if: ${{needs.build.outputs.docsChange != 'docs-only'}}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

publishRelease:
name: Potentially publish release
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cancel.yml
@@ -1,6 +1,10 @@
name: Cancel
on:
pull_request_target:
branches-ignore:
# don't run cancel job for branches named canary until
# it no longer cancels the main canary branches jobs
- canary
types:
- edited
- synchronize
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request_stats.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'docs-only')
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change
- uses: ./.github/actions/next-stats-action
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
13 changes: 9 additions & 4 deletions docs/advanced-features/measuring-performance.md
@@ -1,14 +1,19 @@
---
description: Measure and track page performance using Next.js's build-in performance relayer
description: Measure and track page performance using Next.js Analytics
---

# Measuring performance

Next.js has a built-in relayer that allows you to analyze and measure the performance of
[Next.js Analytics](https://nextjs.org/analytics) allows you to analyze and measure the performance of
pages using different metrics.

To measure any of the supported metrics, you will need to create a [custom
App](/docs/advanced-features/custom-app.md) component and define a `reportWebVitals` function:
You can start collecting your [Real Experience Score](https://vercel.com/docs/analytics#metrics) with zero-configuration on [Vercel deployments](https://vercel.com/docs/analytics). There's also support for Analytics if you're [self-hosting](https://vercel.com/docs/analytics#self-hosted).

The rest of this documentation describes the built-in relayer Next.js Analytics uses.

## Build Your Own

First, you will need to create a [custom App](/docs/advanced-features/custom-app.md) component and define a `reportWebVitals` function:

```js
// pages/_app.js
Expand Down
6 changes: 3 additions & 3 deletions examples/with-tailwindcss/package.json
Expand Up @@ -8,11 +8,11 @@
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"autoprefixer": "^10.0.4",
"next": "10.0.3",
"postcss": "^8.1.10",
"autoprefixer": "10.0.2",
"postcss": "8.1.7",
"tailwindcss": "^2.0.2"
}
}
4 changes: 2 additions & 2 deletions examples/with-yarn-workspaces/README.md
Expand Up @@ -31,6 +31,6 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
## Useful Links

- [Documentation](https://yarnpkg.com/en/docs/workspaces)
- [yarn workspaces](https://yarnpkg.com/lang/en/docs/cli/workspace)
- [yarn workspace](https://yarnpkg.com/lang/en/docs/cli/workspaces)
- [yarn workspace](https://yarnpkg.com/lang/en/docs/cli/workspace)
- [yarn workspaces](https://yarnpkg.com/lang/en/docs/cli/workspaces)
- [next-transpile-modules](https://www.npmjs.com/package/next-transpile-modules)
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -17,5 +17,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "10.0.6-canary.7"
"version": "10.0.6-canary.8"
}
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -137,8 +137,8 @@
"worker-loader": "3.0.7"
},
"resolutions": {
"browserslist": "^4.14.7",
"caniuse-lite": "^1.0.30001157"
"browserslist": "4.16.1",
"caniuse-lite": "1.0.30001179"
},
"engines": {
"node": ">= 10.13.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"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
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-google-analytics/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-google-analytics",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-google-analytics"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-sentry/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-sentry",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-sentry"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"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
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "10.0.6-canary.7",
"version": "10.0.6-canary.8",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down

0 comments on commit 4cf9784

Please sign in to comment.