@pob/root 24.4.0 → 24.5.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.
@@ -12,7 +12,14 @@ if (!process.env.INIT_CWD) {
12
12
  process.exit(1);
13
13
  }
14
14
 
15
- process.chdir(process.env.PROJECT_CWD || process.env.INIT_CWD);
15
+ // PROJECT_CWD (yarn classic) is always the monorepo root, regardless of
16
+ // invocation directory, so honor it explicitly. Without it, npm/pnpm/bun
17
+ // already set cwd to this script's own package (the root) before running
18
+ // the lifecycle script; INIT_CWD instead reflects where the command was
19
+ // invoked (e.g. a sub-package), so it must not be used to chdir here.
20
+ if (process.env.PROJECT_CWD) {
21
+ process.chdir(process.env.PROJECT_CWD);
22
+ }
16
23
 
17
24
  const pkg = JSON.parse(fs.readFileSync(path.resolve("package.json")));
18
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/root",
3
- "version": "24.4.0",
3
+ "version": "24.5.0",
4
4
  "description": "root package",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/christophehurpeau/pob",
@@ -67,7 +67,7 @@
67
67
  "lint-staged": "17.0.8",
68
68
  "oxfmt": "0.54.0",
69
69
  "semver": "^7.7.3",
70
- "@pob/version": "4.2.0",
70
+ "@pob/version": "4.3.0",
71
71
  "pob-dependencies": "24.2.0"
72
72
  },
73
73
  "engines": {