Skip to content

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

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

Extend bump-version.js to update ?v= cache-busting hashes in public/**/*.js dynamic imports#1347
Azgaar merged 6 commits intoauto-versioningfrom
copilot/sub-pr-1344-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

  • Analyze conflict: base branch changes merged
  • Fix corrupted scripts/bump-version.js — review suggestion snippets were injected at incorrect positions, breaking the file
  • Apply review suggestion 1: skip public/libs/** in getAllPublicJsFiles()
  • Apply review suggestion 2: skip write/log when version is already up-to-date in updatePublicJsDynamicImportHashes()
  • Apply review suggestion 3: update log message when skipping version increment to mention both index.html and public/**/*.js

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI mentioned this pull request Mar 7, 2026
7 tasks
…ynamic imports

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply feedback on auto versioning implementation Extend bump-version.js to update ?v= cache-busting hashes in public/**/*.js dynamic imports Mar 7, 2026
@Azgaar Azgaar marked this pull request as ready for review March 7, 2026 16:08
Copilot AI review requested due to automatic review settings March 7, 2026 16:08
@Azgaar
Copy link
Copy Markdown
Owner

Azgaar commented Mar 7, 2026

@copilot, resolve the conflic.

…_TOKEN, node 24.x, comment fix)

Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 7, 2026

@copilot, resolve the conflic.

Resolved in af84dfe. Merged all changes from the base branch (auto-versioning) that had diverged:

These are now combined with this PR's updatePublicJsDynamicImportHashes() changes.

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

Extends the repository’s version-bump automation (scripts/bump-version.js) to also refresh cache-busting ?v= query params found in dynamic import() calls inside public/**/*.js, closing a gap where only src/index.html hashes were updated.

Changes:

  • Refactors updateIndexHtmlHashes to accept an explicit changedFiles list rather than computing it internally.
  • Adds a recursive public/ JS enumerator and a new updater that rewrites ?v= in relative-path dynamic imports that target changed files.
  • Updates main() to compute changedFiles once and apply both hash updaters in both normal bump and --base-version flows.

Comment thread scripts/bump-version.js Outdated
Comment thread scripts/bump-version.js Outdated
Comment thread scripts/bump-version.js
Comment on lines 279 to 282
const dry = args.includes("--dry-run");

// --base-version X.Y.Z — version on master before this PR was merged.
// When provided, the script checks whether the developer already bumped
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The log line says "Skipping version increment — updating ?v= hashes only", but this code path now updates both src/index.html hashes and public/**/*.js dynamic-import hashes. Updating the message to reflect the additional work would avoid confusion when running the script.

Copilot uses AI. Check for mistakes.
Azgaar and others added 2 commits March 7, 2026 17:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Azgaar
Copy link
Copy Markdown
Owner

Azgaar commented Mar 7, 2026

@copilot apply changes based on the comments in this thread

@Azgaar Azgaar merged commit 9a92a48 into auto-versioning Mar 7, 2026
2 checks passed
@Azgaar Azgaar deleted the copilot/sub-pr-1344-another-one branch March 7, 2026 16:21
Copilot stopped work on behalf of Azgaar due to an error March 7, 2026 16:21
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