Comparing version 0.1.4 to 0.2.0
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16131
18
389
115
4
15
8
5
+ Addedinquirer@^7.3.3
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-width@3.0.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinquirer@7.3.3(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedtslib@1.14.1(transitive)