summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_util/std_testing_diff.ts
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-09-06 19:52:59 +0900
committerGitHub <noreply@github.com>2024-09-06 12:52:59 +0200
commitf0a3d206422af3177e0f36ed22802c1ccc6f7654 (patch)
tree57ad718cc47b7b98c0bbd869d6c070adee3bf30a /ext/node/polyfills/_util/std_testing_diff.ts
parent8ef08f1d294dbe7e3771202084ecbede73ca28aa (diff)
fix(runtime): use more null proto objects again (#25040)
proceed with #23921 This PR is a preparation for https://github.com/denoland/deno_lint/pull/1307 --------- Signed-off-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/node/polyfills/_util/std_testing_diff.ts')
-rw-r--r--ext/node/polyfills/_util/std_testing_diff.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/node/polyfills/_util/std_testing_diff.ts b/ext/node/polyfills/_util/std_testing_diff.ts
index 74e396b0c..5155fd242 100644
--- a/ext/node/polyfills/_util/std_testing_diff.ts
+++ b/ext/node/polyfills/_util/std_testing_diff.ts
@@ -325,7 +325,10 @@ export function diffstr(A: string, B: string) {
);
}
- function tokenize(string: string, { wordDiff = false } = {}): string[] {
+ function tokenize(
+ string: string,
+ { wordDiff = false } = { __proto__: null },
+ ): string[] {
if (wordDiff) {
// Split string on whitespace symbols
const tokens = StringPrototypeSplit(string, WHITESPACE_SYMBOL_PATTERN);
@@ -450,7 +453,7 @@ export function diffstr(A: string, B: string) {
*/
function createColor(
diffType: DiffType,
- { background = false } = {},
+ { background = false } = { __proto__: null },
): (s: string) => string {
// TODO(@littledivy): Remove this when we can detect
// true color terminals.
@@ -484,7 +487,7 @@ function createSign(diffType: DiffType): string {
export function buildMessage(
diffResult: ReadonlyArray<DiffResult<string>>,
- { stringDiff = false } = {},
+ { stringDiff = false } = { __proto__: null },
): string[] {
const messages: string[] = [], diffMessages: string[] = [];
ArrayPrototypePush(messages, "");