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.1.4 to 0.2.0

dist/chunk.6RKVY3EL.js

35

dist/ni.js
"use strict";
var _chunk6RKVY3ELjs = require('./chunk.6RKVY3EL.js');
var _chunkTJVZCJ4Ujs = require('./chunk.TJVZCJ4U.js');
// src/utils.ts
function exclude(arr, v) {
const clone = [...arr];
const index = clone.indexOf(v);
if (index >= 0)
clone.splice(index, 1);
return clone;
}
var _chunkDCYP2JXBjs = require('./chunk.DCYP2JXB.js');
// src/commands.ts
function parseNi(agent, _args) {
let command = "install";
let args = [];
if (_args.length === 0) {
command = "install";
args = [];
} else if (_args.includes("-g")) {
command = "global";
args = exclude(_args, "-g");
} else if (_args.includes("--frozen")) {
command = "frozen";
args = exclude(_args, "--frozen");
} else {
command = "add";
args = _args;
}
return _chunkTJVZCJ4Ujs.getCommand.call(void 0, agent, command, args);
}
// src/ni.ts
_chunkTJVZCJ4Ujs.run.call(void 0, async (agent, args) => {
return parseNi(agent, args);
_chunkDCYP2JXBjs.run.call(void 0, async (agent, args, hasLock) => {
return _chunk6RKVY3ELjs.parseNi.call(void 0, agent, args, hasLock);
});
"use strict";
var _chunkTJVZCJ4Ujs = require('./chunk.TJVZCJ4U.js');
var _chunkDCYP2JXBjs = require('./chunk.DCYP2JXB.js');

@@ -10,8 +10,8 @@ // src/commands.ts

args.push("start");
return _chunkTJVZCJ4Ujs.getCommand.call(void 0, agent, "run", args);
return _chunkDCYP2JXBjs.getCommand.call(void 0, agent, "run", args);
}
// src/nr.ts
_chunkTJVZCJ4Ujs.run.call(void 0, async (agent, args) => {
_chunkDCYP2JXBjs.run.call(void 0, async (agent, args) => {
return parseNr(agent, args);
});
{
"name": "@antfu/ni",
"version": "0.1.4",
"version": "0.2.0",
"description": "Use the right package manager",

@@ -9,2 +9,3 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

"ni": "bin/ni.js",
"nci": "bin/nci.js",
"nr": "bin/nr.js"

@@ -28,5 +29,6 @@ },

"ni": "esno src/ni.ts",
"nci": "esno src/nci.ts",
"nr": "esno src/nr.ts",
"dev": "esno src/ni.ts",
"build": "tsup src/ni.ts src/nr.ts --format cjs,esm --dts",
"build": "tsup src/ni.ts src/nci.ts src/nr.ts --format cjs,esm --dts",
"release": "npx bumpp --commit --push --tag && npm publish --access public",

@@ -40,2 +42,3 @@ "lint": "eslint \"{src,test}/**/*.ts\"",

"ini": "^1.3.5",
"inquirer": "^7.3.3",
"terminal-link": "^2.1.1"

@@ -46,2 +49,3 @@ },

"@types/ini": "^1.3.30",
"@types/inquirer": "^7.3.1",
"@types/node": "^14.14.6",

@@ -48,0 +52,0 @@ "ava": "^3.13.0",

@@ -61,3 +61,3 @@ # ni

# pnpm i -g iroiro
# ! uses default agent, regardless CWD
# this uses default agent, regardless CWD
```

@@ -85,2 +85,14 @@

### `nci` - clean install
```bash
nci
# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
```
if the corresponding node manager is not present, this command will install it globally along the way.
<br>

@@ -87,0 +99,0 @@

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