Skip to content

Commit

Permalink
Merge branch 'main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasbueschel committed Aug 7, 2023
2 parents a1682f6 + 0a827f6 commit 25b98b1
Show file tree
Hide file tree
Showing 179 changed files with 54,981 additions and 23,657 deletions.
8 changes: 3 additions & 5 deletions .eslintignore
@@ -1,6 +1,4 @@
node_modules/
build
my-app*
packages/react-scripts/template
packages/react-scripts/fixtures
fixtures/
build/
test/fixtures/webpack-message-formatting/src/AppBabel.js
packages/react-error-overlay/lib/
39 changes: 37 additions & 2 deletions .eslintrc.json
Expand Up @@ -4,7 +4,8 @@
"browser": true,
"commonjs": true,
"node": true,
"es6": true
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2018
Expand All @@ -13,5 +14,39 @@
"no-console": "off",
"strict": ["error", "global"],
"curly": "warn"
}
},
"overrides": [
{
"files": [
"docusaurus/website/src/**/*.js",
"packages/cra-template/**/*.js",
"packages/react-error-overlay/**/*.js",
"packages/react-scripts/fixtures/kitchensink/template/{src,integration}/**/*.js",
"test/fixtures/*/src/*.js"
],
"excludedFiles": ["packages/react-error-overlay/*.js"],
"extends": ["react-app", "react-app/jest"]
},
{
"files": [
"test/fixtures/webpack-message-formatting/src/{AppLintError,AppLintWarning,AppUnknownFile}.js"
],
"rules": {
"no-unused-vars": "off",
"no-undef": "off"
}
},
{
"files": ["test/fixtures/webpack-message-formatting/src/Export5.js"],
"rules": {
"import/no-anonymous-default-export": "off"
}
},
{
"files": ["test/fixtures/issue-5176-flow-class-properties/src/App.js"],
"rules": {
"no-dupe-class-members": "off"
}
}
]
}
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,2 +1,2 @@
packages/ @ianschmitz @iansu @mrmckeb @petetnt
docusaurus/ @ianschmitz @iansu @mrmckeb
packages/ @iansu @mrmckeb
docusaurus/ @iansu @mrmckeb
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -32,7 +32,7 @@ labels: 'issue: bug report, needs triage'
* yarn.lock
Then you need to decide which package manager you prefer to use.
We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
We support both npm (https://npmjs.com) and yarn (https://yarnpkg.com/).
However, **they can't be used together in one project** so you need to pick one.
If you decided to use npm, run this in your project directory:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/build-and-test.yml
@@ -0,0 +1,76 @@
name: 'Build & Test'

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: 'Build (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build
run: npm run build

integration:
name: 'Integration Tests (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline
# The integration tests are run with yarn, so we need to install it.
- name: Install yarn
run: npm i -g yarn
- name: Run integration tests
run: npm run test:integration

e2e-simple:
name: E2E Simple
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-simple.sh'

e2e-installs:
name: E2E Installs
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-installs.sh'

e2e-kitchensink:
name: E2E Kitchensink
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-kitchensink.sh'
13 changes: 0 additions & 13 deletions .github/workflows/build.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/e2e-base.yml
@@ -0,0 +1,35 @@
on:
workflow_call:
inputs:
testScript:
required: true
type: string

name: E2E

jobs:
test:
name: 'Test (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install
run: npm ci --prefer-offline
- name: Initialize Global Git config
run: |
git config --global core.autocrlf false
git config --global user.name "Create React App"
git config --global user.email "cra@email.com"
- name: Run tests
run: ${{ inputs.testScript }}
16 changes: 12 additions & 4 deletions .github/workflows/lint.yml
@@ -1,13 +1,21 @@
name: Lint

on: [push]
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install
run: yarn --no-progress --non-interactive --no-lockfile
run: npm ci --prefer-offline
- name: Alex
run: yarn alex
run: npm run alex
- name: Prettier
run: npm run prettier -- --list-different
- name: Eslint
run: npm run eslint -- --max-warnings 0
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,7 +1,7 @@
.idea/
.vscode/
node_modules/
build
build/
.DS_Store
*.tgz
my-app*
Expand All @@ -12,4 +12,3 @@ yarn-debug.log*
yarn-error.log*
/.changelog
.npm/
yarn.lock
9 changes: 9 additions & 0 deletions .prettierignore
@@ -0,0 +1,9 @@
build/
package-lock.json
test/fixtures/webpack-message-formatting/src/AppBabel.js
test/fixtures/webpack-message-formatting/src/AppCss.css
packages/react-error-overlay/fixtures/bundle*
packages/react-error-overlay/fixtures/inline*
packages/react-error-overlay/fixtures/junk*
packages/react-error-overlay/lib/
packages/react-error-overlay/coverage/

0 comments on commit 25b98b1

Please sign in to comment.