Skip to content

Commit

Permalink
Merge branch 'canary' into updated-duplicate-module-load
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheraff committed Aug 20, 2021
2 parents 4ff8748 + b74ffff commit 9da5e17
Show file tree
Hide file tree
Showing 2,006 changed files with 148,763 additions and 101,498 deletions.
2 changes: 2 additions & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CODE_OF_CONDUCT.md
examples/
21 changes: 21 additions & 0 deletions .alexrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"allow": [
"attacks",
"color",
"dead",
"execute",
"executed",
"executes",
"execution",
"executions",
"failed",
"failure",
"failures",
"fire",
"fires",
"hook",
"hooks",
"host-hostess",
"invalid"
]
}
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ e2e-tests/**
examples/with-eslint/**
examples/with-typescript-eslint-jest/**
examples/with-kea/**
examples/with-custom-babel-config/**
examples/with-flow/**
examples/with-mobx-state-tree/**
examples/with-mobx/**
packages/next/bundles/webpack/packages/*.runtime.js
packages/next/compiled/**/*
packages/react-refresh-utils/**/*.js
Expand All @@ -18,6 +22,6 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/create-next-app/templates/**
test/integration/async-modules/**
test/integration/eslint/**
test-timings.json
packages/next/build/swc/tests/fixture/**
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"root": true,
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"plugins": ["react", "react-hooks", "jest", "import"],
"env": {
"browser": true,
Expand All @@ -9,10 +9,17 @@
"node": true
},
"parserOptions": {
"ecmaVersion": 2018,
"requireConfigFile": false,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"caller": {
// Eslint supports top level await when a parser for it is included. We enable the parser by default for Babel.
"supportsTopLevelAwait": true
}
}
},
"settings": {
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

* @timneutkens @ijjk @lfades @divmain @shuding
/docs/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
/examples/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
* @timneutkens @ijjk @shuding @styfle @huozhi @padmaia
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades
/examples/ @timneutkens @ijjk @shuding @leerob @lfades
4 changes: 2 additions & 2 deletions .github/actions/next-stats-action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:10-buster
FROM node:14-buster

LABEL com.github.actions.name="Next.js PR Stats"
LABEL com.github.actions.description="Compares stats of a PR with the main branch"
LABEL repository="https://github.com/zeit/next-stats-action"
LABEL repository="https://github.com/vercel/next-stats-action"

COPY . /next-stats

Expand Down
8 changes: 6 additions & 2 deletions .github/actions/next-stats-action/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,17 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
logger(`Running initial build for ${dir}`)
if (!actionInfo.skipClone) {
let buildCommand = `cd ${dir}${
!statsConfig.skipInitialInstall ? ' && yarn install' : ''
!statsConfig.skipInitialInstall
? ' && yarn install --network-timeout 1000000'
: ''
}`

if (statsConfig.initialBuildCommand) {
buildCommand += ` && ${statsConfig.initialBuildCommand}`
}
await exec(buildCommand)
// allow 5 minutes node_modules install + building all packages
// in case of noisy environment slowing down initial repo build
await exec(buildCommand, false, { timeout: 5 * 60 * 1000 })
}

logger(`Linking packages in ${dir}`)
Expand Down
19 changes: 19 additions & 0 deletions .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@
"packages/react-dev-overlay/**",
"packages/react-refresh-utils/**",
"packages/next-codemod/**"
],
"created-by: Chrome Aurora": [
{ "type": "user", "pattern": "spanicker" },
{ "type": "user", "pattern": "housseindjirdeh" },
{ "type": "user", "pattern": "devknoll" },
{ "type": "user", "pattern": "janicklas-ralph" },
{ "type": "user", "pattern": "atcastle" },
{ "type": "user", "pattern": "kyliau" },
{ "type": "user", "pattern": "kara" }
],
"created-by: Next.js team": [
{ "type": "user", "pattern": "ijjk" },
{ "type": "user", "pattern": "padmaia" },
{ "type": "user", "pattern": "huozhi" },
{ "type": "user", "pattern": "shuding" },
{ "type": "user", "pattern": "sokra" },
{ "type": "user", "pattern": "styfle" },
{ "type": "user", "pattern": "leerob" },
{ "type": "user", "pattern": "timneutkens" }
]
}
}
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Choose the right checklist for the change that you're making:

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

Expand All @@ -16,6 +17,7 @@ Choose the right checklist for the change that you're making:
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/build_native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
on: workflow_dispatch

name: Build next-swc native binaries

jobs:
build-native:
strategy:
matrix:
os: [ubuntu-18.04, macos-latest, windows-latest]
description: [default]
include:
- os: ubuntu-18.04
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
description: m1

name: next-swc - ${{ matrix.os }} - ${{ matrix.target }} - node@14
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
check-latest: true
- name: Install
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-03-25
target: ${{ matrix.target }}
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: stable-${{ matrix.os }}-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: stable-${{ matrix.os }}-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache native binary
id: binary-cache
uses: actions/cache@v2
with:
path: packages/next/native/**
key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_native.yml', 'packages/next/build/swc/**') }}
- name: Cross build aarch64 setup
if: ${{ matrix.target == 'aarch64-apple-darwin' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
export CC=$(xcrun -f clang);
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
- name: 'Build'
if: steps.binary-cache.outputs.cache-hit != true
run: yarn build-native --target ${{ matrix.target }}
env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
- name: Clear the cargo caches
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache
commit:
needs: build-native
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native
- uses: EndBug/add-and-commit@v7
with:
add: 'packages/next/native --force'
message: 'Build next-swc binaries'

0 comments on commit 9da5e17

Please sign in to comment.