Skip to content

Commit f012bde

Browse files
authored
Cleanup
1 parent bb0f4d9 commit f012bde

File tree

7 files changed

+8
-29
lines changed

7 files changed

+8
-29
lines changed

.pnp.cjs

-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/plugin-constraints/sources/constraintUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Configuration, formatUtils, Manifest, miscUtils, nodeUtils, Project, treeUtils, Workspace} from '@yarnpkg/core';
22
import {PortablePath} from '@yarnpkg/fslib';
3-
import {get, set} from 'es-toolkit/compat';
3+
import {get, set, unset} from 'es-toolkit/compat';
44

55
function toPath(value: any): Array<string> {
66
return Array.isArray(value) ? value : value.match(/([^[.\]])+/g);
@@ -219,7 +219,7 @@ export function applyEngineReport(project: Project, {manifestUpdates, reportedEr
219219
}
220220

221221
if (typeof newValue === `undefined`)
222-
set(manifest, fieldPath, undefined);
222+
unset(manifest, fieldPath);
223223
else
224224
set(manifest, fieldPath, newValue);
225225

packages/plugin-essentials/sources/commands/config/unset.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {BaseCommand} from '@yarnpkg/cli';
2-
import {Configuration, StreamReport, MessageName} from '@yarnpkg/core';
3-
import {Command, Option, Usage, UsageError} from 'clipanion';
4-
import {cloneDeep, has as hasPath, set as setPath} from 'es-toolkit/compat';
1+
import {BaseCommand} from '@yarnpkg/cli';
2+
import {Configuration, StreamReport, MessageName} from '@yarnpkg/core';
3+
import {Command, Option, Usage, UsageError} from 'clipanion';
4+
import {cloneDeep, has as hasPath, unset as unsetPath} from 'es-toolkit/compat';
55

66
// eslint-disable-next-line arca/no-default-export
77
export default class ConfigUnsetCommand extends BaseCommand {
@@ -71,7 +71,7 @@ export default class ConfigUnsetCommand extends BaseCommand {
7171
? cloneDeep(current)
7272
: {...current};
7373

74-
setPath(clone, this.name, undefined);
74+
unsetPath(clone, this.name);
7575
return clone;
7676
});
7777

packages/yarnpkg-core/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"es-toolkit": "^1.19.0",
2727
"fast-glob": "^3.2.2",
2828
"got": "^11.7.0",
29-
"lodash.mergewith": "^4.5.0",
3029
"micromatch": "^4.0.2",
3130
"p-limit": "^2.2.0",
3231
"semver": "^7.1.2",

packages/yarnpkg-core/sources/miscUtils.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {PortablePath, npath, xfs} from '@yarnpkg/fslib';
22
import {UsageError} from 'clipanion';
3-
import {isEqual} from 'es-toolkit/compat';
4-
// TODO: Replace with es-toolkit/compat
5-
import mergeWith from 'lodash.mergewith';
3+
import {isEqual, mergeWith} from 'es-toolkit/compat';
64
import micromatch from 'micromatch';
75
import pLimit, {Limit} from 'p-limit';
86
import semver from 'semver';

yarn.lock

-8
Original file line numberDiff line numberDiff line change
@@ -5518,7 +5518,6 @@ __metadata:
55185518
esbuild: "npm:esbuild-wasm@^0.23.0"
55195519
fast-glob: "npm:^3.2.2"
55205520
got: "npm:^11.7.0"
5521-
lodash.mergewith: "npm:^4.5.0"
55225521
micromatch: "npm:^4.0.2"
55235522
p-limit: "npm:^2.2.0"
55245523
rollup: "npm:^2.59.0"
@@ -14104,13 +14103,6 @@ __metadata:
1410414103
languageName: node
1410514104
linkType: hard
1410614105

14107-
"lodash.mergewith@npm:^4.5.0":
14108-
version: 4.5.0
14109-
resolution: "lodash.mergewith@npm:4.5.0"
14110-
checksum: 10/9737806ac3f035f94cacd9c54b32a8ff62cf7ba164b65e7d939ad2959f4ccf50a15c4d9179b7f60ec5ac345a2d637cc4bd7da855e1c3baba9cd881378c393371
14111-
languageName: node
14112-
linkType: hard
14113-
1411414106
"lodash.set@npm:^4.3.2":
1411514107
version: 4.3.2
1411614108
resolution: "lodash.set@npm:4.3.2"

0 commit comments

Comments
 (0)