瀏覽代碼

chore: add back `.changes/readme.md` (#8905)

* chore: add back `.changes/readme.md`

* fix test
Amr Bashir 1 年之前
父節點
當前提交
6f064a0d6f
共有 2 個文件被更改,包括 47 次插入1 次删除
  1. 44 0
      .changes/README.md
  2. 3 1
      .scripts/ci/check-change-tags.js

+ 44 - 0
.changes/README.md

@@ -0,0 +1,44 @@
+# Changes
+
+##### via https://github.com/jbolda/covector
+
+As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
+
+When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
+
+Use the following format:
+
+```md
+---
+'package-a': 'patch:enhance'
+'package-b': 'patch:enhance'
+---
+
+Change summary goes here
+```
+
+Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
+
+Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
+
+Given a version number MAJOR.MINOR.PATCH, increment the:
+
+- MAJOR version when you make incompatible API changes,
+- MINOR version when you add functionality in a backwards compatible manner, and
+- PATCH version when you make backwards compatible bug fixes.
+
+Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
+
+Additionally you could specify a tag for the change file to group it with other changes by prefixing the bump with `:<tag>`, for example:
+
+```md
+---
+'package-a': 'patch:enhance'
+---
+
+Change summary goes here
+```
+
+which will group this change file with other changes that specify the `bug` tag.
+
+For list of available tags, see the `changeTags` key in [./config.json](./config.json)

+ 3 - 1
.scripts/ci/check-change-tags.js

@@ -69,7 +69,9 @@ function checkChangeFiles(changeFiles) {
 const [_bin, _script, ...files] = process.argv
 
 if (files.length > 0) {
-  checkChangeFiles(files.filter((f) => f.toLowerCase() !== 'readme.md'))
+  checkChangeFiles(
+    files.filter((f) => f.toLowerCase() !== '.changes/readme.md')
+  )
 } else {
   const changeFiles = fs
     .readdirSync('.changes')