Bump Prettier (#12622)
Dan Abramov committed
Apr 17, 2018 at 01:43 UTC
b05e67e36a7c75f63aa47e716004f4d21f1d0bdc
12 files changed
+25
-43
package.json
+1
-1
@@ -79,7 +79,7 @@
79
"ncp": "^2.0.0",
80
"object-assign": "^4.1.1",
81
"platform": "^1.1.0",
82
- "prettier": "1.8.1",
82
+ "prettier": "1.11.1",
83
"prop-types": "^15.6.0",
84
"random-seed": "^0.3.0",
85
"react-lifecycles-compat": "^1.0.2",
packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js
+2
-6
@@ -53,9 +53,7 @@ module.exports = function(initModules) {
53
console.error.calls.count() !== 0
54
) {
55
console.log(
56
- `We expected ${
57
- count
58
- } warning(s), but saw ${console.error.calls.count()} warning(s).`,
56
+ `We expected ${count} warning(s), but saw ${console.error.calls.count()} warning(s).`,
57
);
58
if (console.error.calls.count() > 0) {
59
console.log(`We saw these warnings:`);
@@ -237,9 +235,7 @@ module.exports = function(initModules) {
235
testFn(clientCleanRender));
236
it(`renders ${desc} with client render on top of good server markup`, () =>
237
testFn(clientRenderOnServerString));
240
- it(`renders ${
241
- desc
242
- } with client render on top of bad server markup`, async () => {
238
+ it(`renders ${desc} with client render on top of bad server markup`, async () => {
239
try {
240
await testFn(clientRenderOnBadMarkup);
241
} catch (x) {
packages/react-dom/src/events/__tests__/SyntheticEvent-test.js
+1
-3
@@ -147,9 +147,7 @@ describe('SyntheticEvent', () => {
147
148
const getExpectedWarning = property =>
149
'Warning: This synthetic event is reused for performance reasons. If ' +
150
- `you're seeing this, you're accessing the property \`${
151
- property
152
- }\` on a ` +
150
+ `you're seeing this, you're accessing the property \`${property}\` on a ` +
151
'released/nullified synthetic event. This is set to null. If you must ' +
152
'keep the original synthetic event around, use event.persist(). ' +
153
'See https://fb.me/react-event-pooling for more information.';
packages/react-reconciler/src/ReactDebugFiberPerf.js
+2
-6
@@ -259,9 +259,7 @@ export function stopRequestCallbackTimer(
259
isWaitingForCallback = false;
260
const warning = didExpire ? 'React was blocked by main thread' : null;
261
endMark(
262
- `(Waiting for async callback... will force flush in ${
263
- expirationTime
264
- } ms)`,
262
+ `(Waiting for async callback... will force flush in ${expirationTime} ms)`,
263
'(Waiting for async callback...)',
264
warning,
265
);
@@ -385,9 +383,7 @@ export function stopWorkLoopTimer(
383
warning = 'A top-level update interrupted the previous render';
384
} else {
385
const componentName = getComponentName(interruptedBy) || 'Unknown';
388
- warning = `An update to ${
389
- componentName
390
- } interrupted the previous render`;
386
+ warning = `An update to ${componentName} interrupted the previous render`;
387
}
388
} else if (commitCountInCurrentWorkLoop > 1) {
389
warning = 'There were cascading updates';
packages/react-reconciler/src/ReactFiberErrorLogger.js
+1
-3
@@ -48,9 +48,7 @@ export function logCapturedError(capturedError: CapturedError): void {
48
`using the error boundary you provided, ${errorBoundaryName}.`;
49
} else {
50
errorBoundaryMessage =
51
- `This error was initially handled by the error boundary ${
52
- errorBoundaryName
53
- }.\n` +
51
+ `This error was initially handled by the error boundary ${errorBoundaryName}.\n` +
52
`Recreating the tree from scratch failed so React will unmount the tree.`;
53
}
54
} else {
packages/react-reconciler/src/__tests__/ReactNewContext-test.internal.js
+1
-3
@@ -1123,9 +1123,7 @@ describe('ReactNewContext', () => {
1123
expectedValues[key] = value;
1124
} else if (value !== expectedValue) {
1125
throw new Error(
1126
- `Inconsistent value! Expected: ${key}:${expectedValue}. Actual: ${
1127
- text
1128
- }`,
1126
+ `Inconsistent value! Expected: ${key}:${expectedValue}. Actual: ${text}`,
1127
);
1128
}
1129
});
packages/react-reconciler/src/forks/ReactFiberErrorDialog.native.js
+1
-3
@@ -30,9 +30,7 @@ export function showErrorDialog(capturedError: CapturedError): boolean {
30
errorToHandle = error;
31
32
try {
33
- errorToHandle.message = `${summary}\n\nThis error is located at:${
34
- componentStack
35
- }`;
33
+ errorToHandle.message = `${summary}\n\nThis error is located at:${componentStack}`;
34
} catch (e) {}
35
} else if (typeof error === 'string') {
36
errorToHandle = new Error(
scripts/jest/config.build.js
+3
-3
@@ -19,9 +19,9 @@ packages.forEach(name => {
19
// Root entry point
20
moduleNameMapper[`^${name}$`] = `<rootDir>/build/node_modules/${name}`;
21
// Named entry points
22
- moduleNameMapper[`^${name}/(.*)$`] = `<rootDir>/build/node_modules/${
23
- name
24
- }/$1`;
22
+ moduleNameMapper[
23
+ `^${name}/(.*)$`
24
+ ] = `<rootDir>/build/node_modules/${name}/$1`;
25
});
26
27
module.exports = Object.assign({}, sourceConfig, {
scripts/jest/setupTests.js
+5
-5
@@ -105,11 +105,11 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) {
105
`1. Using the ${chalk.bold('.toWarnDev()')} / ${chalk.bold(
106
'.toLowPriorityWarnDev()'
107
)} matchers, or...\n` +
108
- `2. Mock it out using ${chalk.bold('spyOnDev')}(console, '${
109
- methodName
110
- }') or ${chalk.bold('spyOnProd')}(console, '${
111
- methodName
112
- }'), and test that the warning occurs.`;
108
+ `2. Mock it out using ${chalk.bold(
109
+ 'spyOnDev'
110
+ )}(console, '${methodName}') or ${chalk.bold(
111
+ 'spyOnProd'
112
+ )}(console, '${methodName}'), and test that the warning occurs.`;
113
114
throw new Error(`${message}\n\n${messages.join('\n\n')}`);
115
}
scripts/release/build-commands/print-post-build-summary.js
+2
-6
@@ -36,17 +36,13 @@ module.exports = ({cwd, dry, path, version}) => {
36
Here are a few things to keep in mind:
37
• The changes should be easy to understand. (Friendly one-liners are better than PR titles.)
38
• Make sure all contributors are credited.
39
- • Verify that the markup is valid by previewing it in the editor: {blue.bold ${
40
- CHANGELOG_PATH
41
- }}
39
+ • Verify that the markup is valid by previewing it in the editor: {blue.bold ${CHANGELOG_PATH}}
40
41
{bold.underline Step 2: Smoke test the packages}
42
43
1. Open {yellow.bold ${standaloneFixturePath}} in the browser.
44
2. It should say {italic "Hello world!"}
47
- 3. Next go to {yellow.bold ${
48
- packagingFixturesPath
49
- }} and run {bold node build-all.js}
45
+ 3. Next go to {yellow.bold ${packagingFixturesPath}} and run {bold node build-all.js}
46
4. Install the "serve" module ({bold npm install -g serve})
47
5. Go to the repo root and {bold serve -s .}
48
6. Open {blue.bold http://localhost:5000/fixtures/packaging}
scripts/release/publish-commands/publish-to-npm.js
+1
-3
@@ -49,9 +49,7 @@ const push = async ({cwd, dry, packages, version, tag}) => {
49
if (remoteVersion !== packageVersion) {
50
throw Error(
51
chalk`Published version {yellow.bold ${packageVersion}} for ` +
52
- chalk`{bold ${project}} but NPM shows {yellow.bold ${
53
- remoteVersion
54
- }}`
52
+ chalk`{bold ${project}} but NPM shows {yellow.bold ${remoteVersion}}`
53
);
54
}
55
yarn.lock
+5
-1
@@ -4293,7 +4293,11 @@ preserve@^0.2.0:
4293
version "0.2.0"
4294
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
4295
4296
-prettier@1.8.1, prettier@^1.0.0:
4296
+prettier@1.11.1:
4297
+ version "1.11.1"
4298
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
4299
+
4300
+prettier@^1.0.0:
4301
version "1.8.1"
4302
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.1.tgz#91064d778c08c85ac1cbe6b23195c34310d039f9"
4303