Skip to content

Commit

Permalink
#219: Upgrade electron to v10, set enableRemoteModule to true, and re…
Browse files Browse the repository at this point in the history
…place deprecated Buffer() with Buffer.from()
  • Loading branch information
bstein committed Aug 15, 2022
1 parent c8455a0 commit 716f366
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/app/bcl/bclService.js
Expand Up @@ -560,7 +560,7 @@ export class BCL {
// vm.$http.get(url, {responseType: 'arraybuffer'}).then(response => {
// //extract dir and save to disk in local measures directory
// // convert arraybuffer to node buffer
// const buf = new Buffer(new Uint8Array(response.data));
// const buf = new Buffer.from(new Uint8Array(response.data));
// const zip = new vm.AdmZip(buf);
// // extract to location (and overwrite)
// zip.extractAllTo(vm.Project.getMeasuresDir().path() + '/', true);
Expand Down
2 changes: 1 addition & 1 deletion app/app/project/osServerService.js
Expand Up @@ -1212,7 +1212,7 @@ export class OsServer {

// extract dir and save to disk in local measures directory
// convert arraybuffer to node buffer
const buf = new Buffer(new Uint8Array(response.data));
const buf = new Buffer.from(new Uint8Array(response.data));
if (vm.Message.showDebug()) vm.$log.debug('buffer');

// save
Expand Down
1 change: 1 addition & 0 deletions app/background.js
Expand Up @@ -40,6 +40,7 @@ app.on('ready', () => {
width: 1000,
height: 600,
webPreferences: {
enableRemoteModule: true,
nodeIntegration: true,
webviewTag: true,
webSecurity: false // Disable the same-origin policy when using http
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -11,7 +11,7 @@
"browser-sync-spa": "~1.0.3",
"chalk": "~1.1.1",
"del": "~2.2.0",
"electron": "~9.4.4",
"electron": "~10.4.7",
"eslint-plugin-angular": "~1.0.0",
"eslint-plugin-lodash": "~1.5.1",
"estraverse": "~4.2.0",
Expand Down

0 comments on commit 716f366

Please sign in to comment.