Updated to Electron v3.0.0, renderer to node v10.
Fixed deprecation of Buffer constructor in node v10. Set flag to print the stack trace of node warnings in the renderer.
This commit is contained in:
@@ -1096,9 +1096,9 @@ function loadNews(){
|
||||
},
|
||||
timeout: 2500
|
||||
}).catch(err => {
|
||||
resolve({
|
||||
articles: null
|
||||
resolve({
|
||||
articles: null
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user