You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

skip-local-postinstall

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skip-local-postinstall - npm Package Compare versions

Comparing version

to
1.0.3

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [1.0.3](https://github.com/tobua/skip-local-postinstall/compare/v1.0.2...v1.0.3) (2020-11-01)
### Bug Fixes
* **npm:** workaround to prevent error for missing variable in npm 7 ([c0c4ede](https://github.com/tobua/skip-local-postinstall/commit/c0c4edee76fd6fbf066c8086b620046f0f43bb26))
### [1.0.2](https://github.com/tobua/skip-local-postinstall/compare/v1.0.1...v1.0.2) (2020-09-05)

@@ -7,0 +14,0 @@

3

index.js
module.exports = () => {
const { INIT_CWD, PWD } = process.env
if (INIT_CWD === PWD || INIT_CWD.indexOf(PWD) === 0) {
if (!INIT_CWD || INIT_CWD === PWD || INIT_CWD.indexOf(PWD) === 0) {
console.info(`Skipping 'postinstall' on local install`)

@@ -5,0 +6,0 @@ process.exit(0)

{
"name": "skip-local-postinstall",
"version": "1.0.2",
"description": "Skips postinstall when installed locally.",
"version": "1.0.3",
"repository": "github:tobua/skip-local-postinstall",
"scripts": {
"build": "padua build",
"start": "padua watch"
},
"main": "./index.js",

@@ -13,2 +17,5 @@ "source": "./index.js",

],
"devDependencies": {
"padua": "^0.1.4"
},
"prettier": "padua/configuration/.prettierrc.json",

@@ -37,5 +44,2 @@ "eslintConfig": {

},
"devDependencies": {
"padua": "^0.0.8"
},
"engines": {

@@ -42,0 +46,0 @@ "node": ">= 13.2.0"

@@ -25,1 +25,3 @@ # skip-local-postinstall

Credits to Már Örlygsson for suggesting this on [Stackoverflow](https://stackoverflow.com/a/53239387/3185545s).
**Please note** that the environment variable used for this plugin has dissapeared in npm Version 7: [GitHub Issue in npm CLI Repository](https://github.com/npm/cli/issues/2033).