Update scripts/bump-version.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Azgaar 2026-03-07 17:16:35 +01:00 committed by GitHub
parent ff42f711f4
commit 30665ff4c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -231,9 +231,14 @@ function updatePublicJsDynamicImportHashes(changedFiles, newVersion, dry) {
if (changedFiles.length === 0) {
console.log(" public/**/*.js (no changed public/*.js files detected)");
return;
}
const changedSet = new Set(changedFiles);
const replacement = `${quote}${relImportPath}?v=${newVersion}${quote}`;
// Only record and apply an update if the version actually changes
if (match === replacement) {
return match;
}
if (!updatedMap[relJsFile]) updatedMap[relJsFile] = [];
updatedMap[relJsFile].push(relImportPath);
return replacement;
const publicJsFiles = getAllPublicJsFiles();
const updatedMap = {};