@@ -5,6 +5,73 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 5.0.0] ( https://github.com/SocketDev/socket-lib/releases/tag/v5.0.0 ) - 2025-12-04
9+
10+ ### Added
11+
12+ - ** json/edit** : New ` EditableJson ` base class for generic JSON file manipulation with formatting preservation
13+ - Extracted from ` EditablePackageJson ` to enable code reuse via composition pattern
14+ - Supports reading, modifying, and writing JSON files while preserving formatting
15+ - Export: ` @socketsecurity/lib/json/edit `
16+
17+ - ** json/format** : New JSON formatting utilities for consistent JSON manipulation
18+ - Functions for analyzing and preserving JSON formatting patterns
19+ - Export: ` @socketsecurity/lib/json/format `
20+
21+ - ** json/parse** : New JSON parsing utilities
22+ - ` isJsonPrimitive() ` : Check if value is a JSON primitive type
23+ - ` jsonParse() ` : Parse JSON with error handling
24+ - Export: ` @socketsecurity/lib/json/parse `
25+
26+ - ** json/types** : New JSON type definitions and interfaces
27+ - Export: ` @socketsecurity/lib/json/types `
28+
29+ - ** dlx/cache** : New DLX cache utilities
30+ - ` generateCacheKey() ` : Generate cache keys for DLX packages
31+ - Export: ` @socketsecurity/lib/dlx/cache `
32+
33+ - ** dlx/dir** : New DLX directory management utilities
34+ - ` clearDlx() ` , ` clearDlxSync() ` : Clear DLX directory
35+ - ` dlxDirExists() ` , ` dlxDirExistsAsync() ` : Check if DLX directory exists
36+ - ` ensureDlxDir() ` , ` ensureDlxDirSync() ` : Ensure DLX directory exists
37+ - Export: ` @socketsecurity/lib/dlx/dir `
38+
39+ - ** dlx/packages** : New DLX package management utilities
40+ - ` isDlxPackageInstalled() ` , ` isDlxPackageInstalledAsync() ` : Check if package is installed
41+ - ` listDlxPackages() ` , ` listDlxPackagesAsync() ` : List installed packages
42+ - ` removeDlxPackage() ` , ` removeDlxPackageSync() ` : Remove installed packages
43+ - Export: ` @socketsecurity/lib/dlx/packages `
44+
45+ - ** dlx/paths** : New DLX path utilities
46+ - ` getDlxPackageDir() ` : Get package directory path
47+ - ` getDlxInstalledPackageDir() ` : Get installed package directory path
48+ - ` getDlxPackageJsonPath() ` : Get package.json path
49+ - ` getDlxPackageNodeModulesDir() ` : Get node_modules directory path
50+ - ` isInSocketDlx() ` : Check if path is in DLX directory
51+ - Export: ` @socketsecurity/lib/dlx/paths `
52+
53+ ### Changed
54+
55+ - ** BREAKING** : Reorganized module paths for better structure and discoverability
56+ - ` @socketsecurity/lib/json/editable ` → ` @socketsecurity/lib/json/edit `
57+ - ` @socketsecurity/lib/packages/editable ` → ` @socketsecurity/lib/packages/edit `
58+ - ` @socketsecurity/lib/maintained-node-versions ` → ` @socketsecurity/lib/constants/maintained-node-versions `
59+ - ` @socketsecurity/lib/package-default-node-range ` → ` @socketsecurity/lib/constants/package-default-node-range `
60+ - ` @socketsecurity/lib/package-default-socket-categories ` → ` @socketsecurity/lib/constants/package-default-socket-categories `
61+ - ` @socketsecurity/lib/lifecycle-script-names ` → ` @socketsecurity/lib/constants/lifecycle-script-names `
62+ - ` @socketsecurity/lib/dlx ` → Split into ` @socketsecurity/lib/dlx/cache ` , ` @socketsecurity/lib/dlx/dir ` , ` @socketsecurity/lib/dlx/packages ` , ` @socketsecurity/lib/dlx/paths `
63+ - ` @socketsecurity/lib/dlx-binary ` → ` @socketsecurity/lib/dlx/binary `
64+ - ` @socketsecurity/lib/dlx-manifest ` → ` @socketsecurity/lib/dlx/manifest `
65+ - ` @socketsecurity/lib/dlx-package ` → ` @socketsecurity/lib/dlx/package `
66+
67+ - ** json** : Reorganized JSON utilities into modular submodules (json/edit, json/format, json/parse, json/types)
68+ - Removed barrel index file in favor of direct submodule imports
69+ - Better separation of concerns and tree-shaking
70+
71+ - ** dlx** : Split monolithic DLX module into focused submodules (cache, dir, packages, paths)
72+ - Improved modularity and maintainability
73+ - Better code organization and discoverability
74+
875## [ 4.4.0] ( https://github.com/SocketDev/socket-lib/releases/tag/v4.4.0 ) - 2025-11-25
976
1077### Added
0 commit comments