Skip to content

Commit

Permalink
Merge branch 'canary' into joulev/fix-51130
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Sep 8, 2023
2 parents 39a8fac + 6ffb8da commit c670981
Show file tree
Hide file tree
Showing 2,031 changed files with 97,877 additions and 52,296 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Expand Up @@ -32,4 +32,8 @@ rustflags = [
"-Zshare-generics=y",
"-Csymbol-mangling-version=v0",
"-Aclippy::too_many_arguments",
# Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299
"-Aclippy::needless_pass_by_ref_mut",
# Clippy's partial_eq lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11178
"-Aclippy::incorrect_partial_ord_impl_on_ord_type",
]
9 changes: 4 additions & 5 deletions .eslintignore
Expand Up @@ -20,11 +20,10 @@ packages/react-refresh-utils/**/*.js
packages/react-dev-overlay/lib/**
**/__tmp__/**
.github/actions/next-stats-action/.work
.github/actions/issue-validator/index.mjs
.github/actions/issue-labeler/lib/index.js
.github/actions/issue-validator/*/index.mjs
.github/actions/validate-docs-links/lib/index.js
.github/actions/needs-triage/index.js
.github/actions/minus-one/index.mjs
.github/actions/*/index.mjs
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
Expand All @@ -38,8 +37,8 @@ test/production/emit-decorator-metadata/**/*.js
test/e2e/app-dir/rsc-errors/app/swc/use-client/page.js
test-timings.json
packages/next-swc/crates/**
bench/nested-deps/pages/**
bench/nested-deps/components/**
bench/nested-deps/**
bench/nested-deps-app-router/**
packages/next-bundle-analyzer/index.d.ts
examples/with-typescript-graphql/lib/gql/
test/development/basic/hmr/components/parse-error.js
93 changes: 54 additions & 39 deletions .eslintrc.json
Expand Up @@ -6,7 +6,8 @@
"browser": true,
"commonjs": true,
"es6": true,
"node": true
"node": true,
"jest": true
},
"parserOptions": {
"requireConfigFile": false,
Expand Down Expand Up @@ -43,36 +44,51 @@
},
{ "files": ["**/__tests__/**"], "env": { "jest": true } },
{
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/stylistic"
],
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"warnOnUnsupportedTypeScriptVersion": false
},
"plugins": ["@typescript-eslint"],
"rules": {
// Already handled by TS
"no-dupe-class-members": "off",
"no-undef": "off",

// Add TypeScript specific rules (and turn off ESLint equivalents)
"@typescript-eslint/consistent-type-assertions": "warn",
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "warn",
// Todo: investigate, for each of these rules, whether we want them.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/consistent-generic-constructors": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-namespace": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"warn",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/triple-slash-reference": "off",
"no-var": "off",
"prefer-const": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",

// These off- or differently-configured rules work well for us.
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"functions": true,
"classes": true,
"variables": true,
"enums": true,
"typedefs": true
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}
],
"no-unused-vars": "off",
Expand All @@ -83,29 +99,28 @@
"ignoreRestSiblings": true
}
],
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"warn",
{
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
"functions": true,
"classes": true,
"variables": true,
"enums": true,
"typedefs": true
}
],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-namespace-keyword": "error"
},
"overrides": [
{
"files": ["packages/**"],
"rules": {
"jsdoc/no-types": "error",
"jsdoc/no-undefined-types": "error"
}
}
]
"@typescript-eslint/prefer-literal-enum-member": "error"
}
},
{
"files": ["packages/**/*.tsx?"],
"rules": {
"jsdoc/no-types": "error",
"jsdoc/no-undefined-types": "error"
}
},
{
"files": [
Expand Down
6 changes: 3 additions & 3 deletions .gitattributes
@@ -1,5 +1,5 @@
packages/next/bundles/** -text
packages/next/compiled/** -text
packages/next/bundles/** -text linguist-vendored
packages/next/compiled/** -text linguist-vendored

# Make next/src/build folder indexable for github search
packages/next/src/build/** linguist-generated=false
build/** linguist-generated=false
13 changes: 7 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,7 +2,7 @@
# https://help.github.com/en/articles/about-code-owners


* @timneutkens @ijjk @shuding @huozhi @feedthejim @ztanner
* @timneutkens @ijjk @shuding @huozhi @feedthejim @ztanner @wyattjoh
/.git* @vercel/next-js @vercel/devex
/docs/ @vercel/next-js @vercel/devex
/errors/ @vercel/next-js @vercel/devex
Expand All @@ -20,6 +20,7 @@

/**/*image* @timneutkens @ijjk @shuding @styfle @huozhi @vercel/devex
/**/*image*/** @timneutkens @ijjk @shuding @styfle @huozhi @vercel/devex
/**/*img* @timneutkens @ijjk @shuding @styfle @huozhi @vercel/devex
/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 @huozhi
Expand All @@ -29,8 +30,8 @@

/packages/next/src/build/ @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/packages/next/src/telemetry/ @timneutkens @ijjk @shuding @padmaia
/packages/next-swc/ @timneutkens @ijjk @shuding @vercel/web-tooling
Cargo.toml @timneutkens @ijjk @shuding @vercel/web-tooling
Cargo.lock @timneutkens @ijjk @shuding @vercel/web-tooling
/.cargo/config.toml @timneutkens @ijjk @shuding @vercel/web-tooling
/.config/nextest.toml @timneutkens @ijjk @shuding @vercel/web-tooling
/packages/next-swc/ @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
Cargo.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
Cargo.lock @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/.cargo/config.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/.config/nextest.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
110 changes: 68 additions & 42 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Expand Up @@ -5,9 +5,43 @@ body:
- type: markdown
attributes:
value: |
*Note:* If you leave out sections, the issue might be moved to the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
[examples](https://github.com/vercel/next.js/tree/canary/examples) related issue should be reported using [this](https://github.com/vercel/next.js/issues/new?assignees=&labels=type%3A+example%2Ctemplate%3A+bug&template=2.example_bug_report.yml) issue template instead.
This template is to report Next.js bugs. [Examples](https://github.com/vercel/next.js/tree/canary/examples) related issues should be reported using [this](https://github.com/vercel/next.js/issues/new?assignees=&labels=type%3A+example%2Ctemplate%3A+bug&template=2.example_bug_report.yml) issue template instead.
Feature requests should be opened as [discussions](https://github.com/vercel/next.js/discussions/new?category=ideas). [Read more](https://github.com/vercel/next.js/blob/canary/contributing/core/adding-features.md).
Before opening a new issue, please do a [search](https://github.com/vercel/next.js/issues) of existing issues and :+1: upvote the existing issue instead. This will result in a quicker resolution.
If you need help with your own project, you can:
- Start a discussion in the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help)
- Ask a question on the [Next.js Discord](https://discord.com/invite/nextjs) server
- type: input
attributes:
label: Link to the code that reproduces this issue or a replay of the bug
description: |
A link to a **public** [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/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. To report a Pages Router related issue, you can use these templates: [`npx create-next-app -e reproduction-template-pages`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-pages) or [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-pages)
If a minimal reproduction can't be created, please share a [replay](https://www.replay.io/) of the bug which doesn't require sharing a private repo.
**Skipping this/providing an invalid link will result in the issue being closed**
placeholder: 'https://github.com/user/my-minimal-nextjs-issue-reproduction'
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: A step-by-step description of how to reproduce the issue, based on the linked 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.
placeholder: |
1. Start the application in development (next dev)
2. Click X
3. Y will happen
validations:
required: true
- type: textarea
attributes:
label: Current vs. Expected behavior
description: A clear and concise description of what the bug is, and what you expected to happen.
placeholder: 'Following the steps from the previous section, I expected A to happen, but I observed B instead'
validations:
required: true
- type: checkboxes
attributes:
label: Verify canary release
Expand All @@ -20,13 +54,32 @@ body:
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.
render: bash
placeholder: |
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0
Binaries:
Node: 18.17.1
npm: 9.5.1
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.20
eslint-config-next: 13.4.20
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/A
validations:
required: true
- type: dropdown
attributes:
label: Which area(s) of Next.js are affected? (leave empty if unsure)
label: Which area(s) are affected? (Select all that apply)
multiple: true
options:
- 'Not sure'
- 'App Router'
- 'CLI (create-next-app)'
- 'Data fetching (gS(S)P, getInitialProps)'
Expand All @@ -49,47 +102,20 @@ body:
- 'SWC transpilation'
- 'Turbopack (--turbo)'
- 'TypeScript (plugin, built-in types)'
- type: input
attributes:
label: Link to the code that reproduces this issue or a replay of the bug
description: |
A link to a [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/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.
If a minimal reproduction can't be created please share a [replay](https://www.replay.io/) of the bug which doesn't require sharing a private repo.
To report an App Router related issue, you can use these templates: [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) or [`npx create-next-app -e reproduction-template-app-dir`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir)
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
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: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: markdown
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: markdown
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: markdown
attributes:
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!
- type: input
attributes:
label: Which browser are you using? (if relevant)
description: 'Please specify the exact version. For example: Chrome 100.0.4878.0'
- type: input
value: |
Another way you can help the maintainers' job is to pinpoint the `canary` version of `next` that introduced the issue. Check out our [releases](https://github.com/vercel/next.js/releases), and try to find the first `canary` release that introduced the issue. This will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of `next` by running `npm install next@<version>`.
- type: textarea
attributes:
label: How are you deploying your application? (if relevant)
description: 'For example: next start, Vercel, Other platform'
label: Additional context
description: |
Any extra information that might help us investigate. For example, where are you deploying your application (Vercel, Docker, other platform)? Is it only reproducible on that platform, or locally too? Is the issue only happening in a specific browser? etc.
placeholder: |
I tested my reproduction against different canary releases, and the first one that introduced the bug was "13.4.20-canary.13", since reverting to "13.4.20-canary.12" works.
or
I am hosting via Docker with the recommended `output: "standalone"` option", and if I remove that option or try a different hosting option, I cannot reproduce the same issue.
7 changes: 0 additions & 7 deletions .github/actions/issue-labeler/lib/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions .github/actions/issue-labeler/lib/package.json

This file was deleted.

19 changes: 0 additions & 19 deletions .github/actions/issue-labeler/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions .github/actions/issue-labeler/tsconfig.json

This file was deleted.

7 changes: 7 additions & 0 deletions .github/actions/issue-validator/autolabel/index.mjs

Large diffs are not rendered by default.

0 comments on commit c670981

Please sign in to comment.