cmyr-template-cli 1.37.2 → 1.37.3
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/dist/plopfile.js +46 -26
- package/package.json +1 -1
package/dist/plopfile.js
CHANGED
|
@@ -995,34 +995,54 @@ async function initDependabot(projectPath, answers) {
|
|
|
995
995
|
await removeFiles(projectPath, files);
|
|
996
996
|
} else {
|
|
997
997
|
const pkg = await getProjectJson(projectPath);
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
998
|
+
const dependabotPath = import_path2.default.join(projectPath, ".github/dependabot.yml");
|
|
999
|
+
if (await import_fs_extra3.default.pathExists(dependabotPath)) {
|
|
1000
|
+
const dependabot = import_yaml.default.parse(await import_fs_extra3.default.readFile(dependabotPath, "utf-8"));
|
|
1001
|
+
if (dependabot?.updates?.[0]["package-ecosystem"] === "npm") {
|
|
1002
|
+
const dependencies = [];
|
|
1003
|
+
if (pkg?.devDependencies?.["semantic-release"]) {
|
|
1004
|
+
dependencies.push({
|
|
1005
|
+
"dependency-name": "semantic-release",
|
|
1006
|
+
versions: [">= 21.0.1"]
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
if (pkg?.devDependencies?.["@commitlint/cli"]) {
|
|
1010
|
+
dependencies.push({
|
|
1011
|
+
"dependency-name": "@commitlint/cli",
|
|
1012
|
+
versions: [">= 19.0.0"]
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
if (pkg?.devDependencies?.["@commitlint/config-conventional"]) {
|
|
1016
|
+
dependencies.push({
|
|
1017
|
+
"dependency-name": "@commitlint/config-conventional",
|
|
1018
|
+
versions: [">= 19.0.0"]
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
if (pkg?.dependencies?.["art-template"]) {
|
|
1022
|
+
dependencies.push({
|
|
1023
|
+
"dependency-name": "art-template",
|
|
1024
|
+
versions: [">= 4.13.3"]
|
|
1025
|
+
});
|
|
1024
1026
|
}
|
|
1027
|
+
dependabot.updates[0].ignore = (0, import_lodash.uniqBy)([
|
|
1028
|
+
...dependabot?.updates?.[0].ignore || [],
|
|
1029
|
+
...dependencies
|
|
1030
|
+
], (e) => e["dependency-name"]);
|
|
1031
|
+
}
|
|
1032
|
+
if (dependabot?.updates?.every((e) => e["package-ecosystem"] !== "github-actions")) {
|
|
1033
|
+
dependabot.updates.push({
|
|
1034
|
+
"package-ecosystem": "github-actions",
|
|
1035
|
+
directory: "/",
|
|
1036
|
+
"open-pull-requests-limit": 20,
|
|
1037
|
+
schedule: {
|
|
1038
|
+
interval: "weekly",
|
|
1039
|
+
time: "04:00",
|
|
1040
|
+
timezone: "Asia/Shanghai"
|
|
1041
|
+
},
|
|
1042
|
+
ignore: []
|
|
1043
|
+
});
|
|
1025
1044
|
}
|
|
1045
|
+
import_fs_extra3.default.writeFile(dependabotPath, import_yaml.default.stringify(dependabot));
|
|
1026
1046
|
}
|
|
1027
1047
|
}
|
|
1028
1048
|
} catch (error) {
|