Skip to content

Commit

Permalink
deps: normalize-package-data@4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed Aug 17, 2022
1 parent 46e8753 commit d39b2ee
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
12 changes: 7 additions & 5 deletions node_modules/normalize-package-data/lib/extract_description.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ function extractDescription (d) {
// the first block of text before the first heading
// that isn't the first line heading
d = d.trim().split('\n')
for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s++) {
;
let s = 0
while (d[s] && d[s].trim().match(/^(#|$)/)) {
s++
}
var l = d.length
for (var e = s + 1; e < l && d[e].trim(); e++) {
;
const l = d.length
let e = s + 1
while (e < l && d[e].trim()) {
e++
}
return d.slice(s, e).join(' ').trim()
}
36 changes: 18 additions & 18 deletions node_modules/normalize-package-data/lib/fixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ module.exports = {
this.warn('nonArrayBundleDependencies')
delete data[bd]
} else if (data[bd]) {
data[bd] = data[bd].filter(function (bd) {
if (!bd || typeof bd !== 'string') {
this.warn('nonStringBundleDependency', bd)
data[bd] = data[bd].filter(function (filtered) {
if (!filtered || typeof filtered !== 'string') {
this.warn('nonStringBundleDependency', filtered)
return false
} else {
if (!data.dependencies) {
data.dependencies = {}
}
if (!Object.prototype.hasOwnProperty.call(data.dependencies, bd)) {
this.warn('nonDependencyBundleDependency', bd)
data.dependencies[bd] = '*'
if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) {
this.warn('nonDependencyBundleDependency', filtered)
data.dependencies[filtered] = '*'
}
return true
}
Expand Down Expand Up @@ -389,28 +389,28 @@ function unParsePerson (person) {
}
var name = person.name || ''
var u = person.url || person.web
var url = u ? (' (' + u + ')') : ''
var wrappedUrl = u ? (' (' + u + ')') : ''
var e = person.email || person.mail
var email = e ? (' <' + e + '>') : ''
return name + email + url
var wrappedEmail = e ? (' <' + e + '>') : ''
return name + wrappedEmail + wrappedUrl
}

function parsePerson (person) {
if (typeof person !== 'string') {
return person
}
var name = person.match(/^([^(<]+)/)
var url = person.match(/\(([^()]+)\)/)
var email = person.match(/<([^<>]+)>/)
var matchedName = person.match(/^([^(<]+)/)
var matchedUrl = person.match(/\(([^()]+)\)/)
var matchedEmail = person.match(/<([^<>]+)>/)
var obj = {}
if (name && name[0].trim()) {
obj.name = name[0].trim()
if (matchedName && matchedName[0].trim()) {
obj.name = matchedName[0].trim()
}
if (email) {
obj.email = email[1]
if (matchedEmail) {
obj.email = matchedEmail[1]
}
if (url) {
obj.url = url[1]
if (matchedUrl) {
obj.url = matchedUrl[1]
}
return obj
}
Expand Down
26 changes: 14 additions & 12 deletions node_modules/normalize-package-data/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "normalize-package-data",
"version": "4.0.0",
"version": "4.0.1",
"author": "GitHub Inc.",
"description": "Normalizes data that can be found in package.json files.",
"license": "BSD-2-Clause",
"repository": {
"type": "git",
"url": "git://github.com/npm/normalize-package-data.git"
"url": "https://github.com/npm/normalize-package-data.git"
},
"main": "lib/normalize.js",
"scripts": {
Expand All @@ -15,13 +15,13 @@
"preversion": "npm test",
"test": "tap",
"npmclilint": "npmcli-lint",
"lint": "eslint '**/*.js'",
"lint": "eslint \"**/*.js\"",
"lintfix": "npm run lint -- --fix",
"posttest": "npm run lint",
"postsnap": "npm run lintfix --",
"postlint": "npm-template-check",
"template-copy": "npm-template-copy --force",
"snap": "tap"
"postlint": "template-oss-check",
"snap": "tap",
"template-oss-apply": "template-oss-apply --force"
},
"dependencies": {
"hosted-git-info": "^5.0.0",
Expand All @@ -30,18 +30,20 @@
"validate-npm-package-license": "^3.0.4"
},
"devDependencies": {
"@npmcli/template-oss": "^2.9.2",
"tap": "^15.0.9"
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.5.0",
"tap": "^16.0.1"
},
"files": [
"bin",
"lib"
"bin/",
"lib/"
],
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
"version": "2.9.2"
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.5.0"
},
"tap": {
"branches": 86,
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5106,17 +5106,18 @@
}
},
"node_modules/normalize-package-data": {
"version": "4.0.0",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz",
"integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==",
"inBundle": true,
"license": "BSD-2-Clause",
"dependencies": {
"hosted-git-info": "^5.0.0",
"is-core-module": "^2.8.1",
"semver": "^7.3.5",
"validate-npm-package-license": "^3.0.4"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/normalize-path": {
Expand Down

0 comments on commit d39b2ee

Please sign in to comment.