Skip to content
Permalink
Browse files

build: update typescript and webpack (#22776)

  • Loading branch information
MarshallOfSound committed Mar 19, 2020
1 parent f1a0d5e commit aa15a2cc03027787e34c6f053a41f1af12f8a666
Showing with 211 additions and 159 deletions.
  1. +2 −1 lib/browser/init.ts
  2. +17 −17 package.json
  3. +2 −2 spec-main/api-browser-window-affinity-spec.ts
  4. +1 −1 typings/internal-electron.d.ts
  5. +189 −138 yarn.lock
@@ -1,6 +1,7 @@
import { Buffer } from 'buffer'
import { EventEmitter } from 'events'
import * as fs from 'fs'
import { Socket } from 'net'
import * as path from 'path'
import * as util from 'util'

@@ -26,7 +27,7 @@ if (process.platform === 'win32') {
// See https://nodejs.org/api/util.html#util_util_format_format_args
return process.log(util.format(...args) + '\n')
}
const streamWrite: NodeJS.WritableStream['write'] = function (chunk: Buffer | string, encoding?: any, callback?: Function) {
const streamWrite: Socket['write'] = function (chunk: Buffer | string, encoding?: any, callback?: Function) {
if (Buffer.isBuffer(chunk)) {
chunk = chunk.toString(encoding)
}
@@ -8,22 +8,22 @@
"@electron/typescript-definitions": "^8.6.4",
"@octokit/rest": "^16.3.2",
"@primer/octicons": "^9.1.1",
"@types/basic-auth": "^1.1.2",
"@types/chai": "^4.1.7",
"@types/chai-as-promised": "^7.1.0",
"@types/dirty-chai": "^2.0.0",
"@types/express": "^4.16.1",
"@types/fs-extra": "^5.0.5",
"@types/mocha": "^5.2.6",
"@types/node": "^12.0.10",
"@types/semver": "^6.0.1",
"@types/basic-auth": "^1.1.3",
"@types/chai": "^4.2.11",
"@types/chai-as-promised": "^7.1.2",
"@types/dirty-chai": "^2.0.2",
"@types/express": "^4.17.3",
"@types/fs-extra": "^8.1.0",
"@types/mocha": "^7.0.2",
"@types/node": "^12.12.6",
"@types/semver": "^7.1.0",
"@types/send": "^0.14.5",
"@types/split": "^1.0.0",
"@types/uuid": "^3.4.6",
"@types/webpack": "^4.4.32",
"@types/webpack-env": "^1.13.9",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"@types/webpack": "^4.41.7",
"@types/webpack-env": "^1.15.1",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"asar": "^1.0.0",
"check-for-leaks": "^1.2.1",
"colors": "^1.1.2",
@@ -58,9 +58,9 @@
"timers-browserify": "1.4.2",
"ts-loader": "^6.0.2",
"ts-node": "^6.0.3",
"typescript": "^3.5.2",
"webpack": "^4.32.2",
"webpack-cli": "^3.3.2"
"typescript": "^3.8.3",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
},
"private": true,
"scripts": {
@@ -142,4 +142,4 @@
"@types/multiparty": "^0.0.32",
"@types/temp": "^0.8.34"
}
}
}
@@ -83,13 +83,13 @@ describe('BrowserWindow with affinity module', () => {
testAffinityProcessIds(`BrowserWindow with an affinity '${myAffinityName}' and sandbox enabled`, { sandbox: true })
testAffinityProcessIds(`BrowserWindow with an affinity '${myAffinityName}' and nativeWindowOpen enabled`, { nativeWindowOpen: true })

describe(`BrowserWindow with an affinity : nodeIntegration=false`, () => {
describe('BrowserWindow with an affinity : nodeIntegration=false', () => {
const preload = path.join(fixtures, 'module', 'send-later.js')
const affinityWithNodeTrue = 'affinityWithNodeTrue'
const affinityWithNodeFalse = 'affinityWithNodeFalse'

function testNodeIntegration (present: boolean) {
return new Promise((resolve) => {
return new Promise<void>((resolve) => {
ipcMain.once('answer', (event, typeofProcess, typeofBuffer) => {
if (present) {
expect(typeofProcess).to.not.equal('undefined')
@@ -154,7 +154,7 @@ declare namespace ElectronInternal {
isMainFrame: boolean;
}

abstract class WebViewElement extends HTMLElement {
class WebViewElement extends HTMLElement {
static observedAttributes: Array<string>;

public contentWindow: Window;

0 comments on commit aa15a2c

Please sign in to comment.
You can’t perform that action at this time.