You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

napi-postinstall

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

napi-postinstall - npm Package Compare versions

Comparing version
0.1.3
to
0.1.4
+3
-1
lib/cli.js

@@ -5,3 +5,5 @@ #!/usr/bin/env node

const index_js_1 = require("./index.js");
void (0, index_js_1.checkAndPreparePackage)(process.argv[2], ['1', 'check', 'true', 'yes'].includes(process.argv[3]));
if ((0, index_js_1.isNpm)()) {
void (0, index_js_1.checkAndPreparePackage)(process.argv[2], ['1', 'check', 'true', 'yes'].includes(process.argv[3]));
}
//# sourceMappingURL=cli.js.map
import type { PackageJson } from './types.js';
export type * from './target.js';
export type * from './types.js';
export declare function isNpm(): boolean;
export declare function checkAndPreparePackage(packageNameOrPackageJson: PackageJson | string, checkVersion?: boolean): Promise<void>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNpm = isNpm;
exports.checkAndPreparePackage = checkAndPreparePackage;

@@ -4,0 +5,0 @@ const node_child_process_1 = require("node:child_process");

{
"name": "napi-postinstall",
"version": "0.1.3",
"version": "0.1.4",
"type": "commonjs",

@@ -5,0 +5,0 @@ "description": "The `postinstall` script helper for handling native bindings in legacy `npm` versions",

@@ -93,5 +93,7 @@ # napi-postinstall

```js
import { checkAndPreparePackage } from 'napi-postinstall'
import { checkAndPreparePackage, isNpm } from 'napi-postinstall'
checkAndPreparePackage('unrs-resolver' /* <napi-package-name> */)
if (isNpm()) {
checkAndPreparePackage('unrs-resolver' /* <napi-package-name> */)
}
```

@@ -98,0 +100,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet