Skip to content

Commit a6e62dc

Browse files
committed
chore(release): 5.19.0
1 parent 1a1dbfb commit a6e62dc

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,49 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.19.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.19.0) - 2026-04-19
9+
10+
### Added — dlx/integrity (new module)
11+
12+
- `HashSpec`, `NormalizedHash`, `ComputedHashes` types. `HashSpec` accepts a bare string (sha512 SRI or sha256 hex, sniffed) or an explicit `{ type, value }` object
13+
- `normalizeHash()`, `computeHashes()`, `verifyHash()``verifyHash` uses `crypto.timingSafeEqual` for constant-time comparison
14+
- `DlxHashMismatchError` — carries `expected` + `actual` for diagnostics
15+
16+
### Added — dlx/arborist (new module)
17+
18+
- `safeIdealTree()`, `safeReify()` — hardened `@npmcli/arborist` wrappers mirroring socket-cli v1.1.79 `SafeArborist` overrides (`audit: false`, `fund: false`, `ignoreScripts: true`, `progress: false`, `saveBundle: false`, `silent: true`)
19+
- `writeSafeNpmrc()` — defense-in-depth `.npmrc` writer matching the Arborist overrides
20+
- Optional `before?: Date` on `safeIdealTree` for release-age enforcement during resolution
21+
22+
### Added — dlx/lockfile (new module)
23+
24+
- `generatePackagePin({ package, minReleaseDays?, minReleaseMins? })` — returns `PinDetails { name, version, hash: ComputedHashes, packageJson, lockfile }`. Runs Arborist in `packageLockOnly: true` mode against a tmp directory and auto-cleans
25+
- **Default `minReleaseDays: 7`** — resolution refuses to select versions published in the last week. Pass `0` to disable. `minReleaseMins` is a pnpm-style alias (mutually exclusive with `minReleaseDays`)
26+
- `LockfileSpec` type — export for use as the new `lockfile` option on `downloadPackage`
27+
28+
### Added — dlx existing modules
29+
30+
- `DlxPackageOptions.hash?: HashSpec` and `DlxPackageOptions.lockfile?: LockfileSpec` — passing a lockfile materializes it into the install dir (path → `fs.copyFileSync`, content → `fs.writeFileSync`) and drops a hardened `.npmrc` alongside before Arborist runs
31+
- `DlxBinaryOptions.hash?: HashSpec` — ergonomic alternative to the lower-level `integrity` and `sha256` fields (both still accepted)
32+
33+
### Fixed — external
34+
35+
- `pacote` shim now exposes `tarball`, `manifest`, `packument` alongside `extract`. **Fixes a latent runtime crash** in `src/packages/manifest.ts` callers (`fetchPackageManifest` / `fetchPackagePackument` called `.manifest(...)` / `.packument(...)` on a shim that previously only had `extract`, raising `TypeError: not a function`)
36+
37+
### Changed — build (bundle size)
38+
39+
- `dist/external/npm-pack.js`: 2,526,598 → 1,755,460 bytes (−771 KB, −30.5%). New `STUB_MAP` entries for code paths our callers never reach:
40+
- `@sigstore/{bundle,core,protobuf-specs,sign,tuf,verify}`, `sigstore`, `tuf-js`, `@tufjs/{canonical-json,models}` — Sigstore attestation, only reached via `arb.audit()`
41+
- `@npmcli/metavuln-calculator` — audit-only
42+
- `@npmcli/query`, `postcss-selector-parser``arb.query()` unused
43+
- `@npmcli/run-script`, `@npmcli/node-gyp` — guarded out by `ignoreScripts: true`
44+
- `@npmcli/git`, `pacote/lib/{git,file,dir,remote}.js` — registry specs only
45+
- arborist `audit-report.js`, `yarn-lock.js`, `isolated-reifier.js`, `query-selector-all.js`, `printable.js` — each gated or unused
46+
- `cacache/lib/verify.js``cacache.verify` (npm cache verify) unused
47+
- `proggy` — progress tracker, gated by `progress: false`
48+
- `debug/src/browser.js` — Node-only bundle
49+
- `dist/external/zod.js`: 597,238 → 291,430 bytes (−306 KB, −51.2%). Stubbed `zod/v4/{core,classic,mini}`'s eager `locales/index.cjs` barrel (40+ translation modules). Opt-in via `z.config(z.locales.xx())` is never called by us
50+
851
## [5.18.2](https://github.com/SocketDev/socket-lib/releases/tag/v5.18.2) - 2026-04-14
952

1053
### Removed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketsecurity/lib",
3-
"version": "5.18.2",
3+
"version": "5.19.0",
44
"packageManager": "pnpm@11.0.0-rc.2",
55
"license": "MIT",
66
"description": "Core utilities and infrastructure for Socket.dev security tools",

0 commit comments

Comments
 (0)