runtime-checker 1.0.0 → 1.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/README.md +26 -26
- package/npm/bin/native/darwin-arm64/runtime-checker +0 -0
- package/npm/bin/native/{runtime-checker.exe → darwin-x64/runtime-checker} +0 -0
- package/npm/bin/native/linux-x64/runtime-checker +0 -0
- package/npm/bin/native/win32-x64/runtime-checker.exe +0 -0
- package/npm/bin/runtime-checker.js +7 -3
- package/package.json +5 -12
- package/Cargo.lock +0 -1972
- package/Cargo.toml +0 -46
- package/data/mdn/README.md +0 -30
- package/data/mdn/bun.ron +0 -1084
- package/data/mdn/chrome.ron +0 -7814
- package/data/mdn/deno.ron +0 -1497
- package/data/mdn/firefox.ron +0 -6452
- package/data/mdn/node.ron +0 -1311
- package/data/mdn/safari.ron +0 -6267
- package/data/mdn-bcd.version +0 -1
- package/data/node.ron +0 -3561
- package/npm/postinstall.js +0 -29
- package/npm/prepare-bin.js +0 -11
- package/src/analyzer.rs +0 -405
- package/src/bin/generate-mdn-data.rs +0 -517
- package/src/cli.rs +0 -71
- package/src/data.rs +0 -266
- package/src/engines.rs +0 -154
- package/src/help.rs +0 -192
- package/src/lib.rs +0 -251
- package/src/main.rs +0 -12
- package/src/report.rs +0 -819
- package/src/scanner.rs +0 -404
- package/src/version.rs +0 -101
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# runtime-checker
|
|
2
|
-
Detects the minimum version needed for **Node.js**, **Bun**, **Deno** and browsers to execute your codebase.
|
|
3
|
-
|
|
4
|
-
## Installation
|
|
5
|
-
```sh
|
|
6
|
-
deno add npm:runtime-checker
|
|
7
|
-
bun add runtime-checker
|
|
8
|
-
pnpm add runtime-checker
|
|
9
|
-
npm install runtime-checker
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
`$ runtime-checker <dir>`
|
|
14
|
-
|
|
15
|
-
### Arguments
|
|
16
|
-
`--fast:` uses [fff](https://github.com/dmtrKovalenko/fff) instead of oxc AST parsing. Faster<sup>1</sup>, but less accurate.
|
|
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.
|
|
19
|
-
|
|
20
|
-
`--fix`: Automatically fixes your `engines.node` field to a supported version if an issue is found.
|
|
21
|
-
|
|
22
|
-
`--inspect <symbol, e.g.: Symbol.asyncDispose>`: Shows each detection of a specific symbol
|
|
23
|
-
|
|
24
|
-
`--summary`: Only prints the summary
|
|
25
|
-
|
|
26
|
-
`--runtime <all|deno|bun|node|safari|chrome|firefox>`: Only shows the results for a specific runtime
|
|
1
|
+
# runtime-checker
|
|
2
|
+
Detects the minimum version needed for **Node.js**, **Bun**, **Deno** and browsers to execute your codebase.
|
|
3
|
+
|
|
4
|
+
## Installation
|
|
5
|
+
```sh
|
|
6
|
+
deno add npm:runtime-checker
|
|
7
|
+
bun add runtime-checker
|
|
8
|
+
pnpm add runtime-checker
|
|
9
|
+
npm install runtime-checker
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
`$ runtime-checker <dir>`
|
|
14
|
+
|
|
15
|
+
### Arguments
|
|
16
|
+
`--fast:` uses [fff](https://github.com/dmtrKovalenko/fff) instead of oxc AST parsing. Faster<sup>1</sup>, but less accurate.
|
|
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.
|
|
19
|
+
|
|
20
|
+
`--fix`: Automatically fixes your `engines.node` field to a supported version if an issue is found.
|
|
21
|
+
|
|
22
|
+
`--inspect <symbol, e.g.: Symbol.asyncDispose>`: Shows each detection of a specific symbol
|
|
23
|
+
|
|
24
|
+
`--summary`: Only prints the summary
|
|
25
|
+
|
|
26
|
+
`--runtime <all|deno|bun|node|safari|chrome|firefox>`: Only shows the results for a specific runtime
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,14 +6,18 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
|
|
7
7
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
8
8
|
const exe = process.platform === "win32" ? "runtime-checker.exe" : "runtime-checker";
|
|
9
|
-
const
|
|
9
|
+
const target = `${process.platform}-${process.arch}`;
|
|
10
|
+
const native = join(root, "npm", "bin", "native", target, exe);
|
|
10
11
|
|
|
11
12
|
if (!existsSync(native)) {
|
|
12
|
-
console.error(
|
|
13
|
+
console.error(`runtime-checker does not have a native binary for ${target}.`);
|
|
14
|
+
console.error("The npm package may be corrupted, or this platform is not supported yet.");
|
|
13
15
|
process.exit(1);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
const child = spawnSync(native, process.argv.slice(2), {
|
|
18
|
+
const child = spawnSync(native, process.argv.slice(2), {
|
|
19
|
+
stdio: "inherit",
|
|
20
|
+
});
|
|
17
21
|
|
|
18
22
|
if (child.error) {
|
|
19
23
|
console.error(child.error.message);
|
package/package.json
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runtime-checker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Detect minimum runtime versions required by JavaScript and TypeScript codebases.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/usebarekey/runtime-checker.git"
|
|
9
|
+
"url": "git+https://github.com/usebarekey/runtime-checker.git"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://github.com/usebarekey/runtime-checker",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/usebarekey/runtime-checker/issues"
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
|
-
"runtime-checker": "
|
|
16
|
+
"runtime-checker": "npm/bin/runtime-checker.js"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"Cargo.lock",
|
|
20
|
-
"Cargo.toml",
|
|
21
19
|
"LICENSE",
|
|
22
20
|
"README.md",
|
|
23
|
-
"
|
|
24
|
-
"npm",
|
|
25
|
-
"src"
|
|
21
|
+
"npm/bin"
|
|
26
22
|
],
|
|
27
23
|
"scripts": {
|
|
28
24
|
"build": "cargo build --release",
|
|
29
25
|
"check": "cargo clippy --all-targets -- -D warnings",
|
|
30
26
|
"test": "cargo test",
|
|
31
|
-
"
|
|
32
|
-
"prepack": "cargo build --release && node ./npm/prepare-bin.js",
|
|
33
|
-
"publish:npm": "npm publish --access public --provenance",
|
|
34
|
-
"publish:jsr": "npx --yes jsr publish"
|
|
27
|
+
"publish:npm": "npm publish --access public"
|
|
35
28
|
},
|
|
36
29
|
"publishConfig": {
|
|
37
30
|
"access": "public"
|