diff --git a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js index 72c51df7ff13..2bdd82af2402 100644 --- a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js +++ b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js @@ -1236,7 +1236,7 @@ function publish( pkg, clbk ) { escaped = replace( dep, '@', '\\@' ); escaped = replace( escaped, '/', '\\/' ); command = [ - 'if ! find lib test -name "*.js" -exec grep -q "'+escaped+'" {} + && ! grep -q -s "'+escaped+'" manifest.json && ! grep -q -s "'+escaped+'" include.gypi; then', + 'if ! find lib -name "*.js" -exec grep -q "'+escaped+'" {} + && ! grep -q -s "'+escaped+'" manifest.json && ! grep -q -s "'+escaped+'" include.gypi; then', ' printf "false"', 'else', ' printf "true"', @@ -1256,7 +1256,7 @@ function publish( pkg, clbk ) { escaped = replace( dep, '@', '\\@' ); escaped = replace( escaped, '/', '\\/' ); command = [ - 'if ! find lib test -name "*.js" -exec grep -q "'+escaped+'" {} + && ! grep -q -s "'+escaped+'" manifest.json && ! grep -q -s "'+escaped+'" include.gypi; then', + 'if ! find lib -name "*.js" -exec grep -q "'+escaped+'" {} + && ! grep -q -s "'+escaped+'" manifest.json && ! grep -q -s "'+escaped+'" include.gypi; then', ' printf "false"', 'else', ' printf "true"', @@ -1283,6 +1283,8 @@ function publish( pkg, clbk ) { command = 'find . -type f -name \'*.md\' -print0 | xargs -0 perl -0777 -i -pe "s/\\`\\`\\`\n\nAlternatively,[^<]+<\\/section>/\\`\\`\\`\n\n<\\/section>/"'; shell( command, opts ); + // Set `scripts` field to an empty object: + pkgJSON.scripts = {}; writeFileSync( pkgJsonPath, JSON.stringify( pkgJSON, null, ' ' ).concat( '\n' ) ); shell( 'npm publish --access public', opts );