Skip to content

Commit

Permalink
chore: esm import
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Nov 14, 2023
1 parent f3060f2 commit 7715cd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions electron/handlers/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ModuleManager } from "../managers/module";
import { join, extname } from "path";
import { PluginManager } from "../managers/plugin";
import { WindowManager } from "../managers/window";
const pacote = require("pacote");
import { manifest, tarball } from "pacote";

export function handlePluginIPCs() {
/**
Expand Down Expand Up @@ -107,10 +107,9 @@ export function handlePluginIPCs() {
app.getPath("userData"),
pluginName.replace(/^@.*\//, "") + ".tgz"
);
return pacote
.manifest(pluginName)
return manifest(pluginName)
.then(async (manifest: any) => {
await pacote.tarball(manifest._resolved).then((data: Buffer) => {
await tarball(manifest._resolved).then((data: Buffer) => {
writeFileSync(destination, data);
});
})
Expand Down
3 changes: 1 addition & 2 deletions electron/handlers/update.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { app, dialog } from "electron";
import { WindowManager } from "../managers/window";

const { autoUpdater } = require("electron-updater");
import { autoUpdater } from "electron-updater";

export function handleAppUpdates() {
/* Should not check for update during development */
Expand Down

0 comments on commit 7715cd1

Please sign in to comment.