Skip to content

Commit 7c2aa7d

Browse files
committed
chore(release): bump version to 4.4.0
Release version 4.4.0 with fs encoding improvements and suppress-warnings fix.
1 parent ff6cfd5 commit 7c2aa7d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ 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+
## [4.4.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.4.0) - 2025-11-25
9+
10+
### Added
11+
12+
- **fs**: Exported `normalizeEncoding()` function for robust encoding string normalization
13+
- Handles case-insensitive encoding names (e.g., 'UTF-8', 'utf8', 'UTF8')
14+
- Supports encoding aliases (e.g., 'binary' → 'latin1', 'ucs-2' → 'utf16le')
15+
- Fast-path optimization for common encodings
16+
- Defaults to 'utf8' for invalid or null encodings
17+
- Export: `@socketsecurity/lib/fs`
18+
19+
### Fixed
20+
21+
- **fs**: `safeReadFile()` and `safeReadFileSync()` type signatures and encoding handling
22+
- Corrected type overloads: `encoding: null``Buffer | undefined`, no encoding → `string | undefined` (UTF-8 default)
23+
- Fixed implementation to properly handle `encoding: null` for Buffer returns
24+
25+
- **suppress-warnings**: `withSuppressedWarnings()` now properly restores warning state
26+
- Fixed state restoration to only remove warning types that were added by the function
27+
- Prevents accidental removal of warnings that were already suppressed
28+
- Ensures correct cleanup behavior when warning types are nested or reused
29+
830
## [4.3.0](https://github.com/SocketDev/socket-lib/releases/tag/v4.3.0) - 2025-11-20
931

1032
### Added

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": "4.3.0",
3+
"version": "4.4.0",
44
"packageManager": "pnpm@10.22.0",
55
"license": "MIT",
66
"description": "Core utilities and infrastructure for Socket.dev security tools",

0 commit comments

Comments
 (0)