Skip to content

Commit

Permalink
upgrade Electron to 13.1.7
Browse files Browse the repository at this point in the history
browsersync and dev-ip don't load because they run into

  nodejs/node#36173

in my build I commented out the shebang lines :/. need to remove
browsersync or switch to livereload.
  • Loading branch information
jaked committed Aug 3, 2021
1 parent aed34b9 commit 28011cf
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
28 changes: 18 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -26,7 +26,7 @@
"@types/express": "^4.17.1",
"@types/jest": "^26.0.24",
"@types/json5": "0.0.30",
"@types/node": "^12.0.0",
"@types/node": "^14.17.4",
"@types/react": "^17.0.15",
"@types/react-dom": "^17.0.9",
"@types/react-frame-component": "^4.1.1",
Expand All @@ -37,7 +37,7 @@
"@types/styled-components": "^5.1.11",
"@types/styled-system": "^4.2.2",
"@types/victory": "^31.0.21",
"electron": "^9.4.4",
"electron": "^13.1.7",
"electron-rebuild": "^1.8.6",
"jest": "^27.0.6",
"react-test-renderer": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/files/Filesystem.ts
Expand Up @@ -192,7 +192,7 @@ function make(
files: Signal.Writable<model.Files>,
Now: Now = Date,
Timers: Timers = timers,
Fs: Fs = fs.promises,
Fs: Fs = fs.promises as Fs, // TODO(jaked)
Nsfw: Nsfw = nsfw,
): Filesystem {
const fsFiles = new Map<string, FsFile>();
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Expand Up @@ -65,6 +65,7 @@ async function createWindow () {
// TODO(jaked)
// need to remove this for security
nodeIntegration: true,
contextIsolation: false,

additionalArguments: [config.dataDir]
}
Expand Down
14 changes: 7 additions & 7 deletions src/publish/ghPages.ts
Expand Up @@ -43,32 +43,32 @@ export default async function ghPages(
await mkdir(Path.dirname(path), { recursive: true });
const exportValue = note.exportValue.get();
const buffer = exportValue.get('buffer') ?? bug(`expected buffer`)
await writeFile(path, buffer);
await writeFile(path, buffer as Buffer);

} else if (note.type === 'png') {
const path = Path.join(tempdir, note.name) + '.png';

await mkdir(Path.dirname(path), { recursive: true });
const exportValue = note.exportValue.get();
const buffer = exportValue.get('buffer') ?? bug(`expected buffer`)
await writeFile(path, buffer);
await writeFile(path, buffer as Buffer);

} else if (note.type === 'xml') {
const path = Path.join(tempdir, note.name) + '.xml';

await mkdir(Path.dirname(path), { recursive: true });
const xml = note.rendered.get();
await writeFile(path, xml);
await writeFile(path, xml as string);

} else if (note.type === 'pm') {
const htmlPath = Path.join(tempdir, note.name) + '.html';
const html = note.html?.get();
const html = note.html ?? bug(`expected html`);
await mkdir(Path.dirname(htmlPath), { recursive: true });
await writeFile(htmlPath, html);
await writeFile(htmlPath, html.get())

const jsPath = Path.join(tempdir, note.name) + '.js';
const js = note.js?.get();
await writeFile(jsPath, js);
const js = note.js ?? bug(`expected js`);
await writeFile(jsPath, js.get());
}
}).values()]);
const publish = true;
Expand Down

0 comments on commit 28011cf

Please sign in to comment.