Skip to content

Commit

Permalink
Merge branch 'canary' into docs-typofix
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Oct 11, 2020
2 parents b9ab319 + 5cab03f commit a50fce6
Show file tree
Hide file tree
Showing 1,613 changed files with 28,451 additions and 10,891 deletions.
7 changes: 6 additions & 1 deletion .eslintignore
Expand Up @@ -8,4 +8,9 @@ packages/next/compiled/**/*
packages/react-refresh-utils/**/*.js
packages/react-dev-overlay/lib/**
**/__tmp__/**
.github/actions/next-stats-action/.work
.github/actions/next-stats-action/.work
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
9 changes: 9 additions & 0 deletions .github/actions/next-stats-action/src/index.js
@@ -1,3 +1,5 @@
const path = require('path')
const fs = require('fs-extra')
const exec = require('./util/exec')
const logger = require('./util/logger')
const runConfigs = require('./run')
Expand Down Expand Up @@ -25,6 +27,13 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {

;(async () => {
try {
if (await fs.pathExists(path.join(__dirname, '../SKIP_NEXT_STATS.txt'))) {
console.log(
'SKIP_NEXT_STATS.txt file present, exiting stats generation..'
)
process.exit(0)
}

const { stdout: gitName } = await exec(
'git config user.name && git config user.email'
)
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/next-stats-action/src/prepare/action-info.js
Expand Up @@ -56,7 +56,9 @@ module.exports = function actionInfo() {
isLocal: LOCAL_STATS,
commitId: null,
issueId: ISSUE_ID,
isRelease: releaseTypes.has(GITHUB_ACTION),
isRelease:
GITHUB_REPOSITORY === 'vercel/next.js' &&
(GITHUB_REF || '').includes('canary'),
}

// get comment
Expand Down
3 changes: 2 additions & 1 deletion .github/labeler.json
Expand Up @@ -6,7 +6,8 @@
"type: next": [
"packages/next/**",
"packages/react-dev-overlay/**",
"packages/react-refresh-utils/**"
"packages/react-refresh-utils/**",
"packages/next-codemod/**"
]
}
}
61 changes: 40 additions & 21 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -70,32 +70,34 @@ jobs:

- run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3

testsPass:
name: thank you, next
testYarnPnP:
runs-on: ubuntu-latest
needs: [lint, checkPrecompiled, testAll]
env:
NODE_OPTIONS: '--unhandled-rejections=strict'
steps:
- run: exit 0
- uses: actions/checkout@v2

testMacOS:
name: macOS (Basic, Production, Acceptance)
runs-on: macos-latest
env:
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
HEADLESS: true
- run: yarn install --frozen-lockfile --check-files

- run: |
mkdir -p ./e2e-tests/next-pnp
cp -r ./examples/with-typescript/. ./e2e-tests/next-pnp
cd ./e2e-tests/next-pnp
touch yarn.lock
yarn set version berry
yarn config set pnpFallbackMode none
yarn link --all --private ../..
yarn build
testsPass:
name: thank you, next
runs-on: ubuntu-latest
needs: [lint, checkPrecompiled, testAll, testYarnPnP]
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# Installing dependencies again since OS changed
- run: yarn install --frozen-lockfile --check-files || yarn install --frozen-lockfile --check-files
- run: node run-tests.js test/integration/production/test/index.test.js
- run: node run-tests.js test/integration/basic/test/index.test.js
- run: node run-tests.js test/acceptance/*
- run: exit 0

testWebpack5:
name: webpack 5 (Basic, Production, Acceptance)
testFutureDependencies:
name: React 17 + webpack 5 (Basic, Production, Acceptance)
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: 1
Expand All @@ -105,7 +107,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: cat package.json | jq '.resolutions.webpack = "^5.0.0-beta.22"' > package.json.tmp && mv package.json.tmp package.json
- run: cat package.json | jq '.resolutions.webpack = "^5.0.0-beta.30"' > package.json.tmp && mv package.json.tmp package.json
- run: cat package.json | jq '.resolutions.react = "^17.0.0-rc.1"' > package.json.tmp && mv package.json.tmp package.json
- run: cat package.json | jq '.resolutions."react-dom" = "^17.0.0-rc.1"' > package.json.tmp && mv package.json.tmp package.json
- run: yarn install --check-files
- run: node run-tests.js test/integration/production/test/index.test.js
- run: node run-tests.js test/integration/basic/test/index.test.js
Expand Down Expand Up @@ -180,3 +184,18 @@ jobs:
key: ${{ github.sha }}

- run: ./publish-release.sh

prStats:
name: Release Stats
runs-on: ubuntu-latest
needs: [publishRelease]
steps:
- uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: ./release-stats.sh
- uses: ./.github/actions/next-stats-action
env:
PR_STATS_COMMENT_TOKEN: ${{ secrets.PR_STATS_COMMENT_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/release_stats.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/test_macos.yml
@@ -0,0 +1,22 @@
on:
push:
branches: [canary]

name: Test macOS

jobs:
testMacOS:
name: macOS (Basic, Production, Acceptance)
runs-on: macos-latest
env:
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
HEADLESS: true

steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: yarn install --frozen-lockfile --check-files || yarn install --frozen-lockfile --check-files
- run: node run-tests.js test/integration/production/test/index.test.js
- run: node run-tests.js test/integration/basic/test/index.test.js
- run: node run-tests.js test/acceptance/*
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,6 +21,7 @@ coverage
test/**/out*
test/**/next-env.d.ts
.DS_Store
/e2e-tests

# Editors
**/.idea
Expand Down
7 changes: 6 additions & 1 deletion .prettierignore
Expand Up @@ -8,4 +8,9 @@ packages/react-refresh-utils/**/*.d.ts
packages/react-dev-overlay/lib/**
**/__tmp__/**
lerna.json
.github/actions/next-stats-action/.work
.github/actions/next-stats-action/.work
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
2 changes: 2 additions & 0 deletions .prettierignore_staged
Expand Up @@ -3,3 +3,5 @@
**/dist/**
packages/next/compiled/**/*
lerna.json
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
16 changes: 16 additions & 0 deletions check-examples.sh
@@ -0,0 +1,16 @@
#!/bin/bash

cd `dirname $0`

for folder in examples/* ; do
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
if [ -f "$folder/package.json" ]; then
cat $folder/package.json | jq '.license = "MIT"' | sponge $folder/package.json
fi
done;

if [[ ! -z $(git status -s) ]];then
echo "Detected changes"
git status
exit 1
fi
13 changes: 0 additions & 13 deletions check-git-ignore.sh

This file was deleted.

21 changes: 0 additions & 21 deletions contributing.md
Expand Up @@ -138,8 +138,6 @@ Deploy the example using [Vercel](https://vercel.com/now):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -148,24 +146,5 @@ npx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/DIRECTORY_NAME
cd DIRECTORY_NAME
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
````
Expand Up @@ -27,7 +27,7 @@ And the AMP version of your page will include a link to the HTML page:
<link rel="canonical" href="/about" />
```

When [`exportTrailingSlash`](/docs/api-reference/next.config.js/exportPathMap.md#0cf7d6666b394c5d8d08a16a933e86ea) is enabled the exported pages for `pages/about.js` would be:
When [`trailingSlash`](/docs/api-reference/next.config.js/trailing-slash.md) is enabled the exported pages for `pages/about.js` would be:

- `out/about/index.html` - HTML page
- `out/about.amp/index.html` - AMP page

0 comments on commit a50fce6

Please sign in to comment.