Skip to content

Commit 013b67c

Browse files
committed
chore(release): v5.26.0
1 parent 3f1a52f commit 013b67c

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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.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+
814
## [5.25.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.0) - 2026-04-26
915

1016
### 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": "5.25.0",
3+
"version": "5.26.0",
44
"packageManager": "pnpm@11.0.0-rc.5",
55
"license": "MIT",
66
"description": "Core utilities and infrastructure for Socket.dev security tools",

src/primordials.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,14 @@ export const StringPrototypeReplace = uncurryThis(
442442
String.prototype.replace as (
443443
this: string,
444444
searchValue: string | RegExp,
445-
replaceValue: string,
445+
replaceValue: string | ((substring: string, ...args: any[]) => string),
446446
) => string,
447447
)
448448
export const StringPrototypeReplaceAll = uncurryThis(
449449
String.prototype.replaceAll as (
450450
this: string,
451-
searchValue: string,
452-
replaceValue: string,
451+
searchValue: string | RegExp,
452+
replaceValue: string | ((substring: string, ...args: any[]) => string),
453453
) => string,
454454
)
455455
export const StringPrototypeSearch = uncurryThis(String.prototype.search)

0 commit comments

Comments
 (0)