@pob/root 28.6.1 → 28.8.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/oxlint.js
CHANGED
|
@@ -1,21 +1,48 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import fs from "node:fs";
|
|
3
4
|
import { createRequire } from "node:module";
|
|
5
|
+
import path from "node:path";
|
|
4
6
|
import pkg from "oxlint/package.json" with { type: "json" };
|
|
5
7
|
|
|
8
|
+
/**
|
|
9
|
+
* tsrs-lint of the project's tsrs (0.21+), the same compiler as its "tsc"
|
|
10
|
+
* script: a Rust port of tsgolint, using less memory.
|
|
11
|
+
*/
|
|
12
|
+
const resolveTsrsLint = () => {
|
|
13
|
+
try {
|
|
14
|
+
const tsrsPackageJsonPath = createRequire(
|
|
15
|
+
path.resolve("package.json"),
|
|
16
|
+
).resolve("tsrs/package.json");
|
|
17
|
+
const tsrsLintBin = JSON.parse(fs.readFileSync(tsrsPackageJsonPath, "utf8"))
|
|
18
|
+
.bin?.["tsrs-lint"];
|
|
19
|
+
return tsrsLintBin
|
|
20
|
+
? path.resolve(path.dirname(tsrsPackageJsonPath), tsrsLintBin)
|
|
21
|
+
: undefined;
|
|
22
|
+
} catch {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
6
27
|
// oxlint looks for tsgolint (type-aware rules) in the project's
|
|
7
28
|
// node_modules/.bin, which does not contain the bins of @pob/root dependencies
|
|
8
|
-
|
|
29
|
+
const resolveTsgolint = () => {
|
|
9
30
|
const require = createRequire(
|
|
10
31
|
import.meta.resolve("oxlint-tsgolint/package.json"),
|
|
11
32
|
);
|
|
12
33
|
try {
|
|
13
|
-
|
|
34
|
+
return require.resolve(
|
|
14
35
|
`@oxlint-tsgolint/${process.platform}-${process.arch}/tsgolint${process.platform === "win32" ? ".exe" : ""}`,
|
|
15
36
|
);
|
|
16
37
|
} catch {
|
|
17
38
|
// unsupported platform: oxlint reports the missing tsgolint when needed
|
|
39
|
+
return undefined;
|
|
18
40
|
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
if (!process.env.OXLINT_TSGOLINT_PATH) {
|
|
44
|
+
const tsgolintPath = resolveTsrsLint() || resolveTsgolint();
|
|
45
|
+
if (tsgolintPath) process.env.OXLINT_TSGOLINT_PATH = tsgolintPath;
|
|
19
46
|
}
|
|
20
47
|
|
|
21
48
|
await import(
|
|
@@ -14,7 +14,7 @@ if (process.env.PROJECT_CWD) {
|
|
|
14
14
|
process.chdir(process.env.PROJECT_CWD);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const pkg = JSON.parse(fs.readFileSync(path.resolve("package.json")));
|
|
17
|
+
const pkg = JSON.parse(fs.readFileSync(path.resolve("package.json"), "utf8"));
|
|
18
18
|
|
|
19
19
|
/* Check Package Manager */
|
|
20
20
|
|
|
@@ -86,7 +86,8 @@ export default function installGithubWorkflows({ pkg, pm }) {
|
|
|
86
86
|
pkg.devDependencies &&
|
|
87
87
|
(pkg.devDependencies.rollup ||
|
|
88
88
|
pkg.devDependencies["@pob/rollup-esbuild"] ||
|
|
89
|
-
pkg.devDependencies["@pob/rollup-typescript"]
|
|
89
|
+
pkg.devDependencies["@pob/rollup-typescript"] ||
|
|
90
|
+
pkg.devDependencies.tsrs) &&
|
|
90
91
|
pkg.scripts?.build &&
|
|
91
92
|
hasBuildOutputInGit()
|
|
92
93
|
) {
|
|
@@ -55,7 +55,7 @@ const { lockfile, configfile, installAndDedupe } = (() => {
|
|
|
55
55
|
);
|
|
56
56
|
})();
|
|
57
57
|
|
|
58
|
-
const pkg = JSON.parse(fs.readFileSync(path.resolve("package.json")));
|
|
58
|
+
const pkg = JSON.parse(fs.readFileSync(path.resolve("package.json"), "utf8"));
|
|
59
59
|
const workspaces = pkg.workspaces || false;
|
|
60
60
|
|
|
61
61
|
const workspacesPattern = (() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.8.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
"@commitlint/format": "21.2.3",
|
|
67
67
|
"@commitlint/lint": "21.2.4",
|
|
68
68
|
"@commitlint/types": "21.2.3",
|
|
69
|
-
"@pob/version": "8.
|
|
69
|
+
"@pob/version": "8.6.0",
|
|
70
70
|
"conventional-changelog-conventionalcommits": "^10.0.0",
|
|
71
71
|
"conventional-changelog-writer": "^9.0.0",
|
|
72
72
|
"conventional-commits-parser": "^7.0.0",
|
|
73
73
|
"json5": "^2.2.3",
|
|
74
74
|
"lint-staged": "17.6.0",
|
|
75
|
-
"oxfmt": "0.
|
|
76
|
-
"oxlint": "1.
|
|
77
|
-
"oxlint-tsgolint": "7.0.
|
|
75
|
+
"oxfmt": "0.78.0",
|
|
76
|
+
"oxlint": "1.93.0",
|
|
77
|
+
"oxlint-tsgolint": "7.0.2006",
|
|
78
78
|
"picomatch": "^4.0.7",
|
|
79
|
-
"pob-dependencies": "28.
|
|
79
|
+
"pob-dependencies": "28.8.0",
|
|
80
80
|
"semver": "^7.7.3"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
|
-
"node": "^22.
|
|
83
|
+
"node": "^22.23.4 || ^24.22.1 || >=26.13.0"
|
|
84
84
|
},
|
|
85
85
|
"pob": {},
|
|
86
86
|
"scripts": {
|