Skip to content

Commit 8ba56e6

Browse files
committed
docs(changelog): document binary handling and bundle optimizations
Add comprehensive documentation for recent improvements: - Binary permission management (chmod 0o755 for all package binaries) - npm-compatible bin resolution via vendored getBinFromManifest - Enhanced findBinaryPath() with npm's resolution strategy - Minimized external module exports (fast-sort, fast-glob, del, streaming-iterables) - ~211 KB direct savings from fast-sort and streaming-iterables - ~1.1 MB savings by vendoring instead of bundling libnpmexec
1 parent 6123ea1 commit 8ba56e6

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ 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+
## [Unreleased]
9+
10+
### Added
11+
12+
- **DLX**: Binary permission management with chmod 0o755 for all package binaries
13+
- New `makePackageBinsExecutable()` function ensures all binaries in installed packages are executable
14+
- Aligns with npm's cmd-shim approach for binary permissions
15+
- Handles both single and multiple binary packages
16+
- No-op on Windows (permissions not needed)
17+
18+
- **DLX**: npm-compatible bin resolution via vendored `getBinFromManifest`
19+
- Cherry-picked `getBinFromManifest` from [email protected] (~1.5 KB)
20+
- Avoids 1.1 MB bundle by vendoring single function instead of full package
21+
- Provides battle-tested npm bin resolution strategy
22+
- Maintains user-friendly fallbacks for edge cases
23+
24+
### Changed
25+
26+
- **DLX**: Enhanced `findBinaryPath()` with npm's resolution strategy
27+
- Primary: npm's `getBinFromManifest` (handles standard cases and aliases)
28+
- Fallback: user-provided `binaryName` parameter
29+
- Fallback: last segment of package name
30+
- Last resort: first binary in list
31+
32+
### Performance
33+
34+
- **External modules**: Minimized exports to reduce bundle size
35+
- `fast-sort`: Now exports only `{ createNewSortInstance }` (2.1 KB, 96% reduction from ~56 KB)
36+
- `fast-glob`: Now exports only `{ globStream }` (82 KB bundle)
37+
- `del`: Now exports only `{ deleteAsync, deleteSync }` (100 KB bundle)
38+
- `streaming-iterables`: Now exports only `{ parallelMap, transform }` (11 KB, 93% reduction from ~168 KB)
39+
- Total direct savings: ~211 KB from fast-sort and streaming-iterables alone
40+
- Enables better tree-shaking for consumers
41+
- Establishes pattern for future external module additions
42+
843
## [3.2.1](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.1) - 2025-11-02
944

1045
### Changed

0 commit comments

Comments
 (0)