Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored Sep 14, 2024
1 parent bb0f4d9 commit f012bde
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 29 deletions.
10 changes: 0 additions & 10 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
4 changes: 2 additions & 2 deletions packages/plugin-constraints/sources/constraintUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Configuration, formatUtils, Manifest, miscUtils, nodeUtils, Project, treeUtils, Workspace} from '@yarnpkg/core';
import {PortablePath} from '@yarnpkg/fslib';
import {get, set} from 'es-toolkit/compat';
import {get, set, unset} from 'es-toolkit/compat';

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

if (typeof newValue === `undefined`)
set(manifest, fieldPath, undefined);
unset(manifest, fieldPath);
else
set(manifest, fieldPath, newValue);

Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-essentials/sources/commands/config/unset.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {BaseCommand} from '@yarnpkg/cli';
import {Configuration, StreamReport, MessageName} from '@yarnpkg/core';
import {Command, Option, Usage, UsageError} from 'clipanion';
import {cloneDeep, has as hasPath, set as setPath} from 'es-toolkit/compat';
import {BaseCommand} from '@yarnpkg/cli';
import {Configuration, StreamReport, MessageName} from '@yarnpkg/core';
import {Command, Option, Usage, UsageError} from 'clipanion';
import {cloneDeep, has as hasPath, unset as unsetPath} from 'es-toolkit/compat';

// eslint-disable-next-line arca/no-default-export
export default class ConfigUnsetCommand extends BaseCommand {
Expand Down Expand Up @@ -71,7 +71,7 @@ export default class ConfigUnsetCommand extends BaseCommand {
? cloneDeep(current)
: {...current};

setPath(clone, this.name, undefined);
unsetPath(clone, this.name);
return clone;
});

Expand Down
1 change: 0 additions & 1 deletion packages/yarnpkg-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"es-toolkit": "^1.19.0",
"fast-glob": "^3.2.2",
"got": "^11.7.0",
"lodash.mergewith": "^4.5.0",
"micromatch": "^4.0.2",
"p-limit": "^2.2.0",
"semver": "^7.1.2",
Expand Down
4 changes: 1 addition & 3 deletions packages/yarnpkg-core/sources/miscUtils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {PortablePath, npath, xfs} from '@yarnpkg/fslib';
import {UsageError} from 'clipanion';
import {isEqual} from 'es-toolkit/compat';
// TODO: Replace with es-toolkit/compat
import mergeWith from 'lodash.mergewith';
import {isEqual, mergeWith} from 'es-toolkit/compat';
import micromatch from 'micromatch';
import pLimit, {Limit} from 'p-limit';
import semver from 'semver';
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5518,7 +5518,6 @@ __metadata:
esbuild: "npm:esbuild-wasm@^0.23.0"
fast-glob: "npm:^3.2.2"
got: "npm:^11.7.0"
lodash.mergewith: "npm:^4.5.0"
micromatch: "npm:^4.0.2"
p-limit: "npm:^2.2.0"
rollup: "npm:^2.59.0"
Expand Down Expand Up @@ -14104,13 +14103,6 @@ __metadata:
languageName: node
linkType: hard

"lodash.mergewith@npm:^4.5.0":
version: 4.5.0
resolution: "lodash.mergewith@npm:4.5.0"
checksum: 10/9737806ac3f035f94cacd9c54b32a8ff62cf7ba164b65e7d939ad2959f4ccf50a15c4d9179b7f60ec5ac345a2d637cc4bd7da855e1c3baba9cd881378c393371
languageName: node
linkType: hard

"lodash.set@npm:^4.3.2":
version: 4.3.2
resolution: "lodash.set@npm:4.3.2"
Expand Down

0 comments on commit f012bde

Please sign in to comment.