Skip to content

Commit

Permalink
Merge branch 'canary' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Aug 22, 2022
2 parents 16d8255 + 63651a6 commit 3b90c9f
Show file tree
Hide file tree
Showing 4,530 changed files with 195,427 additions and 216,477 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 3 additions & 1 deletion .alexrc
Expand Up @@ -16,6 +16,8 @@
"hook",
"hooks",
"host-hostess",
"invalid"
"invalid",
"remains",
"white"
]
}
3 changes: 3 additions & 0 deletions .eslintignore
Expand Up @@ -25,8 +25,11 @@ packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/create-next-app/templates/**
test/integration/eslint/**
test/integration/script-loader/**/*
test/development/basic/legacy-decorators/**/*
test/production/emit-decorator-metadata/**/*.js
test-timings.json
packages/next-swc/crates/**
bench/nested-deps/pages/**
bench/nested-deps/components/**
packages/next-bundle-analyzer/index.d.ts
62 changes: 54 additions & 8 deletions .eslintrc.json
Expand Up @@ -15,7 +15,7 @@
"jsx": true
},
"babelOptions": {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"presets": ["next/babel"],
"caller": {
// Eslint supports top level await when a parser for it is included. We enable the parser by default for Babel.
"supportsTopLevelAwait": true
Expand Down Expand Up @@ -68,10 +68,11 @@
"@typescript-eslint/no-use-before-define": [
"warn",
{
"functions": false,
"classes": false,
"variables": false,
"typedefs": false
"functions": true,
"classes": true,
"variables": true,
"enums": true,
"typedefs": true
}
],
"no-unused-vars": "off",
Expand All @@ -92,7 +93,9 @@
}
],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "warn"
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-namespace-keyword": "error"
}
},
{
Expand All @@ -106,6 +109,16 @@
{
"files": ["examples/**/*"],
"rules": {
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": true,
"classes": true,
"variables": true,
"enums": true,
"typedefs": true
}
],
"import/no-anonymous-default-export": [
"error",
{
Expand Down Expand Up @@ -145,6 +158,30 @@
}
]
}
},
{
"files": [
"packages/eslint-plugin-next/**/*.js",
"test/unit/eslint-plugin-next/**/*.test.ts"
],
"extends": ["plugin:eslint-plugin/recommended"],
"parserOptions": {
"sourceType": "script"
},
"rules": {
"eslint-plugin/prefer-replace-text": "error",
"eslint-plugin/report-message-format": [
"error",
".+\\. See: https://nextjs.org/docs/messages/[a-z\\-]+$"
],
"eslint-plugin/require-meta-docs-description": [
"error",
{
"pattern": ".+"
}
],
"eslint-plugin/require-meta-docs-url": "error"
}
}
],
"rules": {
Expand Down Expand Up @@ -203,7 +240,14 @@
"no-octal-escape": "warn",
"no-redeclare": ["warn", { "builtinGlobals": false }],
"no-regex-spaces": "warn",
"no-restricted-syntax": ["warn", "WithStatement"],
"no-restricted-syntax": [
"warn",
"WithStatement",
{
"message": "substr() is deprecated, use slice() or substring() instead",
"selector": "MemberExpression > Identifier[name='substr']"
}
],
"no-script-url": "warn",
"no-self-assign": "warn",
"no-self-compare": "warn",
Expand Down Expand Up @@ -284,6 +328,8 @@
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/style-prop-object": "warn",
"react-hooks/rules-of-hooks": "error"
"react-hooks/rules-of-hooks": "error",
// "@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/prefer-as-const": "warn"
}
}
24 changes: 11 additions & 13 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,23 +2,21 @@
# https://help.github.com/en/articles/about-code-owners

* @timneutkens @ijjk @shuding @huozhi
/.github/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades @molebox
/examples/ @timneutkens @ijjk @shuding @leerob @lfades @steven-tey
/.github/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @balazsorban44
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @balazsorban44
/examples/ @timneutkens @ijjk @shuding @leerob @steven-tey @balazsorban44

# SWC Build (@padmaia)
# SWC Build & Telemetry (@padmaia)

/packages/next/build/ @timneutkens @ijjk @shuding @padmaia @huozhi
/packages/next/build/ @timneutkens @ijjk @shuding @padmaia @huozhi
/packages/next/telemetry/ @timneutkens @ijjk @shuding @padmaia
/packages/next-swc/ @timneutkens @ijjk @shuding @padmaia

# Image Component (@styfle)

/examples/image-component/ @timneutkens @ijjk @shuding @styfle
/packages/next/build/webpack/loaders/next-image-loader.js @timneutkens @ijjk @shuding @styfle
/packages/next/client/image.tsx @timneutkens @ijjk @shuding @styfle
/packages/next/image-types/ @timneutkens @ijjk @shuding @styfle
/packages/next/server/image-config.ts @timneutkens @ijjk @shuding @styfle
/packages/next/server/image-optimizer.ts @timneutkens @ijjk @shuding @styfle
/**/*image* @timneutkens @ijjk @shuding @styfle
/**/*image*/** @timneutkens @ijjk @shuding @styfle
/packages/next/client/use-intersection.tsx @timneutkens @ijjk @shuding @styfle
/packages/next/server/lib/squoosh/ @timneutkens @ijjk @shuding @styfle
/packages/next/server/serve-static.ts @timneutkens @ijjk @shuding @styfle
/packages/next/server/config.ts @timneutkens @ijjk @shuding @styfle
/test/integration/image-optimizer/ @timneutkens @ijjk @shuding @styfle
/test/integration/image-component/ @timneutkens @ijjk @shuding @styfle
53 changes: 19 additions & 34 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Expand Up @@ -7,49 +7,28 @@ body:
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
- type: markdown
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
- type: markdown
attributes:
value: 'Please first verify if your issue exists in the Next.js canary release line: `npm install next@canary`.'
- type: markdown
attributes:
value: 'next@canary is the beta version of Next.js. It includes all features and fixes that are pending to land on the stable release line.'
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
- type: checkboxes
attributes:
label: Verify canary release
description: '`next@canary` is the canary version of Next.js that ships daily. It includes all features and fixes that have not been released to the stable version yet. Think of canary as a public beta. Some issues may already be fixed in the canary version, so please verify that your issue reproduces before opening a new issue.'
options:
- label: I verified that the issue exists in the latest Next.js canary release
required: true
- type: textarea
attributes:
label: Run `next info` (available from version 12.0.8 and up)
label: Provide environment information
description: Please run `next info` in the root directory of your project and paste the results. You might need to use `npx --no-install next info` if next is not in the current PATH.
validations:
required: false
- type: input
attributes:
label: What version of Next.js are you using?
description: 'For example: 10.0.1'
validations:
required: true
- type: input
attributes:
label: What version of Node.js are you using?
description: 'For example: 12.0.0'
validations:
required: true
label: What browser are you using? (if relevant)
description: 'Please specify the exact version. For example: Chrome 100.0.4878.0'
- type: input
attributes:
label: What browser are you using?
description: 'For example: Chrome, Safari'
validations:
required: true
- type: input
attributes:
label: What operating system are you using?
description: 'For example: macOS, Windows'
validations:
required: true
- type: input
attributes:
label: How are you deploying your application?
label: How are you deploying your application? (if relevant)
description: 'For example: next start, next export, Vercel, Other platform'
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
Expand All @@ -62,10 +41,16 @@ body:
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: input
attributes:
label: Link to reproduction
description: A link to a GitHub repository, a [StackBlitz](https://stackblitz.com/fork/github/vercel/next.js/tree/canary/examples/reproduction-template), or a [CodeSandbox](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue.
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue, based on the linked minimal reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: markdown
Expand Down
45 changes: 18 additions & 27 deletions .github/ISSUE_TEMPLATE/2.example_bug_report.yml
@@ -1,49 +1,40 @@
name: Example Bug Report
description: Create a bug report for the examples
description: Create a bug report for one of the Next.js examples
labels: 'type: example,template: bug'
body:
- type: markdown
attributes:
value: Thanks for taking the time to file a examples bug report! Please fill out this form as completely as possible.
value: Thanks for taking the time to file a bug report for [one of the examples](https://github.com/vercel/next.js/tree/canary/examples)! Please fill out this form as completely as possible.
- type: markdown
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
- type: input
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
- type: checkboxes
attributes:
label: What example does this report relate to?
description: 'For example: with-styled-components'
validations:
required: true
- type: input
attributes:
label: What version of Next.js are you using?
description: 'For example: 10.0.1'
validations:
required: true
- type: input
label: Verify canary release
description: '`next@canary` is the canary version of Next.js that ships daily. It includes all features and fixes that have not been released to the stable version yet. Think of canary as a public beta. Some issues may already be fixed in the canary version, so please verify that your issue reproduces before opening a new issue.'
options:
- label: I verified that the issue exists in the latest Next.js canary release
required: true
- type: textarea
attributes:
label: What version of Node.js are you using?
description: 'For example: 12.0.0'
label: Provide environment information
description: Please run `next info` in the root directory of your project and paste the results. You might need to use `npx --no-install next info` if next is not in the current PATH.
validations:
required: true
- type: input
attributes:
label: What browser are you using?
description: 'For example: Chrome, Safari'
label: Which example does this report relate to?
description: "See a complete list in the [examples folder](https://github.com/vercel/next.js/tree/canary/examples). For example: `with-styled-components`. Note: Examples not in the examples folder might be maintained by the example's library author. Check out their projects before opening the issue on Next.js"
validations:
required: true
- type: input
attributes:
label: What operating system are you using?
description: 'For example: macOS, Windows'
validations:
required: true
label: What browser are you using? (if relevant)
description: 'Please specify the exact version. For example: Chrome 100.0.4878.0'
- type: input
attributes:
label: How are you deploying your application?
label: How are you deploying your application? (if relevant)
description: 'For example: next start, next export, Vercel, Other platform'
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
Expand All @@ -59,7 +50,7 @@ body:
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue, based on the relevant example. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: markdown
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/issue-validator/.gitignore
@@ -0,0 +1,2 @@
!dist
!package-lock.json
6 changes: 6 additions & 0 deletions .github/actions/issue-validator/action.yml
@@ -0,0 +1,6 @@
name: Issue validator
description: 'Validates bug reports on the Next.js repository'
author: 'Vercel'
runs:
using: 'node16'
main: 'index.js'

0 comments on commit 3b90c9f

Please sign in to comment.