pob 23.4.1 → 24.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 +39 -0
- package/lib/generators/app/PobAppGenerator.js +3 -2
- package/lib/generators/app/ignorePaths.js +1 -1
- package/lib/generators/common/babel/CommonBabelGenerator.js +17 -34
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +1 -1
- package/lib/generators/common/testing/CommonTestingGenerator.js +4 -1
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +59 -7
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +5 -2
- package/lib/generators/common/typescript/templates/tsconfig.check-js.json.ejs +1 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +5 -4
- package/lib/generators/core/ci/templates/github-action-documentation-workflow.yml.ejs +1 -1
- package/lib/generators/core/ci/templates/github-action-push-workflow-split.yml.ejs +6 -6
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +10 -10
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +4 -0
- package/lib/generators/core/package/CorePackageGenerator.js +3 -4
- package/lib/utils/node.js +2 -0
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
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
|
+
## [24.1.0](https://github.com/christophehurpeau/pob/compare/pob@24.0.0...pob@24.1.0) (2024-11-12)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **deps:** update dependency eslint to v9.14.0 ([#2304](https://github.com/christophehurpeau/pob/issues/2304)) ([c13cf99](https://github.com/christophehurpeau/pob/commit/c13cf992bab0f261969e258e79aaaa267512a661))
|
|
11
|
+
|
|
12
|
+
Version bump for dependency: @pob/root
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [24.0.0](https://github.com/christophehurpeau/pob/compare/pob@23.4.1...pob@24.0.0) (2024-11-11)
|
|
16
|
+
|
|
17
|
+
### ⚠ BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* drop node 18 and drop @pob/rollup-typescript
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* app distribute ([5f0869f](https://github.com/christophehurpeau/pob/commit/5f0869f6e363de6c709132ddcd859955c5a6d8ec))
|
|
24
|
+
* **deps:** update dependency @yeoman/types to v1.5.0 ([#2200](https://github.com/christophehurpeau/pob/issues/2200)) ([7c03bf2](https://github.com/christophehurpeau/pob/commit/7c03bf2237a8221061fd05b8f25e20feb2808aa7))
|
|
25
|
+
* **deps:** update dependency eslint to v9.12.0 ([#2271](https://github.com/christophehurpeau/pob/issues/2271)) ([e0d67e6](https://github.com/christophehurpeau/pob/commit/e0d67e63ddb9415c4be366d4c196304c25aae7a2))
|
|
26
|
+
* **deps:** update dependency eslint to v9.13.0 ([#2290](https://github.com/christophehurpeau/pob/issues/2290)) ([b7728e1](https://github.com/christophehurpeau/pob/commit/b7728e111a881ef7fcf1bf71da350492f71c712c))
|
|
27
|
+
* **deps:** update dependency github-username to v8 ([#1726](https://github.com/christophehurpeau/pob/issues/1726)) ([83927e1](https://github.com/christophehurpeau/pob/commit/83927e14472c9bb77b2c0b8dd75e3866248ac344))
|
|
28
|
+
* upgrade to node 20/22 ([56661ea](https://github.com/christophehurpeau/pob/commit/56661eafd5bd804ff3b1531be2943bb3cd2e13ce))
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **deps:** update dependency mem-fs to v4.1.1 ([#2280](https://github.com/christophehurpeau/pob/issues/2280)) ([092b564](https://github.com/christophehurpeau/pob/commit/092b564b6c689f6b7896eec809ff47a68bb20f64))
|
|
33
|
+
* **deps:** update dependency mem-fs-editor to v11.1.3 ([#2281](https://github.com/christophehurpeau/pob/issues/2281)) ([8968978](https://github.com/christophehurpeau/pob/commit/8968978c2b36e4dac94c111d9c8be1e1de0333f8))
|
|
34
|
+
* **deps:** update dependency yeoman-environment to v4.4.2 ([#2279](https://github.com/christophehurpeau/pob/issues/2279)) ([53a78eb](https://github.com/christophehurpeau/pob/commit/53a78ebb4fe6f301862655d1ab691e94a8bb9425))
|
|
35
|
+
* **deps:** update yarn monorepo ([#2289](https://github.com/christophehurpeau/pob/issues/2289)) ([ca24ce6](https://github.com/christophehurpeau/pob/commit/ca24ce664fc2dc7b1b9788df324a4047fbd4045d))
|
|
36
|
+
* **deps:** update yeoman group ([#2283](https://github.com/christophehurpeau/pob/issues/2283)) ([0737c2b](https://github.com/christophehurpeau/pob/commit/0737c2b05a937507d6fe2edf233067c4bddd6b76))
|
|
37
|
+
|
|
38
|
+
Version bump for dependency: @pob/sort-eslint-config
|
|
39
|
+
Version bump for dependency: @pob/sort-object
|
|
40
|
+
Version bump for dependency: @pob/sort-pkg
|
|
41
|
+
Version bump for dependency: yarn-workspace-utils
|
|
42
|
+
Version bump for dependency: @pob/root
|
|
43
|
+
|
|
44
|
+
|
|
6
45
|
## [23.4.1](https://github.com/christophehurpeau/pob/compare/pob@23.4.0...pob@23.4.1) (2024-09-29)
|
|
7
46
|
|
|
8
47
|
### Bug Fixes
|
|
@@ -133,6 +133,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
133
133
|
default() {
|
|
134
134
|
const srcDirectory =
|
|
135
135
|
this.appConfig.type === "yarn-plugin" ? "sources" : "src";
|
|
136
|
+
const buildDirectory = this.appConfig.distribute ? "dist" : "build";
|
|
136
137
|
const isAppLibrary =
|
|
137
138
|
this.appConfig.type === "node-library" ||
|
|
138
139
|
this.appConfig.type === "untranspiled-library";
|
|
@@ -151,7 +152,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
151
152
|
testing: this.appConfig.testing,
|
|
152
153
|
documentation: false,
|
|
153
154
|
fromPob: this.options.fromPob,
|
|
154
|
-
buildDirectory
|
|
155
|
+
buildDirectory,
|
|
155
156
|
});
|
|
156
157
|
this.composeWith("pob:common:transpiler", {
|
|
157
158
|
updateOnly: this.options.updateOnly,
|
|
@@ -163,7 +164,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
163
164
|
documentation: false,
|
|
164
165
|
fromPob: this.options.fromPob,
|
|
165
166
|
srcDirectory,
|
|
166
|
-
buildDirectory
|
|
167
|
+
buildDirectory,
|
|
167
168
|
});
|
|
168
169
|
}
|
|
169
170
|
|
|
@@ -12,7 +12,7 @@ export const appIgnorePaths = {
|
|
|
12
12
|
].filter(Boolean),
|
|
13
13
|
remix: (config) => ["# remix paths", "/.cache", "/build", "/public/build"],
|
|
14
14
|
pobpack: (config) => ["/build", "/public"],
|
|
15
|
-
node: (config) => ["/build"],
|
|
15
|
+
node: (config) => (config.distribute ? [] : ["/build"]),
|
|
16
16
|
"node-library": (config) => ["/build"],
|
|
17
17
|
"untranspiled-library": (config) => [],
|
|
18
18
|
"alp-node": (config) => ["/build"],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Generator from "yeoman-generator";
|
|
2
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/node.js";
|
|
2
3
|
import * as packageUtils from "../../../utils/package.js";
|
|
3
4
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
4
5
|
|
|
@@ -69,32 +70,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
69
70
|
((!pkg.pob.bundler && pkg.pob.typescript !== true) ||
|
|
70
71
|
pkg.pob.bundler === "rollup-babel")))
|
|
71
72
|
) {
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
!babelEnvs.some(
|
|
75
|
-
(env) =>
|
|
76
|
-
env.target === "node" &&
|
|
77
|
-
String(env.version) === (this.options.onlyLatestLTS ? "20" : "18"),
|
|
78
|
-
) &&
|
|
79
|
-
babelEnvs.some(
|
|
80
|
-
(env) =>
|
|
81
|
-
env.target === "node" &&
|
|
82
|
-
(["8", "6", "10", "12", "14", "16"].includes(String(env.version)) ||
|
|
83
|
-
(this.options.onlyLatestLTS && String(env.version) === "18")),
|
|
84
|
-
)
|
|
85
|
-
) {
|
|
86
|
-
babelEnvs.unshift({
|
|
87
|
-
target: "node",
|
|
88
|
-
version: this.options.onlyLatestLTS ? "20" : "18",
|
|
89
|
-
omitVersionInFileName: this.options.onlyLatestLTS ? true : undefined,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
babelEnvs = babelEnvs.filter(
|
|
93
|
-
(env) =>
|
|
94
|
-
env.target !== "node" ||
|
|
95
|
-
env.version >= (this.options.onlyLatestLTS ? 20 : 18),
|
|
96
|
-
);
|
|
97
|
-
|
|
73
|
+
const babelEnvs = pkg.pob.babelEnvs || pkg.pob.envs;
|
|
98
74
|
delete pkg.pob.babelEnvs;
|
|
99
75
|
pkg.pob.bundler = "rollup-babel";
|
|
100
76
|
pkg.pob.envs = babelEnvs;
|
|
@@ -128,9 +104,14 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
128
104
|
if (
|
|
129
105
|
env.version === "14" ||
|
|
130
106
|
env.version === "16" ||
|
|
131
|
-
|
|
107
|
+
env.version === "18" ||
|
|
108
|
+
env.version === "20" ||
|
|
109
|
+
(this.options.onlyLatestLTS &&
|
|
110
|
+
env.version === `${maintenanceLTS}`)
|
|
132
111
|
) {
|
|
133
|
-
return this.options.onlyLatestLTS
|
|
112
|
+
return this.options.onlyLatestLTS
|
|
113
|
+
? `${latestLTS}`
|
|
114
|
+
: `${maintenanceLTS}`;
|
|
134
115
|
}
|
|
135
116
|
return env.version;
|
|
136
117
|
}),
|
|
@@ -181,12 +162,12 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
181
162
|
default: nodeVersions,
|
|
182
163
|
choices: [
|
|
183
164
|
{
|
|
184
|
-
name: "
|
|
185
|
-
value:
|
|
165
|
+
name: "22 (Active LTS)",
|
|
166
|
+
value: `${latestLTS}`,
|
|
186
167
|
},
|
|
187
168
|
{
|
|
188
|
-
name: "
|
|
189
|
-
value:
|
|
169
|
+
name: "20 (Maintenance LTS)",
|
|
170
|
+
value: `${maintenanceLTS}`,
|
|
190
171
|
},
|
|
191
172
|
],
|
|
192
173
|
},
|
|
@@ -231,13 +212,15 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
231
212
|
formats:
|
|
232
213
|
babelConfig.formats && babelConfig.formats.includes("cjs")
|
|
233
214
|
? // eslint-disable-next-line unicorn/no-nested-ternary
|
|
234
|
-
version ===
|
|
215
|
+
version === `${latestLTS}` || version === `${maintenanceLTS}`
|
|
235
216
|
? babelConfig.formats
|
|
236
217
|
: undefined
|
|
237
218
|
: undefined,
|
|
238
219
|
omitVersionInFileName:
|
|
239
220
|
// todo add `|| babelConfig.nodeVersions.length === 1` in next major
|
|
240
|
-
version ===
|
|
221
|
+
version === `${latestLTS}` && this.options.onlyLatestLTS
|
|
222
|
+
? true
|
|
223
|
+
: undefined,
|
|
241
224
|
})),
|
|
242
225
|
...(babelConfig.browserVersions || []).map((version) => ({
|
|
243
226
|
target: "browser",
|
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import Generator from "yeoman-generator";
|
|
4
4
|
import inMonorepo from "../../../utils/inMonorepo.js";
|
|
5
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/node.js";
|
|
5
6
|
import * as packageUtils from "../../../utils/package.js";
|
|
6
7
|
import {
|
|
7
8
|
copyAndFormatTpl,
|
|
@@ -487,7 +488,9 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
487
488
|
} else {
|
|
488
489
|
const tsconfigTestPath = this.destinationPath("tsconfig.test.json");
|
|
489
490
|
if (testRunner === "node" && withTypescript) {
|
|
490
|
-
const nodeVersion = this.options.onlyLatestLTS
|
|
491
|
+
const nodeVersion = this.options.onlyLatestLTS
|
|
492
|
+
? `${latestLTS}`
|
|
493
|
+
: `${maintenanceLTS}`;
|
|
491
494
|
copyAndFormatTpl(
|
|
492
495
|
this.fs,
|
|
493
496
|
this.templatePath("tsconfig.test.json.ejs"),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import semver from "semver";
|
|
3
3
|
import Generator from "yeoman-generator";
|
|
4
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/node.js";
|
|
4
5
|
import * as packageUtils from "../../../utils/package.js";
|
|
5
6
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
6
7
|
|
|
@@ -514,9 +515,51 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
514
515
|
writing() {
|
|
515
516
|
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
516
517
|
const entries = pkg.pob.entries || ["index"];
|
|
517
|
-
|
|
518
|
+
let envs = pkg.pob.envs || pkg.pob.babelEnvs;
|
|
518
519
|
delete pkg.pob.withReact;
|
|
519
520
|
|
|
521
|
+
if (envs) {
|
|
522
|
+
if (
|
|
523
|
+
!envs.some(
|
|
524
|
+
(env) =>
|
|
525
|
+
env.target === "node" &&
|
|
526
|
+
String(env.version) ===
|
|
527
|
+
(this.options.onlyLatestLTS
|
|
528
|
+
? `${latestLTS}`
|
|
529
|
+
: `${maintenanceLTS}`),
|
|
530
|
+
) &&
|
|
531
|
+
envs.some(
|
|
532
|
+
(env) =>
|
|
533
|
+
env.target === "node" &&
|
|
534
|
+
(["8", "6", "10", "12", "14", "16", "18"].includes(
|
|
535
|
+
String(env.version),
|
|
536
|
+
) ||
|
|
537
|
+
(this.options.onlyLatestLTS &&
|
|
538
|
+
String(env.version) === `${maintenanceLTS}`)),
|
|
539
|
+
)
|
|
540
|
+
) {
|
|
541
|
+
envs.unshift({
|
|
542
|
+
target: "node",
|
|
543
|
+
version: this.options.onlyLatestLTS
|
|
544
|
+
? `${latestLTS}`
|
|
545
|
+
: `${maintenanceLTS}`,
|
|
546
|
+
omitVersionInFileName: this.options.onlyLatestLTS ? true : undefined,
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
envs = envs.filter(
|
|
550
|
+
(env) =>
|
|
551
|
+
env.target !== "node" ||
|
|
552
|
+
env.version >=
|
|
553
|
+
(this.options.onlyLatestLTS ? latestLTS : maintenanceLTS),
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
if (pkg.pob.babelEnvs) {
|
|
557
|
+
pkg.pob.babelEnvs = envs;
|
|
558
|
+
} else {
|
|
559
|
+
pkg.pob.envs = envs;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
520
563
|
const hasTargetNode = envs && envs.some((env) => env.target === "node");
|
|
521
564
|
|
|
522
565
|
if (!pkg.engines) pkg.engines = {};
|
|
@@ -528,8 +571,10 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
528
571
|
.filter((env) => env.target === "node")
|
|
529
572
|
.map((env) => env.version),
|
|
530
573
|
)
|
|
531
|
-
:
|
|
532
|
-
|
|
574
|
+
: (() =>
|
|
575
|
+
this.options.onlyLatestLTS
|
|
576
|
+
? `${latestLTS}`
|
|
577
|
+
: `${maintenanceLTS}`)();
|
|
533
578
|
|
|
534
579
|
switch (String(minNodeVersion)) {
|
|
535
580
|
case "10":
|
|
@@ -537,10 +582,17 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
537
582
|
case "14":
|
|
538
583
|
case "16":
|
|
539
584
|
case "18":
|
|
540
|
-
pkg.engines.node = ">=18.12.0";
|
|
541
|
-
break;
|
|
542
585
|
case "20":
|
|
543
|
-
|
|
586
|
+
if (
|
|
587
|
+
envs ||
|
|
588
|
+
!pkg.engines.node ||
|
|
589
|
+
!pkg.engines.node.startsWith(">=22")
|
|
590
|
+
) {
|
|
591
|
+
pkg.engines.node = ">=20.9.0";
|
|
592
|
+
}
|
|
593
|
+
break;
|
|
594
|
+
case "22":
|
|
595
|
+
pkg.engines.node = ">=22.11.0";
|
|
544
596
|
break;
|
|
545
597
|
default:
|
|
546
598
|
throw new Error(`Invalid min node version: ${minNodeVersion}`);
|
|
@@ -564,7 +616,7 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
564
616
|
packageUtils.removeDevDependencies(pkg, ["@types/node"]);
|
|
565
617
|
|
|
566
618
|
// Supports oldest current or active LTS version of node
|
|
567
|
-
const minVersion = this.options.onlyLatestLTS ? "
|
|
619
|
+
const minVersion = this.options.onlyLatestLTS ? "22.11.0" : "20.9.0";
|
|
568
620
|
|
|
569
621
|
if (
|
|
570
622
|
!pkg.engines.node ||
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import Generator from "yeoman-generator";
|
|
3
3
|
import inMonorepo from "../../../utils/inMonorepo.js";
|
|
4
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/node.js";
|
|
4
5
|
import * as packageUtils from "../../../utils/package.js";
|
|
5
6
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
6
7
|
|
|
@@ -139,11 +140,13 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
139
140
|
: ["@pob/root/tsconfigs/targets/rollup-babel.json"];
|
|
140
141
|
}
|
|
141
142
|
if (withTypescript) {
|
|
142
|
-
const nodeVersion = this.options.onlyLatestLTS
|
|
143
|
+
const nodeVersion = this.options.onlyLatestLTS
|
|
144
|
+
? `${latestLTS}`
|
|
145
|
+
: `${maintenanceLTS}`;
|
|
143
146
|
const envs = pkg.pob?.envs || [
|
|
144
147
|
{
|
|
145
148
|
target: "node",
|
|
146
|
-
version:
|
|
149
|
+
version: `${maintenanceLTS}`,
|
|
147
150
|
},
|
|
148
151
|
];
|
|
149
152
|
if (pkg.pob.rollup === false || pkg.pob.bundler === false) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import Generator from "yeoman-generator";
|
|
3
3
|
import inMonorepo from "../../../utils/inMonorepo.js";
|
|
4
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/node.js";
|
|
4
5
|
import * as packageUtils from "../../../utils/package.js";
|
|
5
6
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
6
7
|
|
|
@@ -179,12 +180,12 @@ export default class CoreCIGenerator extends Generator {
|
|
|
179
180
|
checks && "checks",
|
|
180
181
|
build && "build",
|
|
181
182
|
"lint",
|
|
182
|
-
testing && !this.options.onlyLatestLTS &&
|
|
183
|
-
testing &&
|
|
183
|
+
testing && !this.options.onlyLatestLTS && `test (${latestLTS})`,
|
|
184
|
+
testing && `test (${maintenanceLTS})`,
|
|
184
185
|
].filter(Boolean)
|
|
185
186
|
: [
|
|
186
|
-
!this.options.onlyLatestLTS &&
|
|
187
|
-
|
|
187
|
+
!this.options.onlyLatestLTS && `build (${maintenanceLTS}.x)`,
|
|
188
|
+
`build (${maintenanceLTS}.x)`,
|
|
188
189
|
].filter(Boolean)),
|
|
189
190
|
);
|
|
190
191
|
} else {
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
- uses: actions/setup-node@v4
|
|
14
14
|
with:
|
|
15
|
-
node-version:
|
|
15
|
+
node-version: 22
|
|
16
16
|
|
|
17
17
|
- name: Enable Corepack
|
|
18
18
|
run: corepack enable
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
|
|
38
38
|
- uses: actions/setup-node@v4
|
|
39
39
|
with:
|
|
40
|
-
node-version:
|
|
40
|
+
node-version: 22
|
|
41
41
|
|
|
42
42
|
- name: Enable Corepack
|
|
43
43
|
run: corepack enable
|
|
@@ -64,7 +64,7 @@ jobs:
|
|
|
64
64
|
|
|
65
65
|
- uses: actions/setup-node@v4
|
|
66
66
|
with:
|
|
67
|
-
node-version:
|
|
67
|
+
node-version: 22
|
|
68
68
|
|
|
69
69
|
- name: Enable Corepack
|
|
70
70
|
run: corepack enable
|
|
@@ -93,7 +93,7 @@ jobs:
|
|
|
93
93
|
|
|
94
94
|
strategy:
|
|
95
95
|
matrix:
|
|
96
|
-
node-version: [
|
|
96
|
+
node-version: [20, 22]
|
|
97
97
|
|
|
98
98
|
steps:
|
|
99
99
|
- uses: actions/checkout@v4
|
|
@@ -142,7 +142,7 @@ jobs:
|
|
|
142
142
|
|
|
143
143
|
strategy:
|
|
144
144
|
matrix:
|
|
145
|
-
node-version: [
|
|
145
|
+
node-version: [22]
|
|
146
146
|
|
|
147
147
|
steps:
|
|
148
148
|
- uses: actions/checkout@v4
|
|
@@ -175,7 +175,7 @@ jobs:
|
|
|
175
175
|
|
|
176
176
|
- uses: actions/setup-node@v4
|
|
177
177
|
with:
|
|
178
|
-
node-version:
|
|
178
|
+
node-version: 22
|
|
179
179
|
|
|
180
180
|
- uses: GoogleCloudPlatform/release-please-action@v3
|
|
181
181
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
@@ -8,7 +8,7 @@ jobs:
|
|
|
8
8
|
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
|
-
node-version: [<% if (!onlyLatestLTS) { -%>
|
|
11
|
+
node-version: [<% if (!onlyLatestLTS) { -%>20.x, <% } -%>22.x]
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v4
|
|
@@ -42,27 +42,27 @@ jobs:
|
|
|
42
42
|
<% if (build) { -%>
|
|
43
43
|
- name: Build
|
|
44
44
|
run: yarn run build
|
|
45
|
-
if: startsWith(matrix.node-version, '
|
|
45
|
+
if: startsWith(matrix.node-version, '22.')
|
|
46
46
|
|
|
47
47
|
<% } -%>
|
|
48
48
|
- name: Prettier
|
|
49
49
|
run: <%= packageManager %> run lint:prettier
|
|
50
|
-
if: startsWith(matrix.node-version, '
|
|
50
|
+
if: startsWith(matrix.node-version, '22.')
|
|
51
51
|
<% if (typescript) { -%>
|
|
52
52
|
|
|
53
53
|
- name: Typescript
|
|
54
54
|
run: yarn run tsc
|
|
55
|
-
if: startsWith(matrix.node-version, '
|
|
55
|
+
if: startsWith(matrix.node-version, '22.')
|
|
56
56
|
<% } -%>
|
|
57
57
|
|
|
58
58
|
- name: Eslint
|
|
59
59
|
run: <%= packageManager %> run lint:eslint
|
|
60
|
-
if: startsWith(matrix.node-version, '
|
|
60
|
+
if: startsWith(matrix.node-version, '22.')
|
|
61
61
|
<% if (codecov) { -%>
|
|
62
62
|
|
|
63
63
|
- name: Generate Test Coverage
|
|
64
64
|
run: <%= packageManager %> run test:coverage:json
|
|
65
|
-
if: startsWith(matrix.node-version, '
|
|
65
|
+
if: startsWith(matrix.node-version, '22.')
|
|
66
66
|
env:
|
|
67
67
|
CI: true
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
with:
|
|
72
72
|
fail_ci_if_error: true
|
|
73
73
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
74
|
-
if: startsWith(matrix.node-version, '
|
|
74
|
+
if: startsWith(matrix.node-version, '22.')
|
|
75
75
|
<% } else if (testing) { -%>
|
|
76
76
|
|
|
77
77
|
- name: Test
|
|
@@ -87,13 +87,13 @@ jobs:
|
|
|
87
87
|
<% if (true) { -%>
|
|
88
88
|
|
|
89
89
|
- name: Check nothing was forgotten before commit
|
|
90
|
-
if: startsWith(matrix.node-version, '
|
|
90
|
+
if: startsWith(matrix.node-version, '22.')
|
|
91
91
|
run: <%= packageManager === 'npm' ? 'npx' : 'yarn run' %> repository-check-dirty
|
|
92
92
|
<% } -%>
|
|
93
93
|
|
|
94
94
|
<% if (isReleasePleaseEnabled) { -%>
|
|
95
95
|
- uses: GoogleCloudPlatform/release-please-action@v3
|
|
96
|
-
if: ${{ startsWith(matrix.node-version, '
|
|
96
|
+
if: ${{ startsWith(matrix.node-version, '22.') && github.ref == 'refs/heads/main' }}
|
|
97
97
|
id: release
|
|
98
98
|
with:
|
|
99
99
|
token: ${{ secrets.GH_TOKEN }}
|
|
@@ -103,7 +103,7 @@ jobs:
|
|
|
103
103
|
|
|
104
104
|
# publish:
|
|
105
105
|
- run: npm publish
|
|
106
|
-
if: ${{ startsWith(matrix.node-version, '
|
|
106
|
+
if: ${{ startsWith(matrix.node-version, '22.') && github.ref == 'refs/heads/main' && steps.release.outputs.release_created }}
|
|
107
107
|
env:
|
|
108
108
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
109
109
|
<% } -%>
|
|
@@ -25,6 +25,10 @@ const putJson = (url, jsonBody) =>
|
|
|
25
25
|
}).then((res) => (res.ok ? res.json() : null));
|
|
26
26
|
|
|
27
27
|
const configureProtectionRule = async (owner, repo, onlyLatestLTS) => {
|
|
28
|
+
if (!ciContexts || ciContexts.length === 0) {
|
|
29
|
+
throw new Error("Invalid ciContexts: []");
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
for (const branch of ["main", "master"]) {
|
|
29
33
|
try {
|
|
30
34
|
await putJson(`repos/${owner}/${repo}/branches/${branch}/protection`, {
|
|
@@ -53,13 +53,12 @@ export default class CorePackageGenerator extends Generator {
|
|
|
53
53
|
if (
|
|
54
54
|
!pkg.engines.node ||
|
|
55
55
|
!(
|
|
56
|
-
pkg.engines.node.startsWith(">=
|
|
57
|
-
pkg.engines.node.startsWith(">=
|
|
58
|
-
pkg.engines.node !== ">=18.0.0"
|
|
56
|
+
pkg.engines.node.startsWith(">=22.") ||
|
|
57
|
+
pkg.engines.node.startsWith(">=20.")
|
|
59
58
|
)
|
|
60
59
|
) {
|
|
61
60
|
// this might be overridden by babel generator
|
|
62
|
-
pkg.engines.node = ">=
|
|
61
|
+
pkg.engines.node = ">=20.9.0"; // .9.0 is the first lts node 20 version
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
if (!this.options.isRoot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=22.11.0"
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"bin": "./lib/pob.js",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"@pob/eslint-config": "58.1.0",
|
|
45
45
|
"@pob/eslint-config-typescript": "58.1.0",
|
|
46
46
|
"@pob/eslint-config-typescript-react": "58.1.0",
|
|
47
|
-
"@pob/sort-eslint-config": "
|
|
48
|
-
"@pob/sort-object": "
|
|
49
|
-
"@pob/sort-pkg": "
|
|
47
|
+
"@pob/sort-eslint-config": "7.0.0",
|
|
48
|
+
"@pob/sort-object": "8.0.0",
|
|
49
|
+
"@pob/sort-pkg": "9.0.0",
|
|
50
50
|
"@prettier/sync": "0.5.2",
|
|
51
51
|
"@types/inquirer": "9.0.7",
|
|
52
|
-
"@yarnpkg/cli": "4.5.
|
|
53
|
-
"@yarnpkg/core": "4.1.
|
|
52
|
+
"@yarnpkg/cli": "4.5.1",
|
|
53
|
+
"@yarnpkg/core": "4.1.4",
|
|
54
54
|
"@yarnpkg/fslib": "3.1.0",
|
|
55
|
-
"@yeoman/types": "1.
|
|
56
|
-
"eslint": "9.
|
|
55
|
+
"@yeoman/types": "1.5.0",
|
|
56
|
+
"eslint": "9.14.0",
|
|
57
57
|
"findup-sync": "^5.0.0",
|
|
58
58
|
"git-remote-url": "^1.0.1",
|
|
59
59
|
"github-username": "^7.0.0",
|
|
@@ -61,21 +61,21 @@
|
|
|
61
61
|
"json5": "^2.2.3",
|
|
62
62
|
"lodash.camelcase": "^4.3.0",
|
|
63
63
|
"lodash.kebabcase": "^4.1.1",
|
|
64
|
-
"mem-fs": "4.1.
|
|
65
|
-
"mem-fs-editor": "11.1.
|
|
64
|
+
"mem-fs": "4.1.1",
|
|
65
|
+
"mem-fs-editor": "11.1.3",
|
|
66
66
|
"minimist": "1.2.8",
|
|
67
67
|
"parse-author": "2.0.0",
|
|
68
|
-
"pob-dependencies": "
|
|
68
|
+
"pob-dependencies": "15.1.0",
|
|
69
69
|
"prettier": "3.3.3",
|
|
70
70
|
"semver": "7.6.3",
|
|
71
71
|
"validate-npm-package-name": "^6.0.0",
|
|
72
|
-
"yarn-workspace-utils": "
|
|
73
|
-
"yeoman-environment": "4.4.
|
|
74
|
-
"yeoman-generator": "7.3.
|
|
72
|
+
"yarn-workspace-utils": "7.0.0",
|
|
73
|
+
"yeoman-environment": "4.4.3",
|
|
74
|
+
"yeoman-generator": "7.3.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@pob/root": "
|
|
78
|
-
"@types/node": "
|
|
79
|
-
"typescript": "5.6.
|
|
77
|
+
"@pob/root": "14.0.1",
|
|
78
|
+
"@types/node": "22.9.0",
|
|
79
|
+
"typescript": "5.6.3"
|
|
80
80
|
}
|
|
81
81
|
}
|