Skip to content

Commit b737a86

Browse files
authored
Added support for toml configuration files
1 parent ada6549 commit b737a86

3 files changed

Lines changed: 20 additions & 14 deletions

File tree

package-lock.json

Lines changed: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"prettier": "^3.1.0 || ^4.0.0-alpha"
3636
},
3737
"dependencies": {
38-
"@iarna/toml": "^2.2.5",
3938
"atomically": "^2.0.3",
4039
"fast-ignore": "^1.1.3",
4140
"find-up-json": "^2.0.4",
@@ -49,6 +48,7 @@
4948
"lomemo": "^1.0.0",
5049
"pioppo": "^1.2.0",
5150
"promise-resolve-timeout": "^2.0.0",
51+
"smol-toml": "^1.3.1",
5252
"specialist": "^1.4.5",
5353
"tiny-editorconfig": "^1.0.0",
5454
"tiny-jsonc": "^1.0.1",

src/config_prettier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const Loaders = {
5151
},
5252
toml: async (filePath: string): Promise<unknown> => {
5353
const fileContent = fs.readFileSync(filePath, "utf8");
54-
const TOML = (await import("@iarna/toml")).default;
55-
return TOML.parse(fileContent);
54+
const toml = await import("smol-toml");
55+
return toml.parse(fileContent);
5656
},
5757
yaml: async (filePath: string): Promise<unknown> => {
5858
const yaml = (await import("js-yaml")).default;

0 commit comments

Comments
 (0)