mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Unify lodash imports
We currently use all three ways of importing lodash. The one that provides us with the smalles bundle size is. ``` import isEqual from "lodash/isEqual"; ``` So we should use that everywhere
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { HttpdClient } from "@httpd-client";
|
||||
|
||||
import { expect } from "vitest";
|
||||
import { isMatch } from "lodash";
|
||||
import isMatch from "lodash/isMatch";
|
||||
|
||||
import { cobRid } from "@tests/support/fixtures";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { debounce } from "lodash";
|
||||
import debounce from "lodash/debounce";
|
||||
|
||||
export let disabled: boolean = false;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
import type { Embed } from "@app/lib/file";
|
||||
|
||||
import * as utils from "@app/lib/utils";
|
||||
import { partial } from "lodash";
|
||||
import partial from "lodash/partial";
|
||||
import { tick } from "svelte";
|
||||
|
||||
import CommentComponent from "@app/components/Comment.svelte";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import IconSmall from "@app/components/IconSmall.svelte";
|
||||
|
||||
import { isEqual } from "lodash";
|
||||
import isEqual from "lodash/isEqual";
|
||||
|
||||
import { closeFocused } from "@app/components/Popover.svelte";
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
import type { Embed } from "@app/lib/file";
|
||||
import type { Session } from "@app/lib/httpd";
|
||||
|
||||
import { isEqual, uniqBy, partial } from "lodash";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import uniqBy from "lodash/uniqBy";
|
||||
import partial from "lodash/partial";
|
||||
|
||||
import * as modal from "@app/lib/modal";
|
||||
import * as role from "@app/lib/roles";
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
import * as router from "@app/lib/router";
|
||||
import * as utils from "@app/lib/utils";
|
||||
import { HttpdClient } from "@httpd-client";
|
||||
import { capitalize, isEqual, partial } from "lodash";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import partial from "lodash/partial";
|
||||
import { httpdStore, type Session } from "@app/lib/httpd";
|
||||
|
||||
import Badge from "@app/components/Badge.svelte";
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as Path from "node:path";
|
||||
import * as Stream from "node:stream";
|
||||
import * as Util from "node:util";
|
||||
import getPort from "get-port";
|
||||
import lodash from "lodash";
|
||||
import matches from "lodash/matches.js";
|
||||
import waitOn from "wait-on";
|
||||
import { execa } from "execa";
|
||||
import * as readline from "node:readline/promises";
|
||||
@@ -189,7 +189,7 @@ export class RadiclePeer {
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
if (this.#eventRecords.find(lodash.matches(searchEvent))) {
|
||||
if (this.#eventRecords.find(matches(searchEvent))) {
|
||||
return;
|
||||
}
|
||||
if (new Date().getTime() - start > timeoutInMs) {
|
||||
|
||||
Reference in New Issue
Block a user