@pob/pretty-pkg 13.0.0 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [13.2.0](https://github.com/christophehurpeau/pob/compare/@pob/pretty-pkg@13.1.0...@pob/pretty-pkg@13.2.0) (2025-11-24)
7
+
8
+ ### Features
9
+
10
+ * remove prettier in pretty-pkg
11
+
12
+ ## [13.1.0](https://github.com/christophehurpeau/pob/compare/@pob/pretty-pkg@13.0.0...@pob/pretty-pkg@13.1.0) (2025-09-17)
13
+
14
+ Version bump for dependency: @pob/sort-pkg
15
+
16
+
6
17
  ## [13.0.0](https://github.com/christophehurpeau/pob/compare/@pob/pretty-pkg@12.2.0...@pob/pretty-pkg@13.0.0) (2025-08-24)
7
18
 
8
19
  ### ⚠ BREAKING CHANGES
package/lib/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import fs from "node:fs/promises";
2
2
  import sortPkg from "@pob/sort-pkg";
3
- import prettier from "prettier";
4
3
 
5
4
  export default function prettyPkg(pkg, prettierOptions) {
6
5
  if (typeof pkg === "string") {
@@ -14,18 +13,12 @@ export default function prettyPkg(pkg, prettierOptions) {
14
13
  throw new TypeError("expected pkg to be object or string");
15
14
  }
16
15
 
17
- if (typeof prettierOptions === "string") {
18
- throw new TypeError(
19
- `Please import "${prettierOptions}" and pass it as the second argument of prettyPkg`,
20
- );
16
+ if (prettierOptions !== undefined) {
17
+ console.warn("prettierOptions is deprecated and has no effect.");
21
18
  }
22
19
 
23
20
  sortPkg(pkg);
24
- return prettier.format(JSON.stringify(pkg, undefined, 2), {
25
- filepath: "package.json",
26
- printWidth: 80,
27
- ...prettierOptions,
28
- });
21
+ return `${JSON.stringify(pkg, undefined, 2)}\n`;
29
22
  }
30
23
 
31
24
  export async function write(pkg, path, prettierOptions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/pretty-pkg",
3
- "version": "13.0.0",
3
+ "version": "13.2.0",
4
4
  "description": "prettier and sort package.json",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -37,7 +37,6 @@
37
37
  "pob": {},
38
38
  "prettier": "@pob/root/prettier-config",
39
39
  "dependencies": {
40
- "@pob/sort-pkg": "12.0.0",
41
- "prettier": "^3.6.2"
40
+ "@pob/sort-pkg": "12.1.0"
42
41
  }
43
42
  }