@upleveled/preflight 8.1.6 → 9.0.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/preflight.sh +42 -13
- package/package.json +11 -12
- package/src/index.ts +1 -1
package/bin/preflight.sh
CHANGED
|
@@ -1,15 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
set -o errexit
|
|
4
|
+
set -o nounset
|
|
5
|
+
set -o pipefail
|
|
6
|
+
|
|
7
|
+
exec node --disable-warning=ExperimentalWarning --input-type=module --eval '
|
|
8
|
+
import { readFileSync } from "node:fs";
|
|
9
|
+
import { registerHooks, stripTypeScriptTypes } from "node:module";
|
|
10
|
+
import { dirname, resolve } from "node:path";
|
|
11
|
+
import { argv } from "node:process";
|
|
12
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
|
+
|
|
14
|
+
const tsRegex = /^file:.*(?<!\.d)\.m?ts$/;
|
|
15
|
+
|
|
16
|
+
// Intercept .ts / .mts files (skipping .d.ts files) and
|
|
17
|
+
// transpile to JS, returning ES module
|
|
18
|
+
registerHooks({
|
|
19
|
+
load(url, context, nextLoad) {
|
|
20
|
+
if (tsRegex.test(url)) {
|
|
21
|
+
return {
|
|
22
|
+
format: "module",
|
|
23
|
+
source: stripTypeScriptTypes(readFileSync(fileURLToPath(url), "utf8"), {
|
|
24
|
+
mode: "transform",
|
|
25
|
+
sourceUrl: url,
|
|
26
|
+
}),
|
|
27
|
+
shortCircuit: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return nextLoad(url, context);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
await import(
|
|
36
|
+
pathToFileURL(
|
|
37
|
+
resolve(
|
|
38
|
+
dirname(argv[1]),
|
|
39
|
+
// Path to entry point
|
|
40
|
+
"../src/index.ts",
|
|
41
|
+
),
|
|
42
|
+
).href
|
|
43
|
+
);
|
|
44
|
+
' "$0" "$@"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upleveled/preflight",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"repository": "upleveled/preflight",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "UpLeveled (https://github.com/upleveled)",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"algoliasearch": "5.
|
|
22
|
+
"algoliasearch": "5.35.0",
|
|
23
23
|
"chalk": "5.4.1",
|
|
24
|
-
"cheerio": "1.1.
|
|
24
|
+
"cheerio": "1.1.2",
|
|
25
25
|
"depcheck": "1.4.7",
|
|
26
26
|
"domhandler": "5.0.3",
|
|
27
27
|
"execa": "9.6.0",
|
|
@@ -30,20 +30,19 @@
|
|
|
30
30
|
"p-reduce": "3.0.0",
|
|
31
31
|
"readdirp": "4.1.2",
|
|
32
32
|
"semver": "7.7.2",
|
|
33
|
-
"top-user-agents": "2.1.
|
|
34
|
-
"tsx": "4.20.3"
|
|
33
|
+
"top-user-agents": "2.1.61"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@types/node": "24.0
|
|
36
|
+
"@types/node": "24.1.0",
|
|
38
37
|
"@types/p-map": "2.0.0",
|
|
39
38
|
"@types/semver": "7.7.0",
|
|
40
|
-
"eslint": "9.
|
|
41
|
-
"eslint-config-upleveled": "9.2.
|
|
39
|
+
"eslint": "9.32.0",
|
|
40
|
+
"eslint-config-upleveled": "9.2.6",
|
|
42
41
|
"p-map": "7.0.3",
|
|
43
42
|
"prettier": "3.6.2",
|
|
44
|
-
"stylelint": "16.
|
|
45
|
-
"typescript": "5.
|
|
46
|
-
"typescript-eslint": "8.
|
|
43
|
+
"stylelint": "16.23.0",
|
|
44
|
+
"typescript": "5.9.2",
|
|
45
|
+
"typescript-eslint": "8.38.0",
|
|
47
46
|
"vitest": "3.2.4"
|
|
48
47
|
},
|
|
49
48
|
"engines": {
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"docker-build-run": "pnpm docker-build && pnpm docker-run",
|
|
55
54
|
"docker-run": "docker run preflight",
|
|
56
55
|
"lint": "eslint . --max-warnings 0",
|
|
57
|
-
"start": "
|
|
56
|
+
"start": "node --watch ./src/index.ts",
|
|
58
57
|
"test": "vitest run",
|
|
59
58
|
"test-local": "rm -rf ./__tests__/fixtures/__temp && pnpm test"
|
|
60
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
type ListrContext,
|
|
4
4
|
type ListrDefaultRenderer,
|
|
5
5
|
type ListrTask,
|
|
6
|
-
ListrTaskWrapper,
|
|
6
|
+
type ListrTaskWrapper,
|
|
7
7
|
} from 'listr2';
|
|
8
8
|
import * as allChangesCommittedToGit from './checks/allChangesCommittedToGit.ts';
|
|
9
9
|
import * as eslint from './checks/eslint.ts';
|