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

@antfu/ni

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antfu/ni - npm Package Compare versions

Comparing version 0.22.3 to 0.22.4

dist/shared/ni.2a9c95e9.mjs

103

dist/index.d.ts

@@ -1,6 +0,89 @@

import { Agent as Agent$1, Command } from 'package-manager-detector/agents';
export { AGENTS, Agent, COMMANDS, Command, INSTALL_PAGE, LOCKS } from 'package-manager-detector/agents';
import { Agent } from 'package-manager-detector';
import { Buffer } from 'node:buffer';
declare const AGENTS: {
npm: {
agent: string;
run: (args: string[]) => string;
install: string;
frozen: string;
global: string;
add: string;
upgrade: string;
'upgrade-interactive': null;
execute: string;
uninstall: string;
global_uninstall: string;
};
yarn: {
agent: string;
run: string;
install: string;
frozen: string;
global: string;
add: string;
upgrade: string;
'upgrade-interactive': string;
execute: string;
uninstall: string;
global_uninstall: string;
};
'yarn@berry': {
frozen: string;
upgrade: string;
'upgrade-interactive': string;
execute: string;
global: string;
global_uninstall: string;
agent: string;
run: string;
install: string;
add: string;
uninstall: string;
};
pnpm: {
agent: string;
run: string;
install: string;
frozen: string;
global: string;
add: string;
upgrade: string;
'upgrade-interactive': string;
execute: string;
uninstall: string;
global_uninstall: string;
};
'pnpm@6': {
run: (args: string[]) => string;
agent: string;
install: string;
frozen: string;
global: string;
add: string;
upgrade: string;
'upgrade-interactive': string;
execute: string;
uninstall: string;
global_uninstall: string;
};
bun: {
agent: string;
run: string;
install: string;
frozen: string;
global: string;
add: string;
upgrade: string;
'upgrade-interactive': string;
execute: string;
uninstall: string;
global_uninstall: string;
};
};
type Agent = keyof typeof AGENTS;
type Command = keyof typeof AGENTS.npm;
declare const agents: Agent[];
declare const LOCKS: Record<string, Agent>;
declare const INSTALL_PAGE: Record<Agent, string>;
interface Config {

@@ -11,4 +94,4 @@ defaultAgent: Agent | 'prompt';

declare function getConfig(): Promise<Config>;
declare function getDefaultAgent(programmatic?: boolean): Promise<"npm" | "yarn" | "yarn@berry" | "pnpm" | "pnpm@6" | "bun" | "prompt">;
declare function getGlobalAgent(): Promise<"npm" | "yarn" | "yarn@berry" | "pnpm" | "pnpm@6" | "bun">;
declare function getDefaultAgent(programmatic?: boolean): Promise<"npm" | "pnpm" | "yarn" | "yarn@berry" | "pnpm@6" | "bun" | "prompt">;
declare function getGlobalAgent(): Promise<"npm" | "pnpm" | "yarn" | "yarn@berry" | "pnpm@6" | "bun">;

@@ -20,3 +103,3 @@ interface DetectOptions {

}
declare function detect({ autoInstall, programmatic, cwd }?: DetectOptions): Promise<"npm" | "yarn" | "yarn@berry" | "pnpm" | "pnpm@6" | "bun" | null>;
declare function detect({ autoInstall, programmatic, cwd }?: DetectOptions): Promise<"npm" | "pnpm" | "yarn" | "yarn@berry" | "pnpm@6" | "bun" | null>;

@@ -28,3 +111,3 @@ interface RunnerContext {

}
type Runner = (agent: Agent$1, args: string[], ctx?: RunnerContext) => Promise<string | undefined> | string | undefined;
type Runner = (agent: Agent, args: string[], ctx?: RunnerContext) => Promise<string | undefined> | string | undefined;
declare function runCli(fn: Runner, options?: DetectOptions & {

@@ -38,7 +121,7 @@ args?: string[];

constructor({ agent, command }: {
agent: Agent$1;
agent: Agent;
command: Command;
});
}
declare function getCommand(agent: Agent$1, command: Command, args?: string[]): string;
declare function getCommand(agent: Agent, command: Command, args?: string[]): string;
declare const parseNi: Runner;

@@ -63,2 +146,2 @@ declare const parseNr: Runner;

export { CLI_TEMP_DIR, type DetectOptions, type Runner, type RunnerContext, UnsupportedCommand, cmdExists, detect, exclude, formatPackageWithUrl, getCliCommand, getCommand, getConfig, getDefaultAgent, getGlobalAgent, getVoltaPrefix, limitText, parseNa, parseNi, parseNlx, parseNr, parseNu, parseNun, remove, run, runCli, writeFileSafe };
export { AGENTS, type Agent, CLI_TEMP_DIR, type Command, type DetectOptions, INSTALL_PAGE, LOCKS, type Runner, type RunnerContext, UnsupportedCommand, agents, cmdExists, detect, exclude, formatPackageWithUrl, getCliCommand, getCommand, getConfig, getDefaultAgent, getGlobalAgent, getVoltaPrefix, limitText, parseNa, parseNi, parseNlx, parseNr, parseNu, parseNun, remove, run, runCli, writeFileSafe };

20

package.json
{
"name": "@antfu/ni",
"type": "module",
"version": "0.22.3",
"version": "0.22.4",
"packageManager": "pnpm@9.7.0",

@@ -50,7 +50,4 @@ "description": "Use the right package manager",

},
"dependencies": {
"package-manager-detector": "^0.1.1"
},
"devDependencies": {
"@antfu/eslint-config": "^2.25.1",
"@antfu/eslint-config": "^2.25.0",
"@jsdevtools/ez-spawn": "^3.0.4",

@@ -60,13 +57,14 @@ "@posva/prompts": "^2.4.4",

"@types/ini": "^4.1.1",
"@types/node": "^22.3.0",
"@types/node": "^22.1.0",
"@types/which": "^3.0.4",
"bumpp": "^9.5.1",
"eslint": "^9.9.0",
"bumpp": "^9.4.2",
"eslint": "^9.8.0",
"fast-glob": "^3.3.2",
"find-up": "^6.3.0",
"fs-extra": "^11.2.0",
"fzf": "^0.5.2",
"ini": "^4.1.3",
"picocolors": "^1.0.1",
"taze": "^0.16.5",
"kleur": "^4.1.5",
"taze": "^0.16.3",
"terminal-link": "^3.0.0",
"tinyglobby": "^0.2.2",
"tsx": "^4.17.0",

@@ -73,0 +71,0 @@ "typescript": "^5.5.4",

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

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