pob 33.2.0 → 33.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/common/husky/CommonHuskyGenerator.js +6 -6
- package/lib/generators/common/testing/CommonTestingGenerator.js +1 -1
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +3 -0
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +2 -1
- package/lib/generators/core/package/CorePackageGenerator.js +18 -7
- package/package.json +4 -4
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
|
+
## [33.4.0](https://github.com/christophehurpeau/pob/compare/pob@33.3.0...pob@33.4.0) (2026-04-05)
|
|
7
|
+
|
|
8
|
+
Version bump for dependency: pob-dependencies
|
|
9
|
+
Version bump for dependency: @pob/root
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## [33.3.0](https://github.com/christophehurpeau/pob/compare/pob@33.2.0...pob@33.3.0) (2026-03-21)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add support for scripts directory in TypeScript generator
|
|
17
|
+
* add ts support for check-package script
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* ensure testing prompt only appears when testing is enabled
|
|
22
|
+
* only delete git-hooks for legacy
|
|
23
|
+
|
|
24
|
+
Version bump for dependency: pob-dependencies
|
|
25
|
+
Version bump for dependency: @pob/root
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [33.2.0](https://github.com/christophehurpeau/pob/compare/pob@33.1.0...pob@33.2.0) (2026-03-12)
|
|
7
29
|
|
|
8
30
|
### Features
|
|
@@ -33,13 +33,13 @@ export default class CommonHuskyGenerator extends Generator {
|
|
|
33
33
|
this.fs.delete(".git/hooks/post-checkout");
|
|
34
34
|
this.fs.delete(".git/hooks/post-merge");
|
|
35
35
|
this.fs.delete(".git/hooks/pre-commit");
|
|
36
|
-
}
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
this.fs.delete(".git-hooks/prepare-commit-msg");
|
|
38
|
+
this.fs.delete(".git-hooks/post-checkout");
|
|
39
|
+
this.fs.delete(".git-hooks/post-merge");
|
|
40
|
+
this.fs.delete(".git-hooks/pre-commit");
|
|
41
|
+
if (this.fs.exists(".git-hooks")) this.fs.delete(".git-hooks");
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
if (this.fs.exists(this.destinationPath(".huskyrc.js"))) {
|
|
45
45
|
this.fs.delete(this.destinationPath(".huskyrc.js"));
|
|
@@ -108,7 +108,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
async prompting() {
|
|
111
|
-
if (this.options.runner === "jest") {
|
|
111
|
+
if (this.options.enable && this.options.runner === "jest") {
|
|
112
112
|
const { confirm } = await this.prompt([
|
|
113
113
|
{
|
|
114
114
|
type: "confirm",
|
|
@@ -306,6 +306,9 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
306
306
|
monorepoPackageReferences,
|
|
307
307
|
rootDir: this.options.rootDir,
|
|
308
308
|
srcDirectory: this.options.srcDirectory || this.options.rootDir,
|
|
309
|
+
scriptsDirectory: this.fs.exists(this.destinationPath("scripts"))
|
|
310
|
+
? "scripts"
|
|
311
|
+
: undefined,
|
|
309
312
|
jsx,
|
|
310
313
|
jsxPreserve: this.options.jsxPreserve,
|
|
311
314
|
nextConfig: this.options.nextConfig,
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
<%- presets.map(p => `"${p}"`).join(',\n ') %><% } %>
|
|
5
5
|
],
|
|
6
6
|
"include": [
|
|
7
|
-
"<%= srcDirectory %>/**/*.ts"<% if (
|
|
7
|
+
"<%= srcDirectory %>/**/*.ts"<% if (scriptsDirectory) { -%>,
|
|
8
|
+
"<%= scriptsDirectory %>/**/*.ts",<% } %><% if (jsx) { -%>,
|
|
8
9
|
"<%= srcDirectory %>/**/*.tsx"<% } %><% if (srcDirectory !== rootDir) { -%>,
|
|
9
10
|
"<%= rootDir %>/*.ts"<% } %><% if (additionalIncludes.length > 0) { -%>,
|
|
10
11
|
<%- additionalIncludes.map(adi => `"${adi}"`).join(',\n ') %><% } %>
|
|
@@ -254,30 +254,41 @@ export default class CorePackageGenerator extends Generator {
|
|
|
254
254
|
let doesJsCheckPackageExists = this.fs.exists(
|
|
255
255
|
this.destinationPath("scripts/check-package.js"),
|
|
256
256
|
);
|
|
257
|
+
const doesTsCheckPackageExists = this.fs.exists(
|
|
258
|
+
this.destinationPath("scripts/check-package.ts"),
|
|
259
|
+
);
|
|
257
260
|
|
|
258
261
|
if (pkg.type === "module") {
|
|
259
|
-
if (!doesJsCheckPackageExists) {
|
|
262
|
+
if (!doesJsCheckPackageExists && !doesTsCheckPackageExists) {
|
|
260
263
|
doesJsCheckPackageExists = true;
|
|
261
264
|
this.fs.copyTpl(
|
|
262
265
|
this.templatePath("check-package.js.ejs"),
|
|
263
|
-
this.destinationPath("scripts/check-package.
|
|
266
|
+
this.destinationPath("scripts/check-package.ts"),
|
|
264
267
|
{
|
|
265
268
|
isLibrary: pkg.private !== true,
|
|
266
269
|
},
|
|
267
270
|
);
|
|
268
271
|
}
|
|
269
272
|
}
|
|
270
|
-
if (
|
|
273
|
+
if (
|
|
274
|
+
doesJsCheckPackageExists ||
|
|
275
|
+
doesMjsCheckPackageExists ||
|
|
276
|
+
doesTsCheckPackageExists
|
|
277
|
+
) {
|
|
271
278
|
packageUtils.addDevDependencies(pkg, ["check-package-dependencies"]);
|
|
272
279
|
}
|
|
273
280
|
|
|
274
281
|
packageUtils.addOrRemoveScripts(
|
|
275
282
|
pkg,
|
|
276
|
-
doesMjsCheckPackageExists ||
|
|
283
|
+
doesMjsCheckPackageExists ||
|
|
284
|
+
doesJsCheckPackageExists ||
|
|
285
|
+
doesTsCheckPackageExists,
|
|
277
286
|
{
|
|
278
|
-
checks: `node scripts/check-package.${
|
|
279
|
-
doesMjsCheckPackageExists
|
|
280
|
-
|
|
287
|
+
checks: `node scripts/check-package.${(() => {
|
|
288
|
+
if (doesMjsCheckPackageExists) return "mjs";
|
|
289
|
+
if (doesTsCheckPackageExists) return "ts";
|
|
290
|
+
return "js";
|
|
291
|
+
})()}`,
|
|
281
292
|
},
|
|
282
293
|
);
|
|
283
294
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.4.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"mem-fs-editor": "11.1.4",
|
|
64
64
|
"minimist": "1.2.8",
|
|
65
65
|
"parse-author": "2.0.0",
|
|
66
|
-
"pob-dependencies": "22.2.
|
|
66
|
+
"pob-dependencies": "22.2.2",
|
|
67
67
|
"prettier": "3.8.1",
|
|
68
68
|
"semver": "7.7.4",
|
|
69
69
|
"typescript": "5.9.3",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"yeoman-generator": "7.5.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@pob/root": "22.
|
|
76
|
-
"@types/node": "22.19.
|
|
75
|
+
"@pob/root": "22.4.0",
|
|
76
|
+
"@types/node": "22.19.15"
|
|
77
77
|
}
|
|
78
78
|
}
|