pob 9.1.0 → 9.3.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 CHANGED
@@ -3,6 +3,53 @@
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
+ ## [9.3.1](https://github.com/christophehurpeau/pob/compare/pob@9.3.0...pob@9.3.1) (2021-12-11)
7
+
8
+ **Note:** Version bump only for package pob
9
+
10
+
11
+
12
+
13
+
14
+ # [9.3.0](https://github.com/christophehurpeau/pob/compare/pob@9.2.1...pob@9.3.0) (2021-12-11)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **pob:** newline in ci workflow ([78652a1](https://github.com/christophehurpeau/pob/commit/78652a1a412e04ab63fdb5ca7139e86f6e6a3dad))
20
+
21
+
22
+ ### Features
23
+
24
+ * **pob:** ci build ([1d1e76b](https://github.com/christophehurpeau/pob/commit/1d1e76b64e81fb08f3c1ea4de26363d162c9a15f))
25
+ * **pob:** typescript dom condition ([eecb027](https://github.com/christophehurpeau/pob/commit/eecb027d4415a20dfcc5612082d9b6ee3ad6a205))
26
+
27
+
28
+
29
+
30
+
31
+ ## [9.2.1](https://github.com/christophehurpeau/pob/compare/pob@9.2.0...pob@9.2.1) (2021-12-11)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * bring back @babel/core as dev dependency ([9aa52ec](https://github.com/christophehurpeau/pob/commit/9aa52ecf895ac28d216e4957028bb8366c278f00))
37
+
38
+
39
+
40
+
41
+
42
+ # [9.2.0](https://github.com/christophehurpeau/pob/compare/pob@9.1.0...pob@9.2.0) (2021-12-11)
43
+
44
+
45
+ ### Features
46
+
47
+ * **pob:** force global eslint and fix remove plugins on non monorepo ([9c04867](https://github.com/christophehurpeau/pob/commit/9c0486700355e27981f0e1a73d05663a6c1bb16b))
48
+
49
+
50
+
51
+
52
+
6
53
  # [9.1.0](https://github.com/christophehurpeau/pob/compare/pob@9.0.0...pob@9.1.0) (2021-12-11)
7
54
 
8
55
 
@@ -129,6 +129,7 @@ export default class PobAppGenerator extends Generator {
129
129
  this.composeWith('pob:common:typescript', {
130
130
  enable: babel,
131
131
  builddefs: false,
132
+ dom: browser,
132
133
  jsx,
133
134
  updateOnly: this.options.updateOnly,
134
135
  baseUrl: (() => {
@@ -321,7 +321,10 @@ export default class CommonBabelGenerator extends Generator {
321
321
 
322
322
  /* dependencies */
323
323
 
324
- packageUtils.addOrRemoveDevDependencies(pkg, useBabel, ['pob-babel']);
324
+ packageUtils.addOrRemoveDevDependencies(pkg, useBabel, [
325
+ '@babel/core',
326
+ 'pob-babel',
327
+ ]);
325
328
 
326
329
  if (pkg.dependencies && pkg.dependencies['pob-babel']) {
327
330
  // update pob-babel in alp-dev
@@ -337,7 +340,6 @@ export default class CommonBabelGenerator extends Generator {
337
340
  ]);
338
341
 
339
342
  packageUtils.removeDevDependencies(pkg, [
340
- '@babel/core',
341
343
  'rollup',
342
344
  'babel-preset-env', // now @babel/preset-env
343
345
  'babel-preset-jsdoc',
@@ -186,11 +186,11 @@ export default class CommonLintGenerator extends Generator {
186
186
  inLerna.pobConfig.project &&
187
187
  inLerna.pobConfig.project.type;
188
188
 
189
- if (
190
- globalEslint &&
191
- !((inLerna && inLerna.root) || this.options.monorepo) &&
192
- (rootPackageManager !== 'yarn' || rootYarnNodeLinker === 'node-modules')
193
- ) {
189
+ if (this.options.monorepo && !globalEslint) {
190
+ throw new Error('Please enable global eslint');
191
+ }
192
+
193
+ if (globalEslint && !((inLerna && inLerna.root) || this.options.monorepo)) {
194
194
  packageUtils.removeDevDependencies(
195
195
  pkg,
196
196
  [
@@ -227,10 +227,7 @@ export default class CommonLintGenerator extends Generator {
227
227
  ['eslint'],
228
228
  );
229
229
  const shouldHavePluginsDependencies =
230
- !globalEslint ||
231
- !inLerna ||
232
- (rootPackageManager === 'yarn' &&
233
- rootYarnNodeLinker !== 'node-modules');
230
+ rootPackageManager === 'yarn' && rootYarnNodeLinker !== 'node-modules';
234
231
 
235
232
  if (
236
233
  !pkg.name.startsWith('eslint-config') &&
@@ -48,6 +48,7 @@ export default class CommonTestingGenerator extends Generator {
48
48
  this.composeWith('pob:core:ci', {
49
49
  enable: this.options.ci,
50
50
  testing: this.options.testing,
51
+ build: this.options.typescript,
51
52
  typescript: this.options.typescript,
52
53
  documentation: this.options.documentation,
53
54
  codecov: this.options.codecov,
@@ -20,6 +20,12 @@ export default class CommonTypescriptGenerator extends Generator {
20
20
  desc: 'enable jsx with typescript',
21
21
  });
22
22
 
23
+ this.option('dom', {
24
+ type: Boolean,
25
+ defaults: true,
26
+ desc: 'enable dom with typescript',
27
+ });
28
+
23
29
  this.option('baseUrl', {
24
30
  type: String,
25
31
  defaults: '',
@@ -57,7 +63,7 @@ export default class CommonTypescriptGenerator extends Generator {
57
63
  const tsconfigPath = this.destinationPath('tsconfig.json');
58
64
  const tsconfigBuildPath = this.destinationPath('tsconfig.build.json');
59
65
  if (this.options.enable) {
60
- const { jsx } = this.options;
66
+ const { jsx, dom } = this.options;
61
67
  let composite;
62
68
  let monorepoPackageNames;
63
69
  let monorepoPackageSrcPaths;
@@ -108,6 +114,7 @@ export default class CommonTypescriptGenerator extends Generator {
108
114
  monorepoPackageNames,
109
115
  monorepoPackageSrcPaths,
110
116
  jsx,
117
+ dom,
111
118
  baseUrl: this.options.baseUrl,
112
119
  },
113
120
  );
@@ -13,7 +13,7 @@
13
13
 
14
14
  "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
15
15
  "module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
16
- "lib": ["dom", "esnext"], /* Polyfills are imported either by babel or with polyfill.io */
16
+ "lib": [<%- dom ? '"dom", ' : '' %>"esnext"], /* Polyfills are imported either by babel or with polyfill.io */
17
17
  <%= jsx ? '' : '// ' %>"jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
18
18
  "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
19
19
 
@@ -13,6 +13,12 @@ export default class CoreCIGenerator extends Generator {
13
13
  desc: 'enable ci',
14
14
  });
15
15
 
16
+ this.option('build', {
17
+ type: Boolean,
18
+ defaults: true,
19
+ desc: 'enable build',
20
+ });
21
+
16
22
  this.option('typescript', {
17
23
  type: Boolean,
18
24
  defaults: true,
@@ -66,6 +72,7 @@ export default class CoreCIGenerator extends Generator {
66
72
  testing: this.options.testing && !!pkg.scripts.test,
67
73
  checks: !!pkg.scripts && !!pkg.scripts.checks,
68
74
  documentation: this.options.documentation,
75
+ build: this.options.build,
69
76
  typescript: this.options.typescript,
70
77
  codecov: this.options.codecov,
71
78
  },
@@ -54,6 +54,12 @@ jobs:
54
54
  - name: Checks
55
55
  run: <%= packageManager %> run checks
56
56
 
57
+ <% } -%>
58
+ <% if (build) { -%>
59
+ - name: Build
60
+ run: yarn run build
61
+ if: startsWith(matrix.node-version, '16.')
62
+
57
63
  <% } -%>
58
64
  - name: Prettier
59
65
  run: <%= packageManager %> run lint:prettier
@@ -221,9 +221,12 @@ export default class PobLibGenerator extends Generator {
221
221
 
222
222
  const withBabel = babelEnvs.length > 0;
223
223
  const jsx = withBabel && pkg.pob.jsx === true;
224
+ const browser =
225
+ withBabel && babelEnvs.some((env) => env.target === 'browser');
224
226
 
225
227
  this.composeWith('pob:common:typescript', {
226
228
  enable: withBabel,
229
+ dom: browser,
227
230
  jsx,
228
231
  updateOnly: this.options.updateOnly,
229
232
  baseUrl: './src',
@@ -196,6 +196,7 @@ export default class PobMonorepoGenerator extends Generator {
196
196
 
197
197
  this.composeWith('pob:core:ci', {
198
198
  enable: this.pobLernaConfig.ci,
199
+ build: this.pobLernaConfig.typescript,
199
200
  typescript: this.pobLernaConfig.typescript,
200
201
  testing: this.pobLernaConfig.testing,
201
202
  codecov: this.pobLernaConfig.codecov,
@@ -80,8 +80,9 @@ const internalRemoveDependencies = (pkg, type, dependencyKeys) => {
80
80
  internalRemoveFromObject(pkg, type, dependencyKeys);
81
81
  };
82
82
 
83
- const getVersionFromDependencyName = (dependency) =>
84
- pobDependencies[dependency];
83
+ const getVersionFromDependencyName = (dependency) => {
84
+ return pobDependencies[dependency];
85
+ };
85
86
 
86
87
  const internalAddDependencies = (pkg, type, dependencies, cleaned, prefix) => {
87
88
  const ignoreDependencies =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pob",
3
- "version": "9.1.0",
3
+ "version": "9.3.1",
4
4
  "description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
5
5
  "keywords": [
6
6
  "skeleton"
@@ -63,12 +63,12 @@
63
63
  "mem-fs-editor": "8.1.2",
64
64
  "minimist-argv": "^1.1.0",
65
65
  "parse-author": "^2.0.0",
66
- "pob-dependencies": "^6.0.1",
66
+ "pob-dependencies": "^6.0.5",
67
67
  "prettier": "2.5.1",
68
68
  "semver": "^7.3.4",
69
69
  "update-notifier": "^5.0.1",
70
70
  "yeoman-environment": "^3.5.1",
71
71
  "yeoman-generator": "^5.4.0"
72
72
  },
73
- "gitHead": "be649f7d438a93be34f177ee53a339e12bbe8e7b"
73
+ "gitHead": "af56a72ee2ebe57624d26c15689b9ab54ffe13d0"
74
74
  }