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.0.0 to 0.1.0

2

dist/index.d.ts

@@ -11,2 +11,4 @@ import execa from 'execa';

packageManager?: string;
preferOffline?: boolean;
additionalArgs?: string[];
}

@@ -13,0 +15,0 @@ declare function installPackage(names: string | string[], options?: InstallPackageOptions): Promise<execa.ExecaReturnValue<string>>;

@@ -51,5 +51,9 @@ var __create = Object.create;

names = [names];
const args = options.additionalArgs || [];
if (options.preferOffline)
args.unshift("--prefer-offline");
return (0, import_execa.default)(agent, [
agent === "yarn" ? "add" : "install",
options.dev ? "-D" : "",
...args,
...names

@@ -56,0 +60,0 @@ ].filter(Boolean), {

21

package.json
{
"name": "@antfu/install-pkg",
"version": "0.0.0",
"version": "0.1.0",
"description": "Install package programmatically.",

@@ -30,11 +30,2 @@ "main": "dist/index.js",

],
"scripts": {
"prepublishOnly": "nr build",
"dev": "nr build --watch",
"start": "esno src/index.ts",
"build": "tsup src/index.ts --format cjs,esm --dts --no-splitting",
"release": "bumpp --commit --push --tag && pnpm publish",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "nr lint -- --fix"
},
"devDependencies": {

@@ -53,3 +44,11 @@ "@antfu/eslint-config": "^0.7.0",

"find-up": "^5.0.0"
},
"scripts": {
"dev": "nr build --watch",
"start": "esno src/index.ts",
"build": "tsup src/index.ts --format cjs,esm --dts --no-splitting",
"release": "bumpp --commit --push --tag && pnpm publish",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "nr lint -- --fix"
}
}
}

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