@antfu/install-pkg
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -117,6 +117,6 @@ var __defProp = Object.defineProperty; | ||
}; | ||
const run = async (fn, resolve, args) => { | ||
const run = async (fn, resolve2, args) => { | ||
activeCount++; | ||
const result = (async () => fn(...args))(); | ||
resolve(result); | ||
resolve2(result); | ||
try { | ||
@@ -128,4 +128,4 @@ await result; | ||
}; | ||
const enqueue = (fn, resolve, args) => { | ||
queue.enqueue(run.bind(void 0, fn, resolve, args)); | ||
const enqueue = (fn, resolve2, args) => { | ||
queue.enqueue(run.bind(void 0, fn, resolve2, args)); | ||
(async () => { | ||
@@ -138,4 +138,4 @@ await Promise.resolve(); | ||
}; | ||
const generator = (fn, ...args) => new Promise((resolve) => { | ||
enqueue(fn, resolve, args); | ||
const generator = (fn, ...args) => new Promise((resolve2) => { | ||
enqueue(fn, resolve2, args); | ||
}); | ||
@@ -308,2 +308,5 @@ Object.defineProperties(generator, { | ||
// src/install.ts | ||
import { existsSync } from "fs"; | ||
import process3 from "process"; | ||
import { resolve } from "path"; | ||
import { execa } from "execa"; | ||
@@ -322,2 +325,4 @@ async function installPackage(names, options = {}) { | ||
} | ||
if (agent === "pnpm" && existsSync(resolve(options.cwd ?? process3.cwd(), "pnpm-workspace.yaml"))) | ||
args.unshift("-w"); | ||
return execa( | ||
@@ -324,0 +329,0 @@ agent, |
{ | ||
"name": "@antfu/install-pkg", | ||
"type": "module", | ||
"version": "0.3.1", | ||
"packageManager": "pnpm@8.11.0", | ||
"version": "0.3.2", | ||
"packageManager": "pnpm@8.15.5", | ||
"description": "Install package programmatically.", | ||
@@ -42,12 +42,12 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.1.1", | ||
"@antfu/ni": "^0.21.11", | ||
"@types/node": "^20.10.0", | ||
"bumpp": "^9.2.0", | ||
"eslint": "^8.54.0", | ||
"esno": "^4.0.0", | ||
"@antfu/eslint-config": "^2.11.4", | ||
"@antfu/ni": "^0.21.12", | ||
"@types/node": "^20.11.30", | ||
"bumpp": "^9.4.0", | ||
"eslint": "^8.57.0", | ||
"esno": "^4.7.0", | ||
"find-up": "^7.0.0", | ||
"publint": "^0.2.5", | ||
"tsup": "^8.0.1", | ||
"typescript": "^5.3.2" | ||
"publint": "^0.2.7", | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.4.3" | ||
}, | ||
@@ -54,0 +54,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27012
711
0
7