pob 19.2.0 → 21.0.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 +59 -0
- package/lib/generators/app/PobAppGenerator.js +124 -122
- package/lib/generators/app/e2e-testing/AppE2ETestingGenerator.js +11 -11
- package/lib/generators/app/ignorePaths.js +25 -24
- package/lib/generators/app/nextjs/AppNextjsGenerator.js +9 -9
- package/lib/generators/app/remix/AppRemixGenerator.js +7 -7
- package/lib/generators/common/babel/CommonBabelGenerator.js +167 -151
- package/lib/generators/common/format-lint/CommonLintGenerator.js +185 -180
- package/lib/generators/common/format-lint/updateEslintConfig.js +9 -9
- package/lib/generators/common/husky/CommonHuskyGenerator.js +44 -44
- package/lib/generators/common/husky/templates/lint-staged.config.js.txt +1 -1
- package/lib/generators/common/old-dependencies/CommonRemoveOldDependenciesGenerator.js +44 -44
- package/lib/generators/common/release/CommonReleaseGenerator.js +40 -39
- package/lib/generators/common/release/templates/workflow-release.yml.ejs +2 -2
- package/lib/generators/common/testing/CommonTestingGenerator.js +193 -191
- package/lib/generators/common/testing/templates/index.js +3 -3
- package/lib/generators/common/transpiler/CommonTranspilerGenerator.js +160 -167
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +79 -75
- package/lib/generators/core/ci/CoreCIGenerator.js +70 -75
- package/lib/generators/core/clean/CoreCleanGenerator.js +4 -4
- package/lib/generators/core/editorconfig/CoreEditorConfigGenerator.js +3 -3
- package/lib/generators/core/git/CoreGitGenerator.js +42 -42
- package/lib/generators/core/git/generators/github/CoreGitGithubGenerator.js +41 -41
- package/lib/generators/core/gitignore/CoreGitignoreGenerator.js +19 -23
- package/lib/generators/core/npm/CoreNpmGenerator.js +19 -19
- package/lib/generators/core/package/CorePackageGenerator.js +94 -94
- package/lib/generators/core/package/askName.js +4 -4
- package/lib/generators/core/renovate/CoreRenovateGenerator.js +26 -26
- package/lib/generators/core/sort-package/CoreSortPackageGenerator.js +5 -5
- package/lib/generators/core/vscode/CoreVSCodeGenerator.js +39 -38
- package/lib/generators/core/yarn/CoreYarnGenerator.js +82 -77
- package/lib/generators/lib/PobLibGenerator.js +127 -125
- package/lib/generators/lib/doc/LibDocGenerator.js +40 -40
- package/lib/generators/lib/readme/LibReadmeGenerator.js +19 -19
- package/lib/generators/monorepo/PobMonorepoGenerator.js +87 -86
- package/lib/generators/monorepo/lerna/MonorepoLernaGenerator.js +44 -40
- package/lib/generators/monorepo/typescript/MonorepoTypescriptGenerator.js +35 -35
- package/lib/generators/monorepo/workspaces/MonorepoWorkspacesGenerator.js +60 -56
- package/lib/generators/pob/PobBaseGenerator.js +83 -83
- package/lib/pob-dirname.cjs +1 -1
- package/lib/pob.js +112 -112
- package/lib/utils/dependenciesPackages.cjs +4 -4
- package/lib/utils/ensureJsonFileFormatted.js +5 -5
- package/lib/utils/inMonorepo.js +8 -8
- package/lib/utils/json5.js +1 -1
- package/lib/utils/package.js +37 -37
- package/lib/utils/packagejson.js +5 -0
- package/lib/utils/writeAndFormat.js +8 -9
- package/package.json +23 -19
- package/lib/utils/packagejson.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sortConfig from
|
|
1
|
+
import sortConfig from "@pob/sort-eslint-config";
|
|
2
2
|
|
|
3
3
|
function updateOverrides(config, testsOverride) {
|
|
4
4
|
const existingTestsOverrideIndex = !config.overrides
|
|
@@ -49,12 +49,12 @@ function updateParserAndPlugins(
|
|
|
49
49
|
) {
|
|
50
50
|
if (useTypescript) {
|
|
51
51
|
// webstorm uses this to detect eslint .ts compat
|
|
52
|
-
config.parser =
|
|
53
|
-
config.plugins = [
|
|
52
|
+
config.parser = "@typescript-eslint/parser";
|
|
53
|
+
config.plugins = ["@typescript-eslint"];
|
|
54
54
|
|
|
55
55
|
if (!globalEslint) {
|
|
56
56
|
config.parserOptions = {
|
|
57
|
-
project:
|
|
57
|
+
project: "./tsconfig.json",
|
|
58
58
|
createDefaultProgram: true, // fix for lint-staged
|
|
59
59
|
};
|
|
60
60
|
} else {
|
|
@@ -65,8 +65,8 @@ function updateParserAndPlugins(
|
|
|
65
65
|
}
|
|
66
66
|
} else {
|
|
67
67
|
if (
|
|
68
|
-
config.parser ===
|
|
69
|
-
config.parser ===
|
|
68
|
+
config.parser === "typescript-eslint-parser" ||
|
|
69
|
+
config.parser === "@typescript-eslint/parser"
|
|
70
70
|
) {
|
|
71
71
|
delete config.parser;
|
|
72
72
|
}
|
|
@@ -75,8 +75,8 @@ function updateParserAndPlugins(
|
|
|
75
75
|
}
|
|
76
76
|
if (
|
|
77
77
|
config.plugins &&
|
|
78
|
-
(config.plugins[0] ===
|
|
79
|
-
config.plugins[0] ===
|
|
78
|
+
(config.plugins[0] === "typescript" ||
|
|
79
|
+
config.plugins[0] === "@typescript-eslint")
|
|
80
80
|
) {
|
|
81
81
|
config.plugins.splice(0, 1);
|
|
82
82
|
}
|
|
@@ -134,7 +134,7 @@ export default function updateEslintConfig(
|
|
|
134
134
|
...(config?.extends && Array.isArray(config.extends)
|
|
135
135
|
? config.extends.filter(
|
|
136
136
|
(extendsValue) =>
|
|
137
|
-
extendsValue ===
|
|
137
|
+
extendsValue === "@pob/eslint-config-typescript/allow-unsafe",
|
|
138
138
|
)
|
|
139
139
|
: []),
|
|
140
140
|
];
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { readlinkSync, rmSync } from
|
|
2
|
-
import Generator from
|
|
3
|
-
import inMonorepo from
|
|
4
|
-
import * as packageUtils from
|
|
1
|
+
import { readlinkSync, rmSync } from "node:fs";
|
|
2
|
+
import Generator from "yeoman-generator";
|
|
3
|
+
import inMonorepo from "../../../utils/inMonorepo.js";
|
|
4
|
+
import * as packageUtils from "../../../utils/package.js";
|
|
5
5
|
|
|
6
6
|
export default class CommonHuskyGenerator extends Generator {
|
|
7
7
|
constructor(args, opts) {
|
|
8
8
|
super(args, opts);
|
|
9
9
|
|
|
10
|
-
this.option(
|
|
10
|
+
this.option("destination", {
|
|
11
11
|
type: String,
|
|
12
12
|
required: false,
|
|
13
|
-
default:
|
|
14
|
-
|
|
13
|
+
default: "",
|
|
14
|
+
description: "Destination of the generated files.",
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
writing() {
|
|
19
|
-
rmSync(
|
|
19
|
+
rmSync("git-hooks", { recursive: true, force: true });
|
|
20
20
|
|
|
21
|
-
const gitHookDestination = this.destinationPath(
|
|
21
|
+
const gitHookDestination = this.destinationPath(".git/hooks/pre-commit");
|
|
22
22
|
let isSymlink;
|
|
23
23
|
|
|
24
24
|
try {
|
|
@@ -29,68 +29,68 @@ export default class CommonHuskyGenerator extends Generator {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if (isSymlink) {
|
|
32
|
-
this.fs.delete(
|
|
33
|
-
this.fs.delete(
|
|
34
|
-
this.fs.delete(
|
|
35
|
-
this.fs.delete(
|
|
32
|
+
this.fs.delete(".git/hooks/prepare-commit-msg");
|
|
33
|
+
this.fs.delete(".git/hooks/post-checkout");
|
|
34
|
+
this.fs.delete(".git/hooks/post-merge");
|
|
35
|
+
this.fs.delete(".git/hooks/pre-commit");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
this.fs.delete(
|
|
39
|
-
this.fs.delete(
|
|
40
|
-
this.fs.delete(
|
|
41
|
-
this.fs.delete(
|
|
42
|
-
if (this.fs.exists(
|
|
38
|
+
this.fs.delete(".git-hooks/prepare-commit-msg");
|
|
39
|
+
this.fs.delete(".git-hooks/post-checkout");
|
|
40
|
+
this.fs.delete(".git-hooks/post-merge");
|
|
41
|
+
this.fs.delete(".git-hooks/pre-commit");
|
|
42
|
+
if (this.fs.exists(".git-hooks")) this.fs.delete(".git-hooks");
|
|
43
43
|
|
|
44
|
-
if (this.fs.exists(this.destinationPath(
|
|
45
|
-
this.fs.delete(this.destinationPath(
|
|
44
|
+
if (this.fs.exists(this.destinationPath(".huskyrc.js"))) {
|
|
45
|
+
this.fs.delete(this.destinationPath(".huskyrc.js"));
|
|
46
46
|
}
|
|
47
|
-
if (this.fs.exists(this.destinationPath(
|
|
48
|
-
this.fs.delete(this.destinationPath(
|
|
47
|
+
if (this.fs.exists(this.destinationPath("husky.config.js"))) {
|
|
48
|
+
this.fs.delete(this.destinationPath("husky.config.js"));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
if (this.fs.exists(this.destinationPath(
|
|
51
|
+
if (this.fs.exists(this.destinationPath("lint-staged.config.cjs"))) {
|
|
52
52
|
this.fs.move(
|
|
53
|
-
this.destinationPath(
|
|
54
|
-
this.destinationPath(
|
|
53
|
+
this.destinationPath("lint-staged.config.cjs"),
|
|
54
|
+
this.destinationPath("lint-staged.config.js"),
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const pkg = this.fs.readJSON(this.destinationPath(
|
|
59
|
-
packageUtils.removeDevDependencies(pkg, [
|
|
58
|
+
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
59
|
+
packageUtils.removeDevDependencies(pkg, ["husky"]);
|
|
60
60
|
|
|
61
61
|
if (!inMonorepo || inMonorepo.root) {
|
|
62
|
-
if (pkg.name !==
|
|
62
|
+
if (pkg.name !== "pob-monorepo") {
|
|
63
63
|
packageUtils.removeDevDependencies(pkg, [
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
"@pob/repo-config",
|
|
65
|
+
"repository-check-dirty",
|
|
66
66
|
]);
|
|
67
|
-
packageUtils.addDevDependencies(pkg, [
|
|
67
|
+
packageUtils.addDevDependencies(pkg, ["@pob/root"]);
|
|
68
68
|
// packageUtils.addOrRemoveDevDependencies(pkg, inMonorepo, {
|
|
69
69
|
// '@commitlint/config-lerna-scopes': '6.1.3',
|
|
70
70
|
// });
|
|
71
71
|
|
|
72
|
-
if (pkg.type !==
|
|
72
|
+
if (pkg.type !== "module") {
|
|
73
73
|
this.fs.copy(
|
|
74
|
-
this.templatePath(
|
|
75
|
-
this.destinationPath(
|
|
74
|
+
this.templatePath("lint-staged.config.cjs.txt"),
|
|
75
|
+
this.destinationPath("lint-staged.config.js"),
|
|
76
76
|
);
|
|
77
77
|
} else {
|
|
78
78
|
this.fs.copy(
|
|
79
|
-
this.templatePath(
|
|
80
|
-
this.destinationPath(
|
|
79
|
+
this.templatePath("lint-staged.config.js.txt"),
|
|
80
|
+
this.destinationPath("lint-staged.config.js"),
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
pkg.commitlint = {
|
|
86
86
|
extends: [
|
|
87
|
-
|
|
87
|
+
"@pob/commitlint-config",
|
|
88
88
|
// '@commitlint/config-lerna-scopes',
|
|
89
89
|
].filter(Boolean),
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
if (pkg.name !==
|
|
93
|
-
packageUtils.addDevDependencies(pkg, [
|
|
92
|
+
if (pkg.name !== "pob-monorepo") {
|
|
93
|
+
packageUtils.addDevDependencies(pkg, ["@pob/commitlint-config"]);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// if (packageUtils.hasLerna(pkg)) {
|
|
@@ -103,10 +103,10 @@ export default class CommonHuskyGenerator extends Generator {
|
|
|
103
103
|
// this.fs.delete('.git/hooks/husky.local.sh');
|
|
104
104
|
} else {
|
|
105
105
|
packageUtils.removeDevDependencies(pkg, [
|
|
106
|
-
pkg.name !==
|
|
107
|
-
|
|
106
|
+
pkg.name !== "pob" && "@pob/root",
|
|
107
|
+
"@pob/commitlint-config",
|
|
108
108
|
]);
|
|
109
|
-
this.fs.delete(this.destinationPath(
|
|
109
|
+
this.fs.delete(this.destinationPath("lint-staged.config.cjs"));
|
|
110
110
|
|
|
111
111
|
delete pkg.commitlint;
|
|
112
112
|
}
|
|
@@ -122,10 +122,10 @@ export default class CommonHuskyGenerator extends Generator {
|
|
|
122
122
|
delete pkg.scripts.postrewrite;
|
|
123
123
|
delete pkg.scripts.postpublish;
|
|
124
124
|
}
|
|
125
|
-
delete pkg[
|
|
125
|
+
delete pkg["lint-staged"];
|
|
126
126
|
delete pkg.husky;
|
|
127
127
|
|
|
128
|
-
this.fs.writeJSON(this.destinationPath(
|
|
128
|
+
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
end() {}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import Generator from
|
|
2
|
-
import * as packageUtils from
|
|
1
|
+
import Generator from "yeoman-generator";
|
|
2
|
+
import * as packageUtils from "../../../utils/package.js";
|
|
3
3
|
|
|
4
4
|
export default class CommonRemoveOldDependenciesGenerator extends Generator {
|
|
5
5
|
writing() {
|
|
6
|
-
const pkg = this.fs.readJSON(this.destinationPath(
|
|
6
|
+
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
7
7
|
|
|
8
8
|
// old pob dependencies
|
|
9
|
-
packageUtils.removeDependencies(pkg, [
|
|
9
|
+
packageUtils.removeDependencies(pkg, ["flow-runtime"]);
|
|
10
10
|
packageUtils.removeDevDependencies(pkg, [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
11
|
+
"tcomb",
|
|
12
|
+
"tcomb-forked",
|
|
13
|
+
"flow-runtime",
|
|
14
|
+
"flow-bin",
|
|
15
|
+
"springbokjs-library",
|
|
16
|
+
"babel-preset-es2015",
|
|
17
|
+
"babel-preset-es2015-webpack",
|
|
18
|
+
"babel-preset-es2015-node5",
|
|
19
|
+
"babel-preset-es2015-node6",
|
|
20
|
+
"babel-preset-pob",
|
|
21
|
+
"babel-preset-latest",
|
|
22
|
+
"babel-preset-latest-node",
|
|
23
|
+
"babel-preset-stage-0",
|
|
24
|
+
"babel-preset-stage-1",
|
|
25
|
+
"babel-preset-modern-browsers-stage-1",
|
|
26
|
+
"babel-preset-flow",
|
|
27
|
+
"babel-preset-flow-tcomb",
|
|
28
|
+
"babel-preset-flow-tcomb-forked",
|
|
29
|
+
"babel-plugin-typecheck",
|
|
30
|
+
"babel-plugin-defines",
|
|
31
|
+
"babel-plugin-import-rename",
|
|
32
|
+
"babel-plugin-discard-module-references",
|
|
33
|
+
"babel-plugin-remove-dead-code",
|
|
34
|
+
"babel-plugin-react-require",
|
|
35
|
+
"babel-preset-react",
|
|
36
|
+
"babel-preset-pob-react",
|
|
37
|
+
"komet",
|
|
38
|
+
"komet-karma",
|
|
39
|
+
"@commitlint/cli",
|
|
40
|
+
"@commitlint/config-conventional",
|
|
41
|
+
"lint-staged",
|
|
42
|
+
"yarnhook",
|
|
43
|
+
"yarn-deduplicate", // in @pob/root (for yarn 1)
|
|
44
|
+
"yarn-berry-deduplicate", // use yarn dedupe with yarn 2
|
|
45
|
+
"yarn-update-lock",
|
|
46
|
+
"@pob/version",
|
|
47
|
+
"pob-release",
|
|
48
|
+
"eslint-plugin-typescript",
|
|
49
|
+
"xunit-file",
|
|
50
50
|
]);
|
|
51
51
|
|
|
52
|
-
this.fs.writeJSON(this.destinationPath(
|
|
52
|
+
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,81 +1,82 @@
|
|
|
1
|
-
import Generator from
|
|
2
|
-
import * as packageUtils from
|
|
1
|
+
import Generator from "yeoman-generator";
|
|
2
|
+
import * as packageUtils from "../../../utils/package.js";
|
|
3
3
|
|
|
4
4
|
export default class CommonReleaseGenerator extends Generator {
|
|
5
5
|
constructor(args, opts) {
|
|
6
6
|
super(args, opts);
|
|
7
7
|
|
|
8
|
-
this.option(
|
|
8
|
+
this.option("enable", {
|
|
9
9
|
type: Boolean,
|
|
10
10
|
required: true,
|
|
11
|
-
|
|
11
|
+
description: "If releasing is enabled",
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
this.option(
|
|
14
|
+
this.option("enablePublish", {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
required: true,
|
|
17
|
-
|
|
17
|
+
description: "If publish on npm is enabled",
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
this.option(
|
|
20
|
+
this.option("withBabel", {
|
|
21
21
|
type: Boolean,
|
|
22
22
|
required: false,
|
|
23
23
|
default: undefined,
|
|
24
|
-
|
|
24
|
+
description: "Babel enabled.",
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
this.option(
|
|
27
|
+
this.option("withTypescript", {
|
|
28
28
|
type: Boolean,
|
|
29
29
|
required: false,
|
|
30
30
|
default: undefined,
|
|
31
|
-
|
|
31
|
+
description: "Typescript enabled.",
|
|
32
32
|
});
|
|
33
|
-
this.option(
|
|
33
|
+
this.option("isMonorepo", {
|
|
34
34
|
type: Boolean,
|
|
35
35
|
default: false,
|
|
36
|
-
|
|
36
|
+
description: "is monorepo",
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
this.option(
|
|
39
|
+
this.option("enableYarnVersion", {
|
|
40
40
|
type: Boolean,
|
|
41
41
|
default: true,
|
|
42
|
-
|
|
42
|
+
description: "enable yarn version conventional commits",
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
this.option(
|
|
45
|
+
this.option("ci", {
|
|
46
46
|
type: Boolean,
|
|
47
47
|
required: true,
|
|
48
|
-
|
|
48
|
+
description: "ci with github actions",
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
this.option(
|
|
51
|
+
this.option("disableYarnGitCache", {
|
|
52
52
|
type: Boolean,
|
|
53
53
|
required: false,
|
|
54
54
|
default: false,
|
|
55
|
-
|
|
55
|
+
description:
|
|
56
|
+
"Disable git cache. See https://yarnpkg.com/features/caching#offline-mirror.",
|
|
56
57
|
});
|
|
57
58
|
|
|
58
|
-
this.option(
|
|
59
|
+
this.option("updateOnly", {
|
|
59
60
|
type: Boolean,
|
|
60
61
|
required: false,
|
|
61
62
|
default: false,
|
|
62
|
-
|
|
63
|
+
description: "Avoid asking questions",
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
writing() {
|
|
67
|
-
const pkg = this.fs.readJSON(this.destinationPath(
|
|
68
|
+
const pkg = this.fs.readJSON(this.destinationPath("package.json"));
|
|
68
69
|
|
|
69
70
|
if (this.options.enable && this.options.ci) {
|
|
70
71
|
const useLegacyName = this.fs.exists(
|
|
71
|
-
this.destinationPath(
|
|
72
|
+
this.destinationPath(".github/workflows/publish.yml"),
|
|
72
73
|
);
|
|
73
74
|
|
|
74
|
-
const name = useLegacyName ?
|
|
75
|
+
const name = useLegacyName ? "publish.yml" : "release.yml";
|
|
75
76
|
|
|
76
77
|
// TODO rename release (release = version + publish)
|
|
77
78
|
this.fs.copyTpl(
|
|
78
|
-
this.templatePath(
|
|
79
|
+
this.templatePath("workflow-release.yml.ejs"),
|
|
79
80
|
this.destinationPath(`.github/workflows/${name}`),
|
|
80
81
|
{
|
|
81
82
|
enablePublish: this.options.enablePublish,
|
|
@@ -84,49 +85,49 @@ export default class CommonReleaseGenerator extends Generator {
|
|
|
84
85
|
isMonorepo: this.options.isMonorepo,
|
|
85
86
|
isMonorepoIndependent:
|
|
86
87
|
this.options.isMonorepo &&
|
|
87
|
-
(!pkg.version || pkg.version ===
|
|
88
|
+
(!pkg.version || pkg.version === "0.0.0"),
|
|
88
89
|
},
|
|
89
90
|
);
|
|
90
91
|
} else {
|
|
91
|
-
this.fs.delete(this.destinationPath(
|
|
92
|
-
this.fs.delete(this.destinationPath(
|
|
92
|
+
this.fs.delete(this.destinationPath(".github/workflows/publish.yml"));
|
|
93
|
+
this.fs.delete(this.destinationPath(".github/workflows/release.yml"));
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
packageUtils.removeDevDependencies(pkg, [
|
|
96
|
+
packageUtils.removeDevDependencies(pkg, ["standard-version"]);
|
|
96
97
|
packageUtils.removeScripts(pkg, [
|
|
97
|
-
|
|
98
|
-
pkg.name ===
|
|
98
|
+
"release",
|
|
99
|
+
pkg.name === "pob-dependencies" ? null : "preversion",
|
|
99
100
|
]);
|
|
100
101
|
|
|
101
|
-
if (pkg.scripts.version ===
|
|
102
|
+
if (pkg.scripts.version === "pob-version") {
|
|
102
103
|
delete pkg.scripts.version;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
if (this.options.enable && !this.options.ci) {
|
|
106
107
|
packageUtils.addScripts(pkg, {
|
|
107
108
|
preversion: [
|
|
108
|
-
|
|
109
|
+
"yarn run lint",
|
|
109
110
|
this.options.withBabel ||
|
|
110
|
-
(this.options.withTypescript &&
|
|
111
|
-
|
|
111
|
+
(this.options.withTypescript && "yarn run build"),
|
|
112
|
+
"repository-check-dirty",
|
|
112
113
|
]
|
|
113
114
|
.filter(Boolean)
|
|
114
|
-
.join(
|
|
115
|
+
.join(" && "),
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
if (
|
|
119
120
|
this.fs.exists(
|
|
120
|
-
this.destinationPath(
|
|
121
|
+
this.destinationPath(".github/workflows/release-please.yml"),
|
|
121
122
|
)
|
|
122
123
|
) {
|
|
123
124
|
this.fs.delete(
|
|
124
|
-
this.destinationPath(
|
|
125
|
+
this.destinationPath(".github/workflows/release-please.yml"),
|
|
125
126
|
);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
this.fs.delete(this.destinationPath(
|
|
129
|
+
this.fs.delete(this.destinationPath(".release-please-manifest.json"));
|
|
129
130
|
|
|
130
|
-
this.fs.writeJSON(this.destinationPath(
|
|
131
|
+
this.fs.writeJSON(this.destinationPath("package.json"), pkg);
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
- name: New version (dry run)
|
|
47
47
|
if: github.ref == 'refs/heads/main' && inputs.dry-run
|
|
48
48
|
<% if (enableYarnVersion) { -%>
|
|
49
|
-
run: yarn version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
|
|
49
|
+
run: yarn yarn-version version --dry-run<% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %>
|
|
50
50
|
<% } else { -%>
|
|
51
51
|
run: yarn lerna version --yes --no-push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --no-git-tag-version --loglevel=verbose
|
|
52
52
|
<% } -%>
|
|
@@ -60,7 +60,7 @@ jobs:
|
|
|
60
60
|
if: github.ref == 'refs/heads/main' && !inputs.dry-run
|
|
61
61
|
run: |
|
|
62
62
|
<% if (enableYarnVersion) { -%>
|
|
63
|
-
yarn version --create-release=github <% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %> -m 'chore: release <%- isMonorepoIndependent ? '' : '%v ' %>[skip ci]<%- isMonorepoIndependent ? '\\n\\n%t' : '' %>'
|
|
63
|
+
yarn yarn-version version --create-release=github <% if (isMonorepo && isMonorepoIndependent) { %> --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}<% } %> -m 'chore: release <%- isMonorepoIndependent ? '' : '%v ' %>[skip ci]<%- isMonorepoIndependent ? '\\n\\n%t' : '' %>'
|
|
64
64
|
<% } else { -%>
|
|
65
65
|
yarn lerna version --yes --push --exact --conventional-commits --conventional-graduate --changelog-preset conventional-changelog-conventionalcommits --create-release=github -m 'chore: release [skip ci]'
|
|
66
66
|
<% } -%>
|