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
jonespen committed Feb 10, 2022
2 parents 17c85fa + 26c40f3 commit 401a16a
Show file tree
Hide file tree
Showing 3,442 changed files with 232,461 additions and 301,927 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 6 additions & 1 deletion .eslintignore
Expand Up @@ -12,6 +12,7 @@ examples/with-jest/**
examples/with-mobx-state-tree/**
examples/with-mobx/**
packages/next/bundles/webpack/packages/*.runtime.js
packages/next/bundles/webpack/packages/lazy-compilation-*.js
packages/next/compiled/**/*
packages/react-refresh-utils/**/*.js
packages/react-dev-overlay/lib/**
Expand All @@ -24,5 +25,9 @@ packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/create-next-app/templates/**
test/integration/eslint/**
test/development/basic/legacy-decorators/**/*
test/production/emit-decorator-metadata/**/*.js
test-timings.json
packages/next/build/swc/tests/fixture/**
packages/next-swc/crates/**
bench/nested-deps/pages/**
bench/nested-deps/components/**
5 changes: 3 additions & 2 deletions .eslintrc.json
Expand Up @@ -30,14 +30,15 @@
},
"overrides": [
{
"files": ["test/**/*.test.js"],
"files": ["test/**/*.js", "test/**/*.ts", "**/*.test.ts"],
"extends": ["plugin:jest/recommended"],
"rules": {
"jest/expect-expect": "off",
"jest/no-disabled-tests": "off",
"jest/no-conditional-expect": "off",
"jest/valid-title": "off",
"jest/no-interpolation-in-snapshots": "off"
"jest/no-interpolation-in-snapshots": "off",
"jest/no-export": "off"
}
},
{ "files": ["**/__tests__/**"], "env": { "jest": true } },
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
packages/next/bundles/** -text
packages/next/compiled/** -text
1 change: 1 addition & 0 deletions .github/.kodiak.toml
Expand Up @@ -13,6 +13,7 @@ notify_on_conflict = false
[merge.message]
title = "pull_request_title"
body = "pull_request_body"
include_coauthors= true
include_pr_number = true
body_type = "markdown"
strip_html_comments = true
24 changes: 21 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,6 +1,24 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

* @timneutkens @ijjk @shuding @styfle @huozhi @padmaia
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades
/examples/ @timneutkens @ijjk @shuding @leerob @lfades
* @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

# SWC Build (@padmaia)

/packages/next/build/ @timneutkens @ijjk @shuding @padmaia @huozhi

# 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
/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
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Expand Up @@ -14,6 +14,12 @@ body:
- 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.'
- type: textarea
attributes:
label: Run `next info` (available from version 12.0.8 and up)
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?
Expand Down
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/4.docs_request.yml
@@ -0,0 +1,24 @@
name: 'Docs Request for an Update or Improvement'
description: A request to update or improve Next.js documentation
title: 'Docs: '
labels:
- 'template: documentation'
body:
- type: textarea
attributes:
label: What is the improvement or update you wish to see?
description: 'Example: I would like to see more examples of how to use the `<Link>` component. Or, the `<Link>` component docs are missing information.'
validations:
required: true
- type: textarea
attributes:
label: Is there any context that might help us understand?
description: A clear description of any added context that might help us understand.
validations:
required: true
- type: input
attributes:
label: Does the docs page already exist? Please link to it.
description: 'Example: https://nextjs.org/docs/api-reference/next/link'
validations:
required: false
13 changes: 13 additions & 0 deletions .github/actions/next-stats-action/src/index.js
Expand Up @@ -45,6 +45,10 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
await checkoutRef(actionInfo.prRef, diffRepoDir)
}

if (actionInfo.isRelease) {
process.env.STATS_IS_RELEASE = 'true'
}

// load stats config from allowed locations
const { statsConfig, relativeStatsAppDir } = loadStatsConfig()

Expand Down Expand Up @@ -114,6 +118,15 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
// in case of noisy environment slowing down initial repo build
await exec(buildCommand, false, { timeout: 5 * 60 * 1000 })
}
await fs.copy(
path.join(__dirname, '../native'),
path.join(dir, 'packages/next-swc/native')
)
// TODO: remove after next stable release (current v12.0.4)
await fs.copy(
path.join(__dirname, '../native'),
path.join(dir, 'packages/next/native')
)

logger(`Linking packages in ${dir}`)
const pkgPaths = await linkPackages(dir)
Expand Down
25 changes: 24 additions & 1 deletion .github/actions/next-stats-action/src/prepare/repo-setup.js
Expand Up @@ -73,6 +73,10 @@ module.exports = (actionInfo) => {
const packedPkgPath = path.join(pkgPath, `${pkg}-packed.tgz`)

const pkgDataPath = path.join(pkgPath, 'package.json')
if (!fs.existsSync(pkgDataPath)) {
console.log(`Skipping ${pkgDataPath}`)
continue
}
const pkgData = require(pkgDataPath)
const { name } = pkgData
pkgDatas.set(name, {
Expand All @@ -93,6 +97,25 @@ module.exports = (actionInfo) => {
if (!pkgData.dependencies || !pkgData.dependencies[pkg]) continue
pkgData.dependencies[pkg] = packedPkgPath
}
// make sure native binaries are included in local linking
if (pkg === '@next/swc') {
if (!pkgData.files) {
pkgData.files = []
}
pkgData.files.push('native')
console.log(
'using swc binaries: ',
await exec(`ls ${path.join(path.dirname(pkgDataPath), 'native')}`)
)
}
if (pkg === 'next') {
if (pkgDatas.get('@next/swc')) {
pkgData.dependencies['@next/swc'] =
pkgDatas.get('@next/swc').packedPkgPath
} else {
pkgData.files.push('native')
}
}
await fs.writeFile(
pkgDataPath,
JSON.stringify(pkgData, null, 2),
Expand All @@ -104,7 +127,7 @@ module.exports = (actionInfo) => {
// to the correct versions
for (const pkgName of pkgDatas.keys()) {
const { pkg, pkgPath } = pkgDatas.get(pkgName)
await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`)
await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`, true)
}
return pkgPaths
},
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/src/run/index.js
Expand Up @@ -67,7 +67,7 @@ async function runConfigs(
const results = await glob(rename.srcGlob, { cwd: statsAppDir })
for (const result of results) {
let dest = rename.removeHash
? result.replace(/(\.|-)[0-9a-f]{20}(\.|-)/g, '$1HASH$2')
? result.replace(/(\.|-)[0-9a-f]{16}(\.|-)/g, '$1HASH$2')
: rename.dest
if (result === dest) continue
await fs.move(
Expand Down
18 changes: 14 additions & 4 deletions .github/labeler.json
@@ -1,13 +1,17 @@
{
"labels": {
"type: example": ["examples/**"],
"type: documentation": ["docs/**", "errors/**"],
"type: create-next-app": ["packages/create-next-app/**"],
"area: examples": ["examples/**"],
"area: documentation": ["docs/**", "errors/**"],
"area: create-next-app": ["packages/create-next-app/**"],
"type: next": [
"packages/next/**",
"packages/react-dev-overlay/**",
"packages/react-refresh-utils/**",
"packages/next-codemod/**"
"packages/next-codemod/**",
"packages/eslint-plugin-next/**",
"packages/eslint-config-next/**",
"packages/next-env/**",
"packages/next-swc/**"
],
"created-by: Chrome Aurora": [
{ "type": "user", "pattern": "spanicker" },
Expand All @@ -26,7 +30,13 @@
{ "type": "user", "pattern": "sokra" },
{ "type": "user", "pattern": "styfle" },
{ "type": "user", "pattern": "leerob" },
{ "type": "user", "pattern": "kdy1" },
{ "type": "user", "pattern": "timneutkens" }
],
"created-by: Next.js docs team": [
{ "type": "user", "pattern": "MaedahBatool" },
{ "type": "user", "pattern": "molebox" },
{ "type": "user", "pattern": "ismaelrumzan" }
]
}
}
6 changes: 0 additions & 6 deletions .github/lock.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Expand Up @@ -21,4 +21,4 @@ Choose the right checklist for the change that you're making:

## Documentation / Examples

- [ ] Make sure the linting passes
- [ ] Make sure the linting passes by running `yarn lint`
90 changes: 0 additions & 90 deletions .github/workflows/build_native.yml

This file was deleted.

0 comments on commit 401a16a

Please sign in to comment.