pob 13.1.0 → 13.2.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 +26 -0
- package/lib/generators/app/PobAppGenerator.js +8 -6
- package/lib/generators/app/nextjs/AppNextjsGenerator.js +1 -1
- package/lib/generators/common/babel/CommonBabelGenerator.js +13 -11
- package/lib/generators/common/babel/templates/app.rollup.config.mjs.ejs +2 -2
- package/lib/generators/common/babel/templates/lib.rollup.config.mjs.ejs +2 -2
- package/lib/generators/common/format-lint/CommonLintGenerator.js +18 -18
- package/lib/generators/common/husky/CommonHuskyGenerator.js +2 -2
- package/lib/generators/common/release/CommonReleaseGenerator.js +2 -2
- package/lib/generators/common/testing/CommonTestingGenerator.js +5 -5
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +12 -12
- package/lib/generators/core/ci/CoreCIGenerator.js +6 -6
- package/lib/generators/core/clean/CoreCleanGenerator.js +1 -1
- package/lib/generators/core/git/CoreGitGenerator.js +1 -1
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +9 -9
- package/lib/generators/core/gitignore/CoreGitignoreGenerator.js +7 -7
- package/lib/generators/core/npm/CoreNpmGenerator.js +4 -4
- package/lib/generators/core/package/CorePackageGenerator.js +11 -8
- package/lib/generators/core/renovate/CoreRenovateGenerator.js +3 -3
- package/lib/generators/core/sort-package/CoreSortPackageGenerator.js +0 -9
- package/lib/generators/core/vscode/CoreVSCodeGenerator.js +6 -6
- package/lib/generators/core/yarn/CoreYarnGenerator.js +3 -3
- package/lib/generators/lib/PobLibGenerator.js +7 -5
- package/lib/generators/lib/doc/LibDocGenerator.js +4 -4
- package/lib/generators/lib/readme/LibReadmeGenerator.js +3 -3
- package/lib/generators/monorepo/PobMonorepoGenerator.js +11 -8
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +4 -4
- package/lib/generators/monorepo/typescript/MonorepoTypescriptGenerator.js +2 -2
- package/lib/generators/pob/PobBaseGenerator.js +1 -5
- package/lib/pob.js +7 -7
- package/lib/utils/ensureJsonFileFormatted.js +1 -1
- package/lib/utils/inLerna.js +2 -2
- package/lib/utils/inNpmLerna.js +1 -1
- package/lib/utils/package.js +0 -1
- package/package.json +19 -17
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
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.2.1](https://github.com/christophehurpeau/pob/compare/pob@13.2.0...pob@13.2.1) (2023-06-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update template with node: prefix ([00514a7](https://github.com/christophehurpeau/pob/commit/00514a7b30c213b70bad5b77ef9145fcad85b09e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [13.2.0](https://github.com/christophehurpeau/pob/compare/pob@13.1.0...pob@13.2.0) (2023-06-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **deps:** update @pob/eslint-config to v51 (major) ([#1686](https://github.com/christophehurpeau/pob/issues/1686)) ([108057c](https://github.com/christophehurpeau/pob/commit/108057c620330ca0c86ffe4af49a25cddb571acf))
|
|
21
|
+
* **deps:** update dependency eslint to v8.43.0 ([#1667](https://github.com/christophehurpeau/pob/issues/1667)) ([3b134d6](https://github.com/christophehurpeau/pob/commit/3b134d6a26ac43e55c05688eddc94dd32ba8feaf))
|
|
22
|
+
* **deps:** update yeoman-generator ([#1609](https://github.com/christophehurpeau/pob/issues/1609)) ([18aedb1](https://github.com/christophehurpeau/pob/commit/18aedb1c3185b8410952fc382570df06d686bc80))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* allow @babel/preset-env for rollup plugins ([272766e](https://github.com/christophehurpeau/pob/commit/272766e0d2083e6dc638bc630cd5e73e88a47095))
|
|
28
|
+
* requires first node 18 lts version, 18.12 ([70c105a](https://github.com/christophehurpeau/pob/commit/70c105a72a328498dd20804ade6f1622b4430835))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
## [13.1.0](https://github.com/christophehurpeau/pob/compare/pob@13.0.2...pob@13.1.0) (2023-06-27)
|
|
7
33
|
|
|
8
34
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import { platform } from 'process';
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import { platform } from 'node:process';
|
|
3
3
|
import Generator from 'yeoman-generator';
|
|
4
4
|
import inLerna from '../../utils/inLerna.js';
|
|
5
5
|
import * as packageUtils from '../../utils/package.js';
|
|
@@ -15,26 +15,26 @@ export default class PobAppGenerator extends Generator {
|
|
|
15
15
|
this.option('updateOnly', {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
required: false,
|
|
18
|
-
|
|
18
|
+
default: false,
|
|
19
19
|
desc: 'Avoid asking questions',
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
this.option('fromPob', {
|
|
23
23
|
type: Boolean,
|
|
24
24
|
required: false,
|
|
25
|
-
|
|
25
|
+
default: false,
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
this.option('packageManager', {
|
|
29
29
|
type: String,
|
|
30
|
-
|
|
30
|
+
default: 'yarn',
|
|
31
31
|
desc: 'yarn or npm',
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
this.option('yarnNodeLinker', {
|
|
35
35
|
type: String,
|
|
36
36
|
required: false,
|
|
37
|
-
|
|
37
|
+
default: 'node-modules',
|
|
38
38
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -281,5 +281,7 @@ export default class PobAppGenerator extends Generator {
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
this.fs.writeJSON(this.destinationPath('package.json'), pkg);
|
|
284
|
+
|
|
285
|
+
this.composeWith('pob:core:sort-package');
|
|
284
286
|
}
|
|
285
287
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import semver from 'semver';
|
|
3
3
|
import Generator from 'yeoman-generator';
|
|
4
4
|
import * as packageUtils from '../../../utils/package.js';
|
|
@@ -11,39 +11,39 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
11
11
|
this.option('updateOnly', {
|
|
12
12
|
type: Boolean,
|
|
13
13
|
required: false,
|
|
14
|
-
|
|
14
|
+
default: false,
|
|
15
15
|
desc: 'Avoid asking questions',
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
this.option('testing', {
|
|
19
19
|
type: Boolean,
|
|
20
20
|
required: false,
|
|
21
|
-
|
|
21
|
+
default: false,
|
|
22
22
|
desc: 'Has testing.',
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
this.option('fromPob', {
|
|
26
26
|
type: Boolean,
|
|
27
27
|
required: false,
|
|
28
|
-
|
|
28
|
+
default: false,
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
this.option('isApp', {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
required: false,
|
|
34
|
-
|
|
34
|
+
default: false,
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
this.option('useAppConfig', {
|
|
38
38
|
type: Boolean,
|
|
39
39
|
required: false,
|
|
40
|
-
|
|
40
|
+
default: false,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
this.option('buildDirectory', {
|
|
44
44
|
type: String,
|
|
45
45
|
required: false,
|
|
46
|
-
|
|
46
|
+
default: 'dist',
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -370,7 +370,9 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
370
370
|
pkg,
|
|
371
371
|
this.babelEnvs.find(
|
|
372
372
|
(env) => env.target === 'browser' && env.version === undefined,
|
|
373
|
-
)
|
|
373
|
+
) ||
|
|
374
|
+
(pkg.devDependencies?.['@babel/preset-env'] &&
|
|
375
|
+
pkg.name.includes('rollup-plugin')),
|
|
374
376
|
['@babel/preset-env'],
|
|
375
377
|
);
|
|
376
378
|
|
|
@@ -388,10 +390,10 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
388
390
|
case '12':
|
|
389
391
|
case '14':
|
|
390
392
|
case '16':
|
|
391
|
-
pkg.engines.node = '>=16.
|
|
393
|
+
pkg.engines.node = '>=16.12.0';
|
|
392
394
|
break;
|
|
393
395
|
case '18':
|
|
394
|
-
pkg.engines.node = '>=18.
|
|
396
|
+
pkg.engines.node = '>=18.12.0';
|
|
395
397
|
break;
|
|
396
398
|
default:
|
|
397
399
|
throw new Error(`Invalid min node version: ${minNodeVersion}`);
|
|
@@ -414,7 +416,7 @@ export default class CommonBabelGenerator extends Generator {
|
|
|
414
416
|
packageUtils.removeDependencies(pkg, ['@types/node']);
|
|
415
417
|
packageUtils.removeDevDependencies(pkg, ['@types/node']);
|
|
416
418
|
// Supports oldest current or active LTS version of node
|
|
417
|
-
pkg.engines.node = '>=18.
|
|
419
|
+
pkg.engines.node = '>=18.12.0';
|
|
418
420
|
}
|
|
419
421
|
|
|
420
422
|
/* browserslist */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import Generator from 'yeoman-generator';
|
|
4
4
|
import ensureJsonFileFormatted from '../../../utils/ensureJsonFileFormatted.js';
|
|
5
5
|
import inLerna from '../../../utils/inLerna.js';
|
|
@@ -15,49 +15,49 @@ export default class CommonLintGenerator extends Generator {
|
|
|
15
15
|
this.option('monorepo', {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
required: false,
|
|
18
|
-
|
|
18
|
+
default: false,
|
|
19
19
|
description: 'Is root monorepo',
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
this.option('isApp', {
|
|
23
23
|
type: Boolean,
|
|
24
24
|
required: false,
|
|
25
|
-
|
|
25
|
+
default: false,
|
|
26
26
|
description: 'Is app',
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
this.option('babel', {
|
|
30
30
|
type: String,
|
|
31
31
|
required: false,
|
|
32
|
-
|
|
32
|
+
default: 'undefined',
|
|
33
33
|
desc: 'Use babel.',
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
this.option('documentation', {
|
|
37
37
|
type: Boolean,
|
|
38
38
|
required: false,
|
|
39
|
-
|
|
39
|
+
default: false,
|
|
40
40
|
desc: 'Documentation enabled',
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
this.option('typescript', {
|
|
44
44
|
type: Boolean,
|
|
45
45
|
required: false,
|
|
46
|
-
|
|
46
|
+
default: false,
|
|
47
47
|
desc: 'Typescript enabled',
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
this.option('enableSrcResolver', {
|
|
51
51
|
type: Boolean,
|
|
52
52
|
required: false,
|
|
53
|
-
|
|
53
|
+
default: false,
|
|
54
54
|
desc: 'Enable resolving from src directory',
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
this.option('rootAsSrc', {
|
|
58
58
|
type: Boolean,
|
|
59
59
|
required: false,
|
|
60
|
-
|
|
60
|
+
default: false,
|
|
61
61
|
desc: 'src directory is root',
|
|
62
62
|
});
|
|
63
63
|
|
|
@@ -70,34 +70,34 @@ export default class CommonLintGenerator extends Generator {
|
|
|
70
70
|
this.option('rootIgnorePaths', {
|
|
71
71
|
type: String,
|
|
72
72
|
required: false,
|
|
73
|
-
|
|
73
|
+
default: '',
|
|
74
74
|
desc: 'list of ignore paths to add',
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
this.option('ignorePaths', {
|
|
78
78
|
type: String,
|
|
79
79
|
required: false,
|
|
80
|
-
|
|
80
|
+
default: '',
|
|
81
81
|
desc: 'list of ignore paths to add',
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
this.option('packageManager', {
|
|
85
85
|
type: String,
|
|
86
|
-
|
|
86
|
+
default: 'yarn',
|
|
87
87
|
desc: 'yarn or npm',
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
this.option('yarnNodeLinker', {
|
|
91
91
|
type: String,
|
|
92
92
|
required: false,
|
|
93
|
-
|
|
93
|
+
default: 'node-modules',
|
|
94
94
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
this.option('buildDirectory', {
|
|
98
98
|
type: String,
|
|
99
99
|
required: false,
|
|
100
|
-
|
|
100
|
+
default: 'dist',
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -466,8 +466,8 @@ export default class CommonLintGenerator extends Generator {
|
|
|
466
466
|
);
|
|
467
467
|
|
|
468
468
|
writeAndFormatJson(this.fs, rootEslintrcPath, rootEslintrcConfig);
|
|
469
|
-
} catch (
|
|
470
|
-
console.warn(`Could not parse/edit ${rootEslintrcPath}: `,
|
|
469
|
+
} catch (error) {
|
|
470
|
+
console.warn(`Could not parse/edit ${rootEslintrcPath}: `, error);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
// no else: dont delete root eslintrc, src is root
|
|
@@ -512,8 +512,8 @@ export default class CommonLintGenerator extends Generator {
|
|
|
512
512
|
);
|
|
513
513
|
|
|
514
514
|
writeAndFormatJson(this.fs, srcEslintrcPath, srcEslintrcConfig);
|
|
515
|
-
} catch (
|
|
516
|
-
console.warn(`Could not parse/edit ${srcEslintrcPath}: `,
|
|
515
|
+
} catch (error) {
|
|
516
|
+
console.warn(`Could not parse/edit ${srcEslintrcPath}: `, error);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readlinkSync, rmSync } from 'fs';
|
|
1
|
+
import { readlinkSync, rmSync } from 'node:fs';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../../utils/inLerna.js';
|
|
4
4
|
import * as packageUtils from '../../../utils/package.js';
|
|
@@ -10,7 +10,7 @@ export default class CommonHuskyGenerator extends Generator {
|
|
|
10
10
|
this.option('destination', {
|
|
11
11
|
type: String,
|
|
12
12
|
required: false,
|
|
13
|
-
|
|
13
|
+
default: '',
|
|
14
14
|
desc: 'Destination of the generated files.',
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -14,7 +14,7 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
14
14
|
this.option('withBabel', {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
required: false,
|
|
17
|
-
|
|
17
|
+
default: undefined,
|
|
18
18
|
desc: 'Babel enabled.',
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
27
27
|
this.option('updateOnly', {
|
|
28
28
|
type: Boolean,
|
|
29
29
|
required: false,
|
|
30
|
-
|
|
30
|
+
default: false,
|
|
31
31
|
desc: 'Avoid asking questions',
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -10,25 +10,25 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
10
10
|
|
|
11
11
|
this.option('monorepo', {
|
|
12
12
|
type: Boolean,
|
|
13
|
-
|
|
13
|
+
default: false,
|
|
14
14
|
desc: 'is root monorepo',
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
this.option('enable', {
|
|
18
18
|
type: Boolean,
|
|
19
|
-
|
|
19
|
+
default: true,
|
|
20
20
|
desc: 'enable testing',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
this.option('runner', {
|
|
24
24
|
type: String,
|
|
25
|
-
|
|
25
|
+
default: 'jest',
|
|
26
26
|
desc: 'test runner (jest or node)',
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
this.option('enableReleasePlease', {
|
|
30
30
|
type: Boolean,
|
|
31
|
-
|
|
31
|
+
default: true,
|
|
32
32
|
desc: 'enable release-please',
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -64,7 +64,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
64
64
|
|
|
65
65
|
this.option('packageManager', {
|
|
66
66
|
type: String,
|
|
67
|
-
|
|
67
|
+
default: 'yarn',
|
|
68
68
|
desc: 'yarn or npm',
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync } from 'fs';
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../../utils/inLerna.js';
|
|
4
4
|
import * as packageUtils from '../../../utils/package.js';
|
|
@@ -10,67 +10,67 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
10
10
|
|
|
11
11
|
this.option('enable', {
|
|
12
12
|
type: Boolean,
|
|
13
|
-
|
|
13
|
+
default: true,
|
|
14
14
|
desc: 'enable typescript',
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
this.option('rootDir', {
|
|
18
18
|
type: String,
|
|
19
|
-
|
|
19
|
+
default: 'src',
|
|
20
20
|
desc: 'customize rootDir',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
this.option('srcDir', {
|
|
24
24
|
type: String,
|
|
25
|
-
|
|
25
|
+
default: 'src',
|
|
26
26
|
desc: 'customize srcDir, if different than rootDir',
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
this.option('jsx', {
|
|
30
30
|
type: Boolean,
|
|
31
|
-
|
|
31
|
+
default: true,
|
|
32
32
|
desc: 'enable jsx with typescript',
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
this.option('jsxPreserve', {
|
|
36
36
|
type: Boolean,
|
|
37
|
-
|
|
37
|
+
default: false,
|
|
38
38
|
desc: 'force jsx preserve in tsconfig for legacy apps (nextjs, CRA)',
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
this.option('forceExcludeNodeModules', {
|
|
42
42
|
type: Boolean,
|
|
43
|
-
|
|
43
|
+
default: false,
|
|
44
44
|
desc: 'force exclude node_modules for legacy apps (nextjs, CRA)',
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
this.option('forceAllowJs', {
|
|
48
48
|
type: Boolean,
|
|
49
|
-
|
|
49
|
+
default: false,
|
|
50
50
|
desc: 'force allow js for legacy apps (nextjs, CRA)',
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
this.option('dom', {
|
|
54
54
|
type: Boolean,
|
|
55
|
-
|
|
55
|
+
default: true,
|
|
56
56
|
desc: 'enable dom with typescript',
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
this.option('baseUrl', {
|
|
60
60
|
type: String,
|
|
61
|
-
|
|
61
|
+
default: '',
|
|
62
62
|
desc: 'baseUrl option',
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
this.option('resolveJsonModule', {
|
|
66
66
|
type: Boolean,
|
|
67
|
-
|
|
67
|
+
default: false,
|
|
68
68
|
desc: 'resolveJsonModule option',
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
this.option('builddefs', {
|
|
72
72
|
type: Boolean,
|
|
73
|
-
|
|
73
|
+
default: true,
|
|
74
74
|
desc: 'build .d.ts option',
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../../utils/inLerna.js';
|
|
4
4
|
import * as packageUtils from '../../../utils/package.js';
|
|
@@ -12,31 +12,31 @@ export default class CoreCIGenerator extends Generator {
|
|
|
12
12
|
|
|
13
13
|
this.option('enable', {
|
|
14
14
|
type: Boolean,
|
|
15
|
-
|
|
15
|
+
default: true,
|
|
16
16
|
desc: 'enable ci',
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
this.option('enableReleasePlease', {
|
|
20
20
|
type: Boolean,
|
|
21
|
-
|
|
21
|
+
default: true,
|
|
22
22
|
desc: 'enable release-please',
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
this.option('build', {
|
|
26
26
|
type: Boolean,
|
|
27
|
-
|
|
27
|
+
default: true,
|
|
28
28
|
desc: 'enable build',
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
this.option('typescript', {
|
|
32
32
|
type: Boolean,
|
|
33
|
-
|
|
33
|
+
default: true,
|
|
34
34
|
desc: 'enable typescript',
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
this.option('testing', {
|
|
38
38
|
type: Boolean,
|
|
39
|
-
|
|
39
|
+
default: true,
|
|
40
40
|
desc: 'enable testing',
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -42,10 +42,10 @@ const configureProtectionRule = async (owner, repo, onlyLatestLTS) => {
|
|
|
42
42
|
if (branch === 'master') {
|
|
43
43
|
console.warn('You should rename your "master" branch to "main"');
|
|
44
44
|
}
|
|
45
|
-
} catch (
|
|
45
|
+
} catch (error) {
|
|
46
46
|
if (branch === 'main') {
|
|
47
47
|
console.error(`Failed to configure ${branch} branch protection`);
|
|
48
|
-
console.error(
|
|
48
|
+
console.error(error.stack || error.message || error);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -69,7 +69,7 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
69
69
|
this.option('shouldCreate', {
|
|
70
70
|
type: Boolean,
|
|
71
71
|
required: false,
|
|
72
|
-
|
|
72
|
+
default: '',
|
|
73
73
|
desc: 'Should create the repo on github',
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -126,16 +126,16 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
126
126
|
auto_init: false,
|
|
127
127
|
...githubRepoConfig,
|
|
128
128
|
});
|
|
129
|
-
} catch (
|
|
129
|
+
} catch (error) {
|
|
130
130
|
console.error('Failed to create repository');
|
|
131
|
-
console.error(
|
|
131
|
+
console.error(error.stack || error.message || error);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
const cwd = this.destinationPath();
|
|
136
136
|
try {
|
|
137
137
|
this.spawnCommandSync('git', ['add', '--all', '.'], { cwd });
|
|
138
|
-
} catch (
|
|
138
|
+
} catch (error) {
|
|
139
139
|
this.spawnCommandSync('git', ['init'], { cwd });
|
|
140
140
|
this.spawnCommandSync('git', ['add', '--all', '.'], { cwd });
|
|
141
141
|
this.spawnCommandSync(
|
|
@@ -149,7 +149,7 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
149
149
|
{ cwd },
|
|
150
150
|
);
|
|
151
151
|
console.error('Failed to create repository');
|
|
152
|
-
console.error(
|
|
152
|
+
console.error(error.stack || error.message || error);
|
|
153
153
|
}
|
|
154
154
|
this.spawnCommandSync(
|
|
155
155
|
'git',
|
|
@@ -168,9 +168,9 @@ export default class CoreGitGithubGenerator extends Generator {
|
|
|
168
168
|
// await gh.put(`/repos/${owner}/${repo}/topics`, {
|
|
169
169
|
// names: pkg.keywords,
|
|
170
170
|
// });
|
|
171
|
-
} catch (
|
|
171
|
+
} catch (error) {
|
|
172
172
|
console.error('Failed to create github repository');
|
|
173
|
-
console.error(
|
|
173
|
+
console.error(error.stack || error.message || error);
|
|
174
174
|
}
|
|
175
175
|
} else {
|
|
176
176
|
console.log('sync github info');
|
|
@@ -7,49 +7,49 @@ export default class CoreGitignoreGenerator extends Generator {
|
|
|
7
7
|
this.option('root', {
|
|
8
8
|
type: Boolean,
|
|
9
9
|
required: false,
|
|
10
|
-
|
|
10
|
+
default: true,
|
|
11
11
|
desc: 'Root package.',
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
this.option('documentation', {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
required: false,
|
|
17
|
-
|
|
17
|
+
default: false,
|
|
18
18
|
desc: 'Documentation enabled.',
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
this.option('testing', {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
required: false,
|
|
24
|
-
|
|
24
|
+
default: false,
|
|
25
25
|
desc: 'Testing enabled.',
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
this.option('withBabel', {
|
|
29
29
|
type: Boolean,
|
|
30
30
|
required: false,
|
|
31
|
-
|
|
31
|
+
default: undefined,
|
|
32
32
|
desc: 'Babel enabled.',
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
this.option('paths', {
|
|
36
36
|
type: String,
|
|
37
37
|
required: false,
|
|
38
|
-
|
|
38
|
+
default: '',
|
|
39
39
|
desc: 'Paths ignored.',
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
this.option('typescript', {
|
|
43
43
|
type: Boolean,
|
|
44
44
|
required: false,
|
|
45
|
-
|
|
45
|
+
default: true,
|
|
46
46
|
desc: 'Typescript use.',
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
this.option('buildInGit', {
|
|
50
50
|
type: Boolean,
|
|
51
51
|
required: false,
|
|
52
|
-
|
|
52
|
+
default: true,
|
|
53
53
|
desc: 'Build is saved in git.',
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../../utils/inLerna.js';
|
|
4
4
|
|
|
@@ -9,19 +9,19 @@ export default class CoreNpmGenerator extends Generator {
|
|
|
9
9
|
this.option('enable', {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
required: false,
|
|
12
|
-
|
|
12
|
+
default: true,
|
|
13
13
|
desc: 'Enable npm',
|
|
14
14
|
});
|
|
15
15
|
this.option('ci', {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
required: false,
|
|
18
|
-
|
|
18
|
+
default: true,
|
|
19
19
|
desc: 'Enabled ci',
|
|
20
20
|
});
|
|
21
21
|
this.option('testing', {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
required: false,
|
|
24
|
-
|
|
24
|
+
default: true,
|
|
25
25
|
desc: 'Enabled testing',
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import askName from 'inquirer-npm-name';
|
|
4
4
|
import Generator from 'yeoman-generator';
|
|
5
5
|
import inLerna from '../../../utils/inLerna.js';
|
|
@@ -12,21 +12,21 @@ export default class CorePackageGenerator extends Generator {
|
|
|
12
12
|
this.option('monorepo', {
|
|
13
13
|
type: Boolean,
|
|
14
14
|
required: true,
|
|
15
|
-
|
|
15
|
+
default: false,
|
|
16
16
|
desc: 'is monorepo',
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
this.option('isRoot', {
|
|
20
20
|
type: Boolean,
|
|
21
21
|
required: true,
|
|
22
|
-
|
|
22
|
+
default: false,
|
|
23
23
|
desc: 'is root',
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
this.option('private', {
|
|
27
27
|
type: Boolean,
|
|
28
28
|
required: false,
|
|
29
|
-
|
|
29
|
+
default: false,
|
|
30
30
|
desc: 'private package',
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -37,7 +37,10 @@ export default class CorePackageGenerator extends Generator {
|
|
|
37
37
|
if (!pkg.engines) pkg.engines = {};
|
|
38
38
|
|
|
39
39
|
// dont override engines if set to latest
|
|
40
|
-
if (
|
|
40
|
+
if (
|
|
41
|
+
!pkg.engines.node ||
|
|
42
|
+
!(pkg.engines.node.startsWith('>=18.') && pkg.engines.node !== '>=18.0.0')
|
|
43
|
+
) {
|
|
41
44
|
// this might be overridden by babel generator
|
|
42
45
|
pkg.engines.node = '>=18.12.0'; // .12.0 is the first lts node 18 version
|
|
43
46
|
}
|
|
@@ -102,13 +105,13 @@ export default class CorePackageGenerator extends Generator {
|
|
|
102
105
|
name: 'authorName',
|
|
103
106
|
message: "Author's Name",
|
|
104
107
|
when: !author || !author.name,
|
|
105
|
-
default: this.
|
|
108
|
+
default: this.git.name(),
|
|
106
109
|
},
|
|
107
110
|
{
|
|
108
111
|
name: 'authorEmail',
|
|
109
112
|
message: "Author's Email",
|
|
110
113
|
when: !author || !author.email,
|
|
111
|
-
default: this.
|
|
114
|
+
default: this.git.email(),
|
|
112
115
|
},
|
|
113
116
|
{
|
|
114
117
|
name: 'authorUrl',
|
|
@@ -9,21 +9,21 @@ export default class CoreRenovateGenerator extends Generator {
|
|
|
9
9
|
this.option('disable', {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
required: false,
|
|
12
|
-
|
|
12
|
+
default: false,
|
|
13
13
|
desc: 'disable',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
this.option('app', {
|
|
17
17
|
type: Boolean,
|
|
18
18
|
required: false,
|
|
19
|
-
|
|
19
|
+
default: false,
|
|
20
20
|
desc: 'is app (instead of lib)',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
this.option('updateOnly', {
|
|
24
24
|
type: Boolean,
|
|
25
25
|
required: false,
|
|
26
|
-
|
|
26
|
+
default: false,
|
|
27
27
|
desc: 'Avoid asking questions',
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -11,13 +11,4 @@ export default class CoreSortPackageGenerator extends Generator {
|
|
|
11
11
|
packageUtils.sort(pkg),
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
end() {
|
|
16
|
-
const pkg = this.fs.readJSON(this.destinationPath('package.json'));
|
|
17
|
-
writeAndFormatJson(
|
|
18
|
-
this.fs,
|
|
19
|
-
this.destinationPath('package.json'),
|
|
20
|
-
packageUtils.sort(pkg),
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
14
|
}
|
|
@@ -9,42 +9,42 @@ export default class CoreVSCodeGenerator extends Generator {
|
|
|
9
9
|
this.option('root', {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
required: false,
|
|
12
|
-
|
|
12
|
+
default: '',
|
|
13
13
|
desc: 'Is root',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
this.option('packageManager', {
|
|
17
17
|
type: String,
|
|
18
18
|
required: false,
|
|
19
|
-
|
|
19
|
+
default: 'yarn',
|
|
20
20
|
desc: 'yarn|npm.',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
this.option('monorepo', {
|
|
24
24
|
type: Boolean,
|
|
25
25
|
required: false,
|
|
26
|
-
|
|
26
|
+
default: false,
|
|
27
27
|
desc: 'is monorepo',
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
this.option('testing', {
|
|
31
31
|
type: Boolean,
|
|
32
32
|
required: false,
|
|
33
|
-
|
|
33
|
+
default: false,
|
|
34
34
|
desc: 'Testing enabled',
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
this.option('yarnNodeLinker', {
|
|
38
38
|
type: String,
|
|
39
39
|
required: false,
|
|
40
|
-
|
|
40
|
+
default: 'node-modules',
|
|
41
41
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
this.option('typescript', {
|
|
45
45
|
type: Boolean,
|
|
46
46
|
required: false,
|
|
47
|
-
|
|
47
|
+
default: false,
|
|
48
48
|
desc: 'Typescript enabled',
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import yml from 'js-yaml';
|
|
3
3
|
import Generator from 'yeoman-generator';
|
|
4
4
|
import ensureJsonFileFormatted from '../../../utils/ensureJsonFileFormatted.js';
|
|
@@ -13,7 +13,7 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
13
13
|
this.option('type', {
|
|
14
14
|
type: String,
|
|
15
15
|
required: false,
|
|
16
|
-
|
|
16
|
+
default: 'app',
|
|
17
17
|
desc: 'Project type',
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -26,7 +26,7 @@ export default class CoreYarnGenerator extends Generator {
|
|
|
26
26
|
this.option('yarnNodeLinker', {
|
|
27
27
|
type: String,
|
|
28
28
|
required: false,
|
|
29
|
-
|
|
29
|
+
default: 'node-modules',
|
|
30
30
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs, { rmSync } from 'fs';
|
|
1
|
+
import fs, { rmSync } from 'node:fs';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import inLerna from '../../utils/inLerna.js';
|
|
4
4
|
import * as packageUtils from '../../utils/package.js';
|
|
@@ -10,26 +10,26 @@ export default class PobLibGenerator extends Generator {
|
|
|
10
10
|
this.option('updateOnly', {
|
|
11
11
|
type: Boolean,
|
|
12
12
|
required: false,
|
|
13
|
-
|
|
13
|
+
default: false,
|
|
14
14
|
desc: 'Avoid asking questions',
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
this.option('fromPob', {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
required: false,
|
|
20
|
-
|
|
20
|
+
default: false,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
this.option('packageManager', {
|
|
24
24
|
type: String,
|
|
25
|
-
|
|
25
|
+
default: 'yarn',
|
|
26
26
|
desc: 'yarn or npm',
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
this.option('yarnNodeLinker', {
|
|
30
30
|
type: String,
|
|
31
31
|
required: false,
|
|
32
|
-
|
|
32
|
+
default: 'node-modules',
|
|
33
33
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -397,5 +397,7 @@ export default class PobLibGenerator extends Generator {
|
|
|
397
397
|
|
|
398
398
|
this.config.set('lib', pobjson);
|
|
399
399
|
this.config.save();
|
|
400
|
+
|
|
401
|
+
this.composeWith('pob:core:sort-package');
|
|
400
402
|
}
|
|
401
403
|
}
|
|
@@ -10,27 +10,27 @@ export default class LibDocGenerator extends Generator {
|
|
|
10
10
|
this.option('enabled', {
|
|
11
11
|
type: Boolean,
|
|
12
12
|
required: false,
|
|
13
|
-
|
|
13
|
+
default: true,
|
|
14
14
|
desc: 'Enabled.',
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
this.option('testing', {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
required: false,
|
|
20
|
-
|
|
20
|
+
default: false,
|
|
21
21
|
desc: 'Coverage.',
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
this.option('packageManager', {
|
|
25
25
|
type: String,
|
|
26
|
-
|
|
26
|
+
default: 'yarn',
|
|
27
27
|
desc: 'yarn or npm',
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
this.option('packageNames', {
|
|
31
31
|
type: String,
|
|
32
32
|
required: false,
|
|
33
|
-
|
|
33
|
+
default: '{}',
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -101,9 +101,9 @@ export default class LibReadmeGenerator extends Generator {
|
|
|
101
101
|
content,
|
|
102
102
|
},
|
|
103
103
|
);
|
|
104
|
-
} catch (
|
|
105
|
-
console.log(
|
|
106
|
-
throw
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.log(error.stack || error.message || error);
|
|
106
|
+
throw error;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { platform } from 'process';
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { platform } from 'node:process';
|
|
5
5
|
import { PackageGraph } from '@lerna/package-graph';
|
|
6
6
|
import { Project as LernaProject } from '@lerna/project';
|
|
7
7
|
import Generator from 'yeoman-generator';
|
|
@@ -50,27 +50,27 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
50
50
|
this.option('updateOnly', {
|
|
51
51
|
type: Boolean,
|
|
52
52
|
required: false,
|
|
53
|
-
|
|
53
|
+
default: false,
|
|
54
54
|
desc: 'Avoid asking questions',
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
this.option('isAppProject', {
|
|
58
58
|
type: Boolean,
|
|
59
59
|
required: false,
|
|
60
|
-
|
|
60
|
+
default: false,
|
|
61
61
|
desc: 'app project, no pusblishing on npm',
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
this.option('packageManager', {
|
|
65
65
|
type: String,
|
|
66
|
-
|
|
66
|
+
default: 'yarn',
|
|
67
67
|
desc: 'yarn or npm',
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
this.option('yarnNodeLinker', {
|
|
71
71
|
type: String,
|
|
72
72
|
required: false,
|
|
73
|
-
|
|
73
|
+
default: 'pnp',
|
|
74
74
|
desc: 'Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: pnp, node-modules.',
|
|
75
75
|
});
|
|
76
76
|
|
|
@@ -134,6 +134,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
134
134
|
|
|
135
135
|
async prompting() {
|
|
136
136
|
const config = this.config.get('monorepo');
|
|
137
|
+
|
|
137
138
|
if (this.options.updateOnly && config) {
|
|
138
139
|
this.pobLernaConfig = config;
|
|
139
140
|
this.pobLernaConfig.packageNames = this.packageNames;
|
|
@@ -342,6 +343,8 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
342
343
|
]);
|
|
343
344
|
this.fs.writeJSON(this.destinationPath('package.json'), pkg);
|
|
344
345
|
}
|
|
346
|
+
|
|
347
|
+
this.composeWith('pob:core:sort-package');
|
|
345
348
|
}
|
|
346
349
|
|
|
347
350
|
end() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { spawnSync } from 'child_process';
|
|
2
|
-
import { readdirSync, existsSync } from 'fs';
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { readdirSync, existsSync } from 'node:fs';
|
|
3
3
|
import Generator from 'yeoman-generator';
|
|
4
4
|
import * as packageUtils from '../../../utils/package.js';
|
|
5
5
|
import {
|
|
@@ -13,13 +13,13 @@ export default class MonorepoLernaGenerator extends Generator {
|
|
|
13
13
|
|
|
14
14
|
this.option('isAppProject', {
|
|
15
15
|
type: Boolean,
|
|
16
|
-
|
|
16
|
+
default: true,
|
|
17
17
|
desc: 'is app project',
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
this.option('packageManager', {
|
|
21
21
|
type: String,
|
|
22
|
-
|
|
22
|
+
default: 'yarn',
|
|
23
23
|
desc: 'yarn or npm',
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -8,13 +8,13 @@ export default class MonorepoTypescriptGenerator extends Generator {
|
|
|
8
8
|
|
|
9
9
|
this.option('enable', {
|
|
10
10
|
type: Boolean,
|
|
11
|
-
|
|
11
|
+
default: true,
|
|
12
12
|
desc: 'enable typescript',
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
this.option('isAppProject', {
|
|
16
16
|
type: Boolean,
|
|
17
|
-
|
|
17
|
+
default: true,
|
|
18
18
|
desc: 'app project, no building definitions',
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fileURLToPath } from 'url';
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import Generator from 'yeoman-generator';
|
|
3
3
|
import ensureJsonFileFormatted from '../../utils/ensureJsonFileFormatted.js';
|
|
4
4
|
import inLerna from '../../utils/inLerna.js';
|
|
@@ -231,10 +231,6 @@ export default class PobBaseGenerator extends Generator {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
writing() {
|
|
235
|
-
this.composeWith('pob:core:sort-package');
|
|
236
|
-
}
|
|
237
|
-
|
|
238
234
|
install() {
|
|
239
235
|
if (this.options.fromPob) return;
|
|
240
236
|
|
package/lib/pob.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { execSync, spawnSync } from 'child_process';
|
|
3
|
+
import { execSync, spawnSync } from 'node:child_process';
|
|
4
4
|
import fs, {
|
|
5
5
|
existsSync,
|
|
6
6
|
writeFileSync,
|
|
7
7
|
readFileSync,
|
|
8
8
|
mkdirSync,
|
|
9
9
|
readdirSync,
|
|
10
|
-
} from 'fs';
|
|
11
|
-
import path from 'path';
|
|
10
|
+
} from 'node:fs';
|
|
11
|
+
import path from 'node:path';
|
|
12
12
|
import minimist from 'minimist';
|
|
13
|
-
import yeoman from 'yeoman-environment';
|
|
13
|
+
import * as yeoman from 'yeoman-environment';
|
|
14
14
|
import PobAppGenerator from './generators/app/PobAppGenerator.js';
|
|
15
15
|
import AppNextjsGenerator from './generators/app/nextjs/AppNextjsGenerator.js';
|
|
16
16
|
import AppRemixGenerator from './generators/app/remix/AppRemixGenerator.js';
|
|
@@ -330,9 +330,9 @@ const options = {
|
|
|
330
330
|
|
|
331
331
|
try {
|
|
332
332
|
await env.run('pob', options);
|
|
333
|
-
} catch (
|
|
334
|
-
if (
|
|
335
|
-
console.error(
|
|
333
|
+
} catch (error) {
|
|
334
|
+
if (error) {
|
|
335
|
+
console.error(error.stack || error.message || error);
|
|
336
336
|
process.exit(1);
|
|
337
337
|
}
|
|
338
338
|
}
|
package/lib/utils/inLerna.js
CHANGED
package/lib/utils/inNpmLerna.js
CHANGED
package/lib/utils/package.js
CHANGED
|
@@ -154,7 +154,6 @@ const internalAddDependencies = (pkg, type, dependencies, cleaned, prefix) => {
|
|
|
154
154
|
try {
|
|
155
155
|
if (currentVersion === 'workspace:*') {
|
|
156
156
|
// the package is in the monorepo
|
|
157
|
-
return;
|
|
158
157
|
} else if (
|
|
159
158
|
!currentVersion ||
|
|
160
159
|
semver.gt(potentialNewVersionCleaned, cleanVersion(currentVersion))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "13.1
|
|
3
|
+
"version": "13.2.1",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=18.
|
|
21
|
+
"node": ">=18.12.0"
|
|
22
22
|
},
|
|
23
23
|
"main": "./lib/index.js",
|
|
24
24
|
"exports": {
|
|
@@ -38,33 +38,35 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lerna/package-graph": "5.5.4",
|
|
40
40
|
"@lerna/project": "5.5.4",
|
|
41
|
-
"@pob/eslint-config": "
|
|
42
|
-
"@pob/eslint-config-typescript": "
|
|
43
|
-
"@pob/eslint-config-typescript-react": "
|
|
44
|
-
"@pob/sort-eslint-config": "5.0.
|
|
45
|
-
"@pob/sort-object": "6.0.
|
|
46
|
-
"@pob/sort-pkg": "6.0.
|
|
47
|
-
"
|
|
41
|
+
"@pob/eslint-config": "51.0.0",
|
|
42
|
+
"@pob/eslint-config-typescript": "51.0.0",
|
|
43
|
+
"@pob/eslint-config-typescript-react": "51.0.0",
|
|
44
|
+
"@pob/sort-eslint-config": "5.0.1",
|
|
45
|
+
"@pob/sort-object": "6.0.1",
|
|
46
|
+
"@pob/sort-pkg": "6.0.1",
|
|
47
|
+
"@types/inquirer": "9.0.3",
|
|
48
|
+
"@yeoman/types": "1.0.1",
|
|
49
|
+
"eslint": "8.43.0",
|
|
48
50
|
"findup-sync": "^5.0.0",
|
|
49
51
|
"git-remote-url": "^1.0.1",
|
|
50
|
-
"github-username": "^
|
|
52
|
+
"github-username": "^7.0.0",
|
|
51
53
|
"inquirer-npm-name": "^4.0.0",
|
|
52
54
|
"js-yaml": "^4.1.0",
|
|
53
55
|
"json5": "^2.2.2",
|
|
54
56
|
"lodash.camelcase": "^4.3.0",
|
|
55
57
|
"lodash.kebabcase": "^4.1.1",
|
|
56
|
-
"mem-fs": "
|
|
57
|
-
"mem-fs-editor": "
|
|
58
|
+
"mem-fs": "3.0.0",
|
|
59
|
+
"mem-fs-editor": "10.0.2",
|
|
58
60
|
"minimist": "1.2.8",
|
|
59
61
|
"parse-author": "2.0.0",
|
|
60
|
-
"pob-dependencies": "8.
|
|
62
|
+
"pob-dependencies": "8.2.0",
|
|
61
63
|
"prettier": "2.8.8",
|
|
62
64
|
"semver": "7.5.3",
|
|
63
|
-
"yeoman-environment": "
|
|
64
|
-
"yeoman-generator": "
|
|
65
|
+
"yeoman-environment": "4.0.0-beta.3",
|
|
66
|
+
"yeoman-generator": "6.0.0-rc.2"
|
|
65
67
|
},
|
|
66
68
|
"devDependencies": {
|
|
67
|
-
"@pob/root": "8.0
|
|
69
|
+
"@pob/root": "8.1.0"
|
|
68
70
|
},
|
|
69
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "50ac1b294ff44983612066212dfe454c62e9467e"
|
|
70
72
|
}
|