Socket
Socket
Sign inDemoInstall

@antfu/install-pkg

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antfu/install-pkg - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

4

dist/index.d.ts

@@ -1,2 +0,2 @@

import * as _jsdevtools_ez_spawn from '@jsdevtools/ez-spawn';
import * as tinyexec from 'tinyexec';

@@ -17,4 +17,4 @@ type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';

}
declare function installPackage(names: string | string[], options?: InstallPackageOptions): Promise<_jsdevtools_ez_spawn.Process<string>>;
declare function installPackage(names: string | string[], options?: InstallPackageOptions): Promise<tinyexec.Output>;
export { type Agent, type InstallPackageOptions, type PackageManager, detectPackageManager, installPackage };
var __defProp = Object.defineProperty;
var __typeError = (msg) => {
throw TypeError(msg);
};
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __accessCheck = (obj, member, msg) => {
if (!member.has(obj))
throw TypeError("Cannot " + msg);
};
var __privateGet = (obj, member, getter) => {
__accessCheck(obj, member, "read from private field");
return getter ? getter.call(obj) : member.get(obj);
};
var __privateAdd = (obj, member, value) => {
if (member.has(obj))
throw TypeError("Cannot add the same private member more than once");
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
};
var __privateSet = (obj, member, value, setter) => {
__accessCheck(obj, member, "write to private field");
setter ? setter.call(obj, value) : member.set(obj, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateWrapper = (obj, member, setter, getter) => ({

@@ -59,5 +45,5 @@ set _(value) {

constructor() {
__privateAdd(this, _head, void 0);
__privateAdd(this, _tail, void 0);
__privateAdd(this, _size, void 0);
__privateAdd(this, _head);
__privateAdd(this, _tail);
__privateAdd(this, _size);
this.clear();

@@ -309,3 +295,3 @@ }

import { resolve } from "path";
import { async as ezspawn } from "@jsdevtools/ez-spawn";
import { x } from "tinyexec";
async function installPackage(names, options = {}) {

@@ -325,3 +311,3 @@ const detectedAgent = options.packageManager || await detectPackageManager(options.cwd) || "npm";

args.unshift("-w");
return ezspawn(
return x(
agent,

@@ -335,4 +321,6 @@ [

{
stdio: options.silent ? "ignore" : "inherit",
cwd: options.cwd
nodeOptions: {
stdio: options.silent ? "ignore" : "inherit",
cwd: options.cwd
}
}

@@ -339,0 +327,0 @@ );

{
"name": "@antfu/install-pkg",
"type": "module",
"version": "0.3.3",
"version": "0.3.4",
"description": "Install package programmatically.",

@@ -38,15 +38,15 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

"dependencies": {
"@jsdevtools/ez-spawn": "^3.0.4"
"tinyexec": "^0.1.4"
},
"devDependencies": {
"@antfu/eslint-config": "^2.16.0",
"@antfu/ni": "^0.21.12",
"@types/node": "^20.12.7",
"bumpp": "^9.4.0",
"eslint": "^9.1.1",
"@antfu/eslint-config": "^2.25.1",
"@antfu/ni": "^0.22.1",
"@types/node": "^22.2.0",
"bumpp": "^9.4.2",
"eslint": "^9.9.0",
"esno": "^4.7.0",
"find-up": "^7.0.0",
"publint": "^0.2.7",
"tsup": "^8.0.2",
"typescript": "^5.4.5"
"publint": "^0.2.9",
"tsup": "^8.2.4",
"typescript": "^5.5.4"
},

@@ -53,0 +53,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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