@gjsify/node-runtime-win32-x64 0.44.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/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 gjsify contributors
4
+
5
+ This license covers the SOURCE of this package (index.js, index.d.ts) and the
6
+ fetch script in the gjsify repository that populates it. It does NOT cover the
7
+ Node.js interpreter under `bin/`: that keeps the terms of the Node.js project
8
+ and its bundled dependencies, reproduced verbatim in `bin/LICENSE` inside the
9
+ published tarball.
10
+
11
+ Node.js is a registered trademark of the OpenJS Foundation. This package is not
12
+ affiliated with, endorsed, or sponsored by the OpenJS Foundation.
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # @gjsify/node-runtime-win32-x64
2
+
3
+ The **Node.js interpreter for Windows x64**, packaged so an application built with
4
+ gjsify can carry its own. Three files, nothing else:
5
+
6
+ ```
7
+ bin/node.exe the interpreter (93,381,448 B), verbatim from the pinned Node 24 LTS release
8
+ bin/LICENSE Node's own LICENSE, verbatim from that same release
9
+ bin/manifest.json which release, which URL, which digests
10
+ ```
11
+
12
+ Platform-gated (`os: ["win32"]`, `cpu: ["x64"]`), tier 3. On any other
13
+ platform `npm install` REFUSES it with `EBADPLATFORM` — see
14
+ [Installing it from another platform](#installing-it-from-another-platform), which
15
+ is not an edge case here. The `bin/` payload is **not committed** — it is fetched and
16
+ digest-checked on a CI runner by
17
+ [`../scripts/fetch-node-runtime.mjs`](../scripts/fetch-node-runtime.mjs) and reaches
18
+ consumers through the published tarball.
19
+
20
+ ## Who installs it
21
+
22
+ **Nobody adds it to `dependencies`.** It follows the same rule as
23
+ `@gjsify/gtk-runtime-*` (see [docs/publishing.md](../../../docs/publishing.md)):
24
+ resolved **by name** by whoever *ships* the application, with no
25
+ `optionalDependencies` edge anywhere. Making a runtime bundle a dependency of the
26
+ library that uses it was [#910](https://github.com/gjsify/gjsify/issues/910) — a
27
+ from-source addon met a foreign GTK, produced wrong method entries and a 29-minute
28
+ timeout, and it was reverted in #920.
29
+
30
+ So for an app author the answer is: **nothing to add**. `gjsify ship` resolves
31
+ `@gjsify/node-runtime-<target>` for the target it is packaging and stages
32
+ `bin/node.exe` into the artifact. Overriding it is
33
+ `GJSIFY_NODE_RUNTIME=/path/to/bin`.
34
+
35
+ ## Why only three targets, and not Linux
36
+
37
+ **Linux gets no package.** A `.deb` or `.rpm` declares a dependency on the
38
+ distribution's Node instead — `Depends: nodejs (>= 24)` and
39
+ `Requires: nodejs(engine) >= 24` — exactly as a `--app gjs` package declares
40
+ `gjs`. Every Linux distribution ships a Node; macOS and Windows do not, which is
41
+ the whole reason these three exist.
42
+
43
+ ⚠️ The rpm spelling is **not** `nodejs >= 24`. Measured with `dnf repoquery` on
44
+ Fedora 44: `nodejs` as a name is provided only by `nodejs22-1:22.23.1`, whose
45
+ **Epoch 1** beats the `0:24` that a bare `>= 24` desugars to — so
46
+ `--whatprovides 'nodejs >= 24'` answers **nodejs22**. `nodejs(engine)` carries no
47
+ epoch and resolves correctly.
48
+
49
+ ## Why `bin/node.exe` and not the whole distribution
50
+
51
+ The full release drags in npm's bundled `node_modules`, which adds **149 further
52
+ LICENSE files** — 149 attribution obligations for code that is not being shipped.
53
+ (Measured on v24.20.0 as archive entries whose basename matches `^licen[cs]e`
54
+ **case-insensitively**: 150 in total, one of which is Node's own. The case rule is
55
+ load-bearing, not decoration — `license`, `license.js` and `license.md` account
56
+ for 8 of the 150, and reading the predicate as literal capitals answers 142. The
57
+ count is the same in the win-x64 zip and in the darwin tarballs, so it is a
58
+ property of the release and not of one archive.) An interpreter inside a `.app` or a Windows program
59
+ directory needs the binary and the terms it travels under.
60
+
61
+ Node's own `LICENSE`, verbatim from the release, discharges the whole set in one
62
+ file: MIT, Apache-2.0 §4(a)/(b), BSD-3 clause 2, Unicode-3.0, zlib, Artistic-2.0
63
+ (npm), BlueOak-1.0.0 (minimatch) and ISC. **Zero copyleft** in the shipped binary.
64
+ OpenSSL is upstream 3.5.7 under **Apache-2.0 alone** — not quictls, not the dual
65
+ licence — so there is no advertising clause and no "Eric Young" attribution to
66
+ reproduce, and no bundled Apache component ships a `NOTICE`.
67
+
68
+ ## Two traps the fetcher exists to close
69
+
70
+ 1. **`https://nodejs.org/dist/<v>/win-x64/` carries no LICENSE.** That directory
71
+ holds `node.exe`, `node.lib` and debug symbols and nothing else — measured on
72
+ v24.20.0, where it is the ONLY per-target directory the release publishes
73
+ (`darwin-arm64/` and `darwin-x64/` are 404). So this trap is a Windows trap
74
+ and it is this package's: 93 MB with no unzip step is the convenient route,
75
+ and it is the one that drops the redistribution obligation with no error. The
76
+ fetcher only ever reads the `.zip`.
77
+ 2. **One release ships the licence twice, byte-different.** 157,609 B with LF (in
78
+ the tarballs) and 160,555 B with CRLF (in the zip) — 2,946 CR, one per line.
79
+ Any size or digest check must expect **both**, or it passes two targets and
80
+ fails the third for a reason that reads like a corrupt download.
81
+
82
+ ## Installing it from another platform
83
+
84
+ `os`/`cpu` gating is what keeps this 90–125 MB package off machines that cannot
85
+ run it — but the design also says a Windows or macOS artifact may be assembled on
86
+ **Linux** (ADR 0024 § A1: the packers are pure JavaScript and run anywhere). Those
87
+ two pull in opposite directions, and npm resolves it in gating's favour. Measured
88
+ with npm 11.17.0 on Linux:
89
+
90
+ | command | result |
91
+ | --- | --- |
92
+ | `npm install <pkg>` | `EBADPLATFORM`, exit 1 |
93
+ | `npm install --os=win32 --cpu=x64 <pkg>` | `EBADPLATFORM`, exit 1 — the flags do **not** help |
94
+ | `npm install --force <pkg>` | installs, **exit 0** |
95
+ | `npm pack <pkg>` | downloads the tarball, **exit 0** |
96
+
97
+ ⚠️ Measured against **`@gjsify/gtk-runtime-win32-x64@0.44.0`** — a published
98
+ package with the same `os`/`cpu` gating — because the `@gjsify/node-runtime-*`
99
+ names are not on npm yet. Run verbatim against one of these today and npm answers
100
+ `E404`, not `EBADPLATFORM`; the rows become reproducible for these names after the
101
+ first publish. Until then the same four commands work against a locally packed
102
+ tarball (`gjsify pack`).
103
+
104
+ So a shipper cross-assembling on Linux uses `--force` (or `npm pack` plus an
105
+ extraction, which needs no override at all). This is NOT the "npm silently skips
106
+ a platform mismatch" behaviour — that applies to an `optionalDependencies` entry,
107
+ and this package is deliberately never one (see *Who installs it* above).
108
+
109
+ ## Use it directly
110
+
111
+ ```js
112
+ import { nodePath, isPresent, licensePath } from '@gjsify/node-runtime-win32-x64';
113
+
114
+ if (isPresent) {
115
+ // copy `nodePath` into your artifact — and `licensePath` beside it.
116
+ }
117
+ ```
118
+
119
+ `binaryName` is a package constant, never derived from `process.platform`:
120
+ assembling a Windows artifact on Linux is a supported path, and a derived name
121
+ would look for the wrong file there.
122
+
123
+ ---
124
+
125
+ Node.js is a registered trademark of the OpenJS Foundation. This package is not
126
+ affiliated with, endorsed, or sponsored by the OpenJS Foundation.