Update Version & Changelog After PR #90
Hey guys, it's time to get our hands dirty and update the package version and changelog after merging the awesome pull request #90 into the main branch. This is a crucial step in maintaining our project's health, keeping our users informed, and ensuring smooth sailing for future updates. Let's dive into the details, shall we?
Version Management: Keeping Track of Changes
Alright, before we get into the nitty-gritty, let's talk about versioning. It's like a secret code that tells us what's changed in the code and how big the changes are. We follow some simple guidelines to make sure everyone's on the same page. Remember that every single code change requires a version bump. Seriously, no exceptions! This helps us with tracking releases and managing our dependencies properly. You know, the usual stuff.
So, here's the deal. When should you bump the version? Well, it depends on what you've changed, let's break it down like this:
- New features or API signature changes: Time for a minor version increment. Think of it like this: if you're adding something shiny and new or changing how the API works, bump that middle number (e.g., from 0.3.1 to 0.4.0).
- Bug fixes, patches, and small code tweaks: That calls for a patch version increment. It's like a little fix-up. Increment the last number (e.g., from 0.3.0 to 0.3.1).
- Breaking changes: Uh oh, this one's a big deal! If you've made a change that's not compatible with older versions, that's when you bump the major version (e.g., from 0.4.0 to 1.0.0). This usually means users will need to update their code to make things work.
And here's the order of operations. Before you commit any code changes, make sure you update the version in the package.json
file. That's the source of truth. Also, don't forget to update the ?refresh=
query parameter on the README badge with the latest timestamp. This forces a refresh to make sure we are getting the newest version. It's all about staying organized and keeping things clean, you know?
Always Update Package Version
Let's make it clear that the package version should be updated with every single code change. No matter what. This practice ensures proper release tracking, which helps in dependency management. To make sure we're on the right track, make sure to update the version in the package.json
before you commit any code changes.
Changelog Management: Keeping Users in the Loop
Now, let's talk about the changelog. This is where we tell our users what's new, what's fixed, and what's been changed. It's super important for keeping people informed and making sure they know how to use our code.
We follow the Keep a Changelog format, which is a standard way of organizing the changelog. At the top of the CHANGELOG.md
file, we add a new section for the new version. You can put the title, version, and date at the top. Then, we use these sections:
- Added: New features.
- Changed: Changes to existing functionality.
- Deprecated: Features that are going away soon.
- Removed: Features that have been removed.
- Fixed: Bug fixes.
- Security: Security-related changes.
When you're writing the changelog entries, keep them concise and focused on what the user sees. Don't get bogged down in implementation details unless they directly affect the user experience. If it's a patch version, keep it short and sweet, focusing on what was fixed or improved. If it's a minor version, give a little more detail about the new features and their benefits. Make sure to keep it user-friendly, and easy to understand.
Always Update CHANGELOG.md
Updating the CHANGELOG.md
file should be a requirement for every code change. You should add a new section at the top for the new version, in accordance with the Keep a Changelog format. Keep entries concise and user-focused so that our users know what's going on. For patch versions, keep it brief, focusing on what was fixed. For minor versions, provide more detail about the new features and benefits.
Tasks at Hand: Let's Get it Done!
Alright, guys, now that we've covered the basics, let's get down to business. Here's what we need to do:
- Review the Merged PR: Take a look at the changes in the merged PR: https://github.com/qualisero/openapi-endpoint/pull/90. Get a good understanding of the code changes.
- Determine the Appropriate Version Increment: Based on the changes, decide whether it's a patch, minor, or major version bump. Check the rules above.
- Update Version in
package.json
: Open up thepackage.json
file and update the version number. Be sure you selected the right increment! - Add a New Section to
CHANGELOG.md
: Create a new section in theCHANGELOG.md
file for the new version and add the relevant changes, according to the format from above. Make sure the entries are concise and user-focused. - Update
README.md
(If Necessary): If there are any new features, API changes, or installation instructions that need to be updated in theREADME.md
file, go ahead and make those changes. - Create a Pull Request: Create a pull request with the version and changelog updates. Give it a clear and descriptive title, like