pob 36.1.0 → 37.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/lib/generators/app/PobAppGenerator.js +1 -0
- package/lib/generators/common/testing/CommonTestingGenerator.js +7 -0
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +4 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +60 -51
- package/lib/generators/core/pnpm/CorePnpmGenerator.js +1 -0
- package/lib/generators/core/vscode/CoreVSCodeGenerator.js +1 -0
- package/lib/generators/core/vscode/templates/extensions.json.ejs +2 -1
- package/lib/generators/core/vscode/templates/settings.json.ejs +3 -6
- package/lib/generators/lib/PobLibGenerator.js +1 -0
- package/lib/generators/monorepo/PobMonorepoGenerator.js +8 -0
- package/lib/generators/monorepo/typescript/MonorepoTypescriptGenerator.js +4 -1
- package/package.json +8 -7
|
@@ -288,6 +288,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
288
288
|
documentation: false,
|
|
289
289
|
codecov: this.appConfig.codecov,
|
|
290
290
|
ci: this.options.ci,
|
|
291
|
+
ciPushWorkflow: this.options.ci,
|
|
291
292
|
packageManager: this.options.packageManager,
|
|
292
293
|
isApp: true,
|
|
293
294
|
splitCIJobs: false,
|
|
@@ -39,6 +39,12 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
39
39
|
description: "ci",
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
this.option("ciPushWorkflow", {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
required: true,
|
|
45
|
+
description: "push workflow enabled",
|
|
46
|
+
});
|
|
47
|
+
|
|
42
48
|
this.option("typescript", {
|
|
43
49
|
type: Boolean,
|
|
44
50
|
required: true,
|
|
@@ -124,6 +130,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
124
130
|
testing: this.options.enable,
|
|
125
131
|
testRunner: this.options.runner,
|
|
126
132
|
e2eTesting: this.options.e2eTesting,
|
|
133
|
+
push: this.options.pushWorkflow,
|
|
127
134
|
build: this.options.build,
|
|
128
135
|
typescript: this.options.typescript,
|
|
129
136
|
documentation: this.options.documentation,
|
|
@@ -208,11 +208,14 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
208
208
|
delete pkg.scripts.flow;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
// "typescript" is aliased to the typescript 6 api package, still required by
|
|
212
|
+
// typescript-eslint and typedoc. "@typescript/native" is typescript 7, which
|
|
213
|
+
// provides the "tsc" binary.
|
|
211
214
|
packageUtils.addOrRemoveDevDependencies(
|
|
212
215
|
pkg,
|
|
213
216
|
this.options.enable ||
|
|
214
217
|
this.fs.exists(this.destinationPath("lib/index.d.ts")),
|
|
215
|
-
["typescript"],
|
|
218
|
+
["typescript", "@typescript/native"],
|
|
216
219
|
);
|
|
217
220
|
|
|
218
221
|
const tsconfigPath = this.destinationPath("tsconfig.json");
|
|
@@ -20,6 +20,12 @@ export default class CoreCIGenerator extends Generator {
|
|
|
20
20
|
description: "enable ci",
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
this.option("push", {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true,
|
|
26
|
+
description: "enable push workflow",
|
|
27
|
+
});
|
|
28
|
+
|
|
23
29
|
this.option("build", {
|
|
24
30
|
type: Boolean,
|
|
25
31
|
default: true,
|
|
@@ -113,57 +119,60 @@ export default class CoreCIGenerator extends Generator {
|
|
|
113
119
|
this.options.testing && !!pkg.scripts && !!pkg.scripts.test;
|
|
114
120
|
const build = this.options.build;
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
122
|
+
if (this.options.push) {
|
|
123
|
+
await copyAndFormatTpl(
|
|
124
|
+
this.fs,
|
|
125
|
+
this.templatePath(
|
|
126
|
+
this.options.splitJobs
|
|
127
|
+
? "github-action-push-workflow-split.yml.ejs"
|
|
128
|
+
: "github-action-push-workflow.yml.ejs",
|
|
129
|
+
),
|
|
130
|
+
this.destinationPath(".github/workflows/push.yml"),
|
|
131
|
+
{
|
|
132
|
+
packageManager: this.options.packageManager || "yarn",
|
|
133
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
134
|
+
testing,
|
|
135
|
+
e2eTesting:
|
|
136
|
+
this.options.e2eTesting && this.options.e2eTesting !== "false"
|
|
137
|
+
? this.options.e2eTesting
|
|
138
|
+
: false,
|
|
139
|
+
checks,
|
|
140
|
+
documentation: this.options.documentation,
|
|
141
|
+
build,
|
|
142
|
+
typescript: this.options.typescript,
|
|
143
|
+
codecov: this.options.codecov,
|
|
144
|
+
onlyLatestLTS: this.options.onlyLatestLTS,
|
|
145
|
+
isReleasePleaseEnabled: this.isReleasePleaseEnabled,
|
|
146
|
+
publishSinglePackage: this.isReleasePleaseEnabled && !pkg.private,
|
|
147
|
+
publishMonorepo:
|
|
148
|
+
this.isReleasePleaseEnabled &&
|
|
149
|
+
inMonorepo &&
|
|
150
|
+
inMonorepo.root &&
|
|
151
|
+
inMonorepo.pobConfig?.project?.type === "lib",
|
|
152
|
+
nodeLatestMajorVersion: latestLTS,
|
|
153
|
+
nodeMaintenanceMajorVersion: maintenanceLTS,
|
|
154
|
+
packageManagerRun,
|
|
155
|
+
packageManagerExec,
|
|
156
|
+
},
|
|
157
|
+
);
|
|
158
|
+
ciContexts.push(
|
|
159
|
+
"reviewflow",
|
|
160
|
+
...(this.options.splitJobs
|
|
161
|
+
? [
|
|
162
|
+
checks && "checks",
|
|
163
|
+
build && "build",
|
|
164
|
+
"lint",
|
|
165
|
+
testing && !this.options.onlyLatestLTS && `test (${latestLTS})`,
|
|
166
|
+
testing && `test (${maintenanceLTS})`,
|
|
167
|
+
].filter(Boolean)
|
|
168
|
+
: [
|
|
169
|
+
!this.options.onlyLatestLTS && `build (${latestLTS}.x)`,
|
|
170
|
+
`build (${maintenanceLTS}.x)`,
|
|
171
|
+
].filter(Boolean)),
|
|
172
|
+
);
|
|
173
|
+
} else {
|
|
174
|
+
this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
|
|
175
|
+
}
|
|
167
176
|
} else {
|
|
168
177
|
this.fs.delete(this.destinationPath(".github/workflows/push.yml"));
|
|
169
178
|
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
<% } -%>
|
|
9
9
|
"dbaeumer.vscode-eslint",
|
|
10
10
|
"EditorConfig.EditorConfig",
|
|
11
|
-
"esbenp.prettier-vscode"
|
|
11
|
+
"esbenp.prettier-vscode"<% if (typescript) { -%>,
|
|
12
|
+
"TypeScriptTeam.native-preview"<% } %>
|
|
12
13
|
],
|
|
13
14
|
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
|
14
15
|
"unwantedRecommendations": []
|
|
@@ -13,12 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
<% } -%>
|
|
15
15
|
<% if (typescript) { -%>
|
|
16
|
-
|
|
17
|
-
"typescript
|
|
18
|
-
|
|
19
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
20
|
-
<% } -%>
|
|
21
|
-
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
16
|
+
// typescript 7 is provided by the TypeScriptTeam.native-preview extension.
|
|
17
|
+
// "typescript" resolves to the typescript 6 api package, which has no
|
|
18
|
+
// tsserver, so it cannot be used as "typescript.tsdk".
|
|
22
19
|
<% } -%>
|
|
23
20
|
|
|
24
21
|
<% if (yarn) { -%>
|
|
@@ -321,6 +321,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
321
321
|
documentation: !!this.pobjson.documentation,
|
|
322
322
|
codecov: this.pobjson.testing && this.pobjson.testing.codecov,
|
|
323
323
|
ci: this.options.ci,
|
|
324
|
+
ciPushWorkflow: this.options.ci,
|
|
324
325
|
packageManager,
|
|
325
326
|
isApp: false,
|
|
326
327
|
splitCIJobs: false,
|
|
@@ -167,6 +167,13 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
167
167
|
: this.fs.exists(this.destinationPath(".circleci/config.yml")) ||
|
|
168
168
|
this.fs.exists(this.destinationPath(".github/workflows")),
|
|
169
169
|
},
|
|
170
|
+
{
|
|
171
|
+
type: "confirm",
|
|
172
|
+
name: "ciPushWorkflow",
|
|
173
|
+
message: "Would you like ci push workflow ?",
|
|
174
|
+
when: (answers) => answers.ci,
|
|
175
|
+
default: config.ciPushWorkflow == null ? true : config.ciPushWorkflow,
|
|
176
|
+
},
|
|
170
177
|
{
|
|
171
178
|
type: "confirm",
|
|
172
179
|
name: "testing",
|
|
@@ -252,6 +259,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
252
259
|
documentation: !!this.pobLernaConfig.documentation,
|
|
253
260
|
codecov: this.pobLernaConfig.testing && this.pobLernaConfig.codecov,
|
|
254
261
|
ci: this.pobLernaConfig.ci,
|
|
262
|
+
ciPushWorkflow: this.pobLernaConfig.ciPushWorkflow,
|
|
255
263
|
packageManager: this.options.packageManager,
|
|
256
264
|
isApp: this.options.isAppProject,
|
|
257
265
|
onlyLatestLTS: this.options.onlyLatestLTS,
|
|
@@ -81,10 +81,13 @@ export default class MonorepoTypescriptGenerator extends Generator {
|
|
|
81
81
|
delete pkg.scripts.flow;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// "typescript" is aliased to the typescript 6 api package, still required by
|
|
85
|
+
// typescript-eslint and typedoc. "@typescript/native" is typescript 7, which
|
|
86
|
+
// provides the "tsc" binary.
|
|
84
87
|
packageUtils.addOrRemoveDevDependencies(
|
|
85
88
|
pkg,
|
|
86
89
|
pkg.name === "@pob/eslint-config-monorepo" || this.options.enable,
|
|
87
|
-
["typescript"],
|
|
90
|
+
["typescript", "@typescript/native"],
|
|
88
91
|
);
|
|
89
92
|
|
|
90
93
|
if (this.options.enable) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/vitest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -39,25 +39,26 @@
|
|
|
39
39
|
"lodash.camelcase": "^4.3.0",
|
|
40
40
|
"lodash.kebabcase": "^4.1.1",
|
|
41
41
|
"mem-fs": "4.1.5",
|
|
42
|
-
"mem-fs-editor": "12.0.
|
|
42
|
+
"mem-fs-editor": "12.0.6",
|
|
43
43
|
"minimist": "1.2.8",
|
|
44
44
|
"oxfmt": "0.54.0",
|
|
45
45
|
"parse-author": "2.0.0",
|
|
46
46
|
"semver": "7.8.5",
|
|
47
|
-
"typescript": "6.0.
|
|
47
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
48
48
|
"validate-npm-package-name": "^8.0.0",
|
|
49
49
|
"yeoman-environment": "6.1.0",
|
|
50
50
|
"yeoman-generator": "8.2.2",
|
|
51
|
-
"@pob/eslint-config
|
|
52
|
-
"@pob/eslint-config": "
|
|
51
|
+
"@pob/eslint-config": "66.0.0",
|
|
52
|
+
"@pob/eslint-config-typescript-react": "66.0.0",
|
|
53
53
|
"@pob/sort-pkg": "13.1.2",
|
|
54
54
|
"@pob/sort-object": "11.1.1",
|
|
55
|
-
"pob-dependencies": "
|
|
55
|
+
"pob-dependencies": "26.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "24.13.3",
|
|
59
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
59
60
|
"@yeoman/types": "1.11.1",
|
|
60
|
-
"@pob/root": "
|
|
61
|
+
"@pob/root": "26.0.0"
|
|
61
62
|
},
|
|
62
63
|
"engines": {
|
|
63
64
|
"node": ">=22.18.0"
|