Skip to content

Commit

Permalink
fix: pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Nov 3, 2023
1 parent 2f97847 commit e0db05a
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/package-managers/pnpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,6 @@ const npmConfigFromPnpmWorkspace = memoize(async (options: Options): Promise<Npm
return config
})

/**
* Spawn pnpm.
*
* @param args
* @param [npmOptions={}]
* @param [spawnOptions={}]
* @returns
*/
const spawnPnpm = async (
args: string | string[],
npmOptions: NpmOptions = {},
spawnOptions?: SpawnOptions,
): Promise<string> => {
const cmd = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'

const fullArgs = [
...(npmOptions.location === 'global' ? 'global' : []),
...(Array.isArray(args) ? args : [args]),
...(npmOptions.prefix ? `--prefix=${npmOptions.prefix}` : []),
]

return spawn(cmd, fullArgs, spawnOptions)
}

/** Fetches the list of all installed packages. */
export const list = async (options: Options = {}): Promise<Index<string | undefined>> => {
// use npm for local ls for completeness
Expand Down Expand Up @@ -136,5 +112,3 @@ export default async function spawnPnpm(
}

export { defaultPrefix, getPeerDependencies, packageAuthorChanged } from './npm'

export default spawnPnpm

0 comments on commit e0db05a

Please sign in to comment.