Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-app-info

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-app-info - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

40

lib/index.js
"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,

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