Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Sinecycle CRA #2

Merged
merged 9 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -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/
36 changes: 35 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,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"
}
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

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

jobs:
build:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

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

jobs:
lint:
Expand All @@ -15,5 +15,11 @@ jobs:
run: npm i -g npm@8
- name: Install
run: npm ci --prefer-offline
- name: Build
run: npm run build
- name: Alex
run: npm run alex
- name: Prettier
run: npm run prettier -- --list-different
- name: Eslint
run: npm run eslint -- --max-warnings 0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea/
.vscode/
node_modules/
build
build/
.DS_Store
*.tgz
my-app*
Expand Down
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -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/
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
## 5.0.1 (2022-04-12)

Create React App 5.0.1 is a maintenance release that improves compatibility with React 18. We've also updated our templates to use `createRoot` and relaxed our check for older versions of Create React App.

# Migrating from 5.0.0 to 5.0.1

Inside any created project that has not been ejected, run:

```
npm install --save --save-exact react-scripts@5.0.1
```

or

```
yarn add --exact react-scripts@5.0.1
```

#### :bug: Bug Fix

- `react-scripts`
- [#12245](https://github.com/facebook/create-react-app/pull/12245) fix: webpack noise printed only if error or warning ([@Andrew47](https://github.com/Andrew47))
- `create-react-app`
- [#11915](https://github.com/facebook/create-react-app/pull/11915) Warn when not using the latest version of create-react-app but do not exit ([@iansu](https://github.com/iansu))
- `react-dev-utils`
- [#11640](https://github.com/facebook/create-react-app/pull/11640) Ensure posix compliant joins for urls in middleware ([@psiservices-justin-sullard](https://github.com/psiservices-justin-sullard))

#### :nail_care: Enhancement

- `cra-template-typescript`, `cra-template`, `react-scripts`
- [#12220](https://github.com/facebook/create-react-app/pull/12220) Update templates to use React 18 `createRoot` ([@kyletsang](https://github.com/kyletsang))
- `cra-template-typescript`, `cra-template`
- [#12223](https://github.com/facebook/create-react-app/pull/12223) chore: upgrade rtl version to support react 18 ([@MatanBobi](https://github.com/MatanBobi))
- `eslint-config-react-app`
- [#11622](https://github.com/facebook/create-react-app/pull/11622) updated deprecated rules ([@wisammechano](https://github.com/wisammechano))

#### :memo: Documentation

- [#11594](https://github.com/facebook/create-react-app/pull/11594) Fix a typo in deployment.md ([@fishmandev](https://github.com/fishmandev))
- [#11805](https://github.com/facebook/create-react-app/pull/11805) docs: Changelog 5.0.0 ([@jafin](https://github.com/jafin))
- [#11757](https://github.com/facebook/create-react-app/pull/11757) prevent both npm and yarn commands from being copied ([@mubarakn](https://github.com/mubarakn))

#### :house: Internal

- [#11985](https://github.com/facebook/create-react-app/pull/11985) Ignore docs when publishing ([@iansu](https://github.com/iansu))

#### Committers: 11

- Andrew Burnie ([@Andrew47](https://github.com/Andrew47))
- Clément Vannicatte ([@shortcuts](https://github.com/shortcuts))
- Dmitriy Fishman ([@fishmandev](https://github.com/fishmandev))
- Dmitry Vinnik ([@dmitryvinn](https://github.com/dmitryvinn))
- Ian Sutherland ([@iansu](https://github.com/iansu))
- Jason Finch ([@jafin](https://github.com/jafin))
- Kyle Tsang ([@kyletsang](https://github.com/kyletsang))
- Matan Borenkraout ([@MatanBobi](https://github.com/MatanBobi))
- Wisam Naji ([@wisammechano](https://github.com/wisammechano))
- [@mubarakn](https://github.com/mubarakn)
- [@psiservices-justin-sullard](https://github.com/psiservices-justin-sullard)

## 5.0.0 (2021-12-14)

Create React App 5.0 is a major release with several new features and the latest version of all major dependencies.
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/docs/adding-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ To start a new Create React App project with [TypeScript](https://www.typescript
```sh
npx create-react-app my-app --template typescript
```

or

```sh
yarn create react-app my-app --template typescript
```
Expand All @@ -28,7 +30,9 @@ To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React
```sh
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
```

or

```sh
yarn add typescript @types/node @types/react @types/react-dom @types/jest
```
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can adjust various development and production settings by setting environmen
| PORT | ✅ Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
| WDS_SOCKET_HOST | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket hostname for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.hostname` for the SockJS hostname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockhost) for more details. |
| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/ws` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. |
| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/ws` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. |
| WDS_SOCKET_PORT | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket port for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.port` for the SockJS port. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockport) for more details. |
| PUBLIC_URL | ✅ Used | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
| BUILD_PATH | 🚫 Ignored | ✅ Used | By default, Create React App will output compiled assets to a `/build` directory adjacent to your `/src`. You may use this variable to specify a new path for Create React App to output assets. BUILD_PATH should be specified as a path relative to the root of your project. |
Expand All @@ -24,7 +24,7 @@ You can adjust various development and production settings by setting environmen
| 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. |
| 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 | ✅ Used | ✅ 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. |
| IMAGE_INLINE_SIZE_LIMIT | ✅ Used | ✅ 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. |
| FAST_REFRESH | ✅ Used | 🚫 Ignored | When set to `false`, disables experimental support for Fast Refresh to allow you to tweak your components in real time without reloading the page. |
| TSC_COMPILE_ON_ERROR | ✅ Used | ✅ Used | When set to `true`, you can run and properly build TypeScript projects even if there are TypeScript type check errors. These errors are printed as warnings in the terminal and/or browser console. |
| ESLINT_NO_DEV_ERRORS | ✅ Used | 🚫 Ignored | When set to `true`, ESLint errors are converted to warnings during development. As a result, ESLint output will no longer appear in the error overlay. |
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/loading-graphql-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can also use the `gql` template tag the same way you would use the non-macro

```js
import { gql } from 'graphql.macro';

const query = gql`
query User {
user(id: 5) {
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/proxying-api-requests-in-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
```js
const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
module.exports = function (app) {
// ...
};
```
Expand All @@ -97,7 +97,7 @@ You can now register proxies as you wish! Here's an example using the above `htt
```js
const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
module.exports = function (app) {
app.use(
'/api',
createProxyMiddleware({
Expand Down
11 changes: 5 additions & 6 deletions docusaurus/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';

const siteConfig = {
title: 'Create React App',
Expand Down Expand Up @@ -43,8 +44,8 @@ const siteConfig = {
isCloseable: false,
},
algolia: {
appId: 'create-react-app',
apiKey: '3be60f4f8ffc24c75da84857d6323791',
appId: 'AUJYIQ70HN',
apiKey: '25243dbf9049cf036e87f64b361bd2b9',
indexName: 'create-react-app',
},
navbar: {
Expand Down Expand Up @@ -88,8 +89,7 @@ const siteConfig = {
items: [
{
label: 'Stack Overflow',
href:
'https://stackoverflow.com/questions/tagged/create-react-app',
href: 'https://stackoverflow.com/questions/tagged/create-react-app',
},
{
label: 'GitHub Discussions',
Expand All @@ -101,8 +101,7 @@ const siteConfig = {
},
{
label: 'Contributor Covenant',
href:
'https://www.contributor-covenant.org/version/1/4/code-of-conduct',
href: 'https://www.contributor-covenant.org/version/1/4/code-of-conduct',
},
],
},
Expand Down
Loading