Comparing version 0.1.8 to 0.2.0
{ | ||
"name": "libyear", | ||
"version": "0.1.8", | ||
"version": "0.2.0", | ||
"description": "A simple measure of software dependency freshness", | ||
@@ -5,0 +5,0 @@ "author": "Joshua David <@jdanil>", |
@@ -11,3 +11,3 @@ # `libyear` | ||
- `drift` representing "dependency drift"; the time between the release of the currently used and latest (stable) available versions of a dependency. | ||
- `pulse` representing an indication of a dependency's activity; the time since the release of the latest available version of a dependency (including pre-release). | ||
- `pulse` representing "pulse check", an indication of a dependency's activity; the time since the release of the latest available version of a dependency (including pre-release). | ||
@@ -89,3 +89,3 @@ All metrics are measured in "libyears" and are calculated against dependencies both collectively and individually. | ||
### `--threshold-drift-collective` | ||
### `--threshold-drift-collective=<libyears>` (`-D=<libyears>`) | ||
@@ -96,3 +96,3 @@ Accepts a number. Default `null`. | ||
### `--threshold-drift-individual` | ||
### `--threshold-drift-individual=<libyears>` (`-d=<libyears>`) | ||
@@ -103,3 +103,3 @@ Accepts a number. Default `null`. | ||
### `--threshold-pulse-collective` | ||
### `--threshold-pulse-collective=<libyears>` (`-P=<libyears>`) | ||
@@ -110,3 +110,3 @@ Accepts a number. Default `null`. | ||
### `--threshold-pulse-individual` | ||
### `--threshold-pulse-individual=<libyears>` (`-p=<libyears>`) | ||
@@ -119,2 +119,4 @@ Accepts a number. Default `null`. | ||
- prettier logging | ||
- configure ci | ||
- handle `npm ls` UNMET PEER DEPENDENCY | ||
@@ -128,2 +130,4 @@ - fetch "latest" from dist-tags | ||
- unit tests | ||
- investigate possibility of batching queries | ||
- track upcoming alpha, beta, next versions | ||
@@ -130,0 +134,0 @@ ## Acknowledgements |
@@ -6,12 +6,21 @@ "use strict"; | ||
const package_manager_1 = require("./package-manager"); | ||
const validateThreshold = (threshold) => isNaN(Number(threshold)) ? null : Number(threshold); | ||
exports.cli = async () => { | ||
var _a; | ||
var _a, _b, _c, _d; | ||
// parse cli args | ||
const argv = process.argv.slice(2); | ||
const args = mri(argv); | ||
libyear_1.libyear(package_manager_1.getParsedPackageManager((_a = args["package-manager"]) !== null && _a !== void 0 ? _a : (await package_manager_1.getInferredPackageManager())), { | ||
driftCollective: args["threshold-drift-collective"], | ||
driftIndividual: args["threshold-drift-individual"], | ||
pulseCollective: args["threshold-pulse-collective"], | ||
pulseIndividual: args["threshold-pulse-individual"], | ||
// validate cli options | ||
const packageManager = args["package-manager"]; | ||
const driftCollective = validateThreshold((_a = args["threshold-drift-collective"]) !== null && _a !== void 0 ? _a : args["D"]); | ||
const driftIndividual = validateThreshold((_b = args["threshold-drift-individual"]) !== null && _b !== void 0 ? _b : args["d"]); | ||
const pulseCollective = validateThreshold((_c = args["threshold-pulse-collective"]) !== null && _c !== void 0 ? _c : args["P"]); | ||
const pulseIndividual = validateThreshold((_d = args["threshold-pulse-individual"]) !== null && _d !== void 0 ? _d : args["p"]); | ||
// run libyear | ||
libyear_1.libyear(package_manager_1.getParsedPackageManager(packageManager !== null && packageManager !== void 0 ? packageManager : (await package_manager_1.getInferredPackageManager())), { | ||
driftCollective, | ||
driftIndividual, | ||
pulseCollective, | ||
pulseIndividual, | ||
}); | ||
}; |
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
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
51700
27
266
133