@gjsify/node-runtime-darwin-arm64 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,128 @@
1
+ # @gjsify/node-runtime-darwin-arm64
2
+
3
+ The **Node.js interpreter for macOS on Apple silicon**, packaged so an application built with
4
+ gjsify can carry its own. Three files, nothing else:
5
+
6
+ ```
7
+ bin/node the interpreter (121,911,744 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: ["darwin"]`, `cpu: ["arm64"]`), 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` 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` 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 in the release, and what the fetcher does about them
69
+
70
+ 1. **The convenient shortcut that drops the licence does not exist for darwin —
71
+ and that is worth stating, not omitting.** `https://nodejs.org/dist/<v>/win-x64/`
72
+ serves a bare `node.exe` with no LICENSE beside it, and taking that route is
73
+ how a Windows package ends up redistributing a binary with no terms attached.
74
+ Measured on v24.20.0, the equivalent `darwin-arm64/` and `darwin-x64/` paths
75
+ return **404**: the release publishes no per-target directory for macOS at all,
76
+ so the only way to get this binary is the `.tar.xz`, which carries the licence.
77
+ The fetcher is one shared script across all three targets, so it reads the
78
+ archive here for the reason it must there.
79
+ 2. **One release ships the licence twice, byte-different.** 157,609 B with LF (in
80
+ the tarballs) and 160,555 B with CRLF (in the zip) — 2,946 CR, one per line.
81
+ Any size or digest check must expect **both**, or it passes two targets and
82
+ fails the third for a reason that reads like a corrupt download.
83
+
84
+ ## Installing it from another platform
85
+
86
+ `os`/`cpu` gating is what keeps this 90–125 MB package off machines that cannot
87
+ run it — but the design also says a Windows or macOS artifact may be assembled on
88
+ **Linux** (ADR 0024 § A1: the packers are pure JavaScript and run anywhere). Those
89
+ two pull in opposite directions, and npm resolves it in gating's favour. Measured
90
+ with npm 11.17.0 on Linux:
91
+
92
+ | command | result |
93
+ | --- | --- |
94
+ | `npm install <pkg>` | `EBADPLATFORM`, exit 1 |
95
+ | `npm install --os=win32 --cpu=x64 <pkg>` | `EBADPLATFORM`, exit 1 — the flags do **not** help |
96
+ | `npm install --force <pkg>` | installs, **exit 0** |
97
+ | `npm pack <pkg>` | downloads the tarball, **exit 0** |
98
+
99
+ ⚠️ Measured against **`@gjsify/gtk-runtime-win32-x64@0.44.0`** — a published
100
+ package with the same `os`/`cpu` gating — because the `@gjsify/node-runtime-*`
101
+ names are not on npm yet. Run verbatim against one of these today and npm answers
102
+ `E404`, not `EBADPLATFORM`; the rows become reproducible for these names after the
103
+ first publish. Until then the same four commands work against a locally packed
104
+ tarball (`gjsify pack`).
105
+
106
+ So a shipper cross-assembling on Linux uses `--force` (or `npm pack` plus an
107
+ extraction, which needs no override at all). This is NOT the "npm silently skips
108
+ a platform mismatch" behaviour — that applies to an `optionalDependencies` entry,
109
+ and this package is deliberately never one (see *Who installs it* above).
110
+
111
+ ## Use it directly
112
+
113
+ ```js
114
+ import { nodePath, isPresent, licensePath } from '@gjsify/node-runtime-darwin-arm64';
115
+
116
+ if (isPresent) {
117
+ // copy `nodePath` into your artifact — and `licensePath` beside it.
118
+ }
119
+ ```
120
+
121
+ `binaryName` is a package constant, never derived from `process.platform`:
122
+ assembling a Windows artifact on Linux is a supported path, and a derived name
123
+ would look for the wrong file there.
124
+
125
+ ---
126
+
127
+ Node.js is a registered trademark of the OpenJS Foundation. This package is not
128
+ affiliated with, endorsed, or sponsored by the OpenJS Foundation.