@pob/root 23.1.0 → 24.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 +34 -0
- package/bin/oxfmt.cjs +16 -0
- package/bin/postinstall/install-githooks.js +1 -1
- package/bin/postinstall/install-vscode-tasks.js +5 -8
- package/createLintStagedConfig.js +11 -13
- package/package.json +26 -29
- package/tsconfigs/targets/base-bundler-node.json +9 -0
- package/tsconfigs/targets/base-bundler.json +2 -1
- package/tsconfigs/targets/base-node.json +2 -1
- package/tsconfigs/targets/esbuild-node-22.json +1 -1
- package/tsconfigs/targets/esbuild-node-24.json +1 -1
- package/tsconfigs/targets/expo.json +1 -1
- package/tsconfigs/targets/rollup-es2015-with-dom.json +0 -1
- package/tsconfigs/targets/rollup-es2015.json +1 -2
- package/tsconfigs/targets/rollup-node-22.json +1 -1
- package/tsconfigs/targets/rollup-node-24.json +1 -1
- package/tsconfigs/targets/vite.json +11 -0
- package/bin/prettier.cjs +0 -14
- package/bin/pretty-pkg.js +0 -3
- package/prettier-config.cjs +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
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.0.0](https://github.com/christophehurpeau/pob/compare/@pob/root@23.2.0...@pob/root@24.0.0) (2026-05-20)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* specify types in tsconfigs
|
|
11
|
+
* use oxfmt
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **deps:** update commitlint monorepo to v21 ([#2750](https://github.com/christophehurpeau/pob/issues/2750))
|
|
16
|
+
* replace webpack example by vite example and add tsconfig target vite
|
|
17
|
+
* specify types in tsconfigs
|
|
18
|
+
* update lint-staged
|
|
19
|
+
* use oxfmt
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* fix post-rewrite hook
|
|
24
|
+
|
|
25
|
+
Version bump for dependency: @pob/pretty-pkg
|
|
26
|
+
Version bump for dependency: @pob/version
|
|
27
|
+
Version bump for dependency: pob-dependencies
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [23.2.0](https://github.com/christophehurpeau/pob/compare/@pob/root@23.1.0...@pob/root@23.2.0) (2026-05-01)
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* add types configuration for Node in base-node.json
|
|
35
|
+
|
|
36
|
+
Version bump for dependency: @pob/version
|
|
37
|
+
Version bump for dependency: pob-dependencies
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
## [23.1.0](https://github.com/christophehurpeau/pob/compare/@pob/root@23.0.0...@pob/root@23.1.0) (2026-05-01)
|
|
7
41
|
|
|
8
42
|
### Bug Fixes
|
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('
|
|
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
|
|
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
|
-
|
|
94
|
+
const { code: formattedTasksFile } = await format(
|
|
95
95
|
".vscode/tasks.json",
|
|
96
|
-
|
|
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
|
}
|
|
@@ -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
|
-
: `
|
|
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": [
|
|
84
|
+
"!(package|package-lock|.eslintrc).json": [
|
|
85
|
+
"oxfmt --no-error-on-unmatched-pattern",
|
|
86
|
+
],
|
|
89
87
|
[`{.github,scripts,config,${srcDirectories}}/**/*.{yml,yaml,md}`]: [
|
|
90
|
-
"
|
|
88
|
+
"oxfmt --no-error-on-unmatched-pattern",
|
|
91
89
|
],
|
|
92
|
-
"./*.{yml,yaml,md}": ["
|
|
90
|
+
"./*.{yml,yaml,md}": ["oxfmt --no-error-on-unmatched-pattern"],
|
|
93
91
|
[`${srcDirectories}/**/*.{js,ts,tsx}`]: [
|
|
94
|
-
"
|
|
92
|
+
"oxfmt --no-error-on-unmatched-pattern",
|
|
95
93
|
"eslint --fix --quiet",
|
|
96
94
|
],
|
|
97
95
|
"{scripts,config,.storyboook}/**/*.{js,mjs,cjs}": [
|
|
98
|
-
"
|
|
96
|
+
"oxfmt --no-error-on-unmatched-pattern",
|
|
99
97
|
"eslint --fix --quiet",
|
|
100
98
|
],
|
|
101
99
|
[`{.storybook,${srcDirectories}}/**/*.css`]: [
|
|
102
|
-
"
|
|
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": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
|
-
"
|
|
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": "
|
|
72
|
-
"@commitlint/lint": "
|
|
73
|
-
"@commitlint/types": "
|
|
74
|
-
"@pob/pretty-pkg": "
|
|
75
|
-
"@pob/version": "
|
|
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": "
|
|
81
|
-
"
|
|
82
|
-
"
|
|
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
|
}
|
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
package/prettier-config.cjs
DELETED
|
@@ -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
|
-
};
|