Skip to content

Commit d39b2ee

Browse files
author
Nathan Fritz
committed
deps: normalize-package-data@4.0.1
1 parent 46e8753 commit d39b2ee

File tree

4 files changed

+43
-38
lines changed

4 files changed

+43
-38
lines changed

node_modules/normalize-package-data/lib/extract_description.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ function extractDescription (d) {
1111
// the first block of text before the first heading
1212
// that isn't the first line heading
1313
d = d.trim().split('\n')
14-
for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s++) {
15-
;
14+
let s = 0
15+
while (d[s] && d[s].trim().match(/^(#|$)/)) {
16+
s++
1617
}
17-
var l = d.length
18-
for (var e = s + 1; e < l && d[e].trim(); e++) {
19-
;
18+
const l = d.length
19+
let e = s + 1
20+
while (e < l && d[e].trim()) {
21+
e++
2022
}
2123
return d.slice(s, e).join(' ').trim()
2224
}

node_modules/normalize-package-data/lib/fixer.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ module.exports = {
121121
this.warn('nonArrayBundleDependencies')
122122
delete data[bd]
123123
} else if (data[bd]) {
124-
data[bd] = data[bd].filter(function (bd) {
125-
if (!bd || typeof bd !== 'string') {
126-
this.warn('nonStringBundleDependency', bd)
124+
data[bd] = data[bd].filter(function (filtered) {
125+
if (!filtered || typeof filtered !== 'string') {
126+
this.warn('nonStringBundleDependency', filtered)
127127
return false
128128
} else {
129129
if (!data.dependencies) {
130130
data.dependencies = {}
131131
}
132-
if (!Object.prototype.hasOwnProperty.call(data.dependencies, bd)) {
133-
this.warn('nonDependencyBundleDependency', bd)
134-
data.dependencies[bd] = '*'
132+
if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) {
133+
this.warn('nonDependencyBundleDependency', filtered)
134+
data.dependencies[filtered] = '*'
135135
}
136136
return true
137137
}
@@ -389,28 +389,28 @@ function unParsePerson (person) {
389389
}
390390
var name = person.name || ''
391391
var u = person.url || person.web
392-
var url = u ? (' (' + u + ')') : ''
392+
var wrappedUrl = u ? (' (' + u + ')') : ''
393393
var e = person.email || person.mail
394-
var email = e ? (' <' + e + '>') : ''
395-
return name + email + url
394+
var wrappedEmail = e ? (' <' + e + '>') : ''
395+
return name + wrappedEmail + wrappedUrl
396396
}
397397

398398
function parsePerson (person) {
399399
if (typeof person !== 'string') {
400400
return person
401401
}
402-
var name = person.match(/^([^(<]+)/)
403-
var url = person.match(/\(([^()]+)\)/)
404-
var email = person.match(/<([^<>]+)>/)
402+
var matchedName = person.match(/^([^(<]+)/)
403+
var matchedUrl = person.match(/\(([^()]+)\)/)
404+
var matchedEmail = person.match(/<([^<>]+)>/)
405405
var obj = {}
406-
if (name && name[0].trim()) {
407-
obj.name = name[0].trim()
406+
if (matchedName && matchedName[0].trim()) {
407+
obj.name = matchedName[0].trim()
408408
}
409-
if (email) {
410-
obj.email = email[1]
409+
if (matchedEmail) {
410+
obj.email = matchedEmail[1]
411411
}
412-
if (url) {
413-
obj.url = url[1]
412+
if (matchedUrl) {
413+
obj.url = matchedUrl[1]
414414
}
415415
return obj
416416
}

node_modules/normalize-package-data/package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "normalize-package-data",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"author": "GitHub Inc.",
55
"description": "Normalizes data that can be found in package.json files.",
66
"license": "BSD-2-Clause",
77
"repository": {
88
"type": "git",
9-
"url": "git://github.com/npm/normalize-package-data.git"
9+
"url": "https://github.com/npm/normalize-package-data.git"
1010
},
1111
"main": "lib/normalize.js",
1212
"scripts": {
@@ -15,13 +15,13 @@
1515
"preversion": "npm test",
1616
"test": "tap",
1717
"npmclilint": "npmcli-lint",
18-
"lint": "eslint '**/*.js'",
18+
"lint": "eslint \"**/*.js\"",
1919
"lintfix": "npm run lint -- --fix",
2020
"posttest": "npm run lint",
2121
"postsnap": "npm run lintfix --",
22-
"postlint": "npm-template-check",
23-
"template-copy": "npm-template-copy --force",
24-
"snap": "tap"
22+
"postlint": "template-oss-check",
23+
"snap": "tap",
24+
"template-oss-apply": "template-oss-apply --force"
2525
},
2626
"dependencies": {
2727
"hosted-git-info": "^5.0.0",
@@ -30,18 +30,20 @@
3030
"validate-npm-package-license": "^3.0.4"
3131
},
3232
"devDependencies": {
33-
"@npmcli/template-oss": "^2.9.2",
34-
"tap": "^15.0.9"
33+
"@npmcli/eslint-config": "^3.0.1",
34+
"@npmcli/template-oss": "3.5.0",
35+
"tap": "^16.0.1"
3536
},
3637
"files": [
37-
"bin",
38-
"lib"
38+
"bin/",
39+
"lib/"
3940
],
4041
"engines": {
41-
"node": "^12.13.0 || ^14.15.0 || >=16"
42+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
4243
},
4344
"templateOSS": {
44-
"version": "2.9.2"
45+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
46+
"version": "3.5.0"
4547
},
4648
"tap": {
4749
"branches": 86,

package-lock.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5106,17 +5106,18 @@
51065106
}
51075107
},
51085108
"node_modules/normalize-package-data": {
5109-
"version": "4.0.0",
5109+
"version": "4.0.1",
5110+
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz",
5111+
"integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==",
51105112
"inBundle": true,
5111-
"license": "BSD-2-Clause",
51125113
"dependencies": {
51135114
"hosted-git-info": "^5.0.0",
51145115
"is-core-module": "^2.8.1",
51155116
"semver": "^7.3.5",
51165117
"validate-npm-package-license": "^3.0.4"
51175118
},
51185119
"engines": {
5119-
"node": "^12.13.0 || ^14.15.0 || >=16"
5120+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
51205121
}
51215122
},
51225123
"node_modules/normalize-path": {

0 commit comments

Comments
 (0)