Skip to content

Commit

Permalink
Merge branch 'facebook-master'
Browse files Browse the repository at this point in the history
* facebook-master: (43 commits)
  Explain how to uninstall create-react-app globally (facebook#9244)
  Fix chai URL (facebook#8895)
  Support ESLint 7.x (facebook#8978)
  Bump version of Verdaccio (facebook#7787)
  Upgrade dependencies (facebook#9196)
  Use process.execPath to spawn node subprocess (facebook#8694)
  Replace Spectrum links with GitHub Discussions (facebook#9102)
  Update deployment docs for Azure Static Web Apps (facebook#9042)
  Add performance relayer + documentation (web-vitals) (facebook#9116)
  Fix typo in docs (facebook#9135)
  Upgrade dependencies (facebook#9132)
  Add support for absolute paths when using url() in CSS (facebook#7937)
  feat(react-scripts): allow testMatch for jest config (facebook#9114)
  Upgrade to Jest 26 (facebook#8955)
  Update getting-started.md to match templates (facebook#9089)
  Update question issue template
  feat: remove typescript flag and NODE_PATH support (facebook#8934)
  Fix dotenv file loading order (facebook#9037)
  Update packages (facebook#9081)
  Dependency major version upgrades (facebook#8950)
  ...
  • Loading branch information
zhaojun committed Jul 15, 2020
2 parents b66d1cd + b0ad23f commit 89888c4
Show file tree
Hide file tree
Showing 151 changed files with 3,801 additions and 2,092 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Get help with Create React App
labels: 'needs triage'
---

If you have a general question about Create React App or about building an app with Create React App we encourage you to post on our Spectrum community instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://spectrum.chat/create-react-app
If you have a general question about Create React App or about building an app with Create React App we encourage you to post in GitHub Discussions instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://github.com/facebook/create-react-app/discussions

If you're looking for general information on using React, the React docs have a list of resources: https://reactjs.org/community/support.html

Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"arrowParens": "avoid",
"trailingComma": "es5",
"singleQuote": true,
"semi": true
Expand Down
833 changes: 447 additions & 386 deletions CHANGELOG-0.x.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Create React apps with no build configuration.

Create React App works on macOS, Windows, and Linux.<br>
If something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new).<br>
If you have questions or need help, please ask in our [Spectrum](https://spectrum.chat/create-react-app) community.
If you have questions or need help, please ask in [GitHub Discussions](https://github.com/facebook/create-react-app/discussions).

## Quick Overview

Expand All @@ -17,7 +17,7 @@ cd my-app
npm start
```

If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that npx always uses the latest version.
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that npx always uses the latest version.

_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_

Expand Down
4 changes: 1 addition & 3 deletions azure-pipelines-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ parameters:
name: ''
testScript: ''
configurations:
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }

jobs:
- job: ${{ parameters.name }}
Expand Down
31 changes: 8 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ variables:
NPM_CONFIG_CACHE: $(Build.SourcesDirectory)/../npm-cache
# Sets TEMP to be on the same drive as the cloned source on Windows. This avoids test scripts that "cd" into a directory under TEMP from failing because this directory is on a different drive from the current directory.
VSTS_OVERWRITE_TEMP: True
# Override Verdaccio package to use. This is temporary and is needed to avoid socket timeouts on hosted Windows agent (on Azure). This also changes Verdaccio to return a 503 (service unavailable) instead of a 404 (not found) when the connection to the uplink timesout.
VERDACCIO_PACKAGE: https://github.com/willsmythe/verdaccio/releases/download/create-react-app/verdaccio-4.0.0-alpha.8.tgz
CRA_INTERNAL_TEST: true

# ******************************************************************************
Expand Down Expand Up @@ -57,36 +55,23 @@ jobs:
name: Behavior
testScript: tasks/e2e-behavior.sh
configurations:
LinuxNode8: { vmImage: 'ubuntu-18.04', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-18.04', nodeVersion: 10.x }
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
MacNode8: { vmImage: 'macOS-10.15', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }
WindowsNode10: { vmImage: 'windows-2019', nodeVersion: 10.x }
WindowsNode12: { vmImage: 'windows-2019', nodeVersion: 12.x }
MacNode10: { vmImage: 'macOS-10.15', nodeVersion: 10.x }
MacNode12: { vmImage: 'macOS-10.15', nodeVersion: 12.x }

# ******************************************************************************
# Old Node test suite
# ******************************************************************************
- job: OldNode
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 6.x
displayName: 'Install Node.js 6.x'
versionSpec: 8.x
displayName: 'Install Node.js 8.x'
- bash: tasks/e2e-old-node.sh
displayName: 'Run tests'
# ******************************************************************************
# Unsupported Node with TypeScript flag
# ******************************************************************************
- job: UnsupportedNodeWithTypeScript
pool:
vmImage: ubuntu-16.04
steps:
- task: NodeTool@0
inputs:
versionSpec: 8.9.x
displayName: 'Install Node.js 8.9.x'
- bash: tasks/e2e-typescript-unsupported-node.sh
displayName: 'Run unsupported TypeScript test'
2 changes: 2 additions & 0 deletions docusaurus/docs/adding-css-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ To start using it, add `@import-normalize;` anywhere in your CSS file(s). You on
/* rest of app styles */
```

> **Tip**: If you see an "_Unknown at rule @import-normalize css(unknownAtRules)_" warning in VSCode, change the `css.lint.unknownAtRules` setting to `ignore`.
You can control which parts of [normalize.css] to use via your project's [browserslist].

Results when [browserslist] is `last 3 versions`:
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/adding-custom-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ REACT_APP_NOT_SECRET_CODE=abcdef

Files on the left have more priority than files on the right:

- `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env`
- `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env`
- `npm start`: `.env.development.local`, `.env.local`, `.env.development`, `.env`
- `npm run build`: `.env.production.local`, `.env.local`, `.env.production`, `.env`
- `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing)

These variables will act as the defaults if the machine does not explicitly set them.
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/adding-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npx create-react-app my-app --template typescript
yarn create react-app my-app --template typescript
```

> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that `npx` always uses the latest version.
> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that `npx` always uses the latest version.
>
> Global installs of `create-react-app` are no longer supported.
Expand Down Expand Up @@ -47,7 +47,7 @@ You are not required to make a [`tsconfig.json` file](https://www.typescriptlang

## Troubleshooting

If your project is not created with TypeScript enabled, npx may be using a cached version of `create-react-app`. Remove previously installed versions with `npm uninstall -g create-react-app` (see [#6119](https://github.com/facebook/create-react-app/issues/6119#issuecomment-451614035)).
If your project is not created with TypeScript enabled, npx may be using a cached version of `create-react-app`. Remove previously installed versions with `npm uninstall -g create-react-app` or `yarn global remove create-react-app` (see [#6119](https://github.com/facebook/create-react-app/issues/6119#issuecomment-451614035)).

If you are currently using [create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript/), see [this blog post](https://vincenttunru.com/migrate-create-react-app-typescript-to-create-react-app/) for instructions on how to migrate to Create React App.

Expand Down
1 change: 0 additions & 1 deletion docusaurus/docs/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ You can adjust various development and production settings by setting environmen
| REACT_EDITOR | ✅ Used | 🚫 Ignored | When an app crashes in development, you will see an error overlay with clickable stack trace. When you click on it, Create React App will try to determine the editor you are using based on currently running processes, and open the relevant source file. You can [send a pull request to detect your editor of choice](https://github.com/facebook/create-react-app/issues/2636). Setting this environment variable overrides the automatic detection. If you do it, make sure your systems [PATH](<https://en.wikipedia.org/wiki/PATH_(variable)>) environment variable points to your editor’s bin folder. You can also set it to `none` to disable it completely. |
| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. |
| GENERATE_SOURCEMAP | 🚫 Ignored | ✅ Used | When set to `false`, source maps are not generated for a production build. This solves out of memory (OOM) issues on some smaller machines. |
| NODE_PATH | ✅ Used | ✅ Used | Same as [`NODE_PATH` in Node.js](https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders), but only relative folders are allowed. Can be handy for emulating a monorepo setup by setting `NODE_PATH=src`. |
| INLINE_RUNTIME_CHUNK | 🚫 Ignored | ✅ Used | By default, Create React App will embed the runtime script into `index.html` during the production build. When set to `false`, the script will not be embedded and will be imported as usual. This is normally required when dealing with CSP. |
| IMAGE_INLINE_SIZE_LIMIT | 🚫 Ignored | ✅ Used | By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to 0 will disable the inlining of images. |
| EXTEND_ESLINT | ✅ Used | ✅ Used | When set to `true`, user provided ESLint configs will be used by `eslint-loader`. Note that any rules set to `"error"` will stop the application from building. |
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/custom-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can add whatever files you want in here, but you must have at least the file

This is the configuration file for your template. As this is a new feature, more options will be added over time. For now, only a `package` key is supported.

The `package` key lets you provide any keys/values that you want added to the new project's `package.json`, such as dependencies (only dependencies are supported for now) and any custom scripts that your template relies on.
The `package` key lets you provide any keys/values that you want added to the new project's `package.json`, such as dependencies and any custom scripts that your template relies on.

Below is an example `template.json` file:

Expand Down
Loading

0 comments on commit 89888c4

Please sign in to comment.