Skip to content

Commit ebcd248

Browse files
authored
Merge pull request Expensify#63118 from Expensify/Rory-BumpPrettier
[No QA] Upgrade prettier to 3.5.3
2 parents 8e725d5 + 8b84d7d commit ebcd248

146 files changed

Lines changed: 559 additions & 500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/javascript/authorChecklist/categories/newComponentCategory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function detectReactComponentInFile(filename: string): Promise<boolean | u
9191
};
9292
try {
9393
const {data} = await GithubUtils.octokit.repos.getContent(params);
94-
const content = nodeBase64ToUtf8('content' in data ? data?.content ?? '' : '');
94+
const content = nodeBase64ToUtf8('content' in data ? (data?.content ?? '') : '');
9595
return detectReactComponent(content, filename);
9696
} catch (error) {
9797
console.error('An unknown error occurred with the GitHub API: ', error, params);

.github/actions/javascript/authorChecklist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15419,7 +15419,7 @@ async function detectReactComponentInFile(filename) {
1541915419
};
1542015420
try {
1542115421
const { data } = await GithubUtils_1.default.octokit.repos.getContent(params);
15422-
const content = nodeBase64ToUtf8('content' in data ? data?.content ?? '' : '');
15422+
const content = nodeBase64ToUtf8('content' in data ? (data?.content ?? '') : '');
1542315423
return detectReactComponent(content, filename);
1542415424
}
1542515425
catch (error) {

.github/actions/javascript/createOrUpdateStagingDeploy/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12321,7 +12321,7 @@ const replacer = (str) => ({
1232112321
'\r': '\\r',
1232212322
'\f': '\\f',
1232312323
'"': '\\"',
12324-
}[str] ?? '');
12324+
})[str] ?? '';
1232512325
/**
1232612326
* Replace any characters in the string that will break JSON.parse for our Git Log output
1232712327
*

.github/actions/javascript/getDeployPullRequestList/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12358,7 +12358,7 @@ const replacer = (str) => ({
1235812358
'\r': '\\r',
1235912359
'\f': '\\f',
1236012360
'"': '\\"',
12361-
}[str] ?? '');
12361+
})[str] ?? '';
1236212362
/**
1236312363
* Replace any characters in the string that will break JSON.parse for our Git Log output
1236412364
*

.github/actions/javascript/getPreviousVersion/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3018,7 +3018,7 @@ const replacer = (str) => ({
30183018
'\r': '\\r',
30193019
'\f': '\\f',
30203020
'"': '\\"',
3021-
}[str] ?? '');
3021+
})[str] ?? '';
30223022
/**
30233023
* Replace any characters in the string that will break JSON.parse for our Git Log output
30243024
*

.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,30 @@ function getTestBuildMessage(): string {
1313
[inputs[3]]: 'Web',
1414
};
1515

16-
const result = inputs.reduce((acc, platform) => {
17-
const input = core.getInput(platform, {required: false});
16+
const result = inputs.reduce(
17+
(acc, platform) => {
18+
const input = core.getInput(platform, {required: false});
1819

19-
if (!input) {
20-
acc[platform] = {link: 'N/A', qrCode: 'N/A'};
21-
return acc;
22-
}
20+
if (!input) {
21+
acc[platform] = {link: 'N/A', qrCode: 'N/A'};
22+
return acc;
23+
}
2324

24-
const isSuccess = input === 'success';
25+
const isSuccess = input === 'success';
2526

26-
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
27-
const qrCode = isSuccess
28-
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
29-
: `The QR code can't be generated, because the ${names[platform]} build failed`;
27+
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
28+
const qrCode = isSuccess
29+
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
30+
: `The QR code can't be generated, because the ${names[platform]} build failed`;
3031

31-
acc[platform] = {
32-
link,
33-
qrCode,
34-
};
35-
return acc;
36-
}, {} as Record<TupleToUnion<typeof inputs>, {link: string; qrCode: string}>);
32+
acc[platform] = {
33+
link,
34+
qrCode,
35+
};
36+
return acc;
37+
},
38+
{} as Record<TupleToUnion<typeof inputs>, {link: string; qrCode: string}>,
39+
);
3740

3841
const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube:
3942
| Android :robot: | iOS :apple: |

.github/libs/sanitizeStringForJSONParse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const replacer = (str: string): string =>
88
'\r': '\\r',
99
'\f': '\\f',
1010
'"': '\\"',
11-
}[str] ?? '');
11+
})[str] ?? '';
1212

1313
/**
1414
* Replace any characters in the string that will break JSON.parse for our Git Log output

.github/workflows/prettier.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ jobs:
2828

2929
- name: Verify there's no Prettier diff
3030
run: |
31-
npm run prettier -- --loglevel silent
31+
npm run prettier -- --log-level silent
3232
if ! git diff --name-only --exit-code; then
3333
# shellcheck disable=SC2016
3434
echo 'Error: Prettier diff detected! Please run `npm run prettier` and commit the changes.'
3535
exit 1
3636
fi
37-
38-
- name: Run unused style searcher
39-
shell: bash
40-
run: ./.github/scripts/findUnusedKeys.sh

package-lock.json

Lines changed: 6 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@
329329
"patch-package": "^8.1.0-canary.1",
330330
"peggy": "^4.0.3",
331331
"portfinder": "^1.0.28",
332-
"prettier": "^2.8.8",
332+
"prettier": "3.5.3",
333333
"react-compiler-healthcheck": "^19.0.0-beta-8a03594-20241020",
334334
"react-compiler-runtime": "^19.0.0-beta-8a03594-20241020",
335335
"react-is": "^18.3.1",

0 commit comments

Comments
 (0)