Просмотр исходного кода

Adding changeset changelog format

a8trejo 1 год назад
Родитель
Сommit
5359f823f2
5 измененных файлов с 24 добавлено и 2 удалено
  1. 20 0
      .changeset/changelog-config.ts
  2. 1 1
      .changeset/config.json
  3. 1 1
      .gitignore
  4. 1 0
      package-lock.json
  5. 1 0
      package.json

+ 20 - 0
.changeset/changelog-config.ts

@@ -0,0 +1,20 @@
+import { ChangelogFunctions } from '@changesets/types';
+
+const getReleaseLine: ChangelogFunctions['getReleaseLine'] = async (changeset) => {
+  const [firstLine] = changeset.summary
+    .split('\n')
+    .map(l => l.trim())
+    .filter(Boolean);
+  return `-   ${firstLine}`;
+};
+
+const getDependencyReleaseLine: ChangelogFunctions['getDependencyReleaseLine'] = async () => {
+  return '';
+};
+
+const changelogFunctions: ChangelogFunctions = {
+  getReleaseLine,
+  getDependencyReleaseLine,
+};
+
+export default changelogFunctions;

+ 1 - 1
.changeset/config.json

@@ -1,6 +1,6 @@
 {
   "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
-  "changelog": "@changesets/cli/changelog",
+  "changelog": "./changelog-config.ts",
   "commit": false,
   "fixed": [],
   "linked": [],

+ 1 - 1
.gitignore

@@ -10,4 +10,4 @@ bin/
 roo-cline-*.vsix
 
 # Local prompts and rules
-local-prompts
+/local-prompts

+ 1 - 0
package-lock.json

@@ -46,6 +46,7 @@
       },
       "devDependencies": {
         "@changesets/cli": "^2.27.10",
+        "@changesets/types": "^6.0.0",
         "@types/diff": "^5.2.1",
         "@types/jest": "^29.5.14",
         "@types/mocha": "^10.0.7",

+ 1 - 0
package.json

@@ -172,6 +172,7 @@
   },
   "devDependencies": {
     "@changesets/cli": "^2.27.10",
+    "@changesets/types": "^6.0.0",
     "@types/diff": "^5.2.1",
     "@types/jest": "^29.5.14",
     "@types/mocha": "^10.0.7",