🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@prettier/cli

Package Overview
Dependencies
Maintainers
14
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prettier/cli - npm Package Compare versions

Comparing version
0.7.6
to
0.8.0
+0
-1
dist/config_prettier.d.ts

@@ -6,3 +6,2 @@ import type { PrettierConfig, PrettierConfigWithOverrides, PromiseMaybe } from "./types.js";

json: (filePath: string) => Promise<unknown>;
jsonc: (filePath: string) => Promise<unknown>;
json5: (filePath: string) => Promise<unknown>;

@@ -9,0 +8,0 @@ package: (filePath: string) => Promise<unknown>;

import fs from "node:fs";
import path from "node:path";
import url from "node:url";
import JSONC from "tiny-jsonc";
import zeptomatch from "zeptomatch";

@@ -25,7 +24,2 @@ import Known from "./known.js";

},
jsonc: async (filePath) => {
const fileContent = fs.readFileSync(filePath, "utf8");
const config = JSONC.parse(fileContent);
return config;
},
json5: async (filePath) => {

@@ -74,3 +68,2 @@ const fileContent = fs.readFileSync(filePath, "utf8");

".prettierrc.json": Loaders.json,
".prettierrc.jsonc": Loaders.jsonc,
".prettierrc.json5": Loaders.json5,

@@ -90,3 +83,2 @@ ".prettierrc.toml": Loaders.toml,

json: Loaders.json,
jsonc: Loaders.jsonc,
json5: Loaders.json5,

@@ -93,0 +85,0 @@ toml: Loaders.toml,

+1
-0

@@ -21,2 +21,3 @@ import { createRequire } from "node:module";

"json5",
"jsonc",
"json-stringify",

@@ -23,0 +24,0 @@ "graphql",

@@ -21,3 +21,3 @@ type Bin = ReturnType<typeof import("tiny-bin").default>;

objectWrap?: "preserve" | "collapse";
parser?: "flow" | "babel" | "babel-flow" | "babel-ts" | "typescript" | "acorn" | "espree" | "meriyah" | "css" | "less" | "scss" | "json" | "json5" | "json-stringify" | "graphql" | "markdown" | "mdx" | "vue" | "yaml" | "glimmer" | "html" | "angular" | "lwc";
parser?: "flow" | "babel" | "babel-flow" | "babel-ts" | "typescript" | "acorn" | "espree" | "meriyah" | "css" | "less" | "scss" | "json" | "jsonc" | "json5" | "json-stringify" | "graphql" | "markdown" | "mdx" | "vue" | "yaml" | "glimmer" | "html" | "angular" | "lwc";
plugins?: string[];

@@ -24,0 +24,0 @@ printWidth?: number;

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "0.7.6",
"version": "0.8.0",
"type": "module",

@@ -52,6 +52,5 @@ "main": "dist/index.js",

"promise-resolve-timeout": "^2.0.1",
"smol-toml": "^1.3.3",
"smol-toml": "^1.3.4",
"specialist": "^1.4.5",
"tiny-editorconfig": "^1.0.0",
"tiny-jsonc": "^1.0.2",
"tiny-readdir": "^2.7.4",

@@ -68,3 +67,3 @@ "tiny-readdir-glob": "^1.23.2",

"@types/js-yaml": "^4.0.9",
"@types/node": "^22.14.1",
"@types/node": "^22.15.10",
"cross-env": "^7.0.3",

@@ -71,0 +70,0 @@ "jest": "^29.7.0",