Skip to content

Commit

Permalink
upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Apr 5, 2024
1 parent c5adfc2 commit 5627da2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 27 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Expand Up @@ -123,7 +123,7 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.3.0)
faker (3.3.1)
i18n (>= 1.8.11, < 2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -253,7 +253,7 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.4)
public_suffix (5.0.5)
rabbitmq_http_api_client (2.2.0)
addressable (~> 2.7)
faraday (~> 1.3)
Expand Down Expand Up @@ -301,7 +301,7 @@ GEM
method_source
rake (>= 12.2)
thor (~> 1.0)
rake (13.1.0)
rake (13.2.1)
rbtree (0.4.6)
redis (4.8.1)
representable (3.2.0)
Expand Down Expand Up @@ -340,10 +340,10 @@ GEM
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
ruby2_keywords (0.0.5)
scenic (1.7.0)
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
scout_apm (5.3.7)
scout_apm (5.3.8)
parser
secure_headers (6.5.0)
set (1.1.0)
Expand Down
4 changes: 2 additions & 2 deletions frontend/demo/demo_iframe.tsx
@@ -1,4 +1,4 @@
import { ClientSubscribeCallback, connect, IConnackPacket } from "mqtt";
import mqtt, { ClientSubscribeCallback, IConnackPacket } from "mqtt";
import React from "react";
import { uuid } from "farmbot";
import axios from "axios";
Expand Down Expand Up @@ -37,7 +37,7 @@ export class DemoIframe extends React.Component<{}, State> {
setError = (error?: Error) => this.setState({ error });

connectMqtt = (): Promise<IConnackPacket> => {
const client = connect(globalConfig.MQTT_WS, WS_CONFIG);
const client = mqtt.connect(globalConfig.MQTT_WS, WS_CONFIG);
return new Promise(resolve => {
client.on("message", this.handleMessage);
client.subscribe(MQTT_CHAN, this.setError as ClientSubscribeCallback);
Expand Down
4 changes: 2 additions & 2 deletions frontend/terminal/terminal_session.ts
@@ -1,5 +1,5 @@
import { times } from "lodash";
import { connect, MqttClient } from "mqtt";
import mqtt, { MqttClient } from "mqtt";
import { Terminal } from "xterm";

type TerminalLike = Pick<Terminal, "write" | "onKey">;
Expand All @@ -17,7 +17,7 @@ export class TerminalSession {
constructor(url: string, public username: string,
password: string,
private terminal: TerminalLike) {
this.client = connect(url, { username, password });
this.client = mqtt.connect(url, { username, password });
}

get rx() { return `bot/${this.username}/terminal_output`; }
Expand Down
7 changes: 7 additions & 0 deletions frontend/try_farmbot/__tests__/try_farmbot_test.tsx
@@ -1,3 +1,10 @@
jest.mock("mqtt", () => ({
connect: () => ({
on: jest.fn(),
subscribe: jest.fn(),
})
}));

import React from "react";
import { shallow } from "enzyme";
import { DEMO_LOADING, TryFarmbot } from "../try_farmbot";
Expand Down
5 changes: 0 additions & 5 deletions lib/tasks/fe.rake
Expand Up @@ -12,11 +12,6 @@ EXCLUDE = [
reason: "dependency needs",
version: "1.4.1",
},
{
packages: ["mqtt"],
reason: "import error",
version: "5.3.0",
},
]

# Load package.json as JSON.
Expand Down
26 changes: 13 additions & 13 deletions package.json
Expand Up @@ -38,16 +38,16 @@
"@monaco-editor/react": "4.6.0",
"@parcel/transformer-sass": "2.12.0",
"@parcel/transformer-typescript-tsc": "2.12.0",
"@react-three/drei": "9.102.6",
"@react-three/fiber": "8.16.0",
"@react-three/drei": "9.105.1",
"@react-three/fiber": "8.16.1",
"@types/lodash": "4.17.0",
"@types/markdown-it": "13.0.7",
"@types/node": "20.11.30",
"@types/node": "20.12.4",
"@types/promise-timeout": "1.3.3",
"@types/react": "18.2.73",
"@types/react": "18.2.74",
"@types/react-color": "3.0.12",
"@types/react-dom": "18.2.22",
"@types/three": "0.162.0",
"@types/react-dom": "18.2.24",
"@types/three": "0.163.0",
"@types/ws": "8.5.10",
"axios": "1.6.8",
"bowser": "2.11.0",
Expand All @@ -60,8 +60,8 @@
"markdown-it-emoji": "3.0.0",
"moment": "2.30.1",
"monaco-editor": "0.47.0",
"mqtt": "5.1.4",
"npm": "10.5.0",
"mqtt": "5.5.0",
"npm": "10.5.1",
"parcel": "2.12.0",
"process": "0.11.10",
"promise-timeout": "1.3.0",
Expand All @@ -75,17 +75,17 @@
"redux-immutable-state-invariant": "2.1.0",
"redux-thunk": "3.1.0",
"takeme": "0.12.0",
"three": "0.162.0",
"typescript": "5.4.3",
"three": "0.163.0",
"typescript": "5.4.4",
"url": "0.11.3",
"xterm": "5.3.0"
},
"devDependencies": {
"@types/enzyme": "3.10.12",
"@types/jest": "29.5.12",
"@types/readable-stream": "4.0.11",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"enzyme": "3.11.0",
"eslint": "8.57.0",
Expand All @@ -107,7 +107,7 @@
"raf": "3.4.1",
"react-addons-test-utils": "15.6.2",
"react-test-renderer": "18.2.0",
"sass": "1.72.0",
"sass": "1.74.1",
"sass-lint": "1.13.1",
"ts-jest": "29.1.2",
"tslint": "6.1.3"
Expand Down

0 comments on commit 5627da2

Please sign in to comment.