pob 26.11.0 → 27.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,38 @@
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
+ ## [27.1.0](https://github.com/christophehurpeau/pob/compare/pob@27.0.0...pob@27.1.0) (2025-04-27)
7
+
8
+ ### Features
9
+
10
+ * use glob from nodejs ([2ffacbe](https://github.com/christophehurpeau/pob/commit/2ffacbebb7ea1f13d6e8761a7a223c62841e993b))
11
+
12
+ ### Bug Fixes
13
+
14
+ * **deps:** update @pob/eslint-config to v59.8.1 ([#2479](https://github.com/christophehurpeau/pob/issues/2479)) ([253120f](https://github.com/christophehurpeau/pob/commit/253120f7e45e74f8ed2f55319fdfee96a35aa3f1))
15
+ * **deps:** update dependency @prettier/sync to v0.5.5 ([#2493](https://github.com/christophehurpeau/pob/issues/2493)) ([f2dc529](https://github.com/christophehurpeau/pob/commit/f2dc529398d8c3525a865d27f682de6e372d81a4))
16
+ * make sure we use node 22 >= 22.14 ([2fe4ec5](https://github.com/christophehurpeau/pob/commit/2fe4ec525e73793e3af520cf6243be5b8bec8de3))
17
+ * use node 20.11.0 with backported import.meta ([d8d1c3b](https://github.com/christophehurpeau/pob/commit/d8d1c3b0d9e53536846b3d337f1530de71ebbf8d))
18
+
19
+ Version bump for dependency: @pob/sort-object
20
+ Version bump for dependency: @pob/sort-pkg
21
+ Version bump for dependency: yarn-workspace-utils
22
+ Version bump for dependency: @pob/root
23
+
24
+
25
+ ## [27.0.0](https://github.com/christophehurpeau/pob/compare/pob@26.11.0...pob@27.0.0) (2025-04-27)
26
+
27
+ ### ⚠ BREAKING CHANGES
28
+
29
+ * remove postinstallDev plugin
30
+
31
+ ### Features
32
+
33
+ * remove postinstallDev plugin ([a0ddde0](https://github.com/christophehurpeau/pob/commit/a0ddde0cbd970bf7e4b698f735b849ca5440607e))
34
+
35
+ Version bump for dependency: @pob/root
36
+
37
+
6
38
  ## [26.11.0](https://github.com/christophehurpeau/pob/compare/pob@26.10.0...pob@26.11.0) (2025-03-15)
7
39
 
8
40
  ### Features
@@ -327,7 +327,7 @@ export default class CommonTestingGenerator extends Generator {
327
327
  : ""
328
328
  }node ${
329
329
  this.options.typescript ? `${tsTestLoaderOption} ` : ""
330
- }${this.fs.exists("src/test-setup.ts") ? "--import ./src/test-setup.ts " : ""}--test${experimentalTestCoverage && (coverage || coverageJson) ? " --experimental-test-coverage" : ""} ${this.options.monorepo ? `${workspacesPattern}/` : ""}${`${
330
+ }${this.fs.exists("src/test-setup.ts") ? "--import ./src/test-setup.ts " : ""}--test${experimentalTestCoverage && (coverage || coverageJson) ? " --experimental-test-coverage" : ""} ${this.options.monorepo ? `${workspacesPattern}/*/` : ""}${`${
331
331
  hasTestFolder ? "test/*" : `${this.options.srcDirectory}/**/*.test`
332
332
  }.${this.options.typescript ? "ts" : "js"}`}`;
333
333
  }
@@ -639,7 +639,7 @@ export default class CommonTranspilerGenerator extends Generator {
639
639
  !pkg.engines.node ||
640
640
  !pkg.engines.node.startsWith(">=22")
641
641
  ) {
642
- pkg.engines.node = ">=20.9.0";
642
+ pkg.engines.node = ">=20.11.0";
643
643
  }
644
644
  break;
645
645
  case "22":
@@ -667,7 +667,7 @@ export default class CommonTranspilerGenerator extends Generator {
667
667
  packageUtils.removeDevDependencies(pkg, ["@types/node"]);
668
668
 
669
669
  // Supports oldest current or active LTS version of node
670
- const minVersion = this.options.onlyLatestLTS ? "22.14.0" : "20.9.0";
670
+ const minVersion = this.options.onlyLatestLTS ? "22.14.0" : "20.11.0";
671
671
 
672
672
  if (
673
673
  !pkg.engines.node ||
@@ -64,7 +64,11 @@ export default class CorePackageGenerator extends Generator {
64
64
  )
65
65
  ) {
66
66
  // this might be overridden by babel generator
67
- pkg.engines.node = ">=20.9.0"; // .9.0 is the first lts node 20 version
67
+ pkg.engines.node = ">=20.11.0"; // .9.0 is the first lts node 20 version, 20.11.0 is the version with backported import.meta feature
68
+ }
69
+
70
+ if (pkg.engines.node.startsWith(">=22.11.")) {
71
+ pkg.engines.node = ">=22.14.0"; // 22.14 is the first version with findPackageJSON
68
72
  }
69
73
 
70
74
  if (!this.options.isRoot) {
@@ -368,8 +372,8 @@ export default class CorePackageGenerator extends Generator {
368
372
  uninstallPostinstallScript("postinstall");
369
373
  }
370
374
  } else if (this.options.packageManager === "yarn") {
371
- uninstallPostinstallScript("postinstall");
372
- installPostinstallScript("postinstallDev");
375
+ uninstallPostinstallScript("postinstallDev");
376
+ installPostinstallScript("postinstall");
373
377
  } else {
374
378
  uninstallPostinstallScript("postinstallDev");
375
379
  installPostinstallScript("postinstall");
@@ -80,24 +80,24 @@ export default class CoreYarnGenerator extends Generator {
80
80
  const isPluginInstalled = (name) =>
81
81
  installedPlugins.some((plugin) => plugin.name === name);
82
82
 
83
- const installPlugin = (nameOrUrl) => {
84
- this.spawnSync("yarn", ["plugin", "import", nameOrUrl]);
85
- };
83
+ // const installPlugin = (nameOrUrl) => {
84
+ // this.spawnSync("yarn", ["plugin", "import", nameOrUrl]);
85
+ // };
86
86
  const removePlugin = (name) => {
87
87
  this.spawnSync("yarn", ["plugin", "remove", name]);
88
88
  };
89
89
 
90
- const installPluginIfNotInstalled = (
91
- name,
92
- nameOrUrl = name,
93
- forceInstallIfInstalled = () => false,
94
- ) => {
95
- if (!isPluginInstalled(name)) {
96
- installPlugin(nameOrUrl);
97
- } else if (forceInstallIfInstalled()) {
98
- installPlugin(nameOrUrl);
99
- }
100
- };
90
+ // const installPluginIfNotInstalled = (
91
+ // name,
92
+ // nameOrUrl = name,
93
+ // forceInstallIfInstalled = () => false,
94
+ // ) => {
95
+ // if (!isPluginInstalled(name)) {
96
+ // installPlugin(nameOrUrl);
97
+ // } else if (forceInstallIfInstalled()) {
98
+ // installPlugin(nameOrUrl);
99
+ // }
100
+ // };
101
101
 
102
102
  const removePluginIfInstalled = (name) => {
103
103
  if (isPluginInstalled(name)) {
@@ -108,13 +108,20 @@ export default class CoreYarnGenerator extends Generator {
108
108
  const postinstallDevPluginName = "@yarnpkg/plugin-postinstall-dev";
109
109
  const legacyVersionPluginName = "@yarnpkg/plugin-conventional-version";
110
110
 
111
+ removePluginIfInstalled(postinstallDevPluginName);
111
112
  if (!inMonorepo && !pkg.private) {
112
- installPluginIfNotInstalled(
113
- postinstallDevPluginName,
114
- "https://raw.githubusercontent.com/sachinraja/yarn-plugin-postinstall-dev/main/bundles/%40yarnpkg/plugin-postinstall-dev.js",
115
- );
113
+ packageUtils.addDevDependencies(pkg, ["pinst"]);
114
+ packageUtils.addScripts(pkg, {
115
+ prepack: "pinst --disable",
116
+ postpack: "pinst --enable",
117
+ });
116
118
  } else {
117
- removePluginIfInstalled(postinstallDevPluginName);
119
+ if (pkg.scripts.prepack === "pinst --disable") {
120
+ delete pkg.scripts.prepack;
121
+ }
122
+ if (pkg.scripts.postpack === "pinst --enable") {
123
+ delete pkg.scripts.postpack;
124
+ }
118
125
  }
119
126
 
120
127
  if (pkg.name !== "yarn-plugin-conventional-version") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "26.11.0",
3
+ "version": "27.1.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -41,12 +41,12 @@
41
41
  },
42
42
  "prettier": "@pob/root/prettier-config",
43
43
  "dependencies": {
44
- "@pob/eslint-config": "59.8.0",
45
- "@pob/eslint-config-typescript": "59.8.0",
46
- "@pob/eslint-config-typescript-react": "59.8.0",
47
- "@pob/sort-object": "9.0.0",
48
- "@pob/sort-pkg": "11.0.1",
49
- "@prettier/sync": "0.5.2",
44
+ "@pob/eslint-config": "59.8.1",
45
+ "@pob/eslint-config-typescript": "59.8.1",
46
+ "@pob/eslint-config-typescript-react": "59.8.1",
47
+ "@pob/sort-object": "9.0.1",
48
+ "@pob/sort-pkg": "11.0.2",
49
+ "@prettier/sync": "0.5.5",
50
50
  "@types/inquirer": "9.0.7",
51
51
  "@yarnpkg/cli": "4.7.0",
52
52
  "@yarnpkg/core": "4.2.1",
@@ -64,17 +64,17 @@
64
64
  "mem-fs-editor": "11.1.4",
65
65
  "minimist": "1.2.8",
66
66
  "parse-author": "2.0.0",
67
- "pob-dependencies": "17.8.1",
67
+ "pob-dependencies": "18.1.0",
68
68
  "prettier": "3.5.3",
69
69
  "semver": "7.7.1",
70
70
  "typescript": "5.8.2",
71
71
  "validate-npm-package-name": "^6.0.0",
72
- "yarn-workspace-utils": "8.5.0",
72
+ "yarn-workspace-utils": "8.5.1",
73
73
  "yeoman-environment": "4.4.3",
74
74
  "yeoman-generator": "7.5.0"
75
75
  },
76
76
  "devDependencies": {
77
- "@pob/root": "16.9.0",
78
- "@types/node": "22.13.10"
77
+ "@pob/root": "17.1.0",
78
+ "@types/node": "22.15.2"
79
79
  }
80
80
  }