diff --git a/package.json b/package.json index ce6d0babf..3eef8e1a7 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,6 @@ "escape-string-regexp": "5.0.0", "espree": "11.2.0", "fast-glob": "3.3.3", - "fast-json-stable-stringify": "2.1.0", "file-entry-cache": "11.1.5", "find-cache-directory": "6.0.0", "flow-parser": "0.331.0", @@ -89,6 +88,7 @@ "index-to-position": "1.2.0", "is-es5-identifier-name": "1.1.0", "jest-docblock": "30.5.0", + "json-stringify-stable-replacer": "0.0.1", "leven": "4.1.0", "linguist-languages": "9.5.0", "mdast-util-from-markdown": "2.0.3", diff --git a/src/cli/file-info.js b/src/cli/file-info.js index ead85ffe5..d772047e9 100644 --- a/src/cli/file-info.js +++ b/src/cli/file-info.js @@ -1,5 +1,5 @@ import path from "node:path"; -import stringify from "fast-json-stable-stringify"; +import { stringify } from "json-stringify-stable-replacer"; import { format, getFileInfo } from "../index.js"; import { printToScreen } from "./utilities.js"; diff --git a/src/cli/format-results-cache.js b/src/cli/format-results-cache.js index 9dfcaf72e..7fb3cd12d 100644 --- a/src/cli/format-results-cache.js +++ b/src/cli/format-results-cache.js @@ -2,8 +2,8 @@ // https://github.com/eslint/eslint/blob/c2d0a830754b6099a3325e6d3348c3ba983a677a/lib/cli-engine/lint-result-cache.js import fs from "node:fs"; -import stringify from "fast-json-stable-stringify"; import fileEntryCache from "file-entry-cache"; +import { stringify } from "json-stringify-stable-replacer"; import { version as prettierVersion } from "../index.js"; import { createHash, getOrInsertComputed } from "./utilities.js"; diff --git a/src/cli/print-support-info.js b/src/cli/print-support-info.js index fc46bae0b..79140a184 100644 --- a/src/cli/print-support-info.js +++ b/src/cli/print-support-info.js @@ -1,4 +1,4 @@ -import stringify from "fast-json-stable-stringify"; +import { stringify } from "json-stringify-stable-replacer"; import { format, getSupportInfo } from "../index.js"; import { omit, printToScreen } from "./utilities.js"; diff --git a/yarn.lock b/yarn.lock index cd74312bb..cbdfb3e78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5037,7 +5037,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:2.1.0, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e @@ -6605,6 +6605,13 @@ __metadata: languageName: node linkType: hard +"json-stringify-stable-replacer@npm:0.0.1": + version: 0.0.1 + resolution: "json-stringify-stable-replacer@npm:0.0.1" + checksum: 10/c0b081f604e33b4ecc0ea56227ee3217bcaa193f36889c8d904df2cfc658d27719ed9b2b30173c9f4587bd128784fbddda29cee98fa2980a182bfb66b86b212c + languageName: node + linkType: hard + "json-test-suite@npm:1.0.0": version: 1.0.0 resolution: "json-test-suite@npm:1.0.0" @@ -8325,7 +8332,6 @@ __metadata: esm-utils: "npm:4.4.2" espree: "npm:11.2.0" fast-glob: "npm:3.3.3" - fast-json-stable-stringify: "npm:2.1.0" file-entry-cache: "npm:11.1.5" find-cache-directory: "npm:6.0.0" flow-estree: "npm:0.331.0" @@ -8351,6 +8357,7 @@ __metadata: jest-snapshot-serializer-raw: "npm:2.0.0" jest-watch-typeahead: "npm:3.0.1" jsesc: "npm:3.1.0" + json-stringify-stable-replacer: "npm:0.0.1" json-test-suite: "npm:1.0.0" jsx-test-suite: "npm:0.0.2" knip: "npm:6.33.0"