diff --git a/package.json b/package.json index 32d7d503b..db76f2c95 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "remark-math": "3.0.1", "remark-parse": "8.0.3", "search-closest": "3.1.0", - "smol-toml": "1.8.0", + "smol-toml": "1.9.0", "strip-ansi": "7.2.0", "to-fast-properties": "4.0.0", "trim-newlines": "5.0.0", diff --git a/tests/unit/config-loader.js b/tests/unit/config-loader.js index 24f859ec4..2995564b4 100644 --- a/tests/unit/config-loader.js +++ b/tests/unit/config-loader.js @@ -24,7 +24,14 @@ describe("Support BOM", () => { const file = path.join(directory, filename); await fs.writeFile(file, `\ufeff${content}`); const config = await loadConfig(file); - expect(config).toStrictEqual(expected); + + // `smol-toml` uses a `null` prototype object + if (filename.endsWith(".toml")) { + // eslint-disable-next-line jest/prefer-strict-equal + expect(config).toEqual(expected); + } else { + expect(config).toStrictEqual(expected); + } }); } }); diff --git a/tests/unit/invalid-config.js b/tests/unit/invalid-config.js index 11e4253be..1b6b5e352 100644 --- a/tests/unit/invalid-config.js +++ b/tests/unit/invalid-config.js @@ -71,7 +71,7 @@ Cause: Expected property name or '}' in JSON at position 1 (line 1 column 2)" loadConfigFile({ filename: ".prettierrc.toml", content: "a=\n b!=" }), ).rejects.toThrowErrorMatchingInlineSnapshot(` "TOML Error in "