pob 11.5.0 → 11.7.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 CHANGED
@@ -3,6 +3,60 @@
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
+ ## [11.7.0](https://github.com/christophehurpeau/pob/compare/pob@11.6.0...pob@11.7.0) (2023-03-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * configure conventional-changelog-conventionalcommits for lerna ([77e7a22](https://github.com/christophehurpeau/pob/commit/77e7a223646b067ee554cdec42c1d9a309faced9))
12
+ * **deps:** update dependency eslint to v8.34.0 ([#1536](https://github.com/christophehurpeau/pob/issues/1536)) ([98769e9](https://github.com/christophehurpeau/pob/commit/98769e96ae30b00495b9fb3dd1310591daec84ae))
13
+ * **deps:** update dependency eslint to v8.35.0 ([#1552](https://github.com/christophehurpeau/pob/issues/1552)) ([c621a8b](https://github.com/christophehurpeau/pob/commit/c621a8b396978845ddef2cb058abb1eababde5b1))
14
+ * **deps:** update dependency eslint to v8.36.0 ([#1562](https://github.com/christophehurpeau/pob/issues/1562)) ([1bf4bee](https://github.com/christophehurpeau/pob/commit/1bf4beee1d330002052399a625c10f971c4f3b16))
15
+ * **deps:** update dependency mem-fs to v2.3.0 ([#1542](https://github.com/christophehurpeau/pob/issues/1542)) ([7b549fa](https://github.com/christophehurpeau/pob/commit/7b549fa07ac95bfe1c7d65a5768226d6b7f34e03))
16
+ * **deps:** update dependency mem-fs-editor to v9.7.0 ([#1554](https://github.com/christophehurpeau/pob/issues/1554)) ([afc1687](https://github.com/christophehurpeau/pob/commit/afc16876a6ffc8fbc10600a345e2f255e5486085))
17
+ * **deps:** update dependency yeoman-environment to v3.14.0 ([#1533](https://github.com/christophehurpeau/pob/issues/1533)) ([8426153](https://github.com/christophehurpeau/pob/commit/842615332b19b49d9a16560b4d018a2b01acb5a6))
18
+ * **deps:** update dependency yeoman-environment to v3.15.0 ([#1543](https://github.com/christophehurpeau/pob/issues/1543)) ([f2a186c](https://github.com/christophehurpeau/pob/commit/f2a186c40d090dac4a1c99b724d473131d68a835))
19
+ * **deps:** update dependency yeoman-generator to v5.8.0 ([#1541](https://github.com/christophehurpeau/pob/issues/1541)) ([664efed](https://github.com/christophehurpeau/pob/commit/664efed2802036b48c50bcd15e92c8ffc429cec3))
20
+ * **pob:** split ci for medium-sized monorepo ([bb0bdde](https://github.com/christophehurpeau/pob/commit/bb0bdde501c3da052653b5937b44a1c2a1fda3f0))
21
+ * support .d.ts in extraEntries ([ff348f1](https://github.com/christophehurpeau/pob/commit/ff348f1317947fb66ecb7162e20b4f45d4d79b2e))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * **deps:** update dependency minimist to v1.2.8 ([#1532](https://github.com/christophehurpeau/pob/issues/1532)) ([e0eddbe](https://github.com/christophehurpeau/pob/commit/e0eddbe2f0466242278fa3ab208998852ce47115))
27
+ * **deps:** update dependency node-fetch to v3.3.1 ([#1563](https://github.com/christophehurpeau/pob/issues/1563)) ([a86cf2e](https://github.com/christophehurpeau/pob/commit/a86cf2eaf232542910cc477f76cb78250cbaab8e))
28
+ * **deps:** update dependency prettier to v2.8.4 ([#1531](https://github.com/christophehurpeau/pob/issues/1531)) ([a25a94d](https://github.com/christophehurpeau/pob/commit/a25a94d7b144626493275dcc465d6dc2076469b5))
29
+ * **deps:** update dependency yeoman-environment to v3.14.1 ([#1535](https://github.com/christophehurpeau/pob/issues/1535)) ([f317e72](https://github.com/christophehurpeau/pob/commit/f317e7267e99c02314de5e9ea1a129dc6d0d6692))
30
+ * **deps:** update dependency yeoman-environment to v3.15.1 ([#1544](https://github.com/christophehurpeau/pob/issues/1544)) ([adb372c](https://github.com/christophehurpeau/pob/commit/adb372c72556a73543adc03258b5f4b2c312902f))
31
+ * **deps:** update dependency yeoman-generator to v5.7.1 ([#1538](https://github.com/christophehurpeau/pob/issues/1538)) ([a69b624](https://github.com/christophehurpeau/pob/commit/a69b62484ff3a1569b6642d8a3302d28e7f9c833))
32
+ * pass onlyLatestLTS option to testing generator ([c705998](https://github.com/christophehurpeau/pob/commit/c7059984913fa3b0b82b7b7813bc08c7ef525640))
33
+ * **pob:** dont delete prettier for pob monorepo ([7c0cbf7](https://github.com/christophehurpeau/pob/commit/7c0cbf753cbd53266d54fe78533d65753bfc1ebd))
34
+ * **pob:** fix baseUrl for libraries ([dfa705f](https://github.com/christophehurpeau/pob/commit/dfa705fd49d0bdc650719ec22ff25567d0a8a1d6))
35
+
36
+
37
+
38
+ # [11.6.0](https://github.com/christophehurpeau/pob/compare/pob@11.5.0...pob@11.6.0) (2023-01-31)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * **deps:** update dependency prettier to v2.8.2 ([#1501](https://github.com/christophehurpeau/pob/issues/1501)) ([2333652](https://github.com/christophehurpeau/pob/commit/2333652411e30def97d3ca6064af7e1fc880c5df))
44
+ * **deps:** update dependency prettier to v2.8.3 ([#1507](https://github.com/christophehurpeau/pob/issues/1507)) ([862c85a](https://github.com/christophehurpeau/pob/commit/862c85a4127ab6c2de8ad1c410f2f9003f011ef2))
45
+ * **pob:** monorepo eslint max_old_space_size for more than 15 packages ([413eda5](https://github.com/christophehurpeau/pob/commit/413eda53dbf574cab80946bbfb69abf271a549d6))
46
+ * **pob:** node app remove ts baseUrl ([b07f2d9](https://github.com/christophehurpeau/pob/commit/b07f2d9f7679683e0903fe0e4826c7a26af7bdb7))
47
+
48
+
49
+ ### Features
50
+
51
+ * **deps:** update dependency eslint to v8.31.0 ([#1497](https://github.com/christophehurpeau/pob/issues/1497)) ([99c2edd](https://github.com/christophehurpeau/pob/commit/99c2edd1da7247c150344b15371ab3518fd432fc))
52
+ * **deps:** update dependency eslint to v8.32.0 ([#1508](https://github.com/christophehurpeau/pob/issues/1508)) ([4549d2f](https://github.com/christophehurpeau/pob/commit/4549d2fd93092e80d2719d11ced34b3d418d77e3))
53
+ * **deps:** update dependency eslint to v8.33.0 ([#1518](https://github.com/christophehurpeau/pob/issues/1518)) ([c8cba58](https://github.com/christophehurpeau/pob/commit/c8cba58bd99201cf368fd1c1d4fc2c6cee12fd06))
54
+ * **deps:** update dependency mem-fs-editor to v9.6.0 ([#1510](https://github.com/christophehurpeau/pob/issues/1510)) ([94a18cb](https://github.com/christophehurpeau/pob/commit/94a18cb51f2f3170d974aaf79b78fc74ab84e881))
55
+
56
+
57
+
58
+
59
+
6
60
  # [11.5.0](https://github.com/christophehurpeau/pob/compare/pob@11.4.3...pob@11.5.0) (2022-12-30)
7
61
 
8
62
 
@@ -159,7 +159,6 @@ export default class PobAppGenerator extends Generator {
159
159
  if (
160
160
  this.appConfig.type === 'alp' ||
161
161
  this.appConfig.type === 'pobpack' ||
162
- this.appConfig.type === 'node' ||
163
162
  this.appConfig.type === 'alp-node' ||
164
163
  this.appConfig.type === 'next.js'
165
164
  ) {
@@ -186,6 +185,8 @@ export default class PobAppGenerator extends Generator {
186
185
  ci: this.appConfig.ci,
187
186
  packageManager: this.options.packageManager,
188
187
  isApp: true,
188
+ splitCIJobs: false,
189
+ onlyLatestLTS: true,
189
190
  });
190
191
 
191
192
  this.composeWith('pob:common:format-lint', {
@@ -666,7 +666,7 @@ export default class CommonBabelGenerator extends Generator {
666
666
  pkg.exports[`./${exportName}`] =
667
667
  pkg.type === 'module'
668
668
  ? // eslint-disable-next-line unicorn/no-nested-ternary
669
- exportName.endsWith('cjs')
669
+ exportName.endsWith('.cjs') || exportName.endsWith('.d.ts')
670
670
  ? `./${exportName}`
671
671
  : `./${exportName}.js`
672
672
  : {
@@ -239,7 +239,9 @@ export default class CommonLintGenerator extends Generator {
239
239
  true,
240
240
  );
241
241
  } else {
242
- packageUtils.removeDevDependencies(pkg, ['prettier']);
242
+ if (pkg.name !== 'pob-monorepo') {
243
+ packageUtils.removeDevDependencies(pkg, ['prettier']);
244
+ }
243
245
  packageUtils.addOrRemoveDevDependencies(
244
246
  pkg,
245
247
  !globalEslint ||
@@ -61,6 +61,18 @@ export default class CommonTestingGenerator extends Generator {
61
61
  required: true,
62
62
  desc: 'is app',
63
63
  });
64
+
65
+ this.option('splitCIJobs', {
66
+ type: Boolean,
67
+ required: true,
68
+ desc: 'split CI jobs for faster result',
69
+ });
70
+
71
+ this.option('onlyLatestLTS', {
72
+ type: Boolean,
73
+ required: true,
74
+ desc: 'only latest lts',
75
+ });
64
76
  }
65
77
 
66
78
  default() {
@@ -75,6 +87,8 @@ export default class CommonTestingGenerator extends Generator {
75
87
  codecov: this.options.codecov,
76
88
  packageManager: this.options.packageManager,
77
89
  isApp: this.options.isApp,
90
+ splitJobs: this.options.splitCIJobs,
91
+ onlyLatestLTS: this.options.onlyLatestLTS,
78
92
  });
79
93
  } else {
80
94
  this.composeWith('pob:core:ci', {
@@ -10,6 +10,9 @@
10
10
  <% } -%>
11
11
  "compilerOptions": {
12
12
  "rootDir": "<%= rootDir %>",
13
+ <% if (baseUrl !== 'none') { -%>
14
+ "baseUrl": "<%= baseUrl %>", /* Base directory to resolve non-absolute module names. */
15
+ <% } -%>
13
16
  "newLine": "lf",
14
17
  <% if (emit) { -%>
15
18
  "outDir": "dist/definitions",
@@ -56,13 +59,13 @@
56
59
  "forceConsistentCasingInFileNames": true,
57
60
 
58
61
  /* Module Resolution Options */
59
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
60
- "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
61
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
62
- <% if (resolveJsonModule) { -%>
62
+ "moduleResolution": "node" /* Specify module resolution strategy. */,
63
+ <% if (resolveJsonModule) { -%>
63
64
  "resolveJsonModule": <%= resolveJsonModule %>,
64
- <% } -%>
65
- "baseUrl": "<%= baseUrl %>"<% if (monorepoPackageSrcPaths) { %>,<% } %> /* Base directory to resolve non-absolute module names. */
65
+ <% } -%>
66
+ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
67
+ "esModuleInterop": true<% if (monorepoPackageSrcPaths) { %>,<% } %> /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
68
+
66
69
  <% if (monorepoPackageSrcPaths && monorepoPackageSrcPaths.length !== 0) { -%>
67
70
  "paths": {
68
71
  <% monorepoPackageSrcPaths.forEach(([packageName, packageLocation], index) => { %>
@@ -4,6 +4,8 @@ import inLerna from '../../../utils/inLerna.js';
4
4
  import * as packageUtils from '../../../utils/package.js';
5
5
  import { copyAndFormatTpl } from '../../../utils/writeAndFormat.js';
6
6
 
7
+ export const ciContexts = [];
8
+
7
9
  export default class CoreCIGenerator extends Generator {
8
10
  constructor(args, opts) {
9
11
  super(args, opts);
@@ -69,10 +71,16 @@ export default class CoreCIGenerator extends Generator {
69
71
  });
70
72
 
71
73
  this.option('onlyLatestLTS', {
72
- type: String,
74
+ type: Boolean,
73
75
  required: true,
74
76
  desc: 'only latest lts',
75
77
  });
78
+
79
+ this.option('splitJobs', {
80
+ type: Boolean,
81
+ required: true,
82
+ desc: 'split CI jobs for faster result',
83
+ });
76
84
  }
77
85
 
78
86
  async prompting() {
@@ -105,16 +113,25 @@ export default class CoreCIGenerator extends Generator {
105
113
  if (this.options.enable) {
106
114
  const pkg = this.fs.readJSON(this.destinationPath('package.json'));
107
115
 
116
+ const checks = !!pkg.scripts && !!pkg.scripts.checks;
117
+ const testing =
118
+ this.options.testing && !!pkg.scripts && !!pkg.scripts.test;
119
+ const build = this.options.build;
120
+
108
121
  copyAndFormatTpl(
109
122
  this.fs,
110
- this.templatePath('github-action-node-workflow.yml.ejs'),
123
+ this.templatePath(
124
+ this.options.splitJobs
125
+ ? 'github-action-push-workflow-split.yml.ejs'
126
+ : 'github-action-push-workflow.yml.ejs',
127
+ ),
111
128
  this.destinationPath('.github/workflows/push.yml'),
112
129
  {
113
130
  packageManager: this.options.packageManager,
114
- testing: this.options.testing && !!pkg.scripts && !!pkg.scripts.test,
115
- checks: !!pkg.scripts && !!pkg.scripts.checks,
131
+ testing,
132
+ checks,
116
133
  documentation: this.options.documentation,
117
- build: this.options.build,
134
+ build,
118
135
  typescript: this.options.typescript,
119
136
  codecov: this.options.codecov,
120
137
  onlyLatestLTS: this.options.onlyLatestLTS,
@@ -127,6 +144,22 @@ export default class CoreCIGenerator extends Generator {
127
144
  inLerna.pobConfig?.project?.type === 'lib',
128
145
  },
129
146
  );
147
+
148
+ ciContexts.push(
149
+ 'reviewflow',
150
+ ...(this.options.splitJobs
151
+ ? [
152
+ checks && 'checks',
153
+ build && 'build',
154
+ 'lint',
155
+ testing && !this.options.onlyLatestLTS && 'test (16)',
156
+ testing && 'test (18)',
157
+ ].filter(Boolean)
158
+ : [
159
+ !this.options.onlyLatestLTS && 'build (16.x)',
160
+ 'build (18.x)',
161
+ ].filter(Boolean)),
162
+ );
130
163
  } else {
131
164
  this.fs.delete(this.destinationPath('.github/workflows/push.yml'));
132
165
  }
@@ -0,0 +1,135 @@
1
+ name: Push CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ <% if (checks) { -%>
7
+ checks:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+
13
+ - uses: actions/setup-node@v3
14
+ with:
15
+ node-version: 18
16
+
17
+ - name: Install Dependencies
18
+ run: yarn install --immutable --immutable-cache
19
+
20
+ - name: Checks
21
+ run: yarn run checks
22
+
23
+ <% } -%>
24
+ <% if (build) { -%>
25
+ build:
26
+ runs-on: ubuntu-latest
27
+
28
+ steps:
29
+ - uses: actions/checkout@v3
30
+
31
+ - uses: actions/setup-node@v3
32
+ with:
33
+ node-version: 18
34
+
35
+ - name: Install Dependencies
36
+ run: yarn install --immutable --immutable-cache
37
+
38
+ - name: Build
39
+ run: yarn run build
40
+
41
+ - name: Check nothing was forgotten before commit
42
+ run: yarn run repository-check-dirty
43
+
44
+ <% } -%>
45
+ lint:
46
+ runs-on: ubuntu-latest
47
+
48
+ steps:
49
+ - uses: actions/checkout@v3
50
+
51
+ - uses: actions/setup-node@v3
52
+ with:
53
+ node-version: 18
54
+
55
+ - name: Install Dependencies
56
+ run: yarn install --immutable --immutable-cache
57
+
58
+ - name: Prettier
59
+ run: yarn run lint:prettier
60
+ <% if (typescript) { -%>
61
+
62
+ - name: Typescript
63
+ run: yarn run tsc
64
+ <% } -%>
65
+
66
+ - name: Eslint
67
+ run: yarn run lint:eslint
68
+ <% if (testing) { -%>
69
+
70
+ test:
71
+ runs-on: ubuntu-latest
72
+
73
+ strategy:
74
+ matrix:
75
+ node-version: [16, 18]
76
+
77
+ steps:
78
+ - uses: actions/checkout@v3
79
+
80
+ - uses: actions/setup-node@v3
81
+ with:
82
+ node-version: ${{ matrix.node-version }}
83
+
84
+ - name: Install Dependencies
85
+ run: yarn install --immutable --immutable-cache
86
+
87
+ <% if (codecov) { -%>
88
+ - name: Test
89
+ run: <%= packageManager %> run test
90
+ if: matrix.node-version != 18
91
+
92
+ - name: Generate Test Coverage
93
+ run: <%= packageManager %> run test --coverage --coverageReporters=json --coverageReporters=text
94
+ if: matrix.node-version == 18
95
+
96
+ - name: Send results to codecov
97
+ uses: codecov/codecov-action@v3
98
+ if: matrix.node-version == 18
99
+ with:
100
+ token: ${{ secrets.CODECOV_TOKEN }}
101
+ <% } else { -%>
102
+
103
+ - name: Test
104
+ run: <%= packageManager %> run test
105
+ <% } -%>
106
+ <% } -%>
107
+ <% if (isReleasePleaseEnabled) { -%>
108
+ release:
109
+ runs-on: ubuntu-latest
110
+
111
+ needs: [<%= checks ? '"checks", ' : '' -%><%= build ? '"build", ' : '' -%>"lint"<%= testing ? ', "test"' : '' -%>]
112
+
113
+ steps:
114
+ - uses: actions/checkout@v3
115
+
116
+ - uses: actions/setup-node@v3
117
+ with:
118
+ node-version: 18
119
+
120
+ - uses: GoogleCloudPlatform/release-please-action@v3
121
+ if: ${{ github.ref == 'refs/heads/main' }}
122
+ id: release
123
+ with:
124
+ token: ${{ secrets.GH_TOKEN }}
125
+ release-type: node
126
+
127
+ <% if (publishSinglePackage) { -%>
128
+
129
+ # publish:
130
+ - run: npm publish
131
+ if: ${{ github.ref == 'refs/heads/main' && steps.release.outputs.release_created }}
132
+ env:
133
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
134
+ <% } -%>
135
+ <% } -%>
@@ -1,4 +1,4 @@
1
- name: Node CI
1
+ name: Push CI
2
2
 
3
3
  on: [push]
4
4
 
@@ -85,7 +85,6 @@ jobs:
85
85
  with:
86
86
  token: ${{ secrets.GH_TOKEN }}
87
87
  release-type: node
88
- package-name: release-please-action
89
88
 
90
89
  <% if (publishSinglePackage) { -%>
91
90
 
@@ -15,10 +15,16 @@ export default class CoreGitGenerator extends Generator {
15
15
  });
16
16
 
17
17
  this.option('onlyLatestLTS', {
18
- type: String,
18
+ type: Boolean,
19
19
  required: true,
20
20
  desc: 'only latest lts',
21
21
  });
22
+
23
+ this.option('splitCIJobs', {
24
+ type: Boolean,
25
+ required: true,
26
+ desc: 'split CI jobs for faster result',
27
+ });
22
28
  }
23
29
 
24
30
  async initializing() {
@@ -101,6 +107,7 @@ export default class CoreGitGenerator extends Generator {
101
107
  gitHostAccount: this.gitHostAccount,
102
108
  repoName: this.repoName,
103
109
  onlyLatestLTS: this.options.onlyLatestLTS,
110
+ splitCIJobs: this.options.splitCIJobs,
104
111
  });
105
112
  }
106
113
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  import fetch from 'node-fetch';
4
4
  import Generator from 'yeoman-generator';
5
+ import { ciContexts } from '../../../ci/CoreCIGenerator.js';
5
6
  // const packageUtils = require('../../../../../utils/package');
6
7
 
7
8
  const GITHUB_TOKEN = process.env.POB_GITHUB_TOKEN;
@@ -30,11 +31,7 @@ const configureProtectionRule = async (owner, repo, onlyLatestLTS) => {
30
31
  await putJson(`repos/${owner}/${repo}/branches/${branch}/protection`, {
31
32
  required_status_checks: {
32
33
  strict: false,
33
- contexts: [
34
- !onlyLatestLTS && 'build (16.x)',
35
- 'build (18.x)',
36
- 'reviewflow',
37
- ].filter(Boolean),
34
+ contexts: ciContexts,
38
35
  },
39
36
  enforce_admins: false, // true,
40
37
  required_pull_request_reviews: null,
@@ -79,11 +76,17 @@ export default class CoreGitGithubGenerator extends Generator {
79
76
  });
80
77
 
81
78
  this.option('onlyLatestLTS', {
82
- type: String,
79
+ type: Boolean,
83
80
  required: true,
84
81
  desc: 'only latest lts',
85
82
  });
86
83
 
84
+ this.option('splitCIJobs', {
85
+ type: Boolean,
86
+ required: true,
87
+ desc: 'split CI jobs for faster result',
88
+ });
89
+
87
90
  if (!GITHUB_TOKEN && process.env.CI !== 'true') {
88
91
  throw new Error(
89
92
  'Missing POB_GITHUB_TOKEN. Create one with https://github.com/settings/tokens/new?scopes=repo&description=POB%20Generator and add it in your env variables.',
@@ -228,7 +228,7 @@ export default class PobLibGenerator extends Generator {
228
228
  dom: browser,
229
229
  jsx,
230
230
  updateOnly: this.options.updateOnly,
231
- baseUrl: './src',
231
+ baseUrl: 'none', // causes issues on dist definition files
232
232
  builddefs: true,
233
233
  });
234
234
 
@@ -254,6 +254,7 @@ export default class PobLibGenerator extends Generator {
254
254
  ci: this.pobjson.testing && this.pobjson.testing.ci,
255
255
  packageManager: this.options.packageManager,
256
256
  isApp: false,
257
+ splitCIJobs: false,
257
258
  });
258
259
 
259
260
  // must be after testing
@@ -73,6 +73,12 @@ export default class PobMonorepoGenerator extends Generator {
73
73
  defaults: 'pnp',
74
74
  desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
75
75
  });
76
+
77
+ this.option('onlyLatestLTS', {
78
+ type: Boolean,
79
+ required: true,
80
+ desc: 'only latest lts',
81
+ });
76
82
  }
77
83
 
78
84
  async initializing() {
@@ -206,6 +212,8 @@ export default class PobMonorepoGenerator extends Generator {
206
212
  this.pobLernaConfig.ci &&
207
213
  !pkg.devDependencies?.['@pob/lerna-light'];
208
214
 
215
+ const splitCIJobs = this.packageNames.length > 8;
216
+
209
217
  this.composeWith('pob:common:testing', {
210
218
  monorepo: true,
211
219
  enable: this.pobLernaConfig.testing,
@@ -217,6 +225,8 @@ export default class PobMonorepoGenerator extends Generator {
217
225
  ci: this.pobLernaConfig.ci,
218
226
  packageManager: this.options.packageManager,
219
227
  isApp: this.options.isAppProject,
228
+ onlyLatestLTS: this.options.onlyLatestLTS,
229
+ splitCIJobs,
220
230
  });
221
231
 
222
232
  this.composeWith('pob:common:format-lint', {
@@ -159,7 +159,7 @@ export default class MonorepoLernaGenerator extends Generator {
159
159
  monorepoConfig.eslint &&
160
160
  this.packagesConfig.length < 50
161
161
  ? `${
162
- this.packagesConfig.length > 20
162
+ this.packagesConfig.length > 15
163
163
  ? 'NODE_OPTIONS=--max_old_space_size=4096 '
164
164
  : ''
165
165
  }eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet .`
@@ -27,7 +27,7 @@ jobs:
27
27
  if: |
28
28
  github.ref == 'refs/heads/main'
29
29
  && contains(github.event.inputs.dry-run, 'y')
30
- run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --no-git-tag-version --loglevel=verbose
30
+ run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --no-git-tag-version --loglevel=verbose
31
31
 
32
32
  - name: Configure Git user
33
33
  if: |
@@ -42,7 +42,7 @@ jobs:
42
42
  github.ref == 'refs/heads/main'
43
43
  && contains(github.event.inputs.dry-run, 'y') == false
44
44
  run: |
45
- yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --create-release=github -m 'chore: release [skip ci]'
45
+ yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --create-release=github -m 'chore: release [skip ci]'
46
46
  env:
47
47
  HUSKY: 0
48
48
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -1,3 +1,4 @@
1
+ import { fileURLToPath } from 'url';
1
2
  import Generator from 'yeoman-generator';
2
3
  import ensureJsonFileFormatted from '../../utils/ensureJsonFileFormatted.js';
3
4
  import inLerna from '../../utils/inLerna.js';
@@ -162,8 +163,11 @@ export default class PobBaseGenerator extends Generator {
162
163
  inLerna.pobConfig?.project?.onlyLatestLTS === true));
163
164
 
164
165
  if (!this.inLerna) {
166
+ const splitCIJobs =
167
+ inLerna && inLerna.pobMonorepoConfig.packageNames.length > 8;
165
168
  this.composeWith('pob:core:git', {
166
169
  onlyLatestLTS,
170
+ splitCIJobs,
167
171
  });
168
172
  } else {
169
173
  if (this.fs.exists('.git-hooks')) this.fs.delete('.git-hooks');
@@ -186,12 +190,19 @@ export default class PobBaseGenerator extends Generator {
186
190
  }
187
191
 
188
192
  if (this.useLerna) {
189
- this.composeWith('pob:monorepo', {
190
- updateOnly: this.options.updateOnly,
191
- isAppProject: this.projectConfig.type === 'app',
192
- packageManager: this.projectConfig.packageManager,
193
- yarnNodeLinker: this.projectConfig.yarnNodeLinker,
194
- });
193
+ this.composeWith(
194
+ // pob:monorepo <= for searching PobMonorepoGenerator.js
195
+ fileURLToPath(
196
+ new URL('../monorepo/PobMonorepoGenerator.js', import.meta.url),
197
+ ),
198
+ {
199
+ updateOnly: this.options.updateOnly,
200
+ isAppProject: this.projectConfig.type === 'app',
201
+ packageManager: this.projectConfig.packageManager,
202
+ yarnNodeLinker: this.projectConfig.yarnNodeLinker,
203
+ onlyLatestLTS,
204
+ },
205
+ );
195
206
  } else {
196
207
  switch (this.projectConfig.type) {
197
208
  case 'lib':
package/lib/pob.js CHANGED
@@ -30,7 +30,6 @@ import CoreYarnGenerator from './generators/core/yarn/CoreYarnGenerator.js';
30
30
  import PobLibGenerator from './generators/lib/PobLibGenerator.js';
31
31
  import LibDocGenerator from './generators/lib/doc/LibDocGenerator.js';
32
32
  import LibReadmeGenerator from './generators/lib/readme/LibReadmeGenerator.js';
33
- import PobMonorepoGenerator from './generators/monorepo/PobMonorepoGenerator.js';
34
33
  import MonorepoLernaGenerator from './generators/monorepo/lerna/MonorepoLernaGenerator.js';
35
34
  import MonorepoTypescriptGenerator from './generators/monorepo/typescript/MonorepoTypescriptGenerator.js';
36
35
  import PobBaseGenerator from './generators/pob/PobBaseGenerator.js';
@@ -202,11 +201,6 @@ env.registerStub(
202
201
  'pob:lib:readme',
203
202
  `${__dirname}/generators/lib/readme/LibReadmeGenerator.js`,
204
203
  );
205
- env.registerStub(
206
- PobMonorepoGenerator,
207
- 'pob:monorepo',
208
- `${__dirname}/generators/monorepo/PobMonorepoGenerator.js`,
209
- );
210
204
  env.registerStub(
211
205
  MonorepoLernaGenerator,
212
206
  'pob:monorepo:lerna',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "11.5.0",
3
+ "version": "11.7.0",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -28,6 +28,7 @@
28
28
  "sideEffects": false,
29
29
  "bin": "./lib/pob.js",
30
30
  "scripts": {
31
+ "clean:build": "true",
31
32
  "format": "prettier --write",
32
33
  "lint": "yarn run lint:eslint",
33
34
  "lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/pob"
@@ -40,10 +41,10 @@
40
41
  "@pob/eslint-config": "50.0.0",
41
42
  "@pob/eslint-config-typescript": "50.0.0",
42
43
  "@pob/eslint-config-typescript-react": "50.0.0",
43
- "@pob/sort-eslint-config": "4.1.0",
44
- "@pob/sort-object": "5.1.0",
45
- "@pob/sort-pkg": "5.1.0",
46
- "eslint": "8.30.0",
44
+ "@pob/sort-eslint-config": "4.1.1",
45
+ "@pob/sort-object": "5.1.1",
46
+ "@pob/sort-pkg": "5.1.1",
47
+ "eslint": "8.36.0",
47
48
  "findup-sync": "^5.0.0",
48
49
  "git-remote-url": "^1.0.1",
49
50
  "github-username": "^6.0.0",
@@ -52,19 +53,19 @@
52
53
  "json5": "^2.2.2",
53
54
  "lodash.camelcase": "^4.3.0",
54
55
  "lodash.kebabcase": "^4.1.1",
55
- "mem-fs": "2.2.1",
56
- "mem-fs-editor": "9.5.0",
57
- "minimist": "1.2.7",
58
- "node-fetch": "3.3.0",
56
+ "mem-fs": "2.3.0",
57
+ "mem-fs-editor": "9.7.0",
58
+ "minimist": "1.2.8",
59
+ "node-fetch": "3.3.1",
59
60
  "parse-author": "2.0.0",
60
- "pob-dependencies": "7.3.0",
61
- "prettier": "2.8.1",
61
+ "pob-dependencies": "7.5.0",
62
+ "prettier": "2.8.4",
62
63
  "semver": "7.3.8",
63
- "yeoman-environment": "3.13.0",
64
- "yeoman-generator": "5.7.0"
64
+ "yeoman-environment": "3.15.1",
65
+ "yeoman-generator": "5.8.0"
65
66
  },
66
67
  "devDependencies": {
67
- "@pob/root": "7.3.0"
68
+ "@pob/root": "7.5.0"
68
69
  },
69
- "gitHead": "d8f2ef86402ce3aa4c7bf9d0f02175bf7be2751a"
70
+ "gitHead": "760271a7f86157af842aba3d3383c97605532097"
70
71
  }