Socket
Socket
Sign inDemoInstall

libnpmdiff

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnpmdiff - npm Package Compare versions

Comparing version 2.0.4 to 3.0.0

lib/index.js

14

lib/format-diff.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc