pob 30.0.0 → 31.0.1

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,41 @@
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
+ ## [31.0.1](https://github.com/christophehurpeau/pob/compare/pob@31.0.0...pob@31.0.1) (2025-12-06)
7
+
8
+ ### Bug Fixes
9
+
10
+ * update all workflows
11
+ * update workflow-release ejs
12
+
13
+ Version bump for dependency: @pob/root
14
+
15
+
16
+ ## [31.0.0](https://github.com/christophehurpeau/pob/compare/pob@30.0.0...pob@31.0.0) (2025-12-06)
17
+
18
+ ### ⚠ BREAKING CHANGES
19
+
20
+ * migrate pob-version to @pob/version and add initial bun support
21
+
22
+ ### Features
23
+
24
+ * add bunfig.toml with minimumReleaseAge
25
+ * add npmMinimalAgeGate in yarn config
26
+ * add npmMinimumReleaseAgeExclude option to CoreYarnGenerator
27
+ * add quoteArg utility function and update script paths in generators
28
+ * migrate pob-version to @pob/version and add initial bun support
29
+ * try to implement publish with bun
30
+ * update npmPreapprovedPackages in CoreYarnGenerator
31
+
32
+ ### Bug Fixes
33
+
34
+ * simplify script path handling in CommonLintGenerator and CommonTestingGenerator
35
+
36
+ Version bump for dependency: @pob/sort-object
37
+ Version bump for dependency: @pob/sort-pkg
38
+ Version bump for dependency: @pob/root
39
+
40
+
6
41
  ## [30.0.0](https://github.com/christophehurpeau/pob/compare/pob@29.9.0...pob@30.0.0) (2025-11-24)
7
42
 
8
43
  ### ⚠ BREAKING CHANGES
@@ -1,5 +1,6 @@
1
1
  import path from "node:path";
2
2
  import Generator from "yeoman-generator";
3
+ import { quoteArg } from "../../../utils/execUtils.js";
3
4
  import inMonorepo from "../../../utils/inMonorepo.js";
4
5
  import * as packageUtils from "../../../utils/package.js";
5
6
  import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
@@ -522,9 +523,7 @@ export default class CommonFormatLintGenerator extends Generator {
522
523
 
523
524
  packageUtils.addScripts(pkg, {
524
525
  "lint:eslint": globalEslint
525
- ? `yarn ../.. run eslint ${args} ${path
526
- .relative("../..", ".")
527
- .replace("\\", "/")}`
526
+ ? `yarn ../.. run eslint ${args} ${quoteArg(path.relative("../..", "."))}`
528
527
  : `eslint ${args} .`,
529
528
  lint: `${
530
529
  useTypescript && !composite ? "tsc && " : ""
@@ -69,16 +69,11 @@ export default class CommonReleaseGenerator extends Generator {
69
69
  const pkg = this.fs.readJSON(this.destinationPath("package.json"));
70
70
 
71
71
  if (this.options.enable && this.options.ci) {
72
- const useLegacyName = this.fs.exists(
73
- this.destinationPath(".github/workflows/publish.yml"),
74
- );
75
-
76
- const name = useLegacyName ? "publish.yml" : "release.yml";
72
+ this.fs.delete(this.destinationPath(".github/workflows/publish.yml"));
77
73
 
78
- // TODO rename release (release = version + publish)
79
74
  this.fs.copyTpl(
80
75
  this.templatePath("workflow-release.yml.ejs"),
81
- this.destinationPath(`.github/workflows/${name}`),
76
+ this.destinationPath(".github/workflows/release.yml"),
82
77
  {
83
78
  packageManager: this.options.packageManager,
84
79
  enablePublish: this.options.enablePublish,
@@ -24,13 +24,17 @@ on:
24
24
  default: "major"
25
25
  <% } -%>
26
26
 
27
+ permissions:
28
+ id-token: write # Required for OIDC
29
+ contents: write
30
+
27
31
  jobs:
28
32
  release:
29
33
  runs-on: ubuntu-latest
30
34
  steps:
31
35
  - uses: actions/checkout@v5
32
36
  with:
33
- token: ${{ secrets.GH_TOKEN }}
37
+ ssh-key: ${{ secrets.PUSH_DEPLOY_KEY }}
34
38
  fetch-depth: 0
35
39
  fetch-tags: true
36
40
  <% if (packageManager === 'yarn') { -%>
@@ -73,7 +77,7 @@ jobs:
73
77
 
74
78
  - name: New version (dry run)
75
79
  if: github.ref == 'refs/heads/main' && inputs.dry-run
76
- run: yarn yarn-version version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
80
+ run: <%= packageManager %> run pob-version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
77
81
 
78
82
  - name: Configure Git user
79
83
  if: github.ref == 'refs/heads/main' && !inputs.dry-run
@@ -84,27 +88,27 @@ jobs:
84
88
  - name: New version
85
89
  if: github.ref == 'refs/heads/main' && !inputs.dry-run
86
90
  run: |
87
- yarn yarn-version version --create-release=github <% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %> -m 'chore: release <%- isMonorepoIndependent ? '' : '%v ' %>[skip ci]<%- isMonorepoIndependent ? '\\n\\n%t' : '' %>'
91
+ <%= packageManager %> run pob-version <% if (enablePublish && packageManager === "bun") { %>--publish <% } %>--create-release=github <% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %> -m 'chore: release <%- isMonorepoIndependent ? '' : '%v ' %>[skip ci]<%- isMonorepoIndependent ? '\\n\\n%t' : '' %>'
88
92
  env:
89
93
  HUSKY: 0
90
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
91
94
  YARN_ENABLE_IMMUTABLE_INSTALLS: false
92
- <% if (enablePublish) { -%>
95
+ GH_TOKEN: {{ secrets.GITHUB_TOKEN }}
96
+ <% if (enablePublish && packageManager === "yarn") { -%>
93
97
 
94
98
  - name: Publish to npm
99
+ if: github.ref == 'refs/heads/main' && !inputs.dry-run
95
100
  run: |
96
- if [ -z "$NODE_AUTH_TOKEN" ]; then
97
- echo "Missing env variable NODE_AUTH_TOKEN"
101
+ if [ -z "$NPM_AUTH_TOKEN" ]; then
102
+ echo "Missing env variable NPM_AUTH_TOKEN"
98
103
  exit 1
99
104
  fi
100
105
  echo >> ./.yarnrc.yml
101
- echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
106
+ echo "npmAuthToken: $NPM_AUTH_TOKEN" >> ./.yarnrc.yml
102
107
  <% if (isMonorepo) { -%>
103
108
  yarn workspaces foreach --all --parallel --no-private npm publish --tolerate-republish
104
109
  <% } else { -%>
105
110
  yarn npm publish
106
111
  <% } -%>
107
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
108
112
  env:
109
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
113
+ NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
110
114
  <% } -%>
@@ -1,6 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import Generator from "yeoman-generator";
4
+ import { quoteArg } from "../../../utils/execUtils.js";
4
5
  import inMonorepo from "../../../utils/inMonorepo.js";
5
6
  import * as packageUtils from "../../../utils/package.js";
6
7
  import {
@@ -446,9 +447,7 @@ export default class CommonTestingGenerator extends Generator {
446
447
  delete pkg.scripts["test:coverage"];
447
448
  }
448
449
  packageUtils.addScripts(pkg, {
449
- test: `yarn ../../ run test -- ${path
450
- .relative("../..", ".")
451
- .replace("\\", "/")}`,
450
+ test: `yarn ../../ run test -- ${quoteArg(path.relative("../..", "."))}`,
452
451
  });
453
452
  } else {
454
453
  const withTypescript =
@@ -27,8 +27,14 @@ export default class CoreBunGenerator extends Generator {
27
27
  const pkg = this.fs.readJSON(this.destinationPath("package.json"));
28
28
 
29
29
  if (this.options.enable) {
30
+ this.fs.copyTpl(
31
+ this.templatePath("bunfig.toml.ejs"),
32
+ this.destinationPath("bunfig.toml"),
33
+ {},
34
+ );
30
35
  } else {
31
36
  this.fs.delete("bun.lock");
37
+ this.fs.delete("bunfig.toml");
32
38
  }
33
39
 
34
40
  this.fs.writeJSON(this.destinationPath("package.json"), pkg);
@@ -0,0 +1,3 @@
1
+ [install]
2
+ # Only install package versions published at least 3 days ago
3
+ minimumReleaseAge = 259200 # seconds - in #23162 it'll allow "3d" too
@@ -159,7 +159,7 @@ export default class CoreYarnGenerator extends Generator {
159
159
  // leave default compressionLevel instead of this next line
160
160
  delete config.compressionLevel;
161
161
  // config.compressionLevel = "mixed"; // optimized for size
162
- config.enableGlobalCache = "true";
162
+ config.enableGlobalCache = true;
163
163
  delete config.supportedArchitectures;
164
164
  } else {
165
165
  config.compressionLevel = 0; // optimized for github config
@@ -175,6 +175,14 @@ export default class CoreYarnGenerator extends Generator {
175
175
  config.defaultSemverRangePrefix = this.options.type === "app" ? "" : "^";
176
176
  delete config.enableMessageNames; // was a config for yarn < 4
177
177
  config.nodeLinker = this.options.yarnNodeLinker;
178
+ config.npmMinimalAgeGate = 1440 * 3; // 3 days
179
+ config.npmPreapprovedPackages = [
180
+ "@pob/*",
181
+ "alouette",
182
+ "alouette-icons",
183
+ "nightingale",
184
+ "nightingale-logger",
185
+ ];
178
186
 
179
187
  if (config.yarnPath) {
180
188
  this.fs.delete(config.yarnPath);
@@ -0,0 +1,3 @@
1
+ export const quoteArg = (s) => {
2
+ return `'${s.replace(/'/g, "'\"'")}'`;
3
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "30.0.0",
3
+ "version": "31.0.1",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -36,7 +36,7 @@
36
36
  "build:definitions": "tsc -p tsconfig.json",
37
37
  "format": "prettier --write",
38
38
  "lint": "yarn run lint:eslint",
39
- "lint:eslint": "yarn ../.. run eslint --quiet packages/pob"
39
+ "lint:eslint": "yarn ../.. run eslint --quiet 'packages/pob'"
40
40
  },
41
41
  "pob": {
42
42
  "typescript": "check-only"
@@ -46,8 +46,8 @@
46
46
  "@pob/eslint-config": "62.0.0",
47
47
  "@pob/eslint-config-typescript": "62.0.0",
48
48
  "@pob/eslint-config-typescript-react": "62.0.0",
49
- "@pob/sort-object": "10.1.0",
50
- "@pob/sort-pkg": "12.1.0",
49
+ "@pob/sort-object": "10.1.1",
50
+ "@pob/sort-pkg": "12.1.1",
51
51
  "@prettier/sync": "0.6.1",
52
52
  "@types/inquirer": "9.0.9",
53
53
  "@yeoman/adapter": "3.1.0",
@@ -64,7 +64,7 @@
64
64
  "mem-fs-editor": "11.1.4",
65
65
  "minimist": "1.2.8",
66
66
  "parse-author": "2.0.0",
67
- "pob-dependencies": "21.0.0",
67
+ "pob-dependencies": "21.0.1",
68
68
  "prettier": "3.6.2",
69
69
  "semver": "7.7.3",
70
70
  "typescript": "5.9.3",
@@ -73,7 +73,7 @@
73
73
  "yeoman-generator": "7.5.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@pob/root": "20.0.0",
76
+ "@pob/root": "20.0.2",
77
77
  "@types/node": "22.19.1"
78
78
  }
79
79
  }