pob 14.4.2 → 14.5.1
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 +46 -1
- package/lib/generators/app/PobAppGenerator.js +7 -2
- package/lib/generators/common/babel/CommonBabelGenerator.js +41 -15
- package/lib/generators/common/release/CommonReleaseGenerator.js +62 -16
- package/lib/generators/{monorepo/workspaces/templates/workflow-publish.yml.ejs → common/release/templates/workflow-release.yml.ejs} +14 -7
- package/lib/generators/core/ci/CoreCIGenerator.js +4 -4
- package/lib/generators/core/ci/templates/github-action-documentation-workflow.yml.ejs +5 -2
- package/lib/generators/core/ci/templates/github-action-push-workflow-split.yml.ejs +21 -9
- package/lib/generators/core/ci/templates/github-action-push-workflow.yml.ejs +5 -2
- package/lib/generators/core/package/CorePackageGenerator.js +5 -1
- package/lib/generators/core/renovate/CoreRenovateGenerator.js +9 -2
- package/lib/generators/core/yarn/CoreYarnGenerator.js +62 -21
- package/lib/generators/lib/PobLibGenerator.js +7 -2
- package/lib/generators/monorepo/PobMonorepoGenerator.js +7 -7
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +26 -14
- package/lib/generators/monorepo/workspaces/MonorepoWorkspacesGenerator.js +2 -34
- package/lib/utils/writeAndFormat.js +1 -0
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
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
|
+
## [14.5.1](https://github.com/christophehurpeau/pob/compare/pob@14.5.0...pob@14.5.1) (2023-11-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* force update plugin if lifecycle script is missing ([1e29b9d](https://github.com/christophehurpeau/pob/commit/1e29b9d8a2eb4108299afba653f66004ed21e49b))
|
|
12
|
+
* **pob:** fix yarnrc dump options ([bf27b86](https://github.com/christophehurpeau/pob/commit/bf27b86ae1faccff12cbdefd26cdb05166b4b2f2))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [14.5.0](https://github.com/christophehurpeau/pob/compare/pob@14.4.2...pob@14.5.0) (2023-11-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add option omitVersionInFileName ([b599330](https://github.com/christophehurpeau/pob/commit/b599330cb8c077a9dd412066f6aa843b0e999f4e))
|
|
23
|
+
* configure and use yarn 4 ([b272bd1](https://github.com/christophehurpeau/pob/commit/b272bd18df2291e30b5aa062af24547880b3bde0))
|
|
24
|
+
* **deps:** update dependency eslint to v8.52.0 ([#1828](https://github.com/christophehurpeau/pob/issues/1828)) ([d331dda](https://github.com/christophehurpeau/pob/commit/d331ddaad56f5ed0e119c356842192964bf89641))
|
|
25
|
+
* **deps:** update dependency eslint to v8.53.0 ([#1836](https://github.com/christophehurpeau/pob/issues/1836)) ([71e2bcc](https://github.com/christophehurpeau/pob/commit/71e2bccf96bef05db3c4be3e415fd5d20db63a5c))
|
|
26
|
+
* **deps:** update yarn monorepo (major) ([#1830](https://github.com/christophehurpeau/pob/issues/1830)) ([d3bc3da](https://github.com/christophehurpeau/pob/commit/d3bc3dae88e724fbfb5666aa96a96d8d2bce1f34))
|
|
27
|
+
* **pob:** add schema in renovate config ([56bfa78](https://github.com/christophehurpeau/pob/commit/56bfa7838cf862538ea765af5e69e06d9ba140cc))
|
|
28
|
+
* remove lerna by default ([8af4340](https://github.com/christophehurpeau/pob/commit/8af434081e42300f7b355dfa2ac9e98a44db3338))
|
|
29
|
+
* update renovate config to use github repo ([0c21d38](https://github.com/christophehurpeau/pob/commit/0c21d38a4e70c8a97e22eddad1f41731fbb17e8c))
|
|
30
|
+
* update to latest lts ([f0f1ef2](https://github.com/christophehurpeau/pob/commit/f0f1ef26e74e39e6ac61bc916f2db672511e281c))
|
|
31
|
+
* use yarn plugin version in common release generator ([4d48101](https://github.com/christophehurpeau/pob/commit/4d48101292ca37e9ffe283453b3ef492f252ddcb))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* correctly identify if ci is used in monorepo generator for release generator ([f152998](https://github.com/christophehurpeau/pob/commit/f1529987dd026a91bd4fb337912ae8156b7ef451))
|
|
37
|
+
* correctly identify if version plugin should be removed ([e262c32](https://github.com/christophehurpeau/pob/commit/e262c323553721622fcb1c9b2abc50c5c299540d))
|
|
38
|
+
* **deps:** update @pob/eslint-config to v51.1.2 ([#1825](https://github.com/christophehurpeau/pob/issues/1825)) ([cbbccb1](https://github.com/christophehurpeau/pob/commit/cbbccb1a784a0b56fbb3601ef1217a486094cc7a))
|
|
39
|
+
* enable isYarnVersionEnabled even without testing ([9a10396](https://github.com/christophehurpeau/pob/commit/9a10396c134ee16eddea164feb8ea25d05dde941))
|
|
40
|
+
* fix publish command for yarn 4 ([fab3b9f](https://github.com/christophehurpeau/pob/commit/fab3b9f46f5a46ab3b2c20fb2a9289cf868f52d5))
|
|
41
|
+
* only allow to configure bump-dependents-highest-as for independent monorepo ([e56d0eb](https://github.com/christophehurpeau/pob/commit/e56d0eb5ee0f090e35f6274d9d5f2184b53e545f))
|
|
42
|
+
* remove console.log ([5fb2c16](https://github.com/christophehurpeau/pob/commit/5fb2c1608cd5ddf7439d2eeb5bae65eb897361ad))
|
|
43
|
+
|
|
44
|
+
Version bump for dependency: sort-eslint-config
|
|
45
|
+
Version bump for dependency: sort-object
|
|
46
|
+
Version bump for dependency: sort-pkg
|
|
47
|
+
Version bump for dependency: yarn-workspace-utils
|
|
48
|
+
Version bump for dependency: root
|
|
49
|
+
|
|
50
|
+
|
|
6
51
|
## [14.4.2](https://github.com/christophehurpeau/pob/compare/pob@14.4.1...pob@14.4.2) (2023-10-18)
|
|
7
52
|
|
|
8
53
|
|
|
@@ -138,6 +138,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
138
138
|
) {
|
|
139
139
|
this.composeWith('pob:common:babel', {
|
|
140
140
|
updateOnly: this.options.updateOnly,
|
|
141
|
+
onlyLatestLTS: true,
|
|
141
142
|
isApp: true,
|
|
142
143
|
isAppLibrary,
|
|
143
144
|
useAppConfig: this.appConfig.type === 'alp-node',
|
|
@@ -243,9 +244,13 @@ export default class PobAppGenerator extends Generator {
|
|
|
243
244
|
});
|
|
244
245
|
|
|
245
246
|
this.composeWith('pob:common:release', {
|
|
246
|
-
enable: !inMonorepo && this.appConfig.testing
|
|
247
|
+
enable: !inMonorepo && this.appConfig.testing,
|
|
248
|
+
enablePublish: false,
|
|
247
249
|
withBabel: babel,
|
|
248
|
-
|
|
250
|
+
isMonorepo: false,
|
|
251
|
+
enableYarnVersion: true,
|
|
252
|
+
ci: this.appConfig.ci,
|
|
253
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
249
254
|
updateOnly: this.options.updateOnly,
|
|
250
255
|
});
|
|
251
256
|
}
|
|
@@ -51,6 +51,13 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
51
51
|
required: false,
|
|
52
52
|
default: 'dist',
|
|
53
53
|
});
|
|
54
|
+
|
|
55
|
+
this.option('onlyLatestLTS', {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
required: false,
|
|
58
|
+
default: false,
|
|
59
|
+
desc: 'only latest lts',
|
|
60
|
+
});
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
initializing() {
|
|
@@ -60,26 +67,27 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
60
67
|
let babelEnvs = pkg.pob.babelEnvs;
|
|
61
68
|
if (
|
|
62
69
|
!babelEnvs.some(
|
|
63
|
-
(env) =>
|
|
70
|
+
(env) =>
|
|
71
|
+
env.target === 'node' &&
|
|
72
|
+
String(env.version) === (this.options.onlyLatestLTS ? '20' : '18'),
|
|
64
73
|
) &&
|
|
65
74
|
babelEnvs.some(
|
|
66
75
|
(env) =>
|
|
67
76
|
env.target === 'node' &&
|
|
68
|
-
(String(env.version)
|
|
69
|
-
String(env.version) === '
|
|
70
|
-
String(env.version) === '10' ||
|
|
71
|
-
String(env.version) === '12' ||
|
|
72
|
-
String(env.version) === '14' ||
|
|
73
|
-
String(env.version) === '16'),
|
|
77
|
+
(['8', '6', '10', '12', '14', '16'].includes(String(env.version)) ||
|
|
78
|
+
(this.options.onlyLatestLTS && String(env.version) === '18')),
|
|
74
79
|
)
|
|
75
80
|
) {
|
|
76
81
|
babelEnvs.unshift({
|
|
77
82
|
target: 'node',
|
|
78
|
-
version: '18',
|
|
83
|
+
version: this.options.onlyLatestLTS ? '20' : '18',
|
|
84
|
+
omitVersionInFileName: this.options.onlyLatestLTS ? true : undefined,
|
|
79
85
|
});
|
|
80
86
|
}
|
|
81
87
|
babelEnvs = babelEnvs.filter(
|
|
82
|
-
(env) =>
|
|
88
|
+
(env) =>
|
|
89
|
+
env.target !== 'node' ||
|
|
90
|
+
env.version >= (this.options.onlyLatestLTS ? 20 : 18),
|
|
83
91
|
);
|
|
84
92
|
|
|
85
93
|
pkg.pob.babelEnvs = babelEnvs;
|
|
@@ -105,7 +113,13 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
105
113
|
babelEnvs
|
|
106
114
|
.filter((env) => env.target === 'node')
|
|
107
115
|
.map((env) => {
|
|
108
|
-
if (
|
|
116
|
+
if (
|
|
117
|
+
env.version === '14' ||
|
|
118
|
+
env.version === '16' ||
|
|
119
|
+
(this.options.onlyLatestLTS && env.version === '18')
|
|
120
|
+
) {
|
|
121
|
+
return this.options.onlyLatestLTS ? '20' : '18';
|
|
122
|
+
}
|
|
109
123
|
return env.version;
|
|
110
124
|
}),
|
|
111
125
|
),
|
|
@@ -155,7 +169,11 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
155
169
|
default: nodeVersions,
|
|
156
170
|
choices: [
|
|
157
171
|
{
|
|
158
|
-
name: '
|
|
172
|
+
name: '20 (Active LTS)',
|
|
173
|
+
value: '20',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: '18 (Maintenance LTS)',
|
|
159
177
|
value: '18',
|
|
160
178
|
},
|
|
161
179
|
],
|
|
@@ -209,10 +227,13 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
209
227
|
formats:
|
|
210
228
|
babelConfig.formats && babelConfig.formats.includes('cjs')
|
|
211
229
|
? // eslint-disable-next-line unicorn/no-nested-ternary
|
|
212
|
-
version === '
|
|
230
|
+
version === '18' || version === '20'
|
|
213
231
|
? babelConfig.formats
|
|
214
232
|
: undefined
|
|
215
233
|
: undefined,
|
|
234
|
+
omitVersionInFileName:
|
|
235
|
+
// todo add `|| babelConfig.nodeVersions.length === 1` in next major
|
|
236
|
+
version === '20' && this.options.onlyLatestLTS ? true : undefined,
|
|
216
237
|
})),
|
|
217
238
|
...(babelConfig.browserVersions || []).map((version) => ({
|
|
218
239
|
target: 'browser',
|
|
@@ -400,11 +421,12 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
400
421
|
case '12':
|
|
401
422
|
case '14':
|
|
402
423
|
case '16':
|
|
403
|
-
pkg.engines.node = '>=16.12.0';
|
|
404
|
-
break;
|
|
405
424
|
case '18':
|
|
406
425
|
pkg.engines.node = '>=18.12.0';
|
|
407
426
|
break;
|
|
427
|
+
case '20':
|
|
428
|
+
pkg.engines.node = '>=20.9.0';
|
|
429
|
+
break;
|
|
408
430
|
default:
|
|
409
431
|
throw new Error(`Invalid min node version: ${minNodeVersion}`);
|
|
410
432
|
}
|
|
@@ -426,7 +448,11 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
426
448
|
packageUtils.removeDependencies(pkg, ['@types/node']);
|
|
427
449
|
packageUtils.removeDevDependencies(pkg, ['@types/node']);
|
|
428
450
|
// Supports oldest current or active LTS version of node
|
|
429
|
-
|
|
451
|
+
if (this.options.onlyLatestLTS) {
|
|
452
|
+
pkg.engines.node = '>=20.9.0';
|
|
453
|
+
} else {
|
|
454
|
+
pkg.engines.node = '>=18.12.0';
|
|
455
|
+
}
|
|
430
456
|
}
|
|
431
457
|
|
|
432
458
|
/* browserslist */
|
|
@@ -11,6 +11,12 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
11
11
|
desc: 'If releasing is enabled',
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
this.option('enablePublish', {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: true,
|
|
17
|
+
desc: 'If publish on npm is enabled',
|
|
18
|
+
});
|
|
19
|
+
|
|
14
20
|
this.option('withBabel', {
|
|
15
21
|
type: Boolean,
|
|
16
22
|
required: false,
|
|
@@ -18,10 +24,29 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
18
24
|
desc: 'Babel enabled.',
|
|
19
25
|
});
|
|
20
26
|
|
|
21
|
-
this.option('
|
|
27
|
+
this.option('isMonorepo', {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
desc: 'is monorepo',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
this.option('enableYarnVersion', {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true,
|
|
36
|
+
desc: 'enable yarn version conventional commits',
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
this.option('ci', {
|
|
22
40
|
type: Boolean,
|
|
23
41
|
required: true,
|
|
24
|
-
desc: '
|
|
42
|
+
desc: 'ci with github actions',
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
this.option('disableYarnGitCache', {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
default: false,
|
|
49
|
+
desc: 'Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.',
|
|
25
50
|
});
|
|
26
51
|
|
|
27
52
|
this.option('updateOnly', {
|
|
@@ -35,19 +60,44 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
35
60
|
writing() {
|
|
36
61
|
const pkg = this.fs.readJSON(this.destinationPath('package.json'));
|
|
37
62
|
|
|
38
|
-
|
|
39
|
-
this.
|
|
63
|
+
if (this.options.enable && this.options.ci) {
|
|
64
|
+
const useLegacyName = this.fs.exists(
|
|
65
|
+
this.destinationPath('.github/workflows/publish.yml'),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const name = useLegacyName ? 'publish.yml' : 'release.yml';
|
|
40
69
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
// TODO rename release (release = version + publish)
|
|
71
|
+
this.fs.copyTpl(
|
|
72
|
+
this.templatePath('workflow-release.yml.ejs'),
|
|
73
|
+
this.destinationPath(`.github/workflows/${name}`),
|
|
74
|
+
{
|
|
75
|
+
enablePublish: this.options.enablePublish,
|
|
76
|
+
enableYarnVersion: this.options.enableYarnVersion,
|
|
77
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
78
|
+
isMonorepo: this.options.isMonorepo,
|
|
79
|
+
isMonorepoIndependent:
|
|
80
|
+
this.options.isMonorepo &&
|
|
81
|
+
(!pkg.version || pkg.version === '0.0.0'),
|
|
82
|
+
},
|
|
83
|
+
);
|
|
47
84
|
} else {
|
|
85
|
+
this.fs.delete(this.destinationPath('.github/workflows/publish.yml'));
|
|
86
|
+
this.fs.delete(this.destinationPath('.github/workflows/release.yml'));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
packageUtils.removeDevDependencies(pkg, ['standard-version']);
|
|
90
|
+
packageUtils.removeScripts(pkg, [
|
|
91
|
+
'release',
|
|
92
|
+
pkg.name === 'pob-dependencies' ? null : 'preversion',
|
|
93
|
+
]);
|
|
94
|
+
|
|
95
|
+
if (pkg.scripts.version === 'pob-version') {
|
|
96
|
+
delete pkg.scripts.version;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (this.options.enable && !this.options.ci) {
|
|
48
100
|
packageUtils.addScripts(pkg, {
|
|
49
|
-
release:
|
|
50
|
-
"repository-check-dirty && yarn preversion && standard-version -a -m 'chore(release): %s [skip ci]' && git push --follow-tags origin master && npm publish",
|
|
51
101
|
preversion: [
|
|
52
102
|
'yarn run lint',
|
|
53
103
|
this.options.withBabel && 'yarn run build',
|
|
@@ -56,10 +106,6 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
56
106
|
.filter(Boolean)
|
|
57
107
|
.join(' && '),
|
|
58
108
|
});
|
|
59
|
-
|
|
60
|
-
if (pkg.scripts.version === 'pob-version') {
|
|
61
|
-
delete pkg.scripts.version;
|
|
62
|
-
}
|
|
63
109
|
}
|
|
64
110
|
|
|
65
111
|
if (
|
|
@@ -7,7 +7,7 @@ on:
|
|
|
7
7
|
required: true
|
|
8
8
|
type: boolean
|
|
9
9
|
default: false
|
|
10
|
-
<% if (enableYarnVersion) { -%>
|
|
10
|
+
<% if (enableYarnVersion && isMonorepo && isMonorepoIndependent) { -%>
|
|
11
11
|
bump-dependents-highest-as:
|
|
12
12
|
description: "Bump dependents highest as"
|
|
13
13
|
required: false
|
|
@@ -28,9 +28,12 @@ jobs:
|
|
|
28
28
|
token: ${{ secrets.GH_TOKEN }}
|
|
29
29
|
fetch-depth: 0
|
|
30
30
|
|
|
31
|
-
- uses: actions/setup-node@
|
|
31
|
+
- uses: actions/setup-node@v4
|
|
32
32
|
with:
|
|
33
|
-
node-version:
|
|
33
|
+
node-version: 20
|
|
34
|
+
|
|
35
|
+
- name: Enable Corepack
|
|
36
|
+
run: corepack enable
|
|
34
37
|
|
|
35
38
|
- name: Install Dependencies
|
|
36
39
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -42,7 +45,7 @@ jobs:
|
|
|
42
45
|
- name: New version (dry run)
|
|
43
46
|
if: github.ref == 'refs/heads/main' && inputs.dry-run
|
|
44
47
|
<% if (enableYarnVersion) { -%>
|
|
45
|
-
run: yarn version --dry-run
|
|
48
|
+
run: yarn version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
|
|
46
49
|
<% } else { -%>
|
|
47
50
|
run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --no-git-tag-version --loglevel=verbose
|
|
48
51
|
<% } -%>
|
|
@@ -56,7 +59,7 @@ jobs:
|
|
|
56
59
|
if: github.ref == 'refs/heads/main' && !inputs.dry-run
|
|
57
60
|
run: |
|
|
58
61
|
<% if (enableYarnVersion) { -%>
|
|
59
|
-
yarn version --create-release=github --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }} -m 'chore: release <%-
|
|
62
|
+
yarn 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' : '' %>'
|
|
60
63
|
<% } else { -%>
|
|
61
64
|
yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --create-release=github -m 'chore: release [skip ci]'
|
|
62
65
|
<% } -%>
|
|
@@ -64,7 +67,7 @@ jobs:
|
|
|
64
67
|
HUSKY: 0
|
|
65
68
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
66
69
|
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
|
67
|
-
<% if (
|
|
70
|
+
<% if (enablePublish) { -%>
|
|
68
71
|
|
|
69
72
|
- name: Publish to npm
|
|
70
73
|
run: |
|
|
@@ -74,7 +77,11 @@ jobs:
|
|
|
74
77
|
fi
|
|
75
78
|
echo >> ./.yarnrc.yml
|
|
76
79
|
echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
|
|
77
|
-
|
|
80
|
+
<% if (isMonorepo) { -%>
|
|
81
|
+
yarn workspaces foreach --all --parallel --no-private npm publish --tolerate-republish
|
|
82
|
+
<% } else { -%>
|
|
83
|
+
yarn npm publish
|
|
84
|
+
<% } -%>
|
|
78
85
|
if: github.ref == 'refs/heads/main' && !inputs.dry-run
|
|
79
86
|
env:
|
|
80
87
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -168,12 +168,12 @@ export default class CoreCIGenerator extends Generator {
|
|
|
168
168
|
checks && 'checks',
|
|
169
169
|
build && 'build',
|
|
170
170
|
'lint',
|
|
171
|
-
testing && 'test (18)',
|
|
172
|
-
testing &&
|
|
171
|
+
testing && !this.options.onlyLatestLTS && 'test (18)',
|
|
172
|
+
testing && 'test (20)',
|
|
173
173
|
].filter(Boolean)
|
|
174
174
|
: [
|
|
175
|
-
'build (18.x)',
|
|
176
|
-
|
|
175
|
+
!this.options.onlyLatestLTS && 'build (18.x)',
|
|
176
|
+
'build (20.x)',
|
|
177
177
|
].filter(Boolean)),
|
|
178
178
|
);
|
|
179
179
|
} else {
|
|
@@ -10,9 +10,12 @@ jobs:
|
|
|
10
10
|
steps:
|
|
11
11
|
- uses: actions/checkout@v4
|
|
12
12
|
|
|
13
|
-
- uses: actions/setup-node@
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
14
|
with:
|
|
15
|
-
node-version:
|
|
15
|
+
node-version: 20
|
|
16
|
+
|
|
17
|
+
- name: Enable Corepack
|
|
18
|
+
run: corepack enable
|
|
16
19
|
|
|
17
20
|
- name: Install Dependencies
|
|
18
21
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -10,9 +10,12 @@ jobs:
|
|
|
10
10
|
steps:
|
|
11
11
|
- uses: actions/checkout@v4
|
|
12
12
|
|
|
13
|
-
- uses: actions/setup-node@
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
14
|
with:
|
|
15
|
-
node-version:
|
|
15
|
+
node-version: 20
|
|
16
|
+
|
|
17
|
+
- name: Enable Corepack
|
|
18
|
+
run: corepack enable
|
|
16
19
|
|
|
17
20
|
- name: Install Dependencies
|
|
18
21
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -32,9 +35,12 @@ jobs:
|
|
|
32
35
|
steps:
|
|
33
36
|
- uses: actions/checkout@v4
|
|
34
37
|
|
|
35
|
-
- uses: actions/setup-node@
|
|
38
|
+
- uses: actions/setup-node@v4
|
|
36
39
|
with:
|
|
37
|
-
node-version:
|
|
40
|
+
node-version: 20
|
|
41
|
+
|
|
42
|
+
- name: Enable Corepack
|
|
43
|
+
run: corepack enable
|
|
38
44
|
|
|
39
45
|
- name: Install Dependencies
|
|
40
46
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -56,9 +62,12 @@ jobs:
|
|
|
56
62
|
steps:
|
|
57
63
|
- uses: actions/checkout@v4
|
|
58
64
|
|
|
59
|
-
- uses: actions/setup-node@
|
|
65
|
+
- uses: actions/setup-node@v4
|
|
60
66
|
with:
|
|
61
|
-
node-version:
|
|
67
|
+
node-version: 20
|
|
68
|
+
|
|
69
|
+
- name: Enable Corepack
|
|
70
|
+
run: corepack enable
|
|
62
71
|
|
|
63
72
|
- name: Install Dependencies
|
|
64
73
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -89,10 +98,13 @@ jobs:
|
|
|
89
98
|
steps:
|
|
90
99
|
- uses: actions/checkout@v4
|
|
91
100
|
|
|
92
|
-
- uses: actions/setup-node@
|
|
101
|
+
- uses: actions/setup-node@v4
|
|
93
102
|
with:
|
|
94
103
|
node-version: ${{ matrix.node-version }}
|
|
95
104
|
|
|
105
|
+
- name: Enable Corepack
|
|
106
|
+
run: corepack enable
|
|
107
|
+
|
|
96
108
|
- name: Install Dependencies
|
|
97
109
|
<% if (disableYarnGitCache) { -%>
|
|
98
110
|
run: yarn install --immutable
|
|
@@ -129,9 +141,9 @@ jobs:
|
|
|
129
141
|
steps:
|
|
130
142
|
- uses: actions/checkout@v4
|
|
131
143
|
|
|
132
|
-
- uses: actions/setup-node@
|
|
144
|
+
- uses: actions/setup-node@v4
|
|
133
145
|
with:
|
|
134
|
-
node-version:
|
|
146
|
+
node-version: 20
|
|
135
147
|
|
|
136
148
|
- uses: GoogleCloudPlatform/release-please-action@v3
|
|
137
149
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
@@ -8,17 +8,20 @@ jobs:
|
|
|
8
8
|
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
|
-
node-version: [
|
|
11
|
+
node-version: [<% if (!onlyLatestLTS) { -%>18.x, <% } -%>20.x]
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v4
|
|
15
15
|
|
|
16
16
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
-
uses: actions/setup-node@
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
18
|
with:
|
|
19
19
|
node-version: ${{ matrix.node-version }}
|
|
20
20
|
registry-url: 'https://registry.npmjs.org'
|
|
21
21
|
|
|
22
|
+
- name: Enable Corepack
|
|
23
|
+
run: corepack enable
|
|
24
|
+
|
|
22
25
|
<% if (packageManager === 'yarn') { -%>
|
|
23
26
|
- name: Install Dependencies
|
|
24
27
|
<% if (disableYarnGitCache) { -%>
|
|
@@ -46,7 +46,11 @@ export default class CorePackageGenerator extends Generator {
|
|
|
46
46
|
// dont override engines if set to latest
|
|
47
47
|
if (
|
|
48
48
|
!pkg.engines.node ||
|
|
49
|
-
!(
|
|
49
|
+
!(
|
|
50
|
+
pkg.engines.node.startsWith('>=20.') &&
|
|
51
|
+
pkg.engines.node.startsWith('>=18.') &&
|
|
52
|
+
pkg.engines.node !== '>=18.0.0'
|
|
53
|
+
)
|
|
50
54
|
) {
|
|
51
55
|
// this might be overridden by babel generator
|
|
52
56
|
pkg.engines.node = '>=18.12.0'; // .12.0 is the first lts node 18 version
|
|
@@ -66,11 +66,18 @@ export default class CoreRenovateGenerator extends Generator {
|
|
|
66
66
|
);
|
|
67
67
|
|
|
68
68
|
if (this.options.app) {
|
|
69
|
-
renovateConfig
|
|
69
|
+
renovateConfig.$schema =
|
|
70
|
+
'https://docs.renovatebot.com/renovate-schema.json';
|
|
71
|
+
renovateConfig.extends = [
|
|
72
|
+
'config:js-app',
|
|
73
|
+
'github>christophehurpeau/renovate-presets',
|
|
74
|
+
];
|
|
70
75
|
} else {
|
|
71
76
|
renovateConfig.extends = [
|
|
72
77
|
'config:js-lib',
|
|
73
|
-
pkg.name === 'pob-monorepo'
|
|
78
|
+
pkg.name === 'pob-monorepo'
|
|
79
|
+
? undefined
|
|
80
|
+
: 'github>christophehurpeau/renovate-presets',
|
|
74
81
|
].filter(Boolean);
|
|
75
82
|
}
|
|
76
83
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
+
import sortObject from '@pob/sort-object';
|
|
2
3
|
import yml from 'js-yaml';
|
|
4
|
+
import { lt } from 'semver';
|
|
3
5
|
import Generator from 'yeoman-generator';
|
|
4
6
|
import ensureJsonFileFormatted from '../../../utils/ensureJsonFileFormatted.js';
|
|
5
7
|
import inMonorepo from '../../../utils/inMonorepo.js';
|
|
@@ -45,9 +47,10 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
45
47
|
// yarn 2 not yet installed
|
|
46
48
|
// https://yarnpkg.com/getting-started/install
|
|
47
49
|
this.spawnSync('yarn', ['set', 'version', 'stable']);
|
|
48
|
-
} else {
|
|
49
|
-
this.spawnSync('yarn', ['set', 'version', 'stable']);
|
|
50
50
|
ensureJsonFileFormatted(this.destinationPath('package.json'));
|
|
51
|
+
} else {
|
|
52
|
+
// disabled now that corepack is supposed to set the version used
|
|
53
|
+
// this.spawnSync('yarn', ['set', 'version', 'stable']);)
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
}
|
|
@@ -81,9 +84,15 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
81
84
|
this.spawnSync('yarn', ['plugin', 'remove', name]);
|
|
82
85
|
};
|
|
83
86
|
|
|
84
|
-
const installPluginIfNotInstalled = (
|
|
87
|
+
const installPluginIfNotInstalled = (
|
|
88
|
+
name,
|
|
89
|
+
nameOrUrl = name,
|
|
90
|
+
forceInstallIfInstalled = () => false,
|
|
91
|
+
) => {
|
|
85
92
|
if (!isPluginInstalled(name)) {
|
|
86
93
|
installPlugin(nameOrUrl);
|
|
94
|
+
} else if (forceInstallIfInstalled()) {
|
|
95
|
+
installPlugin(nameOrUrl);
|
|
87
96
|
}
|
|
88
97
|
};
|
|
89
98
|
|
|
@@ -94,7 +103,6 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
94
103
|
};
|
|
95
104
|
|
|
96
105
|
const postinstallDevPluginName = '@yarnpkg/plugin-postinstall-dev';
|
|
97
|
-
const workspacesPluginName = '@yarnpkg/plugin-workspace-tools';
|
|
98
106
|
const versionPluginName = '@yarnpkg/plugin-conventional-version';
|
|
99
107
|
|
|
100
108
|
if (!inMonorepo && !pkg.private) {
|
|
@@ -107,16 +115,30 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
if (pkg.workspaces) {
|
|
110
|
-
installPluginIfNotInstalled(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
installPluginIfNotInstalled(
|
|
119
|
+
versionPluginName,
|
|
120
|
+
'https://raw.githubusercontent.com/christophehurpeau/yarn-plugin-conventional-version/main/bundles/%40yarnpkg/plugin-conventional-version.cjs',
|
|
121
|
+
() => {
|
|
122
|
+
const content = fs.readFileSync(
|
|
123
|
+
'.yarn/plugins/@yarnpkg/plugin-conventional-version.cjs',
|
|
124
|
+
'utf8',
|
|
125
|
+
);
|
|
126
|
+
return !content.includes('Lifecycle script: preversion');
|
|
127
|
+
},
|
|
128
|
+
);
|
|
117
129
|
} else {
|
|
118
|
-
|
|
119
|
-
|
|
130
|
+
installPluginIfNotInstalled(
|
|
131
|
+
versionPluginName,
|
|
132
|
+
'https://raw.githubusercontent.com/christophehurpeau/yarn-plugin-conventional-version/main/bundles/%40yarnpkg/plugin-conventional-version.cjs',
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (
|
|
137
|
+
!pkg.packageManager ||
|
|
138
|
+
!pkg.packageManager.startsWith('yarn@') ||
|
|
139
|
+
lt(pkg.packageManager.slice('yarn@'.length), '4.0.1')
|
|
140
|
+
) {
|
|
141
|
+
pkg.packageManager = 'yarn@4.0.1';
|
|
120
142
|
}
|
|
121
143
|
|
|
122
144
|
// must be done after plugins installed
|
|
@@ -125,16 +147,35 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
125
147
|
schema: yml.FAILSAFE_SCHEMA,
|
|
126
148
|
json: true,
|
|
127
149
|
});
|
|
150
|
+
if (this.options.disableYarnGitCache) {
|
|
151
|
+
config.compressionLevel = 'mixed'; // optimized for size
|
|
152
|
+
config.enableGlobalCache = true;
|
|
153
|
+
} else {
|
|
154
|
+
config.compressionLevel = 0; // optimized for github config
|
|
155
|
+
config.enableGlobalCache = false;
|
|
156
|
+
// https://yarnpkg.dev/releases/3-1/
|
|
157
|
+
// make sure all supported architectures are in yarn cache
|
|
158
|
+
config.supportedArchitectures = {
|
|
159
|
+
cpu: ['x64', 'arm64'],
|
|
160
|
+
os: ['linux', 'darwin'],
|
|
161
|
+
};
|
|
162
|
+
}
|
|
128
163
|
config.defaultSemverRangePrefix = this.options.type === 'app' ? '' : '^';
|
|
129
164
|
config.enableMessageNames = false;
|
|
130
165
|
config.nodeLinker = this.options.yarnNodeLinker;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
writeAndFormat(
|
|
166
|
+
|
|
167
|
+
if (config.yarnPath) {
|
|
168
|
+
this.fs.delete(config.yarnPath);
|
|
169
|
+
delete config.yarnPath;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
writeAndFormat(
|
|
173
|
+
this.fs,
|
|
174
|
+
'.yarnrc.yml',
|
|
175
|
+
yml.dump(sortObject(config), {
|
|
176
|
+
lineWidth: 9999,
|
|
177
|
+
}),
|
|
178
|
+
);
|
|
138
179
|
} else {
|
|
139
180
|
this.fs.delete('.yarn');
|
|
140
181
|
this.fs.delete('.yarnrc.yml');
|
|
@@ -160,7 +201,7 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
160
201
|
});
|
|
161
202
|
this.spawnSync('yarn', ['dedupe']);
|
|
162
203
|
|
|
163
|
-
this.spawnSync('yarn', ['prettier', '--write', '.vscode']);
|
|
204
|
+
this.spawnSync('yarn', ['prettier', '--write', '.vscode', '.yarnrc.yml']);
|
|
164
205
|
|
|
165
206
|
const pkg = this.fs.readJSON(this.destinationPath('package.json'));
|
|
166
207
|
|
|
@@ -235,6 +235,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
235
235
|
testing: !!this.pobjson.testing,
|
|
236
236
|
documentation: !!this.pobjson.documentation,
|
|
237
237
|
fromPob: this.options.fromPob,
|
|
238
|
+
onlyLatestLTS: false,
|
|
238
239
|
});
|
|
239
240
|
}
|
|
240
241
|
|
|
@@ -312,9 +313,13 @@ export default class PobLibGenerator extends Generator {
|
|
|
312
313
|
});
|
|
313
314
|
|
|
314
315
|
this.composeWith('pob:common:release', {
|
|
315
|
-
enable: !inMonorepo && this.pobjson.testing
|
|
316
|
+
enable: !inMonorepo && this.pobjson.testing,
|
|
317
|
+
enablePublish: true,
|
|
316
318
|
withBabel: babelEnvs.length > 0,
|
|
317
|
-
|
|
319
|
+
isMonorepo: false,
|
|
320
|
+
enableYarnVersion: true,
|
|
321
|
+
ci: this.pobjson.testing && this.pobjson.testing.ci,
|
|
322
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
318
323
|
updateOnly: this.options.updateOnly,
|
|
319
324
|
});
|
|
320
325
|
|
|
@@ -218,10 +218,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
218
218
|
|
|
219
219
|
this.composeWith('pob:common:husky', {});
|
|
220
220
|
|
|
221
|
-
const isYarnVersionEnabled =
|
|
222
|
-
this.pobLernaConfig.testing &&
|
|
223
|
-
this.pobLernaConfig.ci &&
|
|
224
|
-
!pkg.devDependencies?.['@pob/lerna-light'];
|
|
221
|
+
const isYarnVersionEnabled = this.pobLernaConfig.ci;
|
|
225
222
|
|
|
226
223
|
const splitCIJobs = this.packageNames.length > 8;
|
|
227
224
|
|
|
@@ -290,10 +287,13 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
290
287
|
this.composeWith('pob:common:remove-old-dependencies');
|
|
291
288
|
|
|
292
289
|
this.composeWith('pob:common:release', {
|
|
293
|
-
enable:
|
|
294
|
-
|
|
290
|
+
enable: true,
|
|
291
|
+
enablePublish: !this.options.isAppProject,
|
|
295
292
|
withBabel: this.pobLernaConfig.typescript,
|
|
296
|
-
|
|
293
|
+
isMonorepo: true,
|
|
294
|
+
enableYarnVersion: isYarnVersionEnabled,
|
|
295
|
+
ci: this.pobLernaConfig.ci,
|
|
296
|
+
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
297
297
|
updateOnly: this.options.updateOnly,
|
|
298
298
|
});
|
|
299
299
|
|
|
@@ -93,6 +93,15 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
writing() {
|
|
96
|
+
// package.json
|
|
97
|
+
const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
|
|
98
|
+
delete pkg.lerna;
|
|
99
|
+
packageUtils.removeDependencies(pkg, ['lerna']);
|
|
100
|
+
packageUtils.removeDevDependencies(pkg, ['lerna']);
|
|
101
|
+
|
|
102
|
+
// TODO remove lerna completely
|
|
103
|
+
const isYarnVersionEnabled = true;
|
|
104
|
+
|
|
96
105
|
const getPackagePobConfig = (config) => ({
|
|
97
106
|
babelEnvs: [],
|
|
98
107
|
...(config && config.pob),
|
|
@@ -107,6 +116,7 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
107
116
|
{},
|
|
108
117
|
);
|
|
109
118
|
|
|
119
|
+
// TODO pass that to yarn plugin
|
|
110
120
|
lernaConfig.command.publish.ignoreChanges = [
|
|
111
121
|
'**/.yo-rc.json',
|
|
112
122
|
'**/.eslintrc.json',
|
|
@@ -116,25 +126,27 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
116
126
|
lernaConfig.command.publish.ignoreChanges.push('**/tsconfig.json');
|
|
117
127
|
}
|
|
118
128
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
if (isYarnVersionEnabled) {
|
|
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;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
this.fs.delete(this.destinationPath('lerna.json'));
|
|
138
|
+
} else {
|
|
139
|
+
writeAndFormatJson(
|
|
140
|
+
this.fs,
|
|
141
|
+
this.destinationPath('lerna.json'),
|
|
142
|
+
lernaConfig,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
130
145
|
|
|
131
146
|
if (this.fs.exists(this.destinationPath('lerna-debug.log'))) {
|
|
132
147
|
this.fs.delete(this.destinationPath('lerna-debug.log'));
|
|
133
148
|
}
|
|
134
149
|
|
|
135
|
-
// TODO remove lerna completely
|
|
136
|
-
const isYarnVersionEnabled = !pkg.devDependencies?.['@pob/lerna-light'];
|
|
137
|
-
|
|
138
150
|
packageUtils.addOrRemoveScripts(
|
|
139
151
|
pkg,
|
|
140
152
|
this.options.packageManager === 'yarn' && !isYarnVersionEnabled,
|
|
@@ -67,6 +67,7 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
67
67
|
// package.json
|
|
68
68
|
const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
|
|
69
69
|
packageUtils.removeDependencies(pkg, ['@pob/lerna-light']);
|
|
70
|
+
packageUtils.removeDevDependencies(pkg, ['@pob/lerna-light']);
|
|
70
71
|
|
|
71
72
|
if (this.npm) {
|
|
72
73
|
if (!pkg.engines) pkg.engines = {};
|
|
@@ -76,26 +77,12 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
76
77
|
delete pkg.engines.yarn;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
pkg.devDependencies['@pob/lerna-light'] = 'workspace:*';
|
|
81
|
-
} else {
|
|
82
|
-
packageUtils.addOrRemoveDevDependencies(
|
|
83
|
-
pkg,
|
|
84
|
-
pkg.name !== 'pob-monorepo-test-repository' &&
|
|
85
|
-
pkg.name !== 'use-react-intl-formatters-monorepo',
|
|
86
|
-
// pkg.name !== '@pob/eslint-config-monorepo'
|
|
87
|
-
['@pob/lerna-light'],
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const isYarnVersionEnabled = !pkg.devDependencies?.['@pob/lerna-light'];
|
|
80
|
+
const isYarnVersionEnabled = true;
|
|
92
81
|
|
|
93
82
|
if (pkg.name !== 'pob-monorepo') {
|
|
94
83
|
packageUtils.addDevDependencies(pkg, ['repository-check-dirty']);
|
|
95
84
|
}
|
|
96
85
|
|
|
97
|
-
packageUtils.removeDevDependencies(pkg, ['standard-version']);
|
|
98
|
-
|
|
99
86
|
const monorepoConfig = this.config.get('monorepo');
|
|
100
87
|
const packageManager = this.npm ? 'npm' : 'yarn';
|
|
101
88
|
|
|
@@ -129,25 +116,6 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
129
116
|
},
|
|
130
117
|
);
|
|
131
118
|
|
|
132
|
-
// TODO rename release (release = version + publish)
|
|
133
|
-
this.fs.copyTpl(
|
|
134
|
-
this.templatePath('workflow-publish.yml.ejs'),
|
|
135
|
-
this.destinationPath('.github/workflows/publish.yml'),
|
|
136
|
-
{
|
|
137
|
-
publish: !this.options.isAppProject,
|
|
138
|
-
enableYarnVersion: isYarnVersionEnabled,
|
|
139
|
-
disableYarnGitCache: this.options.disableYarnGitCache,
|
|
140
|
-
isIndependent: !pkg.version || pkg.version === '0.0.0',
|
|
141
|
-
},
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
packageUtils.removeScripts(
|
|
145
|
-
pkg,
|
|
146
|
-
[pkg.name !== 'pob-dependencies' && 'preversion', 'release'].filter(
|
|
147
|
-
Boolean,
|
|
148
|
-
),
|
|
149
|
-
);
|
|
150
|
-
|
|
151
119
|
packageUtils.addOrRemoveScripts(pkg, withBabel, {
|
|
152
120
|
build:
|
|
153
121
|
'yarn workspaces foreach --parallel --topological-dev -Av run build',
|
|
@@ -9,6 +9,7 @@ export function writeAndFormat(fs, destinationPath, content, { parser } = {}) {
|
|
|
9
9
|
trailingComma: 'all',
|
|
10
10
|
singleQuote: !destinationPath.endsWith('.yml'),
|
|
11
11
|
arrowParens: 'always',
|
|
12
|
+
printWidth: destinationPath === '.yarnrc.yml' ? 9999 : undefined,
|
|
12
13
|
}),
|
|
13
14
|
);
|
|
14
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.1",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"prettier": "@pob/root/prettier-config",
|
|
41
41
|
"pob": {},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@pob/eslint-config": "51.1.
|
|
44
|
-
"@pob/eslint-config-typescript": "51.1.
|
|
45
|
-
"@pob/eslint-config-typescript-react": "51.1.
|
|
46
|
-
"@pob/sort-eslint-config": "5.0.
|
|
47
|
-
"@pob/sort-object": "6.0.
|
|
48
|
-
"@pob/sort-pkg": "6.0.
|
|
43
|
+
"@pob/eslint-config": "51.1.2",
|
|
44
|
+
"@pob/eslint-config-typescript": "51.1.2",
|
|
45
|
+
"@pob/eslint-config-typescript-react": "51.1.2",
|
|
46
|
+
"@pob/sort-eslint-config": "5.0.3",
|
|
47
|
+
"@pob/sort-object": "6.0.3",
|
|
48
|
+
"@pob/sort-pkg": "6.0.3",
|
|
49
49
|
"@types/inquirer": "9.0.6",
|
|
50
|
-
"@yarnpkg/cli": "
|
|
51
|
-
"@yarnpkg/core": "
|
|
52
|
-
"@yarnpkg/fslib": "
|
|
50
|
+
"@yarnpkg/cli": "4.0.1",
|
|
51
|
+
"@yarnpkg/core": "4.0.1",
|
|
52
|
+
"@yarnpkg/fslib": "3.0.1",
|
|
53
53
|
"@yeoman/types": "1.1.1",
|
|
54
|
-
"eslint": "8.
|
|
54
|
+
"eslint": "8.53.0",
|
|
55
55
|
"findup-sync": "^5.0.0",
|
|
56
56
|
"git-remote-url": "^1.0.1",
|
|
57
57
|
"github-username": "^7.0.0",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"mem-fs-editor": "10.0.3",
|
|
65
65
|
"minimist": "1.2.8",
|
|
66
66
|
"parse-author": "2.0.0",
|
|
67
|
-
"pob-dependencies": "8.
|
|
67
|
+
"pob-dependencies": "8.8.1",
|
|
68
68
|
"prettier": "2.8.8",
|
|
69
69
|
"semver": "7.5.4",
|
|
70
|
-
"yarn-workspace-utils": "1.0
|
|
70
|
+
"yarn-workspace-utils": "1.1.0",
|
|
71
71
|
"yeoman-environment": "4.0.0-beta.5",
|
|
72
72
|
"yeoman-generator": "6.0.0-rc.6"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@pob/root": "8.
|
|
75
|
+
"@pob/root": "8.5.0"
|
|
76
76
|
}
|
|
77
77
|
}
|