Skip to content

Commit e68aee4

Browse files
committed
chore: references
1 parent 5503a4a commit e68aee4

32 files changed

+234
-190
lines changed

apps/android-playground/tsconfig.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
/* type checking */
1818
"strict": true,
1919
"noUnusedLocals": true,
20-
"noUnusedParameters": true
20+
"noUnusedParameters": true,
21+
"composite": true
2122
},
22-
"include": ["src"]
23+
"include": ["src"],
24+
"references": [
25+
{
26+
"path": "../../packages/android"
27+
},
28+
{
29+
"path": "../../packages/core"
30+
},
31+
{
32+
"path": "../../packages/shared"
33+
},
34+
{
35+
"path": "../../packages/visualizer"
36+
},
37+
{
38+
"path": "../../packages/web-integration"
39+
}
40+
]
2341
}

apps/chrome-extension/tsconfig.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
/* type checking */
1818
"strict": true,
1919
"noUnusedLocals": false,
20-
"noUnusedParameters": false
20+
"noUnusedParameters": false,
21+
"composite": true
2122
},
22-
"include": ["src"]
23+
"include": ["src"],
24+
"references": [
25+
{
26+
"path": "../../packages/core"
27+
},
28+
{
29+
"path": "../../packages/recorder"
30+
},
31+
{
32+
"path": "../../packages/shared"
33+
},
34+
{
35+
"path": "../../packages/visualizer"
36+
},
37+
{
38+
"path": "../../packages/web-integration"
39+
}
40+
]
2341
}

apps/recorder-form/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@rsbuild/plugin-node-polyfill": "1.3.0",
20+
"@rsbuild/plugin-type-check": "1.2.3",
2021
"@rsbuild/core": "^1.3.22",
2122
"@rsbuild/plugin-react": "^1.3.1",
2223
"@types/react": "^18.3.1",

apps/report/rsbuild.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ const copyReportTemplate = () => ({
5959
const jsFiles = fs.readdirSync(corePkgDistDir, { recursive: true });
6060
let replacedCount = 0;
6161
for (const file of jsFiles) {
62-
if (typeof file === 'string' && file.endsWith('.js')) {
62+
if (
63+
typeof file === 'string' &&
64+
(file.endsWith('.js') || file.endsWith('.mjs'))
65+
) {
6366
const filePath = path.join(corePkgDistDir, file.toString());
6467
const fileContent = fs.readFileSync(filePath, 'utf-8');
6568
if (fileContent.includes(replacedMark)) {

apps/report/tsconfig.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@
2121

2222
"paths": {
2323
"@/*": ["./src/*"]
24-
}
24+
},
25+
"composite": true,
26+
"declarationDir": "dist/types"
2527
},
26-
"include": ["src"]
28+
"include": ["src"],
29+
"references": [
30+
{
31+
"path": "../../packages/core"
32+
},
33+
{
34+
"path": "../../packages/shared"
35+
},
36+
{
37+
"path": "../../packages/visualizer"
38+
},
39+
{
40+
"path": "../../packages/web-integration"
41+
}
42+
]
2743
}

packages/android-playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Android playground for Midscene",
55
"main": "./dist/lib/index.js",
66
"types": "./dist/types/index.d.ts",
7+
"module": "./dist/es/index.mjs",
78
"files": ["dist", "static", "bin", "README.md"],
89
"bin": {
910
"midscene-android-playground": "./bin/android-playground",

packages/android-playground/rslib.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default defineConfig({
88
root: 'dist/lib',
99
},
1010
},
11-
autoExtension: false,
1211
format: 'cjs',
1312
syntax: 'es2020',
1413
},
@@ -18,7 +17,6 @@ export default defineConfig({
1817
root: 'dist/es',
1918
},
2019
},
21-
autoExtension: false,
2220
dts: {
2321
bundle: true,
2422
distPath: 'dist/types',

packages/android-playground/tsconfig.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,21 @@
1616
"strict": true,
1717
"module": "ES2020",
1818
"target": "es2020",
19-
"types": ["node"]
19+
"types": ["node"],
20+
"composite": true,
21+
"declarationDir": "dist/types"
2022
},
2123
"exclude": ["**/node_modules"],
22-
"include": ["src"]
24+
"include": ["src"],
25+
"references": [
26+
{
27+
"path": "../android"
28+
},
29+
{
30+
"path": "../shared"
31+
},
32+
{
33+
"path": "../web-integration"
34+
}
35+
]
2336
}

packages/android/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
"Android use"
1111
],
1212
"main": "./dist/lib/index.js",
13+
"module": "./dist/lib/index.mjs",
1314
"types": "./dist/types/index.d.ts",
1415
"files": ["bin", "dist", "README.md"],
1516
"exports": {
1617
".": {
1718
"types": "./dist/types/index.d.ts",
18-
"default": "./dist/lib/index.js"
19+
"import": "./dist/es/index.mjs",
20+
"require": "./dist/lib/index.js"
1921
},
2022
"./package.json": "./package.json"
2123
},

packages/android/rslib.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default defineConfig({
88
root: 'dist/lib',
99
},
1010
},
11-
autoExtension: false,
1211
format: 'cjs',
1312
syntax: 'es2020',
1413
},
@@ -18,7 +17,6 @@ export default defineConfig({
1817
root: 'dist/es',
1918
},
2019
},
21-
autoExtension: false,
2220
dts: {
2321
bundle: true,
2422
distPath: 'dist/types',

0 commit comments

Comments
 (0)