Skip to content

Commit 73bf802

Browse files
authored
chore: fix lint error (#477)
* chore: fix lint error * chore: fix lint error * chore: fix lint error
1 parent 47cb015 commit 73bf802

File tree

7 files changed

+89
-32
lines changed

7 files changed

+89
-32
lines changed

apps/chrome-extension/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"@ant-design/icons": "^5.3.1",
1515
"@midscene/visualizer": "workspace:*",
1616
"@midscene/web": "workspace:*",
17-
"antd": "5.21.6",
18-
"dayjs": "^1.11.11",
17+
"antd": "^5.21.6",
18+
"dayjs": "1.11.11",
1919
"react": "^18.3.1",
2020
"react-dom": "^18.3.1"
2121
},
@@ -28,6 +28,7 @@
2828
"@types/react": "^18.3.18",
2929
"@types/react-dom": "^18.3.5",
3030
"less": "^4.2.0",
31-
"typescript": "^5.8.2"
31+
"typescript": "^5.8.2",
32+
"archiver": "^6.0.0"
3233
}
3334
}

apps/chrome-extension/scripts/pack-extension.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
import fs from 'node:fs';
44
import path from 'node:path';
5-
import {
6-
fileURLToPath
7-
} from 'node:url';
5+
import { fileURLToPath } from 'node:url';
86
import archiver from 'archiver';
97

108
// Get the directory path of the current file
11-
const __filename = fileURLToPath(
12-
import.meta.url);
9+
const __filename = fileURLToPath(import.meta.url);
1310
const __dirname = path.dirname(__filename);
1411

1512
// Read package.json
@@ -47,13 +44,15 @@ if (fs.existsSync(zipFilePath)) {
4744
const output = fs.createWriteStream(zipFilePath);
4845
const archive = archiver('zip', {
4946
zlib: {
50-
level: 9
51-
} // Sets the compression level
47+
level: 9,
48+
}, // Sets the compression level
5249
});
5350

5451
// Listen for all archive data to be written
5552
output.on('close', () => {
56-
console.log(`Extension packed successfully: ${zipFileName} (${archive.pointer()} total bytes saved in extension directory)`);
53+
console.log(
54+
`Extension packed successfully: ${zipFileName} (${archive.pointer()} total bytes saved in extension directory)`,
55+
);
5756
});
5857

5958
// Handle warnings and errors
@@ -78,4 +77,4 @@ archive.pipe(output);
7877
archive.directory(distDir, false);
7978

8079
// Finalize the archive (i.e. we are done appending files but streams have to finish yet)
81-
archive.finalize();
80+
archive.finalize();

apps/site/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"packageManager": "[email protected]",
1515
"dependencies": {
1616
"querystring": "0.2.1",
17-
"react": "^18.2.0",
18-
"react-dom": "^18.2.0",
17+
"react": "^18.3.1",
18+
"react-dom": "^18.3.1",
1919
"rspress": "^1.41.0"
2020
},
2121
"devDependencies": {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"version": "0.12.7",
55
"scripts": {
6-
"build": "nx run-many --target=build --projects=@midscene/core,@midscene/shared,@midscene/visualizer,@midscene/web,@midscene/cli --verbose --skipNxCache",
6+
"build": "nx run-many --target=build --projects=@midscene/core,@midscene/shared,@midscene/visualizer,@midscene/web,@midscene/cli,chrome-extension --verbose --skipNxCache",
77
"test": "nx run-many --target=test --projects=@midscene/core,--projects=@midscene/shared,@midscene/visualizer,@midscene/web,@midscene/cli --verbose",
88
"test:ai": "nx run-many --target=test:ai --projects=@midscene/core,@midscene/web --verbose",
99
"e2e": "nx run @midscene/web:e2e --verbose",

packages/visualizer/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
"@pixi/unsafe-eval": "7.4.2",
5757
"@types/chrome": "0.0.279",
5858
"@types/node": "^18.0.0",
59-
"@types/react": "^18.3.3",
60-
"@types/react-dom": "^18.3.0",
59+
"@types/react": "^18.3.18",
60+
"@types/react-dom": "^18.3.5",
6161
"antd": "^5.21.6",
6262
"dayjs": "1.11.11",
6363
"execa": "9.3.0",

pnpm-lock.yaml

+66-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/release.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ const semver = require('semver');
44
const dayjs = require('dayjs');
55
const args = require('minimist')(process.argv.slice(2));
66
const bumpPrompt = require('@jsdevtools/version-bump-prompt');
7-
const {
8-
execa
9-
} = require('@esm2cjs/execa');
7+
const { execa } = require('@esm2cjs/execa');
108
const chalk = require('chalk');
119

1210
const step = (msg) => {
@@ -35,7 +33,8 @@ const run = async (bin, args, opts = {}) => {
3533

3634
const currentVersion = require('../package.json').version;
3735

38-
const actionPublishCanary = ['preminor', 'prepatch'].includes(args.version) && process.env.CI;
36+
const actionPublishCanary =
37+
['preminor', 'prepatch'].includes(args.version) && process.env.CI;
3938

4039
async function main() {
4140
try {
@@ -59,9 +58,7 @@ async function main() {
5958
step('\nLinting all packages...');
6059
await lint();
6160

62-
const {
63-
stdout
64-
} = await run('git', ['diff'], {
61+
const { stdout } = await run('git', ['diff'], {
6562
stdio: 'pipe',
6663
});
6764
if (stdout) {
@@ -78,7 +75,7 @@ async function main() {
7875
'--global',
7976
'user.email',
8077
process.env.GIT_USER_EMAIL ||
81-
'github-actions[bot]@users.noreply.github.com',
78+
'github-actions[bot]@users.noreply.github.com',
8279
]);
8380
}
8481
step('\nCommitting changes...');
@@ -259,4 +256,4 @@ async function cleanup() {
259256
main().catch((err) => {
260257
console.error(chalk.red(`Unexpected error: ${err.message}`));
261258
process.exit(1);
262-
});
259+
});

0 commit comments

Comments
 (0)