Skip to content

Commit b33b2e3

Browse files
authored
Introduce changesets (#127)
1 parent 223d031 commit b33b2e3

File tree

5 files changed

+574
-7
lines changed

5 files changed

+574
-7
lines changed

.changeset/README.md

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

.changeset/changelog.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const changelogFunctions = {
2+
getReleaseLine: async (changeset, type, options) => {
3+
let prefix = '🎉';
4+
if (type === 'major') {
5+
prefix = '🎉';
6+
} else if (type === 'minor') {
7+
prefix = '🚀';
8+
} else if (type === 'patch') {
9+
prefix = '🐛';
10+
}
11+
if (changeset && changeset.summary) {
12+
const summary = changeset.summary || '';
13+
if (summary.indexOf('Docs') > -1) {
14+
prefix = '📝';
15+
}
16+
if (
17+
summary.indexOf('Chore') > -1 ||
18+
summary.indexOf('grafana-plugin-sdk-go') > -1 ||
19+
summary.indexOf('compiled') > -1
20+
) {
21+
prefix = '⚙️';
22+
}
23+
return [prefix, summary].join(' ');
24+
}
25+
return [prefix, changeset?.summary].join(' ');
26+
},
27+
getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => {
28+
return '\n';
29+
},
30+
};
31+
32+
module.exports = changelogFunctions;

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "./changelog.js",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"license": "Apache-2.0",
2424
"devDependencies": {
2525
"@babel/core": "^7.21.4",
26+
"@changesets/cli": "^2.27.12",
2627
"@grafana/eslint-config": "^8.0.0",
2728
"@grafana/plugin-e2e": "^2.0.4",
2829
"@grafana/tsconfig": "^2.0.0",

0 commit comments

Comments
 (0)