Skip to content

Commit 66f9bcd

Browse files
committedNov 2, 2022
deps: nopt@7.0.0
1 parent 5730d17 commit 66f9bcd

File tree

13 files changed

+843
-20
lines changed

13 files changed

+843
-20
lines changed
 

‎node_modules/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,16 @@
170170
!/node-gyp/node_modules/make-fetch-happen
171171
!/node-gyp/node_modules/minimatch
172172
!/node-gyp/node_modules/minipass-fetch
173+
!/node-gyp/node_modules/nopt
173174
!/node-gyp/node_modules/npmlog
174175
!/node-gyp/node_modules/ssri
175176
!/node-gyp/node_modules/unique-filename
176177
!/node-gyp/node_modules/unique-slug
177178
!/node-gyp/node_modules/which
178179
!/nopt
180+
!/nopt/node_modules/
181+
/nopt/node_modules/*
182+
!/nopt/node_modules/abbrev
179183
!/normalize-package-data
180184
!/npm-audit-report
181185
!/npm-bundled
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The ISC License
2+
3+
Copyright (c) Isaac Z. Schlueter and Contributors
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env node
2+
var nopt = require('../lib/nopt')
3+
var path = require('path')
4+
var types = { num: Number,
5+
bool: Boolean,
6+
help: Boolean,
7+
list: Array,
8+
'num-list': [Number, Array],
9+
'str-list': [String, Array],
10+
'bool-list': [Boolean, Array],
11+
str: String,
12+
clear: Boolean,
13+
config: Boolean,
14+
length: Number,
15+
file: path,
16+
}
17+
var shorthands = { s: ['--str', 'astring'],
18+
b: ['--bool'],
19+
nb: ['--no-bool'],
20+
tft: ['--bool-list', '--no-bool-list', '--bool-list', 'true'],
21+
'?': ['--help'],
22+
h: ['--help'],
23+
H: ['--help'],
24+
n: ['--num', '125'],
25+
c: ['--config'],
26+
l: ['--length'],
27+
f: ['--file'],
28+
}
29+
var parsed = nopt(types
30+
, shorthands
31+
, process.argv
32+
, 2)
33+
34+
console.log('parsed', parsed)
35+
36+
if (parsed.help) {
37+
console.log('')
38+
console.log('nopt cli tester')
39+
console.log('')
40+
console.log('types')
41+
console.log(Object.keys(types).map(function M (t) {
42+
var type = types[t]
43+
if (Array.isArray(type)) {
44+
return [t, type.map(function (mappedType) {
45+
return mappedType.name
46+
})]
47+
}
48+
return [t, type && type.name]
49+
}).reduce(function (s, i) {
50+
s[i[0]] = i[1]
51+
return s
52+
}, {}))
53+
console.log('')
54+
console.log('shorthands')
55+
console.log(shorthands)
56+
}

‎node_modules/node-gyp/node_modules/nopt/lib/nopt.js

+515
Large diffs are not rendered by default.

‎node_modules/node-gyp/node_modules/nopt/package.json

+53
Original file line numberDiff line numberDiff line change

‎node_modules/nopt/node_modules/abbrev/LICENSE

+46
Original file line numberDiff line numberDiff line change

‎node_modules/nopt/node_modules/abbrev/lib/index.js

+50
Original file line numberDiff line numberDiff line change

‎node_modules/nopt/node_modules/abbrev/package.json

+43
Original file line numberDiff line numberDiff line change

‎node_modules/nopt/package.json

+11-10
Original file line numberDiff line numberDiff line change

‎package-lock.json

+47-7
Original file line numberDiff line numberDiff line change

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"mkdirp": "^1.0.4",
9797
"ms": "^2.1.2",
9898
"node-gyp": "^9.3.0",
99-
"nopt": "^6.0.0",
99+
"nopt": "^7.0.0",
100100
"npm-audit-report": "^4.0.0",
101101
"npm-install-checks": "^6.0.0",
102102
"npm-package-arg": "^10.0.0",

‎workspaces/arborist/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"json-parse-even-better-errors": "^3.0.0",
2121
"json-stringify-nice": "^1.1.4",
2222
"minimatch": "^5.1.0",
23-
"nopt": "^6.0.0",
23+
"nopt": "^7.0.0",
2424
"npm-install-checks": "^6.0.0",
2525
"npm-package-arg": "^10.0.0",
2626
"npm-pick-manifest": "^8.0.1",

‎workspaces/config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@npmcli/map-workspaces": "^3.0.0",
4141
"ini": "^3.0.0",
42-
"nopt": "^6.0.0",
42+
"nopt": "^7.0.0",
4343
"proc-log": "^3.0.0",
4444
"read-package-json-fast": "^3.0.0",
4545
"semver": "^7.3.5",

0 commit comments

Comments
 (0)
Please sign in to comment.