Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/cliPublic

Commitb405da1

Browse files
committed
deps: bin-links@4.0.3
1 parentfcc9e40 commitb405da1

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

‎node_modules/bin-links/lib/link-mans.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,52 @@ const { dirname, relative, join, resolve, basename } = require('path')
22
constlinkGently=require('./link-gently.js')
33
constmanTarget=require('./man-target.js')
44

5-
constlinkMans=({ path, pkg, top, force})=>{
5+
constlinkMans=async({ path, pkg, top, force})=>{
66
consttarget=manTarget({ path, top})
7-
if(!target||!pkg.man||!Array.isArray(pkg.man)||!pkg.man.length){
8-
returnPromise.resolve([])
7+
if(!target||!Array.isArray(pkg?.man)||!pkg.man.length){
8+
return[]
99
}
1010

11-
// break any links to c:\\blah or /foo/blah or ../blah
12-
// and filter out duplicates
13-
constset=[...newSet(pkg.man.map(man=>
14-
man ?join('/',man).replace(/\\|:/g,'/').slice(1) :null)
15-
.filter(man=>typeofman==='string'))]
16-
17-
returnPromise.all(set.map(man=>{
18-
constparseMan=man.match(/(.*\.([0-9]+)(\.gz)?)$/)
11+
constlinks=[]
12+
// `new Set` to filter out duplicates
13+
for(letmanofnewSet(pkg.man)){
14+
if(!man||typeofman!=='string'){
15+
continue
16+
}
17+
// break any links to c:\\blah or /foo/blah or ../blah
18+
man=join('/',man).replace(/\\|:/g,'/').slice(1)
19+
constparseMan=man.match(/\.([0-9]+)(\.gz)?$/)
1920
if(!parseMan){
20-
returnPromise.reject(Object.assign(newError('invalid man entry name\n'+
21+
throwObject.assign(newError('invalid man entry name\n'+
2122
'Man files must end with a number, '+
2223
'and optionally a .gz suffix if they are compressed.'
2324
),{
2425
code:'EBADMAN',
2526
path,
2627
pkgid:pkg._id,
2728
man,
28-
}))
29+
})
2930
}
3031

31-
conststem=parseMan[1]
32-
constsxn=parseMan[2]
33-
constbase=basename(stem)
32+
constsection=parseMan[1]
33+
constbase=basename(man)
3434
constabsFrom=resolve(path,man)
3535
/* istanbul ignore if - that unpossible */
3636
if(absFrom.indexOf(path)!==0){
37-
returnPromise.reject(Object.assign(newError('invalid man entry'),{
37+
throwObject.assign(newError('invalid man entry'),{
3838
code:'EBADMAN',
3939
path,
4040
pkgid:pkg._id,
4141
man,
42-
}))
42+
})
4343
}
4444

45-
constto=resolve(target,'man'+sxn,base)
45+
constto=resolve(target,'man'+section,base)
4646
constfrom=relative(dirname(to),absFrom)
4747

48-
returnlinkGently({ from, to, path, absFrom, force})
49-
}))
48+
links.push(linkGently({ from, to, path, absFrom, force}))
49+
}
50+
returnPromise.all(links)
5051
}
5152

5253
module.exports=linkMans

‎node_modules/bin-links/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"bin-links",
3-
"version":"4.0.2",
3+
"version":"4.0.3",
44
"description":"JavaScript package binary linker",
55
"main":"./lib/index.js",
66
"scripts": {
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@npmcli/eslint-config":"^4.0.0",
33-
"@npmcli/template-oss":"4.15.1",
33+
"@npmcli/template-oss":"4.19.0",
3434
"require-inject":"^1.4.4",
3535
"tap":"^16.0.1"
3636
},
@@ -53,7 +53,7 @@
5353
"templateOSS": {
5454
"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
5555
"windowsCI":false,
56-
"version":"4.15.1",
56+
"version":"4.19.0",
5757
"publish":true
5858
}
5959
}

‎package-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4100,9 +4100,9 @@
41004100
}
41014101
},
41024102
"node_modules/bin-links": {
4103-
"version": "4.0.2",
4104-
"resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.2.tgz",
4105-
"integrity": "sha512-jxJ0PbXR8eQyPlExCvCs3JFnikvs1Yp4gUJt6nmgathdOwvur+q22KWC3h20gvWl4T/14DXKj2IlkJwwZkZPOw==",
4103+
"version": "4.0.3",
4104+
"resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.3.tgz",
4105+
"integrity": "sha512-obsRaULtJurnfox/MDwgq6Yo9kzbv1CPTk/1/s7Z/61Lezc8IKkFCOXNeVLXz0456WRzBQmSsDWlai2tIhBsfA==",
41064106
"dependencies": {
41074107
"cmd-shim": "^6.0.0",
41084108
"npm-normalize-package-bin": "^3.0.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp