@pob/pretty-pkg 13.2.3 → 14.0.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,16 @@
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
+ ## [14.0.0](https://github.com/christophehurpeau/pob/compare/@pob/pretty-pkg@13.2.3...@pob/pretty-pkg@14.0.0) (2026-05-20)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * use oxfmt
11
+
12
+ ### Features
13
+
14
+ * use oxfmt
15
+
6
16
  ## [13.2.3](https://github.com/christophehurpeau/pob/compare/@pob/pretty-pkg@13.2.2...@pob/pretty-pkg@13.2.3) (2026-03-12)
7
17
 
8
18
  Version bump for dependency: @pob/sort-pkg
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs/promises";
2
- import sortPkg from "@pob/sort-pkg";
2
+ import { format } from "oxfmt";
3
3
 
4
- export default function prettyPkg(pkg, prettierOptions) {
4
+ export default async function prettyPkg(pkg, prettierOptions) {
5
5
  if (typeof pkg === "string") {
6
6
  pkg = JSON.parse(pkg);
7
7
  if (typeof pkg !== "object") {
@@ -17,8 +17,12 @@ export default function prettyPkg(pkg, prettierOptions) {
17
17
  console.warn("prettierOptions is deprecated and has no effect.");
18
18
  }
19
19
 
20
- sortPkg(pkg);
21
- return `${JSON.stringify(pkg, undefined, 2)}\n`;
20
+ const { code: formatted } = await format(
21
+ "package.json",
22
+ `${JSON.stringify(pkg, undefined, 2)}\n`,
23
+ { printWidth: 80 },
24
+ );
25
+ return formatted;
22
26
  }
23
27
 
24
28
  export async function write(pkg, path, prettierOptions) {
package/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "@pob/pretty-pkg",
3
- "version": "13.2.3",
3
+ "version": "14.0.0",
4
4
  "description": "prettier and sort package.json",
5
5
  "keywords": [],
6
- "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
6
+ "homepage": "https://github.com/christophehurpeau/pob",
7
7
  "license": "ISC",
8
+ "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "https://github.com/christophehurpeau/pob.git",
11
12
  "directory": "@pob/pretty-pkg"
12
13
  },
13
- "homepage": "https://github.com/christophehurpeau/pob",
14
+ "bin": "./bin/pretty-pkg.js",
15
+ "files": [
16
+ "lib",
17
+ "bin"
18
+ ],
14
19
  "type": "module",
15
- "engines": {
16
- "node": ">=22.18.0"
17
- },
18
20
  "sideEffects": false,
19
- "bin": "./bin/pretty-pkg.js",
20
21
  "main": "./lib/index.js",
21
22
  "exports": {
22
23
  ".": "./lib/index.js",
@@ -26,17 +27,15 @@
26
27
  "publishConfig": {
27
28
  "access": "public"
28
29
  },
29
- "files": [
30
- "lib",
31
- "bin"
32
- ],
33
30
  "scripts": {
34
31
  "lint": "yarn run lint:eslint",
35
32
  "lint:eslint": "yarn '../..' run eslint --quiet '@pob/pretty-pkg'"
36
33
  },
37
- "pob": {},
38
- "prettier": "@pob/root/prettier-config",
39
34
  "dependencies": {
40
- "@pob/sort-pkg": "12.1.2"
41
- }
35
+ "oxfmt": "0.50.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=22.18.0"
39
+ },
40
+ "pob": {}
42
41
  }