Skip to content

Commit 910b61c

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into fix/37896-composer-not-clearing-on-send
2 parents 5b27dff + cc4626f commit 910b61c

File tree

290 files changed

+8241
-2171
lines changed

Some content is hidden

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

290 files changed

+8241
-2171
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'Check React compiler'
2+
description: 'Compares two lists of compiled files and fails a job if previously successfully compiled files are no longer compiled successfully'
3+
inputs:
4+
OLD_LIST:
5+
description: List of compiled files from the previous commit
6+
required: true
7+
NEW_LIST:
8+
description: List of compiled files from the current commit
9+
required: true
10+
runs:
11+
using: 'node20'
12+
main: 'index.js'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* eslint-disable @typescript-eslint/naming-convention */
2+
import * as core from '@actions/core';
3+
4+
type ReactCompilerOutput = {
5+
success: string[];
6+
failure: string[];
7+
};
8+
9+
const run = function (): Promise<void> {
10+
const oldList = JSON.parse(core.getInput('OLD_LIST', {required: true})) as ReactCompilerOutput;
11+
const newList = JSON.parse(core.getInput('NEW_LIST', {required: true})) as ReactCompilerOutput;
12+
13+
const errors: string[] = [];
14+
15+
oldList.success.forEach((file) => {
16+
if (newList.success.includes(file) || !newList.failure.includes(file)) {
17+
return;
18+
}
19+
20+
errors.push(file);
21+
});
22+
23+
if (errors.length > 0) {
24+
errors.forEach((error) => console.error(error));
25+
throw new Error(
26+
'Some files could be compiled with react-compiler before successfully, but now they can not be compiled. Check https://github.com/Expensify/App/blob/main/contributingGuides/REACT_COMPILER.md documentation to see how you can fix this.',
27+
);
28+
}
29+
30+
return Promise.resolve();
31+
};
32+
33+
if (require.main === module) {
34+
run();
35+
}
36+
37+
export default run;

0 commit comments

Comments
 (0)