Skip to content

Commit

Permalink
Expose changelog things from release-utils (#501)
Browse files Browse the repository at this point in the history
* Expose changelog things from release-utils

* Export sortChangelogEntries

* Fix tests
  • Loading branch information
emmatown committed Dec 2, 2020
1 parent 09fd1e1 commit f5aa35b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-apples-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/release-utils": minor
---

Expose `getChangelogEntry` and `sortChangelogEntries`
1 change: 1 addition & 0 deletions packages/release-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { readChangesetState } from "./readChangesetState";
export { runPublish as publish, runVersion as version } from "./run";
export { getChangelogEntry, BumpLevels, sortChangelogEntries } from "./utils";
4 changes: 2 additions & 2 deletions packages/release-utils/src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getChangelogEntry, BumpLevels, sortTheThings } from "./utils";
import { getChangelogEntry, BumpLevels, sortChangelogEntries } from "./utils";

let changelog = `# @keystone-alpha/email
Expand Down Expand Up @@ -97,5 +97,5 @@ test("it sorts the things right", () => {
private: false
}
];
expect(things.sort(sortTheThings)).toMatchSnapshot();
expect(things.sort(sortChangelogEntries)).toMatchSnapshot();
});
2 changes: 1 addition & 1 deletion packages/release-utils/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export async function execWithOutput(
};
}

export function sortTheThings(
export function sortChangelogEntries(
a: { private: boolean; highestLevel: number },
b: { private: boolean; highestLevel: number }
) {
Expand Down

0 comments on commit f5aa35b

Please sign in to comment.