nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: atlassian/changesets
Pull request #501 (2020-12-02 06:38:21)

Expose changelog things from release-utils

changeset-bot[bot]: ###  🦋  Changeset detected

Latest commit: 0dc9d14ac1274e89f37c9a83abeb1f740bf182cb

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 1 package</summary>

  | Name                      | Type  |
| ------------------------- | ----- |
| @changesets/release-utils | Minor |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/atlassian/changesets/new/expose-changelog-things-from-release-utils?filename=.changeset/rude-lemons-join.md&value=---%0A%22%40changesets%2Frelease-utils%22%3A%20patch%0A---%0A%0AExpose%20changelog%20things%20from%20release-utils%0A)



Patch:
diff --git a/.changeset/cool-apples-raise.md b/.changeset/cool-apples-raise.md
new file mode 100644
index 0000000..41b20ea
--- /dev/null
+++ b/.changeset/cool-apples-raise.md
@@ -0,0 +1,5 @@
+---
+"@changesets/release-utils": minor
+---
+
+Expose `getChangelogEntry` and `sortChangelogEntries`
diff --git a/packages/release-utils/src/index.ts b/packages/release-utils/src/index.ts
index 12a3e3e..4a3d21d 100644
--- a/packages/release-utils/src/index.ts
+++ b/packages/release-utils/src/index.ts
@@ -1,2 +1,3 @@
 export { readChangesetState } from "./readChangesetState";
 export { runPublish as publish, runVersion as version } from "./run";
+export { getChangelogEntry, BumpLevels, sortChangelogEntries } from "./utils";
diff --git a/packages/release-utils/src/utils.ts b/packages/release-utils/src/utils.ts
index 5a8e342..559f677 100644
--- a/packages/release-utils/src/utils.ts
+++ b/packages/release-utils/src/utils.ts
@@ -117,7 +117,7 @@ export async function execWithOutput(
   };
 }
 
-export function sortTheThings(
+export function sortChangelogEntries(
   a: { private: boolean; highestLevel: number },
   b: { private: boolean; highestLevel: number }
 ) {


Test patch:
diff --git a/packages/release-utils/src/utils.test.ts b/packages/release-utils/src/utils.test.ts
index 35d464a..d5d07de 100644
--- a/packages/release-utils/src/utils.test.ts
+++ b/packages/release-utils/src/utils.test.ts
@@ -1,4 +1,4 @@
-import { getChangelogEntry, BumpLevels, sortTheThings } from "./utils";
+import { getChangelogEntry, BumpLevels, sortChangelogEntries } from "./utils";
 
 let changelog = `# @keystone-alpha/email
 
@@ -97,5 +97,5 @@ test("it sorts the things right", () => {
       private: false
     }
   ];
-  expect(things.sort(sortTheThings)).toMatchSnapshot();
+  expect(things.sort(sortChangelogEntries)).toMatchSnapshot();
 });