runtime-checker 1.0.4 → 1.1.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/README.md
CHANGED
|
@@ -1,26 +1,60 @@
|
|
|
1
1
|
# runtime-checker
|
|
2
|
-
Detects the minimum version needed for **Node.js**, **Bun**, **Deno** and browsers to execute your codebase.
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Find the minimum runtime version needed for a JavaScript or TypeScript codebase.
|
|
4
|
+
|
|
5
|
+
It parses files with Oxc and checks runtime APIs, JavaScript syntax, module format, and native TypeScript usage. It can report requirements for Node.js, Deno, Bun, Safari, Chromium, and Firefox.
|
|
6
|
+
|
|
7
|
+
## install
|
|
8
|
+
|
|
5
9
|
```sh
|
|
6
|
-
deno add npm:runtime-checker
|
|
7
|
-
bun add runtime-checker
|
|
8
|
-
pnpm add runtime-checker
|
|
9
10
|
npm install runtime-checker
|
|
11
|
+
pnpm add runtime-checker
|
|
12
|
+
bun add runtime-checker
|
|
13
|
+
deno add npm:runtime-checker
|
|
10
14
|
```
|
|
11
15
|
|
|
12
|
-
##
|
|
13
|
-
`$ runtime-checker <dir>`
|
|
16
|
+
## usage
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<sup>1</sup> fff is only faster (and actually slower!) than oxc when your codebase is around 250,000~ or more lines of code, from testing on a Windows machine with a 9800X3D.
|
|
18
|
+
```sh
|
|
19
|
+
runtime-checker <dir>
|
|
20
|
+
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
For app compatibility, scan the code you ship. For bundled apps, that usually means the build output, not just `src`.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
## options
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
```sh
|
|
27
|
+
runtime-checker <dir> --summary
|
|
28
|
+
runtime-checker <dir> --runtime node
|
|
29
|
+
runtime-checker <dir> --inspect Symbol.asyncDispose
|
|
30
|
+
runtime-checker <dir> --fix
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- `--summary` prints only the result panel.
|
|
34
|
+
- `--runtime <all|node|deno|bun|safari|chrome|firefox>` limits output to one target.
|
|
35
|
+
- `--inspect <feature>` prints every detection for a feature.
|
|
36
|
+
- `--fix` updates `package.json` `engines.node` when the detected Node.js version is not satisfied.
|
|
37
|
+
|
|
38
|
+
## detects
|
|
39
|
+
|
|
40
|
+
- Runtime APIs such as `fetch`, `Temporal`, `fs.cp`, `sqlite.DatabaseSync`, and `Symbol.asyncDispose`.
|
|
41
|
+
- JavaScript syntax such as optional chaining, nullish coalescing, ESM, `await using`, and native TypeScript support.
|
|
42
|
+
- Node.js `engines.node` mismatches.
|
|
43
|
+
|
|
44
|
+
## output
|
|
45
|
+
|
|
46
|
+
```txt
|
|
47
|
+
Finished in 665ms using oxc (ast parsing) after scanning 307k lines of code.
|
|
48
|
+
|
|
49
|
+
Runtimes
|
|
50
|
+
- Node.js 24.0.0
|
|
51
|
+
- Deno 2.8.0
|
|
52
|
+
- Bun 1.3.0
|
|
53
|
+
|
|
54
|
+
Browsers
|
|
55
|
+
- Safari 26.0.0
|
|
56
|
+
- Chromium 149.0.0
|
|
57
|
+
- Firefox 141.0.0
|
|
58
|
+
```
|
|
25
59
|
|
|
26
|
-
`--
|
|
60
|
+
Use `--inspect <feature>` when you want to see every file and location that caused a requirement.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|