@socketsecurity/lib 5.25.0 → 5.26.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 CHANGED
@@ -5,6 +5,12 @@ 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.26.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.26.0) - 2026-04-26
9
+
10
+ ### Fixed
11
+
12
+ - `@socketsecurity/lib/primordials` `StringPrototypeReplace` / `StringPrototypeReplaceAll` — `replaceValue` parameter now accepts the callback form (`(substring, ...args) => string`) in addition to a literal string, matching `String.prototype.replace`'s actual signature
13
+
8
14
  ## [5.25.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.0) - 2026-04-26
9
15
 
10
16
  ### Added
@@ -77,7 +77,7 @@ const SOCKET_FIREWALL_APP_NAME = "sfw";
77
77
  const SOCKET_REGISTRY_APP_NAME = "registry";
78
78
  const SOCKET_APP_PREFIX = "_";
79
79
  const SOCKET_LIB_NAME = "@socketsecurity/lib";
80
- const SOCKET_LIB_VERSION = "5.25.0";
80
+ const SOCKET_LIB_VERSION = "5.26.0";
81
81
  const SOCKET_LIB_URL = "https://github.com/SocketDev/socket-lib";
82
82
  const SOCKET_LIB_USER_AGENT = `socketsecurity-lib/${SOCKET_LIB_VERSION} (${SOCKET_LIB_URL})`;
83
83
  const SOCKET_IPC_HANDSHAKE = "SOCKET_IPC_HANDSHAKE";
@@ -300,8 +300,8 @@ export declare const StringPrototypeNormalize: (self: unknown, form?: string | u
300
300
  export declare const StringPrototypePadEnd: (self: unknown, maxLength: number, fillString?: string | undefined) => string;
301
301
  export declare const StringPrototypePadStart: (self: unknown, maxLength: number, fillString?: string | undefined) => string;
302
302
  export declare const StringPrototypeRepeat: (self: unknown, count: number) => string;
303
- export declare const StringPrototypeReplace: (self: string, searchValue: string | RegExp, replaceValue: string) => string;
304
- export declare const StringPrototypeReplaceAll: (self: string, searchValue: string, replaceValue: string) => string;
303
+ export declare const StringPrototypeReplace: (self: string, searchValue: string | RegExp, replaceValue: string | ((substring: string, ...args: any[]) => string)) => string;
304
+ export declare const StringPrototypeReplaceAll: (self: string, searchValue: string | RegExp, replaceValue: string | ((substring: string, ...args: any[]) => string)) => string;
305
305
  export declare const StringPrototypeSearch: (self: unknown, searcher: {
306
306
  [Symbol.search](string: string): number;
307
307
  }) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/lib",
3
- "version": "5.25.0",
3
+ "version": "5.26.0",
4
4
  "packageManager": "pnpm@11.0.0-rc.5",
5
5
  "license": "MIT",
6
6
  "description": "Core utilities and infrastructure for Socket.dev security tools",
@@ -727,7 +727,7 @@
727
727
  "@socketregistry/is-unicode-supported": "1.0.5",
728
728
  "@socketregistry/packageurl-js": "1.4.2",
729
729
  "@socketregistry/yocto-spinner": "1.0.25",
730
- "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.24.0",
730
+ "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.25.0",
731
731
  "@types/node": "24.9.2",
732
732
  "@typescript/native-preview": "7.0.0-dev.20260415.1",
733
733
  "@vitest/coverage-v8": "4.0.3",