From df33908a996d97cc53b649b545bc3a157d0d0221 Mon Sep 17 00:00:00 2001 From: Manny Becerra Date: Sun, 9 Jan 2022 11:34:00 -0800 Subject: [PATCH 1/4] copy cleanup in env. variables docs --- docs/basic-features/environment-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basic-features/environment-variables.md b/docs/basic-features/environment-variables.md index 246c82e081df8a4..4b04b27ec0ded39 100644 --- a/docs/basic-features/environment-variables.md +++ b/docs/basic-features/environment-variables.md @@ -128,11 +128,11 @@ When using the Vercel CLI to deploy make sure you add a [`.vercelignore`](https: ## Test Environment Variables -Apart from `development` and `production` environments, there is a 3rd option available: `test`. In the same way you can set defaults for development or production environments, you can do the same with `.env.test` file for testing environment (though this one is not so common as the previous two). +Apart from `development` and `production` environments, there is a 3rd option available: `test`. In the same way you can set defaults for development or production environments, you can do the same with a `.env.test` file for the `testing` environment (though this one is not as common as the previous two). This one is useful when running tests with tools like `jest` or `cypress` where you need to set specific environment vars only for testing purposes. Test default values will be loaded if `NODE_ENV` is set to `test`, though you usually don't need to do this manually as testing tools will address it for you. -There is a small difference between `test` environment, and both `development` and `production` that you need to bear in mind: `.env.local` won't be loaded, as you expect tests to produce the same results for everyone. This way every test execution will use same env defaults across different executions by ignoring your `.env.local` (which is intended to override the default set). +There is a small difference between `test` environment, and both `development` and `production` that you need to bear in mind: `.env.local` won't be loaded, as you expect tests to produce the same results for everyone. This way every test execution will use the same env defaults across different executions by ignoring your `.env.local` (which is intended to override the default set). > **Note**: similar to Default Environment Variables, `.env.test` file should be included in your repository, but `.env.test.local` shouldn't, as `.env*.local` are intended to be ignored through `.gitignore`. From ae8e7205b550da1c01c361ea76a4737b1722950d Mon Sep 17 00:00:00 2001 From: Manny Becerra Date: Sun, 9 Jan 2022 11:34:17 -0800 Subject: [PATCH 2/4] copy cleanup in fast refresh docs --- docs/basic-features/fast-refresh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basic-features/fast-refresh.md b/docs/basic-features/fast-refresh.md index 3b5678ba7e60b07..e12dd9749b26418 100644 --- a/docs/basic-features/fast-refresh.md +++ b/docs/basic-features/fast-refresh.md @@ -74,9 +74,9 @@ local state being reset on every edit to a file: and Hooks preserve state). - The file you're editing might have _other_ exports in addition to a React component. -- Sometimes, a file would export the result of calling higher-order component +- Sometimes, a file would export the result of calling a higher-order component like `HOC(WrappedComponent)`. If the returned component is a - class, state will be reset. + class, its state will be reset. - Anonymous arrow functions like `export default () =>
;` cause Fast Refresh to not preserve local component state. For large codebases you can use our [`name-default-component` codemod](/docs/advanced-features/codemods.md#name-default-component). As more of your codebase moves to function components and Hooks, you can expect From 58d3b16b40750ce2e5db6f9351052ad1d9453b39 Mon Sep 17 00:00:00 2001 From: Manny Becerra Date: Tue, 11 Jan 2022 12:20:43 -0800 Subject: [PATCH 3/4] Supplements #33153 - updating existing cross-references to `master` branch to renamed default branch of `main` --- docs/api-reference/create-next-app.md | 2 +- examples/analyze-bundles/README.md | 2 +- examples/gh-pages/README.md | 2 +- examples/progressive-web-app/pages/index.js | 2 +- examples/with-apollo-and-redux/README.md | 2 +- examples/with-cypress/pages/index.js | 2 +- examples/with-docker/pages/index.js | 2 +- examples/with-elasticsearch/pages/index.js | 2 +- .../__tests__/__snapshots__/snapshot.tsx.snap | 8 ++++---- examples/with-jest-babel/pages/index.tsx | 2 +- .../with-jest/__tests__/__snapshots__/snapshot.tsx.snap | 8 ++++---- examples/with-jest/pages/index.tsx | 2 +- examples/with-knex/pages/index.js | 2 +- examples/with-mdbreact/pages/index.js | 2 +- examples/with-mongodb/pages/index.js | 2 +- examples/with-playwright/pages/index.js | 2 +- examples/with-rbx-bulma-pro/pages/index.js | 2 +- examples/with-react-bootstrap/pages/index.jsx | 2 +- examples/with-react-with-styles/README.md | 2 +- examples/with-reactstrap/pages/index.jsx | 2 +- examples/with-redux-persist/README.md | 2 +- examples/with-redux-saga/README.md | 2 +- examples/with-rematch/README.md | 2 +- examples/with-sitemap/pages/index.js | 2 +- examples/with-styled-jsx-postcss/README.md | 2 +- examples/with-supertokens/pages/index.js | 2 +- examples/with-tailwindcss/pages/index.tsx | 2 +- examples/with-typestyle/README.md | 2 +- packages/create-next-app/README.md | 2 +- packages/create-next-app/templates/default/pages/index.js | 2 +- .../create-next-app/templates/typescript/pages/index.tsx | 2 +- test/development/basic/tailwind-jit/pages/index.js | 2 +- 32 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/api-reference/create-next-app.md b/docs/api-reference/create-next-app.md index 3a00e008ac08622..6ab63250afab2e8 100644 --- a/docs/api-reference/create-next-app.md +++ b/docs/api-reference/create-next-app.md @@ -25,7 +25,7 @@ yarn create next-app --typescript `create-next-app` comes with the following options: - **--ts, --typescript** - Initialize as a TypeScript project. -- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. +- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/main/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend running `yarn create next-app` diff --git a/examples/analyze-bundles/README.md b/examples/analyze-bundles/README.md index 8aec1e56c79c435..9a299029873369f 100644 --- a/examples/analyze-bundles/README.md +++ b/examples/analyze-bundles/README.md @@ -1,6 +1,6 @@ # Analyzer Bundles example -This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/master/packages/next-bundle-analyzer) +This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/main/packages/next-bundle-analyzer) ## Preview diff --git a/examples/gh-pages/README.md b/examples/gh-pages/README.md index e9a37206c2bcb92..fbd34532847cfaa 100644 --- a/examples/gh-pages/README.md +++ b/examples/gh-pages/README.md @@ -20,7 +20,7 @@ Edit `next.config.js` and replace `'Next-gh-page-example'` by your project name. 1. Create repository. 2. Link it to your github account. -3. Publish your master branch. +3. Publish your default branch, e.g. `main`. ```bash npm run deploy diff --git a/examples/progressive-web-app/pages/index.js b/examples/progressive-web-app/pages/index.js index dea04e8ac7ec382..14c70bf731a51ed 100644 --- a/examples/progressive-web-app/pages/index.js +++ b/examples/progressive-web-app/pages/index.js @@ -25,7 +25,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-apollo-and-redux/README.md b/examples/with-apollo-and-redux/README.md index 765de3d3d0dd274..59a50953cfd23f6 100644 --- a/examples/with-apollo-and-redux/README.md +++ b/examples/with-apollo-and-redux/README.md @@ -2,7 +2,7 @@ This example serves as a conduit if you were using Apollo 1.X with Redux, and are migrating to Apollo 3.x, however, you have chosen not to manage your entire application state within Apollo (`apollo-link-state`). -In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/master/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/master/examples/with-redux) examples. +In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/main/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/main/examples/with-redux) examples. To inspect the GraphQL API, use its [web IDE](https://nextjs-graphql-with-prisma-simple-foo.vercel.app/api). diff --git a/examples/with-cypress/pages/index.js b/examples/with-cypress/pages/index.js index 7af20bc61f52635..38644b21980cda4 100644 --- a/examples/with-cypress/pages/index.js +++ b/examples/with-cypress/pages/index.js @@ -41,7 +41,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-docker/pages/index.js b/examples/with-docker/pages/index.js index 16d683b56c08406..8bda1eaa2dd71ff 100644 --- a/examples/with-docker/pages/index.js +++ b/examples/with-docker/pages/index.js @@ -31,7 +31,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-elasticsearch/pages/index.js b/examples/with-elasticsearch/pages/index.js index 2a4a49573b13bea..4aa09e37b380ec5 100644 --- a/examples/with-elasticsearch/pages/index.js +++ b/examples/with-elasticsearch/pages/index.js @@ -43,7 +43,7 @@ export default function Home({ isConnected }) {

Examples →

diff --git a/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap b/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap index c5e6e3478c575be..7a4aa43e206de55 100644 --- a/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap +++ b/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap @@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `

- Welcome to + Welcome to @@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `

- Get started by editing + Get started by editing pages/index.js @@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `

Examples → @@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` target="_blank" > Powered by - +

Examples →

diff --git a/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap b/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap index c5e6e3478c575be..7a4aa43e206de55 100644 --- a/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap +++ b/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap @@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `

- Welcome to + Welcome to @@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `

- Get started by editing + Get started by editing pages/index.js @@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `

Examples → @@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` target="_blank" > Powered by - +

Examples →

diff --git a/examples/with-knex/pages/index.js b/examples/with-knex/pages/index.js index a1378001c887b8e..501a82fae405a67 100644 --- a/examples/with-knex/pages/index.js +++ b/examples/with-knex/pages/index.js @@ -51,7 +51,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-mdbreact/pages/index.js b/examples/with-mdbreact/pages/index.js index 2e579d4f1fb67ee..f80db749c15f048 100644 --- a/examples/with-mdbreact/pages/index.js +++ b/examples/with-mdbreact/pages/index.js @@ -75,7 +75,7 @@ export default function Home() { color="primary" size="sm" className="text-capitalize" - href="https://github.com/vercel/next.js/tree/master/examples" + href="https://github.com/vercel/next.js/tree/main/examples" > More → diff --git a/examples/with-mongodb/pages/index.js b/examples/with-mongodb/pages/index.js index a57dfe93bfb970d..e7b546c8bf820a1 100644 --- a/examples/with-mongodb/pages/index.js +++ b/examples/with-mongodb/pages/index.js @@ -39,7 +39,7 @@ export default function Home({ isConnected }) {

Examples →

diff --git a/examples/with-playwright/pages/index.js b/examples/with-playwright/pages/index.js index 25a4a79171782b8..0d90e029ec65990 100644 --- a/examples/with-playwright/pages/index.js +++ b/examples/with-playwright/pages/index.js @@ -41,7 +41,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-rbx-bulma-pro/pages/index.js b/examples/with-rbx-bulma-pro/pages/index.js index f44638bb9498575..d6d5bdc3f85e9e9 100644 --- a/examples/with-rbx-bulma-pro/pages/index.js +++ b/examples/with-rbx-bulma-pro/pages/index.js @@ -20,7 +20,7 @@ const Home = () => ( - +
Examples →

diff --git a/examples/with-react-bootstrap/pages/index.jsx b/examples/with-react-bootstrap/pages/index.jsx index d6cfa992d061403..083a0a1c4b2e891 100644 --- a/examples/with-react-bootstrap/pages/index.jsx +++ b/examples/with-react-bootstrap/pages/index.jsx @@ -49,7 +49,7 @@ export default function Home() { diff --git a/examples/with-react-with-styles/README.md b/examples/with-react-with-styles/README.md index 92af40b7ac1eaab..101496a222c9d29 100644 --- a/examples/with-react-with-styles/README.md +++ b/examples/with-react-with-styles/README.md @@ -6,7 +6,7 @@ In this case we are using [react-with-styles](https://github.com/airbnb/react-wi For this purpose we are extending the `` and injecting the server side rendered styles into the ``. -We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/master/examples/with-aphrodite). +We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/main/examples/with-aphrodite). ## Preview diff --git a/examples/with-reactstrap/pages/index.jsx b/examples/with-reactstrap/pages/index.jsx index 511632185ffa52a..6c7cbbd417b993b 100644 --- a/examples/with-reactstrap/pages/index.jsx +++ b/examples/with-reactstrap/pages/index.jsx @@ -63,7 +63,7 @@ export default function Home() { diff --git a/examples/with-redux-persist/README.md b/examples/with-redux-persist/README.md index 80caf652424b708..9afac1289b3d2ea 100644 --- a/examples/with-redux-persist/README.md +++ b/examples/with-redux-persist/README.md @@ -30,7 +30,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut ## Notes -In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) to know more about its implementation. +In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/main/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/main/examples/with-redux) to know more about its implementation. The Redux Persist has been initialized in `store.js`. You can modify the `redux-persist` configuration (In this example, we are persisting only one state termed `exampleData` which is added in the `persist configuration`) if you need something more with `redux-persist` by following their [docs](https://github.com/rt2zz/redux-persist/blob/master/README.md). To wrap out our component in the `Persist Gate` which rehydrates the global state with combining the persisted values and global state values, we'll have to make some modifications in the implementation of Redux in `pages/_app.js`. diff --git a/examples/with-redux-saga/README.md b/examples/with-redux-saga/README.md index 3450a62b3c83532..2cc7e0f6fdcbea4 100644 --- a/examples/with-redux-saga/README.md +++ b/examples/with-redux-saga/README.md @@ -2,7 +2,7 @@ Usually splitting your app state into `pages` feels natural, but sometimes you'll want to have global state for your app. This is an example using `redux` and `redux-saga` that works with universal rendering. This is just one way it can be done. If you have any suggestions or feedback please submit an issue or PR. -> This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) example. +> This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/main/examples/with-redux) example. ## Preview diff --git a/examples/with-rematch/README.md b/examples/with-rematch/README.md index e037ef1ea89487c..2d23e5c80191f39 100644 --- a/examples/with-rematch/README.md +++ b/examples/with-rematch/README.md @@ -2,7 +2,7 @@ This example has two pages. The first page has a counter which can be incremented synchronously or asynchronously. The second page is a page which shows a list of github users. It fetches data from the github api using this [endpoint](api.github.com/users). -Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/master/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same. +Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/main/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same. ## Preview diff --git a/examples/with-sitemap/pages/index.js b/examples/with-sitemap/pages/index.js index 9567794ecd851ac..7e2f367bfd72edb 100644 --- a/examples/with-sitemap/pages/index.js +++ b/examples/with-sitemap/pages/index.js @@ -29,7 +29,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-styled-jsx-postcss/README.md b/examples/with-styled-jsx-postcss/README.md index 5ef4bfd8b34eb74..abf50c47c154aca 100644 --- a/examples/with-styled-jsx-postcss/README.md +++ b/examples/with-styled-jsx-postcss/README.md @@ -1 +1 @@ -This examples was moved to [https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins) +This examples was moved to [https://github.com/vercel/next.js/tree/main/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/main/examples/with-styled-jsx-plugins) diff --git a/examples/with-supertokens/pages/index.js b/examples/with-supertokens/pages/index.js index 0629fa410da25bb..604e9da3c05aac5 100644 --- a/examples/with-supertokens/pages/index.js +++ b/examples/with-supertokens/pages/index.js @@ -141,7 +141,7 @@ function ProtectedPage({ userId }) {

Examples →

diff --git a/examples/with-tailwindcss/pages/index.tsx b/examples/with-tailwindcss/pages/index.tsx index 828dd6012730d42..7767711c4deb18f 100644 --- a/examples/with-tailwindcss/pages/index.tsx +++ b/examples/with-tailwindcss/pages/index.tsx @@ -45,7 +45,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-typestyle/README.md b/examples/with-typestyle/README.md index 0491bedc5ee0ff6..00db40df7468f7f 100644 --- a/examples/with-typestyle/README.md +++ b/examples/with-typestyle/README.md @@ -2,7 +2,7 @@ This example features how you use a different styling solution than [styled-jsx](https://github.com/vercel/styled-jsx) that also supports universal styles. That means we can serve the required styles for the first render within the HTML and then load the rest in the client. In this case we are using [typestyle](https://github.com/typestyle/typestyle). -For this purpose we are extending the `` and injecting the server side rendered styles into the ``. Refer to [with-typescript](https://github.com/vercel/next.js/tree/master/examples/with-typescript) to use this with typescript. +For this purpose we are extending the `` and injecting the server side rendered styles into the ``. Refer to [with-typescript](https://github.com/vercel/next.js/tree/main/examples/with-typescript) to use this with typescript. ## Preview diff --git a/packages/create-next-app/README.md b/packages/create-next-app/README.md index 8cf5e7f8c8c3eb7..62640e174f4488e 100644 --- a/packages/create-next-app/README.md +++ b/packages/create-next-app/README.md @@ -23,7 +23,7 @@ npx create-next-app blog-app `create-next-app` comes with the following options: - **--ts, --typescript** - Initialize as a TypeScript project. -- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. +- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/main/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **--example-path <path-to-example>** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app` diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 08145bba9a5780a..eff2b189df31ae0 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -33,7 +33,7 @@ export default function Home() {

Examples →

diff --git a/packages/create-next-app/templates/typescript/pages/index.tsx b/packages/create-next-app/templates/typescript/pages/index.tsx index 72a4a59053d70f6..0d8f002b4306130 100644 --- a/packages/create-next-app/templates/typescript/pages/index.tsx +++ b/packages/create-next-app/templates/typescript/pages/index.tsx @@ -34,7 +34,7 @@ const Home: NextPage = () => {

Examples →

diff --git a/test/development/basic/tailwind-jit/pages/index.js b/test/development/basic/tailwind-jit/pages/index.js index a3db6063016262d..bb9d6fc914b553d 100644 --- a/test/development/basic/tailwind-jit/pages/index.js +++ b/test/development/basic/tailwind-jit/pages/index.js @@ -38,7 +38,7 @@ export default function Home() {

Examples →

From 635d2e8f965f66393b26abd640b5aa35ffb34b20 Mon Sep 17 00:00:00 2001 From: Manny Becerra Date: Tue, 11 Jan 2022 12:20:43 -0800 Subject: [PATCH 4/4] Supplements #33153 - updating existing cross-references to `master` branch to renamed default branch of `main` --- azure-pipelines.yml | 4 ++-- docs/api-reference/create-next-app.md | 2 +- examples/analyze-bundles/README.md | 2 +- examples/gh-pages/README.md | 2 +- examples/progressive-web-app/pages/index.js | 2 +- examples/with-apollo-and-redux/README.md | 2 +- examples/with-cypress/pages/index.js | 2 +- examples/with-docker/pages/index.js | 2 +- examples/with-elasticsearch/pages/index.js | 2 +- .../__tests__/__snapshots__/snapshot.tsx.snap | 8 ++++---- examples/with-jest-babel/pages/index.tsx | 2 +- .../with-jest/__tests__/__snapshots__/snapshot.tsx.snap | 8 ++++---- examples/with-jest/pages/index.tsx | 2 +- examples/with-knex/pages/index.js | 2 +- examples/with-mdbreact/pages/index.js | 2 +- examples/with-mongodb/pages/index.js | 2 +- examples/with-playwright/pages/index.js | 2 +- examples/with-rbx-bulma-pro/pages/index.js | 2 +- examples/with-react-bootstrap/pages/index.jsx | 2 +- examples/with-react-with-styles/README.md | 2 +- examples/with-reactstrap/pages/index.jsx | 2 +- examples/with-redux-persist/README.md | 2 +- examples/with-redux-saga/README.md | 2 +- examples/with-rematch/README.md | 2 +- examples/with-sitemap/pages/index.js | 2 +- examples/with-styled-jsx-postcss/README.md | 2 +- examples/with-supertokens/pages/index.js | 2 +- examples/with-tailwindcss/pages/index.tsx | 2 +- examples/with-typestyle/README.md | 2 +- lerna.json | 1 - packages/create-next-app/README.md | 2 +- packages/create-next-app/templates/default/pages/index.js | 2 +- .../create-next-app/templates/typescript/pages/index.tsx | 2 +- test/development/basic/tailwind-jit/pages/index.js | 2 +- 34 files changed, 40 insertions(+), 41 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33c391bf3acf661..da56c8d77fc24d5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,14 +10,14 @@ trigger: - docs - errors - examples - # Do not run Azure on `canary`, `master`, or release tags. This unnecessarily + # Do not run Azure on `canary`, `main`, or release tags. This unnecessarily # increases the backlog, and the change was already tested on the PR. branches: include: - '*' exclude: - canary - - master + - main - refs/tags/* pr: diff --git a/docs/api-reference/create-next-app.md b/docs/api-reference/create-next-app.md index 3a00e008ac08622..f463840b88b91f4 100644 --- a/docs/api-reference/create-next-app.md +++ b/docs/api-reference/create-next-app.md @@ -25,7 +25,7 @@ yarn create next-app --typescript `create-next-app` comes with the following options: - **--ts, --typescript** - Initialize as a TypeScript project. -- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. +- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend running `yarn create next-app` diff --git a/examples/analyze-bundles/README.md b/examples/analyze-bundles/README.md index 8aec1e56c79c435..02e1673ccd3b8f7 100644 --- a/examples/analyze-bundles/README.md +++ b/examples/analyze-bundles/README.md @@ -1,6 +1,6 @@ # Analyzer Bundles example -This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/master/packages/next-bundle-analyzer) +This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer) ## Preview diff --git a/examples/gh-pages/README.md b/examples/gh-pages/README.md index e9a37206c2bcb92..fbd34532847cfaa 100644 --- a/examples/gh-pages/README.md +++ b/examples/gh-pages/README.md @@ -20,7 +20,7 @@ Edit `next.config.js` and replace `'Next-gh-page-example'` by your project name. 1. Create repository. 2. Link it to your github account. -3. Publish your master branch. +3. Publish your default branch, e.g. `main`. ```bash npm run deploy diff --git a/examples/progressive-web-app/pages/index.js b/examples/progressive-web-app/pages/index.js index dea04e8ac7ec382..c7aef703d4d6b01 100644 --- a/examples/progressive-web-app/pages/index.js +++ b/examples/progressive-web-app/pages/index.js @@ -25,7 +25,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-apollo-and-redux/README.md b/examples/with-apollo-and-redux/README.md index 765de3d3d0dd274..f1f55be5d1b981d 100644 --- a/examples/with-apollo-and-redux/README.md +++ b/examples/with-apollo-and-redux/README.md @@ -2,7 +2,7 @@ This example serves as a conduit if you were using Apollo 1.X with Redux, and are migrating to Apollo 3.x, however, you have chosen not to manage your entire application state within Apollo (`apollo-link-state`). -In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/master/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/master/examples/with-redux) examples. +In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/canary/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/canary/examples/with-redux) examples. To inspect the GraphQL API, use its [web IDE](https://nextjs-graphql-with-prisma-simple-foo.vercel.app/api). diff --git a/examples/with-cypress/pages/index.js b/examples/with-cypress/pages/index.js index 7af20bc61f52635..36b3381bad61168 100644 --- a/examples/with-cypress/pages/index.js +++ b/examples/with-cypress/pages/index.js @@ -41,7 +41,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-docker/pages/index.js b/examples/with-docker/pages/index.js index 16d683b56c08406..0a6884b38582b0f 100644 --- a/examples/with-docker/pages/index.js +++ b/examples/with-docker/pages/index.js @@ -31,7 +31,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-elasticsearch/pages/index.js b/examples/with-elasticsearch/pages/index.js index 2a4a49573b13bea..0d2c6e3563e1b72 100644 --- a/examples/with-elasticsearch/pages/index.js +++ b/examples/with-elasticsearch/pages/index.js @@ -43,7 +43,7 @@ export default function Home({ isConnected }) {

Examples →

diff --git a/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap b/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap index c5e6e3478c575be..f00d4ea78fd45b8 100644 --- a/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap +++ b/examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap @@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `

- Welcome to + Welcome to @@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `

- Get started by editing + Get started by editing pages/index.js @@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `

Examples → @@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` target="_blank" > Powered by - +

Examples →

diff --git a/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap b/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap index c5e6e3478c575be..f00d4ea78fd45b8 100644 --- a/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap +++ b/examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap @@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `

- Welcome to + Welcome to @@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `

- Get started by editing + Get started by editing pages/index.js @@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `

Examples → @@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` target="_blank" > Powered by - +

Examples →

diff --git a/examples/with-knex/pages/index.js b/examples/with-knex/pages/index.js index a1378001c887b8e..15b08938f116d98 100644 --- a/examples/with-knex/pages/index.js +++ b/examples/with-knex/pages/index.js @@ -51,7 +51,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-mdbreact/pages/index.js b/examples/with-mdbreact/pages/index.js index 2e579d4f1fb67ee..3b38fae094bac62 100644 --- a/examples/with-mdbreact/pages/index.js +++ b/examples/with-mdbreact/pages/index.js @@ -75,7 +75,7 @@ export default function Home() { color="primary" size="sm" className="text-capitalize" - href="https://github.com/vercel/next.js/tree/master/examples" + href="https://github.com/vercel/next.js/tree/canary/examples" > More → diff --git a/examples/with-mongodb/pages/index.js b/examples/with-mongodb/pages/index.js index a57dfe93bfb970d..865be76596990de 100644 --- a/examples/with-mongodb/pages/index.js +++ b/examples/with-mongodb/pages/index.js @@ -39,7 +39,7 @@ export default function Home({ isConnected }) {

Examples →

diff --git a/examples/with-playwright/pages/index.js b/examples/with-playwright/pages/index.js index 25a4a79171782b8..07b0717dcf93642 100644 --- a/examples/with-playwright/pages/index.js +++ b/examples/with-playwright/pages/index.js @@ -41,7 +41,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-rbx-bulma-pro/pages/index.js b/examples/with-rbx-bulma-pro/pages/index.js index f44638bb9498575..a8993e08fabff09 100644 --- a/examples/with-rbx-bulma-pro/pages/index.js +++ b/examples/with-rbx-bulma-pro/pages/index.js @@ -20,7 +20,7 @@ const Home = () => ( - +
Examples →

diff --git a/examples/with-react-bootstrap/pages/index.jsx b/examples/with-react-bootstrap/pages/index.jsx index d6cfa992d061403..81073f07b253187 100644 --- a/examples/with-react-bootstrap/pages/index.jsx +++ b/examples/with-react-bootstrap/pages/index.jsx @@ -49,7 +49,7 @@ export default function Home() { diff --git a/examples/with-react-with-styles/README.md b/examples/with-react-with-styles/README.md index 92af40b7ac1eaab..7eb93c482bfade8 100644 --- a/examples/with-react-with-styles/README.md +++ b/examples/with-react-with-styles/README.md @@ -6,7 +6,7 @@ In this case we are using [react-with-styles](https://github.com/airbnb/react-wi For this purpose we are extending the `` and injecting the server side rendered styles into the ``. -We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/master/examples/with-aphrodite). +We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/canary/examples/with-aphrodite). ## Preview diff --git a/examples/with-reactstrap/pages/index.jsx b/examples/with-reactstrap/pages/index.jsx index 511632185ffa52a..bfe5a5daf9e770b 100644 --- a/examples/with-reactstrap/pages/index.jsx +++ b/examples/with-reactstrap/pages/index.jsx @@ -63,7 +63,7 @@ export default function Home() { diff --git a/examples/with-redux-persist/README.md b/examples/with-redux-persist/README.md index 80caf652424b708..de187cb94ea1d2d 100644 --- a/examples/with-redux-persist/README.md +++ b/examples/with-redux-persist/README.md @@ -30,7 +30,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut ## Notes -In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) to know more about its implementation. +In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux) to know more about its implementation. The Redux Persist has been initialized in `store.js`. You can modify the `redux-persist` configuration (In this example, we are persisting only one state termed `exampleData` which is added in the `persist configuration`) if you need something more with `redux-persist` by following their [docs](https://github.com/rt2zz/redux-persist/blob/master/README.md). To wrap out our component in the `Persist Gate` which rehydrates the global state with combining the persisted values and global state values, we'll have to make some modifications in the implementation of Redux in `pages/_app.js`. diff --git a/examples/with-redux-saga/README.md b/examples/with-redux-saga/README.md index 3450a62b3c83532..72e28b37c73d3e6 100644 --- a/examples/with-redux-saga/README.md +++ b/examples/with-redux-saga/README.md @@ -2,7 +2,7 @@ Usually splitting your app state into `pages` feels natural, but sometimes you'll want to have global state for your app. This is an example using `redux` and `redux-saga` that works with universal rendering. This is just one way it can be done. If you have any suggestions or feedback please submit an issue or PR. -> This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) example. +> This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux) example. ## Preview diff --git a/examples/with-rematch/README.md b/examples/with-rematch/README.md index e037ef1ea89487c..937efa89cf1c958 100644 --- a/examples/with-rematch/README.md +++ b/examples/with-rematch/README.md @@ -2,7 +2,7 @@ This example has two pages. The first page has a counter which can be incremented synchronously or asynchronously. The second page is a page which shows a list of github users. It fetches data from the github api using this [endpoint](api.github.com/users). -Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/master/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same. +Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/canary/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same. ## Preview diff --git a/examples/with-sitemap/pages/index.js b/examples/with-sitemap/pages/index.js index 9567794ecd851ac..801b3091192275b 100644 --- a/examples/with-sitemap/pages/index.js +++ b/examples/with-sitemap/pages/index.js @@ -29,7 +29,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-styled-jsx-postcss/README.md b/examples/with-styled-jsx-postcss/README.md index 5ef4bfd8b34eb74..a7afad09a484955 100644 --- a/examples/with-styled-jsx-postcss/README.md +++ b/examples/with-styled-jsx-postcss/README.md @@ -1 +1 @@ -This examples was moved to [https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins) +This examples was moved to [https://github.com/vercel/next.js/tree/canary/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/canary/examples/with-styled-jsx-plugins) diff --git a/examples/with-supertokens/pages/index.js b/examples/with-supertokens/pages/index.js index 0629fa410da25bb..0599974ed0faf14 100644 --- a/examples/with-supertokens/pages/index.js +++ b/examples/with-supertokens/pages/index.js @@ -141,7 +141,7 @@ function ProtectedPage({ userId }) {

Examples →

diff --git a/examples/with-tailwindcss/pages/index.tsx b/examples/with-tailwindcss/pages/index.tsx index 828dd6012730d42..890e0279e0aec5d 100644 --- a/examples/with-tailwindcss/pages/index.tsx +++ b/examples/with-tailwindcss/pages/index.tsx @@ -45,7 +45,7 @@ export default function Home() {

Examples →

diff --git a/examples/with-typestyle/README.md b/examples/with-typestyle/README.md index 0491bedc5ee0ff6..659f51cb767baf4 100644 --- a/examples/with-typestyle/README.md +++ b/examples/with-typestyle/README.md @@ -2,7 +2,7 @@ This example features how you use a different styling solution than [styled-jsx](https://github.com/vercel/styled-jsx) that also supports universal styles. That means we can serve the required styles for the first render within the HTML and then load the rest in the client. In this case we are using [typestyle](https://github.com/typestyle/typestyle). -For this purpose we are extending the `` and injecting the server side rendered styles into the ``. Refer to [with-typescript](https://github.com/vercel/next.js/tree/master/examples/with-typescript) to use this with typescript. +For this purpose we are extending the `` and injecting the server side rendered styles into the ``. Refer to [with-typescript](https://github.com/vercel/next.js/tree/canary/examples/with-typescript) to use this with typescript. ## Preview diff --git a/lerna.json b/lerna.json index 3c069c2a3a3286d..b2c39b9c8cce00f 100644 --- a/lerna.json +++ b/lerna.json @@ -11,7 +11,6 @@ "publish": { "npmClient": "npm", "allowBranch": [ - "master", "canary" ], "registry": "https://registry.npmjs.org/" diff --git a/packages/create-next-app/README.md b/packages/create-next-app/README.md index 8cf5e7f8c8c3eb7..16b1687fc885ed1 100644 --- a/packages/create-next-app/README.md +++ b/packages/create-next-app/README.md @@ -23,7 +23,7 @@ npx create-next-app blog-app `create-next-app` comes with the following options: - **--ts, --typescript** - Initialize as a TypeScript project. -- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. +- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **--example-path <path-to-example>** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app` diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 08145bba9a5780a..dc4b64035213fbc 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -33,7 +33,7 @@ export default function Home() {

Examples →

diff --git a/packages/create-next-app/templates/typescript/pages/index.tsx b/packages/create-next-app/templates/typescript/pages/index.tsx index 72a4a59053d70f6..86b5b3b5bf3fdf0 100644 --- a/packages/create-next-app/templates/typescript/pages/index.tsx +++ b/packages/create-next-app/templates/typescript/pages/index.tsx @@ -34,7 +34,7 @@ const Home: NextPage = () => {

Examples →

diff --git a/test/development/basic/tailwind-jit/pages/index.js b/test/development/basic/tailwind-jit/pages/index.js index a3db6063016262d..f84ca7fd835f763 100644 --- a/test/development/basic/tailwind-jit/pages/index.js +++ b/test/development/basic/tailwind-jit/pages/index.js @@ -38,7 +38,7 @@ export default function Home() {

Examples →