mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: fix size comparison for slim files when the branch is dirty
Ref gh-5440
This commit is contained in:
parent
ae7f6139cc
commit
8a3a74c475
@ -109,7 +109,7 @@ export async function compareSize( { cache = ".sizecache.json", files } = {} ) {
|
|||||||
// Remove the short SHA and .dirty from comparisons.
|
// Remove the short SHA and .dirty from comparisons.
|
||||||
// The short SHA so commits can be compared against each other
|
// The short SHA so commits can be compared against each other
|
||||||
// and .dirty to compare with the existing branch during development.
|
// 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" ), "" );
|
contents = contents.replace( new RegExp( sha, "g" ), "" );
|
||||||
|
|
||||||
const size = Buffer.byteLength( contents, "utf8" );
|
const size = Buffer.byteLength( contents, "utf8" );
|
||||||
|
Loading…
Reference in New Issue
Block a user