pob 13.0.0 → 13.1.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 +33 -0
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +13 -6
- package/lib/generators/core/package/CorePackageGenerator.js +6 -9
- package/lib/generators/core/package/templates/check-package.js.ejs +1 -1
- package/lib/generators/monorepo/lerna/templates/workflow-publish.yml.ejs +1 -1
- package/lib/utils/writeAndFormat.js +12 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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
|
+
## [13.1.0](https://github.com/christophehurpeau/pob/compare/pob@13.0.2...pob@13.1.0) (2023-06-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **pob:** fix check-package-dependencies template ([6a2f6ed](https://github.com/christophehurpeau/pob/commit/6a2f6ed50f5d04811d59a4b90f25cba0f6b72505))
|
|
12
|
+
* **pob:** improve github repo config ([bfe8c29](https://github.com/christophehurpeau/pob/commit/bfe8c2992987a501f2bfe44bae26f9049002427a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* update to first node 18 lts version ([139fe7d](https://github.com/christophehurpeau/pob/commit/139fe7d1ac70aaae2144f1263a1a3c6c22dd26ab))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [13.0.2](https://github.com/christophehurpeau/pob/compare/pob@13.0.1...pob@13.0.2) (2023-06-26)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* fix yarn call in ci lerna publish ([55d5dd2](https://github.com/christophehurpeau/pob/commit/55d5dd29bcf9d96d732d60f08e1ea1d780acd946))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [13.0.1](https://github.com/christophehurpeau/pob/compare/pob@13.0.0...pob@13.0.1) (2023-06-26)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **pob:** fix json formatter for lerna.json ([11f2df0](https://github.com/christophehurpeau/pob/commit/11f2df062abdc4336e7bed588573ba6edd22034c))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [13.0.0](https://github.com/christophehurpeau/pob/compare/pob@12.0.0...pob@13.0.0) (2023-06-26)
|
|
7
40
|
|
|
8
41
|
|
|
@@ -51,6 +51,17 @@ const configureProtectionRule = async (owner, repo, onlyLatestLTS) => {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
const githubRepoConfig = {
|
|
55
|
+
allow_squash_merge: true,
|
|
56
|
+
allow_merge_commit: false,
|
|
57
|
+
allow_rebase_merge: true,
|
|
58
|
+
allow_auto_merge: true,
|
|
59
|
+
delete_branch_on_merge: true,
|
|
60
|
+
use_squash_pr_title_as_default: true,
|
|
61
|
+
squash_merge_commit_title: 'PR_TITLE',
|
|
62
|
+
squash_merge_commit_message: 'BLANK',
|
|
63
|
+
};
|
|
64
|
+
|
|
54
65
|
export default class CoreGitGithubGenerator extends Generator {
|
|
55
66
|
constructor(args, opts) {
|
|
56
67
|
super(args, opts);
|
|
@@ -113,9 +124,7 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
113
124
|
homepage: null,
|
|
114
125
|
private: false,
|
|
115
126
|
auto_init: false,
|
|
116
|
-
|
|
117
|
-
allow_merge_commit: false,
|
|
118
|
-
allow_rebase_merge: true,
|
|
127
|
+
...githubRepoConfig,
|
|
119
128
|
});
|
|
120
129
|
} catch (err) {
|
|
121
130
|
console.error('Failed to create repository');
|
|
@@ -173,9 +182,7 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
173
182
|
.replace(/^@([^-]*)-/, '$1-') */
|
|
174
183
|
description: pkg.description,
|
|
175
184
|
// homepage: null,
|
|
176
|
-
|
|
177
|
-
allow_merge_commit: false,
|
|
178
|
-
allow_rebase_merge: true,
|
|
185
|
+
...githubRepoConfig,
|
|
179
186
|
});
|
|
180
187
|
|
|
181
188
|
configureProtectionRule(owner, repo, this.options.onlyLatestLTS);
|
|
@@ -37,15 +37,9 @@ export default class CorePackageGenerator extends Generator {
|
|
|
37
37
|
if (!pkg.engines) pkg.engines = {};
|
|
38
38
|
|
|
39
39
|
// dont override engines if set to latest
|
|
40
|
-
if (
|
|
41
|
-
!pkg.engines.node ||
|
|
42
|
-
!(
|
|
43
|
-
pkg.engines.node.startsWith('>=18.') ||
|
|
44
|
-
pkg.engines.node.startsWith('>=16.')
|
|
45
|
-
)
|
|
46
|
-
) {
|
|
40
|
+
if (!pkg.engines.node || !pkg.engines.node.startsWith('>=18.')) {
|
|
47
41
|
// this might be overridden by babel generator
|
|
48
|
-
pkg.engines.node = '>=18.
|
|
42
|
+
pkg.engines.node = '>=18.12.0'; // .12.0 is the first lts node 18 version
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
if (!this.options.updateOnly) {
|
|
@@ -217,8 +211,11 @@ export default class CorePackageGenerator extends Generator {
|
|
|
217
211
|
this.fs.copyTpl(
|
|
218
212
|
this.templatePath('check-package.js.ejs'),
|
|
219
213
|
this.destinationPath('scripts/check-package.js'),
|
|
220
|
-
{
|
|
214
|
+
{
|
|
215
|
+
isLibrary: pkg.private !== true,
|
|
216
|
+
},
|
|
221
217
|
);
|
|
218
|
+
packageUtils.addDevDependencies(pkg, ['check-package-dependencies']);
|
|
222
219
|
}
|
|
223
220
|
|
|
224
221
|
packageUtils.addOrRemoveScripts(
|
|
@@ -57,7 +57,7 @@ jobs:
|
|
|
57
57
|
node-version: 18
|
|
58
58
|
registry-url: "https://registry.npmjs.org"
|
|
59
59
|
|
|
60
|
-
- run: lerna publish from-git --no-verify-access --yes
|
|
60
|
+
- run: yarn lerna publish from-git --no-verify-access --yes
|
|
61
61
|
if: |
|
|
62
62
|
github.ref == 'refs/heads/main'
|
|
63
63
|
&& contains(github.event.inputs.dry-run, 'y') == false
|
|
@@ -13,10 +13,21 @@ export function writeAndFormat(fs, destinationPath, content, { parser } = {}) {
|
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
function getParserFromDestinationPath(destinationPath) {
|
|
17
|
+
if (destinationPath.endsWith('/lerna.json')) {
|
|
18
|
+
return 'json-stringify';
|
|
19
|
+
}
|
|
20
|
+
if (destinationPath.endsWith('json')) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return 'json';
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
export function writeAndFormatJson(fs, destinationPath, value) {
|
|
17
28
|
writeAndFormat(fs, destinationPath, JSON.stringify(value, null, 2), {
|
|
18
29
|
// project.code-workspace is json
|
|
19
|
-
parser: destinationPath
|
|
30
|
+
parser: getParserFromDestinationPath(destinationPath),
|
|
20
31
|
});
|
|
21
32
|
}
|
|
22
33
|
export function copyAndFormatTpl(fs, templatePath, destinationPath, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"mem-fs-editor": "9.7.0",
|
|
58
58
|
"minimist": "1.2.8",
|
|
59
59
|
"parse-author": "2.0.0",
|
|
60
|
-
"pob-dependencies": "8.
|
|
60
|
+
"pob-dependencies": "8.1.0",
|
|
61
61
|
"prettier": "2.8.8",
|
|
62
62
|
"semver": "7.5.3",
|
|
63
63
|
"yeoman-environment": "3.19.3",
|
|
64
64
|
"yeoman-generator": "5.9.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@pob/root": "8.0.
|
|
67
|
+
"@pob/root": "8.0.1"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "7632ede9dd93eeae6b75191c9a57ebbd5fe6d3d5"
|
|
70
70
|
}
|