Skip to content

Commit 8d4c8f2

Browse files
committed
Ran prettier
1 parent 58a58ca commit 8d4c8f2

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

packages/node-tests/rolldown.config.mts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ function readGypTargetNames(gypFilePath: string): string[] {
99
const contents = JSON.parse(fs.readFileSync(gypFilePath, "utf-8")) as unknown;
1010
assert(
1111
typeof contents === "object" && contents !== null,
12-
"Expected gyp file to contain a valid JSON object"
12+
"Expected gyp file to contain a valid JSON object",
1313
);
1414
assert("targets" in contents, "Expected targets in gyp file");
1515
const { targets } = contents;
1616
assert(Array.isArray(targets), "Expected targets to be an array");
1717
return targets.map(({ target_name }) => {
1818
assert(
1919
typeof target_name === "string",
20-
"Expected target_name to be a string"
20+
"Expected target_name to be a string",
2121
);
2222
return target_name;
2323
});
@@ -46,23 +46,23 @@ function testSuiteConfig(suitePath: string): RolldownOptions[] {
4646
targetNames.map((targetName) => [
4747
`require(\`./build/\${common.buildType}/${targetName}\`)`,
4848
`require("./build/Release/${targetName}")`,
49-
])
49+
]),
5050
),
5151
{
5252
delimiters: ["", ""],
53-
}
53+
},
5454
),
5555
replacePlugin(
5656
Object.fromEntries(
5757
targetNames.map((targetName) => [
5858
// Replace "__require" statement with a regular "require" to allow Metro to resolve it
5959
`__require("./build/Release/${targetName}")`,
6060
`require("./build/Release/${targetName}")`,
61-
])
61+
]),
6262
),
6363
{
6464
delimiters: ["", ""],
65-
}
65+
},
6666
),
6767
aliasPlugin({
6868
entries: [
@@ -86,8 +86,8 @@ const suitePaths = fs
8686
.map((dirent) =>
8787
path.join(
8888
path.relative(import.meta.dirname, dirent.parentPath),
89-
dirent.name
90-
)
89+
dirent.name,
90+
),
9191
);
9292

9393
export default defineConfig(suitePaths.flatMap(testSuiteConfig));

packages/node-tests/scripts/build-tests.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ for (const projectPath of projectPaths) {
1010
console.log(
1111
`Running "cmake-rn" in ${path.relative(
1212
rootPath,
13-
projectPath
14-
)} to build for React Native`
13+
projectPath,
14+
)} to build for React Native`,
1515
);
1616
spawnSync("cmake-rn", [], { cwd: projectPath, stdio: "inherit" });
1717
}

packages/node-tests/scripts/copy-tests.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ console.log("Copying files to", TESTS_DIR);
2424
if (!fs.existsSync(NODE_REPO_DIR)) {
2525
console.log(
2626
"Sparse and shallow cloning Node.js repository to",
27-
NODE_REPO_DIR
27+
NODE_REPO_DIR,
2828
);
2929

3030
// Init a new git repository
@@ -43,7 +43,7 @@ if (!fs.existsSync(NODE_REPO_DIR)) {
4343
{
4444
stdio: "inherit",
4545
cwd: NODE_REPO_DIR,
46-
}
46+
},
4747
);
4848
// Pull the latest changes from the master branch
4949
console.log("Pulling latest changes from Node.js repository...");
@@ -61,7 +61,7 @@ for (const src of ALLOW_LIST) {
6161

6262
if (fs.existsSync(destPath)) {
6363
console.warn(
64-
`Destination path ${destPath} already exists - skipping copy of ${src}.`
64+
`Destination path ${destPath} already exists - skipping copy of ${src}.`,
6565
);
6666
continue;
6767
}

packages/node-tests/scripts/generate-entrypoint.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function suiteToString(suite: TestSuite, indent = 1): string {
4040
} else {
4141
return `${padding}"${key}": {\n${suiteToString(
4242
value,
43-
indent + 1
43+
indent + 1,
4444
)}\n${padding}}`;
4545
}
4646
})
@@ -52,11 +52,11 @@ const comment = "Generated by ./scripts/generate-entrypoint.mts";
5252
console.log(
5353
`Writing entrypoint to ${path.relative(
5454
import.meta.dirname,
55-
entrypointPath
56-
)} for ${testPaths.length} tests ...`
55+
entrypointPath,
56+
)} for ${testPaths.length} tests ...`,
5757
);
5858

5959
fs.writeFileSync(
6060
entrypointPath,
61-
`/* ${comment} */\nmodule.exports.suites = {\n${suiteToString(suites)}\n};`
61+
`/* ${comment} */\nmodule.exports.suites = {\n${suiteToString(suites)}\n};`,
6262
);

0 commit comments

Comments
 (0)