Skip to content

Adjust the bump-version script to use npm functionality#113

Merged
mcdonnnj merged 1 commit intodevelopfrom
improvement/adjust_bump-version_script
Apr 9, 2026
Merged

Adjust the bump-version script to use npm functionality#113
mcdonnnj merged 1 commit intodevelopfrom
improvement/adjust_bump-version_script

Conversation

@mcdonnnj
Copy link
Copy Markdown
Member

@mcdonnnj mcdonnnj commented Apr 8, 2026

🗣 Description

This pull request adjusts the bump-version script to use npm to change the version in package files.

💭 Motivation and context

I noticed that the bump-version script at present does not update the version of the package in the package-lock.json file. While I initially considered just adding that file to the list, I thought it might be beneficial to use npm's built-in functionality to change a package's version. This will ensure that any package files that need to reflect the new version are updated accordingly.

🧪 Testing

Automated tests pass. I did some test version bumps and everything looked as one would expect.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

Change the script to use npm's built-in functionality for updating a
package's version. This will ensure that any npm package files are
updated to the new version. However, we do prevent npm from creating
the commit and a tag.
@mcdonnnj mcdonnnj self-assigned this Apr 8, 2026
@mcdonnnj mcdonnnj added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Apr 8, 2026
@mcdonnnj mcdonnnj requested review from dav3r, felddy and jsf9k as code owners April 8, 2026 18:59
@mcdonnnj mcdonnnj requested a review from Copilot April 8, 2026 18:59
@github-actions github-actions bot added the shell script Pull requests that update shell scripts label Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s bump-version helper script to rely on npm’s built-in versioning behavior so that npm-managed package files (notably package-lock.json) get updated consistently.

Changes:

  • Extend the versioned/staged file set to include package-lock.json.
  • Replace the manual sed-based version rewrite with npm version --no-git-tag-version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mcdonnnj mcdonnnj merged commit cdd4601 into develop Apr 9, 2026
17 checks passed
@mcdonnnj mcdonnnj deleted the improvement/adjust_bump-version_script branch April 9, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement This issue or pull request will add or improve functionality, maintainability, or ease of use shell script Pull requests that update shell scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants