pob 9.0.0 → 9.3.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 +56 -0
- package/lib/generators/app/PobAppGenerator.js +1 -0
- package/lib/generators/common/babel/CommonBabelGenerator.js +1 -1
- package/lib/generators/common/babel/templates/app.rollup.config.mjs.ejs +1 -1
- package/lib/generators/common/format-lint/CommonLintGenerator.js +6 -9
- package/lib/generators/common/testing/CommonTestingGenerator.js +1 -0
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +8 -1
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +1 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +7 -0
- package/lib/generators/core/ci/templates/github-action-node-workflow.yml.ejs +6 -0
- package/lib/generators/lib/PobLibGenerator.js +3 -0
- package/lib/generators/monorepo/PobMonorepoGenerator.js +1 -0
- package/lib/utils/package.js +3 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,62 @@
|
|
|
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.0](https://github.com/christophehurpeau/pob/compare/pob@9.2.1...pob@9.3.0) (2021-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **pob:** newline in ci workflow ([78652a1](https://github.com/christophehurpeau/pob/commit/78652a1a412e04ab63fdb5ca7139e86f6e6a3dad))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **pob:** ci build ([1d1e76b](https://github.com/christophehurpeau/pob/commit/1d1e76b64e81fb08f3c1ea4de26363d162c9a15f))
|
|
17
|
+
* **pob:** typescript dom condition ([eecb027](https://github.com/christophehurpeau/pob/commit/eecb027d4415a20dfcc5612082d9b6ee3ad6a205))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [9.2.1](https://github.com/christophehurpeau/pob/compare/pob@9.2.0...pob@9.2.1) (2021-12-11)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* bring back @babel/core as dev dependency ([9aa52ec](https://github.com/christophehurpeau/pob/commit/9aa52ecf895ac28d216e4957028bb8366c278f00))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# [9.2.0](https://github.com/christophehurpeau/pob/compare/pob@9.1.0...pob@9.2.0) (2021-12-11)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* **pob:** force global eslint and fix remove plugins on non monorepo ([9c04867](https://github.com/christophehurpeau/pob/commit/9c0486700355e27981f0e1a73d05663a6c1bb16b))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# [9.1.0](https://github.com/christophehurpeau/pob/compare/pob@9.0.0...pob@9.1.0) (2021-12-11)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* **pob:** replace devPlugins by plugins ([ddd0681](https://github.com/christophehurpeau/pob/commit/ddd0681284b5f5e9f851737beb2ec76bd69f01be))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* move @babel/core to pob-babel dependencies ([3d42287](https://github.com/christophehurpeau/pob/commit/3d422877476b443a2ea6789e0656ce676963451d))
|
|
56
|
+
* set rollup as dependencies ([8a3a87b](https://github.com/christophehurpeau/pob/commit/8a3a87bd7c541d92ce63bcf33043fedb2df98d01))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
6
62
|
# [9.0.0](https://github.com/christophehurpeau/pob/compare/pob@8.10.1...pob@9.0.0) (2021-12-11)
|
|
7
63
|
|
|
8
64
|
|
|
@@ -324,7 +324,6 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
324
324
|
packageUtils.addOrRemoveDevDependencies(pkg, useBabel, [
|
|
325
325
|
'@babel/core',
|
|
326
326
|
'pob-babel',
|
|
327
|
-
'rollup',
|
|
328
327
|
]);
|
|
329
328
|
|
|
330
329
|
if (pkg.dependencies && pkg.dependencies['pob-babel']) {
|
|
@@ -341,6 +340,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
341
340
|
]);
|
|
342
341
|
|
|
343
342
|
packageUtils.removeDevDependencies(pkg, [
|
|
343
|
+
'rollup',
|
|
344
344
|
'babel-preset-env', // now @babel/preset-env
|
|
345
345
|
'babel-preset-jsdoc',
|
|
346
346
|
'babel-plugin-add-jsdoc-annotations',
|
|
@@ -4,5 +4,5 @@ import createRollupConfig from 'pob-babel/createRollupConfig.js';
|
|
|
4
4
|
const watch = process.env.ROLLUP_WATCH === 'true';
|
|
5
5
|
|
|
6
6
|
export default createRollupConfig({
|
|
7
|
-
|
|
7
|
+
plugins: [watch && run({ execArgv: ['--enable-source-maps'] })],
|
|
8
8
|
});
|
|
@@ -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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
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,
|
package/lib/utils/package.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "9.3.0",
|
|
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.
|
|
66
|
+
"pob-dependencies": "^6.0.4",
|
|
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": "
|
|
73
|
+
"gitHead": "937094f6b4c7776dabb6414630f2c3e5740b8489"
|
|
74
74
|
}
|