@capgo/find-package-manager
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,1 +0,1 @@ | ||
export function findPackageManagerType (path?: string): 'yarn' | 'npm' | 'pnpm' | 'unknown'; | ||
export function findPackageManagerType (path?: string): 'yarn' | 'npm' | 'bun' | 'pnpm' | 'unknown'; |
10
main.js
@@ -1,6 +0,11 @@ | ||
const { existsSync } = require('fs'); | ||
exports.findPackageManagerType = (path = '.') => { | ||
import { existsSync } from 'fs'; | ||
export const findPackageManagerType = (path = '.') => { | ||
const bunPath = `${path}/bun.lockb`; | ||
const pnpmPath = `${path}/pnpm-lock.yaml`; | ||
const yarnPath = `${path}/yarn.lock`; | ||
const npmPath = `${path}/package-lock.json`; | ||
if (existsSync(bunPath)) { | ||
return 'bun' | ||
} | ||
if (existsSync(pnpmPath)) { | ||
@@ -17,1 +22,2 @@ return 'pnpm' | ||
} | ||
console.log('findPackageManagerType', findPackageManagerType()) |
{ | ||
"name": "@capgo/find-package-manager", | ||
"type": "module", | ||
"public": true, | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"license": "MIT", | ||
@@ -6,0 +7,0 @@ "description": "Live update for capacitor apps", |
@@ -9,3 +9,3 @@ # Find Package Manager Type | ||
console.log(findPackageManagerType()) // npm | yarn | pnpm | unknown | ||
console.log(findPackageManagerType()) // npm | yarn | pnpm | bun | unknown | ||
``` |
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
1683
22
Yes