@livekit/changesets-changelog-github 0.0.1 → 0.0.3
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.
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -1
- package/src/index.test.ts +4 -4
- package/src/index.ts +4 -4
package/dist/index.js
CHANGED
|
@@ -101,11 +101,11 @@ var changelogFunctions = {
|
|
|
101
101
|
};
|
|
102
102
|
})();
|
|
103
103
|
const users = usersFromSummary.length ? usersFromSummary.map((userFromSummary) => `@${userFromSummary}`).join(", ") : links.user;
|
|
104
|
-
const
|
|
104
|
+
const pullRequest = links.pull ? `- ${links.pull}` : links.commit ? `- ${links.commit}` : "";
|
|
105
105
|
const suffix = users === null ? "" : `(${users})`;
|
|
106
106
|
return `
|
|
107
107
|
|
|
108
|
-
- ${
|
|
108
|
+
- ${firstLine} ${pullRequest} ${suffix}
|
|
109
109
|
${futureLines.map((l) => ` ${l}`).join("\n")}`;
|
|
110
110
|
}
|
|
111
111
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -78,11 +78,11 @@ var changelogFunctions = {
|
|
|
78
78
|
};
|
|
79
79
|
})();
|
|
80
80
|
const users = usersFromSummary.length ? usersFromSummary.map((userFromSummary) => `@${userFromSummary}`).join(", ") : links.user;
|
|
81
|
-
const
|
|
81
|
+
const pullRequest = links.pull ? `- ${links.pull}` : links.commit ? `- ${links.commit}` : "";
|
|
82
82
|
const suffix = users === null ? "" : `(${users})`;
|
|
83
83
|
return `
|
|
84
84
|
|
|
85
|
-
- ${
|
|
85
|
+
- ${firstLine} ${pullRequest} ${suffix}
|
|
86
86
|
${futureLines.map((l) => ` ${l}`).join("\n")}`;
|
|
87
87
|
}
|
|
88
88
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livekit/changesets-changelog-github",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "A compact changelog entry generator based on the official changesets changelog generator",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@changesets/parse": "*",
|
|
20
20
|
"@types/jest": "29.1.1",
|
|
21
|
+
"changesets": "^1.0.2",
|
|
22
|
+
"changesets-cli": "^0.0.0",
|
|
21
23
|
"jest": "^29.2.2",
|
|
22
24
|
"jest-junit": "^6.4.0",
|
|
23
25
|
"ts-jest": "29.0.3",
|
package/src/index.test.ts
CHANGED
|
@@ -82,7 +82,7 @@ describe.each([data.commit, "wrongcommit", undefined])(
|
|
|
82
82
|
)
|
|
83
83
|
)
|
|
84
84
|
).toEqual(
|
|
85
|
-
`\n\n- [#1613](https://github.com/emotion-js/emotion/pull/1613)
|
|
85
|
+
`\n\n- something - [#1613](https://github.com/emotion-js/emotion/pull/1613) (@Andarist)\n`
|
|
86
86
|
);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -93,7 +93,7 @@ describe.each([data.commit, "wrongcommit", undefined])(
|
|
|
93
93
|
...getChangeset(`commit: ${data.commit}`, commitFromChangeset)
|
|
94
94
|
)
|
|
95
95
|
).toEqual(
|
|
96
|
-
`\n\n- [#1613](https://github.com/emotion-js/emotion/pull/1613)
|
|
96
|
+
`\n\n- something - [#1613](https://github.com/emotion-js/emotion/pull/1613) (@Andarist)\n`
|
|
97
97
|
);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
@@ -111,7 +111,7 @@ describe.each(["author", "user"])(
|
|
|
111
111
|
)
|
|
112
112
|
)
|
|
113
113
|
).toEqual(
|
|
114
|
-
`\n\n- [#1613](https://github.com/emotion-js/emotion/pull/1613)
|
|
114
|
+
`\n\n- something - [#1613](https://github.com/emotion-js/emotion/pull/1613) (@other)\n`
|
|
115
115
|
);
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -128,7 +128,7 @@ it("with multiple authors", async () => {
|
|
|
128
128
|
).toMatchInlineSnapshot(`
|
|
129
129
|
"
|
|
130
130
|
|
|
131
|
-
- [#1613](https://github.com/emotion-js/emotion/pull/1613)
|
|
131
|
+
- something - [#1613](https://github.com/emotion-js/emotion/pull/1613) (@Andarist, @mitchellhamilton)
|
|
132
132
|
"
|
|
133
133
|
`);
|
|
134
134
|
});
|
package/src/index.ts
CHANGED
|
@@ -106,14 +106,14 @@ const changelogFunctions: ChangelogFunctions = {
|
|
|
106
106
|
.join(", ")
|
|
107
107
|
: links.user;
|
|
108
108
|
|
|
109
|
-
const
|
|
110
|
-
?
|
|
109
|
+
const pullRequest = links.pull
|
|
110
|
+
? `- ${links.pull}`
|
|
111
111
|
: links.commit
|
|
112
|
-
?
|
|
112
|
+
? `- ${links.commit}`
|
|
113
113
|
: "";
|
|
114
114
|
const suffix = users === null ? "" : `(${users})`;
|
|
115
115
|
|
|
116
|
-
return `\n\n- ${
|
|
116
|
+
return `\n\n- ${firstLine} ${pullRequest} ${suffix}\n${futureLines
|
|
117
117
|
.map((l) => ` ${l}`)
|
|
118
118
|
.join("\n")}`;
|
|
119
119
|
},
|