cmyr-template-cli 1.41.4 → 1.41.6

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.
Files changed (2) hide show
  1. package/dist/plopfile.js +15 -4
  2. package/package.json +17 -5
package/dist/plopfile.js CHANGED
@@ -772,6 +772,7 @@ async function init(projectPath, answers) {
772
772
  await sortProjectJson(projectPath);
773
773
  await initYarn(projectPath, answers);
774
774
  await jsFileExtRename(projectPath);
775
+ await initDependabot(projectPath, answers);
775
776
  await asyncExec("git add .", {
776
777
  cwd: projectPath
777
778
  });
@@ -840,7 +841,6 @@ async function init(projectPath, answers) {
840
841
  if (isInitDocker) {
841
842
  await initDocker(projectPath, answers);
842
843
  }
843
- await initDependabot(projectPath, answers);
844
844
  await asyncExec("git add .", {
845
845
  cwd: projectPath
846
846
  });
@@ -1038,6 +1038,15 @@ async function initDependabot(projectPath, answers) {
1038
1038
  if (await import_fs_extra3.default.pathExists(dependabotPath)) {
1039
1039
  const dependabot = import_yaml.default.parse(await import_fs_extra3.default.readFile(dependabotPath, "utf-8"));
1040
1040
  if (dependabot?.updates?.[0]["package-ecosystem"] === "npm") {
1041
+ if (dependabot.updates[0].schedule.interval !== "monthly") {
1042
+ dependabot.updates[0].schedule.interval = "monthly";
1043
+ }
1044
+ if (dependabot.updates[0].schedule.time !== "04:00") {
1045
+ dependabot.updates[0].schedule.time = "04:00";
1046
+ }
1047
+ if (dependabot.updates[0].schedule.timezone !== "Asia/Shanghai") {
1048
+ dependabot.updates[0].schedule.timezone = "Asia/Shanghai";
1049
+ }
1041
1050
  const dependencies = [];
1042
1051
  if (pkg?.dependencies?.["art-template"]) {
1043
1052
  dependencies.push({
@@ -1060,7 +1069,7 @@ async function initDependabot(projectPath, answers) {
1060
1069
  directory: "/",
1061
1070
  "open-pull-requests-limit": 20,
1062
1071
  schedule: {
1063
- interval: "weekly",
1072
+ interval: "monthly",
1064
1073
  time: "04:00",
1065
1074
  timezone: "Asia/Shanghai"
1066
1075
  }
@@ -1070,6 +1079,8 @@ async function initDependabot(projectPath, answers) {
1070
1079
  import_fs_extra3.default.writeFile(dependabotPath, import_yaml.default.stringify(dependabot, {
1071
1080
  defaultStringType: "QUOTE_DOUBLE",
1072
1081
  // 默认使用双引号
1082
+ defaultKeyType: "PLAIN",
1083
+ // key 使用普通字符串
1073
1084
  singleQuote: false,
1074
1085
  // 禁用单引号
1075
1086
  doubleQuotedAsJSON: true
@@ -1596,7 +1607,7 @@ async function initHusky(projectPath) {
1596
1607
  const pkgData = {
1597
1608
  scripts: {
1598
1609
  ...pkg?.scripts,
1599
- prepare: "husky init"
1610
+ prepare: "husky"
1600
1611
  },
1601
1612
  devDependencies: {
1602
1613
  ...pkg?.devDependencies,
@@ -1629,7 +1640,7 @@ async function initEslint(projectPath, answers) {
1629
1640
  "@typescript-eslint/eslint-plugin": void 0,
1630
1641
  "@typescript-eslint/parser": void 0
1631
1642
  };
1632
- let eslintType = "cmyr";
1643
+ let eslintType = "eslint-config-cmyr";
1633
1644
  const extnames = ["js", "mjs", "cjs", "ts", "cts", "mts"];
1634
1645
  if (templateMeta?.language === "vue") {
1635
1646
  Object.assign(devDependencies, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.41.4",
3
+ "version": "1.41.6",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",
@@ -32,7 +32,9 @@
32
32
  "build:prod": "npm run build && rimraf temp && cross-env NODE_ENV=production ct create"
33
33
  },
34
34
  "devDependencies": {
35
- "@commitlint/cli": "^19.8.1",
35
+ "@commitlint/cli": "^20.1.0",
36
+ "@semantic-release/changelog": "^6.0.3",
37
+ "@semantic-release/git": "^10.0.1",
36
38
  "@types/debug": "^4.1.5",
37
39
  "@types/ejs": "^3.1.0",
38
40
  "@types/fs-extra": "^11.0.0",
@@ -42,15 +44,17 @@
42
44
  "@types/node": "^24.0.7",
43
45
  "commitizen": "^4.3.1",
44
46
  "commitlint-config-cmyr": "1.0.0",
47
+ "conventional-changelog-cmyr-config": "^3.0.0",
48
+ "conventional-changelog-writer": "^8.2.0",
45
49
  "cross-env": "^10.0.0",
46
50
  "cz-conventional-changelog-cmyr": "2.0.0",
47
51
  "debug": "^4.3.1",
48
52
  "eslint": "^9.34.0",
49
- "eslint-config-cmyr": "2.0.0",
53
+ "eslint-config-cmyr": "2.0.1",
50
54
  "husky": "^9.0.5",
51
55
  "lint-staged": "^16.1.0",
52
56
  "rimraf": "^6.0.0",
53
- "semantic-release": "24.2.7",
57
+ "semantic-release": "25.0.0",
54
58
  "semantic-release-cmyr-config": "1.0.0",
55
59
  "tsup": "^8.3.5",
56
60
  "tsx": "^4.20.5",
@@ -74,7 +78,7 @@
74
78
  "ora": "^5.4.1",
75
79
  "plop": "^2.7.6",
76
80
  "tslib": "^2.4.0",
77
- "yaml": "^2.3.4"
81
+ "yaml": "^2.8.1"
78
82
  },
79
83
  "config": {
80
84
  "commitizen": {
@@ -83,5 +87,13 @@
83
87
  },
84
88
  "changelog": {
85
89
  "language": "zh"
90
+ },
91
+ "homepage": "https://github.com/CaoMeiYouRen/cmyr-template-cli#readme",
92
+ "repository": {
93
+ "type": "git",
94
+ "url": "git+https://github.com/CaoMeiYouRen/cmyr-template-cli.git"
95
+ },
96
+ "bugs": {
97
+ "url": "https://github.com/CaoMeiYouRen/cmyr-template-cli/issues"
86
98
  }
87
99
  }