Skip to content

fix: sync package-lock.json version fields during automated version bump#1345

Merged
Azgaar merged 2 commits intoauto-versioningfrom
copilot/sub-pr-1344
Mar 7, 2026
Merged

fix: sync package-lock.json version fields during automated version bump#1345
Azgaar merged 2 commits intoauto-versioningfrom
copilot/sub-pr-1344

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

Description

scripts/bump-version.js updated package.json on version bumps but left package-lock.json stale — both its top-level version and packages[""].version fields. This caused the lockfile to drift out of sync after every automated bump.

Changes to scripts/bump-version.js:

  • Added packageLockJsonPath constant
  • Added updatePackageLockJson — updates lock.version and lock.packages[""].version; gracefully no-ops if the file doesn't exist
  • Calls updatePackageLockJson from main() alongside updatePackageJson
  • Updated JSDoc header to list package-lock.json as a managed file
[bump-version] patch: 1.113.3  →  1.113.4

  public/versioning.js  →  1.113.4
  package.json          1.113.3  →  1.113.4
  package-lock.json     1.113.3  →  1.113.4
  src/index.html        (no changed public/*.js files detected)

Type of change

  • Bug fix
  • New feature
  • Refactoring / style
  • Documentation update / chore
  • Other (please describe)

Versioning

  • Version is updated
  • Changed files hash is updated

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Mar 7, 2026
7 tasks
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Copilot AI changed the title [WIP] Update auto versioning implementation based on feedback fix: sync package-lock.json version fields during automated version bump Mar 7, 2026
@Azgaar Azgaar marked this pull request as ready for review March 7, 2026 16:03
Copilot AI review requested due to automatic review settings March 7, 2026 16:03
@Azgaar Azgaar merged commit 7b49802 into auto-versioning Mar 7, 2026
@Azgaar Azgaar deleted the copilot/sub-pr-1344 branch March 7, 2026 16:03
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

Keeps the repo’s automated version-bump script from leaving package-lock.json out of sync with package.json, preventing lockfile drift after each bump.

Changes:

  • Added a package-lock.json path constant to the bump script.
  • Implemented updatePackageLockJson to update package-lock.json’s top-level version and packages[""].version fields (skips if missing).
  • Wired the new lockfile update into main() and updated the script header docs.

Azgaar added a commit that referenced this pull request Mar 7, 2026
* feat: implement version bumping script and pre-push hook

* chore: bump version to 1.113.5

* chore: bump version to 1.113.6

* chore: bump version to 1.113.7

* chore: bump version to 1.113.8

* chore: bump version to 1.113.9

* chore: bump version to 1.113.10

* chore: bump version to 1.113.3 and update versioning process

* chore: enhance version bump process with base version check

* Update .github/workflows/bump-version.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/bump-version.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: sync package-lock.json version fields during automated version bump (#1345)

* Initial plan

* fix: update package-lock.json version fields during version bump

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

* Fix branch name in versioning.js comment: 'main' → 'master' (#1346)

* Initial plan

* fix: update branch name in versioning.js comment from 'main' to 'master'

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

* Extend bump-version.js to update ?v= cache-busting hashes in public/**/*.js dynamic imports (#1347)

* Initial plan

* feat: extend bump-version.js to update ?v= hashes in public/**/*.js dynamic imports

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

* chore: merge base branch changes (package-lock.json sync, RELEASE_BOT_TOKEN, node 24.x, comment fix)

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

* Update scripts/bump-version.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/bump-version.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Co-authored-by: Azgaar <maxganiev@yandex.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: streamline dynamic import hash updates for public JS files

* refactor: enhance version bump detection using AI analysis of PR diffs

* Auto versioning (#1348)

* Initial plan

* fix: add ref to checkout step and stage public/**/*.js in bump workflow

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants