mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
chore: replace lodash.clonedeep with the built-in structuredClone (#9028)
This commit is contained in:
5
.changeset/loud-weeks-camp.md
Normal file
5
.changeset/loud-weeks-camp.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/read-project-manifest": patch
|
||||
---
|
||||
|
||||
Replaced `lodash.clonedeep` with the built-in `structuredClone`.
|
||||
@@ -38,7 +38,6 @@
|
||||
"fast-deep-equal": "catalog:",
|
||||
"is-windows": "catalog:",
|
||||
"json5": "catalog:",
|
||||
"lodash.clonedeep": "catalog:",
|
||||
"parse-json": "catalog:",
|
||||
"read-yaml-file": "catalog:",
|
||||
"sort-keys": "catalog:",
|
||||
@@ -47,7 +46,6 @@
|
||||
"devDependencies": {
|
||||
"@pnpm/read-project-manifest": "workspace:*",
|
||||
"@types/is-windows": "catalog:",
|
||||
"@types/lodash.clonedeep": "catalog:",
|
||||
"@types/parse-json": "catalog:",
|
||||
"tempy": "catalog:"
|
||||
},
|
||||
|
||||
@@ -8,7 +8,6 @@ import readYamlFile from 'read-yaml-file'
|
||||
import detectIndent from '@gwhitney/detect-indent'
|
||||
import equal from 'fast-deep-equal'
|
||||
import isWindows from 'is-windows'
|
||||
import cloneDeep from 'lodash.clonedeep'
|
||||
import {
|
||||
readJson5File,
|
||||
readJsonFile,
|
||||
@@ -235,7 +234,7 @@ function normalize (manifest: ProjectManifest): ProjectManifest {
|
||||
if (Object.prototype.hasOwnProperty.call(manifest, key)) {
|
||||
const value = manifest[key as keyof ProjectManifest]
|
||||
if (typeof value !== 'object' || !dependencyKeys.has(key)) {
|
||||
result[key] = cloneDeep(value)
|
||||
result[key] = structuredClone(value)
|
||||
} else {
|
||||
const keys = Object.keys(value)
|
||||
if (keys.length !== 0) {
|
||||
|
||||
19
pnpm-lock.yaml
generated
19
pnpm-lock.yaml
generated
@@ -102,9 +102,6 @@ catalogs:
|
||||
'@types/js-yaml':
|
||||
specifier: ^4.0.9
|
||||
version: 4.0.9
|
||||
'@types/lodash.clonedeep':
|
||||
specifier: ^4.5.9
|
||||
version: 4.5.9
|
||||
'@types/lodash.throttle':
|
||||
specifier: 4.1.7
|
||||
version: 4.1.7
|
||||
@@ -387,9 +384,6 @@ catalogs:
|
||||
load-json-file:
|
||||
specifier: ^6.2.0
|
||||
version: 6.2.0
|
||||
lodash.clonedeep:
|
||||
specifier: ^4.5.0
|
||||
version: 4.5.0
|
||||
lodash.throttle:
|
||||
specifier: 4.1.1
|
||||
version: 4.1.1
|
||||
@@ -5728,9 +5722,6 @@ importers:
|
||||
json5:
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.3
|
||||
lodash.clonedeep:
|
||||
specifier: 'catalog:'
|
||||
version: 4.5.0
|
||||
parse-json:
|
||||
specifier: 'catalog:'
|
||||
version: 5.2.0
|
||||
@@ -5750,9 +5741,6 @@ importers:
|
||||
'@types/is-windows':
|
||||
specifier: 'catalog:'
|
||||
version: 1.0.2
|
||||
'@types/lodash.clonedeep':
|
||||
specifier: 'catalog:'
|
||||
version: 4.5.9
|
||||
'@types/parse-json':
|
||||
specifier: 'catalog:'
|
||||
version: 4.0.2
|
||||
@@ -9435,9 +9423,6 @@ packages:
|
||||
'@types/keyv@3.1.4':
|
||||
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
|
||||
|
||||
'@types/lodash.clonedeep@4.5.9':
|
||||
resolution: {integrity: sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==}
|
||||
|
||||
'@types/lodash.throttle@4.1.7':
|
||||
resolution: {integrity: sha512-znwGDpjCHQ4FpLLx19w4OXDqq8+OvREa05H89obtSyXyOFKL3dDjCslsmfBz0T2FU8dmf5Wx1QvogbINiGIu9g==}
|
||||
|
||||
@@ -16385,10 +16370,6 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/node': 22.13.0
|
||||
|
||||
'@types/lodash.clonedeep@4.5.9':
|
||||
dependencies:
|
||||
'@types/lodash': 4.17.15
|
||||
|
||||
'@types/lodash.throttle@4.1.7':
|
||||
dependencies:
|
||||
'@types/lodash': 4.17.15
|
||||
|
||||
@@ -72,7 +72,6 @@ catalog:
|
||||
"@types/is-gzip": 2.0.0
|
||||
"@types/is-windows": ^1.0.2
|
||||
"@types/js-yaml": ^4.0.9
|
||||
"@types/lodash.clonedeep": ^4.5.9
|
||||
"@types/lodash.throttle": 4.1.7
|
||||
"@types/micromatch": ^4.0.7
|
||||
"@types/node": ^18.19.34
|
||||
@@ -167,7 +166,6 @@ catalog:
|
||||
jest-diff: ^29.7.0
|
||||
json5: ^2.2.3
|
||||
load-json-file: ^6.2.0
|
||||
lodash.clonedeep: ^4.5.0
|
||||
lodash.throttle: 4.1.1
|
||||
loud-rejection: ^2.2.0
|
||||
lru-cache: ^10.2.2
|
||||
|
||||
Reference in New Issue
Block a user