We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34b6a46 commit b68fe2eCopy full SHA for b68fe2e
1 file changed
lib/package.js
@@ -969,8 +969,13 @@ export default class Package {
969
970
// working tree is dirty
971
if ( res.data.isDirty ) {
972
- if ( res.data.files[ "package-lock.json" ] ) commitFiles.push( "package-lock.json" );
973
- if ( res.data.files[ "npm-shrinkwrap.json" ] ) commitFiles.push( "npm-shrinkwrap.json" );
+ for ( const lockFile of [ "package-lock.json", "npm-shrinkwrap.json" ] ) {
+ const lockFilePath = this.rootSlug
974
+ ? this.rootSlug + "/" + lockFile
975
+ : lockFile;
976
+
977
+ if ( res.data.files[ lockFilePath ] ) commitFiles.push( lockFile );
978
+ }
979
}
980
981
// dependencies locks was not updated
0 commit comments