@socketsecurity/lib 5.26.0 → 5.27.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/CHANGELOG.md +371 -1185
- package/README.md +1 -1
- package/dist/abort.js +7 -6
- package/dist/agent.js +16 -15
- package/dist/ansi.js +3 -2
- package/dist/archives.js +18 -17
- package/dist/argv/flags.js +29 -28
- package/dist/argv/parse.js +4 -3
- package/dist/arrays.js +3 -2
- package/dist/bin.js +12 -11
- package/dist/cacache.js +16 -11
- package/dist/cache-with-ttl.js +26 -21
- package/dist/colors.js +2 -1
- package/dist/constants/licenses.js +2 -1
- package/dist/constants/lifecycle-script-names.js +2 -1
- package/dist/constants/maintained-node-versions.js +2 -1
- package/dist/constants/node.js +4 -3
- package/dist/constants/package-default-socket-categories.js +2 -1
- package/dist/constants/packages.js +4 -3
- package/dist/constants/socket.js +1 -1
- package/dist/cover/code.js +9 -8
- package/dist/cover/formatters.js +12 -11
- package/dist/cover/type.js +5 -4
- package/dist/crypto.d.ts +36 -0
- package/dist/{effects/ultra.js → crypto.js} +26 -37
- package/dist/debug.js +12 -15
- package/dist/dlx/arborist.js +10 -9
- package/dist/dlx/binary.js +27 -24
- package/dist/dlx/cache.js +2 -10
- package/dist/dlx/detect.js +6 -5
- package/dist/dlx/integrity.js +13 -11
- package/dist/dlx/lockfile.js +7 -6
- package/dist/dlx/manifest.js +6 -5
- package/dist/dlx/package.js +17 -16
- package/dist/dlx/packages.js +6 -5
- package/dist/dlx/paths.d.ts +1 -1
- package/dist/dlx/paths.js +2 -1
- package/dist/effects/pulse-frames.js +4 -3
- package/dist/effects/shimmer-keyframes.d.ts +62 -0
- package/dist/effects/shimmer-keyframes.js +55 -0
- package/dist/effects/shimmer-terminal.d.ts +66 -0
- package/dist/effects/shimmer-terminal.js +57 -0
- package/dist/effects/shimmer.d.ts +293 -0
- package/dist/effects/shimmer.js +180 -0
- package/dist/env/rewire.js +4 -3
- package/dist/env.js +5 -4
- package/dist/errors.js +1 -1
- package/dist/external/@npmcli/package-json/lib/read-package.js +10 -10
- package/dist/external/@npmcli/package-json.js +372 -372
- package/dist/external/@npmcli/promise-spawn.js +24 -24
- package/dist/external/@socketregistry/packageurl-js.js +19 -18
- package/dist/external/@socketregistry/yocto-spinner.js +4 -3
- package/dist/external/@yarnpkg/extensions.js +2 -1
- package/dist/external/adm-zip.js +71 -71
- package/dist/external/debug.js +22 -22
- package/dist/external/external-pack.js +45 -45
- package/dist/external/fast-sort.js +5 -5
- package/dist/external/libnpmexec.js +4 -3
- package/dist/external/npm-pack.js +369 -369
- package/dist/external/p-map.js +9 -9
- package/dist/external/pico-pack.js +190 -190
- package/dist/external/pony-cause.js +2 -1
- package/dist/external/spdx-pack.js +11 -10
- package/dist/external/tar-fs.js +58 -58
- package/dist/external/which.js +13 -13
- package/dist/external/yargs-parser.js +71 -71
- package/dist/fs.js +50 -68
- package/dist/git.js +14 -13
- package/dist/github.d.ts +34 -0
- package/dist/github.js +248 -23
- package/dist/globs.d.ts +20 -0
- package/dist/globs.js +134 -25
- package/dist/http-request.d.ts +4 -3
- package/dist/http-request.js +39 -32
- package/dist/ipc-cli.js +2 -1
- package/dist/ipc.js +5 -4
- package/dist/json/edit.js +4 -3
- package/dist/json/format.js +3 -2
- package/dist/json/parse.js +7 -6
- package/dist/links.js +2 -1
- package/dist/logger.js +21 -14
- package/dist/memoization.js +16 -15
- package/dist/node/async-hooks.d.ts +6 -0
- package/dist/node/async-hooks.js +34 -0
- package/dist/node/child-process.d.ts +11 -0
- package/dist/node/child-process.js +34 -0
- package/dist/node/crypto.d.ts +6 -0
- package/dist/node/crypto.js +34 -0
- package/dist/node/events.d.ts +6 -0
- package/dist/node/events.js +34 -0
- package/dist/node/fs-promises.d.ts +6 -0
- package/dist/node/fs-promises.js +34 -0
- package/dist/node/fs.d.ts +14 -0
- package/dist/node/fs.js +34 -0
- package/dist/node/http.d.ts +6 -0
- package/dist/node/http.js +34 -0
- package/dist/node/https.d.ts +6 -0
- package/dist/node/https.js +34 -0
- package/dist/node/os.d.ts +6 -0
- package/dist/node/os.js +34 -0
- package/dist/node/path.d.ts +6 -0
- package/dist/node/path.js +34 -0
- package/dist/node/timers-promises.d.ts +6 -0
- package/dist/node/timers-promises.js +34 -0
- package/dist/node/url.d.ts +6 -0
- package/dist/node/url.js +34 -0
- package/dist/node/util.d.ts +6 -0
- package/dist/node/util.js +34 -0
- package/dist/objects.js +2 -2
- package/dist/packages/edit.js +8 -7
- package/dist/packages/exports.js +17 -16
- package/dist/packages/isolation.js +20 -13
- package/dist/packages/licenses.js +6 -3
- package/dist/packages/manifest.js +2 -1
- package/dist/packages/normalize.js +8 -4
- package/dist/packages/operations.js +5 -4
- package/dist/packages/provenance.js +7 -6
- package/dist/packages/specs.js +2 -1
- package/dist/packages/validation.js +2 -1
- package/dist/paths/normalize.js +32 -40
- package/dist/paths/packages.js +2 -1
- package/dist/paths/rewire.js +3 -2
- package/dist/performance.js +19 -18
- package/dist/primordials.d.ts +85 -2
- package/dist/primordials.js +311 -23
- package/dist/process-lock.js +14 -13
- package/dist/promise-queue.js +17 -9
- package/dist/promises.d.ts +29 -6
- package/dist/promises.js +19 -15
- package/dist/regexps.js +9 -8
- package/dist/releases/github-api.d.ts +56 -0
- package/dist/releases/github-api.js +275 -0
- package/dist/releases/github-archives.d.ts +60 -0
- package/dist/releases/github-archives.js +136 -0
- package/dist/releases/github-assets.d.ts +21 -0
- package/dist/releases/github-assets.js +52 -0
- package/dist/releases/github-auth.d.ts +16 -0
- package/dist/releases/github-auth.js +51 -0
- package/dist/releases/github-downloads.d.ts +42 -0
- package/dist/releases/github-downloads.js +155 -0
- package/dist/releases/github-types.d.ts +66 -0
- package/dist/{effects/types.js → releases/github-types.js} +2 -2
- package/dist/releases/socket-btm.d.ts +1 -1
- package/dist/releases/socket-btm.js +17 -17
- package/dist/schema/parse.js +2 -1
- package/dist/schema/validate.js +6 -5
- package/dist/sea/util.d.ts +43 -0
- package/dist/{sea.js → sea/util.js} +7 -7
- package/dist/shadow.js +2 -1
- package/dist/signal-exit.js +2 -2
- package/dist/smol/primordial.d.ts +80 -0
- package/dist/smol/primordial.js +46 -0
- package/dist/smol/util.d.ts +87 -0
- package/dist/smol/util.js +59 -0
- package/dist/smol/versions.d.ts +46 -0
- package/dist/smol/versions.js +46 -0
- package/dist/spawn.js +58 -63
- package/dist/spinner.d.ts +13 -6
- package/dist/spinner.js +75 -57
- package/dist/ssri.js +8 -7
- package/dist/stdio/footer.js +13 -12
- package/dist/stdio/header.js +5 -4
- package/dist/stdio/progress.js +13 -12
- package/dist/strings.js +19 -18
- package/dist/suppress-warnings.js +2 -2
- package/dist/tables.js +16 -13
- package/dist/temporary-executor.js +2 -1
- package/dist/themes/context.js +2 -1
- package/dist/themes/types.d.ts +1 -1
- package/dist/themes/utils.d.ts +8 -3
- package/dist/themes/utils.js +29 -5
- package/dist/url.js +4 -3
- package/dist/versions.js +27 -22
- package/package.json +120 -26
- package/dist/effects/text-shimmer.d.ts +0 -58
- package/dist/effects/text-shimmer.js +0 -192
- package/dist/effects/types.d.ts +0 -47
- package/dist/effects/ultra.d.ts +0 -22
- package/dist/releases/github.d.ts +0 -234
- package/dist/releases/github.js +0 -417
- package/dist/sea.d.ts +0 -30
- package/dist/themes/index.d.ts +0 -49
- package/dist/themes/index.js +0 -60
package/CHANGELOG.md
CHANGED
|
@@ -5,1573 +5,1028 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [5.
|
|
8
|
+
## [5.27.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.27.0) - 2026-05-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **45 new `primordials` exports** rounding out the surface to 296 total:
|
|
13
|
+
- `BigIntCtor`
|
|
14
|
+
- Math: 24 methods (Acos, Atan2, Hypot, Pow, etc.) + 8 constants (E, PI, SQRT2, etc.); `MathF16round` typed `| undefined` for ES2025
|
|
15
|
+
- Number constants: `EPSILON`, `MAX_SAFE_INTEGER`, `MAX_VALUE`, `MIN_SAFE_INTEGER`, `MIN_VALUE`, `NEGATIVE_INFINITY`, `POSITIVE_INFINITY`
|
|
16
|
+
- Symbol: 10 well-knowns (`HasInstance`, `KeyFor`, `Match`, `Species`, etc.); `SymbolAsyncDispose` / `SymbolDispose` typed `| undefined` for ES2024; prototype helpers (`Description`, `ToString`, `ValueOf`)
|
|
17
|
+
- Function: `FunctionPrototypeToString`
|
|
18
|
+
- Array (ES2023 Change Array By Copy): `ArrayPrototypeToSpliced`, `ArrayPrototypeWith`
|
|
19
|
+
- Globals: `InfinityValue`, `NaNValue`, `globalThisRef`
|
|
20
|
+
- Object (annex B): `ObjectPrototype{Define,Lookup}{Getter,Setter}`
|
|
21
|
+
- Error (V8 stack-trace API, `| undefined`): `ErrorCaptureStackTrace`, `ErrorPrepareStackTrace`, `ErrorStackTraceLimit` (function-shaped, reads live value)
|
|
22
|
+
|
|
23
|
+
- **`smol/*` (new exports)** — feature-detect + lazy-loaders for socket-btm's smol Node binary:
|
|
24
|
+
- `smol/detect` — `isSmol()`: memoized boolean, mirrors `isSeaBinary()`
|
|
25
|
+
- `smol/util` — `getSmolUtil()`: native `uncurryThis` / `applyBind` (~2x faster), or `undefined`
|
|
26
|
+
- `smol/primordial` — `getSmolPrimordial()`: V8 Fast API typed `Math.*` / `Number.is*` (~30-50% faster on hot loops), or `undefined`
|
|
27
|
+
- `primordials` transparently routes through these on smol; **zero call-site changes**, identical behavior on stock Node, smol, browsers, Deno, Bun
|
|
28
|
+
|
|
29
|
+
- **`node/*` (new exports)** — per-builtin lazy-loaders for `node:*` modules. Each is `/*@__NO_SIDE_EFFECTS__*/`-marked so bundlers tree-shake the `require()` when unused:
|
|
30
|
+
- `node/fs` (`getNodeFs`), `node/path` (`getNodePath`), `node/crypto` (`getNodeCrypto`), `node/http` (`getNodeHttp`), `node/https` (`getNodeHttps`), `node/os` (`getNodeOs`), `node/util` (`getNodeUtil`), `node/url` (`getNodeUrl`), `node/events` (`getNodeEvents`)
|
|
31
|
+
- `node/child-process` (`getNodeChildProcess`), `node/async-hooks` (`getNodeAsyncHooks`), `node/fs-promises` (`getNodeFsPromises`), `node/timers-promises` (`getNodeTimersPromises`)
|
|
32
|
+
- Replaces ~30 ad-hoc copies of the same lazy-loader boilerplate previously scattered across `http-request.ts`, `spawn.ts`, `fs.ts`, `crypto.ts`, etc.
|
|
33
|
+
|
|
34
|
+
## [5.26.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.26.1) - 2026-05-01
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- `crypto` (new export) — `hash(algorithm, data, encoding)` one-shot helper that prefers Node's native `crypto.hash` (added v21.7.0 / v20.12.0; ~30% faster than `createHash().update().digest()` on small inputs) with a streaming fallback. `getNativeHash` exposed as `@internal` for tests
|
|
39
|
+
- `promises` `fromAsync<T>(source)` — drains an async iterable into an array, per [TC39 Array.fromAsync](https://tc39.es/proposal-array-from-async/). Backed by the new `ArrayFromAsync` primordial (Node 22+) with a `for await` + push fallback
|
|
40
|
+
- `primordials` `ArrayFromAsync` — ES2024 primordial. Unbound, matching `ArrayFrom`
|
|
41
|
+
- `globs` `glob` / `globSync` route through `node:fs.glob` / `node:fs.globSync` (Node 22+) when caller options reduce to `cwd` + `ignore` (mapped to `exclude`); fall back to fast-glob for the wider option surface. Output paths are normalized to forward slashes on Windows to match fast-glob's contract
|
|
42
|
+
- `effects/shimmer` — pure-functional shimmer engine
|
|
43
|
+
- `effects/shimmer-terminal` — terminal (ANSI) renderer for the engine
|
|
44
|
+
- `effects/shimmer-keyframes` — SVG keyframe batcher for the engine
|
|
45
|
+
- `releases/github-types`, `github-assets`, `github-auth`, `github-api`, `github-downloads`, `github-archives` — six focused submodules replacing the single `releases/github` export
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- `http-request` retry/backoff sites use `setTimeout` from `node:timers/promises` instead of hand-rolled `new Promise(r => setTimeout(r, ms))`
|
|
50
|
+
- `dlx/cache`, `dlx/integrity`, `dlx/binary` — 4 one-shot hash sites switched to the new `crypto.hash()` helper
|
|
51
|
+
- `package.json` — pin `publishConfig: {access: "public", provenance: true}` so attestation is a property of the package, not a property of the workflow's `--provenance` CLI flag. Survives any direct-publish path that bypasses `provenance.yml`. `access: "public"` also load-bears for first-publish of `@scoped` packages on a fresh npm registry session.
|
|
52
|
+
- `promise-queue.runNext` — replace the `PromiseResolve().then().catch().finally()` chain with an async IIFE + try/catch/finally. Same semantics (defers `task.fn()` by one microtask so synchronous throws become rejections), more explicit about the success/error/cleanup flow.
|
|
53
|
+
- `packages/isolation.resolveRealPath` — replace `realpath().catch(fallback)` with try/await/catch. Same fall-back-on-ENOENT behavior, clearer that the catch is intentional.
|
|
54
|
+
- **BREAKING**: `spinner` `ShimmerInfo` shape — `{ direction, speed, frame }` (was: `currentDir`, `mode`, `speed`, `step`). User-facing `ShimmerConfig` is unchanged
|
|
55
|
+
- `getLatestRelease` / `getReleaseAssetUrl` return `undefined` (was: `null`) when no result is found, and no longer log on success/retry — errors throw, success returns
|
|
56
|
+
|
|
57
|
+
### Removed
|
|
58
|
+
|
|
59
|
+
- **BREAKING**: `effects/text-shimmer`, `effects/ultra`, `effects/types` subpath exports. Migrate to `effects/shimmer` (+ `effects/shimmer-terminal`); `RAINBOW_GRADIENT` now lives in `themes/utils`
|
|
60
|
+
- **BREAKING**: `themes` barrel export. Import from `themes/themes`, `themes/context`, `themes/utils`, or `themes/types`
|
|
61
|
+
- **BREAKING**: `releases/github` subpath export. Migrate to the focused submodules (see Added)
|
|
62
|
+
- `getLatestRelease({ quiet })` / `getReleaseAssetUrl({ quiet })` — the helpers no longer log
|
|
9
63
|
|
|
10
64
|
### Fixed
|
|
11
65
|
|
|
12
|
-
-
|
|
66
|
+
- `globs` `getGlobMatcher` — narrow the `path.matchesGlob` fast-path that an earlier draft introduced. `path.matchesGlob` doesn't honor the picomatch defaults (`dot: true`, `nocase: true`) that callers expect, so taking the fast-path under those defaults silently changed observable behavior — including breaking the case-insensitive default everywhere a single-pattern matcher was used. The fast-path now activates only when the caller has explicitly opted out of both defaults (`nocase: false` AND `dot: false`), signaling "I want strict, case-sensitive, no-dotfile-match" — exactly what `path.matchesGlob` provides
|
|
67
|
+
- `globs` `glob` / `globSync` — normalize results to forward slashes via `paths/normalize.normalizePath` regardless of which backend (`node:fs.glob` or `fast-glob`) was used. Restores fast-glob's forward-slash contract on Windows, where `node:fs.glob` returns native-OS separators
|
|
68
|
+
- `globs` `glob` / `globSync` / `globStreamLicenses` — strip a trailing `/` from `ignore` patterns before passing them to fast-glob. The gitignore convention of writing directory entries as `dist/` was silently dropped at the deep-filter level (fast-glob walked the entire subtree before discarding results), which on a large `dist/` could push memory past the limit. fast-glob v3.3.3 and the unreleased v4 both have the bug; tracked at [mrmlnc/fast-glob#437](https://github.com/mrmlnc/fast-glob/issues/437). Same workaround as [SocketDev/socket-cli#1288](https://github.com/SocketDev/socket-cli/pull/1288).
|
|
69
|
+
- `releases/github-api` `getLatestRelease` and `getReleaseAssetUrl` transparently fall back to GraphQL when GitHub REST returns 200 + empty body (search-degraded incident shape)
|
|
70
|
+
- `github` `resolveRefToSha` and `fetchGhsaDetails` get the same GraphQL fallback for the same incident shape
|
|
71
|
+
- All fallbacks only fire on the empty-body signature; real 404s, rate-limits, and 5xx still propagate
|
|
72
|
+
|
|
73
|
+
## [5.26.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.26.0) - 2026-04-27
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
|
|
77
|
+
- `github` `GitHubEmptyBodyError` — exported error class for GitHub's "search degraded" 200 OK + empty body incident shape
|
|
78
|
+
- `nothrow` option on `getLatestRelease` and `getReleaseAssetUrl` — return `undefined` instead of throwing when both REST and GraphQL backends are degraded
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
|
|
82
|
+
- `getLatestRelease` / `getReleaseAssetUrl` return `undefined` (was: `null`) when no result is found, and no longer log on success/retry — errors throw, success returns
|
|
83
|
+
- `fetchGhsaDetails` GraphQL fallback normalizes severity to lowercase to match REST shape
|
|
84
|
+
|
|
85
|
+
### Removed
|
|
86
|
+
|
|
87
|
+
- `getLatestRelease({ quiet })` / `getReleaseAssetUrl({ quiet })` — no longer accepted (the helpers don't log anymore)
|
|
88
|
+
|
|
89
|
+
### Fixed
|
|
90
|
+
|
|
91
|
+
- `releases/github` `getLatestRelease` and `getReleaseAssetUrl` fall back to GraphQL on the empty-body incident shape
|
|
92
|
+
- `github` `resolveRefToSha` and `fetchGhsaDetails` get the same GraphQL fallback
|
|
93
|
+
- All fallbacks fire only on `GitHubEmptyBodyError`; real 404s / rate-limits / 5xx still propagate
|
|
94
|
+
|
|
95
|
+
## [5.25.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.1) - 2026-04-27
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- `primordials` `StringPrototypeReplace` / `StringPrototypeReplaceAll` — `replaceValue` accepts the callback form, matching `String.prototype.replace`
|
|
13
100
|
|
|
14
101
|
## [5.25.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.0) - 2026-04-26
|
|
15
102
|
|
|
16
103
|
### Added
|
|
17
104
|
|
|
18
|
-
-
|
|
105
|
+
- `primordials` — public module exposing ~100 safe references to built-in constructors, static methods, and prototype methods captured at load time. Static methods keep their name (`ObjectKeys`, `JSONParse`); prototype methods are uncurried (`StringPrototypeSlice(str, 0, 3)`); constructors use a `Ctor` suffix (`MapCtor`, `ErrorCtor`)
|
|
19
106
|
|
|
20
107
|
## [5.24.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.24.0) - 2026-04-22
|
|
21
108
|
|
|
22
109
|
### Removed
|
|
23
110
|
|
|
24
|
-
-
|
|
111
|
+
- `env/socket-cli-shadow` — deleted (unused)
|
|
25
112
|
|
|
26
113
|
### Fixed
|
|
27
114
|
|
|
28
|
-
- `packPackage()` / `extractPackage()`
|
|
29
|
-
- `EditablePackageJson.prepare()` no longer throws `git.find is not a function
|
|
30
|
-
- `packPackage(<dir>)`
|
|
115
|
+
- `packPackage()` / `extractPackage()` work for non-registry specs (local dir/tarball, remote tarball, git)
|
|
116
|
+
- `EditablePackageJson.prepare()` no longer throws `git.find is not a function`
|
|
117
|
+
- `packPackage(<dir>)` runs `prepack` / `postpack` scripts instead of throwing
|
|
31
118
|
|
|
32
119
|
## [5.23.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.23.0) - 2026-04-22
|
|
33
120
|
|
|
34
121
|
### Added
|
|
35
122
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
123
|
+
- `errors` `isError(value)` — spec-compliant ES2025 [`Error.isError`](https://tc39.es/ecma262/#sec-error.iserror), cross-realm safe
|
|
124
|
+
- `errors` `errorMessage(value)` — readable message from any caught value (Error, primitive, object, nullish) with cause-chain support
|
|
125
|
+
- `errors` `errorStack(value)` — cause-aware stack or `undefined`
|
|
126
|
+
- `errors` `isErrnoException(value)` — narrows to `NodeJS.ErrnoException`, cross-realm safe
|
|
127
|
+
- `errors` re-exports `UNKNOWN_ERROR`
|
|
41
128
|
|
|
42
129
|
### Changed
|
|
43
130
|
|
|
44
|
-
-
|
|
131
|
+
- pony-cause `messageWithCauses` / `stackWithCauses` / `findCauseByReference` / `getErrorCause` use `isError` internally — cross-realm Errors are recognized (previously returned `''`)
|
|
45
132
|
|
|
46
133
|
## [5.22.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.22.0) - 2026-04-21
|
|
47
134
|
|
|
48
135
|
### Changed
|
|
49
136
|
|
|
50
|
-
-
|
|
137
|
+
- `releases/socket-btm` `getPlatformArch()` / `getBinaryAssetName()` — aligned with pnpm pack-app's `<os>-<arch>[-<libc>]` format. Windows OS segment is now `win32` (was `win`)
|
|
51
138
|
|
|
52
139
|
## [5.21.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.21.0) - 2026-04-20
|
|
53
140
|
|
|
54
141
|
### Added
|
|
55
142
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
143
|
+
- `schema/validate` — non-throwing Zod/TypeBox validator returning `{ ok, value } | { ok, errors }`
|
|
144
|
+
- `schema/parse` — throwing variant for fail-fast trust boundaries
|
|
145
|
+
- `schema/types` — `Schema<T>`, `ValidateResult<T>`, `ValidationIssue`, `AnySchema`, `Infer<S>`
|
|
146
|
+
- `promises` `withResolvers()` — spec-compliant [`Promise.withResolvers`](https://tc39.es/ecma262/#sec-promise.withResolvers); uses native when available
|
|
60
147
|
|
|
61
148
|
### Changed
|
|
62
149
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
150
|
+
- `regexps` `escapeRegExp()` — now spec-compliant with TC39 [`RegExp.escape`](https://tc39.es/ecma262/#sec-regexp.escape). **Output shape changed**: many characters now escape to `\xHH` (e.g. `'a'` → `'\x61'`); compiled regex behavior is preserved
|
|
151
|
+
- `memoization` `MemoizeOptions<Args>` — dropped unused second type parameter
|
|
152
|
+
- `packages/specs` `getRepoUrlDetails()` — accepts `git+https://` / `git+ssh://` GitHub URLs; rejects lookalike hosts. scp-style `git@github.com:…` returns `{ user: '', project: '' }`
|
|
153
|
+
- `url` `urlSearchParamAsBoolean()` — accepts the same truthy vocabulary as `envAsBoolean` (`1` / `true` / `yes` / `on`); empty string falls through to `defaultValue`
|
|
67
154
|
|
|
68
155
|
### Removed
|
|
69
156
|
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
- `safeJsonParse` → `@socketsecurity/lib/json/parse`
|
|
73
|
-
- Types → `@socketsecurity/lib/schema/types` and `@socketsecurity/lib/json/types`
|
|
74
|
-
- `memoizeDebounced` from `@socketsecurity/lib/memoization` — was misnamed and had no consumers. Use `memoize` / `memoizeAsync` with a `ttl` instead
|
|
157
|
+
- `validation/*` subpath retired — exports re-homed: `validateSchema` / `parseSchema` → `schema/validate` / `schema/parse`; `safeJsonParse` → `json/parse`; types → `schema/types` and `json/types`
|
|
158
|
+
- `memoization` `memoizeDebounced` — use `memoize` / `memoizeAsync` with a `ttl` instead
|
|
75
159
|
|
|
76
160
|
### Fixed
|
|
77
161
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
- Glob cache keys for array-valued options
|
|
162
|
+
- `versions` `maxVersion()` / `minVersion()` — return latest/earliest prerelease for all-prerelease inputs
|
|
163
|
+
- `fs` `findUp()` / `findUpSync()` — traverse up to and including the filesystem root
|
|
164
|
+
- `words` `capitalize()` — safe for non-BMP characters (emoji, astral-plane scripts)
|
|
165
|
+
- `words` `determineArticle()` — case-insensitive vowel match
|
|
166
|
+
- `archives` `extractZip` / `extractTar` / `extractTarGz` — missing-archive errors uniformly surface as `ENOENT`
|
|
167
|
+
- `promise-queue` — bounded queue rejects newest submission when full, preserving in-flight work
|
|
168
|
+
- `cacache` / `cache-with-ttl` — wildcard key deletion anchors both ends of the pattern
|
|
169
|
+
- `process-lock` — sub-second `staleMs` values honored at full precision; TOCTOU window on acquisition closed
|
|
170
|
+
- `suppress-warnings` `withSuppressedWarnings()` — no longer wipes concurrent suppressions on exit
|
|
171
|
+
- `dlx` LRU caches capped (binary path, package.json path); negative package.json lookups expire after 10s
|
|
172
|
+
- Glob cache keys for array-valued options are order-insensitive
|
|
89
173
|
|
|
90
174
|
### Performance
|
|
91
175
|
|
|
92
|
-
-
|
|
93
|
-
-
|
|
176
|
+
- `memoization` cache-hit bookkeeping is now O(1) (was O(n))
|
|
177
|
+
- `cacache` wildcard `clear()` no longer recompiles the match regex per entry
|
|
94
178
|
|
|
95
179
|
## [5.20.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.20.1) - 2026-04-19
|
|
96
180
|
|
|
97
181
|
### Fixed
|
|
98
182
|
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
- `@socketsecurity/lib/json/edit` — `@example` import path corrected
|
|
183
|
+
- `ipc` — stub-file writes hardened against symlink/TOCTOU attacks (`O_EXCL | O_NOFOLLOW`, ownership + mode validation)
|
|
184
|
+
- `cache-with-ttl` `getOrFetch()` — closes concurrent-caller race that fired the fetcher twice
|
|
185
|
+
- `cache-with-ttl` — in-memory memo layer capped via LRU (`memoMaxSize`, default 1000)
|
|
186
|
+
- `memoization` `memoizeAsync()` — refreshes entry timestamp on resolve so slow fetches aren't immediately classified as expired
|
|
187
|
+
- `tables` — `displayWidth` measures rendered terminal cells via `stringWidth` (CJK / emoji / combining marks align correctly)
|
|
188
|
+
- `paths/packages` — `resolvePackageJsonDirname` / `resolvePackageJsonPath` no longer mis-identify files like `/foo/my-package.json`
|
|
106
189
|
|
|
107
190
|
## [5.20.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.20.0) - 2026-04-19
|
|
108
191
|
|
|
109
192
|
### Added
|
|
110
193
|
|
|
111
|
-
-
|
|
194
|
+
- `validation/validate-schema` — universal Zod-style schema validator with `validateSchema` (tagged result) and `parseSchema` (throwing). No runtime `zod` dep
|
|
112
195
|
|
|
113
|
-
> **Deprecated in 5.21.0**: moved to
|
|
196
|
+
> **Deprecated in 5.21.0**: moved to `schema/*`.
|
|
114
197
|
|
|
115
198
|
### Fixed
|
|
116
199
|
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
- `@socketsecurity/lib/stdio/prompts` — tighten an internal destructure type away from `as any`
|
|
122
|
-
- `@socketsecurity/lib/http-request` — hoist checksum regex literals out of a per-line loop
|
|
200
|
+
- `promise-queue` — sync throws inside a queued task convert to proper rejections (no longer escape as uncaught)
|
|
201
|
+
- `stdio/progress` `formatTime()` — clamps negative milliseconds (no negative ETAs)
|
|
202
|
+
- `dlx/lockfile` — scratch-directory cleanup no longer clobbers the real exception
|
|
203
|
+
- `dlx/package` `parsePackageSpec` — bare trailing `@` (e.g. `"pkg@"`) normalizes to `version: undefined`
|
|
123
204
|
|
|
124
205
|
## [5.19.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.19.1) - 2026-04-19
|
|
125
206
|
|
|
126
207
|
### Fixed
|
|
127
208
|
|
|
128
|
-
|
|
209
|
+
- Restored `stdio/prompts`, `stdio/progress`, and `stdio/clear` — accidentally removed in 5.19.0
|
|
129
210
|
|
|
130
211
|
## [5.19.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.19.0) - 2026-04-19
|
|
131
212
|
|
|
132
213
|
### Added
|
|
133
214
|
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
- `DlxPackageOptions.hash`,
|
|
215
|
+
- `dlx/integrity` — hash verification utilities (`normalizeHash`, `computeHashes`, `verifyHash` with constant-time compare, `DlxHashMismatchError`)
|
|
216
|
+
- `dlx/arborist` — hardened `@npmcli/arborist` wrappers (`safeIdealTree`, `safeReify`, `writeSafeNpmrc`). Locks down audit/fund/scripts/etc. Supports `before?: Date` for release-age enforcement
|
|
217
|
+
- `dlx/lockfile` `generatePackagePin()` — returns `{ name, version, hash, packageJson, lockfile }`. Default `minReleaseDays: 7` refuses versions published in the last week
|
|
218
|
+
- `DlxPackageOptions.hash`, `.lockfile`, `DlxBinaryOptions.hash` — integrity + lockfile options on dlx entry points
|
|
138
219
|
|
|
139
220
|
### Fixed
|
|
140
221
|
|
|
141
|
-
- `pacote` shim
|
|
222
|
+
- `pacote` shim exposes `tarball`, `manifest`, `packument` alongside `extract`
|
|
142
223
|
|
|
143
224
|
### Changed
|
|
144
225
|
|
|
145
|
-
|
|
226
|
+
- `dist/external/npm-pack.js` 30% smaller; `dist/external/zod.js` 51% smaller (unused code paths stubbed)
|
|
146
227
|
|
|
147
228
|
## [5.18.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.18.2) - 2026-04-14
|
|
148
229
|
|
|
149
230
|
### Removed
|
|
150
231
|
|
|
151
|
-
-
|
|
232
|
+
- `plugins/` directory + `./plugins/babel-plugin-inline-require-calls` — unused
|
|
152
233
|
|
|
153
234
|
## [5.18.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.18.1) - 2026-04-14
|
|
154
235
|
|
|
155
236
|
### Changed
|
|
156
237
|
|
|
157
|
-
-
|
|
238
|
+
- `dist/external/npm-pack` deduplicated via `pnpm overrides` — 22 duplicate packages removed, ~130 KB smaller
|
|
158
239
|
|
|
159
240
|
## [5.18.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.18.0) - 2026-04-14
|
|
160
241
|
|
|
161
242
|
### Added
|
|
162
243
|
|
|
163
|
-
-
|
|
244
|
+
- `dlx` — Socket Firewall API check before package downloads. Resolves the dependency tree and blocks on critical/high alerts
|
|
164
245
|
|
|
165
246
|
### Changed
|
|
166
247
|
|
|
167
|
-
-
|
|
248
|
+
- `http-request` default `User-Agent` is now `socketsecurity-lib/{version}` (was `socket-registry/1.0`)
|
|
168
249
|
|
|
169
250
|
## [5.17.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.17.0) - 2026-04-14
|
|
170
251
|
|
|
171
252
|
### Added
|
|
172
253
|
|
|
173
|
-
-
|
|
254
|
+
- `paths` `isUnixPath()` — detects MSYS/Git Bash drive-letter notation (`/c/...`)
|
|
174
255
|
|
|
175
256
|
### Changed
|
|
176
257
|
|
|
177
|
-
-
|
|
178
|
-
-
|
|
258
|
+
- `paths` `normalizePath()` converts MSYS drive letters on Windows (`/c/path` → `C:/path`)
|
|
259
|
+
- `paths` `fromUnixPath()` produces native Windows paths with backslashes (`/c/path` → `C:\path`)
|
|
179
260
|
|
|
180
261
|
## [5.16.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.16.0) - 2026-04-14
|
|
181
262
|
|
|
182
263
|
### Added
|
|
183
264
|
|
|
184
|
-
-
|
|
265
|
+
- `paths` `fromUnixPath()` — convert MSYS/Git Bash paths back to native Windows format (#168)
|
|
185
266
|
|
|
186
267
|
### Fixed
|
|
187
268
|
|
|
188
|
-
-
|
|
269
|
+
- `dlx` `isInSocketDlx` normalizes the dlx directory path on Windows
|
|
189
270
|
|
|
190
271
|
## [5.15.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.15.0) - 2026-04-06
|
|
191
272
|
|
|
192
273
|
### Added
|
|
193
274
|
|
|
194
|
-
-
|
|
195
|
-
-
|
|
275
|
+
- `http-request` `stream` option — resolves immediately after headers arrive, leaving the body unconsumed for piping
|
|
276
|
+
- `http-request` — `headers`, `ok`, `status`, `statusText` fields on `HttpDownloadResult`
|
|
196
277
|
|
|
197
278
|
## [5.14.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.14.0) - 2026-04-06
|
|
198
279
|
|
|
199
280
|
### Added
|
|
200
281
|
|
|
201
|
-
-
|
|
202
|
-
- `HttpResponseError`
|
|
282
|
+
- `http-request`:
|
|
283
|
+
- `HttpResponseError` — thrown on non-2xx when `throwOnError` is set
|
|
203
284
|
- `throwOnError` option — non-2xx responses throw instead of resolving with `ok: false`
|
|
204
|
-
- `onRetry` callback — customize retry
|
|
205
|
-
- Streaming body support — `body` accepts `Readable` streams (incl. `form-data`)
|
|
206
|
-
- `parseRetryAfterHeader()` —
|
|
207
|
-
- `sanitizeHeaders()` — redact sensitive headers for
|
|
285
|
+
- `onRetry` callback — customize retry per attempt
|
|
286
|
+
- Streaming body support — `body` accepts `Readable` streams (incl. `form-data`)
|
|
287
|
+
- `parseRetryAfterHeader()` — RFC 7231 §7.1.3 parser
|
|
288
|
+
- `sanitizeHeaders()` — redact sensitive headers for logging
|
|
208
289
|
|
|
209
290
|
### Changed
|
|
210
291
|
|
|
211
|
-
-
|
|
292
|
+
- `http-request` `HttpRequestOptions.body` widened to `Buffer | Readable | string`; `onResponse` errors no longer leave promises pending
|
|
212
293
|
|
|
213
294
|
## [5.13.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.13.0) - 2026-04-05
|
|
214
295
|
|
|
215
|
-
### Added
|
|
296
|
+
### Added
|
|
216
297
|
|
|
217
|
-
- `readIncomingResponse()` — reads and buffers a Node.js
|
|
218
|
-
|
|
219
|
-
- `IncomingResponse` type alias — disambiguates `IncomingMessage` as a client-side response
|
|
220
|
-
- `IncomingRequest` type alias — disambiguates `IncomingMessage` as a server-side request
|
|
298
|
+
- `http-request` `readIncomingResponse()` — reads and buffers a Node.js response into an `HttpResponse` (#143)
|
|
299
|
+
- `http-request` `IncomingResponse` / `IncomingRequest` type aliases — disambiguate `IncomingMessage` direction
|
|
221
300
|
|
|
222
|
-
### Changed
|
|
301
|
+
### Changed
|
|
223
302
|
|
|
224
|
-
- Internal `httpRequestAttempt` callbacks now use `IncomingResponse` type
|
|
225
303
|
- `HttpResponse.rawResponse` type narrowed from `IncomingMessage` to `IncomingResponse`
|
|
226
304
|
|
|
227
305
|
## [5.12.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.12.0) - 2026-04-04
|
|
228
306
|
|
|
229
|
-
### Added
|
|
307
|
+
### Added
|
|
230
308
|
|
|
231
|
-
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
- `
|
|
235
|
-
- Works through redirects, `httpJson`, and `httpText`
|
|
236
|
-
- `rawResponse` property on `HttpResponse` exposing the underlying `IncomingMessage`
|
|
237
|
-
- `enrichErrorMessage()` exported for reusable error enrichment
|
|
309
|
+
- `http-request` lifecycle hooks (`onRequest` / `onResponse`) on `HttpRequestOptions` — fire per-attempt; retries and redirects each trigger separate calls (#133)
|
|
310
|
+
- `http-request` `maxResponseSize` option — reject responses exceeding a byte limit (works through redirects, `httpJson`, `httpText`)
|
|
311
|
+
- `http-request` `HttpResponse.rawResponse` — underlying `IncomingMessage`
|
|
312
|
+
- `http-request` `enrichErrorMessage()` exported
|
|
238
313
|
|
|
239
|
-
### Changed
|
|
314
|
+
### Changed
|
|
240
315
|
|
|
241
|
-
- Error messages now include HTTP method and URL
|
|
242
|
-
- `HttpResponse.headers` type changed
|
|
316
|
+
- Error messages now include HTTP method and URL
|
|
317
|
+
- `HttpResponse.headers` type changed to `IncomingHttpHeaders`
|
|
243
318
|
|
|
244
319
|
## [5.11.4](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.4) - 2026-03-28
|
|
245
320
|
|
|
246
|
-
###
|
|
321
|
+
### Performance
|
|
247
322
|
|
|
248
|
-
-
|
|
249
|
-
- `sorts.ts`: Defer semver (2.5 MB via npm-pack) and fastSort until first use
|
|
250
|
-
- `versions.ts`: Defer semver until first use
|
|
251
|
-
- `archives.ts`: Defer adm-zip (102 KB) and tar-fs (105 KB) until extraction
|
|
252
|
-
- `globs.ts`: Defer fast-glob and picomatch (260 KB via pico-pack) until glob execution
|
|
253
|
-
- `fs.ts`: Defer del (260 KB via pico-pack) until safeDelete call
|
|
254
|
-
- `spawn.ts`: Defer @npmcli/promise-spawn (17 KB) until async spawn
|
|
255
|
-
- `strings.ts`: Defer get-east-asian-width (10 KB) until stringWidth call
|
|
256
|
-
- Importing lightweight exports (isObject, httpJson, localeCompare, readJsonSync, stripAnsi) no longer loads heavy externals at module init time
|
|
323
|
+
- Lazy-load heavy external sub-bundles across 7 modules (#119) — `sorts`, `versions`, `archives`, `globs`, `fs`, `spawn`, `strings`. Lightweight imports no longer load heavy externals at init
|
|
257
324
|
|
|
258
325
|
## [5.11.3](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.3) - 2026-03-26
|
|
259
326
|
|
|
260
327
|
### Fixed
|
|
261
328
|
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
- **releases**: Add in-memory TTL cache for GitHub API responses
|
|
265
|
-
- **releases**: Guard against missing assets in GitHub release response (#112)
|
|
266
|
-
- **process-lock**: Fix Windows path separator handling for lock directory creation (#112)
|
|
329
|
+
- `releases` — in-memory TTL cache for GitHub API responses; guard against missing assets in release response (#112)
|
|
330
|
+
- `process-lock` — Windows path separator handling for lock directory creation (#112)
|
|
267
331
|
|
|
268
332
|
## [5.11.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.2) - 2026-03-24
|
|
269
333
|
|
|
270
334
|
### Added
|
|
271
335
|
|
|
272
|
-
-
|
|
273
|
-
- `httpRequest`, `httpJson`, `httpText` accept `ca` option for custom certificate authorities
|
|
274
|
-
- `httpDownload` accepts `ca` option, threaded through redirects and retries
|
|
275
|
-
- `fetchChecksums` accepts `ca` option, passed through to underlying request
|
|
276
|
-
- Enables SSL_CERT_FILE support when NODE_EXTRA_CA_CERTS is unavailable at process startup
|
|
336
|
+
- `http-request` — custom CA certificate support (`ca` option on `httpRequest`, `httpJson`, `httpText`, `httpDownload`, `fetchChecksums`). Enables `SSL_CERT_FILE` support when `NODE_EXTRA_CA_CERTS` is unavailable at process startup
|
|
277
337
|
|
|
278
338
|
## [5.11.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.1) - 2026-03-24
|
|
279
339
|
|
|
280
340
|
### Added
|
|
281
341
|
|
|
282
|
-
-
|
|
283
|
-
- Enables SHA-256 checksum verification for binary downloads via httpDownload
|
|
284
|
-
- Verification happens during download (fails early if checksum mismatches)
|
|
285
|
-
- Complements existing `integrity` option (SRI sha512 format, verified post-download)
|
|
342
|
+
- `dlx/binary` — `sha256` option on `dlxBinary()`, `downloadBinary()`, `downloadBinaryFile()`. Verification happens during download (fails early on mismatch). Complements the existing `integrity` (SRI sha512) option
|
|
286
343
|
|
|
287
344
|
## [5.11.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.0) - 2026-03-23
|
|
288
345
|
|
|
289
346
|
### Added
|
|
290
347
|
|
|
291
|
-
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Handles Windows CRLF and Unix LF line endings
|
|
295
|
-
- Returns null-prototype object to prevent prototype pollution
|
|
296
|
-
- `fetchChecksums(url, options?)`: Fetch and parse checksums from URL
|
|
297
|
-
- Supports `headers` and `timeout` options
|
|
298
|
-
- `httpDownload` now accepts `sha256` option to verify downloaded files
|
|
299
|
-
- Verification happens before atomic rename (file not saved if hash mismatches)
|
|
300
|
-
- Accepts uppercase hashes (normalized to lowercase internally)
|
|
348
|
+
- `http-request` `parseChecksums(text)` — parse GNU / BSD / single-space checksum file formats; CRLF and LF line endings; null-prototype map
|
|
349
|
+
- `http-request` `fetchChecksums(url, options?)` — fetch and parse checksums from URL; supports `headers` and `timeout`
|
|
350
|
+
- `http-request` `httpDownload` `sha256` option — verifies before atomic rename (file not saved on mismatch); accepts uppercase hashes
|
|
301
351
|
|
|
302
352
|
## [5.10.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.10.0) - 2026-03-14
|
|
303
353
|
|
|
304
354
|
### Changed
|
|
305
355
|
|
|
306
|
-
- **releases/socket-btm
|
|
307
|
-
-
|
|
308
|
-
-
|
|
309
|
-
- Removed automatic `/${toolName}/${platformArch}` directory nesting - callers now have full control over download directory structure
|
|
310
|
-
- All optional parameters in config types now explicitly typed as `| undefined`
|
|
311
|
-
- Migration example:
|
|
312
|
-
- Before: `downloadSocketBtmRelease({ tool: 'lief', downloadDir: 'build' })`
|
|
313
|
-
- After: `downloadSocketBtmRelease('lief', { downloadDir: 'build' })`
|
|
314
|
-
- Rationale: Previous automatic path nesting created unexpected directory structures (e.g., `build/downloaded/lief/darwin-arm64/lief/assets/`) making it impossible for callers to predict exact file locations
|
|
356
|
+
- **BREAKING**: `releases/socket-btm` `downloadSocketBtmRelease()` — tool name moved to required first parameter; config object now optional second parameter. Automatic `/${toolName}/${platformArch}` directory nesting removed (callers now control the full path).
|
|
357
|
+
- Before: `downloadSocketBtmRelease({ tool: 'lief', downloadDir: 'build' })`
|
|
358
|
+
- After: `downloadSocketBtmRelease('lief', { downloadDir: 'build' })`
|
|
315
359
|
|
|
316
360
|
## [5.9.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.9.1) - 2026-03-14
|
|
317
361
|
|
|
318
362
|
### Fixed
|
|
319
363
|
|
|
320
|
-
-
|
|
321
|
-
- Previously `maxRetries` was incorrectly passed as `concurrency` to del (parallelism, not retries)
|
|
322
|
-
- `safeDelete()` now wraps `deleteAsync()` with `pRetry()` for exponential backoff
|
|
323
|
-
- `safeDeleteSync()` implements sync retry loop with `Atomics.wait()` for non-blocking sleep
|
|
324
|
-
- Both use `backoffFactor: 2` (delay doubles each retry: 200ms → 400ms → 800ms by default)
|
|
325
|
-
- `maxRetries` and `retryDelay` options in `RemoveOptions` now work as documented
|
|
364
|
+
- `fs` `safeDelete()` and `safeDeleteSync()` now properly implement retry logic. Previously `maxRetries` was incorrectly passed as `concurrency` to `del`. Both now use exponential backoff (`backoffFactor: 2`); `maxRetries` and `retryDelay` in `RemoveOptions` work as documented
|
|
326
365
|
|
|
327
366
|
## [5.9.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.9.0) - 2026-03-14
|
|
328
367
|
|
|
329
368
|
### Changed
|
|
330
369
|
|
|
331
|
-
- **releases/socket-btm
|
|
332
|
-
- Returns `win-x64`, `win-arm64` instead of `win32-x64`, `win32-arm64`
|
|
333
|
-
- Consistent with `getBinaryAssetName()` which already uses `win` for Windows assets
|
|
334
|
-
- Aligns with socket-btm and Node.js convention: use `win` for file/folder names, `win32` for platform checks (`process.platform`)
|
|
335
|
-
- Added `PLATFORM_MAP` for explicit platform name mapping (darwin, linux, win32 → win)
|
|
336
|
-
- Now throws `Error: Unsupported platform` for unknown platform values
|
|
370
|
+
- **BREAKING**: `releases/socket-btm` `getPlatformArch()` normalizes Windows to `win` (was `win32`) — returns `win-x64`, `win-arm64`. Throws on unknown platforms. (Reverted in 5.22.0 back to `win32`)
|
|
337
371
|
|
|
338
372
|
## [5.8.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.8.2) - 2026-03-13
|
|
339
373
|
|
|
340
374
|
### Fixed
|
|
341
375
|
|
|
342
|
-
-
|
|
343
|
-
- Downloads now write to `{destPath}.download` temp file first
|
|
344
|
-
- On success, atomically renames to the destination path
|
|
345
|
-
- On failure, cleans up temp file and preserves any existing file at destination
|
|
346
|
-
- Prevents partial/corrupted files from CI caching causing extraction failures
|
|
376
|
+
- `http-request` — downloads write to `{destPath}.download` temp file then atomically rename. Prevents partial/corrupted files from CI caching causing extraction failures
|
|
347
377
|
|
|
348
378
|
## [5.8.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.8.1) - 2026-03-11
|
|
349
379
|
|
|
350
380
|
### Performance
|
|
351
381
|
|
|
352
|
-
-
|
|
353
|
-
- `getBinPath()`, `getBinPathSync()`: Cache binary path lookups
|
|
354
|
-
- `findRealBin()`: Cache `all:true` lookups and use single `whichSync({ all: true })` call
|
|
355
|
-
- `getVoltaBinPath()`: Cache Volta binary resolution
|
|
356
|
-
- `spawn()`: Cache binary path resolution before spawning
|
|
357
|
-
- `getGitPath()`: Cache git binary path
|
|
358
|
-
- `getCachedRealpath()`: New helper caching `realpathSync()` calls for git operations
|
|
359
|
-
- `findGitRoot()`: Cache git root directory lookups
|
|
360
|
-
- `findPackageJson()`: Cache package.json path lookups
|
|
361
|
-
- `readPackageJson()`: Cache parsed package.json content
|
|
362
|
-
- `resolveBinaryPath()`: Cache binary path resolution with Windows extension handling
|
|
363
|
-
- `NPM_BIN_PATH`, `NPM_REAL_EXEC_PATH`: Share npm path resolution to avoid duplicate `which.sync()` calls
|
|
364
|
-
- `ProcessLockManager.isStale()`: Use single `statSync({ throwIfNoEntry: false })` instead of `existsSync()` + `statSync()`
|
|
365
|
-
- All caches validate entries with `existsSync()` and remove stale entries automatically
|
|
382
|
+
- Comprehensive caching for expensive PATH/realpath/git/package.json lookups across `bin`, `spawn`, `git`, `paths`, and `process-lock`. All caches validate entries via `existsSync()` and evict stale ones
|
|
366
383
|
|
|
367
384
|
## [5.8.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.8.0) - 2026-03-10
|
|
368
385
|
|
|
369
386
|
### Added
|
|
370
387
|
|
|
371
|
-
-
|
|
372
|
-
|
|
373
|
-
- Cross-platform path normalization
|
|
374
|
-
- External dependencies: adm-zip@0.5.16, tar-fs@3.1.2 (bundled, +212KB)
|
|
375
|
-
- Security features: path traversal protection, file size limits, total size limits, symlink blocking
|
|
376
|
-
- Strip option to remove leading path components (like tar `--strip-components`)
|
|
377
|
-
- `detectArchiveFormat()` - Detect archive type from file extension
|
|
378
|
-
- `extractArchive()` - Generic extraction with auto-format detection
|
|
379
|
-
- `extractTar()`, `extractTarGz()`, `extractZip()` - Format-specific extractors
|
|
380
|
-
|
|
381
|
-
- **releases/github**: Added archive extraction support for GitHub releases
|
|
382
|
-
- Auto-detects format from asset filename
|
|
383
|
-
- Enhanced `downloadAndExtractZip()` to use generic archive helpers
|
|
384
|
-
- Supports ZIP, TAR, TAR.GZ, and TGZ assets
|
|
385
|
-
- `downloadAndExtractArchive()` - Generic archive download and extraction
|
|
388
|
+
- `archives` — secure archive extraction for ZIP / TAR / TAR.GZ / TGZ. Configurable `maxFileSize` (100MB) and `maxTotalSize` (1GB). Path-traversal protection, symlink blocking, strip option. Exports: `detectArchiveFormat`, `extractArchive`, `extractTar`, `extractTarGz`, `extractZip`
|
|
389
|
+
- `releases/github` `downloadAndExtractArchive()` — generic archive download and extract; auto-detects format
|
|
386
390
|
|
|
387
391
|
### Changed
|
|
388
392
|
|
|
389
|
-
-
|
|
393
|
+
- 14 external bundle packages deduplicated via pnpm overrides + patches
|
|
390
394
|
|
|
391
395
|
## [5.7.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.7.0) - 2026-02-12
|
|
392
396
|
|
|
393
397
|
### Added
|
|
394
398
|
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
- Useful for detecting presence of environment variables independent of their value
|
|
399
|
-
|
|
400
|
-
- **dlx**: Added new exported helper functions
|
|
401
|
-
- `downloadBinaryFile()` - Downloads a binary file from a URL to the dlx cache directory
|
|
402
|
-
- `ensurePackageInstalled()` - Ensures an npm package is installed and cached via Arborist
|
|
403
|
-
- `getBinaryCacheMetadataPath()` - Gets the file path to dlx binary cache metadata (`.dlx-metadata.json`)
|
|
404
|
-
- `isBinaryCacheValid()` - Checks if a cached dlx binary is still valid based on TTL and timestamp
|
|
405
|
-
- `makePackageBinsExecutable()` - Makes npm package binaries executable on Unix systems
|
|
406
|
-
- `parsePackageSpec()` - Parses npm package spec strings (e.g., `pkg@1.0.0`) into name and version
|
|
407
|
-
- `resolveBinaryPath()` - Resolves the absolute path to a binary within an installed package
|
|
408
|
-
- `writeBinaryCacheMetadata()` - Writes dlx binary cache metadata with integrity, size, and source info
|
|
409
|
-
|
|
410
|
-
- **releases**: Added `createAssetMatcher()` utility function for GitHub release asset pattern matching
|
|
411
|
-
- Creates matcher functions that test strings against glob patterns, prefix/suffix, or RegExp
|
|
412
|
-
- Used for dynamic asset discovery in GitHub releases (e.g., matching platform-specific binaries)
|
|
399
|
+
- `env` `isInEnv(key)` — `true` whenever the key exists, regardless of value (empty string, `"false"`, `"0"` all count)
|
|
400
|
+
- `dlx` helpers exposed: `downloadBinaryFile`, `ensurePackageInstalled`, `getBinaryCacheMetadataPath`, `isBinaryCacheValid`, `makePackageBinsExecutable`, `parsePackageSpec`, `resolveBinaryPath`, `writeBinaryCacheMetadata`
|
|
401
|
+
- `releases` `createAssetMatcher()` — matcher fn for glob / prefix-suffix / RegExp asset patterns
|
|
413
402
|
|
|
414
403
|
### Changed
|
|
415
404
|
|
|
416
|
-
-
|
|
417
|
-
- Now returns `true` whenever the `CI` key exists in the environment, not just when truthy
|
|
418
|
-
- Matches standard CI detection behavior where the presence of the key (not its value) indicates a CI environment
|
|
405
|
+
- `env` `getCI()` now uses `isInEnv('CI')` — `true` whenever the key exists, matching standard CI-detection convention
|
|
419
406
|
|
|
420
407
|
### Fixed
|
|
421
408
|
|
|
422
|
-
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
- **dlx/cache cleanup**: Fixed handling of future timestamps during cache cleanup
|
|
432
|
-
- Entries with future timestamps (due to clock skew) are now properly treated as expired
|
|
433
|
-
|
|
434
|
-
- **dlx/package**: Fixed scoped package parsing bug where `@scope/package` was incorrectly parsed
|
|
435
|
-
- Changed condition from `startsWith('@')` to `atIndex === 0` for more precise detection
|
|
436
|
-
- Fixes installation failures for scoped packages like `@socketregistry/lib`
|
|
437
|
-
|
|
438
|
-
- **cache-with-ttl**: Added clock skew detection to TTL cache
|
|
439
|
-
- Far-future `expiresAt` values (>2x TTL) are now treated as expired
|
|
440
|
-
- Protects against cache poisoning from clock skew
|
|
441
|
-
|
|
442
|
-
- **packages/specs**: Fixed unconditional `.git` truncation in Git URL parsing
|
|
443
|
-
- Now only removes `.git` suffix when URL actually ends with `.git`
|
|
444
|
-
- Prevents incorrect truncation of URLs containing `.git` in the middle
|
|
445
|
-
|
|
446
|
-
- **releases/github**: Fixed TOCTOU race condition in binary download verification
|
|
447
|
-
- Re-checks binary existence after reading version file
|
|
448
|
-
- Ensures binary is re-downloaded if missing despite version file presence
|
|
449
|
-
|
|
450
|
-
- **provenance**: Fixed incorrect package name in provenance workflow
|
|
451
|
-
- Changed from `@socketregistry/lib` to `@socketsecurity/lib`
|
|
409
|
+
- `github` — try/catch around `JSON.parse()` in API responses; error messages include the response URL
|
|
410
|
+
- `dlx/binary` — clock-skew protection (future timestamps treated as expired); atomic metadata write-then-rename; TOCTOU re-check of binary existence after metadata read
|
|
411
|
+
- `dlx/cache` — future-timestamped entries treated as expired during cleanup
|
|
412
|
+
- `dlx/package` — scoped-package parsing uses `atIndex === 0` (was `startsWith('@')`); fixes `@scope/pkg` installation failures
|
|
413
|
+
- `cache-with-ttl` — clock-skew detection (far-future `expiresAt` > 2x TTL treated as expired)
|
|
414
|
+
- `packages/specs` — only strips `.git` when URL actually ends with it (no more mid-URL truncation)
|
|
415
|
+
- `releases/github` — TOCTOU on binary download verification (re-checks after reading version file)
|
|
416
|
+
- `provenance` workflow — corrected package name `@socketregistry/lib` → `@socketsecurity/lib`
|
|
452
417
|
|
|
453
418
|
## [5.6.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.6.0) - 2026-02-08
|
|
454
419
|
|
|
455
420
|
### Added
|
|
456
421
|
|
|
457
|
-
-
|
|
458
|
-
- `httpJson()` now automatically sets `Accept: application/json` header
|
|
459
|
-
- `httpJson()` automatically sets `Content-Type: application/json` when body is present
|
|
460
|
-
- `httpText()` now automatically sets `Accept: text/plain` header
|
|
461
|
-
- `httpText()` automatically sets `Content-Type: text/plain` when body is present
|
|
462
|
-
- User-provided headers always override defaults
|
|
463
|
-
- Simplifies API usage - no need to manually set common headers
|
|
422
|
+
- `http-request` `httpJson()` / `httpText()` automatically set `Accept` and `Content-Type` headers (when body present); user headers override
|
|
464
423
|
|
|
465
424
|
### Changed
|
|
466
425
|
|
|
467
|
-
- **http-request
|
|
468
|
-
- `httpGetJson()` → `httpJson()` - Now supports GET, POST, PUT, DELETE, PATCH, etc.
|
|
469
|
-
- `httpGetText()` → `httpText()` - Now supports all HTTP methods via `method` option
|
|
470
|
-
- Functions now accept `method` parameter in options (defaults to 'GET')
|
|
471
|
-
- More flexible API that matches modern fetch-style conventions
|
|
472
|
-
- **Migration**: Replace `httpGetJson()` calls with `httpJson()` and `httpGetText()` with `httpText()`
|
|
426
|
+
- **BREAKING**: `http-request` `httpGetJson()` → `httpJson()` and `httpGetText()` → `httpText()`. Functions now accept `method` (defaults to `'GET'`), supporting all HTTP verbs
|
|
473
427
|
|
|
474
428
|
### Fixed
|
|
475
429
|
|
|
476
|
-
-
|
|
477
|
-
- Empty string body (`""`) no longer triggers Content-Type header
|
|
478
|
-
- Changed condition from `if (body !== undefined)` to `if (body)` for semantic correctness
|
|
479
|
-
- Empty string represents "no content" and should not declare a Content-Type
|
|
480
|
-
- Affects `httpJson()` and `httpText()` functions
|
|
481
|
-
- Fixes potential API compatibility issues with servers expecting no Content-Type for empty bodies
|
|
482
|
-
- Added comprehensive test coverage for empty string edge case
|
|
430
|
+
- `http-request` — empty-string body no longer triggers `Content-Type`
|
|
483
431
|
|
|
484
432
|
## [5.5.3](https://github.com/SocketDev/socket-lib/releases/tag/v5.5.3) - 2026-01-20
|
|
485
433
|
|
|
486
434
|
### Fixed
|
|
487
435
|
|
|
488
|
-
-
|
|
436
|
+
- Patched `execa@2.1.0` for `signal-exit` v4 compatibility (named export)
|
|
489
437
|
|
|
490
438
|
## [5.5.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.5.2) - 2026-01-20
|
|
491
439
|
|
|
492
440
|
### Changed
|
|
493
441
|
|
|
494
|
-
-
|
|
495
|
-
- Ensures consistent use of Socket's shared cacache directory (`~/.socket/_cacache`)
|
|
496
|
-
- Removes dependency on pacote cache path extraction which could fail
|
|
497
|
-
- Simplifies cache configuration by using reliable Socket path utility
|
|
442
|
+
- `dlx/package` uses `getSocketCacacheDir()` (was `getPacoteCachePath()`) for Arborist cache config — removes dependency on pacote cache-path extraction
|
|
498
443
|
|
|
499
444
|
## [5.5.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.5.1) - 2026-01-12
|
|
500
445
|
|
|
501
446
|
### Fixed
|
|
502
447
|
|
|
503
|
-
-
|
|
504
|
-
-
|
|
448
|
+
- dotenvx compatibility with pre-commit hooks
|
|
449
|
+
- Empty releases being returned by latest-release lookup
|
|
505
450
|
|
|
506
451
|
## [5.5.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.5.0) - 2026-01-12
|
|
507
452
|
|
|
508
453
|
### Added
|
|
509
454
|
|
|
510
|
-
-
|
|
511
|
-
- `detectDlxExecutableType()`: Detects Node.js packages vs native binaries in DLX cache by checking for node_modules/ directory
|
|
512
|
-
- `detectExecutableType()`: Generic entry point that routes to appropriate detection strategy
|
|
513
|
-
- `detectLocalExecutableType()`: Detects executables on local filesystem by checking package.json bin field or file extension
|
|
514
|
-
- `isJsFilePath()`: Validates if a file path has .js, .mjs, or .cjs extension
|
|
515
|
-
- `isNativeBinary()`: Simplified helper that returns true for native binary executables
|
|
516
|
-
- `isNodePackage()`: Simplified helper that returns true for Node.js packages
|
|
455
|
+
- `dlx/detect` — `detectDlxExecutableType`, `detectExecutableType`, `detectLocalExecutableType`, `isJsFilePath`, `isNativeBinary`, `isNodePackage`. Distinguishes Node packages from native binaries in DLX cache and on local filesystem
|
|
517
456
|
|
|
518
457
|
### Fixed
|
|
519
458
|
|
|
520
|
-
-
|
|
459
|
+
- `releases/github` — sort releases by `published_at` to reliably find latest (was relying on creation order)
|
|
521
460
|
|
|
522
461
|
## [5.4.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.4.1) - 2026-01-10
|
|
523
462
|
|
|
524
463
|
### Fixed
|
|
525
464
|
|
|
526
|
-
-
|
|
465
|
+
- Removed `debug` module stub to bundle the real package — stub was missing `enable()` / `disable()`
|
|
527
466
|
|
|
528
467
|
## [5.4.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.4.0) - 2026-01-07
|
|
529
468
|
|
|
530
469
|
### Added
|
|
531
470
|
|
|
532
|
-
-
|
|
533
|
-
|
|
534
|
-
- `downloadReleaseAsset()` now accepts glob patterns for automatic asset discovery
|
|
535
|
-
- `getLatestRelease()` now accepts asset patterns to find releases with matching assets
|
|
536
|
-
- Supports wildcards, brace expansion, RegExp patterns, and prefix/suffix objects
|
|
537
|
-
- Uses picomatch for robust glob pattern matching
|
|
538
|
-
|
|
539
|
-
- **releases/socket-btm**: Extended `downloadSocketBtmRelease()` to accept glob patterns
|
|
540
|
-
- `asset` parameter now accepts wildcards: `'yoga-sync-*.mjs'`, `'models-*.tar.gz'`
|
|
541
|
-
- Automatically discovers and downloads latest matching asset
|
|
542
|
-
- Eliminates need for hardcoded asset names in build scripts
|
|
471
|
+
- `releases/github` — `getReleaseAssetUrl()`, `downloadReleaseAsset()`, `getLatestRelease()` accept glob patterns (wildcards, brace expansion, RegExp) via picomatch
|
|
472
|
+
- `releases/socket-btm` `downloadSocketBtmRelease()` — `asset` parameter accepts glob patterns
|
|
543
473
|
|
|
544
474
|
## [5.3.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.3.0) - 2026-01-07
|
|
545
475
|
|
|
546
476
|
### Added
|
|
547
477
|
|
|
548
|
-
-
|
|
549
|
-
|
|
550
|
-
- `getBinaryAssetName()`: Get GitHub asset name for platform/arch
|
|
551
|
-
- `getBinaryName()`: Get binary filename with platform-appropriate extension
|
|
552
|
-
- `getPlatformArch()`: Get platform-arch identifier for directory structure
|
|
553
|
-
|
|
554
|
-
- **releases/github**: Exported `getAuthHeaders()` for GitHub API authentication
|
|
555
|
-
- Returns headers with `Accept`, `X-GitHub-Api-Version`, and optional `Authorization`
|
|
556
|
-
- Checks `GH_TOKEN` and `GITHUB_TOKEN` environment variables
|
|
478
|
+
- `releases/socket-btm` exports: `detectLibc`, `getBinaryAssetName`, `getBinaryName`, `getPlatformArch`
|
|
479
|
+
- `releases/github` exports `getAuthHeaders()` — checks `GH_TOKEN` / `GITHUB_TOKEN`
|
|
557
480
|
|
|
558
481
|
## [5.2.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.2.1) - 2026-01-06
|
|
559
482
|
|
|
560
483
|
### Fixed
|
|
561
484
|
|
|
562
|
-
-
|
|
563
|
-
- Changed `downloadGitHubRelease()` to use synchronous `chmodSync()` instead of async `chmod()`
|
|
564
|
-
- Ensures file system operations complete before binary execution
|
|
565
|
-
- Prevents race conditions in CI/CD environments where async operations may not fully flush to disk
|
|
485
|
+
- `releases` — `downloadGitHubRelease()` uses sync `chmodSync()` to prevent "Text file busy" race in CI
|
|
566
486
|
|
|
567
487
|
## [5.2.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.2.0) - 2026-01-06
|
|
568
488
|
|
|
569
489
|
### Added
|
|
570
490
|
|
|
571
|
-
-
|
|
572
|
-
|
|
573
|
-
- Added `downloadSocketBtmRelease()` specialized wrapper for socket-btm releases
|
|
574
|
-
- Features version caching with `.version` files to avoid redundant downloads
|
|
575
|
-
- Supports cross-platform binary downloads (darwin, linux, win32) with automatic platform/arch detection
|
|
576
|
-
- Includes Linux musl/glibc support with musl as default for broader compatibility
|
|
577
|
-
- Automatically removes macOS quarantine attributes from downloaded binaries
|
|
578
|
-
- Supports generic asset downloads (WASM files, models, etc.)
|
|
579
|
-
- API inspired by industry tools: `brew`, `cargo`, `gh` for intuitive usage
|
|
580
|
-
- Package exports: `@socketsecurity/lib/releases/github` and `@socketsecurity/lib/releases/socket-btm`
|
|
491
|
+
- `releases/github` — `downloadGitHubRelease()` for any GitHub repo
|
|
492
|
+
- `releases/socket-btm` — `downloadSocketBtmRelease()` wrapper. Version caching via `.version` files; cross-platform with auto platform/arch detection; Linux musl/glibc support; macOS quarantine attribute auto-removal; generic asset downloads (WASM, models)
|
|
581
493
|
|
|
582
494
|
## [5.1.4](https://github.com/SocketDev/socket-lib/releases/tag/v5.1.4) - 2025-12-30
|
|
583
495
|
|
|
584
496
|
### Fixed
|
|
585
497
|
|
|
586
|
-
-
|
|
587
|
-
- Added pnpm override to force `@sigstore/sign@4.1.0` across all dependencies
|
|
588
|
-
- Created patch to inline HTTP header and status constants instead of importing `http2` module
|
|
589
|
-
- Eliminates loading of Node.js `http2` module for HTTP/1.1-only operations
|
|
498
|
+
- Removed unnecessary `http2` module dependency from `@sigstore/sign@4.1.0` via pnpm override + patch — eliminates loading `node:http2` for HTTP/1.1-only operations
|
|
590
499
|
|
|
591
500
|
## [5.1.3](https://github.com/SocketDev/socket-lib/releases/tag/v5.1.3) - 2025-12-29
|
|
592
501
|
|
|
593
502
|
### Fixed
|
|
594
503
|
|
|
595
|
-
-
|
|
596
|
-
- Added `followRedirects` option (default: `true`) to enable automatic redirect following
|
|
597
|
-
- Added `maxRedirects` option (default: `5`) to limit redirect chain length
|
|
598
|
-
- Now supports downloading from services that use CDN redirects, such as GitHub release assets
|
|
599
|
-
- Prevents GitHub API quota exhaustion by following `browser_download_url` redirects instead of using API endpoints
|
|
600
|
-
- Resolves "Request quota exhausted" errors when downloading GitHub release assets
|
|
504
|
+
- `http-request` `httpDownload()` follows 3xx redirects. New `followRedirects` (default `true`) and `maxRedirects` (default `5`) options. Resolves "Request quota exhausted" when downloading GitHub release assets
|
|
601
505
|
|
|
602
506
|
## [5.1.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.1.2) - 2025-12-28
|
|
603
507
|
|
|
604
508
|
### Fixed
|
|
605
509
|
|
|
606
|
-
-
|
|
607
|
-
- Now uses `getPathValue()` for performance, consistent with `getSocketUserDir()` and `getSocketCacacheDir()`
|
|
608
|
-
- Adds test override support via `setPath('socket-dlx-dir', ...)`
|
|
609
|
-
- Test helper `mockHomeDir()` now properly invalidates path cache with `resetPaths()` calls
|
|
610
|
-
- Resolves cache persistence issues in test environments
|
|
510
|
+
- `paths` — `getSocketDlxDir()` now uses `getPathValue()` caching consistent with the other Socket-dir helpers. Adds test override via `setPath('socket-dlx-dir', ...)`
|
|
611
511
|
|
|
612
512
|
## [5.1.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.1.1) - 2025-12-28
|
|
613
513
|
|
|
614
514
|
### Added
|
|
615
515
|
|
|
616
|
-
-
|
|
617
|
-
- `getSocketUserDir()` now checks `SOCKET_HOME` before defaulting to `~/.socket`
|
|
618
|
-
- `getSocketDlxDir()` inherits `SOCKET_HOME` support (priority: `SOCKET_DLX_DIR` > `SOCKET_HOME/_dlx` > `~/.socket/_dlx`)
|
|
619
|
-
- Enables flexible directory configuration for restricted or custom environments
|
|
516
|
+
- `paths` `SOCKET_HOME` env var support — customize Socket base directory. Priority: `SOCKET_DLX_DIR` > `SOCKET_HOME/_dlx` > `~/.socket/_dlx`
|
|
620
517
|
|
|
621
518
|
### Changed
|
|
622
519
|
|
|
623
|
-
-
|
|
624
|
-
- `getUserHomeDir()` now falls back to `os.tmpdir()` when home directory is unavailable
|
|
625
|
-
- Improves resilience in containerized and restricted environments
|
|
626
|
-
- Priority order: `HOME` > `USERPROFILE` > `os.homedir()` > `os.tmpdir()`
|
|
520
|
+
- `paths` `getUserHomeDir()` falls back to `os.tmpdir()` when home dir is unavailable. Priority: `HOME` > `USERPROFILE` > `os.homedir()` > `os.tmpdir()`
|
|
627
521
|
|
|
628
522
|
## [5.1.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.1.0) - 2025-12-17
|
|
629
523
|
|
|
630
524
|
### Added
|
|
631
525
|
|
|
632
|
-
-
|
|
633
|
-
- `ALPM`: Arch Linux Package Manager ecosystem
|
|
634
|
-
- `VSCODE`: Visual Studio Code extensions ecosystem
|
|
526
|
+
- `types` `PURL_Type` — added `ALPM` (Arch Linux) and `VSCODE` (VS Code extensions)
|
|
635
527
|
|
|
636
528
|
## [5.0.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.0.2) - 2025-12-15
|
|
637
529
|
|
|
638
530
|
### Changed
|
|
639
531
|
|
|
640
|
-
-
|
|
641
|
-
- Commit: [`8cb0576`](https://github.com/SocketDev/socket-lib/commit/8cb0576)
|
|
532
|
+
- `signal-exit` `signals()` auto-initializes its internal state
|
|
642
533
|
|
|
643
534
|
## [5.0.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.0.1) - 2025-12-11
|
|
644
535
|
|
|
645
536
|
### Added
|
|
646
537
|
|
|
647
|
-
-
|
|
648
|
-
- New `logger` option: Pass a Logger instance for automatic progress tracking
|
|
649
|
-
- New `progressInterval` option: Configure progress reporting frequency (default: 10%)
|
|
650
|
-
- Progress format: `Progress: XX% (Y.Y MB / Z.Z MB)`
|
|
651
|
-
- `onProgress` callback takes precedence over `logger` when both are provided
|
|
652
|
-
- Commit: [`91e5db5`](https://github.com/SocketDev/socket-lib/commit/91e5db5)
|
|
538
|
+
- `http-request` `httpDownload()` automatic progress logging — `logger` option for a Logger instance, `progressInterval` option (default `10%`). `onProgress` callback takes precedence over `logger`
|
|
653
539
|
|
|
654
540
|
## [5.0.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.0.0) - 2025-12-04
|
|
655
541
|
|
|
656
542
|
### Added
|
|
657
543
|
|
|
658
|
-
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
- **json/parse**: New JSON parsing utilities
|
|
668
|
-
- `isJsonPrimitive()`: Check if value is a JSON primitive type
|
|
669
|
-
- `jsonParse()`: Parse JSON with error handling
|
|
670
|
-
- Export: `@socketsecurity/lib/json/parse`
|
|
671
|
-
|
|
672
|
-
- **json/types**: New JSON type definitions and interfaces
|
|
673
|
-
- Export: `@socketsecurity/lib/json/types`
|
|
674
|
-
|
|
675
|
-
- **dlx/cache**: New DLX cache utilities
|
|
676
|
-
- `generateCacheKey()`: Generate cache keys for DLX packages
|
|
677
|
-
- Export: `@socketsecurity/lib/dlx/cache`
|
|
678
|
-
|
|
679
|
-
- **dlx/dir**: New DLX directory management utilities
|
|
680
|
-
- `clearDlx()`, `clearDlxSync()`: Clear DLX directory
|
|
681
|
-
- `dlxDirExists()`, `dlxDirExistsAsync()`: Check if DLX directory exists
|
|
682
|
-
- `ensureDlxDir()`, `ensureDlxDirSync()`: Ensure DLX directory exists
|
|
683
|
-
- Export: `@socketsecurity/lib/dlx/dir`
|
|
684
|
-
|
|
685
|
-
- **dlx/packages**: New DLX package management utilities
|
|
686
|
-
- `isDlxPackageInstalled()`, `isDlxPackageInstalledAsync()`: Check if package is installed
|
|
687
|
-
- `listDlxPackages()`, `listDlxPackagesAsync()`: List installed packages
|
|
688
|
-
- `removeDlxPackage()`, `removeDlxPackageSync()`: Remove installed packages
|
|
689
|
-
- Export: `@socketsecurity/lib/dlx/packages`
|
|
690
|
-
|
|
691
|
-
- **dlx/paths**: New DLX path utilities
|
|
692
|
-
- `getDlxPackageDir()`: Get package directory path
|
|
693
|
-
- `getDlxInstalledPackageDir()`: Get installed package directory path
|
|
694
|
-
- `getDlxPackageJsonPath()`: Get package.json path
|
|
695
|
-
- `getDlxPackageNodeModulesDir()`: Get node_modules directory path
|
|
696
|
-
- `isInSocketDlx()`: Check if path is in DLX directory
|
|
697
|
-
- Export: `@socketsecurity/lib/dlx/paths`
|
|
544
|
+
- `json/edit` `EditableJson` — base class for generic JSON file manipulation with formatting preservation
|
|
545
|
+
- `json/format` — JSON formatting utilities
|
|
546
|
+
- `json/parse` — `isJsonPrimitive`, `jsonParse` (with error handling)
|
|
547
|
+
- `json/types` — JSON type definitions
|
|
548
|
+
- `dlx/cache` `generateCacheKey()` — DLX package cache keys
|
|
549
|
+
- `dlx/dir` — `clearDlx`, `clearDlxSync`, `dlxDirExists`, `dlxDirExistsAsync`, `ensureDlxDir`, `ensureDlxDirSync`
|
|
550
|
+
- `dlx/packages` — `isDlxPackageInstalled`, `listDlxPackages`, `removeDlxPackage` (+ async/sync variants)
|
|
551
|
+
- `dlx/paths` — `getDlxPackageDir`, `getDlxInstalledPackageDir`, `getDlxPackageJsonPath`, `getDlxPackageNodeModulesDir`, `isInSocketDlx`
|
|
698
552
|
|
|
699
553
|
### Changed
|
|
700
554
|
|
|
701
|
-
- **BREAKING**:
|
|
702
|
-
-
|
|
703
|
-
-
|
|
704
|
-
-
|
|
705
|
-
-
|
|
706
|
-
-
|
|
707
|
-
- `@socketsecurity/lib/lifecycle-script-names` → `@socketsecurity/lib/constants/lifecycle-script-names`
|
|
708
|
-
- `@socketsecurity/lib/dlx` → Split into `@socketsecurity/lib/dlx/cache`, `@socketsecurity/lib/dlx/dir`, `@socketsecurity/lib/dlx/packages`, `@socketsecurity/lib/dlx/paths`
|
|
709
|
-
- `@socketsecurity/lib/dlx-binary` → `@socketsecurity/lib/dlx/binary`
|
|
710
|
-
- `@socketsecurity/lib/dlx-manifest` → `@socketsecurity/lib/dlx/manifest`
|
|
711
|
-
- `@socketsecurity/lib/dlx-package` → `@socketsecurity/lib/dlx/package`
|
|
712
|
-
|
|
713
|
-
- **json**: Reorganized JSON utilities into modular submodules (json/edit, json/format, json/parse, json/types)
|
|
714
|
-
- Removed barrel index file in favor of direct submodule imports
|
|
715
|
-
- Better separation of concerns and tree-shaking
|
|
716
|
-
|
|
717
|
-
- **dlx**: Split monolithic DLX module into focused submodules (cache, dir, packages, paths)
|
|
718
|
-
- Improved modularity and maintainability
|
|
719
|
-
- Better code organization and discoverability
|
|
555
|
+
- **BREAKING**: Module path reorganization:
|
|
556
|
+
- `json/editable` → `json/edit`
|
|
557
|
+
- `packages/editable` → `packages/edit`
|
|
558
|
+
- `maintained-node-versions`, `package-default-node-range`, `package-default-socket-categories`, `lifecycle-script-names` → moved under `constants/`
|
|
559
|
+
- `dlx` → split into `dlx/cache`, `dlx/dir`, `dlx/packages`, `dlx/paths`
|
|
560
|
+
- `dlx-binary` → `dlx/binary`; `dlx-manifest` → `dlx/manifest`; `dlx-package` → `dlx/package`
|
|
720
561
|
|
|
721
562
|
## [4.4.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.4.0) - 2025-11-25
|
|
722
563
|
|
|
723
564
|
### Added
|
|
724
565
|
|
|
725
|
-
-
|
|
726
|
-
- Handles case-insensitive encoding names (e.g., 'UTF-8', 'utf8', 'UTF8')
|
|
727
|
-
- Supports encoding aliases (e.g., 'binary' → 'latin1', 'ucs-2' → 'utf16le')
|
|
728
|
-
- Fast-path optimization for common encodings
|
|
729
|
-
- Defaults to 'utf8' for invalid or null encodings
|
|
730
|
-
- Export: `@socketsecurity/lib/fs`
|
|
566
|
+
- `fs` `normalizeEncoding()` — case-insensitive encoding normalization with aliases (`binary` → `latin1`, `ucs-2` → `utf16le`); defaults to `utf8`
|
|
731
567
|
|
|
732
568
|
### Fixed
|
|
733
569
|
|
|
734
|
-
-
|
|
735
|
-
|
|
736
|
-
- Fixed implementation to properly handle `encoding: null` for Buffer returns
|
|
737
|
-
|
|
738
|
-
- **suppress-warnings**: `withSuppressedWarnings()` now properly restores warning state
|
|
739
|
-
- Fixed state restoration to only remove warning types that were added by the function
|
|
740
|
-
- Prevents accidental removal of warnings that were already suppressed
|
|
741
|
-
- Ensures correct cleanup behavior when warning types are nested or reused
|
|
570
|
+
- `fs` `safeReadFile` / `safeReadFileSync` — corrected type overloads (`encoding: null` → `Buffer`; no encoding → `string`)
|
|
571
|
+
- `suppress-warnings` `withSuppressedWarnings()` — properly restores state, only removing warnings the function added
|
|
742
572
|
|
|
743
573
|
## [4.3.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.3.0) - 2025-11-20
|
|
744
574
|
|
|
745
575
|
### Added
|
|
746
576
|
|
|
747
|
-
-
|
|
748
|
-
- Provides convenient wrappers around fast-glob with normalized options
|
|
749
|
-
- Maintains consistent API with existing glob functionality
|
|
750
|
-
- Export: `@socketsecurity/lib/globs`
|
|
577
|
+
- `globs` `glob()` / `globSync()` — wrapper functions for fast-glob with normalized options
|
|
751
578
|
|
|
752
579
|
## [4.1.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.1.0) - 2025-11-17
|
|
753
580
|
|
|
754
581
|
### Added
|
|
755
582
|
|
|
756
|
-
-
|
|
757
|
-
- `getNodeMinorVersion()`: Extract minor version number
|
|
758
|
-
- `getNodePatchVersion()`: Extract patch version number
|
|
583
|
+
- `constants/node` — `getNodeMinorVersion()`, `getNodePatchVersion()`
|
|
759
584
|
|
|
760
585
|
### Fixed
|
|
761
586
|
|
|
762
|
-
-
|
|
763
|
-
- Properly guard `--experimental-permission` for Node 20-23 only
|
|
764
|
-
- Properly guard `--permission` for Node 24+ only
|
|
765
|
-
- Properly guard `--force-node-api-uncaught-exceptions-policy` for Node 22+ (was incorrectly applied to all versions)
|
|
766
|
-
- Automatically include permission grants from `getNodePermissionFlags()` for Node 24+
|
|
767
|
-
- Remove `--experimental-policy` flag (no policy file provided)
|
|
587
|
+
- `constants/node` `getNodeHardenFlags()` — `--experimental-permission` guarded for Node 20-23; `--permission` for Node 24+; `--force-node-api-uncaught-exceptions-policy` for Node 22+. Removed `--experimental-policy`
|
|
768
588
|
|
|
769
589
|
## [4.0.1](https://github.com/SocketDev/socket-lib/releases/tag/v4.0.1) - 2025-11-17
|
|
770
590
|
|
|
771
591
|
### Changed
|
|
772
592
|
|
|
773
|
-
-
|
|
593
|
+
- Replaced `#`-path imports with relative paths
|
|
774
594
|
|
|
775
595
|
## [4.0.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.0.0) - 2025-11-15
|
|
776
596
|
|
|
777
597
|
### Changed
|
|
778
598
|
|
|
779
|
-
- **
|
|
780
|
-
-
|
|
599
|
+
- **BREAKING**: `paths` reorganized into dedicated `paths/*` submodules
|
|
600
|
+
- Lazy `require()` calls converted to ES6 static imports for better tree-shaking
|
|
781
601
|
|
|
782
602
|
## [3.5.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.5.0) - 2025-11-14
|
|
783
603
|
|
|
784
604
|
### Added
|
|
785
605
|
|
|
786
|
-
-
|
|
787
|
-
- `posixQuote(arg)`: Quote arguments for POSIX shells (bash, sh, zsh) using single quotes
|
|
788
|
-
- `win32Quote(arg)`: Quote arguments for Windows cmd.exe using double quotes
|
|
606
|
+
- `argv/quote` — `posixQuote(arg)` (single-quote for bash/sh/zsh) and `win32Quote(arg)` (double-quote for cmd.exe). Use when invoking `spawn()` with `shell: true`
|
|
789
607
|
|
|
790
608
|
## [3.4.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.4.0) - 2025-11-14
|
|
791
609
|
|
|
792
610
|
### Added
|
|
793
611
|
|
|
794
|
-
-
|
|
795
|
-
|
|
796
|
-
- `skipAndStop(text)`: Display skip message and stop spinner in one call
|
|
797
|
-
- Uses cyan ↻ (refresh/reload) symbol with @ ASCII fallback
|
|
798
|
-
- Normalizes text formatting consistently with other spinner methods
|
|
799
|
-
- Useful for communicating skipped steps during long-running operations
|
|
800
|
-
|
|
801
|
-
- **Logger**: New `skip()` method and symbol for skipped operations
|
|
802
|
-
- `LOG_SYMBOLS.skip`: New cyan ↻ symbol for skip output (@ ASCII fallback)
|
|
803
|
-
- `skip(message)`: Display skip messages with dedicated symbol
|
|
804
|
-
- Complements existing info/step/success/error/warning/reason methods
|
|
612
|
+
- `Spinner` `skip(text)` / `skipAndStop(text)` — display skip messages with cyan ↻ symbol
|
|
613
|
+
- `Logger` `skip(message)` and `LOG_SYMBOLS.skip`
|
|
805
614
|
|
|
806
615
|
## [3.3.11](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.11) - 2025-11-14
|
|
807
616
|
|
|
808
617
|
### Fixed
|
|
809
618
|
|
|
810
|
-
-
|
|
811
|
-
- Properly handle inquirer modules with multiple exports (select, search)
|
|
619
|
+
- `prompts` — "inquirerPrompt is not a function" when inquirer modules expose multiple exports (select, search)
|
|
812
620
|
|
|
813
621
|
## [3.3.10](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.10) - 2025-11-14
|
|
814
622
|
|
|
815
623
|
### Fixed
|
|
816
624
|
|
|
817
|
-
-
|
|
818
|
-
- Forces string-width@8.1.0 and wrap-ansi@9.0.2 for compatibility with strip-ansi@7.1.2
|
|
625
|
+
- `string-width@8.1.0` and `wrap-ansi@9.0.2` overrides for `strip-ansi@7.1.2` compatibility
|
|
819
626
|
|
|
820
627
|
## [3.3.9](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.9) - 2025-11-14
|
|
821
628
|
|
|
822
629
|
### Fixed
|
|
823
630
|
|
|
824
|
-
-
|
|
825
|
-
- Forces strip-ansi@7.1.2 for compatibility with ansi-regex@6.2.2
|
|
631
|
+
- `strip-ansi@7.1.2` override for `ansi-regex@6.2.2` compatibility
|
|
826
632
|
|
|
827
633
|
## [3.3.8](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.8) - 2025-11-14
|
|
828
634
|
|
|
829
635
|
### Fixed
|
|
830
636
|
|
|
831
|
-
-
|
|
832
|
-
- Fixed rogue spinner characters persisting after spinner completes
|
|
637
|
+
- `spinner` — clear remaining artifacts after `withSpinner` stops (rogue spinner characters)
|
|
833
638
|
|
|
834
639
|
## [3.3.7](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.7) - 2025-11-13
|
|
835
640
|
|
|
836
641
|
### Changed
|
|
837
642
|
|
|
838
|
-
-
|
|
839
|
-
- Improves module resolution clarity and compatibility with modern bundlers
|
|
840
|
-
- Updated 18 require calls across 10 source files
|
|
643
|
+
- Explicit `.js` extensions on external `require()` calls for modern bundler compat
|
|
841
644
|
|
|
842
645
|
## [3.3.6](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.6) - 2025-11-13
|
|
843
646
|
|
|
844
647
|
### Changed
|
|
845
648
|
|
|
846
|
-
-
|
|
847
|
-
- Force single versions: `@npmcli/arborist@9.1.6`, `@npmcli/run-script@10.0.0`, `semver@7.7.2`, `ansi-regex@6.2.2`, `lru-cache@11.2.2`
|
|
848
|
-
- Update patch from `@npmcli/run-script@9.1.0` to `@npmcli/run-script@10.0.0`
|
|
849
|
-
- Reduces duplicate dependencies and potential version conflicts
|
|
649
|
+
- pnpm overrides consolidate `@npmcli/arborist@9.1.6`, `@npmcli/run-script@10.0.0`, `semver@7.7.2`, `ansi-regex@6.2.2`, `lru-cache@11.2.2` to single versions
|
|
850
650
|
|
|
851
651
|
## [3.3.5](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.5) - 2025-11-13
|
|
852
652
|
|
|
853
653
|
### Fixed
|
|
854
654
|
|
|
855
|
-
-
|
|
655
|
+
- Patches to prevent `node-gyp` bundling issues
|
|
856
656
|
|
|
857
657
|
## [3.3.4](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.4) - 2025-11-13
|
|
858
658
|
|
|
859
659
|
### Fixed
|
|
860
660
|
|
|
861
|
-
-
|
|
661
|
+
- `node-gyp` marked external in `npm-pack` bundle
|
|
862
662
|
|
|
863
663
|
## [3.3.3](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.3) - 2025-11-13
|
|
864
664
|
|
|
865
665
|
### Fixed
|
|
866
666
|
|
|
867
|
-
-
|
|
667
|
+
- `node-gyp` string broken to prevent bundler ESM/CJS interop issues
|
|
868
668
|
|
|
869
669
|
## [3.3.2](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.2) - 2025-11-13
|
|
870
670
|
|
|
871
671
|
### Changed
|
|
872
672
|
|
|
873
|
-
-
|
|
874
|
-
-
|
|
673
|
+
- `dlx` installs package dependencies after download
|
|
674
|
+
- npm package bundle sizes reduced ~3 MB
|
|
875
675
|
|
|
876
676
|
## [3.3.1](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.1) - 2025-11-11
|
|
877
677
|
|
|
878
678
|
### Added
|
|
879
679
|
|
|
880
|
-
-
|
|
881
|
-
-
|
|
680
|
+
- `SOCKET_DOCS_CONTACT_URL` constant
|
|
681
|
+
- `checkbox` prompt support
|
|
882
682
|
|
|
883
683
|
## [3.3.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.3.0) - 2025-11-07
|
|
884
684
|
|
|
885
685
|
### Added
|
|
886
686
|
|
|
887
|
-
-
|
|
888
|
-
|
|
889
|
-
- `reasonAndStop(text)`: Display reason text and stop spinner in one call
|
|
890
|
-
- Normalizes text formatting consistently with other spinner methods
|
|
891
|
-
- Useful for communicating progress steps during long-running operations
|
|
892
|
-
|
|
893
|
-
- **Logger**: New `reason()` method and symbol for working/thinking output
|
|
894
|
-
- `LOG_SYMBOLS.reason`: New symbol for reason output (distinct from info/step symbols)
|
|
895
|
-
- `reason(message)`: Display reason messages with dedicated symbol
|
|
896
|
-
- Complements existing info/step/success/error/warning methods
|
|
687
|
+
- `Spinner` `reason(text)` / `reasonAndStop(text)` — display working/thinking output
|
|
688
|
+
- `Logger` `reason(message)` and `LOG_SYMBOLS.reason`
|
|
897
689
|
|
|
898
690
|
## [3.2.8](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.8) - 2025-11-05
|
|
899
691
|
|
|
900
692
|
### Fixed
|
|
901
693
|
|
|
902
|
-
-
|
|
903
|
-
- Fixed stray semicolons after comment placeholders in transformed modules
|
|
904
|
-
- Fixed incorrect transformation of `module.exports.default` to `module.module.exports`
|
|
905
|
-
- Ensures external dependencies and default exports work correctly
|
|
694
|
+
- CommonJS export script edge cases (stray semicolons after comment placeholders; incorrect `module.exports.default` → `module.module.exports`)
|
|
906
695
|
|
|
907
696
|
## [3.2.7](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.7) - 2025-11-05
|
|
908
697
|
|
|
909
698
|
### Fixed
|
|
910
699
|
|
|
911
|
-
-
|
|
912
|
-
|
|
913
|
-
- Prevents export name mangling that breaks CommonJS interop
|
|
914
|
-
- Fixes `semver.parse()` and `semver.major()` being undefined
|
|
915
|
-
|
|
916
|
-
- **build**: Fix CommonJS export interop for TypeScript default exports
|
|
917
|
-
- Modules with `export default` now work without requiring `.default` accessor
|
|
918
|
-
|
|
919
|
-
### Changed
|
|
920
|
-
|
|
921
|
-
- **docs**: Moved packages README to correct location (`src/packages/README.md`)
|
|
700
|
+
- External dependency minification disabled to preserve exports (was breaking `semver.parse()`, `semver.major()`)
|
|
701
|
+
- CommonJS export interop for TypeScript `export default` no longer needs `.default` accessor
|
|
922
702
|
|
|
923
703
|
## [3.2.6](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.6) - 2025-11-05
|
|
924
704
|
|
|
925
705
|
### Fixed
|
|
926
706
|
|
|
927
|
-
-
|
|
928
|
-
- The yoctocolors-cjs package doesn't have an rgb() method
|
|
929
|
-
- Manually construct ANSI escape sequences for RGB colors (ESC[38;2;r;g;bm...ESC[39m)
|
|
930
|
-
- Affects `src/logger.ts` and `src/stdio/prompts.ts` applyColor() functions
|
|
707
|
+
- `logger` and `stdio/prompts` — manual ANSI escape sequences for RGB colors (yoctocolors-cjs has no `rgb()` method)
|
|
931
708
|
|
|
932
709
|
## [3.2.5](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.5) - 2025-11-05
|
|
933
710
|
|
|
934
711
|
### Added
|
|
935
712
|
|
|
936
|
-
-
|
|
937
|
-
- Resolves internal path aliases (`#lib/*`, `#constants/*`, etc.) to relative paths in built CommonJS files
|
|
938
|
-
|
|
939
|
-
- **build**: Integrate path alias resolution into build pipeline
|
|
940
|
-
- Add path alias plugin to esbuild config
|
|
941
|
-
- Integrate `fix-path-aliases.mjs` into build process
|
|
942
|
-
- Ensures path aliases work correctly in compiled CommonJS output
|
|
713
|
+
- Path alias resolution in build pipeline — `#lib/*` / `#constants/*` aliases resolve to relative paths in compiled CommonJS
|
|
943
714
|
|
|
944
715
|
## [3.2.4](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.4) - 2025-11-04
|
|
945
716
|
|
|
946
717
|
### Added
|
|
947
718
|
|
|
948
|
-
-
|
|
949
|
-
- Starts a named timer and returns a `stop()` function
|
|
950
|
-
- Automatically logs completion with formatted duration (e.g., "Operation completed in 1.23s")
|
|
951
|
-
- Useful for performance monitoring and debugging
|
|
719
|
+
- `Logger` `time()` — start a named timer; returns `stop()` that logs completion with formatted duration
|
|
952
720
|
|
|
953
721
|
### Fixed
|
|
954
722
|
|
|
955
|
-
-
|
|
956
|
-
- **Build system**: Fixed external dependency bundling issues
|
|
957
|
-
- Bundle `@npmcli/package-json` with subpath exports support
|
|
958
|
-
- Use `src/external` files as bundle entry points for proper module resolution
|
|
959
|
-
- Bundle libnpmexec from npm instead of using vendored version
|
|
960
|
-
- Prevent circular dependencies with `createForceNodeModulesPlugin()` to force resolution from node_modules
|
|
961
|
-
|
|
962
|
-
## [3.2.3](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.3) - 2025-11-03
|
|
963
|
-
|
|
964
|
-
### Internal
|
|
965
|
-
|
|
966
|
-
- **Build system**: Added stub infrastructure for external dependency bundling
|
|
967
|
-
- Created organized `scripts/build-externals/stubs/` directory with utility and active stubs
|
|
968
|
-
- Added conservative stubs for unused dependencies: `encoding`/`iconv-lite` and `debug`
|
|
969
|
-
- Reduces external bundle size by ~18KB (9KB from encoding stubs, 9KB from debug stubs)
|
|
723
|
+
- Star spinner frames — added trailing space for consistent spacing
|
|
970
724
|
|
|
971
725
|
## [3.2.2](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.2) - 2025-11-03
|
|
972
726
|
|
|
973
727
|
### Added
|
|
974
728
|
|
|
975
|
-
-
|
|
976
|
-
|
|
977
|
-
- Aligns with npm's cmd-shim approach for binary permissions
|
|
978
|
-
- Handles both single and multiple binary packages
|
|
979
|
-
- No-op on Windows (permissions not needed)
|
|
980
|
-
|
|
981
|
-
- **DLX**: npm-compatible bin resolution via vendored `getBinFromManifest`
|
|
982
|
-
- Cherry-picked `getBinFromManifest` from libnpmexec@10.1.8 (~1.5 KB)
|
|
983
|
-
- Avoids 1.1 MB bundle by vendoring single function instead of full package
|
|
984
|
-
- Provides battle-tested npm bin resolution strategy
|
|
985
|
-
- Maintains user-friendly fallbacks for edge cases
|
|
986
|
-
|
|
987
|
-
### Changed
|
|
988
|
-
|
|
989
|
-
- **DLX**: Enhanced `findBinaryPath()` with npm's resolution strategy
|
|
990
|
-
- Primary: npm's `getBinFromManifest` (handles standard cases and aliases)
|
|
991
|
-
- Fallback: user-provided `binaryName` parameter
|
|
992
|
-
- Fallback: last segment of package name
|
|
993
|
-
- Last resort: first binary in list
|
|
729
|
+
- `dlx` `makePackageBinsExecutable()` — chmod 0o755 on all package binaries (no-op on Windows)
|
|
730
|
+
- `dlx` `findBinaryPath()` adopts npm's resolution strategy (vendored `getBinFromManifest` from libnpmexec)
|
|
994
731
|
|
|
995
732
|
### Performance
|
|
996
733
|
|
|
997
|
-
-
|
|
998
|
-
- Vendored `getBinFromManifest` function instead of bundling full libnpmexec (~1.1 MB savings)
|
|
999
|
-
- Minimized external module exports for better tree-shaking:
|
|
1000
|
-
- `fast-sort`: Now exports only `{ createNewSortInstance }` (2.1 KB, 96% reduction from ~56 KB)
|
|
1001
|
-
- `fast-glob`: Now exports only `{ globStream }` (82 KB bundle)
|
|
1002
|
-
- `del`: Now exports only `{ deleteAsync, deleteSync }` (100 KB bundle)
|
|
1003
|
-
- `streaming-iterables`: Now exports only `{ parallelMap, transform }` (11 KB, 93% reduction from ~168 KB)
|
|
1004
|
-
- Total savings: ~1.3 MB (1.1 MB from vendoring + 211 KB from minimized exports)
|
|
1005
|
-
- Establishes pattern for future external module additions
|
|
734
|
+
- Bundle size reduced ~1.3 MB total — vendored `getBinFromManifest` (1.1 MB savings) + minimized exports for `fast-sort`, `fast-glob`, `del`, `streaming-iterables`
|
|
1006
735
|
|
|
1007
736
|
## [3.2.1](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.1) - 2025-11-02
|
|
1008
737
|
|
|
1009
738
|
### Changed
|
|
1010
739
|
|
|
1011
|
-
-
|
|
1012
|
-
- Call `getDefaultLogger()` and `getDefaultSpinner()` once at module scope instead of repeated calls
|
|
1013
|
-
- Prevents multiple spinner instances that can cause duplicate or lingering indicators in terminal output
|
|
1014
|
-
- Applied in `src/dlx-manifest.ts`, `src/stdio/mask.ts`, and `src/spinner.ts`
|
|
1015
|
-
- Follows DRY principle and aligns with socket-registry/socket-sdk-js patterns
|
|
1016
|
-
|
|
1017
|
-
### Fixed
|
|
1018
|
-
|
|
1019
|
-
- **Scripts**: Fixed undefined logger variable in update script
|
|
1020
|
-
- Replaced undefined `log` references with `_logger` throughout `scripts/update.mjs`
|
|
1021
|
-
- Resolves ESLint errors that blocked test execution
|
|
1022
|
-
- **Tests**: Improved stdout test stability by checking call delta instead of absolute counts
|
|
1023
|
-
- Fixed flaky CI failures where spy call count was 101 instead of expected 100
|
|
1024
|
-
- More robust approach handles potential state leakage between tests
|
|
1025
|
-
- **Tests**: Removed unnecessary 10ms delay in cache-with-ttl test
|
|
1026
|
-
- Cache with memoization enabled updates in-memory storage synchronously
|
|
1027
|
-
- Delay was insufficient in CI and unnecessary given synchronous behavior
|
|
1028
|
-
- Resolves flaky CI failures where cached values returned undefined
|
|
740
|
+
- `Logger` / `Spinner` — call `getDefaultLogger()` / `getDefaultSpinner()` once at module scope to prevent duplicate spinner indicators
|
|
1029
741
|
|
|
1030
742
|
## [3.2.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.0) - 2025-11-02
|
|
1031
743
|
|
|
1032
744
|
### Added
|
|
1033
745
|
|
|
1034
|
-
-
|
|
1035
|
-
- Centralized manifest system for tracking DLX-compatible packages
|
|
1036
|
-
- Simplifies package and binary lookups for dependency-free execution
|
|
746
|
+
- `dlx` — unified manifest for packages and binaries
|
|
1037
747
|
|
|
1038
748
|
## [3.1.3](https://github.com/SocketDev/socket-lib/releases/tag/v3.1.3) - 2025-11-02
|
|
1039
749
|
|
|
1040
750
|
### Changed
|
|
1041
751
|
|
|
1042
|
-
-
|
|
752
|
+
- `@socketregistry/packageurl-js` updated to 1.3.5
|
|
1043
753
|
|
|
1044
754
|
## [3.1.2](https://github.com/SocketDev/socket-lib/releases/tag/v3.1.2) - 2025-11-02
|
|
1045
755
|
|
|
1046
756
|
### Fixed
|
|
1047
757
|
|
|
1048
|
-
-
|
|
1049
|
-
|
|
1050
|
-
- Updated `src/zod.ts` to export from `./external/zod'` instead of direct imports
|
|
1051
|
-
- Maintains zero dependencies policy by ensuring all runtime dependencies go through the external wrapper pattern
|
|
1052
|
-
- **Spinner**: Fixed undefined properties in setShimmer by handling defaults correctly
|
|
758
|
+
- `Spinner` `setShimmer` — handle undefined properties via defaults
|
|
759
|
+
- External deps now go through the wrapper pattern (`require('../external/which')`, etc.) — maintains zero-deps policy
|
|
1053
760
|
|
|
1054
761
|
## [3.1.1](https://github.com/SocketDev/socket-lib/releases/tag/v3.1.1) - 2025-11-02
|
|
1055
762
|
|
|
1056
763
|
### Fixed
|
|
1057
764
|
|
|
1058
|
-
-
|
|
1059
|
-
- Wrapped `cacache.put` in try/catch to prevent failures when persistent cache writes fail or are slow
|
|
1060
|
-
- In-memory cache is updated synchronously before the persistent write, so immediate reads succeed regardless of persistent cache state
|
|
1061
|
-
- Improves reliability in test environments and when cache directory has issues
|
|
765
|
+
- `cache-with-ttl` — `cacache.put` wrapped in try/catch so persistent-cache write failures don't break in-memory reads
|
|
1062
766
|
|
|
1063
767
|
## [3.1.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.1.0) - 2025-11-01
|
|
1064
768
|
|
|
1065
769
|
### Changed
|
|
1066
770
|
|
|
1067
|
-
-
|
|
1068
|
-
- Nested directories are created by default, simplifying common usage patterns
|
|
771
|
+
- `fs` `safeMkdir` / `safeMkdirSync` default to `recursive: true`
|
|
1069
772
|
|
|
1070
773
|
## [3.0.6](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.6) - 2025-11-01
|
|
1071
774
|
|
|
1072
775
|
### Added
|
|
1073
776
|
|
|
1074
|
-
-
|
|
1075
|
-
- New `validate-no-link-deps.mjs` script automatically runs during `pnpm run check`
|
|
1076
|
-
- Prevents accidental publication with `link:` dependencies which can cause issues
|
|
1077
|
-
- Recommends using `workspace:` for monorepos or `catalog:` for centralized version management
|
|
1078
|
-
- Validates all dependency fields: dependencies, devDependencies, peerDependencies, optionalDependencies
|
|
777
|
+
- Build validation — guard against `link:` protocol dependencies in `package.json` (`validate-no-link-deps.mjs` runs during `pnpm run check`)
|
|
1079
778
|
|
|
1080
779
|
### Changed
|
|
1081
780
|
|
|
1082
|
-
-
|
|
1083
|
-
- **Git hooks**: Committed pre-commit and pre-push hook configurations for version control
|
|
1084
|
-
- **Scripts**: Removed shebang from `validate-no-link-deps` script (Node.js script, not shell)
|
|
781
|
+
- `@socketregistry/packageurl-js` updated to 1.3.3
|
|
1085
782
|
|
|
1086
783
|
## [3.0.5](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.5) - 2025-11-01
|
|
1087
784
|
|
|
1088
785
|
### Fixed
|
|
1089
786
|
|
|
1090
|
-
- **Critical
|
|
1091
|
-
- Consolidated all prompts functionality into `src/stdio/prompts.ts`
|
|
1092
|
-
- Removed unimplemented stub from `src/prompts/` that was throwing "not yet implemented" errors
|
|
1093
|
-
- Removed `./prompts` package export (use `@socketsecurity/lib/stdio/prompts` instead)
|
|
1094
|
-
- Restored missing exports: `password`, `search`, `Separator`, and added `createSeparator()` helper
|
|
1095
|
-
- Fixed `Choice` type to use correct `name` property (matching `@inquirer` API, not erroneous `label`)
|
|
787
|
+
- **Critical**: prompts API restored — non-functional stub from v3.0.0 replaced with working implementation. `@socketsecurity/lib/stdio/prompts` exports `password`, `search`, `Separator`, `createSeparator()`. `Choice.name` (was erroneously `label`)
|
|
1096
788
|
|
|
1097
789
|
### Added
|
|
1098
790
|
|
|
1099
|
-
-
|
|
1100
|
-
|
|
1101
|
-
- Descriptions and disabled items styled with `colors.textDim`
|
|
1102
|
-
- Answers and highlights styled with `colors.primary`
|
|
1103
|
-
- Error messages styled with `colors.error`
|
|
1104
|
-
- Success indicators styled with `colors.success`
|
|
1105
|
-
- Exported `createInquirerTheme()` function for converting Socket themes to @inquirer format
|
|
1106
|
-
- Consistent visual experience with Logger and Spinner theme integration
|
|
1107
|
-
|
|
1108
|
-
- **Theme parameter support**: Logger, Prompts, and text effects now accept optional `theme` parameter
|
|
1109
|
-
- Pass theme names (`'socket'`, `'sunset'`, `'terracotta'`, `'lush'`, `'ultra'`) or Theme objects
|
|
1110
|
-
- **Logger**: `new Logger({ theme: 'sunset' })` - uses theme-specific symbol colors
|
|
1111
|
-
- **Prompts**: `await input({ message: 'Name:', theme: 'ultra' })` - uses theme for prompt styling
|
|
1112
|
-
- **Text effects**: `applyShimmer(text, state, { theme: 'terracotta' })` - uses theme for shimmer colors
|
|
1113
|
-
- Instance-specific themes override global theme context when provided
|
|
1114
|
-
- Falls back to global theme context when no instance theme specified
|
|
1115
|
-
- **Note**: Spinner already had theme parameter support in v3.0.0
|
|
791
|
+
- Prompts adopt the active theme (`colors.prompt`, `textDim`, `primary`, `error`, `success`); `createInquirerTheme()` exported
|
|
792
|
+
- Theme parameter support — `Logger`, prompts, and text effects accept `theme: 'socket' | 'sunset' | 'terracotta' | 'lush' | 'ultra'` (or a Theme object)
|
|
1116
793
|
|
|
1117
794
|
### Removed
|
|
1118
795
|
|
|
1119
|
-
- **
|
|
1120
|
-
- This was a leftover from socket-registry and not needed for this library
|
|
1121
|
-
- Users should import specific modules directly (e.g., `@socketsecurity/lib/logger`)
|
|
1122
|
-
- Breaking: `import { getDefaultLogger } from '@socketsecurity/lib'` no longer works
|
|
1123
|
-
- Use: `import { getDefaultLogger } from '@socketsecurity/lib/logger'` instead
|
|
796
|
+
- **BREAKING**: `src/index.ts` deleted; main index `"."` / `"./index"` exports gone. Import specific modules: `@socketsecurity/lib/logger` instead of `@socketsecurity/lib`
|
|
1124
797
|
|
|
1125
798
|
## [3.0.4](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.4) - 2025-11-01
|
|
1126
799
|
|
|
1127
800
|
### Changed
|
|
1128
801
|
|
|
1129
|
-
-
|
|
1130
|
-
-
|
|
802
|
+
- Sunset theme — azure blue → warm orange/purple gradient (Coana branding)
|
|
803
|
+
- `brick` theme renamed to `terracotta`
|
|
1131
804
|
|
|
1132
805
|
## [3.0.3](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.3) - 2025-11-01
|
|
1133
806
|
|
|
1134
807
|
### Fixed
|
|
1135
808
|
|
|
1136
|
-
- **Critical
|
|
1137
|
-
- Root cause: esbuild minification was breaking Node.js ESM's CJS named export detection
|
|
1138
|
-
- Solution: Disabled minification entirely (`minify: false` in esbuild config)
|
|
1139
|
-
- Libraries should not be minified - consumers minify during their own build process
|
|
1140
|
-
- Unminified esbuild output uses clear `__export` patterns that Node.js ESM natively understands
|
|
1141
|
-
- Removed `fix-commonjs-exports.mjs` build script - no longer needed with unminified code
|
|
1142
|
-
- ESM imports now work reliably: `import { getDefaultLogger } from '@socketsecurity/lib/logger'`
|
|
1143
|
-
- Verified with real-world ESM module testing (`.mjs` files importing from CJS `.js` dist)
|
|
809
|
+
- **Critical**: Node.js ESM/CJS interop — disabled esbuild minification (was breaking ESM named-import detection from CJS dist). ESM imports now work reliably
|
|
1144
810
|
|
|
1145
811
|
## [3.0.2](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.2) - 2025-11-01
|
|
1146
812
|
|
|
1147
813
|
### Fixed
|
|
1148
814
|
|
|
1149
|
-
- **Critical
|
|
1150
|
-
- Previously, esbuild's minified export pattern placed `module.exports` before variable definitions, causing "Cannot access before initialization" errors
|
|
1151
|
-
- Build script now uses `@babel/parser` + `magic-string` for safe AST parsing and transformation
|
|
1152
|
-
- Exports are now correctly placed at end of files after all variable definitions
|
|
1153
|
-
- Enables proper ESM named imports: `import { getDefaultLogger, Logger } from '@socketsecurity/lib/logger'`
|
|
1154
|
-
- Fixes socket-cli issue where named imports were failing with obscure initialization errors
|
|
815
|
+
- **Critical**: Node.js ESM named imports from CommonJS — `module.exports` placed before variable defs caused "Cannot access before initialization". Build now uses `@babel/parser` + `magic-string` to position exports at end of file
|
|
1155
816
|
|
|
1156
817
|
## [3.0.1](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.1) - 2025-11-01
|
|
1157
818
|
|
|
1158
819
|
### Added
|
|
1159
820
|
|
|
1160
|
-
-
|
|
1161
|
-
- Logger: `getDefaultLogger()`, `Logger`, `LOG_SYMBOLS` now available from `@socketsecurity/lib`
|
|
1162
|
-
- Spinner: `getDefaultSpinner()`, `Spinner` now available from `@socketsecurity/lib`
|
|
1163
|
-
- Both main index (`@socketsecurity/lib`) and subpath (`@socketsecurity/lib/logger`, `@socketsecurity/lib/spinner`) imports now work
|
|
1164
|
-
- Both import paths return the same singleton instances
|
|
821
|
+
- Convenience re-exports of `getDefaultLogger`, `Logger`, `LOG_SYMBOLS`, `getDefaultSpinner`, `Spinner` from main index for v2→v3 migration
|
|
1165
822
|
|
|
1166
823
|
### Fixed
|
|
1167
824
|
|
|
1168
|
-
- **Critical
|
|
1169
|
-
- Spinner methods (`start()`, `stop()`, `success()`, `fail()`, etc.) no longer crash with "logger is not defined" errors
|
|
1170
|
-
- All 5 internal logger access points updated to use the correct v3 API
|
|
1171
|
-
- Resolves runtime errors when using spinners with hoisted variables
|
|
1172
|
-
|
|
1173
|
-
### Changed
|
|
1174
|
-
|
|
1175
|
-
- **Migration path improvement**: Users can now import logger/spinner from either main index or subpaths, reducing breaking change impact from v3.0.0
|
|
825
|
+
- **Critical**: Spinner internal calls to removed `logger` export — use `getDefaultLogger()` (5 call sites)
|
|
1176
826
|
|
|
1177
827
|
## [3.0.0](https://github.com/SocketDev/socket-lib/releases/tag/v3.0.0) - 2025-11-01
|
|
1178
828
|
|
|
1179
829
|
### Added
|
|
1180
830
|
|
|
1181
|
-
- Theme system
|
|
1182
|
-
- `
|
|
1183
|
-
-
|
|
1184
|
-
-
|
|
1185
|
-
- `
|
|
1186
|
-
- Logger and spinner now inherit theme colors automatically
|
|
1187
|
-
- Spinner methods: `enableShimmer()`, `disableShimmer()`, `setShimmer()`, `updateShimmer()`
|
|
1188
|
-
- DLX cross-platform binary resolution (`.cmd`, `.bat`, `.ps1` on Windows)
|
|
1189
|
-
- DLX programmatic options aligned with CLI conventions (`force`, `quiet`, `package`)
|
|
831
|
+
- Theme system — 5 built-in themes (`socket`, `sunset`, `terracotta`, `lush`, `ultra`); `setTheme`, `getTheme`, `withTheme`, `withThemeSync`, `createTheme`, `extendTheme`, `resolveColor`, `onThemeChange`
|
|
832
|
+
- `links` `link()` — themed terminal hyperlinks
|
|
833
|
+
- Logger and spinner inherit theme colors
|
|
834
|
+
- Spinner methods: `enableShimmer`, `disableShimmer`, `setShimmer`, `updateShimmer`
|
|
835
|
+
- `dlx` cross-platform binary resolution (`.cmd`, `.bat`, `.ps1` on Windows)
|
|
1190
836
|
|
|
1191
837
|
### Changed
|
|
1192
838
|
|
|
1193
|
-
- Theme context uses AsyncLocalStorage instead of manual stack
|
|
1194
|
-
- Promise retry options renamed
|
|
839
|
+
- Theme context uses `AsyncLocalStorage` instead of manual stack
|
|
840
|
+
- **BREAKING**: Promise retry options renamed — `factor` → `backoffFactor`, `minTimeout` → `baseDelayMs`, `maxTimeout` → `maxDelayMs`
|
|
1195
841
|
|
|
1196
842
|
### Removed
|
|
1197
843
|
|
|
1198
|
-
**BREAKING
|
|
1199
|
-
|
|
1200
|
-
-
|
|
1201
|
-
- `logger` export - use `getDefaultLogger()` instead
|
|
1202
|
-
- `spinner` export - use `getDefaultSpinner()` instead
|
|
1203
|
-
- `download-lock.ts` - use `process-lock.ts` instead
|
|
844
|
+
- **BREAKING**: `pushTheme()` / `popTheme()` — use `withTheme()` / `withThemeSync()`
|
|
845
|
+
- **BREAKING**: `logger` / `spinner` exports — use `getDefaultLogger()` / `getDefaultSpinner()`
|
|
846
|
+
- **BREAKING**: `download-lock.ts` — use `process-lock.ts`
|
|
1204
847
|
- Promise option aliases: `factor`, `minTimeout`, `maxTimeout`
|
|
1205
848
|
|
|
1206
|
-
---
|
|
1207
|
-
|
|
1208
|
-
# Changelog
|
|
1209
|
-
|
|
1210
|
-
All notable changes to this project will be documented in this file.
|
|
1211
|
-
|
|
1212
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
1213
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
1214
|
-
|
|
1215
849
|
## [2.10.3](https://github.com/SocketDev/socket-lib/releases/tag/v2.10.3) - 2025-10-31
|
|
1216
850
|
|
|
1217
851
|
### Fixed
|
|
1218
852
|
|
|
1219
|
-
-
|
|
1220
|
-
-
|
|
1221
|
-
- Updated examples in `memoization.ts`, `performance.ts`, `spinner.ts`, `suppress-warnings.ts`, and `tables.ts`
|
|
1222
|
-
- Ensures documentation reflects correct package name after v1.0.0 rename
|
|
853
|
+
- `@socketregistry/packageurl-js` updated to 1.3.1 (resolves unintended external dep)
|
|
854
|
+
- JSDoc `@example` import paths corrected after v1.0.0 rename (`@socketsecurity/registry` → `@socketsecurity/lib`)
|
|
1223
855
|
|
|
1224
856
|
## [2.10.2](https://github.com/SocketDev/socket-lib/releases/tag/v2.10.2) - 2025-10-31
|
|
1225
857
|
|
|
1226
858
|
### Changed
|
|
1227
859
|
|
|
1228
|
-
-
|
|
1229
|
-
- Improves reliability when parsing complex package specs
|
|
1230
|
-
- Better handles edge cases in version ranges and scoped packages
|
|
1231
|
-
- Falls back to simple parsing if npm-package-arg fails
|
|
860
|
+
- Package spec parsing uses official `npm-package-arg` library for full npm spec support (versions, ranges, tags, git URLs); falls back to simple parsing if it fails
|
|
1232
861
|
|
|
1233
862
|
### Fixed
|
|
1234
863
|
|
|
1235
|
-
- **
|
|
1236
|
-
- Example: `@coana-tech/cli@~14.12.51` was incorrectly parsed as `coana-tech/cli@~14.12.51`
|
|
1237
|
-
- Caused package installation failures for scoped packages in DLX system
|
|
864
|
+
- **Critical**: `parsePackageSpec` no longer strips the `@` prefix from scoped+versioned specs (e.g., `@coana-tech/cli@~14.12.51`)
|
|
1238
865
|
|
|
1239
866
|
## [2.10.1](https://github.com/SocketDev/socket-lib/releases/tag/v2.10.1) - 2025-10-31
|
|
1240
867
|
|
|
1241
868
|
### Fixed
|
|
1242
869
|
|
|
1243
|
-
-
|
|
1244
|
-
-
|
|
870
|
+
- Process lock — recursive mkdir for parent dirs
|
|
871
|
+
- Removed buggy `getNodeDebugFlags()` (returned flags without required argument values)
|
|
1245
872
|
|
|
1246
873
|
## [2.10.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.10.0) - 2025-10-30
|
|
1247
874
|
|
|
1248
875
|
### Added
|
|
1249
876
|
|
|
1250
|
-
-
|
|
1251
|
-
- Exported `DlxMetadata` interface as canonical schema reference
|
|
1252
|
-
- Core fields: `version`, `cache_key`, `timestamp`, `checksum`, `checksum_algorithm`, `platform`, `arch`, `size`, `source`
|
|
1253
|
-
- Support for `source` tracking (download vs decompression origin)
|
|
1254
|
-
- Reserved `extra` field for implementation-specific data
|
|
1255
|
-
- Comprehensive documentation with examples for both download and decompression use cases
|
|
877
|
+
- Unified `.dlx-metadata.json` schema — `DlxMetadata` interface exported. Fields: `version`, `cache_key`, `timestamp`, `checksum`, `checksum_algorithm`, `platform`, `arch`, `size`, `source` (`{ type, url }`); reserved `extra` for impl-specific data
|
|
1256
878
|
|
|
1257
879
|
### Changed
|
|
1258
880
|
|
|
1259
|
-
-
|
|
1260
|
-
- Now includes `cache_key` (first 16 chars of SHA-512 hash)
|
|
1261
|
-
- Added `size` field for cached binary size
|
|
1262
|
-
- Added `checksum_algorithm` field (currently "sha256")
|
|
1263
|
-
- Restructured to use `source.type` and `source.url` for origin tracking
|
|
1264
|
-
- Maintains backward compatibility in `listDlxCache()` reader
|
|
881
|
+
- `dlx` `writeBinaryCacheMetadata()` adopts the unified schema (`cache_key` = SHA-512 prefix, `size`, `checksum_algorithm`, `source.type`/`source.url`)
|
|
1265
882
|
|
|
1266
883
|
## [2.9.1](https://github.com/SocketDev/socket-lib/releases/tag/v2.9.1) - 2025-10-30
|
|
1267
884
|
|
|
1268
885
|
### Added
|
|
1269
886
|
|
|
1270
|
-
-
|
|
1271
|
-
- If package has single binary, uses it automatically regardless of name
|
|
1272
|
-
- Resolves packages like `@socketsecurity/cli` (binary: `socket`) without manual configuration
|
|
1273
|
-
- Falls back to intelligent name matching for multi-binary packages
|
|
1274
|
-
- **Optional binaryName parameter**: Added `binaryName` option to `DlxPackageOptions` for explicit binary selection when auto-detection isn't sufficient
|
|
887
|
+
- `dlxPackage` smart binary detection — uses single-binary packages directly regardless of name. Optional `binaryName` for explicit selection on multi-binary packages
|
|
1275
888
|
|
|
1276
889
|
### Fixed
|
|
1277
890
|
|
|
1278
|
-
-
|
|
891
|
+
- Binary resolution for scoped packages where package name ≠ binary name (e.g., `@socketsecurity/cli` exposes `bin: { socket: '...' }`)
|
|
1279
892
|
|
|
1280
893
|
## [2.9.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.9.0) - 2025-10-30
|
|
1281
894
|
|
|
1282
895
|
### Added
|
|
1283
896
|
|
|
1284
|
-
-
|
|
1285
|
-
- `SOCKET_WEBSITE_URL`: Main Socket.dev website
|
|
1286
|
-
- `SOCKET_CONTACT_URL`: Contact page
|
|
1287
|
-
- `SOCKET_DASHBOARD_URL`: Dashboard homepage
|
|
1288
|
-
- `SOCKET_API_TOKENS_URL`: API tokens settings page
|
|
1289
|
-
- `SOCKET_PRICING_URL`: Pricing information
|
|
1290
|
-
- `SOCKET_STATUS_URL`: Service status page
|
|
1291
|
-
- `SOCKET_DOCS_URL`: Documentation site
|
|
1292
|
-
- Available via `@socketsecurity/lib/constants/socket`
|
|
897
|
+
- `constants/socket` URL constants — `SOCKET_WEBSITE_URL`, `SOCKET_CONTACT_URL`, `SOCKET_DASHBOARD_URL`, `SOCKET_API_TOKENS_URL`, `SOCKET_PRICING_URL`, `SOCKET_STATUS_URL`, `SOCKET_DOCS_URL`
|
|
1293
898
|
|
|
1294
899
|
### Changed
|
|
1295
900
|
|
|
1296
|
-
-
|
|
1297
|
-
|
|
1298
|
-
- Improved file system operation errors (permissions, read-only filesystems, path issues)
|
|
1299
|
-
- Enhanced DLX error messages with clear troubleshooting guidance
|
|
1300
|
-
- Better error context in process locking, binary downloads, and package operations
|
|
1301
|
-
- Consistent error formatting with helpful user guidance
|
|
1302
|
-
- **Consolidated process locking**: Standardized on directory-based lock format across all modules
|
|
1303
|
-
- All locking operations now use `process-lock` module exclusively
|
|
1304
|
-
- Lock directories provide atomic guarantees across all filesystems including NFS
|
|
1305
|
-
- Consistent mtime-based stale detection with 5-second timeout (aligned with npm npx)
|
|
1306
|
-
- Automatic cleanup on process exit with proper signal handling
|
|
901
|
+
- Error messages across the library — actionable resolution steps for fs, dlx, process-lock, downloads
|
|
902
|
+
- All locking consolidated on `process-lock` (atomic mkdir-based; 5s stale timeout aligned with npm npx)
|
|
1307
903
|
|
|
1308
904
|
## [2.8.4](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.4) - 2025-10-30
|
|
1309
905
|
|
|
1310
906
|
### Added
|
|
1311
907
|
|
|
1312
|
-
-
|
|
1313
|
-
- `downloadBinary`: Download binary with caching (without execution)
|
|
1314
|
-
- `executeBinary`: Execute cached binary without re-downloading
|
|
1315
|
-
- Renamed internal `downloadBinary` to `downloadBinaryFile` to avoid naming conflicts
|
|
1316
|
-
- Maintains feature parity with `downloadPackage`/`executePackage` from dlx-package
|
|
908
|
+
- `dlx` `downloadBinary` (cache without execution) and `executeBinary` (run cached binary). Internal `downloadBinary` renamed to `downloadBinaryFile` to avoid the naming conflict
|
|
1317
909
|
|
|
1318
910
|
## [2.8.3](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.3) - 2025-10-30
|
|
1319
911
|
|
|
1320
912
|
### Fixed
|
|
1321
913
|
|
|
1322
|
-
-
|
|
1323
|
-
- Deferred `Object.getOwnPropertySymbols(console)` call until first logger use
|
|
1324
|
-
- Deferred `kGroupIndentationWidth` symbol lookup
|
|
1325
|
-
- Deferred `Object.entries(console)` and prototype method initialization
|
|
1326
|
-
- Ensures logger can be safely imported in Node.js internal bootstrap contexts (e.g., `lib/internal/bootstrap/*.js`) before stdout is initialized
|
|
1327
|
-
- Builds on v2.8.2 console deferring to complete early bootstrap compatibility
|
|
914
|
+
- `Logger` defers `Object.getOwnPropertySymbols(console)`, `kGroupIndentationWidth`, and `Object.entries(console)` until first use — safe to import in Node.js internal bootstrap contexts
|
|
1328
915
|
|
|
1329
916
|
## [2.8.2](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.2) - 2025-10-29
|
|
1330
917
|
|
|
1331
918
|
### Changed
|
|
1332
919
|
|
|
1333
|
-
-
|
|
1334
|
-
- Eliminates early bootstrap errors when importing logger before stdout is ready
|
|
1335
|
-
- Enables safe logger imports during Node.js early initialization phase
|
|
1336
|
-
- Simplified internal storage with WeakMap-only pattern for constructor args
|
|
920
|
+
- `Logger` defers `Console` creation until first use — eliminates early-bootstrap errors when imported before stdout is ready
|
|
1337
921
|
|
|
1338
922
|
## [2.8.1](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.1) - 2025-10-29
|
|
1339
923
|
|
|
1340
924
|
### Changed
|
|
1341
925
|
|
|
1342
|
-
-
|
|
1343
|
-
- Eliminates code duplication between `dlx-binary.ts` and `dlx-package.ts`
|
|
1344
|
-
- Enables consistent cache key generation across the Socket ecosystem
|
|
1345
|
-
- Exports function for use in dependent packages (e.g., socket-cli)
|
|
1346
|
-
- Maintains SHA-512 truncated to 16 chars strategy from v2.8.0
|
|
926
|
+
- `dlx` — `generateCacheKey` extracted to shared module. Exported for downstream consumers (e.g. socket-cli)
|
|
1347
927
|
|
|
1348
928
|
## [2.8.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.0) - 2025-10-29
|
|
1349
929
|
|
|
1350
930
|
### Changed
|
|
1351
931
|
|
|
1352
|
-
-
|
|
1353
|
-
- Changed from SHA-256 (64 chars) to SHA-512 truncated to 16 chars (matching npm/npx)
|
|
1354
|
-
- Optimized for Windows MAX_PATH compatibility (260 character limit)
|
|
1355
|
-
- Accepts collision risk for shorter paths (~1 in 18 quintillion with 1000 entries)
|
|
1356
|
-
- Added support for PURL-style package specifications (e.g., `npm:prettier@3.0.0`, `pypi:requests@2.31.0`)
|
|
1357
|
-
- Documented Socket's shorthand format (without `pkg:` prefix) handled by `@socketregistry/packageurl-js`
|
|
1358
|
-
- References npm/cli v11.6.2 implementation for consistency
|
|
932
|
+
- `dlx` cache keys — SHA-512 truncated to 16 chars (was SHA-256 / 64 chars), matching npm/npx. Better Windows `MAX_PATH` compatibility. Supports PURL specs (`npm:prettier@3.0.0`, `pypi:requests@2.31.0`)
|
|
1359
933
|
|
|
1360
934
|
## [2.7.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.7.0) - 2025-10-28
|
|
1361
935
|
|
|
1362
936
|
### Added
|
|
1363
937
|
|
|
1364
|
-
-
|
|
1365
|
-
- Lock file created at `~/.socket/_dlx/<hash>/.lock` (similar to npm npx's `concurrency.lock`)
|
|
1366
|
-
- Prevents concurrent installations from corrupting the same package cache
|
|
1367
|
-
- Uses 5-second stale timeout and 2-second periodic touching (aligned with npm npx)
|
|
1368
|
-
- Double-check pattern verifies installation after acquiring lock to avoid redundant work
|
|
1369
|
-
- Completes 100% alignment with npm's npx locking strategy
|
|
938
|
+
- `dlx` cache locking — `~/.socket/_dlx/<hash>/.lock` (npm-npx-style `concurrency.lock`). Prevents concurrent installations from corrupting the same package cache. 5s stale timeout, 2s periodic touch
|
|
1370
939
|
|
|
1371
940
|
## [2.6.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.6.0) - 2025-10-28
|
|
1372
941
|
|
|
1373
942
|
### Changed
|
|
1374
943
|
|
|
1375
|
-
-
|
|
1376
|
-
- Reduced stale timeout from 10 seconds to 5 seconds (matches npm npx)
|
|
1377
|
-
- Added periodic lock touching (2-second interval) to prevent false stale detection during long operations
|
|
1378
|
-
- Implemented second-level granularity for mtime comparison to avoid APFS floating-point precision issues
|
|
1379
|
-
- Added automatic touch timer cleanup on process exit
|
|
1380
|
-
- Timers use `unref()` to prevent keeping process alive
|
|
1381
|
-
- Aligns with npm's npx implementation per https://github.com/npm/cli/pull/8512
|
|
944
|
+
- `process-lock` aligned with npm npx — 5s stale timeout (was 10s), 2s periodic touch, second-level mtime comparison (avoids APFS float precision), `unref()` timers, automatic cleanup on exit
|
|
1382
945
|
|
|
1383
946
|
## [2.5.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.5.0) - 2025-10-28
|
|
1384
947
|
|
|
1385
948
|
### Added
|
|
1386
949
|
|
|
1387
|
-
-
|
|
1388
|
-
- Atomic lock acquisition via `mkdir()` for thread-safe operations
|
|
1389
|
-
- Stale lock detection with automatic cleanup (default 10 seconds, aligned with npm's npx strategy)
|
|
1390
|
-
- Exponential backoff with jitter for retry attempts
|
|
1391
|
-
- Process exit handlers for guaranteed cleanup even on abnormal termination
|
|
1392
|
-
- Three main APIs: `acquire()`, `release()`, and `withLock()` (recommended)
|
|
1393
|
-
- Comprehensive test suite with `describe.sequential` for proper isolation
|
|
1394
|
-
- Export: `@socketsecurity/lib/process-lock`
|
|
950
|
+
- `process-lock` `ProcessLockManager` — cross-platform inter-process sync via filesystem locks. Atomic `mkdir()` acquisition; stale-lock detection (10s default); exponential backoff with jitter; exit-handler cleanup. APIs: `acquire`, `release`, `withLock` (recommended)
|
|
1395
951
|
|
|
1396
952
|
### Changed
|
|
1397
953
|
|
|
1398
|
-
-
|
|
1399
|
-
- **Script cleanup**: Removed redundant spinner cleanup in interactive-runner
|
|
954
|
+
- `spinner.succeed()` renamed to `spinner.success()`
|
|
1400
955
|
|
|
1401
956
|
## [2.4.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.4.0) - 2025-10-28
|
|
1402
957
|
|
|
1403
958
|
### Changed
|
|
1404
959
|
|
|
1405
|
-
-
|
|
1406
|
-
|
|
1407
|
-
- Matches npm's battle-tested timeout range (5-10 seconds)
|
|
1408
|
-
- Binary downloads now protected against concurrent corruption
|
|
1409
|
-
- **Binary download protection**: `dlxBinary.downloadBinary()` now uses `downloadWithLock()` to prevent corruption when multiple processes download the same binary concurrently
|
|
1410
|
-
- Eliminates race conditions during parallel binary downloads
|
|
1411
|
-
- Maintains checksum verification and executable permissions
|
|
960
|
+
- `downloadWithLock()` default `staleTimeout` 300s → 10s (aligns with npm npx)
|
|
961
|
+
- `dlxBinary.downloadBinary()` uses `downloadWithLock()` to prevent corruption from concurrent binary downloads
|
|
1412
962
|
|
|
1413
963
|
## [2.3.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.3.0) - 2025-10-28
|
|
1414
964
|
|
|
1415
965
|
### Added
|
|
1416
966
|
|
|
1417
|
-
-
|
|
1418
|
-
- Cross-platform binary lookup that respects PATH environment variable
|
|
1419
|
-
- Synchronous and asynchronous variants for different use cases
|
|
1420
|
-
- Integrates with existing binary resolution utilities
|
|
967
|
+
- `bin` `which()` / `whichSync()` — cross-platform binary lookup respecting `PATH`
|
|
1421
968
|
|
|
1422
969
|
## [2.2.1](https://github.com/SocketDev/socket-lib/releases/tag/v2.2.1) - 2025-10-28
|
|
1423
970
|
|
|
1424
971
|
### Fixed
|
|
1425
972
|
|
|
1426
|
-
-
|
|
1427
|
-
- Previously, `write()` used Console's internal `_stdout` stream which applied unintended formatting like group indentation
|
|
1428
|
-
- Now stores a reference to the original stdout stream in a dedicated private field (`#originalStdout`) during construction
|
|
1429
|
-
- The `write()` method uses this stored reference to write directly to the raw stream, bypassing all Console formatting layers
|
|
1430
|
-
- Ensures raw text output without any formatting applied, fixing test failures in CI environments where writes after `indent()` were unexpectedly formatted
|
|
973
|
+
- `Logger` `write()` bypasses Console formatting (group indentation, etc.) — now writes directly to the raw stdout reference captured at construction
|
|
1431
974
|
|
|
1432
975
|
## [2.2.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.2.0) - 2025-10-28
|
|
1433
976
|
|
|
1434
977
|
### Added
|
|
1435
978
|
|
|
1436
|
-
-
|
|
1437
|
-
- New `LOG_SYMBOLS.step` symbol added to the symbol palette
|
|
1438
|
-
- Automatic stripping of existing symbols from step messages
|
|
1439
|
-
- Maintains existing blank line behavior for clear step separation
|
|
979
|
+
- `Logger` `step()` — cyan arrow `→` prefix (or `>` in ASCII fallback). New `LOG_SYMBOLS.step`
|
|
1440
980
|
|
|
1441
981
|
## [2.1.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.1.0) - 2025-10-28
|
|
1442
982
|
|
|
1443
983
|
### Added
|
|
1444
984
|
|
|
1445
|
-
- Package manager detection
|
|
1446
|
-
- `isInSocketDlx()`
|
|
1447
|
-
- `downloadPackage()`
|
|
985
|
+
- Package manager detection — `detectPackageManager()`, `getPackageManagerInfo()`, `getPackageManagerUserAgent()`
|
|
986
|
+
- `isInSocketDlx()` — check if a path is under `~/.socket/_dlx/`
|
|
987
|
+
- `downloadPackage()` / `executePackage()` — separate download and execution
|
|
1448
988
|
|
|
1449
989
|
## [2.0.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.0.0) - 2025-10-27
|
|
1450
990
|
|
|
1451
|
-
###
|
|
1452
|
-
|
|
1453
|
-
**Environment Variable System Refactor**
|
|
1454
|
-
|
|
1455
|
-
This release completely refactors the environment variable system, consolidating 60+ individual env constant files into grouped getter modules with AsyncLocalStorage-based test rewiring.
|
|
1456
|
-
|
|
1457
|
-
**Consolidated env files** - Individual files replaced with grouped modules:
|
|
1458
|
-
|
|
1459
|
-
- `env/github.ts` - All GitHub-related env vars (GITHUB_TOKEN, GH_TOKEN, GITHUB_API_URL, etc.)
|
|
1460
|
-
- `env/socket.ts` - Socket-specific env vars (SOCKET_API_TOKEN, SOCKET_CACACHE_DIR, etc.)
|
|
1461
|
-
- `env/socket-cli.ts` - Socket CLI env vars (SOCKET_CLI_API_TOKEN, SOCKET_CLI_CONFIG, etc.)
|
|
1462
|
-
- `env/npm.ts` - NPM-related env vars
|
|
1463
|
-
- `env/locale.ts` - Locale env vars (LANG, LC_ALL, LC_MESSAGES)
|
|
1464
|
-
- `env/windows.ts` - Windows-specific env vars (USERPROFILE, LOCALAPPDATA, APPDATA, COMSPEC)
|
|
1465
|
-
- `env/xdg.ts` - XDG base directory env vars
|
|
1466
|
-
- `env/temp-dir.ts` - Temp directory env vars (TEMP, TMP, TMPDIR)
|
|
1467
|
-
- `env/test.ts` - Test framework env vars (VITEST, JEST_WORKER_ID)
|
|
1468
|
-
|
|
1469
|
-
**Constants → Getter functions** - All env constants converted to functions:
|
|
1470
|
-
|
|
1471
|
-
```typescript
|
|
1472
|
-
// Before (v1.x):
|
|
1473
|
-
import { GITHUB_TOKEN } from '#env/github-token'
|
|
1474
|
-
|
|
1475
|
-
// After (v2.x):
|
|
1476
|
-
import { getGithubToken } from '#env/github'
|
|
1477
|
-
```
|
|
1478
|
-
|
|
1479
|
-
**Deleted files** - Removed 60+ individual env constant files:
|
|
991
|
+
### Changed
|
|
1480
992
|
|
|
1481
|
-
- `env
|
|
1482
|
-
- `env/
|
|
993
|
+
- **BREAKING**: Environment variable system refactor — 60+ individual `env/<NAME>.ts` files consolidated into grouped getter modules:
|
|
994
|
+
- `env/github`, `env/socket`, `env/socket-cli`, `env/npm`, `env/locale`, `env/windows`, `env/xdg`, `env/temp-dir`, `env/test`
|
|
995
|
+
- All env constants converted to functions: `import { GITHUB_TOKEN } from '#env/github-token'` → `import { getGithubToken } from '#env/github'`
|
|
1483
996
|
|
|
1484
997
|
### Added
|
|
1485
998
|
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
New `env/rewire.ts` and `path/rewire.ts` modules provides context-isolated environment variable overrides for testing:
|
|
1489
|
-
|
|
1490
|
-
```typescript
|
|
1491
|
-
import { withEnv, setEnv, resetEnv, getEnvValue } from '#env/rewire'
|
|
1492
|
-
|
|
1493
|
-
// Option 1: Isolated context with AsyncLocalStorage
|
|
1494
|
-
await withEnv({ CI: '1', NODE_ENV: 'test' }, async () => {
|
|
1495
|
-
// CI env var is '1' only within this block
|
|
1496
|
-
// Concurrent tests don't interfere
|
|
1497
|
-
})
|
|
1498
|
-
|
|
1499
|
-
// Option 2: Traditional beforeEach/afterEach pattern
|
|
1500
|
-
beforeEach(() => {
|
|
1501
|
-
setEnv('CI', '1')
|
|
1502
|
-
})
|
|
1503
|
-
|
|
1504
|
-
afterEach(() => {
|
|
1505
|
-
resetEnv()
|
|
1506
|
-
})
|
|
1507
|
-
```
|
|
1508
|
-
|
|
1509
|
-
**Features:**
|
|
1510
|
-
|
|
1511
|
-
- Allows toggling between snapshot and live behavior
|
|
1512
|
-
- Compatible with `vi.stubEnv()` as fallback
|
|
1513
|
-
|
|
1514
|
-
### Changed
|
|
1515
|
-
|
|
1516
|
-
- Updated all dynamic `require()` statements to use path aliases (`#constants/*`, `#packages/*`)
|
|
1517
|
-
- Improved logger blank line tracking per stream (separate stderr/stdout tracking)
|
|
1518
|
-
- Exported `getCacache()` function for external use
|
|
999
|
+
- `env/rewire` and `paths/rewire` — AsyncLocalStorage-based env/path overrides for testing. `withEnv({...}, async () => {})` for isolated context, or `setEnv` / `resetEnv` for `beforeEach`/`afterEach`
|
|
1000
|
+
- `getCacache()` exported
|
|
1519
1001
|
|
|
1520
1002
|
## [1.3.6](https://github.com/SocketDev/socket-lib/releases/tag/v1.3.6) - 2025-10-26
|
|
1521
1003
|
|
|
1522
1004
|
### Fixed
|
|
1523
1005
|
|
|
1524
|
-
-
|
|
1525
|
-
- Removed incorrect `/*@__NO_SIDE_EFFECTS__*/` annotations from `debug()`, `debugDir()`, `debugLog()`, and their `*Ns` variants
|
|
1526
|
-
- These functions have side effects (logging output, spinner manipulation) and should not be removed by bundlers
|
|
1527
|
-
- Fixes issue where `debugLog()` and `debugDir()` were compiled to empty no-op functions
|
|
1006
|
+
- `debug` functions no longer tree-shaken as no-ops — removed incorrect `/*@__NO_SIDE_EFFECTS__*/` annotations on `debug`, `debugDir`, `debugLog` (+ `*Ns` variants)
|
|
1528
1007
|
|
|
1529
1008
|
## [1.3.5](https://github.com/SocketDev/socket-lib/releases/tag/v1.3.5) - 2025-10-26
|
|
1530
1009
|
|
|
1531
1010
|
### Added
|
|
1532
1011
|
|
|
1533
|
-
-
|
|
1534
|
-
|
|
1535
|
-
- Smart priority system: overrides > exact match > case-insensitive fallback
|
|
1536
|
-
- Full Proxy implementation with proper handlers for get, set, has, ownKeys, getOwnPropertyDescriptor
|
|
1537
|
-
- Opt-in helper for users who need Windows env var compatibility
|
|
1538
|
-
- Well-documented with usage examples and performance notes
|
|
1539
|
-
- Added `findCaseInsensitiveEnvKey()` utility function to `env` module
|
|
1540
|
-
- Searches for environment variable keys using case-insensitive matching
|
|
1541
|
-
- Optimized with length fast path to minimize expensive `toUpperCase()` calls
|
|
1542
|
-
- Useful for cross-platform env var access where case may vary (e.g., PATH vs Path vs path)
|
|
1543
|
-
- Added comprehensive test suite for `env` module with 71 tests
|
|
1544
|
-
- Covers `envAsBoolean()`, `envAsNumber()`, `envAsString()` conversion utilities
|
|
1545
|
-
- Tests `createEnvProxy()` with Windows environment variables and edge cases
|
|
1546
|
-
- Validates `findCaseInsensitiveEnvKey()` optimization and behavior
|
|
1012
|
+
- `env` `createEnvProxy()` — Windows-compatible case-insensitive env var access (`PATH`, `Path`, `path` all work). Priority: overrides > exact match > case-insensitive fallback
|
|
1013
|
+
- `env` `findCaseInsensitiveEnvKey()` — case-insensitive key search with length fast-path
|
|
1547
1014
|
|
|
1548
1015
|
### Fixed
|
|
1549
1016
|
|
|
1550
|
-
-
|
|
1551
|
-
- When no custom environment variables are provided, use `process.env` directly instead of spreading it
|
|
1552
|
-
- Preserves Windows case-insensitive environment variable access (PATH vs Path)
|
|
1553
|
-
- Fixes empty CLI output issue on Windows CI runners
|
|
1554
|
-
- Only spreads `process.env` when merging custom environment variables
|
|
1017
|
+
- `spawn` preserves Windows `process.env` Proxy behavior (uses `process.env` directly when no custom env merges, keeping Windows case-insensitive access)
|
|
1555
1018
|
|
|
1556
1019
|
## [1.3.4](https://github.com/SocketDev/socket-lib/releases/tag/v1.3.4) - 2025-10-26
|
|
1557
1020
|
|
|
1558
1021
|
### Added
|
|
1559
1022
|
|
|
1560
|
-
-
|
|
1561
|
-
- `supportsNodeDisableSigusr1Flag()`: Detects if Node supports `--disable-sigusr1` flag (v22.14+, v23.7+, v24.8+)
|
|
1562
|
-
- `getNodeDisableSigusr1Flags()`: Returns appropriate flags to prevent debugger attachment
|
|
1563
|
-
- Returns `['--disable-sigusr1']` on supported versions (prevents Signal I/O Thread creation)
|
|
1564
|
-
- Falls back to `['--no-inspect']` on Node 18+ (blocks debugger but still creates thread)
|
|
1565
|
-
- Enables production CLI environments to prevent SIGUSR1 debugger signal handling for security
|
|
1023
|
+
- `constants/node` — `supportsNodeDisableSigusr1Flag()`, `getNodeDisableSigusr1Flags()`. Returns `['--disable-sigusr1']` on Node 22.14+/23.7+/24.8+, falls back to `['--no-inspect']` on Node 18+
|
|
1566
1024
|
|
|
1567
1025
|
## [1.3.3](https://github.com/SocketDev/socket-lib/releases/tag/v1.3.3) - 2025-10-24
|
|
1568
1026
|
|
|
1569
1027
|
### Fixed
|
|
1570
1028
|
|
|
1571
|
-
-
|
|
1572
|
-
- These functions mutate objects by defining properties, so marking them as side-effect-free caused esbuild to incorrectly tree-shake the calls during bundling
|
|
1573
|
-
- Lazy getters were returning `undefined` instead of their computed values
|
|
1574
|
-
- Removed double wrapping in `defineLazyGetters` where `createLazyGetter` was being called unnecessarily
|
|
1029
|
+
- `objects` `defineGetter`, `defineLazyGetter`, `defineLazyGetters` — removed incorrect `/*@__NO_SIDE_EFFECTS__*/` annotations (these mutate objects). Lazy getters were returning `undefined` after esbuild tree-shaking
|
|
1575
1030
|
|
|
1576
1031
|
## [1.3.2](https://github.com/SocketDev/socket-lib/releases/tag/v1.3.2) - 2025-10-24
|
|
1577
1032
|
|
|
@@ -1583,10 +1038,7 @@ afterEach(() => {
|
|
|
1583
1038
|
|
|
1584
1039
|
### Fixed
|
|
1585
1040
|
|
|
1586
|
-
-
|
|
1587
|
-
- Resolves build failures in downstream packages (socket-cli) that depend on socket-lib
|
|
1588
|
-
- Added missing packages to bundling configuration in `scripts/build-externals.mjs`
|
|
1589
|
-
- All @inquirer packages now ship as zero-dependency bundles
|
|
1041
|
+
- `@inquirer` modules (`input`, `password`, `search`) properly bundled into `dist/external/` — fixes build failures in downstream socket-cli
|
|
1590
1042
|
|
|
1591
1043
|
### Added
|
|
1592
1044
|
|
|
@@ -1599,96 +1051,72 @@ afterEach(() => {
|
|
|
1599
1051
|
|
|
1600
1052
|
### Added
|
|
1601
1053
|
|
|
1602
|
-
-
|
|
1603
|
-
- Returns `ValidateFilesResult` with `validPaths` and `invalidPaths` arrays
|
|
1604
|
-
- Filters out unreadable files before processing (common with Yarn Berry PnP virtual filesystem, pnpm symlinks)
|
|
1605
|
-
- Prevents ENOENT errors when files exist in glob results but are not accessible
|
|
1606
|
-
- Comprehensive test coverage for all validation scenarios
|
|
1054
|
+
- `fs` `validateFiles()` — returns `{ validPaths, invalidPaths }`. Filters unreadable files before processing (Yarn Berry PnP, pnpm symlinks)
|
|
1607
1055
|
|
|
1608
1056
|
## [1.2.0](https://github.com/SocketDev/socket-lib/releases/tag/v1.2.0) - 2025-10-23
|
|
1609
1057
|
|
|
1610
1058
|
### Added
|
|
1611
1059
|
|
|
1612
|
-
-
|
|
1613
|
-
- Content-addressed caching using SHA256 hash (like npm's \_npx)
|
|
1614
|
-
- Auto-force for version ranges (^, ~, >, <) to get latest within range
|
|
1615
|
-
- Cross-platform support with comprehensive tests (30 tests)
|
|
1616
|
-
- Parses scoped and unscoped package specs correctly
|
|
1617
|
-
- Resolves binaries from package.json bin field
|
|
1060
|
+
- `dlx-package` — install and execute npm packages directly. Content-addressed cache (SHA256). Auto-force for version ranges (`^`, `~`, `>`, `<`). Resolves binaries from `package.json` `bin`
|
|
1618
1061
|
|
|
1619
1062
|
### Changed
|
|
1620
1063
|
|
|
1621
|
-
- Unified DLX storage under `~/.socket/_dlx/`
|
|
1622
|
-
- Binary downloads now use `~/.socket/_dlx/` instead of non-existent cache path
|
|
1623
|
-
- Both npm packages and binaries share parent directory with content-addressed hashing
|
|
1624
|
-
- Updated paths.ts documentation to clarify unified directory structure
|
|
1064
|
+
- Unified DLX storage under `~/.socket/_dlx/` (binary downloads + npm packages share content-addressed parent)
|
|
1625
1065
|
|
|
1626
1066
|
## [1.1.2] - 2025-10-23
|
|
1627
1067
|
|
|
1628
1068
|
### Fixed
|
|
1629
1069
|
|
|
1630
|
-
-
|
|
1070
|
+
- Broken relative import paths in `packages/isolation.ts` / `packages/provenance.ts`
|
|
1631
1071
|
|
|
1632
1072
|
## [1.1.1] - 2025-10-23
|
|
1633
1073
|
|
|
1634
1074
|
### Fixed
|
|
1635
1075
|
|
|
1636
|
-
-
|
|
1076
|
+
- Shimmer text effects respect CI detection (disabled in CI to avoid ANSI escapes in logs)
|
|
1637
1077
|
|
|
1638
1078
|
## [1.1.0] - 2025-10-23
|
|
1639
1079
|
|
|
1640
1080
|
### Added
|
|
1641
1081
|
|
|
1642
|
-
-
|
|
1643
|
-
-
|
|
1644
|
-
- Added comprehensive JSDoc documentation across entire library for enhanced VSCode IntelliSense
|
|
1645
|
-
- Detailed @param, @returns, @template, @throws tags
|
|
1646
|
-
- Practical @example blocks with real-world usage patterns
|
|
1647
|
-
- @default tags showing default values
|
|
1648
|
-
- Enhanced interface property documentation
|
|
1649
|
-
|
|
1650
|
-
### Changed
|
|
1651
|
-
|
|
1652
|
-
- Improved TypeScript type hints and tooltips throughout library
|
|
1653
|
-
- Enhanced documentation for all core utilities (arrays, fs, git, github, http-request, json, logger, objects, path, promises, spawn, spinner, strings)
|
|
1654
|
-
- Enhanced documentation for stdio utilities (clear, divider, footer, header, mask, progress, prompts, stderr, stdout)
|
|
1655
|
-
- Enhanced documentation for validation utilities (json-parser, types)
|
|
1082
|
+
- `stdio/mask` — `filterOutput` (filter output chunks before display) and `overrideExitCode` (customize exit codes from captured output)
|
|
1083
|
+
- Comprehensive JSDoc across the library for IntelliSense (`@param`, `@returns`, `@example`, `@default`)
|
|
1656
1084
|
|
|
1657
1085
|
## [1.0.5] - 2025-10-22
|
|
1658
1086
|
|
|
1659
1087
|
### Added
|
|
1660
1088
|
|
|
1661
|
-
-
|
|
1089
|
+
- Custom retry delays from `onRetry` callback
|
|
1662
1090
|
|
|
1663
1091
|
## [1.0.4] - 2025-10-21
|
|
1664
1092
|
|
|
1665
1093
|
### Fixed
|
|
1666
1094
|
|
|
1667
|
-
-
|
|
1095
|
+
- External dep paths in root-level dist files (`../external/` → `./external/`)
|
|
1668
1096
|
|
|
1669
1097
|
## [1.0.3] - 2025-10-21
|
|
1670
1098
|
|
|
1671
1099
|
### Fixed
|
|
1672
1100
|
|
|
1673
|
-
-
|
|
1101
|
+
- External dep import paths in `packages/` and `stdio/` modules (`../../external/` → `../external/`)
|
|
1674
1102
|
|
|
1675
1103
|
## [1.0.2] - 2025-10-21
|
|
1676
1104
|
|
|
1677
1105
|
### Fixed
|
|
1678
1106
|
|
|
1679
|
-
-
|
|
1107
|
+
- `packages/normalize` module resolution (`../../constants/socket` → `../constants/socket`)
|
|
1680
1108
|
|
|
1681
1109
|
## [1.0.1] - 2025-10-21
|
|
1682
1110
|
|
|
1683
1111
|
### Fixed
|
|
1684
1112
|
|
|
1685
|
-
-
|
|
1113
|
+
- Relative imports in compiled CommonJS — root-level dist files use `./external/...`
|
|
1686
1114
|
|
|
1687
1115
|
## [1.0.0] - 2025-10-20
|
|
1688
1116
|
|
|
1689
1117
|
### Changed
|
|
1690
1118
|
|
|
1691
|
-
-
|
|
1119
|
+
- `parseArgs` consolidated into `argv/parse`
|
|
1692
1120
|
|
|
1693
1121
|
---
|
|
1694
1122
|
|
|
@@ -1696,254 +1124,12 @@ afterEach(() => {
|
|
|
1696
1124
|
|
|
1697
1125
|
---
|
|
1698
1126
|
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
### Added
|
|
1702
|
-
|
|
1703
|
-
- Fix bad build and add validation to prevent in future
|
|
1704
|
-
|
|
1705
|
-
## [1.5.2] - 2025-10-07
|
|
1706
|
-
|
|
1707
|
-
### Added
|
|
1708
|
-
|
|
1709
|
-
- Added coverage utilities to parse v8 and type coverage reports
|
|
1710
|
-
|
|
1711
|
-
### Fixed
|
|
1712
|
-
|
|
1713
|
-
- Fixed `isPath` function to exclude URLs with protocols
|
|
1714
|
-
- Fixed `isolatePackage` to handle file: URLs and npm-package-arg paths correctly
|
|
1715
|
-
|
|
1716
|
-
## [1.5.1] - 2025-10-05
|
|
1717
|
-
|
|
1718
|
-
### Added
|
|
1719
|
-
|
|
1720
|
-
- Added `isolatePackage` to `lib/packages/isolation` for creating isolated package test environments
|
|
1127
|
+
These entries cover versions 1.0.0 → 1.5.3 of the previous package name (`@socketsecurity/registry`, Sep 2025 – Oct 2025). The version-number line restarted at 1.0.0 when the package was renamed to `@socketsecurity/lib`, so the current 1.x and 5.x lines do **not** continue from these old versions. Listed here for archival reference only.
|
|
1721
1128
|
|
|
1722
|
-
###
|
|
1723
|
-
|
|
1724
|
-
- Removed `dependencies/index` barrel file to prevent eager loading of all dependency modules
|
|
1725
|
-
|
|
1726
|
-
## [1.5.0] - 2025-10-05
|
|
1727
|
-
|
|
1728
|
-
### Added
|
|
1729
|
-
|
|
1730
|
-
- Added support for testing local development packages in addition to socket-registry packages
|
|
1731
|
-
- Exposed isolation module as part of public API via `lib/packages`
|
|
1732
|
-
|
|
1733
|
-
### Changed
|
|
1734
|
-
|
|
1735
|
-
- Renamed `setupPackageTest` to `isolatePackage` for clearer intent
|
|
1736
|
-
- Refactored `installPackageForTesting` to accept explicit `sourcePath` and `packageName` parameters
|
|
1737
|
-
- Simplified package installation logic by removing path detection from low-level function
|
|
1738
|
-
- Consolidated `setupPackageTest` and `setupMultiEntryTest` into single `isolatePackage` function with options
|
|
1739
|
-
|
|
1740
|
-
## [1.4.6] - 2025-10-05
|
|
1741
|
-
|
|
1742
|
-
### Added
|
|
1743
|
-
|
|
1744
|
-
- Added comprehensive package.json exports validation tests
|
|
1745
|
-
|
|
1746
|
-
## [1.4.5] - 2025-10-05
|
|
1747
|
-
|
|
1748
|
-
### Added
|
|
1749
|
-
|
|
1750
|
-
- Added performance monitoring utilities with timer, measurement, and reporting functions
|
|
1751
|
-
- Added memoization utilities with LRU, TTL, weak references, and promise deduplication support
|
|
1752
|
-
- Added table formatting utilities (`formatTable`, `formatSimpleTable`) for CLI output
|
|
1753
|
-
- Added progress tracking to spinner with `updateProgress()` and `incrementProgress()` methods
|
|
1754
|
-
- Added `isDir` and `safeStats` async helpers to fs module
|
|
1755
|
-
|
|
1756
|
-
### Changed
|
|
1757
|
-
|
|
1758
|
-
- Removed `platform` and `arch` options from `dlxBinary` function as cross-platform binary execution is not supported
|
|
1759
|
-
|
|
1760
|
-
### Fixed
|
|
1761
|
-
|
|
1762
|
-
- Fixed Windows shell execution in `dlxBinary` by adding cache directory to PATH
|
|
1763
|
-
|
|
1764
|
-
## [1.4.4] - 2025-10-05
|
|
1765
|
-
|
|
1766
|
-
### Fixed
|
|
1767
|
-
|
|
1768
|
-
- Fixed subpath exports
|
|
1769
|
-
|
|
1770
|
-
## [1.4.3] - 2025-10-04
|
|
1771
|
-
|
|
1772
|
-
### Added
|
|
1773
|
-
|
|
1774
|
-
- Spinner lifecycle utilities (`withSpinner`, `withSpinnerRestore`, `withSpinnerSync`) for automatic spinner cleanup with try/finally blocks
|
|
1775
|
-
|
|
1776
|
-
## [1.4.2] - 2025-10-04
|
|
1777
|
-
|
|
1778
|
-
### Added
|
|
1779
|
-
|
|
1780
|
-
- Added `GITHUB_API_BASE_URL` constant for GitHub API endpoint configuration
|
|
1781
|
-
- Added `SOCKET_API_BASE_URL` constant for Socket API endpoint configuration
|
|
1782
|
-
- Added generic TTL cache utility (`createTtlCache`) with in-memory memoization and persistent storage support
|
|
1783
|
-
|
|
1784
|
-
### Changed
|
|
1785
|
-
|
|
1786
|
-
- Refactored GitHub caching to use the new `cache-with-ttl` utility for better performance and consistency
|
|
1787
|
-
|
|
1788
|
-
## [1.4.1] - 2025-10-04
|
|
1789
|
-
|
|
1790
|
-
### Changed
|
|
1791
|
-
|
|
1792
|
-
- Update maintained Node.js versions of `constants.maintainedNodeVersions`
|
|
1793
|
-
|
|
1794
|
-
## [1.4.0] - 2025-10-04
|
|
1795
|
-
|
|
1796
|
-
### Added
|
|
1797
|
-
|
|
1798
|
-
- Added `PromiseQueue` utility for controlled concurrency operations
|
|
1799
|
-
- Added lazy dependency loaders and test utilities
|
|
1800
|
-
- Added HTTP utilities with retry logic and download locking
|
|
1801
|
-
- Added `.claude` directory for scratch documents
|
|
1802
|
-
- Added `noUnusedLocals` and `noUnusedParameters` to TypeScript config
|
|
1803
|
-
|
|
1804
|
-
### Changed
|
|
1805
|
-
|
|
1806
|
-
- Refactored all library functions to use options objects for better API consistency
|
|
1807
|
-
- `lib/strings.ts` - String manipulation functions
|
|
1808
|
-
- `lib/url.ts` - URL handling functions
|
|
1809
|
-
- `lib/words.ts` - Word manipulation functions
|
|
1810
|
-
- Refactored `lib/packages` module into specialized submodules for improved code organization
|
|
1811
|
-
- `lib/packages/editable.ts` - Package editing functionality
|
|
1812
|
-
- `lib/packages/exports.ts` - Export resolution utilities
|
|
1813
|
-
- `lib/packages/licenses.ts` - License handling and validation
|
|
1814
|
-
- `lib/packages/manifest.ts` - Manifest data operations
|
|
1815
|
-
- `lib/packages/normalize.ts` - Path normalization utilities
|
|
1816
|
-
- `lib/packages/operations.ts` - Package installation and modification operations
|
|
1817
|
-
- `lib/packages/paths.ts` - Package path utilities
|
|
1818
|
-
- `lib/packages/provenance.ts` - Package provenance verification
|
|
1819
|
-
- `lib/packages/specs.ts` - Package spec parsing
|
|
1820
|
-
- `lib/packages/validation.ts` - Package validation utilities
|
|
1821
|
-
- Moved configuration files (vitest, eslint, knip, oxlint, taze) to `.config` directory
|
|
1822
|
-
- Replaced `fetch()` with Node.js native `http`/`https` modules for better reliability
|
|
1823
|
-
- Replaced `any` types with meaningful types across library utilities
|
|
1824
|
-
- Improved pnpm security with build script allowlist
|
|
1825
|
-
- Updated vitest coverage thresholds to 80%
|
|
1826
|
-
- Consolidated test files to reduce duplication
|
|
1827
|
-
- Note: Public API remains unchanged; these are internal organizational improvements
|
|
1828
|
-
|
|
1829
|
-
### Fixed
|
|
1830
|
-
|
|
1831
|
-
- Fixed resource leaks and race conditions in socket-registry
|
|
1832
|
-
- Fixed `yarn-cache-path` constant to return string type consistently
|
|
1833
|
-
- Fixed Yarn Windows temp path detection in `shouldSkipShadow`
|
|
1834
|
-
- Fixed path normalization for Windows compatibility across all path utilities
|
|
1835
|
-
- Fixed cache path tests for Windows case sensitivity
|
|
1836
|
-
- Fixed type errors in promises, parse-args, logger, and specs tests
|
|
1837
|
-
- Fixed GitHub tests to mock `httpRequest` correctly
|
|
1838
|
-
- Fixed SEA build tests to mock `httpRequest`
|
|
1839
|
-
- Decoded URL percent-encoding in `pathLikeToString` fallback
|
|
1840
|
-
|
|
1841
|
-
## [1.3.10] - 2025-10-03
|
|
1842
|
-
|
|
1843
|
-
### Added
|
|
1844
|
-
|
|
1845
|
-
- New utility modules for DLX, shadow, SEA, cacache, and versions functionality
|
|
1846
|
-
- getSocketHomePath alias to paths module
|
|
1847
|
-
- del dependency and external wrapper for safer file deletion
|
|
1848
|
-
- @fileoverview tags to lib modules
|
|
1849
|
-
- camelCase expansion for kebab-case arguments in parseArgs
|
|
1850
|
-
- Coerce and configuration options to parseArgs
|
|
1851
|
-
|
|
1852
|
-
### Changed
|
|
1853
|
-
|
|
1854
|
-
- Updated file removal to use del package for safer deletion
|
|
1855
|
-
- Normalized path returns in fs and Socket directory utilities
|
|
1856
|
-
- Removed default exports from git and parse-args modules
|
|
1857
|
-
- Enhanced test coverage across multiple modules (parse-args, prompts, strings, env, spawn, json)
|
|
1858
|
-
|
|
1859
|
-
## [1.3.9] - 2025-10-03
|
|
1860
|
-
|
|
1861
|
-
### Changed
|
|
1862
|
-
|
|
1863
|
-
- Internal build and distribution updates
|
|
1864
|
-
|
|
1865
|
-
## [1.3.8] - 2025-10-03
|
|
1866
|
-
|
|
1867
|
-
### Added
|
|
1868
|
-
|
|
1869
|
-
- Added unified directory structure for Socket ecosystem tools
|
|
1870
|
-
- New path utilities module for cross-platform directory resolution
|
|
1871
|
-
- Directory structure constants for Socket CLI, Registry, Firewall, and DLX
|
|
1872
|
-
|
|
1873
|
-
## [1.3.7] - 2025-10-02
|
|
1874
|
-
|
|
1875
|
-
### Changed
|
|
1876
|
-
|
|
1877
|
-
- Updated manifest.json entries
|
|
1878
|
-
|
|
1879
|
-
## [1.3.6] - 2025-10-01
|
|
1880
|
-
|
|
1881
|
-
### Fixed
|
|
1882
|
-
|
|
1883
|
-
- Fixed indent-string interoperability with older v1 and v2 versions
|
|
1884
|
-
|
|
1885
|
-
## [1.3.5] - 2025-10-01
|
|
1886
|
-
|
|
1887
|
-
### Added
|
|
1888
|
-
|
|
1889
|
-
- Added lib/git utilities module
|
|
1890
|
-
|
|
1891
|
-
### Fixed
|
|
1892
|
-
|
|
1893
|
-
- Fixed invalid manifest entries
|
|
1894
|
-
- Fixed parseArgs strip-aliased bug
|
|
1895
|
-
|
|
1896
|
-
## [1.3.4] - 2025-10-01
|
|
1897
|
-
|
|
1898
|
-
### Changed
|
|
1899
|
-
|
|
1900
|
-
- Updated various package override versions
|
|
1129
|
+
### Highlights
|
|
1901
1130
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
- Fixed normalizePath collapsing multiple leading `..` segments incorrectly
|
|
1907
|
-
|
|
1908
|
-
## [1.3.2] - 2025-10-01
|
|
1909
|
-
|
|
1910
|
-
### Added
|
|
1911
|
-
|
|
1912
|
-
- Added 'sfw' to isBlessedPackageName method check
|
|
1913
|
-
- Added ENV.DEBUG normalization for debug package compatibility
|
|
1914
|
-
- `DEBUG='1'` or `DEBUG='true'` automatically expands to `DEBUG='*'` (enables all namespaces)
|
|
1915
|
-
- `DEBUG='0'` or `DEBUG='false'` automatically converts to empty string (disables all output)
|
|
1916
|
-
- Namespace patterns like `DEBUG='app:*'` are preserved unchanged
|
|
1917
|
-
|
|
1918
|
-
## [1.3.1] - 2025-09-30
|
|
1919
|
-
|
|
1920
|
-
### Changed
|
|
1921
|
-
|
|
1922
|
-
- Renamed debug functions from *Complex to *Ns
|
|
1923
|
-
|
|
1924
|
-
### Fixed
|
|
1925
|
-
|
|
1926
|
-
- Fixed regression with lib/prompts module imports
|
|
1927
|
-
|
|
1928
|
-
## [1.3.0] - 2025-09-29
|
|
1929
|
-
|
|
1930
|
-
### Changed
|
|
1931
|
-
|
|
1932
|
-
- Updated registry subpath exports
|
|
1933
|
-
|
|
1934
|
-
### Fixed
|
|
1935
|
-
|
|
1936
|
-
- Fixed Node.js built-in module imports in CommonJS output
|
|
1937
|
-
|
|
1938
|
-
## [1.2.2] - 2025-09-29
|
|
1939
|
-
|
|
1940
|
-
### Changed
|
|
1941
|
-
|
|
1942
|
-
- Internal improvements to module structure
|
|
1943
|
-
|
|
1944
|
-
## [1.2.1] - 2025-09-29
|
|
1945
|
-
|
|
1946
|
-
### Changed
|
|
1131
|
+
- **1.5.x** (Oct 2025) — `isolatePackage` for isolated package test environments; v8 coverage utilities; `dependencies/index` barrel removed
|
|
1132
|
+
- **1.4.x** (Oct 2025) — Performance monitoring + memoization utilities; table formatting (`formatTable`, `formatSimpleTable`); spinner progress; `isDir`, `safeStats` async fs helpers
|
|
1133
|
+
- **1.3.x** (Sep–Oct 2025) — Initial constants restructure, build configuration, package exports
|
|
1947
1134
|
|
|
1948
|
-
|
|
1949
|
-
- Updated build configuration and package exports
|
|
1135
|
+
For full details, see git history under the `@socketsecurity/registry` package name.
|