@crossberryweb/mozhi 3.2.0 → 3.2.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 +10 -1
- package/bin/mozhi.js +17 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,16 @@ mz run app.mz # short alias — same binary, identical behavior
|
|
|
13
13
|
Both are installed by npm from the same launcher, so `mz` and `mozhi` are
|
|
14
14
|
always in sync: same version, same flags, same exit codes.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- **Node.js ≥ 22** — any currently supported release line: 22.x (Maintenance
|
|
19
|
+
LTS), 24.x (LTS) or 26.x (Current). Node.js 14, 16, 18 and 20 have reached
|
|
20
|
+
end of life and are no longer supported; on those lines the launcher still
|
|
21
|
+
works (it only uses `child_process`, `fs` and `path`) but prints a one-time
|
|
22
|
+
end-of-life notice. The interpreter itself is a fully static native binary —
|
|
23
|
+
Node.js only runs the tiny launcher shim.
|
|
24
|
+
|
|
25
|
+
## What you get (v3.2.1)
|
|
17
26
|
|
|
18
27
|
- **Precise error diagnostics**: every error carries a stable code
|
|
19
28
|
(`LEX001`, `PARSE002`, `NAME001`, ...), a caret span under the exact
|
package/bin/mozhi.js
CHANGED
|
@@ -12,10 +12,15 @@
|
|
|
12
12
|
* mozhi — the canonical command
|
|
13
13
|
* mz — the short alias (identical behavior, same binary)
|
|
14
14
|
*
|
|
15
|
-
* Bundled (v3.2.0, fully static musl builds
|
|
15
|
+
* Bundled official release binaries (v3.2.0 line, fully static musl builds
|
|
16
|
+
* with SQLite vendored):
|
|
16
17
|
* bin/mozhi-linux-x86_64
|
|
17
18
|
* bin/mozhi-linux-arm64
|
|
18
19
|
*
|
|
20
|
+
* Node.js requirement (engines: ">=22"): the launcher only needs
|
|
21
|
+
* child_process, fs and path, but the supported Node.js release lines are
|
|
22
|
+
* 22.x, 24.x and 26.x — older lines are end-of-life and print a notice.
|
|
23
|
+
*
|
|
19
24
|
* macOS / Windows / other platforms:
|
|
20
25
|
* see https://github.com/crossberry-in/mozhi-doc#installation
|
|
21
26
|
*/
|
|
@@ -38,6 +43,17 @@ if (!fs.existsSync(bin)) {
|
|
|
38
43
|
process.exit(1);
|
|
39
44
|
}
|
|
40
45
|
|
|
46
|
+
// Node.js support policy (see engines in package.json): 22.x, 24.x and 26.x
|
|
47
|
+
// are the release lines that still receive security updates as of 2026-10.
|
|
48
|
+
// End-of-life lines still work — this launcher uses nothing newer than
|
|
49
|
+
// child_process/fs/path — but users get a one-time, non-blocking notice.
|
|
50
|
+
const nodeMajor = parseInt(String(process.version).slice(1), 10);
|
|
51
|
+
if (nodeMajor < 22) {
|
|
52
|
+
console.error('[mozhi] Notice: Node.js ' + process.version + ' has reached end of life.');
|
|
53
|
+
console.error('[mozhi] Supported Node.js release lines: 22.x, 24.x, 26.x (https://nodejs.org).');
|
|
54
|
+
console.error('[mozhi] Continuing anyway — the launcher only needs child_process, fs and path.');
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
const child = spawn(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
42
58
|
|
|
43
59
|
child.on('error', (err) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossberryweb/mozhi",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Mozhi programming language interpreter — native web, JSON, fs, math, SQLite, templates. Install once, get both commands: `mozhi` and the short alias `mz` (identical behavior).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
29
|
+
"node": ">=22"
|
|
30
30
|
}
|
|
31
31
|
}
|