libnpmdiff
Advanced tools
Comparing version 2.0.4 to 3.0.0
@@ -33,4 +33,5 @@ const EOL = '\n' | ||
if (contents.a === contents.b && modes.a === modes.b) | ||
if (contents.a === contents.b && modes.a === modes.b) { | ||
continue | ||
} | ||
@@ -51,10 +52,10 @@ if (opts.diffNameOnly) { | ||
header(`diff --git ${names.a} ${names.b}`) | ||
if (modes.a === modes.b) | ||
if (modes.a === modes.b) { | ||
fileMode = filenames.a.mode | ||
else { | ||
if (modes.a && !modes.b) | ||
} else { | ||
if (modes.a && !modes.b) { | ||
header(`deleted file mode ${modes.a}`) | ||
else if (!modes.a && modes.b) | ||
} else if (!modes.a && modes.b) { | ||
header(`new file mode ${modes.b}`) | ||
else { | ||
} else { | ||
header(`old mode ${modes.a}`) | ||
@@ -64,2 +65,3 @@ header(`new mode ${modes.b}`) | ||
} | ||
/* eslint-disable-next-line max-len */ | ||
header(`index ${opts.tagVersionPrefix || 'v'}${versions.a}..${opts.tagVersionPrefix || 'v'}${versions.b} ${fileMode}`) | ||
@@ -66,0 +68,0 @@ |
@@ -8,4 +8,5 @@ const { basename, extname } = require('path') | ||
const shouldPrintPatch = (path, opts = {}) => { | ||
if (opts.diffText) | ||
if (opts.diffText) { | ||
return true | ||
} | ||
@@ -12,0 +13,0 @@ const filename = basename(path) |
@@ -27,4 +27,5 @@ const { relative } = require('path') | ||
if (fromNodeModules) | ||
if (fromNodeModules) { | ||
return nodeModulesTarball(manifest, opts) | ||
} | ||
@@ -31,0 +32,0 @@ return pacote.tarball(manifest._resolved, opts) |
{ | ||
"name": "libnpmdiff", | ||
"version": "2.0.4", | ||
"version": "3.0.0", | ||
"description": "The registry diff", | ||
"repository": "https://github.com/npm/libnpmdiff", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"index.js", | ||
"bin", | ||
"lib" | ||
], | ||
"engines": { | ||
"node": ">=10" | ||
"node": "^12.13.0 || ^14.15.0 || >=16" | ||
}, | ||
@@ -31,10 +32,11 @@ "keywords": [ | ||
"eslint": "eslint", | ||
"lint": "npm run eslint -- index.js \"lib/**/*.js\" \"test/*.js\"", | ||
"lint": "eslint '**/*.js'", | ||
"lintfix": "npm run lint -- --fix", | ||
"test": "tap test/*.js", | ||
"test": "tap", | ||
"posttest": "npm run lint", | ||
"snap": "tap test/*.js", | ||
"snap": "tap", | ||
"preversion": "npm test", | ||
"postversion": "npm publish", | ||
"prepublishOnly": "git push origin --follow-tags" | ||
"prepublishOnly": "git push origin --follow-tags", | ||
"postlint": "npm-template-check" | ||
}, | ||
@@ -44,14 +46,5 @@ "tap": { | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"/tap-snapshots/" | ||
] | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.18.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"tap": "^14.11.0" | ||
"eslint": "^8.1.0", | ||
"tap": "^15.0.9" | ||
}, | ||
@@ -64,6 +57,9 @@ "dependencies": { | ||
"minimatch": "^3.0.4", | ||
"npm-package-arg": "^8.1.1", | ||
"pacote": "^11.3.0", | ||
"npm-package-arg": "^8.1.4", | ||
"pacote": "^12.0.0", | ||
"tar": "^6.1.0" | ||
}, | ||
"templateOSS": { | ||
"version": "2.4.1" | ||
} | ||
} |
@@ -64,3 +64,3 @@ # libnpmdiff | ||
All participants and maintainers in this project are expected to follow the | ||
[npm Code of Conduct](https://www.npmjs.com/policies/conduct), and just | ||
[npm Code of Conduct](https://docs.npmjs.com/policies/conduct), and just | ||
generally be excellent to each other. | ||
@@ -67,0 +67,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
264
13537
8
1
+ Added@npmcli/fs@2.1.2(transitive)
+ Added@npmcli/move-file@2.0.1(transitive)
+ Added@npmcli/run-script@2.0.0(transitive)
+ Added@tootallnate/once@2.0.0(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedaproba@2.0.0(transitive)
+ Addedare-we-there-yet@3.0.1(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcacache@16.1.3(transitive)
+ Addedcolor-support@1.1.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedgauge@4.0.4(transitive)
+ Addedglob@8.1.0(transitive)
+ Addedhttp-proxy-agent@5.0.0(transitive)
+ Addedignore-walk@4.0.1(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedlru-cache@7.18.3(transitive)
+ Addedmake-fetch-happen@10.2.1(transitive)
+ Addedminimatch@5.1.6(transitive)
+ Addedminipass-fetch@2.1.2(transitive)
+ Addednode-gyp@8.4.1(transitive)
+ Addednpm-packlist@3.0.0(transitive)
+ Addednpm-registry-fetch@12.0.2(transitive)
+ Addednpmlog@6.0.2(transitive)
+ Addedpacote@12.0.3(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsocks-proxy-agent@7.0.0(transitive)
+ Addedssri@9.0.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedunique-filename@2.0.1(transitive)
+ Addedunique-slug@3.0.0(transitive)
- Removed@npmcli/run-script@1.8.6(transitive)
- Removedajv@6.12.6(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.21.0.3(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgauge@2.7.4(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedignore-walk@3.0.4(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-gyp@7.1.2(transitive)
- Removednpm-packlist@2.2.2(transitive)
- Removednpm-registry-fetch@11.0.0(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedpacote@11.3.5(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpsl@1.9.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
Updatednpm-package-arg@^8.1.4
Updatedpacote@^12.0.0