Problem: If you store release notes in a single file log CHANGELOG.md, you will run into merge conflicts constantly as different developers add entries.
Solution: Store each release note in a separate file.
Strongly typed release notes generated via separate files using Node and TypeScript = No more conflicts, and type safety to assure all release notes follow a common pattern. 🎉
-
Create
release-notes/next/.tsx
. Replacepr-number
in this example with the PR number created in the previous step. For example, if the PR number is 100, create100.ts
. -
Inside, export a const of type
ReleaseNote
so TypeScript enforces adding the necessary information about your change. Commit this file.