Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capgo/find-package-manager

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/find-package-manager - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

index.d.ts

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

export function findPackageManagerType (path?: string): 'yarn' | 'npm' | 'pnpm' | 'unknown';
export function findPackageManagerType (path?: string): 'yarn' | 'npm' | 'bun' | 'pnpm' | 'unknown';

@@ -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
```
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