libnpmversion
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -19,3 +19,3 @@ const readJson = require('./read-json.js') | ||
log = proclog, | ||
message = 'v%s' | ||
message = 'v%s', | ||
} = opts | ||
@@ -40,4 +40,4 @@ | ||
log, | ||
message | ||
message, | ||
}) | ||
} |
@@ -12,3 +12,3 @@ // default logger. | ||
'pause', | ||
'resume' | ||
'resume', | ||
] | ||
@@ -15,0 +15,0 @@ |
@@ -5,3 +5,5 @@ const { spawn } = require('@npmcli/git') | ||
module.exports = async opts => { | ||
const tag = (await spawn(['describe', '--tags', '--abbrev=0', '--match=*.*.*'], opts)).stdout.trim() | ||
const tag = (await spawn( | ||
['describe', '--tags', '--abbrev=0', '--match=*.*.*'], | ||
opts)).stdout.trim() | ||
const ver = semver.coerce(tag, { loose: true }) | ||
@@ -8,0 +10,0 @@ if (ver) { |
@@ -8,3 +8,3 @@ const git = require('@npmcli/git') | ||
tagVersionPrefix, | ||
message | ||
message, | ||
} = opts | ||
@@ -29,4 +29,4 @@ | ||
message.replace(/%s/g, version), | ||
tag | ||
tag, | ||
], opts) | ||
} |
@@ -22,3 +22,3 @@ // called with all the options already set to their defaults | ||
pkg, | ||
log | ||
log, | ||
} = opts | ||
@@ -42,3 +42,3 @@ | ||
current, | ||
requested: newversion | ||
requested: newversion, | ||
}) | ||
@@ -51,3 +51,3 @@ } | ||
requested: newversion, | ||
newVersion: newV | ||
newVersion: newV, | ||
}) | ||
@@ -73,4 +73,4 @@ } | ||
npm_old_version: current, | ||
npm_new_version: newV | ||
} | ||
npm_new_version: newV, | ||
}, | ||
}) | ||
@@ -108,4 +108,4 @@ } | ||
npm_old_version: current, | ||
npm_new_version: newV | ||
} | ||
npm_new_version: newV, | ||
}, | ||
}) | ||
@@ -123,3 +123,5 @@ } | ||
await tag(newV, opts) | ||
} else { log.verbose('version', 'Not tagging: not in a git repo or no git cmd') } | ||
} else { | ||
log.verbose('version', 'Not tagging: not in a git repo or no git cmd') | ||
} | ||
@@ -135,4 +137,4 @@ if (!ignoreScripts) { | ||
npm_old_version: current, | ||
npm_new_version: newV | ||
} | ||
npm_new_version: newV, | ||
}, | ||
}) | ||
@@ -139,0 +141,0 @@ } |
@@ -10,3 +10,3 @@ // write the json back, preserving the line breaks and indent | ||
[kIndent]: indent = 2, | ||
[kNewline]: newline = '\n' | ||
[kNewline]: newline = '\n', | ||
} = pkg | ||
@@ -13,0 +13,0 @@ delete pkg._id |
{ | ||
"name": "libnpmversion", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib/*.js" | ||
"bin", | ||
"lib" | ||
], | ||
@@ -13,7 +14,6 @@ "description": "library to do the things that 'npm version' does", | ||
}, | ||
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", | ||
"author": "GitHub Inc.", | ||
"license": "ISC", | ||
"scripts": { | ||
"lint": "standard", | ||
"lint:fix": "standard --fix", | ||
"lint": "eslint '**/*.js'", | ||
"test": "tap", | ||
@@ -24,9 +24,6 @@ "posttest": "npm run lint", | ||
"postversion": "npm publish", | ||
"prepublishOnly": "git push origin --follow-tags" | ||
"prepublishOnly": "git push origin --follow-tags", | ||
"postlint": "npm-template-check", | ||
"lintfix": "npm run lint -- --fix" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"tap-snapshots" | ||
] | ||
}, | ||
"tap": { | ||
@@ -38,4 +35,3 @@ "coverage-map": "map.js", | ||
"require-inject": "^1.4.4", | ||
"standard": "^16.0.3", | ||
"tap": "^14.11.0" | ||
"tap": "^15" | ||
}, | ||
@@ -51,3 +47,6 @@ "dependencies": { | ||
"node": "^12.13.0 || ^14.15.0 || >=16" | ||
}, | ||
"templateOSS": { | ||
"version": "2.4.1" | ||
} | ||
} |
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
15031
2
278
1