Skip to content

Commit 91ffdb0

Browse files
authored
Upgrade to Node 12 LTS (#2831)
* Upgrade to node 12 LTS * Run prettier
1 parent be17215 commit 91ffdb0

File tree

11 files changed

+6814
-5860
lines changed

11 files changed

+6814
-5860
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:8
5+
- image: circleci/node:12
66
steps:
77
- checkout
88
- restore_cache:
99
keys:
10-
- dependencies-{{ checksum "yarn.lock" }}
10+
- dependencies-{{ checksum "yarn.lock" }}
1111
- run:
1212
name: Install
1313
command: yarn install --pure-lockfile

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/carbon
1+
lts/erbium

content/blog/2020-02-26-react-v16.13.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Warning: Cannot update a component from inside the function body of a different
2121

2222
**This warning will help you find application bugs caused by unintentional state changes.** In the rare case that you intentionally want to change the state of another component as a result of rendering, you can wrap the `setState` call into `useEffect`.
2323

24-
### Warnings for conflicting style rules
24+
### Warnings for conflicting style rules {#warnings-for-conflicting-style-rules}
2525

2626
When dynamically applying a `style` that contains longhand and shorthand versions of CSS properties, particular combinations of updates can cause inconsistent styling. For example:
2727

examples/uncontrolled-components/input-type-file.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ class FileInput extends React.Component {
99
// highlight-range{4}
1010
event.preventDefault();
1111
alert(
12-
`Selected file - ${
13-
this.fileInput.current.files[0].name
14-
}`
12+
`Selected file - ${this.fileInput.current.files[0].name}`
1513
);
1614
}
1715

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"gatsby-plugin-netlify": "^2.0.0",
2828
"gatsby-plugin-nprogress": "^2.0.0",
2929
"gatsby-plugin-react-helmet": "^3.0.0",
30-
"gatsby-plugin-sharp": "^2.0.0",
30+
"gatsby-plugin-sharp": "^2.4.12",
3131
"gatsby-plugin-twitter": "^2.0.0",
3232
"gatsby-remark-code-repls": "^2.0.0",
3333
"gatsby-remark-copy-linked-files": "^2.0.0",
@@ -39,7 +39,7 @@
3939
"gatsby-remark-smartypants": "^2.0.0",
4040
"gatsby-source-filesystem": "^2.0.0",
4141
"gatsby-transformer-remark": "^2.0.0",
42-
"gatsby-transformer-sharp": "^2.0.0",
42+
"gatsby-transformer-sharp": "^2.3.18",
4343
"github-slugger": "^1.2.1",
4444
"glamor": "^2.20.40",
4545
"hex2rgba": "^0.0.1",
@@ -58,7 +58,7 @@
5858
"unist-util-visit": "^1.1.3"
5959
},
6060
"engines": {
61-
"node": ">8.4.0",
61+
"node": "12.x.x",
6262
"yarn": "^1.3.2"
6363
},
6464
"homepage": "https://reactjs.org/",

plugins/gatsby-source-react-error-codes/gatsby-node.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ exports.sourceNodes = async ({actions}) => {
2020
});
2121
} catch (error) {
2222
console.error(
23-
`The gatsby-source-react-error-codes plugin has failed:\n${
24-
error.message
25-
}`,
23+
`The gatsby-source-react-error-codes plugin has failed:\n${error.message}`,
2624
);
2725

2826
process.exit(1);

plugins/gatsby-transformer-versions-yaml/gatsby-node.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ exports.onPostBuild = async ({store}) => {
2020

2121
// versions.yml structure is [{path: string, url: string, ...}, ...]
2222
createRedirects(
23-
versions.filter(version => version.path && version.url).map(version => ({
24-
fromPath: version.path,
25-
toPath: version.url,
26-
})),
23+
versions
24+
.filter(version => version.path && version.url)
25+
.map(version => ({
26+
fromPath: version.path,
27+
toPath: version.url,
28+
})),
2729
redirectsFilePath,
2830
);
2931
};

src/components/MarkdownPage/MarkdownPage.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ const MarkdownPage = ({
112112
<div css={{marginTop: 80}}>
113113
<a
114114
css={sharedStyles.articleLayout.editLink}
115-
href={`https://github.com/reactjs/reactjs.org/tree/master/${
116-
markdownRemark.fields.path
117-
}`}>
115+
href={`https://github.com/reactjs/reactjs.org/tree/master/${markdownRemark.fields.path}`}>
118116
Edit this page
119117
</a>
120118
</div>

src/theme.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ const media = {
5555
if (SIZES[largeKey].max === Infinity) {
5656
return `@media (min-width: ${SIZES[smallKey].min}px)`;
5757
} else {
58-
return `@media (min-width: ${SIZES[smallKey].min}px) and (max-width: ${
59-
SIZES[largeKey].max
60-
}px)`;
58+
return `@media (min-width: ${SIZES[smallKey].min}px) and (max-width: ${SIZES[largeKey].max}px)`;
6159
}
6260
}
6361
},

src/utils/sectionList.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ import navDocs from '../../content/docs/nav.yml';
1212
// $FlowExpectedError
1313
import navTutorial from '../../content/tutorial/nav.yml';
1414

15-
const sectionListDocs = navDocs.map(
16-
(item: Object): Object => ({
17-
...item,
18-
directory: 'docs',
19-
}),
20-
);
15+
const sectionListDocs = navDocs.map((item: Object): Object => ({
16+
...item,
17+
directory: 'docs',
18+
}));
2119

22-
const sectionListCommunity = navCommunity.map(
23-
(item: Object): Object => ({
24-
...item,
25-
directory: 'community',
26-
}),
27-
);
20+
const sectionListCommunity = navCommunity.map((item: Object): Object => ({
21+
...item,
22+
directory: 'community',
23+
}));
2824

2925
export {
3026
sectionListCommunity,

0 commit comments

Comments
 (0)