Add Changesets configuration and update development documentation (#1964)

Introduce Changesets for versioning and changelog generation, and
enhance development documentation to guide contributors on using
Changesets effectively.
This commit is contained in:
Zoltán Bedi
2025-02-06 10:35:36 +01:00
committed by GitHub
parent c2ffd31b1a
commit aa63bb8835
6 changed files with 477 additions and 8 deletions

8
.changeset/README.md Normal file
View File

@@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

32
.changeset/changelog.js Normal file
View File

@@ -0,0 +1,32 @@
const changelogFunctions = {
getReleaseLine: async (changeset, type, options) => {
let prefix = '🎉';
if (type === 'major') {
prefix = '🎉';
} else if (type === 'minor') {
prefix = '🚀';
} else if (type === 'patch') {
prefix = '🐛';
}
if (changeset && changeset.summary) {
const summary = changeset.summary || '';
if (summary.indexOf('Docs') > -1) {
prefix = '📝';
}
if (
summary.indexOf('Chore') > -1 ||
summary.indexOf('grafana-plugin-sdk-go') > -1 ||
summary.indexOf('compiled') > -1
) {
prefix = '⚙️';
}
return [prefix, summary].join(' ');
}
return [prefix, changeset?.summary].join(' ');
},
getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => {
return '\n';
},
};
module.exports = changelogFunctions;

11
.changeset/config.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
"changelog": "./changelog.js",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}