pob 29.7.0 → 29.9.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 +24 -0
- package/lib/generators/app/PobAppGenerator.js +10 -6
- package/lib/generators/app/ignorePaths.js +4 -1
- package/lib/generators/common/format-lint/CommonLintGenerator.js +18 -14
- package/lib/generators/common/format-lint/templates/prettierignore.ejs +0 -3
- package/lib/generators/common/release/CommonReleaseGenerator.js +0 -7
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +2 -9
- package/lib/generators/common/testing/CommonTestingGenerator.js +0 -14
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +1 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +0 -36
- package/lib/generators/lib/PobLibGenerator.js +1 -4
- package/lib/generators/monorepo/PobMonorepoGenerator.js +31 -7
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +12 -25
- package/lib/generators/monorepo/workspaces/MonorepoWorkspacesGenerator.js +6 -10
- package/lib/generators/pob/PobBaseGenerator.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.9.0](https://github.com/christophehurpeau/pob/compare/pob@29.8.0...pob@29.9.0) (2025-11-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **deps:** update yarn monorepo ([#2631](https://github.com/christophehurpeau/pob/issues/2631))
|
|
11
|
+
* improve config for expo/storybook/e2e
|
|
12
|
+
|
|
13
|
+
Version bump for dependency: yarn-workspace-utils
|
|
14
|
+
Version bump for dependency: @pob/root
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [29.8.0](https://github.com/christophehurpeau/pob/compare/pob@29.7.0...pob@29.8.0) (2025-11-04)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add ios and android folder in gitignore for expo project
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **deps:** update dependency eslint to v9.39.1 ([#2626](https://github.com/christophehurpeau/pob/issues/2626))
|
|
26
|
+
|
|
27
|
+
Version bump for dependency: @pob/root
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [29.7.0](https://github.com/christophehurpeau/pob/compare/pob@29.6.0...pob@29.7.0) (2025-11-02)
|
|
7
31
|
|
|
8
32
|
### Features
|
|
@@ -128,6 +128,13 @@ export default class PobAppGenerator extends Generator {
|
|
|
128
128
|
default: !config || false,
|
|
129
129
|
when: (values) => values.testing,
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
type: "confirm",
|
|
133
|
+
name: "storybook",
|
|
134
|
+
message: "Do you want storybook ?",
|
|
135
|
+
default: (config && config.storybook) || false,
|
|
136
|
+
when: (values) => values.type === "expo",
|
|
137
|
+
},
|
|
131
138
|
]);
|
|
132
139
|
|
|
133
140
|
this.config.set("app", this.appConfig);
|
|
@@ -235,7 +242,8 @@ export default class PobAppGenerator extends Generator {
|
|
|
235
242
|
this.appConfig.type === "alp" ||
|
|
236
243
|
this.appConfig.type === "vite" ||
|
|
237
244
|
this.appConfig.type === "alp-node" ||
|
|
238
|
-
this.appConfig.type === "next.js"
|
|
245
|
+
this.appConfig.type === "next.js" ||
|
|
246
|
+
this.appConfig.type === "expo"
|
|
239
247
|
) {
|
|
240
248
|
return `./${srcDirectory}`;
|
|
241
249
|
}
|
|
@@ -260,14 +268,10 @@ export default class PobAppGenerator extends Generator {
|
|
|
260
268
|
|
|
261
269
|
this.composeWith("pob:common:remove-old-dependencies");
|
|
262
270
|
|
|
263
|
-
const enableReleasePlease =
|
|
264
|
-
!inMonorepo && this.appConfig.testing && this.options.ci;
|
|
265
|
-
|
|
266
271
|
if (this.appConfig.type !== "remix") {
|
|
267
272
|
this.composeWith("pob:common:testing", {
|
|
268
273
|
enable: this.appConfig.testing,
|
|
269
274
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
270
|
-
enableReleasePlease,
|
|
271
275
|
testing: this.appConfig.testing,
|
|
272
276
|
runner: this.appConfig.testing
|
|
273
277
|
? (inMonorepo
|
|
@@ -294,6 +298,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
294
298
|
this.composeWith("pob:common:format-lint", {
|
|
295
299
|
isApp: true,
|
|
296
300
|
documentation: false,
|
|
301
|
+
storybook: pkg?.devDependencies?.storybook,
|
|
297
302
|
testing: this.appConfig.testing,
|
|
298
303
|
testRunner: this.appConfig.testRunner,
|
|
299
304
|
babel,
|
|
@@ -318,7 +323,6 @@ export default class PobAppGenerator extends Generator {
|
|
|
318
323
|
enablePublish: false,
|
|
319
324
|
withBabel: babel,
|
|
320
325
|
isMonorepo: false,
|
|
321
|
-
enableYarnVersion: true,
|
|
322
326
|
ci: this.options.ci,
|
|
323
327
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
324
328
|
updateOnly: this.options.updateOnly,
|
|
@@ -17,10 +17,12 @@ export const appIgnorePaths = {
|
|
|
17
17
|
"untranspiled-library": (config) => [],
|
|
18
18
|
"alp-node": (config) => ["/build"],
|
|
19
19
|
other: (config) => [],
|
|
20
|
-
storybook: (config) => [],
|
|
20
|
+
storybook: (config) => ["/.storybook/storybook.requires.ts"],
|
|
21
21
|
expo: (config) => [
|
|
22
22
|
"/.expo/",
|
|
23
23
|
"/src/tamagui-web.css",
|
|
24
|
+
"/android/",
|
|
25
|
+
"/ios/",
|
|
24
26
|
"/dist/",
|
|
25
27
|
"*.jks",
|
|
26
28
|
"*.p8",
|
|
@@ -28,6 +30,7 @@ export const appIgnorePaths = {
|
|
|
28
30
|
"*.key",
|
|
29
31
|
"*.mobileprovision",
|
|
30
32
|
"*.orig.*",
|
|
33
|
+
"*.icon/",
|
|
31
34
|
|
|
32
35
|
// only if option is enabled which is not by default
|
|
33
36
|
// '# Temporary files created by Metro to check the health of the file watcher',
|
|
@@ -5,7 +5,7 @@ import * as packageUtils from "../../../utils/package.js";
|
|
|
5
5
|
import { copyAndFormatTpl } from "../../../utils/writeAndFormat.js";
|
|
6
6
|
import { appIgnorePaths } from "../../app/ignorePaths.js";
|
|
7
7
|
|
|
8
|
-
export default class
|
|
8
|
+
export default class CommonFormatLintGenerator extends Generator {
|
|
9
9
|
constructor(args, opts) {
|
|
10
10
|
super(args, opts);
|
|
11
11
|
|
|
@@ -69,6 +69,13 @@ export default class CommonLintGenerator extends Generator {
|
|
|
69
69
|
description: "Enable resolving from src directory",
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
this.option("storybook", {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
required: false,
|
|
75
|
+
default: false,
|
|
76
|
+
description: "Enable storybook",
|
|
77
|
+
});
|
|
78
|
+
|
|
72
79
|
this.option("rootAsSrc", {
|
|
73
80
|
type: Boolean,
|
|
74
81
|
required: false,
|
|
@@ -203,7 +210,7 @@ export default class CommonLintGenerator extends Generator {
|
|
|
203
210
|
hasApp: this.options.hasApp,
|
|
204
211
|
rootIgnorePatterns: [...rootIgnorePatterns],
|
|
205
212
|
ignorePatterns: [...ignorePatterns],
|
|
206
|
-
storybook:
|
|
213
|
+
storybook: this.options.storybook,
|
|
207
214
|
},
|
|
208
215
|
);
|
|
209
216
|
} else if (this.fs.exists(this.destinationPath(".prettierignore"))) {
|
|
@@ -438,6 +445,9 @@ export default class CommonLintGenerator extends Generator {
|
|
|
438
445
|
this.fs.delete(invalidEslintConfigPath);
|
|
439
446
|
|
|
440
447
|
if (!inMonorepo || inMonorepo.root) {
|
|
448
|
+
const rootIgnorePaths = this.options.rootIgnorePaths
|
|
449
|
+
.split("\n")
|
|
450
|
+
.filter(Boolean);
|
|
441
451
|
const getRootIgnorePatterns = () => {
|
|
442
452
|
const ignorePatterns = new Set();
|
|
443
453
|
|
|
@@ -451,10 +461,7 @@ export default class CommonLintGenerator extends Generator {
|
|
|
451
461
|
|
|
452
462
|
if ((!inMonorepo || !inMonorepo.root) && useTypescript) {
|
|
453
463
|
const buildPath = `/${this.options.buildDirectory}`;
|
|
454
|
-
if (
|
|
455
|
-
!this.options.rootIgnorePaths ||
|
|
456
|
-
!this.options.rootIgnorePaths.includes(buildPath)
|
|
457
|
-
) {
|
|
464
|
+
if (!rootIgnorePaths.includes(buildPath)) {
|
|
458
465
|
ignorePatterns.add(buildPath);
|
|
459
466
|
}
|
|
460
467
|
}
|
|
@@ -462,14 +469,11 @@ export default class CommonLintGenerator extends Generator {
|
|
|
462
469
|
ignorePatterns.add("/rollup.config.mjs");
|
|
463
470
|
}
|
|
464
471
|
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
.
|
|
468
|
-
.
|
|
469
|
-
|
|
470
|
-
if (ignorePath.startsWith("#")) return;
|
|
471
|
-
ignorePatterns.add(ignorePath);
|
|
472
|
-
});
|
|
472
|
+
if (rootIgnorePaths) {
|
|
473
|
+
rootIgnorePaths.forEach((ignorePath) => {
|
|
474
|
+
if (ignorePath.startsWith("#")) return;
|
|
475
|
+
ignorePatterns.add(ignorePath);
|
|
476
|
+
});
|
|
473
477
|
}
|
|
474
478
|
|
|
475
479
|
return ignorePatterns;
|
|
@@ -37,12 +37,6 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
37
37
|
description: "is monorepo",
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
this.option("enableYarnVersion", {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: true,
|
|
43
|
-
description: "enable yarn version conventional commits",
|
|
44
|
-
});
|
|
45
|
-
|
|
46
40
|
this.option("ci", {
|
|
47
41
|
type: Boolean,
|
|
48
42
|
required: true,
|
|
@@ -88,7 +82,6 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
88
82
|
{
|
|
89
83
|
packageManager: this.options.packageManager,
|
|
90
84
|
enablePublish: this.options.enablePublish,
|
|
91
|
-
enableYarnVersion: this.options.enableYarnVersion,
|
|
92
85
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
93
86
|
isMonorepo: this.options.isMonorepo,
|
|
94
87
|
isMonorepoIndependent:
|
|
@@ -12,7 +12,7 @@ on:
|
|
|
12
12
|
required: false
|
|
13
13
|
type: boolean
|
|
14
14
|
default: false
|
|
15
|
-
<% if (
|
|
15
|
+
<% if (isMonorepo && isMonorepoIndependent) { -%>
|
|
16
16
|
bump-dependents-highest-as:
|
|
17
17
|
description: "Bump dependents highest as"
|
|
18
18
|
required: false
|
|
@@ -70,11 +70,8 @@ jobs:
|
|
|
70
70
|
|
|
71
71
|
- name: New version (dry run)
|
|
72
72
|
if: github.ref == 'refs/heads/main' && inputs.dry-run
|
|
73
|
-
<% if (enableYarnVersion) { -%>
|
|
74
73
|
run: yarn yarn-version version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
|
|
75
|
-
|
|
76
|
-
run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --no-git-tag-version --loglevel=verbose
|
|
77
|
-
<% } -%>
|
|
74
|
+
|
|
78
75
|
- name: Configure Git user
|
|
79
76
|
if: github.ref == 'refs/heads/main' && !inputs.dry-run
|
|
80
77
|
run: |
|
|
@@ -84,11 +81,7 @@ jobs:
|
|
|
84
81
|
- name: New version
|
|
85
82
|
if: github.ref == 'refs/heads/main' && !inputs.dry-run
|
|
86
83
|
run: |
|
|
87
|
-
<% if (enableYarnVersion) { -%>
|
|
88
84
|
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' : '' %>'
|
|
89
|
-
<% } else { -%>
|
|
90
|
-
yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --create-release=github -m 'chore: release [skip ci]'
|
|
91
|
-
<% } -%>
|
|
92
85
|
env:
|
|
93
86
|
HUSKY: 0
|
|
94
87
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
@@ -30,18 +30,6 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
30
30
|
description: "test runner (jest or node)",
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
this.option("enableReleasePlease", {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true,
|
|
36
|
-
description: "enable release-please",
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
this.option("enableYarnVersion", {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: true,
|
|
42
|
-
description: "enable yarn version conventional commits",
|
|
43
|
-
});
|
|
44
|
-
|
|
45
33
|
this.option("ci", {
|
|
46
34
|
type: Boolean,
|
|
47
35
|
required: true,
|
|
@@ -128,8 +116,6 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
128
116
|
if (!inMonorepo || inMonorepo.root) {
|
|
129
117
|
this.composeWith("pob:core:ci", {
|
|
130
118
|
enable: this.options.ci,
|
|
131
|
-
enableReleasePlease: this.options.enableReleasePlease,
|
|
132
|
-
enableYarnVersion: this.options.enableYarnVersion,
|
|
133
119
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
134
120
|
testing: this.options.enable,
|
|
135
121
|
testRunner: this.options.runner,
|
|
@@ -171,7 +171,7 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
171
171
|
return ["@pob/root/tsconfigs/targets/rollup-es2015.json"];
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
if (this.options.isApp && pkg.
|
|
174
|
+
if (this.options.isApp && pkg.dependencies?.expo) {
|
|
175
175
|
return ["@pob/root/tsconfigs/targets/expo.json"];
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -17,18 +17,6 @@ export default class CoreCIGenerator extends Generator {
|
|
|
17
17
|
description: "enable ci",
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
this.option("enableReleasePlease", {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: true,
|
|
23
|
-
description: "enable release-please",
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
this.option("enableYarnVersion", {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: true,
|
|
29
|
-
description: "enable yarn version conventional commits",
|
|
30
|
-
});
|
|
31
|
-
|
|
32
20
|
this.option("build", {
|
|
33
21
|
type: Boolean,
|
|
34
22
|
default: true,
|
|
@@ -104,30 +92,6 @@ export default class CoreCIGenerator extends Generator {
|
|
|
104
92
|
});
|
|
105
93
|
}
|
|
106
94
|
|
|
107
|
-
async prompting() {
|
|
108
|
-
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
109
|
-
|
|
110
|
-
this.isReleasePleaseEnabled =
|
|
111
|
-
this.options.enableReleasePlease &&
|
|
112
|
-
!this.options.enableYarnVersion &&
|
|
113
|
-
!pkg.devDependencies?.["standard-version"];
|
|
114
|
-
|
|
115
|
-
if (
|
|
116
|
-
this.options.enableReleasePlease &&
|
|
117
|
-
!process.env.CI &&
|
|
118
|
-
!this.isReleasePleaseEnabled &&
|
|
119
|
-
!this.options.enableYarnVersion
|
|
120
|
-
) {
|
|
121
|
-
const { enableReleasePlease } = await this.prompt({
|
|
122
|
-
type: "confirm",
|
|
123
|
-
name: "enableReleasePlease",
|
|
124
|
-
message: "Would you like to enable release please ?",
|
|
125
|
-
default: true,
|
|
126
|
-
});
|
|
127
|
-
this.isReleasePleaseEnabled = enableReleasePlease;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
95
|
default() {
|
|
132
96
|
if (fs.existsSync(this.destinationPath(".circleci"))) {
|
|
133
97
|
fs.rmdirSync(this.destinationPath(".circleci"), { recursive: true });
|
|
@@ -304,12 +304,9 @@ export default class PobLibGenerator extends Generator {
|
|
|
304
304
|
|
|
305
305
|
this.composeWith("pob:common:remove-old-dependencies");
|
|
306
306
|
|
|
307
|
-
const enableReleasePlease = !inMonorepo && this.options.ci;
|
|
308
|
-
|
|
309
307
|
this.composeWith("pob:common:testing", {
|
|
310
308
|
enable: this.pobjson.testing,
|
|
311
309
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
312
|
-
enableReleasePlease,
|
|
313
310
|
testing: this.pobjson.testing,
|
|
314
311
|
e2eTesting: false,
|
|
315
312
|
runner: this.pobjson.testing
|
|
@@ -336,6 +333,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
336
333
|
documentation:
|
|
337
334
|
!!this.pobjson.documentation ||
|
|
338
335
|
!!(this.pobjson.testing && this.pobjson.testing.codecov),
|
|
336
|
+
storybook: pkg?.devDependencies?.storybook,
|
|
339
337
|
testing: !!this.pobjson.testing,
|
|
340
338
|
testRunner: inMonorepo
|
|
341
339
|
? inMonorepo.pobMonorepoConfig.testRunner
|
|
@@ -365,7 +363,6 @@ export default class PobLibGenerator extends Generator {
|
|
|
365
363
|
withBabel,
|
|
366
364
|
withTypescript,
|
|
367
365
|
isMonorepo: false,
|
|
368
|
-
enableYarnVersion: true,
|
|
369
366
|
ci: this.options.ci,
|
|
370
367
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
371
368
|
updateOnly: this.options.updateOnly,
|
|
@@ -60,6 +60,17 @@ const hasBuild = (packages, configs) =>
|
|
|
60
60
|
),
|
|
61
61
|
);
|
|
62
62
|
|
|
63
|
+
const hasData = (packages, configs) =>
|
|
64
|
+
configs.some(
|
|
65
|
+
(config, index) =>
|
|
66
|
+
!!(
|
|
67
|
+
config &&
|
|
68
|
+
config.project &&
|
|
69
|
+
config.project.type === "app" &&
|
|
70
|
+
config.app.type === "alp-node"
|
|
71
|
+
),
|
|
72
|
+
);
|
|
73
|
+
|
|
63
74
|
const hasTamagui = (packages, configs) =>
|
|
64
75
|
packages.some(
|
|
65
76
|
(pkg) =>
|
|
@@ -180,6 +191,13 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
180
191
|
when: (answers) => answers.ci,
|
|
181
192
|
default: config ? config.testing : true,
|
|
182
193
|
},
|
|
194
|
+
{
|
|
195
|
+
type: "confirm",
|
|
196
|
+
name: "e2eTesting",
|
|
197
|
+
message: "Would you like e2e testing ?",
|
|
198
|
+
when: (answers) => answers.ci,
|
|
199
|
+
default: config ? config.e2eTesting : true,
|
|
200
|
+
},
|
|
183
201
|
{
|
|
184
202
|
type: "confirm",
|
|
185
203
|
name: "codecov",
|
|
@@ -229,8 +247,6 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
229
247
|
|
|
230
248
|
this.composeWith("pob:common:husky", {});
|
|
231
249
|
|
|
232
|
-
const isYarnVersionEnabled = this.pobLernaConfig.ci;
|
|
233
|
-
|
|
234
250
|
const splitCIJobs = this.packageNames.length > 8;
|
|
235
251
|
|
|
236
252
|
this.composeWith("pob:common:testing", {
|
|
@@ -238,8 +254,6 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
238
254
|
enable: this.pobLernaConfig.testing,
|
|
239
255
|
runner: this.pobLernaConfig.testRunner || "jest",
|
|
240
256
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
241
|
-
enableReleasePlease: false,
|
|
242
|
-
enableYarnVersion: isYarnVersionEnabled,
|
|
243
257
|
testing: this.pobLernaConfig.testing,
|
|
244
258
|
e2eTesting: this.pobLernaConfig.e2eTesting,
|
|
245
259
|
build: this.pobLernaConfig.typescript === true,
|
|
@@ -253,6 +267,11 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
253
267
|
splitCIJobs,
|
|
254
268
|
});
|
|
255
269
|
|
|
270
|
+
const rootIgnorePaths = [
|
|
271
|
+
this.pobLernaConfig.e2eTesting && "/playwright-report/",
|
|
272
|
+
this.pobLernaConfig.e2eTesting && "/test-results/",
|
|
273
|
+
].filter(Boolean);
|
|
274
|
+
|
|
256
275
|
const gitignorePaths = [
|
|
257
276
|
hasTamagui(this.packages, this.packageConfigs) && ".tamagui",
|
|
258
277
|
].filter(Boolean);
|
|
@@ -260,6 +279,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
260
279
|
this.composeWith("pob:common:format-lint", {
|
|
261
280
|
monorepo: true,
|
|
262
281
|
documentation: this.pobLernaConfig.documentation,
|
|
282
|
+
storybook: pkg?.devDependencies?.storybook,
|
|
263
283
|
typescript: this.pobLernaConfig.typescript,
|
|
264
284
|
build: this.pobLernaConfig.typescript === true,
|
|
265
285
|
testing: this.pobLernaConfig.testing,
|
|
@@ -271,10 +291,11 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
271
291
|
...gitignorePaths.map((path) => `/${path}`),
|
|
272
292
|
hasDist(this.packages, this.packageConfigs) && "/dist",
|
|
273
293
|
hasBuild(this.packages, this.packageConfigs) && "/build",
|
|
294
|
+
hasData(this.packages, this.packageConfigs) && "/data",
|
|
274
295
|
]
|
|
275
296
|
.filter(Boolean)
|
|
276
297
|
.join("\n"),
|
|
277
|
-
rootIgnorePaths:
|
|
298
|
+
rootIgnorePaths: rootIgnorePaths.join("\n"),
|
|
278
299
|
});
|
|
279
300
|
|
|
280
301
|
this.composeWith("pob:lib:doc", {
|
|
@@ -304,7 +325,11 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
304
325
|
documentation: this.pobLernaConfig.documentation,
|
|
305
326
|
testing: this.pobLernaConfig.testing,
|
|
306
327
|
// TODO add workspaces paths like we do in format-lint
|
|
307
|
-
paths:
|
|
328
|
+
paths: [
|
|
329
|
+
// TODO remove gitignorePaths
|
|
330
|
+
...gitignorePaths,
|
|
331
|
+
...rootIgnorePaths,
|
|
332
|
+
].join("\n"),
|
|
308
333
|
// todo: fix this using workspaces
|
|
309
334
|
// buildDirectory: this.pobLernaConfig.typescript ? `/*/build` : "",
|
|
310
335
|
});
|
|
@@ -317,7 +342,6 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
317
342
|
enablePublish: !this.options.isAppProject,
|
|
318
343
|
withBabel: this.pobLernaConfig.typescript,
|
|
319
344
|
isMonorepo: true,
|
|
320
|
-
enableYarnVersion: isYarnVersionEnabled,
|
|
321
345
|
ci: this.pobLernaConfig.ci,
|
|
322
346
|
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
323
347
|
updateOnly: this.options.updateOnly,
|
|
@@ -100,9 +100,6 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
100
100
|
packageUtils.removeDependencies(pkg, ["lerna"]);
|
|
101
101
|
packageUtils.removeDevDependencies(pkg, ["lerna"]);
|
|
102
102
|
|
|
103
|
-
// TODO remove lerna completely
|
|
104
|
-
const isYarnVersionEnabled = true;
|
|
105
|
-
|
|
106
103
|
const getPackagePobConfig = (config) => ({
|
|
107
104
|
babelEnvs: [],
|
|
108
105
|
...(config && config.pob),
|
|
@@ -130,35 +127,25 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
130
127
|
lernaConfig.command.publish.ignoreChanges.push("**/tsconfig.json");
|
|
131
128
|
}
|
|
132
129
|
|
|
133
|
-
if (
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
pkg.version = lernaConfig.version;
|
|
139
|
-
}
|
|
130
|
+
if (pkg.version === "0.0.0" && lernaConfig && lernaConfig.version) {
|
|
131
|
+
if (lernaConfig.version === "independent") {
|
|
132
|
+
delete pkg.version;
|
|
133
|
+
} else {
|
|
134
|
+
pkg.version = lernaConfig.version;
|
|
140
135
|
}
|
|
141
|
-
this.fs.delete(this.destinationPath("lerna.json"));
|
|
142
|
-
} else {
|
|
143
|
-
writeAndFormatJson(
|
|
144
|
-
this.fs,
|
|
145
|
-
this.destinationPath("lerna.json"),
|
|
146
|
-
lernaConfig,
|
|
147
|
-
);
|
|
148
136
|
}
|
|
137
|
+
this.fs.delete(this.destinationPath("lerna.json"));
|
|
149
138
|
|
|
150
139
|
if (this.fs.exists(this.destinationPath("lerna-debug.log"))) {
|
|
151
140
|
this.fs.delete(this.destinationPath("lerna-debug.log"));
|
|
152
141
|
}
|
|
153
142
|
|
|
154
|
-
|
|
155
|
-
pkg
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
);
|
|
143
|
+
if (
|
|
144
|
+
pkg.scripts?.version ===
|
|
145
|
+
"YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn && git add yarn.lock"
|
|
146
|
+
) {
|
|
147
|
+
delete pkg.scripts.version;
|
|
148
|
+
}
|
|
162
149
|
|
|
163
150
|
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
164
151
|
}
|
|
@@ -81,8 +81,6 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
81
81
|
delete pkg.engines.yarn;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
const isYarnVersionEnabled = true;
|
|
85
|
-
|
|
86
84
|
if (pkg.name !== "pob-monorepo") {
|
|
87
85
|
packageUtils.addDevDependencies(pkg, ["repository-check-dirty"]);
|
|
88
86
|
}
|
|
@@ -111,14 +109,12 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
111
109
|
: "npm run lint:eslint --workspaces",
|
|
112
110
|
});
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
pkg
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
);
|
|
112
|
+
if (
|
|
113
|
+
pkg.scripts?.version ===
|
|
114
|
+
"YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn && git add yarn.lock"
|
|
115
|
+
) {
|
|
116
|
+
delete pkg.scripts.version;
|
|
117
|
+
}
|
|
122
118
|
|
|
123
119
|
if (this.options.isAppProject) {
|
|
124
120
|
packageUtils.addOrRemoveScripts(pkg, withBundler, {
|
|
@@ -291,7 +291,7 @@ export default class PobBaseGenerator extends Generator {
|
|
|
291
291
|
|
|
292
292
|
end() {
|
|
293
293
|
if (this.isMonorepo && !this.options.updateOnly) {
|
|
294
|
-
console.log("To create a new
|
|
294
|
+
console.log("To create a new monorepo package: ");
|
|
295
295
|
console.log(" pob add <packageName>");
|
|
296
296
|
}
|
|
297
297
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.9.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@pob/sort-pkg": "12.1.0",
|
|
51
51
|
"@prettier/sync": "0.6.1",
|
|
52
52
|
"@types/inquirer": "9.0.9",
|
|
53
|
-
"@yarnpkg/cli": "4.
|
|
54
|
-
"@yarnpkg/core": "4.
|
|
55
|
-
"@yarnpkg/fslib": "3.1.
|
|
53
|
+
"@yarnpkg/cli": "4.11.0",
|
|
54
|
+
"@yarnpkg/core": "4.5.0",
|
|
55
|
+
"@yarnpkg/fslib": "3.1.4",
|
|
56
56
|
"@yeoman/adapter": "3.1.0",
|
|
57
57
|
"@yeoman/types": "1.8.0",
|
|
58
|
-
"eslint": "9.39.
|
|
58
|
+
"eslint": "9.39.1",
|
|
59
59
|
"findup-sync": "^5.0.0",
|
|
60
60
|
"git-remote-url": "^1.0.1",
|
|
61
61
|
"github-username": "^9.0.0",
|
|
@@ -67,17 +67,17 @@
|
|
|
67
67
|
"mem-fs-editor": "11.1.4",
|
|
68
68
|
"minimist": "1.2.8",
|
|
69
69
|
"parse-author": "2.0.0",
|
|
70
|
-
"pob-dependencies": "20.
|
|
70
|
+
"pob-dependencies": "20.6.0",
|
|
71
71
|
"prettier": "3.6.2",
|
|
72
72
|
"semver": "7.7.3",
|
|
73
73
|
"typescript": "5.9.3",
|
|
74
74
|
"validate-npm-package-name": "^6.0.2",
|
|
75
|
-
"yarn-workspace-utils": "9.
|
|
75
|
+
"yarn-workspace-utils": "9.5.0",
|
|
76
76
|
"yeoman-environment": "5.0.0",
|
|
77
77
|
"yeoman-generator": "7.5.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@pob/root": "19.
|
|
81
|
-
"@types/node": "22.
|
|
80
|
+
"@pob/root": "19.8.0",
|
|
81
|
+
"@types/node": "22.19.1"
|
|
82
82
|
}
|
|
83
83
|
}
|