Content-Length: 468977 | pFad | http://github.com/npm/cli/commit/78a6d355ad585273931ec1b63994af76574ab0ee

1B deps: @npmcli/package-json@6.2.0 · npm/cli@78a6d35 · GitHub
Skip to content

Commit 78a6d35

Browse files
committed
deps: @npmcli/package-json@6.2.0
1 parent 8f6eb6b commit 78a6d35

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

DEPENDENCIES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ graph LR;
5959
libnpmpublish-->npmcli-eslint-config["@npmcli/eslint-config"];
6060
libnpmpublish-->npmcli-mock-globals["@npmcli/mock-globals"];
6161
libnpmpublish-->npmcli-mock-registry["@npmcli/mock-registry"];
62+
libnpmpublish-->npmcli-package-json["@npmcli/package-json"];
6263
libnpmpublish-->npmcli-template-oss["@npmcli/template-oss"];
6364
libnpmpublish-->proc-log;
6465
libnpmpublish-->semver;
@@ -381,6 +382,7 @@ graph LR;
381382
libnpmpublish-->npmcli-eslint-config["@npmcli/eslint-config"];
382383
libnpmpublish-->npmcli-mock-globals["@npmcli/mock-globals"];
383384
libnpmpublish-->npmcli-mock-registry["@npmcli/mock-registry"];
385+
libnpmpublish-->npmcli-package-json["@npmcli/package-json"];
384386
libnpmpublish-->npmcli-template-oss["@npmcli/template-oss"];
385387
libnpmpublish-->proc-log;
386388
libnpmpublish-->semver;

node_modules/@npmcli/package-json/lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class PackageJson {
4141
'binRefs',
4242
'bundleDependencies',
4343
'bundleDependenciesFalse',
44+
'fixName',
4445
'fixNameField',
4546
'fixVersionField',
4647
'fixRepositoryField',

node_modules/@npmcli/package-json/lib/normalize.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const clean = require('semver/functions/clean')
33
const fs = require('node:fs/promises')
44
const path = require('node:path')
55
const { log } = require('proc-log')
6+
const moduleBuiltin = require('node:module')
67

78
/**
89
* @type {import('hosted-git-info')}
@@ -144,7 +145,7 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
144145
const pkgId = `${data.name ?? ''}@${data.version ?? ''}`
145146

146147
// name and version are load bearing so we have to clean them up first
147-
if (steps.includes('fixNameField') || steps.includes('normalizeData')) {
148+
if (steps.includes('fixName') || steps.includes('fixNameField') || steps.includes('normalizeData')) {
148149
if (!data.name && !strict) {
149150
changes?.push('Missing "name" field was set to an empty string')
150151
data.name = ''
@@ -170,6 +171,13 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
170171
}
171172
}
172173

174+
if (steps.includes('fixName')) {
175+
// Check for conflicts with builtin modules
176+
if (moduleBuiltin.builtinModules.includes(data.name)) {
177+
log.warn('package-json', pkgId, `Package name "${data.name}" conflicts with a Node.js built-in module name`)
178+
}
179+
}
180+
173181
if (steps.includes('fixVersionField') || steps.includes('normalizeData')) {
174182
// allow "loose" semver 1.0 versions in non-strict mode
175183
// enforce strict semver 2.0 compliance in strict mode

node_modules/@npmcli/package-json/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/package-json",
3-
"version": "6.1.1",
3+
"version": "6.2.0",
44
"description": "Programmatic API to update package.json",
55
"keywords": [
66
"npm",

package-lock.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3672,9 +3672,9 @@
36723672
}
36733673
},
36743674
"node_modules/@npmcli/package-json": {
3675-
"version": "6.1.1",
3676-
"resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-6.1.1.tgz",
3677-
"integrity": "sha512-d5qimadRAUCO4A/Txw71VM7UrRZzV+NPclxz/dc+M6B2oYwjWTjqh8HA/sGQgs9VZuJ6I/P7XIAlJvgrl27ZOw==",
3675+
"version": "6.2.0",
3676+
"resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-6.2.0.tgz",
3677+
"integrity": "sha512-rCNLSB/JzNvot0SEyXqWZ7tX2B5dD2a1br2Dp0vSYVo5jh8Z0EZ7lS9TsZ1UtziddB1UfNUaMCc538/HztnJGA==",
36783678
"inBundle": true,
36793679
"license": "ISC",
36803680
"dependencies": {
@@ -19132,6 +19132,7 @@
1913219132
"version": "11.0.0",
1913319133
"license": "ISC",
1913419134
"dependencies": {
19135+
"@npmcli/package-json": "^6.2.0",
1913519136
"ci-info": "^4.0.0",
1913619137
"normalize-package-data": "^7.0.0",
1913719138
"npm-package-arg": "^12.0.0",

workspaces/libnpmpublish/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"bugs": "https://github.com/npm/cli/issues",
3939
"homepage": "https://npmjs.com/package/libnpmpublish",
4040
"dependencies": {
41+
"@npmcli/package-json": "^6.2.0",
4142
"ci-info": "^4.0.0",
4243
"normalize-package-data": "^7.0.0",
4344
"npm-package-arg": "^12.0.0",

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/npm/cli/commit/78a6d355ad585273931ec1b63994af76574ab0ee

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy