@jterrazz/typescript 6.0.3 → 6.0.4
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/commands/check.sh
CHANGED
|
@@ -19,14 +19,24 @@ done
|
|
|
19
19
|
SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
20
20
|
PACKAGE_ROOT="$SCRIPT_DIR/../.."
|
|
21
21
|
|
|
22
|
-
# Find
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
# Find binaries one by one - npm may hoist some tools to the consumer's
|
|
23
|
+
# node_modules/.bin and nest others under this package, so a single shared
|
|
24
|
+
# bin directory cannot be assumed
|
|
25
|
+
find_binary() {
|
|
26
|
+
local name="$1"
|
|
27
|
+
if [ -x "$PACKAGE_ROOT/node_modules/.bin/$name" ]; then
|
|
28
|
+
echo "$PACKAGE_ROOT/node_modules/.bin/$name"
|
|
29
|
+
elif [ -x "$PACKAGE_ROOT/../../.bin/$name" ]; then
|
|
30
|
+
echo "$PACKAGE_ROOT/../../.bin/$name"
|
|
31
|
+
else
|
|
32
|
+
echo "$name" # Fallback to PATH
|
|
33
|
+
fi
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
TSGO=$(find_binary tsgo)
|
|
37
|
+
OXLINT=$(find_binary oxlint)
|
|
38
|
+
OXFMT=$(find_binary oxfmt)
|
|
39
|
+
KNIP=$(find_binary knip)
|
|
30
40
|
|
|
31
41
|
# Parse command and args
|
|
32
42
|
COMMAND=""
|
|
@@ -71,20 +81,20 @@ run_checks() {
|
|
|
71
81
|
printf "${CYAN_BG}${BRIGHT_WHITE} START ${NC} ${LABEL}\n"
|
|
72
82
|
|
|
73
83
|
# Run all tools in parallel
|
|
74
|
-
"$
|
|
84
|
+
"$TSGO" --noEmit > "$tmp_dir/type.log" 2>&1 &
|
|
75
85
|
local type_pid=$!
|
|
76
86
|
|
|
77
87
|
if [ "$FIX_MODE" = true ]; then
|
|
78
|
-
"$
|
|
88
|
+
"$OXLINT" --fix "${LINT_ARGS[@]}" > "$tmp_dir/lint.log" 2>&1 &
|
|
79
89
|
else
|
|
80
|
-
"$
|
|
90
|
+
"$OXLINT" "${LINT_ARGS[@]}" > "$tmp_dir/lint.log" 2>&1 &
|
|
81
91
|
fi
|
|
82
92
|
local lint_pid=$!
|
|
83
93
|
|
|
84
94
|
if [ "$FIX_MODE" = true ]; then
|
|
85
|
-
"$
|
|
95
|
+
"$OXFMT" > "$tmp_dir/format.log" 2>&1 &
|
|
86
96
|
else
|
|
87
|
-
"$
|
|
97
|
+
"$OXFMT" --check > "$tmp_dir/format.log" 2>&1 &
|
|
88
98
|
fi
|
|
89
99
|
local format_pid=$!
|
|
90
100
|
|
|
@@ -98,8 +108,8 @@ run_checks() {
|
|
|
98
108
|
[ -f "knip.json" ] && knip_project="knip.json"
|
|
99
109
|
[ -f "knip.jsonc" ] && knip_project="knip.jsonc"
|
|
100
110
|
|
|
101
|
-
node "$PACKAGE_ROOT/
|
|
102
|
-
"$
|
|
111
|
+
node "$PACKAGE_ROOT/lib/merge-knip-config.js" "$knip_base" $knip_project > "$tmp_dir/knip-merged.json"
|
|
112
|
+
"$KNIP" --no-progress --no-config-hints --config "$tmp_dir/knip-merged.json" > "$tmp_dir/knip.log" 2>&1 &
|
|
103
113
|
knip_pid=$!
|
|
104
114
|
fi
|
|
105
115
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jterrazz/typescript",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
|
14
|
+
"lib",
|
|
14
15
|
"presets",
|
|
15
16
|
"src"
|
|
16
17
|
],
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"typedoc-plugin-markdown": "^4.11.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@jterrazz/test": "^
|
|
55
|
+
"@jterrazz/test": "^8.0.0",
|
|
55
56
|
"@types/node": "^25.5.0",
|
|
56
57
|
"vitest": "^4.1.2"
|
|
57
58
|
}
|
|
File without changes
|