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

package-manager-manager

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-manager-manager - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1-1cfd3b9

5

index.js

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

import { getPackageManager as h } from "./packageManager.js";
import { getPackageManager as d } from "./packageManager.js";
import "shellac";

@@ -13,3 +13,2 @@ import "./commands/getRunScript.js";

import "./package/npm.js";
import "./package/shared.js";
import "./package/pnpm.js";

@@ -20,4 +19,4 @@ import "./package/yarn.js";

export {
h as getPackageManager
d as getPackageManager
};
//# sourceMappingURL=index.js.map
{
"name": "package-manager-manager",
"version": "0.1.0",
"version": "0.1.1-1cfd3b9",
"description": "Utilities for managing package managers.",

@@ -54,2 +54,5 @@ "license": "MIT",

},
"versionMetadata": {
"type": "BETA"
},
"scripts": {

@@ -56,0 +59,0 @@ "build": "vite build",

17

package/index.js
import { getBunGetPackageInfoFunction as n } from "./bun.js";
import { getNpmGetPackageInfoFunction as o } from "./npm.js";
import { getPnpmGetPackageInfoFunction as r } from "./pnpm.js";
import { getYarnGetPackageInfoFunction as e } from "./yarn.js";
import { getNpmGetPackageInfoFunction as e } from "./npm.js";
import { getPnpmGetPackageInfoFunction as o } from "./pnpm.js";
import { getYarnGetPackageInfoFunction as r } from "./yarn.js";
import "shellac";
import "./shared.js";
import "node:fs/promises";

@@ -12,10 +11,10 @@ import "node:path";

import "../utils/yarn.js";
function I(t) {
function F(t) {
switch (t.name) {
case "npm":
return e();
case "pnpm":
return o();
case "pnpm":
return r();
case "yarn":
return e(t);
return r(t);
case "bun":

@@ -28,4 +27,4 @@ return n();

export {
I as getPackageInfoFunction
F as getPackageInfoFunction
};
//# sourceMappingURL=index.js.map

@@ -1,5 +0,3 @@

export declare function getNpmGetPackageInfoFunction(): (packageName: string) => Promise<{
name: string;
version: string;
} | null>;
import type { GetPackageInfo } from './index';
export declare function getNpmGetPackageInfoFunction(): (packageName: string) => ReturnType<GetPackageInfo>;
//# sourceMappingURL=npm.d.ts.map

@@ -1,9 +0,16 @@

import { getNpmOrPnpmGetPackageInfoFunction as n } from "./shared.js";
import "shellac";
function e() {
return n("npm");
import s from "shellac";
function p() {
return async (...[t]) => {
var n, e;
try {
const c = (await s`$ npm list --depth=0 --json`).stdout, o = JSON.parse(c), r = ((n = o.dependencies) == null ? void 0 : n[t]) ?? ((e = o.devDependencies) == null ? void 0 : e[t]);
return r ? { name: t, version: r.version } : null;
} catch {
throw new Error(`An error occurred while gathering the package info of "${t}"`);
}
};
}
export {
e as getNpmGetPackageInfoFunction
p as getNpmGetPackageInfoFunction
};
//# sourceMappingURL=npm.js.map

@@ -1,5 +0,3 @@

export declare function getPnpmGetPackageInfoFunction(): (packageName: string) => Promise<{
name: string;
version: string;
} | null>;
import type { GetPackageInfo } from './index';
export declare function getPnpmGetPackageInfoFunction(): (packageName: string) => ReturnType<GetPackageInfo>;
//# sourceMappingURL=pnpm.d.ts.map

@@ -1,9 +0,15 @@

import { getNpmOrPnpmGetPackageInfoFunction as n } from "./shared.js";
import "shellac";
function e() {
return n("pnpm");
import c from "shellac";
function s() {
return async (...[t]) => {
try {
const e = (await c`$ pnpm list --depth=0`).stdout, o = new RegExp(`^${t}\\s+(.*)$`, "im"), r = e.match(o), n = r == null ? void 0 : r[1];
return n ? { name: t, version: n } : null;
} catch {
throw new Error(`An error occurred while gathering the package info of "${t}"`);
}
};
}
export {
e as getPnpmGetPackageInfoFunction
s as getPnpmGetPackageInfoFunction
};
//# sourceMappingURL=pnpm.js.map

@@ -14,3 +14,2 @@ import p from "shellac";

import "./package/npm.js";
import "./package/shared.js";
import "./package/pnpm.js";

@@ -22,3 +21,3 @@ import "./package/yarn.js";

}
async function N() {
async function h() {
const n = await S();

@@ -43,4 +42,4 @@ if (!n)

t.cliCommandKeywords = k(t), t.getPackageInfo = R({ name: a, version: r });
const { getRunScript: u, getRunScriptStruct: m } = l(t), { getRunExec: g, getRunExecStruct: s } = f(t);
return t.getRunScript = u, t.getRunScriptStruct = m, t.getRunExec = g, t.getRunExecStruct = s, t;
const { getRunScript: u, getRunScriptStruct: g } = l(t), { getRunExec: m, getRunExecStruct: s } = f(t);
return t.getRunScript = u, t.getRunScriptStruct = g, t.getRunExec = m, t.getRunExecStruct = s, t;
}

@@ -51,4 +50,4 @@ }

export {
N as getPackageManager
h as getPackageManager
};
//# sourceMappingURL=packageManager.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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