Skip to content

Commit 15d1285

Browse files
Remove lodash deps
1 parent 844bb58 commit 15d1285

File tree

8 files changed

+59
-49
lines changed

8 files changed

+59
-49
lines changed

.changeset/warm-pets-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opentf/react-node-repl": minor
3+
---
4+
5+
Removed lodash deps.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@
5151
"@codemirror/commands": "^6.3.3",
5252
"@codemirror/lang-javascript": "^6.2.1",
5353
"@codemirror/state": "^6.4.1",
54-
"@codemirror/view": "^6.24.0",
54+
"@codemirror/view": "^6.26.0",
5555
"@opentf/react-state": "^0.15.0",
56-
"@opentf/utils": "^0.27.0",
56+
"@opentf/utils": "^0.31.0",
5757
"@uiw/codemirror-theme-monokai": "^4.21.24",
5858
"@webcontainer/api": "^1.1.9",
59-
"@xterm/addon-fit": "0.9.0-beta.1",
59+
"@xterm/addon-fit": "0.9.0",
6060
"codemirror": "^6.0.1",
61-
"lodash.merge": "^4.6.2",
6261
"strip-ansi": "^7.1.0",
6362
"xterm": "5.4.0-beta.37"
6463
},

pnpm-lock.yaml

Lines changed: 36 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Demo.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ const defaultDemoSource = `<NodeREPL
3939
`;
4040

4141
const codeConsoleDemoSource = `<NodeREPL
42-
code={code}
43-
setupCode={setupCode}
44-
deps={deps}
45-
editor={{
46-
header: false,
47-
style: { minHeight: "150px", maxHeight: "300px" },
48-
}}
49-
terminal={{
50-
show: false,
51-
}}
52-
console={{ style: { minHeight: "150px", maxHeight: "300px" } }}
42+
code={code}
43+
setupCode={setupCode}
44+
deps={deps}
45+
editor={{
46+
header: false,
47+
style: { minHeight: "150px", maxHeight: "300px" },
48+
}}
49+
terminal={{
50+
show: false,
51+
}}
52+
console={{ style: { minHeight: "150px", maxHeight: "300px" } }}
5353
/>
5454
`;
5555

src/lib/Console.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import stripAnsi from "strip-ansi";
22
import { useAppState } from "./store";
33
import { CSSProperties } from "react";
4-
import merge from "lodash.merge";
4+
import { merge } from "@opentf/utils";
55

66
function isError(str: string) {
77
const errPattern = [

src/lib/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ViewUpdate, keymap } from "@codemirror/view";
44
import { indentWithTab } from "@codemirror/commands";
55
import { javascript } from "@codemirror/lang-javascript";
66
import { Prec, Compartment } from "@codemirror/state";
7-
import merge from "lodash.merge";
7+
import { merge } from "@opentf/utils";
88
import { monokai } from "@uiw/codemirror-theme-monokai";
99
import { setAppState, useAppState } from "./store";
1010
import { NODE_MAIN_FILE, PACKAGE_JSON_FILE, WC_STATUS } from "./constants";

src/lib/NodeREPL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { WebContainer, WebContainerProcess } from "@webcontainer/api";
99
import { NODE_INDEX_FILE, WC_STATUS } from "./constants";
1010
import { sleep } from "@opentf/utils";
1111
import { IDisposable } from "xterm";
12-
import merge from "lodash.merge";
12+
import { merge } from "@opentf/utils";
1313
import { Options, Props } from "./types";
1414

1515
export default function NodeREPL(props: Props) {

src/lib/Terminal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CSSProperties, useEffect, useRef } from "react";
22
import { Terminal as XTerminal } from "xterm";
33
import { FitAddon } from "@xterm/addon-fit";
44
import { setAppState, useAppState } from "./store";
5-
import merge from "lodash.merge";
5+
import { merge } from "@opentf/utils";
66

77
type Props = {
88
style: CSSProperties;

0 commit comments

Comments
 (0)