pob 12.0.0 → 13.0.2

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,66 @@
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.0.2](https://github.com/christophehurpeau/pob/compare/pob@13.0.1...pob@13.0.2) (2023-06-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * fix yarn call in ci lerna publish ([55d5dd2](https://github.com/christophehurpeau/pob/commit/55d5dd29bcf9d96d732d60f08e1ea1d780acd946))
12
+
13
+
14
+
15
+ ## [13.0.1](https://github.com/christophehurpeau/pob/compare/pob@13.0.0...pob@13.0.1) (2023-06-26)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **pob:** fix json formatter for lerna.json ([11f2df0](https://github.com/christophehurpeau/pob/commit/11f2df062abdc4336e7bed588573ba6edd22034c))
21
+
22
+
23
+
24
+ ## [13.0.0](https://github.com/christophehurpeau/pob/compare/pob@12.0.0...pob@13.0.0) (2023-06-26)
25
+
26
+
27
+ ### ⚠ BREAKING CHANGES
28
+
29
+ * requires node 18
30
+
31
+ ### Features
32
+
33
+ * **deps:** update dependency eslint to v8.39.0 ([#1617](https://github.com/christophehurpeau/pob/issues/1617)) ([b42979d](https://github.com/christophehurpeau/pob/commit/b42979d8586e55afee60b1280059916293879711))
34
+ * **deps:** update dependency eslint to v8.40.0 ([#1627](https://github.com/christophehurpeau/pob/issues/1627)) ([6d5dfe6](https://github.com/christophehurpeau/pob/commit/6d5dfe6a3576c53b9da773605e35729dcd8e5610))
35
+ * **deps:** update dependency eslint to v8.41.0 ([#1646](https://github.com/christophehurpeau/pob/issues/1646)) ([11c8395](https://github.com/christophehurpeau/pob/commit/11c8395a08bd281c8960b6ba62999f67b21334aa))
36
+ * **deps:** update dependency yeoman-environment to v3.16.1 ([#1630](https://github.com/christophehurpeau/pob/issues/1630)) ([5ca9ad5](https://github.com/christophehurpeau/pob/commit/5ca9ad515ead63c31c10dccac40c5942974f5760))
37
+ * **deps:** update dependency yeoman-environment to v3.17.0 ([#1638](https://github.com/christophehurpeau/pob/issues/1638)) ([3d1a154](https://github.com/christophehurpeau/pob/commit/3d1a1546d088b4020873eca0ae566ae3ac41a45d))
38
+ * **deps:** update dependency yeoman-environment to v3.18.1 ([#1643](https://github.com/christophehurpeau/pob/issues/1643)) ([e1144ed](https://github.com/christophehurpeau/pob/commit/e1144ed11f476729f90634b7e6c7530af1f959f4))
39
+ * **deps:** update dependency yeoman-environment to v3.19.0 ([#1656](https://github.com/christophehurpeau/pob/issues/1656)) ([82b613f](https://github.com/christophehurpeau/pob/commit/82b613f2ada3ecef8c47b247d32b677a88b596e9))
40
+ * remove legacy code-workspace ([c5bcdc7](https://github.com/christophehurpeau/pob/commit/c5bcdc7735dfda0b369a3045ecc618f8ea11794d))
41
+ * requires node 18 ([bd35158](https://github.com/christophehurpeau/pob/commit/bd351582c2c3977d8d22c15b831e277acc97a00e))
42
+ * update ci to node 18 ([1e4cf82](https://github.com/christophehurpeau/pob/commit/1e4cf828521d24c7142544de3dc3b1dbd62dc9a8))
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * **deps:** update @pob/eslint-config to v50.0.5 ([#1629](https://github.com/christophehurpeau/pob/issues/1629)) ([c7065bc](https://github.com/christophehurpeau/pob/commit/c7065bc1757c12fadb848ddd8333c0684b8880e4))
48
+ * **deps:** update dependency prettier to v2.8.8 ([#1619](https://github.com/christophehurpeau/pob/issues/1619)) ([40f1313](https://github.com/christophehurpeau/pob/commit/40f13138243c0b53c52293314111458e6c8d2d6a))
49
+ * **deps:** update dependency semver to v7.5.1 ([#1636](https://github.com/christophehurpeau/pob/issues/1636)) ([9556202](https://github.com/christophehurpeau/pob/commit/95562027a2cdb674b7081c614235e4a07bbc1a22))
50
+ * **deps:** update dependency semver to v7.5.2 ([#1680](https://github.com/christophehurpeau/pob/issues/1680)) ([312c2b2](https://github.com/christophehurpeau/pob/commit/312c2b2c2e2149dbd6a99203fdbe579ffddff98e))
51
+ * **deps:** update dependency semver to v7.5.3 ([#1682](https://github.com/christophehurpeau/pob/issues/1682)) ([8e8b2ef](https://github.com/christophehurpeau/pob/commit/8e8b2efa7ad39077299c5bcdb2c55941038e989a))
52
+ * **deps:** update dependency yeoman-environment to v3.16.2 ([#1632](https://github.com/christophehurpeau/pob/issues/1632)) ([feb4f3a](https://github.com/christophehurpeau/pob/commit/feb4f3a1a819a67444261d1731d39e1fcb62b77d))
53
+ * **deps:** update dependency yeoman-environment to v3.18.2 ([#1644](https://github.com/christophehurpeau/pob/issues/1644)) ([a64dede](https://github.com/christophehurpeau/pob/commit/a64dede35c0b698409644061539bd6f40a0f3c09))
54
+ * **deps:** update dependency yeoman-environment to v3.18.4 ([#1649](https://github.com/christophehurpeau/pob/issues/1649)) ([51059b6](https://github.com/christophehurpeau/pob/commit/51059b64357b32f32f0dc85735111dff3f980fd4))
55
+ * **deps:** update dependency yeoman-environment to v3.19.1 ([#1658](https://github.com/christophehurpeau/pob/issues/1658)) ([0d9ccf7](https://github.com/christophehurpeau/pob/commit/0d9ccf777d0b1216ea9db2bb27c3fec19f0317e2))
56
+ * **deps:** update dependency yeoman-environment to v3.19.2 ([#1659](https://github.com/christophehurpeau/pob/issues/1659)) ([94d5b8b](https://github.com/christophehurpeau/pob/commit/94d5b8be10fd16e07cb7fd56d28393276814a92e))
57
+ * **deps:** update dependency yeoman-environment to v3.19.3 ([#1660](https://github.com/christophehurpeau/pob/issues/1660)) ([9e0452e](https://github.com/christophehurpeau/pob/commit/9e0452e04fc6eab054d949b7954b02eb39c33e8f))
58
+ * **deps:** update yeoman group ([#1645](https://github.com/christophehurpeau/pob/issues/1645)) ([1686097](https://github.com/christophehurpeau/pob/commit/1686097cfb644bbb5ae78a647b1cd9cc07e1f440))
59
+ * dont enable gh-pages with node testing runner ([f1d0fe5](https://github.com/christophehurpeau/pob/commit/f1d0fe512bf4f1d014d2fa7959bb1fbadac48025))
60
+ * fix tsconfig paths ([5aaa499](https://github.com/christophehurpeau/pob/commit/5aaa499fc5fb3a69e33705e1a72e49dbb69739db))
61
+ * sort supportedArchitectures in yarn.yml alpha ([045c7a6](https://github.com/christophehurpeau/pob/commit/045c7a6d9e3697f68debe68a47300bbf239df58e))
62
+ * update github ci required ([fd5afbf](https://github.com/christophehurpeau/pob/commit/fd5afbf935095fb0613f85496d1d2eb2e81ed8ea))
63
+
64
+
65
+
6
66
  ## [12.0.0](https://github.com/christophehurpeau/pob/compare/pob@11.9.0...pob@12.0.0) (2023-04-18)
7
67
 
8
68
 
@@ -54,7 +54,7 @@ export default class CommonBabelGenerator extends Generator {
54
54
  let babelEnvs = pkg.pob.babelEnvs;
55
55
  if (
56
56
  !babelEnvs.some(
57
- (env) => env.target === 'node' && String(env.version) === '14',
57
+ (env) => env.target === 'node' && String(env.version) === '18',
58
58
  ) &&
59
59
  babelEnvs.some(
60
60
  (env) =>
@@ -62,16 +62,18 @@ export default class CommonBabelGenerator extends Generator {
62
62
  (String(env.version) === '8' ||
63
63
  String(env.version) === '6' ||
64
64
  String(env.version) === '10' ||
65
- String(env.version) === '12'),
65
+ String(env.version) === '12' ||
66
+ String(env.version) === '14' ||
67
+ String(env.version) === '16'),
66
68
  )
67
69
  ) {
68
70
  babelEnvs.unshift({
69
71
  target: 'node',
70
- version: '16',
72
+ version: '18',
71
73
  });
72
74
  }
73
75
  babelEnvs = babelEnvs.filter(
74
- (env) => env.target !== 'node' || env.version >= 14,
76
+ (env) => env.target !== 'node' || env.version >= 18,
75
77
  );
76
78
 
77
79
  pkg.pob.babelEnvs = babelEnvs;
@@ -97,7 +99,7 @@ export default class CommonBabelGenerator extends Generator {
97
99
  babelEnvs
98
100
  .filter((env) => env.target === 'node')
99
101
  .map((env) => {
100
- if (env.version === '14') return '16';
102
+ if (env.version === '14' || env.version === '16') return '18';
101
103
  return env.version;
102
104
  }),
103
105
  ),
@@ -147,8 +149,8 @@ export default class CommonBabelGenerator extends Generator {
147
149
  default: nodeVersions,
148
150
  choices: [
149
151
  {
150
- name: '16 (Maintenance LTS)',
151
- value: '16',
152
+ name: '18 (Active LTS)',
153
+ value: '18',
152
154
  },
153
155
  ],
154
156
  },
@@ -201,7 +203,7 @@ export default class CommonBabelGenerator extends Generator {
201
203
  formats:
202
204
  babelConfig.formats && babelConfig.formats.includes('cjs')
203
205
  ? // eslint-disable-next-line unicorn/no-nested-ternary
204
- version === '16'
206
+ version === '16' || version === '18'
205
207
  ? babelConfig.formats
206
208
  : undefined
207
209
  : undefined,
@@ -385,11 +387,12 @@ export default class CommonBabelGenerator extends Generator {
385
387
  case '10':
386
388
  case '12':
387
389
  case '14':
388
- pkg.engines.node = '>=16.0.0';
389
- break;
390
390
  case '16':
391
391
  pkg.engines.node = '>=16.0.0';
392
392
  break;
393
+ case '18':
394
+ pkg.engines.node = '>=18.0.0';
395
+ break;
393
396
  default:
394
397
  throw new Error(`Invalid min node version: ${minNodeVersion}`);
395
398
  }
@@ -410,8 +413,8 @@ export default class CommonBabelGenerator extends Generator {
410
413
  } else {
411
414
  packageUtils.removeDependencies(pkg, ['@types/node']);
412
415
  packageUtils.removeDevDependencies(pkg, ['@types/node']);
413
- // Supported LTS versions of node, that supports ESM modules.
414
- pkg.engines.node = '>=16.0.0';
416
+ // Supports oldest current or active LTS version of node
417
+ pkg.engines.node = '>=18.0.0';
415
418
  }
416
419
 
417
420
  /* browserslist */
@@ -70,8 +70,8 @@
70
70
  <% if (monorepoPackageSrcPaths && monorepoPackageSrcPaths.length !== 0) { -%>
71
71
  "paths": {
72
72
  <% monorepoPackageSrcPaths.forEach(([packageName, packageLocation], index) => { %>
73
- "<%= packageName %>": ["../<%= packageLocation %>"],
74
- "<%= packageName %>/*": ["../<%= packageLocation %>/*"]<%= index === monorepoPackageSrcPaths.length -1 ? '' : ',' -%>
73
+ "<%= packageName %>": ["<%= packageLocation %>"],
74
+ "<%= packageName %>/*": ["<%= packageLocation %>/*"]<%= index === monorepoPackageSrcPaths.length -1 ? '' : ',' -%>
75
75
  <% }) %>
76
76
  }<% } %>
77
77
  }<% if (monorepoPackageReferences && monorepoPackageReferences.length) { -%>,
@@ -152,12 +152,12 @@ export default class CoreCIGenerator extends Generator {
152
152
  checks && 'checks',
153
153
  build && 'build',
154
154
  'lint',
155
- testing && !this.options.onlyLatestLTS && 'test (16)',
156
155
  testing && 'test (18)',
156
+ testing && !this.options.onlyLatestLTS && 'test (20)',
157
157
  ].filter(Boolean)
158
158
  : [
159
- !this.options.onlyLatestLTS && 'build (16.x)',
160
159
  'build (18.x)',
160
+ !this.options.onlyLatestLTS && 'build (20.x)',
161
161
  ].filter(Boolean)),
162
162
  );
163
163
  } else {
@@ -167,7 +167,8 @@ export default class CoreCIGenerator extends Generator {
167
167
  if (
168
168
  this.options.enable &&
169
169
  !this.options.isApp &&
170
- (this.options.documentation || this.options.testing)
170
+ (this.options.documentation ||
171
+ (this.options.testing && this.options.testing.runner !== 'node'))
171
172
  ) {
172
173
  copyAndFormatTpl(
173
174
  this.fs,
@@ -12,7 +12,7 @@ jobs:
12
12
 
13
13
  - uses: actions/setup-node@v3
14
14
  with:
15
- node-version: 16
15
+ node-version: 18
16
16
 
17
17
  - name: Install Dependencies
18
18
  run: yarn install --immutable --immutable-cache
@@ -72,7 +72,7 @@ jobs:
72
72
 
73
73
  strategy:
74
74
  matrix:
75
- node-version: [16, 18]
75
+ node-version: [18, 20]
76
76
 
77
77
  steps:
78
78
  - uses: actions/checkout@v3
@@ -8,7 +8,7 @@ jobs:
8
8
 
9
9
  strategy:
10
10
  matrix:
11
- node-version: [<% if (!onlyLatestLTS) { -%>16.x, <% } -%>18.x]
11
+ node-version: [<% if (!onlyLatestLTS) { -%>18.x, <% } -%>20.x]
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v3
@@ -40,12 +40,12 @@ export default class CorePackageGenerator extends Generator {
40
40
  if (
41
41
  !pkg.engines.node ||
42
42
  !(
43
- pkg.engines.node.startsWith('>=14.') ||
43
+ pkg.engines.node.startsWith('>=18.') ||
44
44
  pkg.engines.node.startsWith('>=16.')
45
45
  )
46
46
  ) {
47
47
  // this might be overridden by babel generator
48
- pkg.engines.node = '>=14.13.1';
48
+ pkg.engines.node = '>=18.0.0';
49
49
  }
50
50
 
51
51
  if (!this.options.updateOnly) {
@@ -1,9 +1,6 @@
1
1
  import Generator from 'yeoman-generator';
2
2
  import { readJSON5 } from '../../../utils/json5.js';
3
- import {
4
- copyAndFormatTpl,
5
- writeAndFormatJson,
6
- } from '../../../utils/writeAndFormat.js';
3
+ import { copyAndFormatTpl } from '../../../utils/writeAndFormat.js';
7
4
 
8
5
  export default class CoreVSCodeGenerator extends Generator {
9
6
  constructor(args, opts) {
@@ -106,69 +103,14 @@ export default class CoreVSCodeGenerator extends Generator {
106
103
  );
107
104
 
108
105
  if (this.options.monorepo) {
109
- const packageNames = JSON.parse(this.options.packageNames);
110
- const packageLocations = JSON.parse(this.options.packageLocations);
111
- const folders = packageLocations.map((location, i) => ({
112
- name: packageNames[i],
113
- path: `../${location}`,
114
- }));
115
- folders.sort((a, b) => a.name.localeCompare(b.name, 'en'));
116
-
117
- packageLocations.forEach((location) => {
118
- writeAndFormatJson(
119
- this.fs,
120
- this.destinationPath(`${location}/.vscode/settings.json`),
121
- {
122
- 'eslint.workingDirectories': ['../../'],
123
- },
124
- );
125
- });
126
-
127
- const extensions = readJSON5(
128
- this.fs,
129
- this.destinationPath('.vscode/extensions.json'),
130
- {},
131
- );
132
- const settings = readJSON5(
133
- this.fs,
134
- this.destinationPath('.vscode/settings.json'),
135
- {},
136
- );
137
-
138
106
  const projectName = pkg.name.replace('/', '-');
139
- writeAndFormatJson(
140
- this.fs,
107
+ // legacy project code-workspace
108
+ this.fs.delete(
141
109
  this.destinationPath(`.vscode/${projectName}.code-workspace`),
142
- {
143
- extensions,
144
- settings: {
145
- ...settings,
146
- ...(settings['typescript.tsdk']
147
- ? { 'typescript.tsdk': '✨ root/node_modules/typescript/lib' }
148
- : {}),
149
- ...(this.options.testing
150
- ? {
151
- 'jest.jestCommandLine':
152
- 'NODE_OPTIONS=--experimental-vm-modules node_modules/.bin/jest',
153
- // disable all folders to enable only root.
154
- 'jest.disabledWorkspaceFolders': folders.map(
155
- (folder) => folder.name,
156
- ),
157
- }
158
- : {}),
159
- },
160
- folders: [
161
- {
162
- name: '✨ root',
163
- path: '..',
164
- },
165
- ...folders,
166
- ],
167
- },
168
110
  );
169
111
  }
170
112
  } else {
171
- // this.fs.delete('.vscode');
113
+ this.fs.delete('.vscode');
172
114
  }
173
115
  }
174
116
  }
@@ -105,8 +105,8 @@ export default class CoreYarnGenerator extends Generator {
105
105
  // https://yarnpkg.dev/releases/3-1/
106
106
  // make sure all supported architectures are in yarn cache
107
107
  config.supportedArchitectures = {
108
- os: ['linux', 'darwin'],
109
108
  cpu: ['x64', 'arm64'],
109
+ os: ['linux', 'darwin'],
110
110
  };
111
111
  writeAndFormat(this.fs, '.yarnrc.yml', yml.dump(config, {}));
112
112
  } else {
@@ -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.endsWith('json') ? undefined : 'json',
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": "12.0.0",
3
+ "version": "13.0.2",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -38,13 +38,13 @@
38
38
  "dependencies": {
39
39
  "@lerna/package-graph": "5.5.4",
40
40
  "@lerna/project": "5.5.4",
41
- "@pob/eslint-config": "50.0.4",
42
- "@pob/eslint-config-typescript": "50.0.4",
43
- "@pob/eslint-config-typescript-react": "50.0.4",
44
- "@pob/sort-eslint-config": "4.1.1",
45
- "@pob/sort-object": "5.1.1",
46
- "@pob/sort-pkg": "5.2.0",
47
- "eslint": "8.38.0",
41
+ "@pob/eslint-config": "50.0.5",
42
+ "@pob/eslint-config-typescript": "50.0.5",
43
+ "@pob/eslint-config-typescript-react": "50.0.5",
44
+ "@pob/sort-eslint-config": "5.0.0",
45
+ "@pob/sort-object": "6.0.0",
46
+ "@pob/sort-pkg": "6.0.0",
47
+ "eslint": "8.41.0",
48
48
  "findup-sync": "^5.0.0",
49
49
  "git-remote-url": "^1.0.1",
50
50
  "github-username": "^6.0.0",
@@ -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": "7.8.0",
61
- "prettier": "2.8.7",
62
- "semver": "7.5.0",
63
- "yeoman-environment": "3.15.1",
64
- "yeoman-generator": "5.8.0"
60
+ "pob-dependencies": "8.0.0",
61
+ "prettier": "2.8.8",
62
+ "semver": "7.5.3",
63
+ "yeoman-environment": "3.19.3",
64
+ "yeoman-generator": "5.9.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@pob/root": "7.8.0"
67
+ "@pob/root": "8.0.0"
68
68
  },
69
- "gitHead": "efa1629282be7a06f88a2b2c84b87e56c6ea3d30"
69
+ "gitHead": "d240a76212d544942eeaba155820a812cb69f717"
70
70
  }