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

package-manager-detector

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-manager-detector - npm Package Compare versions

Comparing version 0.2.2 to 0.2.4

dist/shared/package-manager-detector.7e3dc703.d.cts

3

dist/commands.d.ts

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

import { c as AgentCommands, A as Agent, C as Command, R as ResolvedCommand, b as AgentCommandValue } from './shared/package-manager-detector.ca2fb30b.js';
import { c as AgentCommands, A as Agent, C as Command, R as ResolvedCommand, b as AgentCommandValue } from './shared/package-manager-detector.7e3dc703.js';

@@ -10,2 +10,3 @@ declare const COMMANDS: {

bun: AgentCommands;
deno: AgentCommands;
};

@@ -12,0 +13,0 @@ /**

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

import { A as Agent, a as AgentName } from './shared/package-manager-detector.ca2fb30b.js';
import { A as Agent, a as AgentName } from './shared/package-manager-detector.7e3dc703.js';

@@ -3,0 +3,0 @@ declare const AGENTS: Agent[];

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

import { D as DetectOptions, d as DetectResult } from './shared/package-manager-detector.ca2fb30b.js';
import { D as DetectOptions, d as DetectResult, a as AgentName } from './shared/package-manager-detector.7e3dc703.js';

@@ -15,3 +15,9 @@ /**

declare function detectSync(options?: DetectOptions): DetectResult | null;
/**
* Detects the package manager used in the running process.
*
* This method will check for `process.env.npm_config_user_agent`.
*/
declare function getUserAgent(): AgentName | null;
export { detect, detectSync };
export { detect, detectSync, getUserAgent };

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

export { COMMANDS, constructCommand, resolveCommand } from './commands.js';
export { AGENTS, INSTALL_PAGE, LOCKS } from './constants.js';
export { A as Agent, b as AgentCommandValue, c as AgentCommands, a as AgentName, C as Command, D as DetectOptions, d as DetectResult, R as ResolvedCommand } from './shared/package-manager-detector.ca2fb30b.js';
export { detect, detectSync } from './detect.js';
export { COMMANDS, constructCommand, resolveCommand } from './commands.js';
export { detect, detectSync, getUserAgent } from './detect.js';
export { A as Agent, b as AgentCommandValue, c as AgentCommands, a as AgentName, C as Command, D as DetectOptions, d as DetectResult, R as ResolvedCommand } from './shared/package-manager-detector.7e3dc703.js';
{
"name": "package-manager-detector",
"type": "module",
"version": "0.2.2",
"packageManager": "pnpm@9.12.0",
"version": "0.2.4",
"description": "Package manager detector",

@@ -55,21 +54,20 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

],
"devDependencies": {
"@antfu/eslint-config": "^3.9.1",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.9.0",
"bumpp": "^9.8.1",
"eslint": "^9.15.0",
"fs-extra": "^11.2.0",
"typescript": "^5.6.3",
"unbuild": "^2.0.0",
"vitest": "^2.1.5"
},
"scripts": {
"prepublishOnly": "npm run build",
"build": "unbuild",
"stub": "unbuild --stub",
"release": "bumpp && npm publish",
"release": "bumpp",
"lint": "eslint .",
"test": "vitest"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.1",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.5.0",
"bumpp": "^9.5.2",
"eslint": "^9.9.1",
"fs-extra": "^11.2.0",
"typescript": "^5.5.4",
"unbuild": "^2.0.0",
"vitest": "^2.0.5"
}
}
}

@@ -29,2 +29,4 @@ # package-manager-detector

To check the file system for which package manager is used:
```js

@@ -34,3 +36,3 @@ import { detect } from 'package-manager-detector/detect'

or sync version
or sync version:

@@ -41,4 +43,12 @@ ```js

or to get the currently running package manager:
```js
import { getUserAgent } from 'package-manager-detector/detect'
```
### CommonJS
To check the file system for which package manager is used:
```js

@@ -48,3 +58,3 @@ const { detect } = require('package-manager-detector/detect')

or sync version
or sync version:

@@ -55,2 +65,8 @@ ```js

or to get the currently running package manager:
```js
const { getUserAgent } = require('package-manager-detector/detect')
```
## Agents and Commands

@@ -78,4 +94,4 @@

```ts
import { resolveCommand } from 'package-manager-detector/commands'
import { detect } from 'package-manager-detector/detect'
import { resolveCommand } from 'package-manager-detector/commands'

@@ -82,0 +98,0 @@ const pm = await detect()

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