@jterrazz/typescript 6.0.4 → 6.1.1
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/README.md +13 -13
- package/bin/commands/check.sh +32 -3
- package/package.json +20 -11
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @jterrazz/typescript
|
|
2
2
|
|
|
3
|
-
The complete TypeScript toolchain — build, run, check, and document with zero configuration. Powered by tsdown, Oxlint, Oxfmt,
|
|
3
|
+
The complete TypeScript toolchain — build, run, check, and document with zero configuration. Powered by tsdown, Oxlint, Oxfmt, TypeScript 7, and Knip.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -86,12 +86,12 @@ your-project/
|
|
|
86
86
|
|
|
87
87
|
| Tool | Purpose |
|
|
88
88
|
| ------ | -------------------- |
|
|
89
|
-
|
|
|
89
|
+
| tsc | Type checking |
|
|
90
90
|
| oxlint | Linting |
|
|
91
91
|
| oxfmt | Formatting |
|
|
92
92
|
| knip | Unused code analysis |
|
|
93
93
|
|
|
94
|
-
`typescript fix` runs
|
|
94
|
+
`typescript fix` runs tsc, oxlint (with `--fix`), and oxfmt in parallel (knip excluded).
|
|
95
95
|
|
|
96
96
|
### Lint presets
|
|
97
97
|
|
|
@@ -153,16 +153,16 @@ jobs:
|
|
|
153
153
|
|
|
154
154
|
The toolchain is fully compiled — no JavaScript in the hot path:
|
|
155
155
|
|
|
156
|
-
| Step | Tool
|
|
157
|
-
| ------------ |
|
|
158
|
-
| Transpile | [Oxc](https://oxc.rs) (via tsdown)
|
|
159
|
-
| Bundle | [Rolldown](https://rolldown.rs)
|
|
160
|
-
| Declarations | [tsdown](https://tsdown.dev) built-in
|
|
161
|
-
| Type check | [
|
|
162
|
-
| Lint | [Oxlint](https://oxc.rs/docs/guide/usage/linter)
|
|
163
|
-
| Format | [Oxfmt](https://oxc.rs/docs/guide/usage/formatter)
|
|
164
|
-
| Unused code | [Knip](https://knip.dev)
|
|
165
|
-
| API docs | [Typedoc](https://typedoc.org)
|
|
156
|
+
| Step | Tool | Language |
|
|
157
|
+
| ------------ | ---------------------------------------------------------------- | -------- |
|
|
158
|
+
| Transpile | [Oxc](https://oxc.rs) (via tsdown) | Rust |
|
|
159
|
+
| Bundle | [Rolldown](https://rolldown.rs) | Rust |
|
|
160
|
+
| Declarations | [tsdown](https://tsdown.dev) built-in | Rust |
|
|
161
|
+
| Type check | [tsc (TypeScript 7)](https://github.com/microsoft/typescript-go) | Go |
|
|
162
|
+
| Lint | [Oxlint](https://oxc.rs/docs/guide/usage/linter) | Rust |
|
|
163
|
+
| Format | [Oxfmt](https://oxc.rs/docs/guide/usage/formatter) | Rust |
|
|
164
|
+
| Unused code | [Knip](https://knip.dev) | Node |
|
|
165
|
+
| API docs | [Typedoc](https://typedoc.org) | Node |
|
|
166
166
|
|
|
167
167
|
## License
|
|
168
168
|
|
package/bin/commands/check.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# Quality checks: runs
|
|
2
|
+
# Quality checks: runs tsc, oxlint, oxfmt, and knip in parallel.
|
|
3
3
|
# Called by: typescript check | typescript fix
|
|
4
4
|
|
|
5
5
|
# Colors for output
|
|
@@ -33,7 +33,36 @@ find_binary() {
|
|
|
33
33
|
fi
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
# Type checking uses the official TypeScript 7 Go compiler, pulled in through
|
|
37
|
+
# the per-platform @typescript/typescript-* packages instead of a second
|
|
38
|
+
# package named "typescript": typedoc and eslint-plugin-perfectionist load
|
|
39
|
+
# the JS API from the "typescript" name (v6 here), and any typescript@7 in
|
|
40
|
+
# the tree can hijack that lookup under pnpm's hoist fallback.
|
|
41
|
+
find_tsc() {
|
|
42
|
+
local os arch
|
|
43
|
+
case "$(uname -s)" in
|
|
44
|
+
Darwin) os="darwin" ;;
|
|
45
|
+
Linux) os="linux" ;;
|
|
46
|
+
MINGW*|MSYS*|CYGWIN*) os="win32" ;;
|
|
47
|
+
*) os="linux" ;;
|
|
48
|
+
esac
|
|
49
|
+
case "$(uname -m)" in
|
|
50
|
+
arm64|aarch64) arch="arm64" ;;
|
|
51
|
+
armv7l) arch="arm" ;;
|
|
52
|
+
*) arch="x64" ;;
|
|
53
|
+
esac
|
|
54
|
+
|
|
55
|
+
local pkg="@typescript/typescript-$os-$arch"
|
|
56
|
+
if [ -x "$PACKAGE_ROOT/node_modules/$pkg/lib/tsc" ]; then
|
|
57
|
+
echo "$PACKAGE_ROOT/node_modules/$pkg/lib/tsc"
|
|
58
|
+
elif [ -x "$PACKAGE_ROOT/../../$pkg/lib/tsc" ]; then
|
|
59
|
+
echo "$PACKAGE_ROOT/../../$pkg/lib/tsc"
|
|
60
|
+
else
|
|
61
|
+
find_binary tsc
|
|
62
|
+
fi
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
TSC=$(find_tsc)
|
|
37
66
|
OXLINT=$(find_binary oxlint)
|
|
38
67
|
OXFMT=$(find_binary oxfmt)
|
|
39
68
|
KNIP=$(find_binary knip)
|
|
@@ -81,7 +110,7 @@ run_checks() {
|
|
|
81
110
|
printf "${CYAN_BG}${BRIGHT_WHITE} START ${NC} ${LABEL}\n"
|
|
82
111
|
|
|
83
112
|
# Run all tools in parallel
|
|
84
|
-
"$
|
|
113
|
+
"$TSC" --noEmit > "$tmp_dir/type.log" 2>&1 &
|
|
85
114
|
local type_pid=$!
|
|
86
115
|
|
|
87
116
|
if [ "$FIX_MODE" = true ]; then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jterrazz/typescript",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,18 +42,27 @@
|
|
|
42
42
|
"test": "vitest --run"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"typedoc": "^
|
|
52
|
-
"
|
|
45
|
+
"eslint-plugin-perfectionist": "^5.10.0",
|
|
46
|
+
"knip": "^6.27.0",
|
|
47
|
+
"oxfmt": "^0.59.0",
|
|
48
|
+
"oxlint": "^1.74.0",
|
|
49
|
+
"tsdown": "^0.22.9",
|
|
50
|
+
"typedoc": "^0.28.20",
|
|
51
|
+
"typedoc-plugin-markdown": "^4.12.0",
|
|
52
|
+
"typescript": "^6.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@jterrazz/test": "^8.0.0",
|
|
56
|
-
"@types/node": "^
|
|
57
|
-
"vitest": "^4.1.
|
|
56
|
+
"@types/node": "^26.1.1",
|
|
57
|
+
"vitest": "^4.1.10"
|
|
58
|
+
},
|
|
59
|
+
"optionalDependencies": {
|
|
60
|
+
"@typescript/typescript-darwin-arm64": "^7.0.2",
|
|
61
|
+
"@typescript/typescript-darwin-x64": "^7.0.2",
|
|
62
|
+
"@typescript/typescript-linux-arm": "^7.0.2",
|
|
63
|
+
"@typescript/typescript-linux-arm64": "^7.0.2",
|
|
64
|
+
"@typescript/typescript-linux-x64": "^7.0.2",
|
|
65
|
+
"@typescript/typescript-win32-arm64": "^7.0.2",
|
|
66
|
+
"@typescript/typescript-win32-x64": "^7.0.2"
|
|
58
67
|
}
|
|
59
68
|
}
|