aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywil@users.noreply.github.com>2024-03-10 12:19:58 -0400
committerTimmy Willison <timmywil@users.noreply.github.com>2024-03-11 13:29:23 -0400
commit8a3a74c475f92148675af4ee3f77e3d1746e6e88 (patch)
tree63a9e83dbaa6b9c4d36b7ff2b15a658f0e615188 /build
parentae7f6139cc8e21a7116e8de30d26ca38426bde0b (diff)
downloadjquery-8a3a74c475f92148675af4ee3f77e3d1746e6e88.tar.gz
jquery-8a3a74c475f92148675af4ee3f77e3d1746e6e88.zip
Build: fix size comparison for slim files when the branch is dirty
Ref gh-5440
Diffstat (limited to 'build')
-rw-r--r--build/tasks/compare_size.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/tasks/compare_size.mjs b/build/tasks/compare_size.mjs
index ea239fb27..554b1087a 100644
--- a/build/tasks/compare_size.mjs
+++ b/build/tasks/compare_size.mjs
@@ -109,7 +109,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\.|\+)?([^ \.]+(?:\.dirty)?)?/.exec( contents )[ 1 ];
contents = contents.replace( new RegExp( sha, "g" ), "" );
const size = Buffer.byteLength( contents, "utf8" );