pob 28.3.0 → 29.0.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 +48 -0
- package/lib/generators/app/PobAppGenerator.js +26 -14
- package/lib/generators/app/ignorePaths.js +1 -1
- package/lib/generators/app/vite/AppViteGenerator.js +17 -0
- package/lib/generators/common/babel/CommonBabelGenerator.js +14 -7
- package/lib/generators/common/release/CommonReleaseGenerator.js +2 -0
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +1 -1
- package/lib/generators/common/testing/CommonTestingGenerator.js +3 -26
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +165 -110
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +12 -5
- package/lib/generators/common/typescript/templates/tsconfig.check-js.json.ejs +1 -1
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +6 -4
- package/lib/generators/core/ci/CoreCIGenerator.js +4 -1
- 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 +9 -9
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +11 -11
- package/lib/generators/core/git/CoreGitGenerator.js +7 -0
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +8 -6
- package/lib/generators/core/package/CorePackageGenerator.js +3 -3
- package/lib/generators/core/yarn/CoreYarnGenerator.js +2 -2
- package/lib/generators/lib/PobLibGenerator.js +15 -14
- package/lib/generators/monorepo/PobMonorepoGenerator.js +1 -0
- package/lib/generators/monorepo/typescript/MonorepoTypescriptGenerator.js +7 -16
- package/lib/generators/pob/PobBaseGenerator.js +24 -1
- package/lib/pob.js +6 -0
- package/lib/utils/nodeVersions.js +2 -0
- package/package.json +12 -12
- package/lib/generators/common/testing/templates/tsconfig.test.json.ejs +0 -10
- package/lib/utils/node.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
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
|
+
## [29.0.0](https://github.com/christophehurpeau/pob/compare/pob@28.4.0...pob@29.0.0) (2025-08-24)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* drop node 20
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* drop node 20 ([bb57350](https://github.com/christophehurpeau/pob/commit/bb573502c71f7316a54b4ce75203c05c0ba2e681))
|
|
15
|
+
* update CI node version references ([df90418](https://github.com/christophehurpeau/pob/commit/df9041811b28c88e6334288f308f7a5d9b4bdd07))
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* comment out removal of alp-rollup-plugin-config dependency in CommonBabelGenerator ([8e496f5](https://github.com/christophehurpeau/pob/commit/8e496f5d1981e5875aee148c063a0c0002a097b2))
|
|
20
|
+
* only apply tsconfig.test.ts if this.options.onlyLatestLTS is disabled ([da85d7a](https://github.com/christophehurpeau/pob/commit/da85d7a9077d2b23cbf35406a364b5500f942c10))
|
|
21
|
+
* refactor environment handling in CommonTranspilerGenerator to use envsWithDefault for improved clarity and maintainability ([4421be3](https://github.com/christophehurpeau/pob/commit/4421be37a8098fc13ad29175288a2d036a99264d))
|
|
22
|
+
* remove unnecessary tsconfig.test.json handling in MonorepoTypescriptGenerator ([453c5da](https://github.com/christophehurpeau/pob/commit/453c5da00a8269a8451e61ffb8b729d28169a020))
|
|
23
|
+
* update moduleResolution in tsconfig to use 'bundler' for better compatibility ([141e0d3](https://github.com/christophehurpeau/pob/commit/141e0d39b62894b1dadd9aef7256f8060c9cc1bf))
|
|
24
|
+
* update pkg options before to allow proper order and remove @babel/core @babel/runtime on pob-babel disable ([560002c](https://github.com/christophehurpeau/pob/commit/560002c2076e6f263cabd78c1a0dc9540a2f2b0a))
|
|
25
|
+
|
|
26
|
+
Version bump for dependency: @pob/sort-object
|
|
27
|
+
Version bump for dependency: @pob/sort-pkg
|
|
28
|
+
Version bump for dependency: yarn-workspace-utils
|
|
29
|
+
Version bump for dependency: @pob/root
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [28.4.0](https://github.com/christophehurpeau/pob/compare/pob@28.3.0...pob@28.4.0) (2025-08-23)
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* add browser support to CommonTranspilerGenerator and update browserslist configuration ([3998b43](https://github.com/christophehurpeau/pob/commit/3998b43fda998d21cfebb6c3fc76bffdd28d74ae))
|
|
37
|
+
* add support for browser target in CommonTypescriptGenerator ([ef8b376](https://github.com/christophehurpeau/pob/commit/ef8b376a3c46338df7c7699d72b922094f404a10))
|
|
38
|
+
* add vite generator and remove legacy pobpack ([fe1fbd7](https://github.com/christophehurpeau/pob/commit/fe1fbd775aba7f3b7ef84d75ea810ca3c981b1b7))
|
|
39
|
+
* disable composite for apps ([ef68e9c](https://github.com/christophehurpeau/pob/commit/ef68e9c22dc6b0880e6fa642fc30732eccc5be52))
|
|
40
|
+
* update pob-eslint ([2be1db0](https://github.com/christophehurpeau/pob/commit/2be1db0467fd3b446a5e296db14cd2e940244403))
|
|
41
|
+
* update yarn ([a70a7f5](https://github.com/christophehurpeau/pob/commit/a70a7f5275293b43f53905584311d13fa1e39786))
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* **deps:** update dependency @types/inquirer to v9.0.9 ([#2552](https://github.com/christophehurpeau/pob/issues/2552)) ([0110216](https://github.com/christophehurpeau/pob/commit/01102163321e162d81d0f2f39484916bfdd59b9c))
|
|
46
|
+
* refine bundler check in CommonTranspilerGenerator to exclude rollup-babel ([4ca64c7](https://github.com/christophehurpeau/pob/commit/4ca64c7d77aa33d9f5bea2259396bfc7623f1c81))
|
|
47
|
+
* remove polyfill.io reference ([1a1d8fd](https://github.com/christophehurpeau/pob/commit/1a1d8fd6452cf73fc4742c671e0ee1a3bca45d90))
|
|
48
|
+
* update to node 22 ([212c133](https://github.com/christophehurpeau/pob/commit/212c133a06a1e361aadab5c01357a5a330e14007))
|
|
49
|
+
|
|
50
|
+
Version bump for dependency: yarn-workspace-utils
|
|
51
|
+
Version bump for dependency: @pob/root
|
|
52
|
+
|
|
53
|
+
|
|
6
54
|
## [28.3.0](https://github.com/christophehurpeau/pob/compare/pob@28.2.1...pob@28.3.0) (2025-06-28)
|
|
7
55
|
|
|
8
56
|
### Features
|
|
@@ -9,11 +9,11 @@ const appsWithTypescript = [
|
|
|
9
9
|
"alp",
|
|
10
10
|
"next.js",
|
|
11
11
|
"remix",
|
|
12
|
-
"
|
|
12
|
+
"vite",
|
|
13
13
|
"expo",
|
|
14
14
|
"yarn-plugin",
|
|
15
15
|
];
|
|
16
|
-
const appsWithBrowser = ["alp", "next.js", "remix"];
|
|
16
|
+
const appsWithBrowser = ["alp", "next.js", "remix", "vite"];
|
|
17
17
|
|
|
18
18
|
export default class PobAppGenerator extends Generator {
|
|
19
19
|
constructor(args, opts) {
|
|
@@ -53,6 +53,13 @@ export default class PobAppGenerator extends Generator {
|
|
|
53
53
|
description:
|
|
54
54
|
"Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.",
|
|
55
55
|
});
|
|
56
|
+
|
|
57
|
+
this.option("ci", {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: true,
|
|
61
|
+
description: "ci enabled",
|
|
62
|
+
});
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
initializing() {
|
|
@@ -71,6 +78,10 @@ export default class PobAppGenerator extends Generator {
|
|
|
71
78
|
async prompting() {
|
|
72
79
|
const config = this.appConfig;
|
|
73
80
|
|
|
81
|
+
if (config.ci !== undefined) {
|
|
82
|
+
delete config.ci;
|
|
83
|
+
}
|
|
84
|
+
|
|
74
85
|
if (config && this.options.updateOnly) {
|
|
75
86
|
this.config.set("app", this.appConfig);
|
|
76
87
|
this.config.save();
|
|
@@ -85,7 +96,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
85
96
|
default: (config && config.type) || "alp",
|
|
86
97
|
choices: [
|
|
87
98
|
"alp",
|
|
88
|
-
"
|
|
99
|
+
"vite",
|
|
89
100
|
"next.js",
|
|
90
101
|
"remix",
|
|
91
102
|
"node",
|
|
@@ -117,13 +128,6 @@ export default class PobAppGenerator extends Generator {
|
|
|
117
128
|
default: !config || false,
|
|
118
129
|
when: (values) => values.testing,
|
|
119
130
|
},
|
|
120
|
-
{
|
|
121
|
-
type: "confirm",
|
|
122
|
-
name: "ci",
|
|
123
|
-
message: "Do you want ci ?",
|
|
124
|
-
default: !config || config.ci === undefined ? true : config.ci,
|
|
125
|
-
when: () => !inMonorepo,
|
|
126
|
-
},
|
|
127
131
|
]);
|
|
128
132
|
|
|
129
133
|
this.config.set("app", this.appConfig);
|
|
@@ -133,6 +137,11 @@ export default class PobAppGenerator extends Generator {
|
|
|
133
137
|
default() {
|
|
134
138
|
const srcDirectory =
|
|
135
139
|
this.appConfig.type === "yarn-plugin" ? "sources" : "src";
|
|
140
|
+
|
|
141
|
+
if (this.appConfig.type === "pobpack") {
|
|
142
|
+
throw new Error("pobpack is no longer supported.");
|
|
143
|
+
}
|
|
144
|
+
|
|
136
145
|
const buildDirectory = this.appConfig.distribute ? "dist" : "build";
|
|
137
146
|
const isAppLibrary =
|
|
138
147
|
this.appConfig.type === "node-library" ||
|
|
@@ -224,7 +233,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
224
233
|
baseUrl: (() => {
|
|
225
234
|
if (
|
|
226
235
|
this.appConfig.type === "alp" ||
|
|
227
|
-
this.appConfig.type === "
|
|
236
|
+
this.appConfig.type === "vite" ||
|
|
228
237
|
this.appConfig.type === "alp-node" ||
|
|
229
238
|
this.appConfig.type === "next.js"
|
|
230
239
|
) {
|
|
@@ -252,7 +261,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
252
261
|
this.composeWith("pob:common:remove-old-dependencies");
|
|
253
262
|
|
|
254
263
|
const enableReleasePlease =
|
|
255
|
-
!inMonorepo && this.appConfig.testing && this.
|
|
264
|
+
!inMonorepo && this.appConfig.testing && this.options.ci;
|
|
256
265
|
|
|
257
266
|
if (this.appConfig.type !== "remix") {
|
|
258
267
|
this.composeWith("pob:common:testing", {
|
|
@@ -270,7 +279,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
270
279
|
build: typescript === true && this.appConfig.type !== "expo",
|
|
271
280
|
documentation: false,
|
|
272
281
|
codecov: this.appConfig.codecov,
|
|
273
|
-
ci: this.
|
|
282
|
+
ci: this.options.ci,
|
|
274
283
|
packageManager: this.options.packageManager,
|
|
275
284
|
isApp: true,
|
|
276
285
|
splitCIJobs: false,
|
|
@@ -310,7 +319,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
310
319
|
withBabel: babel,
|
|
311
320
|
isMonorepo: false,
|
|
312
321
|
enableYarnVersion: true,
|
|
313
|
-
ci: this.
|
|
322
|
+
ci: this.options.ci,
|
|
314
323
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
315
324
|
updateOnly: this.options.updateOnly,
|
|
316
325
|
packageManager: this.options.packageManager,
|
|
@@ -353,6 +362,9 @@ export default class PobAppGenerator extends Generator {
|
|
|
353
362
|
case "remix":
|
|
354
363
|
this.composeWith("pob:app:remix", {});
|
|
355
364
|
break;
|
|
365
|
+
case "vite":
|
|
366
|
+
this.composeWith("pob:app:vite", {});
|
|
367
|
+
break;
|
|
356
368
|
// no default
|
|
357
369
|
}
|
|
358
370
|
|
|
@@ -11,7 +11,7 @@ export const appIgnorePaths = {
|
|
|
11
11
|
pkg?.dependencies?.tamagui ? "/.tamagui" : undefined,
|
|
12
12
|
].filter(Boolean),
|
|
13
13
|
remix: (config) => ["# remix paths", "/.cache", "/build", "/public/build"],
|
|
14
|
-
|
|
14
|
+
vite: (config) => ["/build"],
|
|
15
15
|
node: (config) => (config.distribute ? [] : ["/build"]),
|
|
16
16
|
"node-library": (config) => ["/build"],
|
|
17
17
|
"untranspiled-library": (config) => [],
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Generator from "yeoman-generator";
|
|
2
|
+
import * as packageUtils from "../../../utils/package.js";
|
|
3
|
+
|
|
4
|
+
export default class AppViteGenerator extends Generator {
|
|
5
|
+
writing() {
|
|
6
|
+
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
7
|
+
|
|
8
|
+
packageUtils.addScripts(pkg, {
|
|
9
|
+
build: "vite build",
|
|
10
|
+
"build:analyze": "ENABLE_ANALYZER=true vite build",
|
|
11
|
+
start: "vite",
|
|
12
|
+
serve: "vite preview",
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Generator from "yeoman-generator";
|
|
2
|
-
import { latestLTS, maintenanceLTS } from "../../../utils/
|
|
2
|
+
import { latestLTS, maintenanceLTS } from "../../../utils/nodeVersions.js";
|
|
3
3
|
import * as packageUtils from "../../../utils/package.js";
|
|
4
4
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
5
5
|
|
|
@@ -106,7 +106,9 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
106
106
|
env.version === "16" ||
|
|
107
107
|
env.version === "18" ||
|
|
108
108
|
env.version === "20" ||
|
|
109
|
+
env.version === "22" ||
|
|
109
110
|
(this.options.onlyLatestLTS &&
|
|
111
|
+
maintenanceLTS !== latestLTS &&
|
|
110
112
|
env.version === `${maintenanceLTS}`)
|
|
111
113
|
) {
|
|
112
114
|
return this.options.onlyLatestLTS
|
|
@@ -162,14 +164,14 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
162
164
|
default: nodeVersions,
|
|
163
165
|
choices: [
|
|
164
166
|
{
|
|
165
|
-
name:
|
|
167
|
+
name: `${latestLTS} (Active LTS)`,
|
|
166
168
|
value: `${latestLTS}`,
|
|
167
169
|
},
|
|
168
|
-
{
|
|
169
|
-
name:
|
|
170
|
+
latestLTS !== maintenanceLTS && {
|
|
171
|
+
name: `${maintenanceLTS} (Maintenance LTS)`,
|
|
170
172
|
value: `${maintenanceLTS}`,
|
|
171
173
|
},
|
|
172
|
-
],
|
|
174
|
+
].filter(Boolean),
|
|
173
175
|
},
|
|
174
176
|
|
|
175
177
|
// {
|
|
@@ -312,7 +314,12 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
312
314
|
} else if (pkg.dependencies && pkg.dependencies["pob-babel"] && !useBabel) {
|
|
313
315
|
packageUtils.removeDevDependencies(pkg, ["@babel/core"]);
|
|
314
316
|
}
|
|
315
|
-
|
|
317
|
+
if (!useBabel && pkg.devDependencies && pkg.devDependencies["pob-babel"]) {
|
|
318
|
+
packageUtils.removeDevDependencies(pkg, ["pob-babel", "@babel/core"]);
|
|
319
|
+
packageUtils.removeDependencies(pkg, ["@babel/runtime"]);
|
|
320
|
+
} else {
|
|
321
|
+
packageUtils.addOrRemoveDevDependencies(pkg, useBabel, ["pob-babel"]);
|
|
322
|
+
}
|
|
316
323
|
|
|
317
324
|
if (pkg.dependencies && pkg.dependencies["pob-babel"]) {
|
|
318
325
|
// update pob-babel in alp-dev
|
|
@@ -400,7 +407,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
400
407
|
/* pob-babel config */
|
|
401
408
|
|
|
402
409
|
packageUtils.removeDevDependencies(pkg, ["@rollup/plugin-run"]);
|
|
403
|
-
packageUtils.removeDependencies(pkg, ["alp-rollup-plugin-config"]);
|
|
410
|
+
// packageUtils.removeDependencies(pkg, ["alp-rollup-plugin-config"]); see TranspilerGenerator
|
|
404
411
|
|
|
405
412
|
this.fs.delete("rollup.config.js");
|
|
406
413
|
if (useBabel) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Generator from "yeoman-generator";
|
|
2
|
+
import { latestLTS } from "../../../utils/nodeVersions.js";
|
|
2
3
|
import * as packageUtils from "../../../utils/package.js";
|
|
3
4
|
|
|
4
5
|
export default class CommonReleaseGenerator extends Generator {
|
|
@@ -93,6 +94,7 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
93
94
|
isMonorepoIndependent:
|
|
94
95
|
this.options.isMonorepo &&
|
|
95
96
|
(!pkg.version || pkg.version === "0.0.0"),
|
|
97
|
+
nodeLatestMajorVersion: latestLTS,
|
|
96
98
|
},
|
|
97
99
|
);
|
|
98
100
|
} else {
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import * as packageUtils from "../../../utils/package.js";
|
|
7
6
|
import {
|
|
8
7
|
copyAndFormatTpl,
|
|
@@ -195,12 +194,10 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
195
194
|
if (testRunner === "vitest") return undefined;
|
|
196
195
|
if (!withTypescript) return undefined;
|
|
197
196
|
if (this.options.swc || isJestRunner) return "swc";
|
|
198
|
-
|
|
199
|
-
return "ts-node";
|
|
197
|
+
return "node";
|
|
200
198
|
})();
|
|
201
199
|
|
|
202
200
|
const dependenciesForTestUtil = {
|
|
203
|
-
"ts-node": { devDependenciesShared: ["ts-node"] },
|
|
204
201
|
swc: {
|
|
205
202
|
devDependenciesShared: ["@swc/core"],
|
|
206
203
|
devDependenciesWithJest: ["@swc/jest"],
|
|
@@ -273,9 +270,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
273
270
|
const tsTestLoaderOption = (() => {
|
|
274
271
|
switch (tsTestUtil) {
|
|
275
272
|
case "node":
|
|
276
|
-
return "
|
|
277
|
-
case "ts-node":
|
|
278
|
-
return "--loader=ts-node/esm --experimental-specifier-resolution=node";
|
|
273
|
+
return "";
|
|
279
274
|
case "swc":
|
|
280
275
|
return "--import=@swc-node/register/esm";
|
|
281
276
|
|
|
@@ -314,10 +309,6 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
314
309
|
}
|
|
315
310
|
const experimentalTestCoverage = false; // todo configure src directory and remove test files
|
|
316
311
|
return `TZ=UTC ${
|
|
317
|
-
tsTestUtil === "ts-node"
|
|
318
|
-
? "TS_NODE_PROJECT=tsconfig.test.json "
|
|
319
|
-
: ""
|
|
320
|
-
}${
|
|
321
312
|
coverage || coverageJson
|
|
322
313
|
? `npx c8${
|
|
323
314
|
coverageJson
|
|
@@ -491,21 +482,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
491
482
|
}
|
|
492
483
|
} else {
|
|
493
484
|
const tsconfigTestPath = this.destinationPath("tsconfig.test.json");
|
|
494
|
-
|
|
495
|
-
const nodeVersion = this.options.onlyLatestLTS
|
|
496
|
-
? `${latestLTS}`
|
|
497
|
-
: `${maintenanceLTS}`;
|
|
498
|
-
copyAndFormatTpl(
|
|
499
|
-
this.fs,
|
|
500
|
-
this.templatePath("tsconfig.test.json.ejs"),
|
|
501
|
-
tsconfigTestPath,
|
|
502
|
-
{
|
|
503
|
-
nodeVersion,
|
|
504
|
-
},
|
|
505
|
-
);
|
|
506
|
-
} else {
|
|
507
|
-
this.fs.delete(tsconfigTestPath);
|
|
508
|
-
}
|
|
485
|
+
this.fs.delete(tsconfigTestPath);
|
|
509
486
|
|
|
510
487
|
if (globalTesting) {
|
|
511
488
|
if (pkg.scripts) {
|