@rslint/core 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/rslint.cjs +11 -15
- package/package.json +20 -8
package/bin/rslint.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const path = require('node:path');
|
|
3
3
|
const os = require('node:os');
|
|
4
4
|
const fs = require('node:fs');
|
|
5
|
+
|
|
5
6
|
function getBinPath() {
|
|
6
7
|
if (fs.existsSync(path.resolve(__dirname, './rslint'))) {
|
|
7
8
|
return path.resolve(__dirname, './rslint');
|
|
@@ -15,20 +16,15 @@ function getBinPath() {
|
|
|
15
16
|
`@rslint/${platformKey}/rslint${process.platform === 'win32' ? '.exe' : ''}`,
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
async function main() {
|
|
19
21
|
const binPath = getBinPath();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
} catch (error) {
|
|
25
|
-
// Preserve the exit code from the child process
|
|
26
|
-
if (error.status != null) {
|
|
27
|
-
process.exit(error.status);
|
|
28
|
-
} else {
|
|
29
|
-
console.error(`Failed to execute ${binPath}: ${error.message}`);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
22
|
+
const { run } = await import(path.resolve(__dirname, '../dist/cli.js'));
|
|
23
|
+
const exitCode = await run(binPath, process.argv.slice(2));
|
|
24
|
+
process.exit(exitCode);
|
|
33
25
|
}
|
|
34
|
-
|
|
26
|
+
|
|
27
|
+
main().catch(err => {
|
|
28
|
+
process.stderr.write(`rslint: ${err}\n`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslint/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"@typescript/source": "./src/index.ts",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"@typescript/source": "./src/service.ts",
|
|
15
15
|
"default": "./dist/service.js"
|
|
16
16
|
},
|
|
17
|
+
"./config-loader": {
|
|
18
|
+
"@typescript/source": "./src/config-loader.ts",
|
|
19
|
+
"default": "./dist/config-loader.js"
|
|
20
|
+
},
|
|
17
21
|
"./bin": "./bin/rslint.cjs",
|
|
18
22
|
"./package.json": "./package.json"
|
|
19
23
|
},
|
|
@@ -47,15 +51,23 @@
|
|
|
47
51
|
"@types/node": "24.0.14",
|
|
48
52
|
"typescript": "5.9.3",
|
|
49
53
|
"@typescript/native-preview": "7.0.0-dev.20250904.1",
|
|
50
|
-
"@rslint/api": "0.
|
|
54
|
+
"@rslint/api": "0.3.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"jiti": "^2.0.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"jiti": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
51
63
|
},
|
|
52
64
|
"optionalDependencies": {
|
|
53
|
-
"@rslint/darwin-arm64": "0.
|
|
54
|
-
"@rslint/darwin-x64": "0.
|
|
55
|
-
"@rslint/linux-x64": "0.
|
|
56
|
-
"@rslint/win32-arm64": "0.
|
|
57
|
-
"@rslint/
|
|
58
|
-
"@rslint/
|
|
65
|
+
"@rslint/darwin-arm64": "0.3.0",
|
|
66
|
+
"@rslint/darwin-x64": "0.3.0",
|
|
67
|
+
"@rslint/linux-x64": "0.3.0",
|
|
68
|
+
"@rslint/win32-arm64": "0.3.0",
|
|
69
|
+
"@rslint/linux-arm64": "0.3.0",
|
|
70
|
+
"@rslint/win32-x64": "0.3.0"
|
|
59
71
|
},
|
|
60
72
|
"scripts": {
|
|
61
73
|
"build:bin": "go build -v -o bin/ ../../cmd/rslint",
|