diff --git a/package-lock.json b/package-lock.json index dcbf469..9f2f166 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,7 @@ "name": "smart-text-editor", "dependencies": { "@stedit/menu-drop": "^1.0.1", - "@stedit/num-text": "^1.0.1", - "nbtify": "^1.60.2" + "@stedit/num-text": "^1.0.1" }, "devDependencies": { "@types/prismjs": "^1.26.0", @@ -464,11 +463,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nbtify": { - "version": "1.60.2", - "resolved": "https://registry.npmjs.org/nbtify/-/nbtify-1.60.2.tgz", - "integrity": "sha512-p63A4g7b01SMStSNyK2/QFRfTTW9IC3PSPy3SscHOAMr1BSL+UIcm65bQweI8AWost/igfWBkXFExVHldyBfrw==" - }, "node_modules/new-javascript": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/new-javascript/-/new-javascript-0.3.5.tgz", diff --git a/package.json b/package.json index 9281b1e..d8518a4 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ }, "dependencies": { "@stedit/menu-drop": "^1.0.1", - "@stedit/num-text": "^1.0.1", - "nbtify": "^1.60.2" + "@stedit/num-text": "^1.0.1" }, "devDependencies": { "@types/prismjs": "^1.26.0", diff --git a/public/service-worker.js b/public/service-worker.js index 4d044da..4ebcad0 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -4,7 +4,7 @@ var self = /** @type { ServiceWorkerGlobalScope } */ (/** @type { unknown } */ (globalThis)); const NAME = "Smart Text Editor"; -const VERSION = "v4.27.1"; +const VERSION = "v4.27.2"; const CACHE_NAME = /** @type { const } */ (`${NAME} ${VERSION}`); const IS_MACOS_DEVICE = (/(macOS|Mac)/i.test(navigator.userAgentData?.platform ?? navigator.platform) && navigator.standalone === undefined); diff --git a/src/Workspace.ts b/src/Workspace.ts index b67df36..4a4d690 100644 --- a/src/Workspace.ts +++ b/src/Workspace.ts @@ -1,7 +1,6 @@ import STE from "./STE.js"; import Editor from "./Editor.js"; import { workspace, view_menu, scaler, preview, preview_menu, workspace_tabs, header, getElementStyle } from "./dom.js"; -import { read, stringify } from "nbtify"; import type { EditorOptions } from "./Editor.js"; @@ -149,7 +148,7 @@ export async function openFiles(): Promise { const results: PromiseSettledResult[] = await Promise.allSettled([...input.files].map(async file => { const { name } = file; - const value = (name.match(/.(nbt|dat)$/)) ? await file.arrayBuffer().then(read).then(({ data }) => stringify(data,{ space: 2 })) : await file.text(); + const value = await file.text(); return { name, value }; }));