Skip to content

Commit

Permalink
Updated to Electron v3.0.0, renderer to node v10.
Browse files Browse the repository at this point in the history
Fixed deprecation of Buffer constructor in node v10.
Set flag to print the stack trace of node warnings in the renderer.
  • Loading branch information
dscalzi committed Sep 22, 2018
1 parent 72f822d commit b2e9223
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 67 deletions.
6 changes: 3 additions & 3 deletions app/assets/js/scripts/landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,9 @@ function loadNews(){
},
timeout: 2500
}).catch(err => {
resolve({
articles: null
resolve({
articles: null
})
})
})
})
}
4 changes: 4 additions & 0 deletions app/assets/js/scripts/uicore.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const loggerUICore = LoggerUtil('%c[UICore]', 'color: #000668; font-
const loggerAutoUpdater = LoggerUtil('%c[AutoUpdater]', 'color: #000668; font-weight: bold')
const loggerAutoUpdaterSuccess = LoggerUtil('%c[AutoUpdater]', 'color: #209b07; font-weight: bold')

// Log deprecation and process warnings.
process.traceProcessWarnings = true
process.traceDeprecation = true

// Disable eval function.
// eslint-disable-next-line
window.eval = global.eval = function () {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/js/serverstatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.getStatus = function(address, port = 25565){

return new Promise((resolve, reject) => {
const socket = net.connect(port, address, () => {
let buff = new Buffer([0xFE, 0x01])
let buff = Buffer.from([0xFE, 0x01])
socket.write(buff)
})

Expand Down
136 changes: 75 additions & 61 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"discord-rpc": "^3.0.0",
"ejs": "^2.6.1",
"ejs-electron": "^2.0.3",
"electron-is-dev": "^0.3.0",
"electron-is-dev": "=0.3.0",
"electron-updater": "^3.1.2",
"github-syntax-dark": "^0.5.0",
"jquery": "^3.3.1",
Expand All @@ -49,7 +49,7 @@
"winreg": "^1.2.4"
},
"devDependencies": {
"electron": "^2.0.9",
"electron": "^3.0.0",
"electron-builder": "^20.28.4",
"eslint": "^5.6.0"
},
Expand Down

0 comments on commit b2e9223

Please sign in to comment.