pob 10.19.0 → 10.21.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 +46 -0
- package/lib/generators/app/PobAppGenerator.js +1 -0
- package/lib/generators/common/babel/CommonBabelGenerator.js +12 -2
- package/lib/generators/common/babel/templates/app.rollup.config.mjs.ejs +3 -3
- package/lib/generators/common/babel/templates/lib.rollup.config.mjs.txt +3 -3
- package/lib/generators/common/format-lint/CommonLintGenerator.js +13 -7
- package/lib/generators/common/testing/CommonTestingGenerator.js +5 -1
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +9 -2
- package/lib/generators/core/ci/CoreCIGenerator.js +3 -1
- package/lib/generators/core/ci/templates/github-action-documentation-workflow.yml.ejs +3 -0
- package/lib/generators/lib/readme/LibReadmeGenerator.js +0 -1
- package/lib/generators/monorepo/lerna/templates/workflow-publish.yml.ejs +1 -0
- package/package.json +15 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,52 @@
|
|
|
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
|
+
# [10.21.0](https://github.com/christophehurpeau/pob/compare/pob@10.20.0...pob@10.21.0) (2022-10-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **deps:** update dependency minimist to v1.2.7 ([#1429](https://github.com/christophehurpeau/pob/issues/1429)) ([273c62d](https://github.com/christophehurpeau/pob/commit/273c62dddc85d92be1dbdb1d304ca15da0af2362))
|
|
12
|
+
* **deps:** update dependency yeoman-environment to v3.12.1 ([#1430](https://github.com/christophehurpeau/pob/issues/1430)) ([b188b91](https://github.com/christophehurpeau/pob/commit/b188b9130527a570e39efa95f79e1769fb72ee69))
|
|
13
|
+
* **pob:** fix config app eslint ([dbec241](https://github.com/christophehurpeau/pob/commit/dbec2410e2c339f2a25860968d32345b272f9b9f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **deps:** update dependency eslint to v8.25.0 ([#1421](https://github.com/christophehurpeau/pob/issues/1421)) ([a517b35](https://github.com/christophehurpeau/pob/commit/a517b35bfd3bd8c966538774b45eebf2199bb08c))
|
|
19
|
+
* improve generator for react-native-web monorepo ([49f0cd0](https://github.com/christophehurpeau/pob/commit/49f0cd0c55b842a9d5781cf062923dfc62d91e9e))
|
|
20
|
+
* **pob:** add support for cjs in extraEntries ([d46794a](https://github.com/christophehurpeau/pob/commit/d46794ac20555e3d54536f063f3b1edb5281d854))
|
|
21
|
+
* **pob:** improve config for apps ([50dbce0](https://github.com/christophehurpeau/pob/commit/50dbce05a34a04da9a216260a92e5286b8010a18))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# [10.20.0](https://github.com/christophehurpeau/pob/compare/pob@10.19.0...pob@10.20.0) (2022-10-05)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **deps:** update dependency eslint to v8.23.1 ([#1395](https://github.com/christophehurpeau/pob/issues/1395)) ([3a80c50](https://github.com/christophehurpeau/pob/commit/3a80c501ee492bf248304529488e71feb8154ff4))
|
|
33
|
+
* **deps:** update dependency semver to v7.3.8 ([#1417](https://github.com/christophehurpeau/pob/issues/1417)) ([b9d4913](https://github.com/christophehurpeau/pob/commit/b9d4913b70e930d02a59c5ae753688fd08954f12))
|
|
34
|
+
* **deps:** update dependency yeoman-environment to v3.11.1 ([#1405](https://github.com/christophehurpeau/pob/issues/1405)) ([bea37d3](https://github.com/christophehurpeau/pob/commit/bea37d39d2707b4eff73b1bc99b3750d35c35e23))
|
|
35
|
+
* disable husky when commiting release ([8239cea](https://github.com/christophehurpeau/pob/commit/8239cea55adf2b624fe6f957ac8511245d3d9710))
|
|
36
|
+
* typedoc ci fix cache tsc ([5954146](https://github.com/christophehurpeau/pob/commit/5954146ab24942f792ca6deb11f00da58daa1605))
|
|
37
|
+
* use fileURLToPath ([94e5c56](https://github.com/christophehurpeau/pob/commit/94e5c56d91689205a938cb9c35d4a34eb03d3893))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* better prettier config ([329d560](https://github.com/christophehurpeau/pob/commit/329d560594cade521e35a6f3237888db49f67b87))
|
|
43
|
+
* **deps:** update @pob/eslint-config to v49.4.0 ([#1390](https://github.com/christophehurpeau/pob/issues/1390)) ([a7db8f0](https://github.com/christophehurpeau/pob/commit/a7db8f09a0bee265458ce0f0fa2518fd46adcfbb))
|
|
44
|
+
* **deps:** update dependency eslint to v8.24.0 ([#1403](https://github.com/christophehurpeau/pob/issues/1403)) ([1c0d9e4](https://github.com/christophehurpeau/pob/commit/1c0d9e495292610235b9c6fbcb726f5e4cea586f))
|
|
45
|
+
* **deps:** update dependency yeoman-environment to v3.11.0 ([#1404](https://github.com/christophehurpeau/pob/issues/1404)) ([4f78cd4](https://github.com/christophehurpeau/pob/commit/4f78cd4f829aa88252e7f7617e5bfcf866c4842b))
|
|
46
|
+
* **deps:** update dependency yeoman-environment to v3.12.0 ([#1416](https://github.com/christophehurpeau/pob/issues/1416)) ([8256499](https://github.com/christophehurpeau/pob/commit/8256499ce99b7e6b2cb954a12580c6718cef9d10))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
6
52
|
# [10.19.0](https://github.com/christophehurpeau/pob/compare/pob@10.18.0...pob@10.19.0) (2022-09-04)
|
|
7
53
|
|
|
8
54
|
|
|
@@ -258,7 +258,14 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
258
258
|
if (this.entries) {
|
|
259
259
|
this.entries.forEach((entry) => {
|
|
260
260
|
const entryDestPath = this.destinationPath(`${entry}.js`);
|
|
261
|
-
this.
|
|
261
|
+
if (this.options.isApp && entry !== 'index') {
|
|
262
|
+
this.fs.write(
|
|
263
|
+
entryDestPath,
|
|
264
|
+
`// resolution for eslint-plugin-import\nexport * from './src/${entry}/index.ts';\n`,
|
|
265
|
+
);
|
|
266
|
+
} else {
|
|
267
|
+
this.fs.delete(entryDestPath);
|
|
268
|
+
}
|
|
262
269
|
});
|
|
263
270
|
}
|
|
264
271
|
//
|
|
@@ -667,7 +674,10 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
667
674
|
pkg.pob.extraEntries.forEach((exportName) => {
|
|
668
675
|
pkg.exports[`./${exportName}`] =
|
|
669
676
|
pkg.type === 'module'
|
|
670
|
-
?
|
|
677
|
+
? // eslint-disable-next-line unicorn/no-nested-ternary
|
|
678
|
+
exportName.endsWith('cjs')
|
|
679
|
+
? `./${exportName}`
|
|
680
|
+
: `./${exportName}.js`
|
|
671
681
|
: {
|
|
672
682
|
import: `./${exportName}.mjs`,
|
|
673
683
|
require: `./${exportName}.js`,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dirname } from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
1
3
|
<% if (config) { -%>
|
|
2
4
|
import config from 'alp-rollup-plugin-config';
|
|
3
5
|
<% } -%>
|
|
@@ -7,9 +9,7 @@ import run from 'pob-babel/plugin-run.cjs';
|
|
|
7
9
|
const watch = process.env.ROLLUP_WATCH === 'true';
|
|
8
10
|
|
|
9
11
|
export default createRollupConfig({
|
|
10
|
-
cwd:
|
|
11
|
-
process.platform === 'win32' ? 1 : 0,
|
|
12
|
-
),
|
|
12
|
+
cwd: dirname(fileURLToPath(import.meta.url)),
|
|
13
13
|
outDirectory: 'build',
|
|
14
14
|
plugins: [
|
|
15
15
|
<% if (config) { -%>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { dirname } from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
1
3
|
import createRollupConfig from 'pob-babel/createRollupConfig.js';
|
|
2
4
|
|
|
3
5
|
export default createRollupConfig({
|
|
4
|
-
cwd:
|
|
5
|
-
process.platform === 'win32' ? 1 : 0,
|
|
6
|
-
),
|
|
6
|
+
cwd: dirname(fileURLToPath(import.meta.url)),
|
|
7
7
|
});
|
|
@@ -19,6 +19,13 @@ export default class CommonLintGenerator extends Generator {
|
|
|
19
19
|
description: 'Is root monorepo',
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
this.option('isApp', {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: false,
|
|
25
|
+
defaults: false,
|
|
26
|
+
description: 'Is app',
|
|
27
|
+
});
|
|
28
|
+
|
|
22
29
|
this.option('babel', {
|
|
23
30
|
type: String,
|
|
24
31
|
required: false,
|
|
@@ -125,12 +132,7 @@ export default class CommonLintGenerator extends Generator {
|
|
|
125
132
|
|
|
126
133
|
delete pkg.standard;
|
|
127
134
|
|
|
128
|
-
pkg.prettier =
|
|
129
|
-
trailingComma: 'all',
|
|
130
|
-
singleQuote: true,
|
|
131
|
-
// https://github.com/airbnb/javascript/pull/1863
|
|
132
|
-
arrowParens: 'always',
|
|
133
|
-
};
|
|
135
|
+
pkg.prettier = '@pob/root/prettier-config';
|
|
134
136
|
|
|
135
137
|
if (!inLerna || inLerna.root || this.options.monorepo) {
|
|
136
138
|
const rootIgnorePatterns = new Set(
|
|
@@ -345,7 +347,11 @@ export default class CommonLintGenerator extends Generator {
|
|
|
345
347
|
return [
|
|
346
348
|
'@pob/eslint-config-typescript',
|
|
347
349
|
useNodeOnly && '@pob/eslint-config-typescript/node',
|
|
348
|
-
|
|
350
|
+
this.options.isApp && '@pob/eslint-config-typescript/app',
|
|
351
|
+
hasReact &&
|
|
352
|
+
`@pob/eslint-config-typescript-react${
|
|
353
|
+
pkg.dependencies?.['react-native-web'] ? '/react-native-web' : ''
|
|
354
|
+
}`,
|
|
349
355
|
].filter(Boolean);
|
|
350
356
|
}
|
|
351
357
|
|
|
@@ -101,7 +101,11 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
101
101
|
const transpileWithBabel = this.options.monorepo
|
|
102
102
|
? yoConfigPobMonorepo.typescript
|
|
103
103
|
: pkg.pob && pkg.pob.babelEnvs && pkg.pob.babelEnvs.length > 0;
|
|
104
|
-
let hasReact =
|
|
104
|
+
let hasReact =
|
|
105
|
+
transpileWithBabel &&
|
|
106
|
+
(this.options.monorepo
|
|
107
|
+
? yoConfigPobMonorepo.react ?? packageUtils.hasReact(pkg)
|
|
108
|
+
: packageUtils.hasReact(pkg));
|
|
105
109
|
|
|
106
110
|
if (!this.options.enable) {
|
|
107
111
|
packageUtils.removeDevDependencies(pkg, ['jest', '@types/jest']);
|
|
@@ -109,7 +109,12 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
109
109
|
packageName,
|
|
110
110
|
`../../${
|
|
111
111
|
packageName[0] === '@'
|
|
112
|
-
?
|
|
112
|
+
? // eslint-disable-next-line unicorn/no-nested-ternary
|
|
113
|
+
yoConfig.pob.project.type === 'app'
|
|
114
|
+
? `packages/${packageName.slice(
|
|
115
|
+
packageName.indexOf('/') + 1,
|
|
116
|
+
)}`
|
|
117
|
+
: packageName
|
|
113
118
|
: `packages/${packageName}`
|
|
114
119
|
}`,
|
|
115
120
|
]),
|
|
@@ -119,7 +124,9 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
119
124
|
([packageName, packageLocation]) => [
|
|
120
125
|
packageName,
|
|
121
126
|
`${packageLocation}/${
|
|
122
|
-
existsSync(`${
|
|
127
|
+
existsSync(`${packageLocations.get(packageName)}/tsconfig.json`)
|
|
128
|
+
? 'src'
|
|
129
|
+
: 'lib'
|
|
123
130
|
}`,
|
|
124
131
|
],
|
|
125
132
|
);
|
|
@@ -111,7 +111,9 @@ export default class CoreCIGenerator extends Generator {
|
|
|
111
111
|
build: this.options.build,
|
|
112
112
|
typescript: this.options.typescript,
|
|
113
113
|
codecov: this.options.codecov,
|
|
114
|
-
supportsNode14:
|
|
114
|
+
supportsNode14:
|
|
115
|
+
!this.options.isApp ||
|
|
116
|
+
inLerna.pobConfig?.project?.supportsNode14 !== false,
|
|
115
117
|
|
|
116
118
|
isReleasePleaseEnabled: this.isReleasePleaseEnabled,
|
|
117
119
|
publishSinglePackage: this.isReleasePleaseEnabled && !pkg.private,
|
|
@@ -80,7 +80,6 @@ export default class LibReadmeGenerator extends Generator {
|
|
|
80
80
|
{
|
|
81
81
|
privatePackage: pkg.private,
|
|
82
82
|
packageName: pkg.name,
|
|
83
|
-
packagePath: `${pkg.name[0] === '@' ? '' : 'packages/'}${pkg.name}`,
|
|
84
83
|
camelCaseProjectName: camelCase(pkg.name),
|
|
85
84
|
description: pkg.description,
|
|
86
85
|
inLerna,
|
|
@@ -44,6 +44,7 @@ jobs:
|
|
|
44
44
|
run: |
|
|
45
45
|
yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --create-release=github -m 'chore: release [skip ci]'
|
|
46
46
|
env:
|
|
47
|
+
HUSKY: 0
|
|
47
48
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
48
49
|
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
|
49
50
|
<% if (publish) { -%>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.21.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -32,22 +32,18 @@
|
|
|
32
32
|
"lint": "yarn run lint:eslint",
|
|
33
33
|
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/pob"
|
|
34
34
|
},
|
|
35
|
-
"prettier":
|
|
36
|
-
"trailingComma": "all",
|
|
37
|
-
"singleQuote": true,
|
|
38
|
-
"arrowParens": "always"
|
|
39
|
-
},
|
|
35
|
+
"prettier": "@pob/root/prettier-config",
|
|
40
36
|
"pob": {},
|
|
41
37
|
"dependencies": {
|
|
42
38
|
"@lerna/package-graph": "^5.0.0",
|
|
43
39
|
"@lerna/project": "^5.0.0",
|
|
44
|
-
"@pob/eslint-config": "49.
|
|
45
|
-
"@pob/eslint-config-typescript": "49.
|
|
46
|
-
"@pob/eslint-config-typescript-react": "49.
|
|
47
|
-
"@pob/sort-eslint-config": "
|
|
48
|
-
"@pob/sort-object": "
|
|
49
|
-
"@pob/sort-pkg": "
|
|
50
|
-
"eslint": "8.
|
|
40
|
+
"@pob/eslint-config": "49.4.0",
|
|
41
|
+
"@pob/eslint-config-typescript": "49.4.0",
|
|
42
|
+
"@pob/eslint-config-typescript-react": "49.4.0",
|
|
43
|
+
"@pob/sort-eslint-config": "3.1.0",
|
|
44
|
+
"@pob/sort-object": "4.1.0",
|
|
45
|
+
"@pob/sort-pkg": "4.1.0",
|
|
46
|
+
"eslint": "8.25.0",
|
|
51
47
|
"findup-sync": "^5.0.0",
|
|
52
48
|
"git-remote-url": "^1.0.1",
|
|
53
49
|
"github-username": "^6.0.0",
|
|
@@ -59,16 +55,16 @@
|
|
|
59
55
|
"lodash.kebabcase": "^4.1.1",
|
|
60
56
|
"mem-fs": "2.2.1",
|
|
61
57
|
"mem-fs-editor": "9.5.0",
|
|
62
|
-
"minimist": "1.2.
|
|
58
|
+
"minimist": "1.2.7",
|
|
63
59
|
"parse-author": "2.0.0",
|
|
64
|
-
"pob-dependencies": "6.
|
|
60
|
+
"pob-dependencies": "6.33.0",
|
|
65
61
|
"prettier": "2.7.1",
|
|
66
|
-
"semver": "7.3.
|
|
67
|
-
"yeoman-environment": "3.
|
|
62
|
+
"semver": "7.3.8",
|
|
63
|
+
"yeoman-environment": "3.12.1",
|
|
68
64
|
"yeoman-generator": "5.7.0"
|
|
69
65
|
},
|
|
70
66
|
"devDependencies": {
|
|
71
|
-
"@pob/root": "6.
|
|
67
|
+
"@pob/root": "6.23.1"
|
|
72
68
|
},
|
|
73
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "731b169f373af61b2aa965f8f086b229387ab6eb"
|
|
74
70
|
}
|