@pob/root 24.1.0 → 24.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.
|
@@ -28,9 +28,14 @@ if (!pm) {
|
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
if (
|
|
31
|
+
if (
|
|
32
|
+
pm.name !== "yarn" &&
|
|
33
|
+
pm.name !== "npm" &&
|
|
34
|
+
pm.name !== "bun" &&
|
|
35
|
+
pm.name !== "pnpm"
|
|
36
|
+
) {
|
|
32
37
|
console.error(
|
|
33
|
-
`Package manager not supported: ${pm.name}. Please run with yarn or
|
|
38
|
+
`Package manager not supported: ${pm.name}. Please run with yarn, bun, npm or pnpm!`,
|
|
34
39
|
);
|
|
35
40
|
process.exit(1);
|
|
36
41
|
}
|
|
@@ -89,6 +89,7 @@ export default function installGitHooks({ pkg, pm }) {
|
|
|
89
89
|
|
|
90
90
|
const {
|
|
91
91
|
lockfile,
|
|
92
|
+
pmRun,
|
|
92
93
|
pmExec,
|
|
93
94
|
installOnDiffCommand,
|
|
94
95
|
beforeDiffCommand = "",
|
|
@@ -148,7 +149,7 @@ fi`;
|
|
|
148
149
|
}
|
|
149
150
|
return "test";
|
|
150
151
|
};
|
|
151
|
-
prePushHook.push(`${
|
|
152
|
+
prePushHook.push(`${pmRun} ${getTestCommand()}`);
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
if (prePushHook.length > 0) {
|
|
@@ -2,6 +2,7 @@ export const getPackageManagerCommands = (pm, isYarnBerry) => {
|
|
|
2
2
|
if (pm.name === "yarn") {
|
|
3
3
|
return {
|
|
4
4
|
lockfile: "yarn.lock",
|
|
5
|
+
pmRun: "yarn run",
|
|
5
6
|
pmExec: "yarn",
|
|
6
7
|
ciPreStep: `name: Enable Corepack
|
|
7
8
|
run: corepack enable`,
|
|
@@ -31,6 +32,7 @@ export const getPackageManagerCommands = (pm, isYarnBerry) => {
|
|
|
31
32
|
if (pm.name === "npm") {
|
|
32
33
|
return {
|
|
33
34
|
lockfile: "package-lock.json",
|
|
35
|
+
pmRun: "npm run",
|
|
34
36
|
pmExec: "npx --no-install",
|
|
35
37
|
ciPreStep: "",
|
|
36
38
|
installOnCICommand: "npm i",
|
|
@@ -41,6 +43,7 @@ export const getPackageManagerCommands = (pm, isYarnBerry) => {
|
|
|
41
43
|
if (pm.name === "bun") {
|
|
42
44
|
return {
|
|
43
45
|
lockfile: "bun.lock",
|
|
46
|
+
pmRun: "bun run",
|
|
44
47
|
pmExec: "bun run",
|
|
45
48
|
ciPreStep: `name: Install bun
|
|
46
49
|
uses: oven-sh/setup-bun@v2`,
|
|
@@ -49,8 +52,22 @@ export const getPackageManagerCommands = (pm, isYarnBerry) => {
|
|
|
49
52
|
installOnDiffCommand: "bun i --frozen-lockfile",
|
|
50
53
|
};
|
|
51
54
|
}
|
|
55
|
+
if (pm.name === "pnpm") {
|
|
56
|
+
return {
|
|
57
|
+
lockfile: "pnpm-lock.yaml",
|
|
58
|
+
pmRun: "pnpm run",
|
|
59
|
+
pmExec: "pnpm exec",
|
|
60
|
+
ciPreStep: `name: Install pnpm
|
|
61
|
+
uses: pnpm/action-setup@v6
|
|
62
|
+
with:
|
|
63
|
+
version: 11`,
|
|
64
|
+
installOnCICommand: "pnpm install --frozen-lockfile",
|
|
65
|
+
installMutableCommand: "pnpm install",
|
|
66
|
+
installOnDiffCommand: "pnpm install --frozen-lockfile",
|
|
67
|
+
};
|
|
68
|
+
}
|
|
52
69
|
|
|
53
70
|
throw new Error(
|
|
54
|
-
`Package manager not supported: ${pm.name}. Please run with yarn, npm or
|
|
71
|
+
`Package manager not supported: ${pm.name}. Please run with yarn, npm, bun or pnpm !`,
|
|
55
72
|
);
|
|
56
73
|
};
|
|
@@ -41,9 +41,15 @@ const { lockfile, configfile, installAndDedupe } = (() => {
|
|
|
41
41
|
installAndDedupe: ["bun i"],
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
+
if (pm.name === "pnpm") {
|
|
45
|
+
return {
|
|
46
|
+
lockfile: "pnpm-lock.yaml",
|
|
47
|
+
installAndDedupe: ["pnpm install", "pnpm dedupe"],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
44
50
|
|
|
45
51
|
throw new Error(
|
|
46
|
-
`Package manager not supported: ${pm.name}. Please run with yarn, npm or
|
|
52
|
+
`Package manager not supported: ${pm.name}. Please run with yarn, npm, bun or pnpm !`,
|
|
47
53
|
);
|
|
48
54
|
})();
|
|
49
55
|
|
package/lib/which-pm-runs.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export function whichPmRuns() {
|
|
2
2
|
const userAgent = process.env.npm_config_user_agent;
|
|
3
3
|
if (!userAgent) {
|
|
4
|
+
if (
|
|
5
|
+
process.env.npm_execpath?.endsWith("/bin/pnpm") ||
|
|
6
|
+
process.env.npm_execpath?.endsWith("/bin/pnpm.mjs")
|
|
7
|
+
) {
|
|
8
|
+
return { name: "pnpm", version: "unknown" };
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
return undefined;
|
|
5
12
|
}
|
|
6
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.2.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
@@ -33,9 +33,6 @@
|
|
|
33
33
|
".": "./lib/index.js",
|
|
34
34
|
"./createLintStagedConfig": "./createLintStagedConfig.js",
|
|
35
35
|
"./createLintStagedConfig.js": "./createLintStagedConfig.js",
|
|
36
|
-
"./prettier-config": "./prettier-config.cjs",
|
|
37
|
-
"./prettier-config.js": "./prettier-config.cjs",
|
|
38
|
-
"./prettier-config.cjs": "./prettier-config.cjs",
|
|
39
36
|
"./tsconfigs/base.json": "./tsconfigs/base.json",
|
|
40
37
|
"./tsconfigs/strict.json": "./tsconfigs/strict.json",
|
|
41
38
|
"./tsconfigs/targets/esbuild-node-22.json": "./tsconfigs/targets/esbuild-node-22.json",
|
|
@@ -50,33 +47,33 @@
|
|
|
50
47
|
"./tsconfigs/targets/webpack.json": "./tsconfigs/targets/webpack.json",
|
|
51
48
|
"./tsconfigs/targets/expo.json": "./tsconfigs/targets/expo.json",
|
|
52
49
|
"./tsconfigs/targets/rollup-node-22.json": "./tsconfigs/targets/rollup-node-22.json",
|
|
53
|
-
"./tsconfigs/targets/rollup-node-24.json": "./tsconfigs/targets/rollup-node-
|
|
50
|
+
"./tsconfigs/targets/rollup-node-24.json": "./tsconfigs/targets/rollup-node-24.json",
|
|
54
51
|
"./package.json": "./package.json"
|
|
55
52
|
},
|
|
56
53
|
"publishConfig": {
|
|
57
54
|
"access": "public"
|
|
58
55
|
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"lint": "yarn run lint:eslint",
|
|
61
|
-
"lint:eslint": "yarn '../..' run eslint --quiet '@pob/root'"
|
|
62
|
-
},
|
|
63
56
|
"dependencies": {
|
|
64
57
|
"@commitlint/format": "21.0.1",
|
|
65
58
|
"@commitlint/lint": "21.0.1",
|
|
66
59
|
"@commitlint/types": "21.0.1",
|
|
67
|
-
"@pob/pretty-pkg": "14.0.0",
|
|
68
|
-
"@pob/version": "4.0.0",
|
|
69
60
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
70
61
|
"conventional-changelog-writer": "^8.2.0",
|
|
71
62
|
"conventional-commits-parser": "^6.2.1",
|
|
72
63
|
"json5": "^2.2.3",
|
|
73
64
|
"lint-staged": "17.0.5",
|
|
74
|
-
"oxfmt": "0.
|
|
75
|
-
"
|
|
76
|
-
"
|
|
65
|
+
"oxfmt": "0.51.0",
|
|
66
|
+
"semver": "^7.7.3",
|
|
67
|
+
"@pob/pretty-pkg": "14.1.0",
|
|
68
|
+
"pob-dependencies": "24.1.0",
|
|
69
|
+
"@pob/version": "4.1.0"
|
|
77
70
|
},
|
|
78
71
|
"engines": {
|
|
79
72
|
"node": ">=22.18.0"
|
|
80
73
|
},
|
|
81
|
-
"pob": {}
|
|
74
|
+
"pob": {},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"lint": "pnpm run lint:eslint",
|
|
77
|
+
"lint:eslint": "pnpm run --dir '../..' eslint --quiet '@pob/root'"
|
|
78
|
+
}
|
|
82
79
|
}
|