Extend bump-version.js to update ?v= cache-busting hashes in public/**/*.js dynamic imports#1347
Conversation
…ynamic imports Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
|
@copilot, resolve the conflic. |
…_TOKEN, node 24.x, comment fix) Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Resolved in
These are now combined with this PR's |
There was a problem hiding this comment.
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
updateIndexHtmlHashesto accept an explicitchangedFileslist 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 computechangedFilesonce and apply both hash updaters in both normal bump and--base-versionflows.
| 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 |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
* 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>
public/libs/**ingetAllPublicJsFiles()updatePublicJsDynamicImportHashes()💡 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.