Remove imports of erlpack in favor of @yukikaze-bot/erlpack due to the former not working on modern node

This commit is contained in:
Emma [it/its]@Rory&
2024-10-30 00:32:59 +01:00
parent 8428d6da6d
commit 25b0a221e1
3 changed files with 6 additions and 21 deletions
+2 -7
View File
@@ -31,14 +31,9 @@ import { Config, ErlpackType } from "@spacebar/util";
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
// TODO: check rate limit
+2 -7
View File
@@ -29,14 +29,9 @@ const bigIntJson = BigIntJson({ storeAsString: true });
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
export async function Message(this: WebSocket, buffer: WS.Data) {
+2 -7
View File
@@ -23,14 +23,9 @@ import path from "path";
import { ErlpackType, JSONReplacer } from "@spacebar/util";
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
// don't care