runtime-checker 1.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/Cargo.lock +1972 -0
- package/Cargo.toml +46 -0
- package/LICENSE +29 -0
- package/README.md +26 -0
- package/data/mdn/README.md +30 -0
- package/data/mdn/bun.ron +1084 -0
- package/data/mdn/chrome.ron +7814 -0
- package/data/mdn/deno.ron +1497 -0
- package/data/mdn/firefox.ron +6452 -0
- package/data/mdn/node.ron +1311 -0
- package/data/mdn/safari.ron +6267 -0
- package/data/mdn-bcd.version +1 -0
- package/data/node.ron +3561 -0
- package/npm/bin/native/runtime-checker.exe +0 -0
- package/npm/bin/runtime-checker.js +23 -0
- package/npm/postinstall.js +29 -0
- package/npm/prepare-bin.js +11 -0
- package/package.json +42 -0
- package/src/analyzer.rs +405 -0
- package/src/bin/generate-mdn-data.rs +517 -0
- package/src/cli.rs +71 -0
- package/src/data.rs +266 -0
- package/src/engines.rs +154 -0
- package/src/help.rs +192 -0
- package/src/lib.rs +251 -0
- package/src/main.rs +12 -0
- package/src/report.rs +819 -0
- package/src/scanner.rs +404 -0
- package/src/version.rs +101 -0
package/Cargo.toml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "runtime-checker"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
edition = "2024"
|
|
5
|
+
description = "Detect minimum runtime versions required by JavaScript and TypeScript codebases."
|
|
6
|
+
license = "BSD-3-Clause"
|
|
7
|
+
repository = "https://github.com/usebarekey/runtime-checker"
|
|
8
|
+
homepage = "https://github.com/usebarekey/runtime-checker"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
keywords = ["node", "deno", "bun", "runtime", "cli"]
|
|
11
|
+
categories = ["command-line-utilities", "development-tools"]
|
|
12
|
+
|
|
13
|
+
[dependencies]
|
|
14
|
+
aho-corasick = "1.1.4"
|
|
15
|
+
anstream = "0.6.21"
|
|
16
|
+
anstyle = "1.0.13"
|
|
17
|
+
anyhow = "1.0.102"
|
|
18
|
+
clap = { version = "4.5.53", features = ["derive"] }
|
|
19
|
+
fff-grep = "0.9.5-nightly.7d7910b"
|
|
20
|
+
ignore = "0.4.25"
|
|
21
|
+
mimalloc = "0.1"
|
|
22
|
+
node-semver = "2.2.0"
|
|
23
|
+
oxc_allocator = "0.135.0"
|
|
24
|
+
oxc_ast = "0.135.0"
|
|
25
|
+
oxc_ast_visit = "0.135.0"
|
|
26
|
+
oxc_parser = "0.135.0"
|
|
27
|
+
oxc_semantic = "0.135.0"
|
|
28
|
+
oxc_span = "0.135.0"
|
|
29
|
+
oxc_syntax = "0.135.0"
|
|
30
|
+
ron = "0.12.0"
|
|
31
|
+
serde = { version = "1.0.228", features = ["derive"] }
|
|
32
|
+
serde_json = "1.0.150"
|
|
33
|
+
terminal_size = "0.4.4"
|
|
34
|
+
thiserror = "2.0.17"
|
|
35
|
+
ureq = "2.12.1"
|
|
36
|
+
|
|
37
|
+
[dev-dependencies]
|
|
38
|
+
assert_cmd = "2.1.1"
|
|
39
|
+
tempfile = "3.24.0"
|
|
40
|
+
|
|
41
|
+
[profile.release]
|
|
42
|
+
opt-level = 3
|
|
43
|
+
lto = "thin"
|
|
44
|
+
codegen-units = 1
|
|
45
|
+
panic = "abort"
|
|
46
|
+
strip = "symbols"
|
package/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Barekey
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +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
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# MDN Browser Compatibility Data Source
|
|
2
|
+
|
|
3
|
+
This directory is generated from `@mdn/browser-compat-data`.
|
|
4
|
+
|
|
5
|
+
MDN does not expose this as a query API. The maintained machine-readable source is the `@mdn/browser-compat-data` npm package, which also publishes a raw `data.json` file through package CDNs.
|
|
6
|
+
|
|
7
|
+
The pinned BCD version is stored in `data/mdn-bcd.version`.
|
|
8
|
+
|
|
9
|
+
Regenerate from the pinned CDN release:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
cargo run --bin generate-mdn-data -- --output-dir data/mdn
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Regenerate from an already downloaded `data.json` file:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
cargo run --bin generate-mdn-data -- --input path/to/data.json --output-dir data/mdn
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The generator emits:
|
|
22
|
+
|
|
23
|
+
- `node.ron` from BCD runtime id `nodejs`
|
|
24
|
+
- `deno.ron` from BCD runtime id `deno`
|
|
25
|
+
- `bun.ron` from BCD runtime id `bun`
|
|
26
|
+
- `safari.ron` from BCD runtime id `safari`
|
|
27
|
+
- `chrome.ron` from BCD runtime id `chrome`
|
|
28
|
+
- `firefox.ron` from BCD runtime id `firefox`
|
|
29
|
+
|
|
30
|
+
Important: this is a source layer for JavaScript builtins and Web APIs. It does not cover Node core modules such as `fs`, `path`, or `http`; those need a separate Node documentation source layer before replacing the main `data/node.ron`.
|