pob 9.14.0 → 9.16.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 +63 -0
- package/lib/generators/app/PobAppGenerator.js +8 -1
- package/lib/generators/common/babel/CommonBabelGenerator.js +11 -9
- package/lib/generators/common/babel/templates/lib.rollup.config.mjs.txt +3 -1
- package/lib/generators/common/format-lint/CommonLintGenerator.js +3 -0
- package/lib/generators/common/testing/CommonTestingGenerator.js +3 -0
- package/lib/generators/common/testing/templates/babel.config.cjs.ejs +3 -0
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +1 -0
- package/lib/generators/common/typescript/templates/tsconfig.build.json.ejs +5 -8
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +22 -5
- package/lib/generators/core/ci/templates/github-action-node-workflow.yml.ejs +4 -4
- package/lib/generators/core/vscode/CoreVSCodeGenerator.js +17 -4
- package/lib/generators/core/yarn/CoreYarnGenerator.js +1 -0
- package/lib/generators/lib/doc/templates/tsconfig.doc.json.ejs +1 -2
- package/lib/generators/monorepo/PobMonorepoGenerator.js +43 -2
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +0 -2
- package/lib/generators/monorepo/templates/monorepo.rollup.config.mjs.ejs +9 -0
- package/lib/utils/inLerna.js +2 -4
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,69 @@
|
|
|
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.16.0](https://github.com/christophehurpeau/pob/compare/pob@9.15.1...pob@9.16.0) (2022-02-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **pob:** add monorpeo generaterd rollup config file to ignored paths ([c08328b](https://github.com/christophehurpeau/pob/commit/c08328b9f4970b3488bcd0bfe9f23bcc282144f7))
|
|
12
|
+
* dont delete vscode directory inside monorepo ([837bfe5](https://github.com/christophehurpeau/pob/commit/837bfe577cbf5c892fab95f0f19ff19c9e971f1e))
|
|
13
|
+
* **deps:** update dependency @yarnpkg/parsers to v2.5.0-rc.11 ([#1187](https://github.com/christophehurpeau/pob/issues/1187)) ([70d8a9a](https://github.com/christophehurpeau/pob/commit/70d8a9acfa0325349d465a0ee0539937535026d8))
|
|
14
|
+
* **pob:** ci tsc before eslint to build cache ([92d60de](https://github.com/christophehurpeau/pob/commit/92d60de3d616ed712d7ee4ba42d4d702670afd41))
|
|
15
|
+
* **pob:** generate vscode config for eslint in monorepo workspace ([ebdb9cc](https://github.com/christophehurpeau/pob/commit/ebdb9cc1f8c5b4e5ac325e37fa44c20616779a6a))
|
|
16
|
+
* **pob:** make sure build-state.yml doesnt exists ([322d582](https://github.com/christophehurpeau/pob/commit/322d5826627ba74a188f381e37a1365fe390baa2))
|
|
17
|
+
* dont set isolatedModules to false now that composite is supported with isolatedModules ([5d0816d](https://github.com/christophehurpeau/pob/commit/5d0816d9da90765aba168bd694d2a8e7f696ec46))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* better composite tsc config ([edef88e](https://github.com/christophehurpeau/pob/commit/edef88ef046c18498f6909c3dbeef2289cb418f9))
|
|
23
|
+
* much faster monorepo build with only one rollup command ([c4bafc3](https://github.com/christophehurpeau/pob/commit/c4bafc3be0c06a0a2446d37d176a043835693752))
|
|
24
|
+
* support linaria in jest config ([2e26479](https://github.com/christophehurpeau/pob/commit/2e26479be7016a383c74ee14669aa3a19d3a5a75))
|
|
25
|
+
* **deps:** update @pob/eslint-config to v48.1.0 ([#1188](https://github.com/christophehurpeau/pob/issues/1188)) ([75dd637](https://github.com/christophehurpeau/pob/commit/75dd6373d04359e12beb3b48f54ae2a541af4765))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [9.15.1](https://github.com/christophehurpeau/pob/compare/pob@9.15.0...pob@9.15.1) (2022-01-29)
|
|
32
|
+
|
|
33
|
+
**Note:** Version bump only for package pob
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# [9.15.0](https://github.com/christophehurpeau/pob/compare/pob@9.14.1...pob@9.15.0) (2022-01-29)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **deps:** update dependency @yarnpkg/parsers to v2.5.0-rc.10 ([#1182](https://github.com/christophehurpeau/pob/issues/1182)) ([4d3c5b4](https://github.com/christophehurpeau/pob/commit/4d3c5b4ef731cb1cb059f81494b4e0eda3778f80))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* **pob:** update exported cjs extension ([47e7031](https://github.com/christophehurpeau/pob/commit/47e7031af4e83db775f2da607a299c5b896da89b))
|
|
50
|
+
* support codecov for apps ([741380b](https://github.com/christophehurpeau/pob/commit/741380b0fd9acfcb0b21e4c98fd4111cff692cbf))
|
|
51
|
+
* **deps:** update dependency eslint to v8.8.0 ([#1186](https://github.com/christophehurpeau/pob/issues/1186)) ([14f9e44](https://github.com/christophehurpeau/pob/commit/14f9e4460257392979383b264af4499a4ae24dc5))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## [9.14.1](https://github.com/christophehurpeau/pob/compare/pob@9.14.0...pob@9.14.1) (2022-01-22)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
* **pob:** vscode generator monorepo option ([cb589e8](https://github.com/christophehurpeau/pob/commit/cb589e80168eaf114a5b22bc4e454ec59d449097))
|
|
63
|
+
* **pob:** vscode generator tsdk path for monorepo ([fc92541](https://github.com/christophehurpeau/pob/commit/fc92541f5926a6892186c086940c966420e4ef83))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
6
69
|
# [9.14.0](https://github.com/christophehurpeau/pob/compare/pob@9.13.2...pob@9.14.0) (2022-01-20)
|
|
7
70
|
|
|
8
71
|
|
|
@@ -82,6 +82,13 @@ export default class PobAppGenerator extends Generator {
|
|
|
82
82
|
default:
|
|
83
83
|
!config || config.testing === undefined ? false : config.testing,
|
|
84
84
|
},
|
|
85
|
+
{
|
|
86
|
+
type: 'confirm',
|
|
87
|
+
name: 'codecov',
|
|
88
|
+
message: 'Do you want codecov ?',
|
|
89
|
+
default: !config || false,
|
|
90
|
+
when: (values) => values.testing,
|
|
91
|
+
},
|
|
85
92
|
{
|
|
86
93
|
type: 'confirm',
|
|
87
94
|
name: 'ci',
|
|
@@ -153,7 +160,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
153
160
|
testing: this.appConfig.testing,
|
|
154
161
|
typescript: babel,
|
|
155
162
|
documentation: false,
|
|
156
|
-
codecov:
|
|
163
|
+
codecov: this.appConfig.codecov,
|
|
157
164
|
ci: this.appConfig.ci,
|
|
158
165
|
packageManager: this.options.packageManager,
|
|
159
166
|
isApp: true,
|
|
@@ -271,16 +271,18 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
271
271
|
if (this.options.isApp) {
|
|
272
272
|
packageUtils.removeScripts(['watch']);
|
|
273
273
|
packageUtils.addOrRemoveScripts(pkg, useBabel, {
|
|
274
|
-
build: '
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
'clean:build': 'rm -Rf dist',
|
|
275
|
+
build: 'yarn clean:build && rollup --config rollup.config.mjs',
|
|
276
|
+
start: 'yarn clean:build && rollup --config rollup.config.mjs --watch',
|
|
277
|
+
clean: 'yarn clean:build',
|
|
277
278
|
});
|
|
278
279
|
} else {
|
|
279
280
|
packageUtils.removeScripts(['start']);
|
|
280
281
|
packageUtils.addOrRemoveScripts(pkg, useBabel, {
|
|
281
|
-
build: '
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
'clean:build': 'rm -Rf dist',
|
|
283
|
+
build: 'yarn clean:build && rollup --config rollup.config.mjs',
|
|
284
|
+
watch: 'yarn clean:build && rollup --config rollup.config.mjs --watch',
|
|
285
|
+
clean: 'yarn clean:build',
|
|
284
286
|
});
|
|
285
287
|
}
|
|
286
288
|
|
|
@@ -340,7 +342,6 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
340
342
|
]);
|
|
341
343
|
|
|
342
344
|
packageUtils.removeDevDependencies(pkg, [
|
|
343
|
-
'rollup',
|
|
344
345
|
'babel-preset-env', // now @babel/preset-env
|
|
345
346
|
'babel-preset-jsdoc',
|
|
346
347
|
'babel-plugin-add-jsdoc-annotations',
|
|
@@ -599,14 +600,15 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
599
600
|
const exportTarget = {};
|
|
600
601
|
|
|
601
602
|
if (target === 'node') {
|
|
603
|
+
const cjsExt = pkg.type === 'module' ? 'cjs' : 'cjs.js';
|
|
602
604
|
if (formats.includes('es')) {
|
|
603
605
|
exportTarget.import = `./dist/${entryDistName}-${target}${version}.mjs`;
|
|
604
606
|
|
|
605
607
|
if (formats.includes('cjs')) {
|
|
606
|
-
exportTarget.require = `./dist/${entryDistName}-${target}${version}
|
|
608
|
+
exportTarget.require = `./dist/${entryDistName}-${target}${version}.${cjsExt}`;
|
|
607
609
|
}
|
|
608
610
|
} else if (formats.includes('cjs')) {
|
|
609
|
-
exportTarget.default = `./dist/${entryDistName}-${target}${version}
|
|
611
|
+
exportTarget.default = `./dist/${entryDistName}-${target}${version}.${cjsExt}`;
|
|
610
612
|
}
|
|
611
613
|
// eslint: https://github.com/benmosher/eslint-plugin-import/issues/2132
|
|
612
614
|
// jest: https://github.com/facebook/jest/issues/9771
|
|
@@ -394,6 +394,9 @@ export default class CommonLintGenerator extends Generator {
|
|
|
394
394
|
if ((!inLerna || !inLerna.root) && useBabel) {
|
|
395
395
|
ignorePatterns.add('/dist', '/test');
|
|
396
396
|
}
|
|
397
|
+
if (inLerna && inLerna.root) {
|
|
398
|
+
ignorePatterns.add('/rollup.config.mjs');
|
|
399
|
+
}
|
|
397
400
|
|
|
398
401
|
if (this.options.ignorePaths) {
|
|
399
402
|
this.options.ignorePaths
|
|
@@ -272,6 +272,9 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
272
272
|
])
|
|
273
273
|
.join(', '),
|
|
274
274
|
hasReact,
|
|
275
|
+
hasLinaria:
|
|
276
|
+
!!pkg.devDependencies?.['@linaria/babel-preset'] ||
|
|
277
|
+
!!pkg.devDependencies?.['alp-dev'],
|
|
275
278
|
testing: this.options.testing,
|
|
276
279
|
jestExperimentalESM: pkg.type === 'module',
|
|
277
280
|
},
|
|
@@ -2,18 +2,15 @@
|
|
|
2
2
|
"extends": "./tsconfig.json",
|
|
3
3
|
|
|
4
4
|
"compilerOptions": {
|
|
5
|
+
"rootDir": "src",
|
|
5
6
|
"noEmit": false,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
6
9
|
"emitDeclarationOnly": true,
|
|
7
|
-
"
|
|
8
|
-
"rootDir": "src",
|
|
9
|
-
"outDir": "dist",
|
|
10
|
-
<% if(composite) { -%>
|
|
10
|
+
"outDir": "dist"<% if(composite) { -%>,
|
|
11
11
|
"composite": true,
|
|
12
|
-
"tsBuildInfoFile": "dist/tsbuildinfo"
|
|
12
|
+
"tsBuildInfoFile": "dist/tsbuildinfo"
|
|
13
13
|
<% } -%>
|
|
14
|
-
"isolatedModules": false,
|
|
15
|
-
"declaration": true,
|
|
16
|
-
"declarationMap": true
|
|
17
14
|
},
|
|
18
15
|
|
|
19
16
|
"exclude": [
|
|
@@ -4,13 +4,25 @@
|
|
|
4
4
|
"src/**/*.tsx"<% } %>
|
|
5
5
|
],
|
|
6
6
|
"compilerOptions": {
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
<% if(!composite) { -%>
|
|
7
9
|
/* No emit in default config file. See build config file for config to build declaration files */
|
|
8
10
|
"noEmit": true,
|
|
11
|
+
<% } else { -%>
|
|
12
|
+
"composite": true,
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"noEmit": false,
|
|
15
|
+
"noEmitOnError": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"declarationMap": true,
|
|
18
|
+
"emitDeclarationOnly": true,
|
|
19
|
+
"outDir": "node_modules/.cache/tsc",
|
|
20
|
+
"tsBuildInfoFile": "node_modules/.cache/tsc/tsbuildinfo",
|
|
21
|
+
<% } -%>
|
|
22
|
+
|
|
9
23
|
/* No need to check .d.ts files */
|
|
10
24
|
"skipLibCheck": true,
|
|
11
25
|
|
|
12
|
-
"rootDirs": ["src"<% /*(monorepoPackageNames || []).forEach((packageName, index) => { -%>, "../../<%= monorepoPackageSrcPaths[index] %>"<% })*/ -%>],
|
|
13
|
-
|
|
14
26
|
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
15
27
|
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
16
28
|
"lib": [<%- dom ? '"dom", ' : '' %>"esnext"], /* Polyfills are imported either by babel or with polyfill.io */
|
|
@@ -34,14 +46,19 @@
|
|
|
34
46
|
<% if (resolveJsonModule) { -%>
|
|
35
47
|
"resolveJsonModule": <%= resolveJsonModule %>,
|
|
36
48
|
<% } -%>
|
|
37
|
-
"baseUrl": "<%= baseUrl %>"<% if (monorepoPackageNames) { %>,<% }
|
|
49
|
+
"baseUrl": "<%= baseUrl %>"<% if (monorepoPackageNames) { %>,<% } %> /* Base directory to resolve non-absolute module names. */
|
|
38
50
|
<% if (monorepoPackageNames && monorepoPackageNames.length !== 0) { -%>
|
|
39
|
-
|
|
40
51
|
"paths": {
|
|
41
52
|
<% monorepoPackageNames.forEach((packageName, index) => { %>
|
|
42
53
|
"<%= packageName %>": ["../../../<%= monorepoPackageSrcPaths[index] %>"],
|
|
43
54
|
"<%= packageName %>/*": ["../../../<%= monorepoPackageSrcPaths[index] %>/*"]<%= index === monorepoPackageNames.length -1 ? '' : ',' -%>
|
|
44
55
|
<% }) %>
|
|
45
56
|
}<% } %>
|
|
46
|
-
}
|
|
57
|
+
}<% if (monorepoPackageNames && monorepoPackageNames.length) { -%>,
|
|
58
|
+
"references": [
|
|
59
|
+
<% monorepoPackageNames.forEach((packageName, index) => { -%>
|
|
60
|
+
{ "path": "../<%= packageName %>/tsconfig.json" }<%= index === monorepoPackageNames.length -1 ? '' : ',' %>
|
|
61
|
+
<% }) -%>
|
|
62
|
+
],
|
|
63
|
+
<% } -%>
|
|
47
64
|
}
|
|
@@ -63,16 +63,16 @@ jobs:
|
|
|
63
63
|
- name: Prettier
|
|
64
64
|
run: <%= packageManager %> run lint:prettier
|
|
65
65
|
if: startsWith(matrix.node-version, '16.')
|
|
66
|
-
|
|
67
|
-
- name: Eslint
|
|
68
|
-
run: <%= packageManager %> run lint:eslint
|
|
69
|
-
if: startsWith(matrix.node-version, '16.')
|
|
70
66
|
<% if (typescript) { -%>
|
|
71
67
|
|
|
72
68
|
- name: Typescript
|
|
73
69
|
run: yarn run tsc
|
|
74
70
|
if: startsWith(matrix.node-version, '16.')
|
|
75
71
|
<% } -%>
|
|
72
|
+
|
|
73
|
+
- name: Eslint
|
|
74
|
+
run: <%= packageManager %> run lint:eslint
|
|
75
|
+
if: startsWith(matrix.node-version, '16.')
|
|
76
76
|
<% if (codecov) { -%>
|
|
77
77
|
|
|
78
78
|
- name: Generate Test Coverage
|
|
@@ -24,10 +24,10 @@ export default class CoreVSCodeGenerator extends Generator {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
this.option('monorepo', {
|
|
27
|
-
type:
|
|
27
|
+
type: Boolean,
|
|
28
28
|
required: false,
|
|
29
|
-
defaults:
|
|
30
|
-
desc: '
|
|
29
|
+
defaults: false,
|
|
30
|
+
desc: 'is monorepo',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
this.option('testing', {
|
|
@@ -112,6 +112,16 @@ export default class CoreVSCodeGenerator extends Generator {
|
|
|
112
112
|
}));
|
|
113
113
|
folders.sort((a, b) => a.name.localeCompare(b.name, 'en'));
|
|
114
114
|
|
|
115
|
+
packageLocations.forEach((location) => {
|
|
116
|
+
writeAndFormatJson(
|
|
117
|
+
this.fs,
|
|
118
|
+
this.destinationPath(`${location}/.vscode/settings.json`),
|
|
119
|
+
{
|
|
120
|
+
'eslint.workingDirectories': ['../../'],
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
});
|
|
124
|
+
|
|
115
125
|
const extensions = readJSON5(
|
|
116
126
|
this.fs,
|
|
117
127
|
this.destinationPath('.vscode/extensions.json'),
|
|
@@ -131,6 +141,9 @@ export default class CoreVSCodeGenerator extends Generator {
|
|
|
131
141
|
extensions,
|
|
132
142
|
settings: {
|
|
133
143
|
...settings,
|
|
144
|
+
...(settings['typescript.tsdk']
|
|
145
|
+
? { 'typescript.tsdk': '✨ root/node_modules/typescript/lib' }
|
|
146
|
+
: {}),
|
|
134
147
|
...(this.options.testing
|
|
135
148
|
? {
|
|
136
149
|
'jest.jestCommandLine':
|
|
@@ -153,7 +166,7 @@ export default class CoreVSCodeGenerator extends Generator {
|
|
|
153
166
|
);
|
|
154
167
|
}
|
|
155
168
|
} else {
|
|
156
|
-
this.fs.delete('.vscode');
|
|
169
|
+
// this.fs.delete('.vscode');
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
172
|
}
|
|
@@ -112,6 +112,7 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
end() {
|
|
115
|
+
this.fs.delete(this.destinationPath('.yarn/build-state.yml'));
|
|
115
116
|
if (this.options.enable) {
|
|
116
117
|
if (this.options.yarnNodeLinker === 'pnp') {
|
|
117
118
|
this.spawnCommandSync('yarn', ['dlx', '@yarnpkg/sdks', 'vscode']);
|
|
@@ -4,6 +4,8 @@ import path from 'path';
|
|
|
4
4
|
import { PackageGraph } from '@lerna/package-graph';
|
|
5
5
|
import { Project as LernaProject } from '@lerna/project';
|
|
6
6
|
import Generator from 'yeoman-generator';
|
|
7
|
+
import * as packageUtils from '../../utils/package.js';
|
|
8
|
+
import { copyAndFormatTpl } from '../../utils/writeAndFormat.js';
|
|
7
9
|
|
|
8
10
|
const getAppTypes = (configs) => {
|
|
9
11
|
const appConfigs = configs.filter(
|
|
@@ -101,8 +103,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
101
103
|
this.packageNames = this.packages.map((pkg) => pkg.name);
|
|
102
104
|
this.packageConfigs = this.packageLocations.map((location) => {
|
|
103
105
|
try {
|
|
104
|
-
return JSON.parse(fs.readFileSync(`${location}/.yo-rc.json
|
|
105
|
-
.pob;
|
|
106
|
+
return JSON.parse(fs.readFileSync(`${location}/.yo-rc.json`)).pob;
|
|
106
107
|
} catch {
|
|
107
108
|
console.warn(`warn: could not read pob config in ${location}`);
|
|
108
109
|
return {};
|
|
@@ -251,6 +252,46 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
251
252
|
);
|
|
252
253
|
}
|
|
253
254
|
|
|
255
|
+
writing() {
|
|
256
|
+
if (!this.options.isAppProject) {
|
|
257
|
+
const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
|
|
258
|
+
|
|
259
|
+
const rollupConfigs = [];
|
|
260
|
+
this.packageLocations.forEach((location) => {
|
|
261
|
+
const rollupPath = `${location}/rollup.config.mjs`;
|
|
262
|
+
const rollupConfig = this.fs.read(this.destinationPath(rollupPath), {
|
|
263
|
+
defaults: null,
|
|
264
|
+
});
|
|
265
|
+
if (rollupConfig) {
|
|
266
|
+
rollupConfigs.push(rollupPath);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
if (rollupConfigs.length > 0) {
|
|
271
|
+
copyAndFormatTpl(
|
|
272
|
+
this.fs,
|
|
273
|
+
this.templatePath('monorepo.rollup.config.mjs.ejs'),
|
|
274
|
+
this.destinationPath('rollup.config.mjs'),
|
|
275
|
+
{
|
|
276
|
+
configLocations: rollupConfigs,
|
|
277
|
+
},
|
|
278
|
+
);
|
|
279
|
+
} else {
|
|
280
|
+
this.fs.delete('rollup.config.mjs');
|
|
281
|
+
}
|
|
282
|
+
packageUtils.addOrRemoveScripts(pkg, rollupConfigs.length > 0, {
|
|
283
|
+
'clean:build': `(${pkg.workspaces
|
|
284
|
+
.map((workspaces) => `rm -Rf ${workspaces}/dist`)
|
|
285
|
+
.join(' && ')}) || true`,
|
|
286
|
+
build: 'yarn clean:build && rollup --config rollup.config.mjs',
|
|
287
|
+
});
|
|
288
|
+
packageUtils.addOrRemoveDevDependencies(pkg, rollupConfigs.length, [
|
|
289
|
+
'pob-babel',
|
|
290
|
+
]);
|
|
291
|
+
this.fs.writeJSON(this.destinationPath('package.json'), pkg);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
254
295
|
end() {
|
|
255
296
|
console.log('save config');
|
|
256
297
|
this.config.save();
|
package/lib/utils/inLerna.js
CHANGED
|
@@ -13,13 +13,11 @@ const rootMonorepo =
|
|
|
13
13
|
|
|
14
14
|
const rootMonorepoPkg =
|
|
15
15
|
rootMonorepo &&
|
|
16
|
-
JSON.parse(
|
|
17
|
-
fs.readFileSync(path.resolve(rootMonorepo, 'package.json'), 'utf-8'),
|
|
18
|
-
);
|
|
16
|
+
JSON.parse(fs.readFileSync(path.resolve(rootMonorepo, 'package.json')));
|
|
19
17
|
|
|
20
18
|
const getInLernaThings = () => {
|
|
21
19
|
const rootYoConfig = JSON.parse(
|
|
22
|
-
fs.readFileSync(path.resolve(rootMonorepo, '.yo-rc.json')
|
|
20
|
+
fs.readFileSync(path.resolve(rootMonorepo, '.yo-rc.json')),
|
|
23
21
|
);
|
|
24
22
|
const cwd = process.cwd();
|
|
25
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@lerna/package-graph": "^4.0.0",
|
|
43
43
|
"@lerna/project": "^4.0.0",
|
|
44
|
-
"@pob/eslint-config": "48.0
|
|
45
|
-
"@pob/eslint-config-typescript": "48.0
|
|
46
|
-
"@pob/eslint-config-typescript-react": "48.0
|
|
44
|
+
"@pob/eslint-config": "48.1.0",
|
|
45
|
+
"@pob/eslint-config-typescript": "48.1.0",
|
|
46
|
+
"@pob/eslint-config-typescript-react": "48.1.0",
|
|
47
47
|
"@pob/sort-eslint-config": "^3.0.1",
|
|
48
48
|
"@pob/sort-object": "^4.0.1",
|
|
49
49
|
"@pob/sort-pkg": "^4.0.1",
|
|
50
|
-
"@yarnpkg/parsers": "2.5.0-rc.
|
|
51
|
-
"eslint": "8.
|
|
50
|
+
"@yarnpkg/parsers": "2.5.0-rc.11",
|
|
51
|
+
"eslint": "8.8.0",
|
|
52
52
|
"findup-sync": "^5.0.0",
|
|
53
53
|
"git-remote-url": "^1.0.1",
|
|
54
54
|
"github-username": "^6.0.0",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"mem-fs-editor": "9.4.0",
|
|
62
62
|
"minimist-argv": "^1.1.0",
|
|
63
63
|
"parse-author": "^2.0.0",
|
|
64
|
-
"pob-dependencies": "6.
|
|
64
|
+
"pob-dependencies": "6.12.0",
|
|
65
65
|
"prettier": "2.5.1",
|
|
66
66
|
"semver": "^7.3.4",
|
|
67
67
|
"yeoman-environment": "^3.5.1",
|
|
68
68
|
"yeoman-generator": "^5.4.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "d4e58687bcfd00c82a36f2ea2d4dc371114da41a"
|
|
71
71
|
}
|