Commit cc10026
committed
refactor(releases): use process.platform verbatim (win32) in asset names
Previously socket-btm asset names used 'win' instead of 'win32' for
the OS segment, with the rest of the ecosystem — process.platform,
npm manifest os/cpu/libc filters, pnpm's --os and
supportedArchitectures.os, pack-app target strings, and @pnpm/exe.<triple>
package names — all using 'win32' unabbreviated. The mismatch forced
callers constructing npm install filters or pack-app targets to
remember which naming layer they were in. No current published
@socketbin/* consumer depends on the 'win' form yet, so realign to the
unabbreviated identifier now while the blast radius is bounded.
Caller-visible shape change:
- getPlatformArch('win32', <arch>) now returns 'win32-<arch>' (was
'win-<arch>').
- getBinaryAssetName(base, 'win32', arch, ...) now returns
'base-win32-<arch>.exe' (was 'base-win-<arch>.exe').
- PLATFORM_MAP.win32 is 'win32' (was 'win'), making the map pure
identity — kept for the symmetric darwin/linux/win32 API surface
and because future platforms may still need a translation.
Docstring for getPlatformArch expanded to spell out the rationale:
why win32 over win, why -musl is the suffix (and glibc is unsuffixed),
why libc is linux-only, and why the function exists as a central
triple-construction helper. The goal is that a future reader reaching
for this function doesn't have to re-derive the compatibility web
between npm manifest filters, pnpm target strings, and Node.js
tarball naming from first principles.
Tests updated to expect the new strings (8 assertions across
getBinaryAssetName + getPlatformArch).1 parent c418eb8 commit cc10026
2 files changed
Lines changed: 75 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
358 | | - | |
| 361 | + | |
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
| |||
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
385 | | - | |
386 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
387 | 444 | | |
388 | 445 | | |
389 | 446 | | |
390 | | - | |
391 | | - | |
| 447 | + | |
| 448 | + | |
392 | 449 | | |
393 | 450 | | |
394 | 451 | | |
395 | 452 | | |
396 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
397 | 456 | | |
398 | 457 | | |
399 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
0 commit comments