Skip to content

Commit 84bbbd4

Browse files
committed
deps: @npmcli/package-json@5.0.1
1 parent a0f5048 commit 84bbbd4

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
const semver = require('semver')
1+
const valid = require('semver/functions/valid')
2+
const clean = require('semver/functions/clean')
23
const fs = require('fs/promises')
34
const { glob } = require('glob')
4-
const legacyFixer = require('normalize-package-data/lib/fixer.js')
5-
const legacyMakeWarning = require('normalize-package-data/lib/make_warning.js')
65
const path = require('path')
76
const log = require('proc-log')
8-
const git = require('@npmcli/git')
97
const hostedGitInfo = require('hosted-git-info')
108

119
// used to be npm-normalize-package-bin
@@ -130,10 +128,10 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
130128
if (!data.version) {
131129
data.version = ''
132130
} else {
133-
if (!semver.valid(data.version, loose)) {
131+
if (!valid(data.version, loose)) {
134132
throw new Error(`Invalid version: "${data.version}"`)
135133
}
136-
const version = semver.clean(data.version, loose)
134+
const version = clean(data.version, loose)
137135
if (version !== data.version) {
138136
changes?.push(`"version" was cleaned and set to "${version}"`)
139137
data.version = version
@@ -333,6 +331,7 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
333331

334332
// populate "gitHead" attribute
335333
if (steps.includes('gitHead') && !data.gitHead) {
334+
const git = require('@npmcli/git')
336335
const gitRoot = await git.find({ cwd: pkg.path, root })
337336
let head
338337
if (gitRoot) {
@@ -518,6 +517,8 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
518517
}
519518

520519
if (steps.includes('normalizeData')) {
520+
const legacyFixer = require('normalize-package-data/lib/fixer.js')
521+
const legacyMakeWarning = require('normalize-package-data/lib/make_warning.js')
521522
legacyFixer.warn = function () {
522523
changes?.push(legacyMakeWarning.apply(null, arguments))
523524
}

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

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/package-json",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Programmatic API to update package.json",
55
"main": "lib/index.js",
66
"files": [
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"snap": "tap",
1212
"test": "tap",
13-
"lint": "eslint \"**/*.js\"",
13+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
1414
"lintfix": "npm run lint -- --fix",
1515
"posttest": "npm run lint",
1616
"postsnap": "npm run lintfix --",
@@ -25,8 +25,8 @@
2525
"license": "ISC",
2626
"devDependencies": {
2727
"@npmcli/eslint-config": "^4.0.0",
28-
"@npmcli/template-oss": "4.18.0",
29-
"read-package-json": "^6.0.4",
28+
"@npmcli/template-oss": "4.21.3",
29+
"read-package-json": "^7.0.0",
3030
"read-package-json-fast": "^3.0.2",
3131
"tap": "^16.0.1"
3232
},
@@ -48,14 +48,8 @@
4848
},
4949
"templateOSS": {
5050
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
51-
"version": "4.18.0",
52-
"publish": "true",
53-
"ciVersions": [
54-
"16.14.0",
55-
"16.x",
56-
"18.0.0",
57-
"18.x"
58-
]
51+
"version": "4.21.3",
52+
"publish": "true"
5953
},
6054
"tap": {
6155
"nyc-arg": [

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"@npmcli/config": "^8.0.2",
9595
"@npmcli/fs": "^3.1.0",
9696
"@npmcli/map-workspaces": "^3.0.4",
97-
"@npmcli/package-json": "^5.0.0",
97+
"@npmcli/package-json": "^5.0.1",
9898
"@npmcli/promise-spawn": "^7.0.1",
9999
"@npmcli/redact": "^1.1.0",
100100
"@npmcli/run-script": "^7.0.4",
@@ -1866,9 +1866,9 @@
18661866
}
18671867
},
18681868
"node_modules/@npmcli/package-json": {
1869-
"version": "5.0.0",
1870-
"resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.0.0.tgz",
1871-
"integrity": "sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g==",
1869+
"version": "5.0.1",
1870+
"resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.0.1.tgz",
1871+
"integrity": "sha512-WdwGsRP/do+94IXEgfD/oGGVn0VDS+wYM8MoXU5tJ+02Ke8ePSobMwnfcCHAfcvU/pFwZxyZYWaJdOBsqXRAbA==",
18721872
"inBundle": true,
18731873
"dependencies": {
18741874
"@npmcli/git": "^5.0.0",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@npmcli/config": "^8.0.2",
5757
"@npmcli/fs": "^3.1.0",
5858
"@npmcli/map-workspaces": "^3.0.4",
59-
"@npmcli/package-json": "^5.0.0",
59+
"@npmcli/package-json": "^5.0.1",
6060
"@npmcli/promise-spawn": "^7.0.1",
6161
"@npmcli/redact": "^1.1.0",
6262
"@npmcli/run-script": "^7.0.4",

0 commit comments

Comments
 (0)