From e3ef0534005719bb59b1a592174b9a9d539f1671 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:09:09 +0200 Subject: [PATCH] chore: bump module replacements to 2.2.0 (#27) --- package-lock.json | 6 +++--- src/test/rules/ban-dependencies_test.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index f7e5772..a622475 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1667,9 +1667,9 @@ } }, "node_modules/module-replacements": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/module-replacements/-/module-replacements-2.1.0.tgz", - "integrity": "sha512-VxAzVvH5N2ftz+eUrZyy/omcezhSq7pWp8c1mi6fDWfJ1Vm0w05ZioGxdVicXvMG5ZINfPDPuH+NwF60KdGdXQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/module-replacements/-/module-replacements-2.2.0.tgz", + "integrity": "sha512-l+AhjmMWyQL/SYZCt6lKusf0ssJKqdoAg58RhSkmZNBwAzQkBLwFTnzT/dwwkd7HnOwLhf40MTuKKxCAJ+qIPQ==", "license": "MIT" }, "node_modules/ms": { diff --git a/src/test/rules/ban-dependencies_test.ts b/src/test/rules/ban-dependencies_test.ts index f1ad931..39ef298 100644 --- a/src/test/rules/ban-dependencies_test.ts +++ b/src/test/rules/ban-dependencies_test.ts @@ -102,7 +102,7 @@ ruleTester.run('ban-dependencies', rule, { messageId: 'simpleReplacement', data: { name: 'is-number', - replacement: `Use typeof v === "number"` + replacement: `Use typeof v === "number" || (typeof v === "string" && Number.isFinite(+v))` } } ] @@ -116,7 +116,7 @@ ruleTester.run('ban-dependencies', rule, { messageId: 'simpleReplacement', data: { name: 'is-number', - replacement: `Use typeof v === "number"` + replacement: `Use typeof v === "number" || (typeof v === "string" && Number.isFinite(+v))` } } ] @@ -130,7 +130,7 @@ ruleTester.run('ban-dependencies', rule, { messageId: 'simpleReplacement', data: { name: 'is-number', - replacement: `Use typeof v === "number"` + replacement: `Use typeof v === "number" || (typeof v === "string" && Number.isFinite(+v))` } } ] @@ -145,7 +145,7 @@ ruleTester.run('ban-dependencies', rule, { messageId: 'simpleReplacement', data: { name: 'is-number', - replacement: `Use typeof v === "number"` + replacement: `Use typeof v === "number" || (typeof v === "string" && Number.isFinite(+v))` } } ]