pob 28.3.0 → 28.4.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 +22 -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/transpiler/CommonTranspilerGenerator.js +45 -0
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +11 -4
- package/lib/generators/common/typescript/templates/tsconfig.check-js.json.ejs +1 -1
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +5 -3
- package/lib/generators/core/git/CoreGitGenerator.js +7 -0
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +8 -6
- package/lib/generators/core/yarn/CoreYarnGenerator.js +2 -2
- package/lib/generators/lib/PobLibGenerator.js +14 -13
- package/lib/generators/pob/PobBaseGenerator.js +24 -1
- package/lib/pob.js +6 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
## [28.4.0](https://github.com/christophehurpeau/pob/compare/pob@28.3.0...pob@28.4.0) (2025-08-23)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add browser support to CommonTranspilerGenerator and update browserslist configuration ([3998b43](https://github.com/christophehurpeau/pob/commit/3998b43fda998d21cfebb6c3fc76bffdd28d74ae))
|
|
11
|
+
* add support for browser target in CommonTypescriptGenerator ([ef8b376](https://github.com/christophehurpeau/pob/commit/ef8b376a3c46338df7c7699d72b922094f404a10))
|
|
12
|
+
* add vite generator and remove legacy pobpack ([fe1fbd7](https://github.com/christophehurpeau/pob/commit/fe1fbd775aba7f3b7ef84d75ea810ca3c981b1b7))
|
|
13
|
+
* disable composite for apps ([ef68e9c](https://github.com/christophehurpeau/pob/commit/ef68e9c22dc6b0880e6fa642fc30732eccc5be52))
|
|
14
|
+
* update pob-eslint ([2be1db0](https://github.com/christophehurpeau/pob/commit/2be1db0467fd3b446a5e296db14cd2e940244403))
|
|
15
|
+
* update yarn ([a70a7f5](https://github.com/christophehurpeau/pob/commit/a70a7f5275293b43f53905584311d13fa1e39786))
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **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))
|
|
20
|
+
* refine bundler check in CommonTranspilerGenerator to exclude rollup-babel ([4ca64c7](https://github.com/christophehurpeau/pob/commit/4ca64c7d77aa33d9f5bea2259396bfc7623f1c81))
|
|
21
|
+
* remove polyfill.io reference ([1a1d8fd](https://github.com/christophehurpeau/pob/commit/1a1d8fd6452cf73fc4742c671e0ee1a3bca45d90))
|
|
22
|
+
* update to node 22 ([212c133](https://github.com/christophehurpeau/pob/commit/212c133a06a1e361aadab5c01357a5a330e14007))
|
|
23
|
+
|
|
24
|
+
Version bump for dependency: yarn-workspace-utils
|
|
25
|
+
Version bump for dependency: @pob/root
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [28.3.0](https://github.com/christophehurpeau/pob/compare/pob@28.2.1...pob@28.3.0) (2025-06-28)
|
|
7
29
|
|
|
8
30
|
### 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
|
+
}
|
|
@@ -612,6 +612,8 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
const hasTargetNode = envs && envs.some((env) => env.target === "node");
|
|
615
|
+
const hasTargetBrowser =
|
|
616
|
+
envs && envs.some((env) => env.target === "browser");
|
|
615
617
|
|
|
616
618
|
if (!pkg.engines) pkg.engines = {};
|
|
617
619
|
|
|
@@ -678,9 +680,17 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
678
680
|
}
|
|
679
681
|
|
|
680
682
|
this.fs.delete("rollup.config.js");
|
|
683
|
+
if (
|
|
684
|
+
!pkg.pob.typescript &&
|
|
685
|
+
pkg.pob.bundler?.startsWith("rollup-") &&
|
|
686
|
+
pkg.pob.bundler !== "rollup-babel"
|
|
687
|
+
) {
|
|
688
|
+
pkg.pob.typescript = true;
|
|
689
|
+
}
|
|
681
690
|
if (
|
|
682
691
|
pkg.pob.typescript === true &&
|
|
683
692
|
pkg.pob.rollup !== false &&
|
|
693
|
+
pkg.pob.bundler !== false &&
|
|
684
694
|
((!pkg.pob.bundler && pkg.pob.typescript !== true) ||
|
|
685
695
|
pkg.pob.bundler?.startsWith("rollup"))
|
|
686
696
|
) {
|
|
@@ -716,6 +726,41 @@ export default class CommonTranspilerGenerator extends Generator {
|
|
|
716
726
|
this.fs.delete("rollup.config.mjs");
|
|
717
727
|
}
|
|
718
728
|
|
|
729
|
+
/* browserslist */
|
|
730
|
+
|
|
731
|
+
if (hasTargetBrowser) {
|
|
732
|
+
if (pkg.browserslist && pkg.browserslist.modern) {
|
|
733
|
+
delete pkg.browserslist.modern;
|
|
734
|
+
}
|
|
735
|
+
pkg.browserslist = {
|
|
736
|
+
...(Array.isArray(pkg.browserslist) ? {} : pkg.browserslist),
|
|
737
|
+
production: [
|
|
738
|
+
"defaults",
|
|
739
|
+
"> 0.2%",
|
|
740
|
+
"not ie < 12",
|
|
741
|
+
"not safari < 10",
|
|
742
|
+
"not ios_saf < 10",
|
|
743
|
+
],
|
|
744
|
+
};
|
|
745
|
+
} else if (
|
|
746
|
+
this.options.isApp &&
|
|
747
|
+
!this.options.isAppLibrary &&
|
|
748
|
+
pkg.browserslist
|
|
749
|
+
) {
|
|
750
|
+
pkg.browserslist = {
|
|
751
|
+
...pkg.browserslist,
|
|
752
|
+
production: [
|
|
753
|
+
"defaults",
|
|
754
|
+
"> 0.2%",
|
|
755
|
+
"not ie < 12",
|
|
756
|
+
"not safari < 10",
|
|
757
|
+
"not ios_saf < 10",
|
|
758
|
+
],
|
|
759
|
+
};
|
|
760
|
+
} else {
|
|
761
|
+
delete pkg.browserslist;
|
|
762
|
+
}
|
|
763
|
+
|
|
719
764
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
720
765
|
}
|
|
721
766
|
}
|
|
@@ -165,6 +165,9 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
165
165
|
}-node-${nodeVersion}.json`,
|
|
166
166
|
];
|
|
167
167
|
}
|
|
168
|
+
if (envs && envs.some((env) => env.target === "browser")) {
|
|
169
|
+
return ["@pob/root/tsconfigs/targets/rollup-es2015-with-dom.json"];
|
|
170
|
+
}
|
|
168
171
|
return ["@pob/root/tsconfigs/targets/rollup-es2015.json"];
|
|
169
172
|
}
|
|
170
173
|
|
|
@@ -194,7 +197,7 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
194
197
|
|
|
195
198
|
if (this.options.enable) {
|
|
196
199
|
const { jsx, dom } = this.options;
|
|
197
|
-
let
|
|
200
|
+
let monorepoComposite;
|
|
198
201
|
let monorepoPackageReferences;
|
|
199
202
|
// let monorepoPackageBuildReferences;
|
|
200
203
|
let monorepoPackageSrcPaths;
|
|
@@ -202,12 +205,12 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
202
205
|
if (inMonorepo && !inMonorepo.root) {
|
|
203
206
|
const yoConfig = inMonorepo.rootYoConfig;
|
|
204
207
|
|
|
205
|
-
|
|
208
|
+
monorepoComposite =
|
|
206
209
|
yoConfig.pob &&
|
|
207
210
|
yoConfig.pob.monorepo &&
|
|
208
211
|
yoConfig.pob.monorepo.typescript;
|
|
209
212
|
|
|
210
|
-
if (
|
|
213
|
+
if (monorepoComposite) {
|
|
211
214
|
packageUtils.addOrRemoveDevDependencies(
|
|
212
215
|
pkg,
|
|
213
216
|
inMonorepo.rootPackageManager === "yarn",
|
|
@@ -301,7 +304,11 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
301
304
|
jsx,
|
|
302
305
|
jsxPreserve: this.options.jsxPreserve,
|
|
303
306
|
nextConfig: this.options.nextConfig,
|
|
304
|
-
|
|
307
|
+
// for apps, only enable incremental. Composite is meant for libraries to build and export before the ones depending on them.
|
|
308
|
+
composite:
|
|
309
|
+
monorepoComposite &&
|
|
310
|
+
(!this.options.isApp || this.options.isAppLibrary),
|
|
311
|
+
incremental: monorepoComposite,
|
|
305
312
|
dom,
|
|
306
313
|
baseUrl: this.options.baseUrl,
|
|
307
314
|
resolveJsonModule: this.options.resolveJsonModule,
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
-%>
|
|
30
30
|
"tsBuildInfoFile": "node_modules/.cache/tsc/tsbuildinfo",
|
|
31
31
|
<% } -%>
|
|
32
|
-
<% } else if (composite) { -%>
|
|
33
|
-
<% if (cacheEnabled) { -%>
|
|
32
|
+
<% } else if (composite || incremental) { -%>
|
|
33
|
+
<% if (composite && cacheEnabled) { -%>
|
|
34
34
|
"outDir": "node_modules/.cache/tsc",
|
|
35
35
|
<% } else { -%>
|
|
36
36
|
"noEmit": true,
|
|
@@ -48,12 +48,14 @@
|
|
|
48
48
|
<% if(composite) { -%>
|
|
49
49
|
"incremental": true,
|
|
50
50
|
"composite": true,
|
|
51
|
+
<% } else if(incremental) { -%>
|
|
52
|
+
"incremental": true,
|
|
51
53
|
<% } -%>
|
|
52
54
|
|
|
53
55
|
<% if(!presets || presets.length === 0) { -%>
|
|
54
56
|
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
55
57
|
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
56
|
-
"lib": [<%- dom ? '"dom", ' : '' %>"esnext"],
|
|
58
|
+
"lib": [<%- dom ? '"dom", ' : '' %>"esnext"],
|
|
57
59
|
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
58
60
|
<% } -%>
|
|
59
61
|
<% if(jsx) { -%>
|
|
@@ -25,6 +25,12 @@ export default class CoreGitGenerator extends Generator {
|
|
|
25
25
|
required: true,
|
|
26
26
|
description: "split CI jobs for faster result",
|
|
27
27
|
});
|
|
28
|
+
|
|
29
|
+
this.option("ciEnabled", {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
required: true,
|
|
32
|
+
description: "ci enabled",
|
|
33
|
+
});
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
async initializing() {
|
|
@@ -107,6 +113,7 @@ export default class CoreGitGenerator extends Generator {
|
|
|
107
113
|
repoName: this.repoName,
|
|
108
114
|
onlyLatestLTS: this.options.onlyLatestLTS,
|
|
109
115
|
splitCIJobs: this.options.splitCIJobs,
|
|
116
|
+
ciEnabled: this.options.ciEnabled,
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
119
|
}
|
|
@@ -212,12 +212,14 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
212
212
|
...githubRepoConfig,
|
|
213
213
|
});
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
if (this.options.ci) {
|
|
216
|
+
await configureProtectionRule(
|
|
217
|
+
owner,
|
|
218
|
+
repo,
|
|
219
|
+
this.options.onlyLatestLTS,
|
|
220
|
+
this.spawnCommandSync.bind(this),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
}
|
|
@@ -142,9 +142,9 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
142
142
|
if (
|
|
143
143
|
!pkg.packageManager ||
|
|
144
144
|
!pkg.packageManager.startsWith("yarn@") ||
|
|
145
|
-
lt(pkg.packageManager.slice("yarn@".length), "4.
|
|
145
|
+
lt(pkg.packageManager.slice("yarn@".length), "4.9.2")
|
|
146
146
|
) {
|
|
147
|
-
pkg.packageManager = "yarn@4.
|
|
147
|
+
pkg.packageManager = "yarn@4.9.2";
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// must be done after plugins installed
|
|
@@ -42,6 +42,13 @@ export default class PobLibGenerator extends Generator {
|
|
|
42
42
|
description:
|
|
43
43
|
"Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.",
|
|
44
44
|
});
|
|
45
|
+
|
|
46
|
+
this.option("ci", {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false,
|
|
49
|
+
default: true,
|
|
50
|
+
description: "ci enabled",
|
|
51
|
+
});
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
initializing() {
|
|
@@ -134,9 +141,11 @@ export default class PobLibGenerator extends Generator {
|
|
|
134
141
|
} else if (this.pobjson.testing) {
|
|
135
142
|
delete this.pobjson.testing.travisci;
|
|
136
143
|
if ("circleci" in this.pobjson.testing) {
|
|
137
|
-
this.pobjson.testing.ci = this.pobjson.testing.circleci;
|
|
138
144
|
delete this.pobjson.testing.circleci;
|
|
139
145
|
}
|
|
146
|
+
if ("ci" in this.pobjson.testing) {
|
|
147
|
+
delete this.pobjson.testing.ci;
|
|
148
|
+
}
|
|
140
149
|
}
|
|
141
150
|
|
|
142
151
|
if (typeof this.pobjson.documentation === "object") {
|
|
@@ -206,13 +215,6 @@ export default class PobLibGenerator extends Generator {
|
|
|
206
215
|
|
|
207
216
|
if (this.pobjson.testing && !(inMonorepo || inMonorepo.root)) {
|
|
208
217
|
const testingPrompts = await this.prompt([
|
|
209
|
-
{
|
|
210
|
-
type: "confirm",
|
|
211
|
-
name: "ci",
|
|
212
|
-
message: "Would you like ci with github actions ?",
|
|
213
|
-
when: !this.updateOnly || this.pobjson.testing?.ci === undefined,
|
|
214
|
-
default: this.pobjson.testing.ci !== false,
|
|
215
|
-
},
|
|
216
218
|
{
|
|
217
219
|
type: "list",
|
|
218
220
|
name: "runner",
|
|
@@ -302,8 +304,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
302
304
|
|
|
303
305
|
this.composeWith("pob:common:remove-old-dependencies");
|
|
304
306
|
|
|
305
|
-
const enableReleasePlease =
|
|
306
|
-
!inMonorepo && this.pobjson.testing && this.pobjson.testing.ci;
|
|
307
|
+
const enableReleasePlease = !inMonorepo && this.options.ci;
|
|
307
308
|
|
|
308
309
|
this.composeWith("pob:common:testing", {
|
|
309
310
|
enable: this.pobjson.testing,
|
|
@@ -320,7 +321,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
320
321
|
typescript: withTypescript,
|
|
321
322
|
documentation: !!this.pobjson.documentation,
|
|
322
323
|
codecov: this.pobjson.testing && this.pobjson.testing.codecov,
|
|
323
|
-
ci: this.
|
|
324
|
+
ci: this.options.ci,
|
|
324
325
|
packageManager: this.options.packageManager,
|
|
325
326
|
isApp: false,
|
|
326
327
|
splitCIJobs: false,
|
|
@@ -353,7 +354,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
353
354
|
this.composeWith("pob:lib:readme", {
|
|
354
355
|
documentation: !!this.pobjson.documentation,
|
|
355
356
|
testing: !!this.pobjson.testing,
|
|
356
|
-
ci: this.
|
|
357
|
+
ci: this.options.ci,
|
|
357
358
|
codecov: this.pobjson.testing && this.pobjson.testing.codecov,
|
|
358
359
|
});
|
|
359
360
|
|
|
@@ -365,7 +366,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
365
366
|
withTypescript,
|
|
366
367
|
isMonorepo: false,
|
|
367
368
|
enableYarnVersion: true,
|
|
368
|
-
ci: this.
|
|
369
|
+
ci: this.options.ci,
|
|
369
370
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
370
371
|
updateOnly: this.options.updateOnly,
|
|
371
372
|
});
|
|
@@ -60,7 +60,12 @@ export default class PobBaseGenerator extends Generator {
|
|
|
60
60
|
|
|
61
61
|
async prompting() {
|
|
62
62
|
let config = this.config.get("project");
|
|
63
|
-
if (
|
|
63
|
+
if (
|
|
64
|
+
config &&
|
|
65
|
+
config.type &&
|
|
66
|
+
config.packageManager &&
|
|
67
|
+
config.ci !== undefined
|
|
68
|
+
) {
|
|
64
69
|
this.projectConfig = config;
|
|
65
70
|
return;
|
|
66
71
|
}
|
|
@@ -114,6 +119,21 @@ export default class PobBaseGenerator extends Generator {
|
|
|
114
119
|
choices: ["node-modules", "pnp", "pnpm"],
|
|
115
120
|
default: config.yarnNodeLinker || "node-modules",
|
|
116
121
|
},
|
|
122
|
+
{
|
|
123
|
+
when: () => {
|
|
124
|
+
if (this.hasAncestor) {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
if (this.options.updateOnly) {
|
|
128
|
+
return config.ci === undefined;
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
},
|
|
132
|
+
name: "ci",
|
|
133
|
+
message: "Would you like ci with github actions ?",
|
|
134
|
+
type: "confirm",
|
|
135
|
+
default: !config || config.ci === undefined ? true : config.ci,
|
|
136
|
+
},
|
|
117
137
|
]);
|
|
118
138
|
|
|
119
139
|
this.projectConfig = { ...config, ...responses };
|
|
@@ -184,6 +204,7 @@ export default class PobBaseGenerator extends Generator {
|
|
|
184
204
|
this.composeWith("pob:core:git", {
|
|
185
205
|
onlyLatestLTS,
|
|
186
206
|
splitCIJobs,
|
|
207
|
+
ciEnabled: this.options.ci,
|
|
187
208
|
});
|
|
188
209
|
} else {
|
|
189
210
|
if (this.fs.exists(".git-hooks")) this.fs.delete(".git-hooks");
|
|
@@ -232,6 +253,7 @@ export default class PobBaseGenerator extends Generator {
|
|
|
232
253
|
fromPob: this.options.fromPob,
|
|
233
254
|
packageManager: this.projectConfig.packageManager,
|
|
234
255
|
yarnNodeLinker: this.projectConfig.yarnNodeLinker,
|
|
256
|
+
ci: this.options.ci,
|
|
235
257
|
});
|
|
236
258
|
break;
|
|
237
259
|
case "app":
|
|
@@ -244,6 +266,7 @@ export default class PobBaseGenerator extends Generator {
|
|
|
244
266
|
fromPob: this.options.fromPob,
|
|
245
267
|
packageManager: this.projectConfig.packageManager,
|
|
246
268
|
yarnNodeLinker: this.projectConfig.yarnNodeLinker,
|
|
269
|
+
ci: this.options.ci,
|
|
247
270
|
});
|
|
248
271
|
break;
|
|
249
272
|
default:
|
package/lib/pob.js
CHANGED
|
@@ -15,6 +15,7 @@ import PobAppGenerator from "./generators/app/PobAppGenerator.js";
|
|
|
15
15
|
import AppE2ETestingGenerator from "./generators/app/e2e-testing/AppE2ETestingGenerator.js";
|
|
16
16
|
import AppNextjsGenerator from "./generators/app/nextjs/AppNextjsGenerator.js";
|
|
17
17
|
import AppRemixGenerator from "./generators/app/remix/AppRemixGenerator.js";
|
|
18
|
+
import AppViteGenerator from "./generators/app/vite/AppViteGenerator.js";
|
|
18
19
|
import CommonBabelGenerator from "./generators/common/babel/CommonBabelGenerator.js";
|
|
19
20
|
import CommonLintGenerator from "./generators/common/format-lint/CommonLintGenerator.js";
|
|
20
21
|
import CommonHuskyGenerator from "./generators/common/husky/CommonHuskyGenerator.js";
|
|
@@ -106,6 +107,11 @@ env.registerStub(
|
|
|
106
107
|
"pob:app:remix",
|
|
107
108
|
`${__dirname}/generators/app/nextjs/AppRemixGenerator.js`,
|
|
108
109
|
);
|
|
110
|
+
env.registerStub(
|
|
111
|
+
AppViteGenerator,
|
|
112
|
+
"pob:app:vite",
|
|
113
|
+
`${__dirname}/generators/app/vite/AppViteGenerator.js`,
|
|
114
|
+
);
|
|
109
115
|
env.registerStub(
|
|
110
116
|
CommonBabelGenerator,
|
|
111
117
|
"pob:common:babel",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.4.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"prettier": "@pob/root/prettier-config",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@pob/eslint-config": "
|
|
47
|
-
"@pob/eslint-config-typescript": "
|
|
48
|
-
"@pob/eslint-config-typescript-react": "
|
|
46
|
+
"@pob/eslint-config": "61.1.0",
|
|
47
|
+
"@pob/eslint-config-typescript": "61.1.0",
|
|
48
|
+
"@pob/eslint-config-typescript-react": "61.1.0",
|
|
49
49
|
"@pob/sort-object": "9.0.2",
|
|
50
50
|
"@pob/sort-pkg": "11.0.3",
|
|
51
51
|
"@prettier/sync": "0.6.1",
|
|
52
|
-
"@types/inquirer": "9.0.
|
|
52
|
+
"@types/inquirer": "9.0.9",
|
|
53
53
|
"@yarnpkg/cli": "4.9.2",
|
|
54
54
|
"@yarnpkg/core": "4.4.2",
|
|
55
55
|
"@yarnpkg/fslib": "3.1.2",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"mem-fs-editor": "11.1.4",
|
|
67
67
|
"minimist": "1.2.8",
|
|
68
68
|
"parse-author": "2.0.0",
|
|
69
|
-
"pob-dependencies": "19.
|
|
69
|
+
"pob-dependencies": "19.3.0",
|
|
70
70
|
"prettier": "3.6.2",
|
|
71
71
|
"semver": "7.7.2",
|
|
72
72
|
"typescript": "5.8.3",
|
|
73
73
|
"validate-npm-package-name": "^6.0.1",
|
|
74
|
-
"yarn-workspace-utils": "8.
|
|
74
|
+
"yarn-workspace-utils": "8.10.0",
|
|
75
75
|
"yeoman-environment": "4.4.3",
|
|
76
76
|
"yeoman-generator": "7.5.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@pob/root": "18.
|
|
80
|
-
"@types/node": "22.
|
|
79
|
+
"@pob/root": "18.3.0",
|
|
80
|
+
"@types/node": "22.17.2"
|
|
81
81
|
}
|
|
82
82
|
}
|