@pob/root 23.2.0 → 24.1.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,37 @@
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
+ ## [24.1.0](https://github.com/christophehurpeau/pob/compare/@pob/root@24.0.0...@pob/root@24.1.0) (2026-05-21)
7
+
8
+ ### Features
9
+
10
+ * add jsonc in lint-staged
11
+ * update yarn version
12
+
13
+ ## [24.0.0](https://github.com/christophehurpeau/pob/compare/@pob/root@23.2.0...@pob/root@24.0.0) (2026-05-20)
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * specify types in tsconfigs
18
+ * use oxfmt
19
+
20
+ ### Features
21
+
22
+ * **deps:** update commitlint monorepo to v21 ([#2750](https://github.com/christophehurpeau/pob/issues/2750))
23
+ * replace webpack example by vite example and add tsconfig target vite
24
+ * specify types in tsconfigs
25
+ * update lint-staged
26
+ * use oxfmt
27
+
28
+ ### Bug Fixes
29
+
30
+ * fix post-rewrite hook
31
+
32
+ Version bump for dependency: @pob/pretty-pkg
33
+ Version bump for dependency: @pob/version
34
+ Version bump for dependency: pob-dependencies
35
+
36
+
6
37
  ## [23.2.0](https://github.com/christophehurpeau/pob/compare/@pob/root@23.1.0...@pob/root@23.2.0) (2026-05-01)
7
38
 
8
39
  ### Features
package/bin/oxfmt.cjs ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const path = require("node:path");
6
+ const pkg = require("oxfmt/package.json");
7
+
8
+ const pkgPath = require.resolve("oxfmt/package.json");
9
+
10
+ // eslint-disable-next-line import-x/no-dynamic-require
11
+ require(
12
+ path.join(
13
+ path.dirname(pkgPath),
14
+ typeof pkg.bin === "string" ? pkg.bin : pkg.bin.oxfmt,
15
+ ),
16
+ );
@@ -125,7 +125,7 @@ fi`;
125
125
 
126
126
  writeHook("post-checkout", runInstallOnDiff());
127
127
  writeHook("post-merge", runInstallOnDiff());
128
- writeHook("post-rewrite", runInstallOnDiff(' | [ "$1" = "rebase" ]'));
128
+ writeHook("post-rewrite", runInstallOnDiff(' || [ "$1" = "rebase" ]'));
129
129
  }
130
130
 
131
131
  const prePushHook = [];
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import JSON5 from "json5";
3
- import prettier from "prettier";
3
+ import { format } from "oxfmt";
4
4
 
5
5
  function readJSON5(path, defaults = null) {
6
6
  try {
@@ -91,19 +91,16 @@ export default async function installVscodeTasks({ pkg }) {
91
91
  });
92
92
  }
93
93
 
94
- fs.writeFileSync(
94
+ const { code: formattedTasksFile } = await format(
95
95
  ".vscode/tasks.json",
96
- await prettier.format(
97
- `{
96
+ `{
98
97
  // See https://go.microsoft.com/fwlink/?LinkId=733558
99
98
  // for the documentation about the tasks.json format
100
99
  "version": "2.0.0",
101
100
  "tasks": ${JSON.stringify(tasks)}
102
101
  }
103
102
  `,
104
- {
105
- filepath: ".vscode/tasks.json",
106
- },
107
- ),
103
+ { printWidth: 80 },
108
104
  );
105
+ fs.writeFileSync(".vscode/tasks.json", formattedTasksFile);
109
106
  }
@@ -13,7 +13,7 @@ const isCorepackInstalled = () => {
13
13
  export default function updateYarn({ pkg, pm }) {
14
14
  if (pm.name !== "yarn" || !pm.version) return;
15
15
 
16
- if (semver.lt(pm.version, "4.12.0")) {
16
+ if (semver.lt(pm.version, "4.15.0")) {
17
17
  // Upgrade from yarn 1
18
18
  if (semver.lt(pm.version, "2.0.0")) {
19
19
  console.log("-- Install yarn berry --");
@@ -52,9 +52,7 @@ const workspaces = pkg.workspaces || false;
52
52
 
53
53
  const getSrcDirectories = () => {
54
54
  if (workspaces) {
55
- return `${
56
- workspaces.length === 1 ? workspaces[0] : `{${workspaces.join(",")}}`
57
- }/{src,lib}`;
55
+ return `${workspaces.length === 1 ? workspaces[0] : `{${workspaces.join(",")}}`}/{src,lib}`;
58
56
  }
59
57
 
60
58
  return "{src,lib}";
@@ -66,9 +64,7 @@ export default function createLintStagedConfig() {
66
64
  return {
67
65
  [`{${lockfile},${configfile ? `${configfile},` : ""}package.json${
68
66
  workspaces
69
- ? `,${workspaces
70
- .map((workspacePath) => `${workspacePath}/package.json`)
71
- .join(",")}`
67
+ ? `,${workspaces.map((workspacePath) => `${workspacePath}/package.json`).join(",")}`
72
68
  : ""
73
69
  }}`]: (filenames) => {
74
70
  const packagejsonFilenames = filenames.filter((filename) =>
@@ -81,25 +77,27 @@ export default function createLintStagedConfig() {
81
77
  "eslint --fix --quiet",
82
78
  packagejsonFilenames.length === 0
83
79
  ? undefined
84
- : `pretty-pkg "${packagejsonFilenames.join('" "')}"`,
80
+ : `oxfmt "${packagejsonFilenames.join('" "')}"`,
85
81
  `git add ${lockfile}${configfile ? ` ${configfile}` : ""}${pm.name === "yarn" ? " .yarn" : ""}`,
86
82
  ].filter(Boolean);
87
83
  },
88
- "!(package|package-lock|.eslintrc).json": ["prettier --write"],
84
+ "!(package|package-lock|.eslintrc).json": [
85
+ "oxfmt --no-error-on-unmatched-pattern",
86
+ ],
89
87
  [`{.github,scripts,config,${srcDirectories}}/**/*.{yml,yaml,md}`]: [
90
- "prettier --write",
88
+ "oxfmt --no-error-on-unmatched-pattern",
91
89
  ],
92
- "./*.{yml,yaml,md}": ["prettier --write"],
90
+ "./*.{yml,yaml,md,jsonc}": ["oxfmt --no-error-on-unmatched-pattern"],
93
91
  [`${srcDirectories}/**/*.{js,ts,tsx}`]: [
94
- "prettier --write",
92
+ "oxfmt --no-error-on-unmatched-pattern",
95
93
  "eslint --fix --quiet",
96
94
  ],
97
95
  "{scripts,config,.storyboook}/**/*.{js,mjs,cjs}": [
98
- "prettier --write",
96
+ "oxfmt --no-error-on-unmatched-pattern",
99
97
  "eslint --fix --quiet",
100
98
  ],
101
99
  [`{.storybook,${srcDirectories}}/**/*.css`]: [
102
- "prettier --parser css --write",
100
+ "oxfmt --no-error-on-unmatched-pattern",
103
101
  ],
104
102
  [`${srcDirectories}/**/*.{ts,tsx}`]: () =>
105
103
  pkg.devDependencies && pkg.devDependencies["@pob/rollup-esbuild"]
package/package.json CHANGED
@@ -1,32 +1,33 @@
1
1
  {
2
2
  "name": "@pob/root",
3
- "version": "23.2.0",
3
+ "version": "24.1.0",
4
4
  "description": "root package",
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/root"
12
13
  },
13
- "homepage": "https://github.com/christophehurpeau/pob",
14
- "type": "module",
15
- "engines": {
16
- "node": ">=22.18.0"
17
- },
18
- "sideEffects": false,
19
14
  "bin": {
15
+ "oxfmt": "./bin/oxfmt.cjs",
20
16
  "pob-check-commit-msg": "./bin/pob-check-commit-msg.js",
21
17
  "pob-root-lint-staged": "./bin/pob-root-lint-staged.js",
22
18
  "pob-root-postinstall": "./bin/pob-root-postinstall.js",
23
- "pob-root-prettier": "./bin/prettier.cjs",
24
19
  "pob-version": "./bin/pob-version.js",
25
- "prettier": "./bin/prettier.cjs",
26
- "pretty-pkg": "./bin/pretty-pkg.js",
27
20
  "repository-check-dirty": "./bin/repository-check-dirty.js",
28
21
  "yarn-version": "./bin/pob-version.js"
29
22
  },
23
+ "files": [
24
+ "lib",
25
+ "bin",
26
+ "createLintStagedConfig.js",
27
+ "tsconfigs"
28
+ ],
29
+ "type": "module",
30
+ "sideEffects": false,
30
31
  "main": "./lib/index.js",
31
32
  "exports": {
32
33
  ".": "./lib/index.js",
@@ -45,6 +46,7 @@
45
46
  "./tsconfigs/targets/rollup-babel-with-dom.json": "./tsconfigs/targets/rollup-babel-with-dom.json",
46
47
  "./tsconfigs/targets/rollup-es2015.json": "./tsconfigs/targets/rollup-es2015.json",
47
48
  "./tsconfigs/targets/rollup-es2015-with-dom.json": "./tsconfigs/targets/rollup-es2015-with-dom.json",
49
+ "./tsconfigs/targets/vite.json": "./tsconfigs/targets/vite.json",
48
50
  "./tsconfigs/targets/webpack.json": "./tsconfigs/targets/webpack.json",
49
51
  "./tsconfigs/targets/expo.json": "./tsconfigs/targets/expo.json",
50
52
  "./tsconfigs/targets/rollup-node-22.json": "./tsconfigs/targets/rollup-node-22.json",
@@ -54,32 +56,27 @@
54
56
  "publishConfig": {
55
57
  "access": "public"
56
58
  },
57
- "files": [
58
- "lib",
59
- "bin",
60
- "createLintStagedConfig.js",
61
- "prettier-config.cjs",
62
- "tsconfigs"
63
- ],
64
59
  "scripts": {
65
60
  "lint": "yarn run lint:eslint",
66
61
  "lint:eslint": "yarn '../..' run eslint --quiet '@pob/root'"
67
62
  },
68
- "pob": {},
69
- "prettier": "@pob/root/prettier-config",
70
63
  "dependencies": {
71
- "@commitlint/format": "20.5.0",
72
- "@commitlint/lint": "20.5.0",
73
- "@commitlint/types": "20.5.0",
74
- "@pob/pretty-pkg": "13.2.3",
75
- "@pob/version": "3.2.0",
64
+ "@commitlint/format": "21.0.1",
65
+ "@commitlint/lint": "21.0.1",
66
+ "@commitlint/types": "21.0.1",
67
+ "@pob/pretty-pkg": "14.0.0",
68
+ "@pob/version": "4.0.0",
76
69
  "conventional-changelog-conventionalcommits": "^9.1.0",
77
70
  "conventional-changelog-writer": "^8.2.0",
78
71
  "conventional-commits-parser": "^6.2.1",
79
72
  "json5": "^2.2.3",
80
- "lint-staged": "16.4.0",
81
- "pob-dependencies": "23.2.0",
82
- "prettier": "3.8.3",
73
+ "lint-staged": "17.0.5",
74
+ "oxfmt": "0.50.0",
75
+ "pob-dependencies": "24.0.0",
83
76
  "semver": "^7.7.3"
84
- }
77
+ },
78
+ "engines": {
79
+ "node": ">=22.18.0"
80
+ },
81
+ "pob": {}
85
82
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "@pob:target:BaseBundlerNode",
4
+ "extends": "./base-bundler.json",
5
+
6
+ "compilerOptions": {
7
+ "types": ["node"]
8
+ }
9
+ }
@@ -9,6 +9,7 @@
9
9
  "moduleResolution": "bundler",
10
10
  "moduleDetection": "force",
11
11
  "allowImportingTsExtensions": true,
12
- "esModuleInterop": true
12
+ "esModuleInterop": true,
13
+ "types": []
13
14
  }
14
15
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:EsbuildNode22",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
7
  "target": "es2023",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:EsbuildNode24",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
7
  "target": "es2024",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:Expo",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
7
  "isolatedModules": true,
@@ -4,7 +4,6 @@
4
4
  "extends": "./rollup-es2015.json",
5
5
 
6
6
  "compilerOptions": {
7
- "target": "es2015",
8
7
  "lib": ["DOM", "es2023"]
9
8
  }
10
9
  }
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:RollupES2015",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
- "target": "es2015",
8
7
  "lib": ["es2023"]
9
8
  }
10
9
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:RollupNode22",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
7
  "target": "es2023",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "display": "@pob:target:RollupNode24",
4
- "extends": "./base-bundler.json",
4
+ "extends": "./base-bundler-node.json",
5
5
 
6
6
  "compilerOptions": {
7
7
  "target": "es2024",
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "@pob:target:Vite",
4
+ "extends": "./base-bundler.json",
5
+
6
+ "compilerOptions": {
7
+ "isolatedModules": true,
8
+ "target": "ESNext",
9
+ "lib": ["DOM", "ESNext"]
10
+ }
11
+ }
package/bin/prettier.cjs DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- "use strict";
4
-
5
- const path = require("node:path");
6
- const pkg = require("prettier/package.json");
7
-
8
- // eslint-disable-next-line import-x/no-dynamic-require
9
- require(
10
- path.join(
11
- "prettier",
12
- typeof pkg.bin === "string" ? pkg.bin : pkg.bin.prettier,
13
- ),
14
- );
package/bin/pretty-pkg.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import "@pob/pretty-pkg/bin/pretty-pkg.js";
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- module.exports = {
4
- overrides: [
5
- // use json-stringify for lerna.json as lerna will reformat it on new version
6
- {
7
- files: ["lerna.json"],
8
- options: {
9
- parser: "json-stringify",
10
- },
11
- },
12
- {
13
- files: [".yarnrc.yml"],
14
- options: {
15
- printWidth: 9999,
16
- },
17
- },
18
- ],
19
- };