+14
-17
lines changedFilter options
+14
-17
lines changed Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
1
+
var { URL } = require('node:url')
1
2
var isValidSemver = require('semver/functions/valid')
2
3
var cleanSemver = require('semver/functions/clean')
3
4
var validateLicense = require('validate-npm-package-license')
4
5
var hostedGitInfo = require('hosted-git-info')
5
-
var moduleBuiltin = require('node:module')
6
+
var { isBuiltin } = require('node:module')
6
7
var depTypes = ['dependencies', 'devDependencies', 'optionalDependencies']
7
8
var extractDescription = require('./extract_description')
8
-
var url = require('url')
9
9
var typos = require('./typos.json')
10
10
11
11
var isEmail = str => str.includes('@') && (str.indexOf('@') < str.lastIndexOf('.'))
@@ -231,7 +231,7 @@ module.exports = {
231
231
data.name = data.name.trim()
232
232
}
233
233
ensureValidName(data.name, strict, options.allowLegacyCase)
234
-
if (moduleBuiltin.builtinModules.includes(data.name)) {
234
+
if (isBuiltin(data.name)) {
235
235
this.warn('conflictingName', data.name)
236
236
}
237
237
},
@@ -269,8 +269,7 @@ module.exports = {
269
269
if (typeof data.bugs === 'string') {
270
270
if (isEmail(data.bugs)) {
271
271
data.bugs = { email: data.bugs }
272
-
/* eslint-disable-next-line node/no-deprecated-api */
273
-
} else if (url.parse(data.bugs).protocol) {
272
+
} else if (URL.canParse(data.bugs)) {
274
273
data.bugs = { url: data.bugs }
275
274
} else {
276
275
this.warn('nonEmailUrlBugsString')
@@ -280,8 +279,7 @@ module.exports = {
280
279
var oldBugs = data.bugs
281
280
data.bugs = {}
282
281
if (oldBugs.url) {
283
-
/* eslint-disable-next-line node/no-deprecated-api */
284
-
if (typeof (oldBugs.url) === 'string' && url.parse(oldBugs.url).protocol) {
282
+
if (URL.canParse(oldBugs.url)) {
285
283
data.bugs.url = oldBugs.url
286
284
} else {
287
285
this.warn('nonUrlBugsUrlField')
@@ -317,8 +315,7 @@ module.exports = {
317
315
this.warn('nonUrlHomepage')
318
316
return delete data.homepage
319
317
}
320
-
/* eslint-disable-next-line node/no-deprecated-api */
321
-
if (!url.parse(data.homepage).protocol) {
318
+
if (!URL.canParse(data.homepage)) {
322
319
data.homepage = 'http://' + data.homepage
323
320
}
324
321
},
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "normalize-package-data",
3
-
"version": "7.0.0",
3
+
"version": "7.0.1",
4
4
"author": "GitHub Inc.",
5
5
"description": "Normalizes data that can be found in package.json files.",
6
6
"license": "BSD-2-Clause",
@@ -28,7 +28,7 @@
28
28
},
29
29
"devDependencies": {
30
30
"@npmcli/eslint-config": "^5.0.0",
31
-
"@npmcli/template-oss": "4.23.3",
31
+
"@npmcli/template-oss": "4.25.0",
32
32
"tap": "^16.0.1"
33
33
},
34
34
"files": [
@@ -40,7 +40,7 @@
40
40
},
41
41
"templateOSS": {
42
42
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
43
-
"version": "4.23.3",
43
+
"version": "4.25.0",
44
44
"publish": "true"
45
45
},
46
46
"tap": {
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@
126
126
"ms": "^2.1.2",
127
127
"node-gyp": "^11.2.0",
128
128
"nopt": "^8.1.0",
129
-
"normalize-package-data": "^7.0.0",
129
+
"normalize-package-data": "^7.0.1",
130
130
"npm-audit-report": "^6.0.0",
131
131
"npm-install-checks": "^7.1.1",
132
132
"npm-package-arg": "^12.0.2",
@@ -12358,9 +12358,9 @@
12358
12358
}
12359
12359
},
12360
12360
"node_modules/normalize-package-data": {
12361
-
"version": "7.0.0",
12362
-
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-7.0.0.tgz",
12363
-
"integrity": "sha512-k6U0gKRIuNCTkwHGZqblCfLfBRh+w1vI6tBo+IeJwq2M8FUiOqhX7GH+GArQGScA7azd1WfyRCvxoXDO3hQDIA==",
12361
+
"version": "7.0.1",
12362
+
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-7.0.1.tgz",
12363
+
"integrity": "sha512-linxNAT6M0ebEYZOx2tO6vBEFsVgnPpv+AVjk0wJHfaUIbq31Jm3T6vvZaarnOeWDh8ShnwXuaAyM7WT3RzErA==",
12364
12364
"inBundle": true,
12365
12365
"license": "BSD-2-Clause",
12366
12366
"dependencies": {
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@
93
93
"ms": "^2.1.2",
94
94
"node-gyp": "^11.2.0",
95
95
"nopt": "^8.1.0",
96
-
"normalize-package-data": "^7.0.0",
96
+
"normalize-package-data": "^7.0.1",
97
97
"npm-audit-report": "^6.0.0",
98
98
"npm-install-checks": "^7.1.1",
99
99
"npm-package-arg": "^12.0.2",
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4