pob 26.9.0 → 26.11.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,31 @@
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
+ ## [26.11.0](https://github.com/christophehurpeau/pob/compare/pob@26.10.0...pob@26.11.0) (2025-03-15)
7
+
8
+ ### Features
9
+
10
+ * **deps:** update yarn monorepo ([#2478](https://github.com/christophehurpeau/pob/issues/2478)) ([8b2de64](https://github.com/christophehurpeau/pob/commit/8b2de64cb6899a76ea716963911644a7b08182ae))
11
+ * yarn 4.7 ([c9fcb63](https://github.com/christophehurpeau/pob/commit/c9fcb6322b8c14393c7632b501f2c48c80c308e9))
12
+
13
+ ### Bug Fixes
14
+
15
+ * fix configure protection rule ([78c4ad3](https://github.com/christophehurpeau/pob/commit/78c4ad331cc820616246cc87374a27cdb0aecc8d))
16
+
17
+ Version bump for dependency: yarn-workspace-utils
18
+ Version bump for dependency: @pob/root
19
+
20
+
21
+ ## [26.10.0](https://github.com/christophehurpeau/pob/compare/pob@26.9.0...pob@26.10.0) (2025-03-14)
22
+
23
+ ### Features
24
+
25
+ * upgrade typescript to version 5.8.2 ([b12f103](https://github.com/christophehurpeau/pob/commit/b12f103cdf8baf93b1a0023ea1a100fc77bdb76b))
26
+
27
+ Version bump for dependency: yarn-workspace-utils
28
+ Version bump for dependency: @pob/root
29
+
30
+
6
31
  ## [26.9.0](https://github.com/christophehurpeau/pob/compare/pob@26.8.0...pob@26.9.0) (2025-02-22)
7
32
 
8
33
  ### Features
@@ -24,27 +24,45 @@ const putJson = (url, jsonBody) =>
24
24
  },
25
25
  }).then((res) => (res.ok ? res.json() : null));
26
26
 
27
- const configureProtectionRule = async (owner, repo, onlyLatestLTS) => {
27
+ const configureProtectionRule = async (
28
+ owner,
29
+ repo,
30
+ onlyLatestLTS,
31
+ spawnCommandSync,
32
+ ) => {
28
33
  if (!ciContexts || ciContexts.length === 0) {
29
34
  throw new Error("Invalid ciContexts: []");
30
35
  }
31
36
 
32
37
  for (const branch of ["main", "master"]) {
33
38
  try {
34
- await putJson(`repos/${owner}/${repo}/branches/${branch}/protection`, {
35
- required_status_checks: {
36
- strict: false,
37
- contexts: ciContexts,
38
- },
39
- enforce_admins: false, // true,
40
- required_pull_request_reviews: null,
41
- restrictions: null,
42
- required_linear_history: true,
43
- allow_force_pushes: true, // false
44
- allow_deletions: false,
45
- });
46
- if (branch === "master") {
47
- console.warn('You should rename your "master" branch to "main"');
39
+ const result = spawnCommandSync(
40
+ "git",
41
+ ["ls-remote", "--heads", `git@github.com:${owner}/${repo}.git`, branch],
42
+ { stdio: "pipe" },
43
+ );
44
+
45
+ const isBranchExists =
46
+ result.exitCode === 0 && result.stdout.toString().trim() !== "";
47
+
48
+ if (isBranchExists) {
49
+ await putJson(`repos/${owner}/${repo}/branches/${branch}/protection`, {
50
+ required_status_checks: {
51
+ strict: false,
52
+ contexts: ciContexts,
53
+ },
54
+ enforce_admins: false, // true,
55
+ required_pull_request_reviews: null,
56
+ restrictions: null,
57
+ required_linear_history: true,
58
+ allow_force_pushes: true, // false
59
+ allow_deletions: false,
60
+ });
61
+ if (branch === "master") {
62
+ console.warn('You should rename your "master" branch to "main"');
63
+ }
64
+ } else if (branch === "main") {
65
+ throw new Error(`Branch ${branch} does not exist`);
48
66
  }
49
67
  } catch (error) {
50
68
  if (branch === "main") {
@@ -167,7 +185,12 @@ export default class CoreGitGithubGenerator extends Generator {
167
185
  cwd,
168
186
  });
169
187
 
170
- configureProtectionRule(owner, repo, this.options.onlyLatestLTS);
188
+ await configureProtectionRule(
189
+ owner,
190
+ repo,
191
+ this.options.onlyLatestLTS,
192
+ this.spawnCommandSync.bind(this),
193
+ );
171
194
 
172
195
  // await gh.put(`/repos/${owner}/${repo}/topics`, {
173
196
  // names: pkg.keywords,
@@ -189,7 +212,12 @@ export default class CoreGitGithubGenerator extends Generator {
189
212
  ...githubRepoConfig,
190
213
  });
191
214
 
192
- configureProtectionRule(owner, repo, this.options.onlyLatestLTS);
215
+ await configureProtectionRule(
216
+ owner,
217
+ repo,
218
+ this.options.onlyLatestLTS,
219
+ this.spawnCommandSync.bind(this),
220
+ );
193
221
  }
194
222
  }
195
223
  }
@@ -135,9 +135,9 @@ export default class CoreYarnGenerator extends Generator {
135
135
  if (
136
136
  !pkg.packageManager ||
137
137
  !pkg.packageManager.startsWith("yarn@") ||
138
- lt(pkg.packageManager.slice("yarn@".length), "4.6.0")
138
+ lt(pkg.packageManager.slice("yarn@".length), "4.7.0")
139
139
  ) {
140
- pkg.packageManager = "yarn@4.6.0";
140
+ pkg.packageManager = "yarn@4.7.0";
141
141
  }
142
142
 
143
143
  // must be done after plugins installed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "26.9.0",
3
+ "version": "26.11.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -41,21 +41,21 @@
41
41
  },
42
42
  "prettier": "@pob/root/prettier-config",
43
43
  "dependencies": {
44
- "@pob/eslint-config": "59.7.0",
45
- "@pob/eslint-config-typescript": "59.7.0",
46
- "@pob/eslint-config-typescript-react": "59.7.0",
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
47
  "@pob/sort-object": "9.0.0",
48
48
  "@pob/sort-pkg": "11.0.1",
49
49
  "@prettier/sync": "0.5.2",
50
50
  "@types/inquirer": "9.0.7",
51
- "@yarnpkg/cli": "4.6.0",
52
- "@yarnpkg/core": "4.2.0",
53
- "@yarnpkg/fslib": "3.1.1",
51
+ "@yarnpkg/cli": "4.7.0",
52
+ "@yarnpkg/core": "4.2.1",
53
+ "@yarnpkg/fslib": "3.1.2",
54
54
  "@yeoman/types": "1.5.0",
55
- "eslint": "9.20.1",
55
+ "eslint": "9.22.0",
56
56
  "findup-sync": "^5.0.0",
57
57
  "git-remote-url": "^1.0.1",
58
- "github-username": "^8.0.0",
58
+ "github-username": "^9.0.0",
59
59
  "js-yaml": "^4.1.0",
60
60
  "json5": "^2.2.3",
61
61
  "lodash.camelcase": "^4.3.0",
@@ -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.7.0",
68
- "prettier": "3.5.2",
67
+ "pob-dependencies": "17.8.1",
68
+ "prettier": "3.5.3",
69
69
  "semver": "7.7.1",
70
- "typescript": "5.7.3",
70
+ "typescript": "5.8.2",
71
71
  "validate-npm-package-name": "^6.0.0",
72
- "yarn-workspace-utils": "8.3.0",
72
+ "yarn-workspace-utils": "8.5.0",
73
73
  "yeoman-environment": "4.4.3",
74
- "yeoman-generator": "7.4.0"
74
+ "yeoman-generator": "7.5.0"
75
75
  },
76
76
  "devDependencies": {
77
- "@pob/root": "16.7.0",
78
- "@types/node": "22.13.5"
77
+ "@pob/root": "16.9.0",
78
+ "@types/node": "22.13.10"
79
79
  }
80
80
  }