Skip to content

Commit ad43669

Browse files
committed
Prettier formatting
1 parent 62fc1dd commit ad43669

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

scripts/lerna-fix.mjs

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
import fs from 'fs';
22
import path from 'path';
33

4-
54
function main() {
6-
const folder = fs.realpathSync('.');
7-
const pkg = readPackageJson(folder);
8-
if (pkg.gitHead) {
9-
const fpath = path.join(folder, 'package.json');
10-
console.debug(`Deleting gitHead from ${fpath}...`);
11-
delete pkg.gitHead;
12-
fs.writeFileSync(fpath, JSON.stringify(pkg, null, 2) + '\n');
13-
}
14-
}
15-
16-
function readJsonFile(fpath) {
17-
const content = fs.readFileSync(fpath);
18-
return JSON.parse(content);
19-
}
20-
21-
function readPackageJson(folder) {
22-
const packageJsonPath = path.join(folder, 'package.json');
23-
return readJsonFile(packageJsonPath);
5+
const folder = fs.realpathSync('.');
6+
const pkg = readPackageJson(folder);
7+
if (pkg.gitHead) {
8+
const fpath = path.join(folder, 'package.json');
9+
console.debug(`Deleting gitHead from ${fpath}...`);
10+
delete pkg.gitHead;
11+
fs.writeFileSync(fpath, JSON.stringify(pkg, null, 2) + '\n');
2412
}
25-
26-
main();
13+
}
14+
15+
function readJsonFile(fpath) {
16+
const content = fs.readFileSync(fpath);
17+
return JSON.parse(content);
18+
}
19+
20+
function readPackageJson(folder) {
21+
const packageJsonPath = path.join(folder, 'package.json');
22+
return readJsonFile(packageJsonPath);
23+
}
24+
25+
main();

web-test-runner.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { esbuildPlugin } from '@web/dev-server-esbuild';
33
export default {
44
nodeResolve: true,
55
files: 'packages/**/*.test.ts',
6-
plugins: [esbuildPlugin({ ts: true, target: 'auto' })]
7-
};
6+
plugins: [esbuildPlugin({ ts: true, target: 'auto' })],
7+
};

0 commit comments

Comments
 (0)