@pnpm/cli-meta
Advanced tools
Comparing version 1.0.1 to 1.0.2
# @pnpm/cli-meta | ||
## 1.0.2 | ||
### Patch Changes | ||
- 43de80034: Don't fail when the code is executed through piping to Node's stdin. | ||
## 1.0.1 | ||
@@ -4,0 +10,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path = require("path"); | ||
const loadJsonFile = require("load-json-file"); | ||
const path = require("path"); | ||
const defaultManifest = { | ||
@@ -10,11 +10,16 @@ name: 'unknown', | ||
let pkgJson; | ||
try { | ||
pkgJson = { | ||
...defaultManifest, | ||
...loadJsonFile.sync(path.join(path.dirname(require.main.filename), '../package.json')), | ||
}; | ||
} | ||
catch (err) { | ||
if (!require.main) { | ||
pkgJson = defaultManifest; | ||
} | ||
else { | ||
try { | ||
pkgJson = { | ||
...defaultManifest, | ||
...loadJsonFile.sync(path.join(path.dirname(require.main.filename), '../package.json')), | ||
}; | ||
} | ||
catch (err) { | ||
pkgJson = defaultManifest; | ||
} | ||
} | ||
const packageManager = { | ||
@@ -21,0 +26,0 @@ name: pkgJson.name, |
{ | ||
"name": "@pnpm/cli-meta", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Reads the metainfo of the currently running pnpm instance", | ||
@@ -12,6 +12,6 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=10.13" | ||
"node": ">=10.16" | ||
}, | ||
"scripts": { | ||
"lint": "tslint -c ../../tslint.json src/**/*.ts test/**/*.ts", | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts", | ||
"test": "pnpm run compile", | ||
@@ -32,4 +32,3 @@ "prepublishOnly": "pnpm run compile", | ||
"devDependencies": { | ||
"@pnpm/cli-meta": "link:", | ||
"@pnpm/types": "6.2.0" | ||
"@pnpm/types": "6.4.0" | ||
}, | ||
@@ -36,0 +35,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
3699
1
39