diff --git a/package-lock.json b/package-lock.json index a062a49a925..78e771eea63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,6 +99,7 @@ "jest-fail-on-console": "^3.3.1", "lint-staged": "^15.4.3", "mjml-browser": "^4.15.3", + "patch-package": "^8.0.0", "prettier": "3.5.0", "sass": "^1.84.0", "storybook": "^8.4.6", @@ -12355,6 +12356,12 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -12891,6 +12898,15 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -16654,6 +16670,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -20307,6 +20332,25 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "node_modules/json-stable-stringify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz", + "integrity": "sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -20337,6 +20381,15 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -20495,6 +20548,15 @@ "node": ">=0.10.0" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -22825,6 +22887,138 @@ "tslib": "^2.0.3" } }, + "node_modules/patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "dev": true, + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/patch-package/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/patch-package/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", diff --git a/package.json b/package.json index 4bc553a83c3..3bc384e0155 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "cron:report-lighthouse-results": "node dist/scripts/cronjobs/reportLighthouseResults.js", "db:migrate": "node -r dotenv-flow/config node_modules/knex/bin/cli.js migrate:latest --knexfile src/db/knexfile.js", "db:rollback": "node -r dotenv-flow/config node_modules/knex/bin/cli.js migrate:rollback --knexfile src/db/knexfile.js", - "prepare": "husky", "storybook": "storybook dev -p 6006", "build-storybook": "npm run build-glean && npm run build-nimbus && storybook build", "create-location-data": "node src/scripts/build/uploadAutoCompleteLocations.js", @@ -59,7 +58,9 @@ "build-glean-backend-docs": "glean translate src/telemetry/backend-metrics.yaml --format markdown --output docs/telemetry/backend", "loadtest:hbibp-webhook": "echo 'Ensure k6 is installed; see:\n\thttps://grafana.com/docs/k6/latest/set-up/install-k6/\n' && k6 run src/scripts/loadtest/hibp.js", "validate-nimbus": "sh src/scripts/build/validate-nimbus-file.sh", - "lighthouse": "lhci autorun" + "lighthouse": "lhci autorun", + "prepare": "husky", + "postinstall": "patch-package" }, "repository": { "type": "git", @@ -162,6 +163,7 @@ "jest-fail-on-console": "^3.3.1", "lint-staged": "^15.4.3", "mjml-browser": "^4.15.3", + "patch-package": "^8.0.0", "prettier": "3.5.0", "sass": "^1.84.0", "storybook": "^8.4.6", diff --git a/patches/collect-v8-coverage+1.0.2.patch b/patches/collect-v8-coverage+1.0.2.patch new file mode 100644 index 00000000000..60f92c507dd --- /dev/null +++ b/patches/collect-v8-coverage+1.0.2.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/collect-v8-coverage/index.js b/node_modules/collect-v8-coverage/index.js +index 08b7853..db9ea66 100644 +--- a/node_modules/collect-v8-coverage/index.js ++++ b/node_modules/collect-v8-coverage/index.js +@@ -13,6 +13,8 @@ class CoverageInstrumenter { + async startInstrumenting() { + this.session.connect(); + ++ await this.postSession('Debugger.enable'); ++ + await this.postSession('Profiler.enable'); + + await this.postSession('Profiler.startPreciseCoverage', { +@@ -30,6 +32,8 @@ class CoverageInstrumenter { + + await this.postSession('Profiler.disable'); + ++ await this.postSession('Debugger.disable'); ++ + // When using networked filesystems on Windows, v8 sometimes returns URLs + // of the form file://///path. These URLs are not well understood + // by NodeJS (see https://github.com/nodejs/node/issues/48530). diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/filterExposures.ts b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/filterExposures.ts index 03edc1e670d..3b4c69cd5fc 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/filterExposures.ts +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/filterExposures.ts @@ -14,9 +14,6 @@ export function filterExposures( filters: FilterState, ): Exposure[] { return exposures.filter((exposure) => { - /* c8 ignore start */ - // Since the Node 20.10 upgrade, it's been marking this as uncovered, even - // though it's covered by tests. if (filters.exposureType === "data-breach" && isScanResult(exposure)) { return false; } @@ -46,7 +43,6 @@ export function filterExposures( ) { return false; } - /* c8 ignore stop */ return true; }); diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/FixView.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/FixView.tsx index 846a54898b4..a29aa882ac1 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/FixView.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/FixView.tsx @@ -76,13 +76,7 @@ export const FixView = (props: FixViewProps) => { {props.showConfetti && }
{!props.hideProgressIndicator && ( diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContainer.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContainer.tsx index 7ddd3930004..66c281970fb 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContainer.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContainer.tsx @@ -32,9 +32,6 @@ type ResolutionContainerProps = { export const ResolutionContainer = (props: ResolutionContainerProps) => { const l10n = useL10n(); const estimatedTimeString = - /* c8 ignore next 8 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. props.type === "leakedPasswords" ? "leaked-passwords-estimated-time" : "high-risk-breach-estimated-time"; diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContent.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContent.tsx index d2425d93478..d5dfed1ccbd 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContent.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/ResolutionContent.tsx @@ -28,9 +28,6 @@ export const ResolutionContent = ({ }); const listOfBreaches = - /* c8 ignore next 4 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. exposedData && exposedData.map(({ id, title, breachDate }) => (
  • diff --git a/src/app/components/client/Button.tsx b/src/app/components/client/Button.tsx index 6ac698b3a92..ebc6fcbed5a 100644 --- a/src/app/components/client/Button.tsx +++ b/src/app/components/client/Button.tsx @@ -69,9 +69,6 @@ export const Button = (props: ButtonProps) => { // If `props.isLoading` is not undefined, the contents of the link is going to // change into a loading indicator, which needs to be read by a screen reader: const ariaLiveValue: AriaAttributes["aria-live"] = - /* c8 ignore next 3 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. typeof isLoading === "boolean" ? "polite" : undefined; return typeof href === "string" ? ( @@ -83,12 +80,7 @@ export const Button = (props: ButtonProps) => { target={target} className={classes} > - { - /* c8 ignore next 3 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. - isLoading ? : children - } + {isLoading ? : children} ) : ( - ) : /* c8 ignore next */ - null; + ) : null; return (
    ; } diff --git a/src/app/components/client/toolbar/UserMenu.tsx b/src/app/components/client/toolbar/UserMenu.tsx index beea5362dbc..b690faa4006 100644 --- a/src/app/components/client/toolbar/UserMenu.tsx +++ b/src/app/components/client/toolbar/UserMenu.tsx @@ -61,9 +61,6 @@ export const UserMenu = (props: UserMenuProps) => { signout: "signout", }; - /* c8 ignore next 21 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. const handleOnAction = (menuItemKey: Key) => { switch (menuItemKey) { case itemKeys.fxa: diff --git a/src/app/functions/server/dashboard.ts b/src/app/functions/server/dashboard.ts index 51f94cf2e6d..d34dfac306e 100644 --- a/src/app/functions/server/dashboard.ts +++ b/src/app/functions/server/dashboard.ts @@ -379,9 +379,6 @@ export function getDashboardSummary( } } - /* c8 ignore next 11 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. if (dataClasses.includes(BreachDataTypes.BankAccount)) { summary.totalDataPointsNum += increment; summary.dataBreachTotalDataPointsNum += increment; @@ -481,9 +478,6 @@ function sanitizeDataPoints( } export function getDataPointReduction(summary: DashboardSummary): number { - // The `if` statement is totally covered by unit tests, but for some reason, - // since the upgrade to Node 20.10, it doesn't get marked as covered anymore: - /* c8 ignore next */ if (summary.totalDataPointsNum <= 0) return 100; return Math.round( (summary.dataBrokerTotalDataPointsNum / summary.totalDataPointsNum) * 100, diff --git a/src/app/functions/server/getRelevantGuidedSteps.ts b/src/app/functions/server/getRelevantGuidedSteps.ts index fa04851b6da..d63891f3d2f 100644 --- a/src/app/functions/server/getRelevantGuidedSteps.ts +++ b/src/app/functions/server/getRelevantGuidedSteps.ts @@ -227,16 +227,10 @@ export function hasCompletedStepSection( ) { return hasCompletedStep(data, "DataBrokerManualRemoval"); } - /* c8 ignore next 5 */ - // I believe this *is* covered by unit tests, but for some reason, - // since the upgrade to Node 20.10, it doesn't get marked as covered anymore: if (section === "Scan") { return hasCompletedStep(data, "Scan"); } if (section === "HighRisk") { - /* c8 ignore next 7 */ - // I believe this *is* covered by unit tests, but for some reason, - // since the upgrade to Node 20.10, it doesn't get marked as covered anymore: return ( hasCompletedStep(data, "HighRiskSsn") && hasCompletedStep(data, "HighRiskCreditCard") && diff --git a/src/app/functions/universal/guidedExperienceBreaches.ts b/src/app/functions/universal/guidedExperienceBreaches.ts index 8e47dc68615..f37f9a63743 100644 --- a/src/app/functions/universal/guidedExperienceBreaches.ts +++ b/src/app/functions/universal/guidedExperienceBreaches.ts @@ -44,30 +44,18 @@ export function getGuidedExperienceBreaches( subscriberBreaches.forEach((breach) => { // high risks - // This does get covered by unit tests, but for some reason, since the - // upgrade to Node 20.10, it doesn't get marked as covered anymore: - /* c8 ignore next 3 */ if (isUnresolvedDataBreachClass(breach, BreachDataTypes.SSN)) { guidedExperienceBreaches.highRisk.ssnBreaches.push(breach); } - // This does get covered by unit tests, but for some reason, since the - // upgrade to Node 20.10, it doesn't get marked as covered anymore: - /* c8 ignore next 3 */ if (isUnresolvedDataBreachClass(breach, BreachDataTypes.CreditCard)) { guidedExperienceBreaches.highRisk.creditCardBreaches.push(breach); } - // This does get covered by unit tests, but for some reason, since the - // upgrade to Node 20.10, it doesn't get marked as covered anymore: - /* c8 ignore next 3 */ if (isUnresolvedDataBreachClass(breach, BreachDataTypes.PIN)) { guidedExperienceBreaches.highRisk.pinBreaches.push(breach); } - // This does get covered by unit tests, but for some reason, since the - // upgrade to Node 20.10, it doesn't get marked as covered anymore: - /* c8 ignore next 3 */ if (isUnresolvedDataBreachClass(breach, BreachDataTypes.BankAccount)) { guidedExperienceBreaches.highRisk.bankBreaches.push(breach); } diff --git a/src/app/hooks/useLocalDismissal.ts b/src/app/hooks/useLocalDismissal.ts index bf000ce4b9b..331f3a896e4 100644 --- a/src/app/hooks/useLocalDismissal.ts +++ b/src/app/hooks/useLocalDismissal.ts @@ -45,19 +45,12 @@ export function useLocalDismissal( const dismiss = (dismissOptions?: DismissOptions) => { const maxAgeInSeconds = - /* c8 ignore next 6 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this - // (and this comment) as uncovered, even though I think it's covered by - // tests. typeof options.duration === "number" ? options.duration : COOKIE_DISMISSAL_MAX_AGE_IN_SECONDS; setCookie(cookieId, Date.now().toString(), { maxAge: maxAgeInSeconds, }); - /* c8 ignore next 5 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. if (dismissOptions?.soft !== true) { setIsDismissed(true); } @@ -71,9 +64,6 @@ export function useLocalDismissal( function hasDismissedCookie(cookieValue?: string, duration?: number): boolean { const dismissalTimeStamp = - /* c8 ignore next 4 */ - // Since the Node 20.10 upgrade, it's been intermittently marking this (and - // this comment) as uncovered, even though I think it's covered by tests. typeof cookieValue === "string" ? Number.parseInt(cookieValue, 10) : // Unfortunately react-cookie seems to implicitly parse the cookie value