Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Unify lodash imports
Sebastian Martinez committed 2 years ago
commit 575f44e4349c6577b1bb0138fbdd793345b9e394
parent b107b43ad0b9a42d4f8523b60a896ad9df12a08b
7 files changed +12 -8
modified httpd-client/tests/support/support.ts
@@ -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";

modified src/components/HoverPopover.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
-
  import { debounce } from "lodash";
+
  import debounce from "lodash/debounce";

  export let disabled: boolean = false;

modified src/components/Thread.svelte
@@ -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";
modified src/views/projects/Cob/CobStateButton.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";

modified src/views/projects/Issue.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";
modified src/views/projects/Patch.svelte
@@ -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";
modified tests/support/peerManager.ts
@@ -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) {