Changesets
You will be responsible for writing a changeset for your Astro PR. This is a Markdown file that states:
- which repository has changed
- the kind of change according to Astro’s semantic versioning
- a message describing the change that will be publicly displayed on the repo’s CHANGELOG
Format
Begin your changeset message with a present tense verb that completes a sentence in the style of: “This PR …” or “This contribution …”
- Adds
- Removes
- Fixes
- Updates
- Refactors
- Improves
- Deprecates
Finish the introductory sentence with a message focusing on what has changed that is meaningful to a user of Astro. It is usually more helpful to describe the change as someone building an Astro site will experience it, instead of describing how you fixed it.
Patch updates
These updates are often fixes, refactors or other small improvements. They are typically not user-facing, and do not require someone to update their own project code.
Verbs like “fixes” and “refactors” are helpful to let readers know this is an internal or implementation change that they do not need to worry about. At the same time, these messages are helpful to someone who is interested in keeping up with small changes to the codebase.
Often one line is enough to describe your change meaningfully to an Astro user:
These do not need to be full sentences and do not need end punctuation unless you write multiple sentences.
New features
Begin your changeset with “Adds” to alert readers that there is something new and mention the names of any new items (options, functions) that have been added directly in the first sentence:
Additionally, describe what people are now able to do because of these additions that they could not before.
The changeset is an opportunity to call people’s attention to new things they might wish to try in their Astro project, and may include a code example showing basic usage of the new feature:
Breaking changes
Changesets focus on what has changed, and must include any breaking changes, including changes to default behavior. Most users will have several default settings configured (often by not setting any value themselves), so changes to defaults can have a significant impact on someone’s project!
Verbs like “removes”, “changes”, and “deprecates” call attention to something that might require attention. Unlike a new feature someone can choose not to use, changing default or expected behavior cannot be ignored.
Changeset messages for breaking changes must also provide clear guidance for updating. Diff code samples are encouraged when appropriate:
If your contribution changes a default value, then it is helpful to describe how to revert back to the previous behavior. Readers may also appreciate being informed that they can remove configuration that is no longer needed.