Repository navigation
Commit 562c12b
fix(build): derive the Node floor from Node's changelog, not local installs
The engines range shipped in 6938757 was >=22.15.0, and the only reason for
that number was that 22.15.0 was the oldest Node on the laptop it was measured
on. 22.13 and 22.14 were never tested because they were not installed — not
because they fail. A machine's `nvm ls` is not a fact about Node, and using one
to bound every user of an OSS package is the wrong instrument.
nodejs/node#55890 unflagged node:sqlite in 22.13.0 and 23.4.0. So the honest
range is neither >=22.15.0 nor >=22.13.0:
- >=22.15.0 locked out 22.13 and 22.14 users, who are fine.
- >=22.13.0 would admit 23.0-23.3, which are semver-newer than 22.13 yet
still lack the module — a hard runtime failure, silently allowed by the
floor.
Both mistakes are invisible on a machine that has neither range's edge cases
installed, which is exactly why the boundary had to come from the changelog.
engines.node is now ">=22.13.0 <23.0.0 || >=23.4.0", and the runtime error
quotes the same requirement rather than a bare minimum that misdescribes the
23 line.
The .nvmrc guard is rewritten against Bun.semver instead of a regex that only
understood a single `>=x.y.z` — the shape the range no longer has. It now also
pins the 23.0-23.3 hole with explicit versions, and checks the .nvmrc line's
OLDEST possible release rather than assuming a bare major resolves to something
recent: `nvm use 24` yields whatever 24.x that machine happens to have.
Verified: the guard rejects a naive >=22.13.0, and 22.13/22.15/23.4/24/26 are
admitted while 20.20.1/22.12/23.0/23.3.9 are refused.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6938757 commit 562c12b
3 files changed
Lines changed: 61 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
| 25 | + | |
28 | 26 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
33 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| |||
150 | 157 | | |
151 | 158 | | |
152 | 159 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
161 | 169 | | |
162 | | - | |
| 170 | + | |
163 | 171 | | |
164 | | - | |
165 | | - | |
| 172 | + | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
| |||
0 commit comments