parse-app-info
Advanced tools
Comparing version 2.0.0 to 2.0.1
"use strict"; | ||
const readPkgUp = require('read-pkg-up'); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
const LastCommitLog = require('last-commit-log'); // | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var readPkgUp = require('read-pkg-up'); | ||
var LastCommitLog = require('last-commit-log'); // | ||
// Information about the app. | ||
@@ -24,27 +28,27 @@ // | ||
function parseAppInfo() { | ||
const packageInfo = readPkgUp.sync(); | ||
const lastCommitLog = new LastCommitLog(); | ||
const { | ||
hash, | ||
gitTag | ||
} = lastCommitLog.getLastCommitSync(); | ||
const lastCommit = { | ||
hash | ||
var packageInfo = readPkgUp.sync(); | ||
var lastCommitLog = new LastCommitLog(); | ||
var _lastCommitLog$getLas = lastCommitLog.getLastCommitSync(), | ||
hash = _lastCommitLog$getLas.hash, | ||
gitTag = _lastCommitLog$getLas.gitTag; | ||
var lastCommit = { | ||
hash: hash | ||
}; | ||
if (gitTag) lastCommit.tag = gitTag; | ||
const { | ||
NODE_ENV, | ||
HOSTNAME | ||
} = process.env; | ||
return { | ||
var _process$env = process.env, | ||
NODE_ENV = _process$env.NODE_ENV, | ||
HOSTNAME = _process$env.HOSTNAME; | ||
return _objectSpread({ | ||
name: packageInfo.pkg.name, | ||
version: packageInfo.pkg.version, | ||
node: process.version, | ||
...lastCommit, | ||
node: process.version | ||
}, lastCommit, { | ||
environment: NODE_ENV || 'development', | ||
hostname: HOSTNAME || require('os').hostname(), | ||
pid: process.pid | ||
}; | ||
}); | ||
} | ||
module.exports = parseAppInfo; |
{ | ||
"name": "parse-app-info", | ||
"description": "parse information about an application process", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Philipp Kursawe <phil.kursawe@gmail.com> (https://pke.github.io)", | ||
@@ -25,11 +25,11 @@ "ava": { | ||
"last-commit-log": "^2.1.0", | ||
"read-pkg-up": "^4.0.0" | ||
"read-pkg-up": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.3.3", | ||
"@babel/preset-env": "^7.3.1", | ||
"@babel/cli": "^7.4.3", | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"@commitlint/cli": "latest", | ||
"@commitlint/config-conventional": "latest", | ||
"ava": "1.2.1", | ||
"ava": "1.4.1", | ||
"codecov": "latest", | ||
@@ -47,3 +47,3 @@ "cross-env": "latest", | ||
"remark-preset-github": "latest", | ||
"testdouble": "3.10.0", | ||
"testdouble": "3.11.0", | ||
"xo": "latest" | ||
@@ -90,13 +90,2 @@ }, | ||
"main": "lib/index.js", | ||
"nyc": { | ||
"check-coverage": true, | ||
"lines": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"reporter": [ | ||
"lcov", | ||
"html", | ||
"text" | ||
] | ||
}, | ||
"prettier": { | ||
@@ -103,0 +92,0 @@ "singleQuote": true, |
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
8345
44
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedread-pkg@5.2.0(transitive)
+ Addedread-pkg-up@5.0.0(transitive)
+ Addedtype-fest@0.6.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedload-json-file@4.0.0(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpath-type@3.0.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedread-pkg@3.0.0(transitive)
- Removedread-pkg-up@4.0.0(transitive)
- Removedstrip-bom@3.0.0(transitive)
Updatedread-pkg-up@^5.0.0