File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ if (!dep) {
1515
1616process . chdir ( `./packages/${ dep } ` ) ;
1717
18- const localVersion = JSON . parse ( readFileSync ( `./package.json` , "utf-8" ) ) . version as string ;
18+ const localPackageJson = readFileSync ( `./package.json` , "utf-8" ) ;
19+ const localVersion = JSON . parse ( localPackageJson ) . version as string ;
1920const remoteVersion = execSync ( `npm view @huggingface/${ dep } version` ) . toString ( ) . trim ( ) ;
2021
2122if ( localVersion !== remoteVersion ) {
@@ -34,6 +35,10 @@ execSync(`mv huggingface-${dep}-${remoteVersion}.tgz ${dep}-remote.tgz`);
3435execSync ( `rm -Rf local && mkdir local && tar -xf ${ dep } -local.tgz -C local` ) ;
3536execSync ( `rm -Rf remote && mkdir remote && tar -xf ${ dep } -remote.tgz -C remote` ) ;
3637
38+ // Remove package.json files because they're modified by npm
39+ execSync ( `rm local/package/package.json` ) ;
40+ execSync ( `rm remote/package/package.json` ) ;
41+
3742try {
3843 execSync ( "diff --brief -r local remote" ) . toString ( ) ;
3944} catch ( e ) {
You can’t perform that action at this time.
0 commit comments