diff --git a/build/tasks/lib/compareSize.js b/build/tasks/lib/compareSize.js index 008f91151..978881cfc 100644 --- a/build/tasks/lib/compareSize.js +++ b/build/tasks/lib/compareSize.js @@ -5,7 +5,7 @@ import { exec as nodeExec } from "node:child_process"; import chalk from "chalk"; import isCleanWorkingDir from "./isCleanWorkingDir.js"; -const VERSION = 1; +const VERSION = 2; const lastRunBranch = " last run"; const gzip = promisify( zlib.gzip ); @@ -111,7 +111,7 @@ export async function compareSize( { cache = ".sizecache.json", files } = {} ) { // Remove the short SHA and .dirty from comparisons. // The short SHA so commits can be compared against each other // and .dirty to compare with the existing branch during development. - const sha = /jQuery v\d+.\d+.\d+(?:-\w+)?(?:\+slim\.|\+)?([^ \.]+(?:\.dirty)?)?/.exec( contents )[ 1 ]; + const sha = /jQuery v\d+.\d+.\d+(?:-[\w\.]+)?(?:\+slim\.|\+)?(\w+(?:\.dirty)?)?/.exec( contents )[ 1 ]; contents = contents.replace( new RegExp( sha, "g" ), "" ); const size = Buffer.byteLength( contents, "utf8" );