Skip to content

Commit 6f9083b

Browse files
author
Morten N.O. Henriksen
committed
Breaking: Remove support for Flow
Currently swc doesn't support Flow they are considering it, if they do we can revert this commit swc-project/swc#256
1 parent 44a7c21 commit 6f9083b

File tree

8 files changed

+6
-57
lines changed

8 files changed

+6
-57
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Please refer to the [User Guide](https://facebook.github.io/create-react-app/doc
148148

149149
Your environment will have everything you need to build a modern single-page React app:
150150

151-
- React, JSX, ES6, TypeScript and Flow syntax support.
151+
- React, JSX, ES6 and TypeScript syntax support.
152152
- Language extras beyond ES6 like the object spread operator.
153153
- Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
154154
- A fast interactive unit test runner with built-in support for coverage reporting.

docusaurus/docs/adding-a-sass-stylesheet.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ To use imports relative to a path you specify, you can add a [`.env` file](https
4444
4545
> **Tip:** You can opt into using this feature with [CSS modules](adding-a-css-modules-stylesheet.md) too!
4646
47-
> **Note:** If you're using Flow, override the [module.file_ext](https://flow.org/en/docs/config/options/#toc-module-file-ext-string) setting in your `.flowconfig` so it'll recognize `.sass` or `.scss` files. You will also need to include the `module.file_ext` default settings for `.js`, `.jsx`, `.mjs` and `.json` files.
48-
>
49-
> ```
50-
> [options]
51-
> module.file_ext=.js
52-
> module.file_ext=.jsx
53-
> module.file_ext=.mjs
54-
> module.file_ext=.json
55-
> module.file_ext=.sass
56-
> module.file_ext=.scss
57-
> ```
58-
5947
> **Note:** LibSass and the packages built on top of it, including Node Sass, are [deprecated](https://sass-lang.com/blog/libsass-is-deprecated).
6048
> If you're a user of Node Sass, you can migrate to Dart Sass by replacing `node-sass` in your `package.json` file with `sass` or by running the following commands:
6149
>

docusaurus/docs/adding-flow.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docusaurus/docs/proxying-api-requests-in-development.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
8787
```js
8888
const { createProxyMiddleware } = require('http-proxy-middleware');
8989

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

100-
module.exports = function(app) {
100+
module.exports = function (app) {
101101
app.use(
102102
'/api',
103103
createProxyMiddleware({
@@ -110,6 +110,6 @@ module.exports = function(app) {
110110

111111
> **Note:** You do not need to import this file anywhere. It is automatically registered when you start the development server.
112112
113-
> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc).
113+
> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for ES Modules, etc).
114114
115115
> **Note:** Passing the path to the proxy function allows you to use globbing and/or pattern matching on the path, which is more flexible than the express route matching.

docusaurus/docs/supported-browsers-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This project supports a superset of the latest JavaScript standard. In addition
1717
- [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread) (ES2018).
1818
- [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 4 proposal)
1919
- [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal).
20-
- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html), [Flow](./adding-flow) and [TypeScript](./adding-typescript).
20+
- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [TypeScript](./adding-typescript).
2121

2222
Learn more about [different proposal stages](https://tc39.github.io/process-document/).
2323

docusaurus/website/sidebars.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"importing-a-component",
3131
"using-global-variables",
3232
"adding-bootstrap",
33-
"adding-flow",
3433
"adding-typescript",
3534
"adding-relay",
3635
"adding-a-router",

packages/react-scripts/config/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ module.exports = function (webpackEnv) {
371371
},
372372
},
373373
// Process application JS with swc.
374-
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
374+
// The preset includes JSX, TypeScript, and some ESnext features.
375375
{
376376
test: /\.(js|mjs|jsx)$/,
377377
include: paths.appSrc,

packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ async function load() {
1717
];
1818
}
1919

20-
/* eslint-disable */
21-
// Regression test for https://github.com/facebook/create-react-app/issues/3055
22-
const x = async (
23-
/* prettier-ignore */
24-
y: void
25-
) => {
26-
const z = await y;
27-
};
28-
/* eslint-enable */
29-
3020
export default class AsyncAwait extends Component {
3121
static propTypes = {
3222
onReady: PropTypes.func.isRequired,

0 commit comments

Comments
 (0)