chore: lint spec-main (#20835)
This commit is contained in:
		
					parent
					
						
							
								1fed1ed577
							
						
					
				
			
			
				commit
				
					
						ecd9e1f26e
					
				
			
		
					 51 changed files with 589 additions and 533 deletions
				
			
		|  | @ -17,18 +17,29 @@ | ||||||
|     "prefer-const": ["error", { |     "prefer-const": ["error", { | ||||||
|       "destructuring": "all" |       "destructuring": "all" | ||||||
|     }], |     }], | ||||||
|  |     "standard/no-callback-literal": "off", | ||||||
|     "node/no-deprecated-api": 0 |     "node/no-deprecated-api": 0 | ||||||
|   }, |   }, | ||||||
|   "parserOptions": { |   "parserOptions": { | ||||||
|     "ecmaVersion": 6, |     "ecmaVersion": 6, | ||||||
|     "sourceType": "module" |     "sourceType": "module" | ||||||
|   }, |   }, | ||||||
|  |   "globals": { | ||||||
|  |     "standardScheme": "readonly" | ||||||
|  |   }, | ||||||
|   "overrides": [ |   "overrides": [ | ||||||
|     { |     { | ||||||
|       "files": "*.js", |       "files": "*.js", | ||||||
|       "rules": { |       "rules": { | ||||||
|           "@typescript-eslint/no-unused-vars": "off" |           "@typescript-eslint/no-unused-vars": "off" | ||||||
|       } |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "files": "*.d.ts", | ||||||
|  |       "rules": { | ||||||
|  |           "no-useless-constructor": "off", | ||||||
|  |           "@typescript-eslint/no-unused-vars": "off" | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   ] |   ] | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||||||
| && rm -rf /var/lib/apt/lists/* | && rm -rf /var/lib/apt/lists/* | ||||||
| 
 | 
 | ||||||
| # Install Node.js | # Install Node.js | ||||||
| RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \ | RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \ | ||||||
|   && DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs \ |   && DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs \ | ||||||
|   && rm -rf /var/lib/apt/lists/* |   && rm -rf /var/lib/apt/lists/* | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -21,8 +21,8 @@ | ||||||
|     "@types/split": "^1.0.0", |     "@types/split": "^1.0.0", | ||||||
|     "@types/webpack": "^4.4.32", |     "@types/webpack": "^4.4.32", | ||||||
|     "@types/webpack-env": "^1.13.9", |     "@types/webpack-env": "^1.13.9", | ||||||
|     "@typescript-eslint/eslint-plugin": "^1.4.2", |     "@typescript-eslint/eslint-plugin": "^2.6.0", | ||||||
|     "@typescript-eslint/parser": "^1.4.2", |     "@typescript-eslint/parser": "^2.6.0", | ||||||
|     "asar": "^1.0.0", |     "asar": "^1.0.0", | ||||||
|     "check-for-leaks": "^1.2.1", |     "check-for-leaks": "^1.2.1", | ||||||
|     "colors": "^1.1.2", |     "colors": "^1.1.2", | ||||||
|  |  | ||||||
|  | @ -95,8 +95,8 @@ const LINTERS = [ { | ||||||
|   } |   } | ||||||
| }, { | }, { | ||||||
|   key: 'javascript', |   key: 'javascript', | ||||||
|   roots: ['lib', 'spec', 'script', 'default_app'], |   roots: ['lib', 'spec', 'spec-main', 'script', 'default_app'], | ||||||
|   ignoreRoots: ['spec/node_modules'], |   ignoreRoots: ['spec/node_modules', 'spec-main/node_modules'], | ||||||
|   test: filename => filename.endsWith('.js') || filename.endsWith('.ts'), |   test: filename => filename.endsWith('.js') || filename.endsWith('.ts'), | ||||||
|   run: (opts, filenames) => { |   run: (opts, filenames) => { | ||||||
|     const cmd = path.join(SOURCE_ROOT, 'node_modules', '.bin', 'eslint') |     const cmd = path.join(SOURCE_ROOT, 'node_modules', '.bin', 'eslint') | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								spec-main/ambient.d.ts
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								spec-main/ambient.d.ts
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,4 @@ | ||||||
| declare var standardScheme: string; | declare let standardScheme: string | ||||||
| 
 | 
 | ||||||
| declare namespace Electron { | declare namespace Electron { | ||||||
|   interface Menu { |   interface Menu { | ||||||
|  |  | ||||||
|  | @ -5,11 +5,11 @@ import * as https from 'https' | ||||||
| import * as net from 'net' | import * as net from 'net' | ||||||
| import * as fs from 'fs' | import * as fs from 'fs' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import split = require('split') |  | ||||||
| import { app, BrowserWindow, Menu } from 'electron' | import { app, BrowserWindow, Menu } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers'; | import { emittedOnce } from './events-helpers' | ||||||
| import { closeWindow } from './window-helpers'; | import { closeWindow } from './window-helpers' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe } from './spec-helpers' | ||||||
|  | import split = require('split') | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  | @ -196,7 +196,7 @@ describe('app module', () => { | ||||||
|       // Singleton will send us greeting data to let us know it's running.
 |       // Singleton will send us greeting data to let us know it's running.
 | ||||||
|       // After that, ask it to exit gracefully and confirm that it does.
 |       // After that, ask it to exit gracefully and confirm that it does.
 | ||||||
|       if (appProcess && appProcess.stdout) { |       if (appProcess && appProcess.stdout) { | ||||||
|         appProcess.stdout.on('data', data => appProcess!.kill()) |         appProcess.stdout.on('data', () => appProcess!.kill()) | ||||||
|       } |       } | ||||||
|       const [code, signal] = await emittedOnce(appProcess, 'close') |       const [code, signal] = await emittedOnce(appProcess, 'close') | ||||||
| 
 | 
 | ||||||
|  | @ -405,8 +405,7 @@ describe('app module', () => { | ||||||
| 
 | 
 | ||||||
|     it('should emit renderer-process-crashed event when renderer crashes', async function () { |     it('should emit renderer-process-crashed event when renderer crashes', async function () { | ||||||
|       // FIXME: re-enable this test on win32.
 |       // FIXME: re-enable this test on win32.
 | ||||||
|       if (process.platform === 'win32') |       if (process.platform === 'win32') { return this.skip() } | ||||||
|         return this.skip() |  | ||||||
|       w = new BrowserWindow({ |       w = new BrowserWindow({ | ||||||
|         show: false, |         show: false, | ||||||
|         webPreferences: { |         webPreferences: { | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ ifdescribe(!process.mas)('autoUpdater module', function () { | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('throws if no url is provided when using the new style', () => { |       it('throws if no url is provided when using the new style', () => { | ||||||
|         expect(() => autoUpdater.setFeedURL({ noUrl: 'lol' } as any), |         expect(() => autoUpdater.setFeedURL({ noUrl: 'lol' } as any) | ||||||
|         ).to.throw('Expected options object to contain a \'url\' string property in setFeedUrl call') |         ).to.throw('Expected options object to contain a \'url\' string property in setFeedUrl call') | ||||||
|       }) |       }) | ||||||
|     }) |     }) | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import * as express from 'express' | ||||||
| import * as fs from 'fs-extra' | import * as fs from 'fs-extra' | ||||||
| import * as os from 'os' | import * as os from 'os' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import { AddressInfo } from 'net'; | import { AddressInfo } from 'net' | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  | @ -132,10 +132,10 @@ describeFn('autoUpdater behavior', function () { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   describe('with update server', () => { |   describe('with update server', () => { | ||||||
|     let port = 0; |     let port = 0 | ||||||
|     let server: express.Application = null as any; |     let server: express.Application = null as any | ||||||
|     let httpServer: http.Server = null as any |     let httpServer: http.Server = null as any | ||||||
|     let requests: express.Request[] = []; |     let requests: express.Request[] = [] | ||||||
| 
 | 
 | ||||||
|     beforeEach((done) => { |     beforeEach((done) => { | ||||||
|       requests = [] |       requests = [] | ||||||
|  | @ -219,7 +219,7 @@ describeFn('autoUpdater behavior', function () { | ||||||
|             (await fs.readFile(appPJPath, 'utf8')).replace('1.0.0', '2.0.0') |             (await fs.readFile(appPJPath, 'utf8')).replace('1.0.0', '2.0.0') | ||||||
|           ) |           ) | ||||||
|           await signApp(secondAppPath) |           await signApp(secondAppPath) | ||||||
|           const updateZipPath = path.resolve(dir2, 'update.zip'); |           const updateZipPath = path.resolve(dir2, 'update.zip') | ||||||
|           await spawn('zip', ['-r', '--symlinks', updateZipPath, './'], { |           await spawn('zip', ['-r', '--symlinks', updateZipPath, './'], { | ||||||
|             cwd: dir2 |             cwd: dir2 | ||||||
|           }) |           }) | ||||||
|  | @ -235,7 +235,7 @@ describeFn('autoUpdater behavior', function () { | ||||||
|               pub_date: (new Date()).toString() |               pub_date: (new Date()).toString() | ||||||
|             }) |             }) | ||||||
|           }) |           }) | ||||||
|           const relaunchPromise = new Promise((resolve, reject) => { |           const relaunchPromise = new Promise((resolve) => { | ||||||
|             server.get('/update-check/updated/:version', (req, res) => { |             server.get('/update-check/updated/:version', (req, res) => { | ||||||
|               res.status(204).send() |               res.status(204).send() | ||||||
|               resolve() |               resolve() | ||||||
|  |  | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| import * as chai from 'chai' | import * as chai from 'chai' | ||||||
| import dirtyChai = require('dirty-chai') |  | ||||||
| import * as ChildProcess from 'child_process' | import * as ChildProcess from 'child_process' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { BrowserView, BrowserWindow } from 'electron' | import { BrowserView, BrowserWindow } from 'electron' | ||||||
| import { closeWindow } from './window-helpers'; | import { closeWindow } from './window-helpers' | ||||||
|  | import dirtyChai = require('dirty-chai') | ||||||
| 
 | 
 | ||||||
| const { expect } = chai | const { expect } = chai | ||||||
| chai.use(dirtyChai) | chai.use(dirtyChai) | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ describe('BrowserWindow with affinity module', () => { | ||||||
|     const affinityWithNodeFalse = 'affinityWithNodeFalse' |     const affinityWithNodeFalse = 'affinityWithNodeFalse' | ||||||
| 
 | 
 | ||||||
|     function testNodeIntegration (present: boolean) { |     function testNodeIntegration (present: boolean) { | ||||||
|       return new Promise((resolve, reject) => { |       return new Promise((resolve) => { | ||||||
|         ipcMain.once('answer', (event, typeofProcess, typeofBuffer) => { |         ipcMain.once('answer', (event, typeofProcess, typeofBuffer) => { | ||||||
|           if (present) { |           if (present) { | ||||||
|             expect(typeofProcess).to.not.equal('undefined') |             expect(typeofProcess).to.not.equal('undefined') | ||||||
|  |  | ||||||
|  | @ -1,6 +1,5 @@ | ||||||
| import * as chai from 'chai' | import * as chai from 'chai' | ||||||
| import * as chaiAsPromised from 'chai-as-promised' | import * as chaiAsPromised from 'chai-as-promised' | ||||||
| import dirtyChai = require('dirty-chai') |  | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import * as fs from 'fs' | import * as fs from 'fs' | ||||||
| import * as os from 'os' | import * as os from 'os' | ||||||
|  | @ -12,6 +11,7 @@ import { app, BrowserWindow, BrowserView, ipcMain, OnBeforeSendHeadersListenerDe | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { ifit, ifdescribe } from './spec-helpers' | import { ifit, ifdescribe } from './spec-helpers' | ||||||
| import { closeWindow } from './window-helpers' | import { closeWindow } from './window-helpers' | ||||||
|  | import dirtyChai = require('dirty-chai') | ||||||
| 
 | 
 | ||||||
| const { expect } = chai | const { expect } = chai | ||||||
| 
 | 
 | ||||||
|  | @ -206,7 +206,7 @@ describe('BrowserWindow module', () => { | ||||||
|           backgroundThrottling: false |           backgroundThrottling: false | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       const windows = Array.from(Array(windowCount)).map(x => new BrowserWindow(windowOptions)) |       const windows = Array.from(Array(windowCount)).map(() => new BrowserWindow(windowOptions)) | ||||||
|       windows.forEach(win => win.show()) |       windows.forEach(win => win.show()) | ||||||
|       windows.forEach(win => win.focus()) |       windows.forEach(win => win.focus()) | ||||||
|       windows.forEach(win => win.destroy()) |       windows.forEach(win => win.destroy()) | ||||||
|  | @ -372,7 +372,7 @@ describe('BrowserWindow module', () => { | ||||||
|       it('sets the content type header on URL encoded forms', async () => { |       it('sets the content type header on URL encoded forms', async () => { | ||||||
|         await w.loadURL(url) |         await w.loadURL(url) | ||||||
|         const requestDetails: Promise<OnBeforeSendHeadersListenerDetails> = new Promise(resolve => { |         const requestDetails: Promise<OnBeforeSendHeadersListenerDetails> = new Promise(resolve => { | ||||||
|           w.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => { |           w.webContents.session.webRequest.onBeforeSendHeaders((details) => { | ||||||
|             resolve(details) |             resolve(details) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  | @ -388,7 +388,7 @@ describe('BrowserWindow module', () => { | ||||||
|       it('sets the content type header on multi part forms', async () => { |       it('sets the content type header on multi part forms', async () => { | ||||||
|         await w.loadURL(url) |         await w.loadURL(url) | ||||||
|         const requestDetails: Promise<OnBeforeSendHeadersListenerDetails> = new Promise(resolve => { |         const requestDetails: Promise<OnBeforeSendHeadersListenerDetails> = new Promise(resolve => { | ||||||
|           w.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => { |           w.webContents.session.webRequest.onBeforeSendHeaders((details) => { | ||||||
|             resolve(details) |             resolve(details) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  | @ -462,7 +462,7 @@ describe('BrowserWindow module', () => { | ||||||
|         server.close() |         server.close() | ||||||
|       }) |       }) | ||||||
|       it('is emitted on redirects', (done) => { |       it('is emitted on redirects', (done) => { | ||||||
|         w.webContents.on('will-redirect', (event, url) => { |         w.webContents.on('will-redirect', () => { | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|         w.loadURL(`${url}/302`) |         w.loadURL(`${url}/302`) | ||||||
|  | @ -473,7 +473,7 @@ describe('BrowserWindow module', () => { | ||||||
|         w.webContents.on('will-navigate', () => { |         w.webContents.on('will-navigate', () => { | ||||||
|           navigateCalled = true |           navigateCalled = true | ||||||
|         }) |         }) | ||||||
|         w.webContents.on('will-redirect', (event, url) => { |         w.webContents.on('will-redirect', () => { | ||||||
|           expect(navigateCalled).to.equal(true, 'should have called will-navigate first') |           expect(navigateCalled).to.equal(true, 'should have called will-navigate first') | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -485,7 +485,7 @@ describe('BrowserWindow module', () => { | ||||||
|         w.webContents.on('did-stop-loading', () => { |         w.webContents.on('did-stop-loading', () => { | ||||||
|           stopCalled = true |           stopCalled = true | ||||||
|         }) |         }) | ||||||
|         w.webContents.on('will-redirect', (event, url) => { |         w.webContents.on('will-redirect', () => { | ||||||
|           expect(stopCalled).to.equal(false, 'should not have called did-stop-loading first') |           expect(stopCalled).to.equal(false, 'should not have called did-stop-loading first') | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -493,7 +493,7 @@ describe('BrowserWindow module', () => { | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('allows the window to be closed from the event listener', (done) => { |       it('allows the window to be closed from the event listener', (done) => { | ||||||
|         w.webContents.once('will-redirect', (event, input) => { |         w.webContents.once('will-redirect', () => { | ||||||
|           w.close() |           w.close() | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -1136,7 +1136,7 @@ describe('BrowserWindow module', () => { | ||||||
|         } |         } | ||||||
|         res.end() |         res.end() | ||||||
|       }) |       }) | ||||||
|       server.on('connection', (connection) => { connections++ }) |       server.on('connection', () => { connections++ }) | ||||||
| 
 | 
 | ||||||
|       await new Promise(resolve => server.listen(0, '127.0.0.1', () => resolve())) |       await new Promise(resolve => server.listen(0, '127.0.0.1', () => resolve())) | ||||||
|       url = `http://127.0.0.1:${(server.address() as AddressInfo).port}` |       url = `http://127.0.0.1:${(server.address() as AddressInfo).port}` | ||||||
|  | @ -1150,11 +1150,8 @@ describe('BrowserWindow module', () => { | ||||||
| 
 | 
 | ||||||
|     it('calling preconnect() connects to the server', (done) => { |     it('calling preconnect() connects to the server', (done) => { | ||||||
|       w = new BrowserWindow({ show: false }) |       w = new BrowserWindow({ show: false }) | ||||||
|       w.webContents.on('did-start-navigation', (event, preconnectUrl, isInPlace, isMainFrame, frameProcessId, frameRoutingId) => { |       w.webContents.on('did-start-navigation', (event, url) => { | ||||||
|         w.webContents.session.preconnect({ |         w.webContents.session.preconnect({ url, numSockets: 4 }) | ||||||
|           url: preconnectUrl, |  | ||||||
|           numSockets: 4 |  | ||||||
|         }) |  | ||||||
|       }) |       }) | ||||||
|       w.webContents.on('did-finish-load', () => { |       w.webContents.on('did-finish-load', () => { | ||||||
|         expect(connections).to.equal(4) |         expect(connections).to.equal(4) | ||||||
|  | @ -1313,7 +1310,7 @@ describe('BrowserWindow module', () => { | ||||||
| 
 | 
 | ||||||
|     it('returns the window with the browserView', () => { |     it('returns the window with the browserView', () => { | ||||||
|       const w = new BrowserWindow({ show: false }) |       const w = new BrowserWindow({ show: false }) | ||||||
|       const bv = new BrowserView |       const bv = new BrowserView() | ||||||
|       w.setBrowserView(bv) |       w.setBrowserView(bv) | ||||||
|       expect(BrowserWindow.fromBrowserView(bv)!.id).to.equal(w.id) |       expect(BrowserWindow.fromBrowserView(bv)!.id).to.equal(w.id) | ||||||
|       // if BrowserView isn't explicitly destroyed, it will crash in GC later
 |       // if BrowserView isn't explicitly destroyed, it will crash in GC later
 | ||||||
|  | @ -1321,14 +1318,13 @@ describe('BrowserWindow module', () => { | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('returns undefined if not attached', () => { |     it('returns undefined if not attached', () => { | ||||||
|       const bv = new BrowserView |       const bv = new BrowserView() | ||||||
|       expect(BrowserWindow.fromBrowserView(bv)).to.be.null('BrowserWindow associated with bv') |       expect(BrowserWindow.fromBrowserView(bv)).to.be.null('BrowserWindow associated with bv') | ||||||
|       // if BrowserView isn't explicitly destroyed, it will crash in GC later
 |       // if BrowserView isn't explicitly destroyed, it will crash in GC later
 | ||||||
|       bv.destroy() |       bv.destroy() | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|   describe('BrowserWindow.setOpacity(opacity)', () => { |   describe('BrowserWindow.setOpacity(opacity)', () => { | ||||||
|     afterEach(closeAllWindows) |     afterEach(closeAllWindows) | ||||||
| 
 | 
 | ||||||
|  | @ -1398,7 +1394,7 @@ describe('BrowserWindow module', () => { | ||||||
|       const w = new BrowserWindow({ |       const w = new BrowserWindow({ | ||||||
|         show: false, |         show: false, | ||||||
|         width: 400, |         width: 400, | ||||||
|         height: 400, |         height: 400 | ||||||
|       }) |       }) | ||||||
|       const size = w.getSize() |       const size = w.getSize() | ||||||
|       expect(size).to.deep.equal([400, 400]) |       expect(size).to.deep.equal([400, 400]) | ||||||
|  | @ -1492,6 +1488,7 @@ describe('BrowserWindow module', () => { | ||||||
|     afterEach(closeAllWindows) |     afterEach(closeAllWindows) | ||||||
|     it('can be set on a window', () => { |     it('can be set on a window', () => { | ||||||
|       expect(() => { |       expect(() => { | ||||||
|  |         /* eslint-disable no-new */ | ||||||
|         new BrowserWindow({ |         new BrowserWindow({ | ||||||
|           tabbingIdentifier: 'group1' |           tabbingIdentifier: 'group1' | ||||||
|         }) |         }) | ||||||
|  | @ -1499,6 +1496,7 @@ describe('BrowserWindow module', () => { | ||||||
|           tabbingIdentifier: 'group2', |           tabbingIdentifier: 'group2', | ||||||
|           frame: false |           frame: false | ||||||
|         }) |         }) | ||||||
|  |         /* eslint-enable no-new */ | ||||||
|       }).not.to.throw() |       }).not.to.throw() | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
|  | @ -2191,7 +2189,7 @@ describe('BrowserWindow module', () => { | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|         w.loadFile(path.join(fixtures, 'api', 'native-window-open-iframe.html')) |         w.loadFile(path.join(fixtures, 'api', 'native-window-open-iframe.html')) | ||||||
|       }); |       }) | ||||||
|       ifit(!process.env.ELECTRON_SKIP_NATIVE_MODULE_TESTS)('loads native addons correctly after reload', async () => { |       ifit(!process.env.ELECTRON_SKIP_NATIVE_MODULE_TESTS)('loads native addons correctly after reload', async () => { | ||||||
|         w.loadFile(path.join(__dirname, 'fixtures', 'api', 'native-window-open-native-addon.html')) |         w.loadFile(path.join(__dirname, 'fixtures', 'api', 'native-window-open-native-addon.html')) | ||||||
|         { |         { | ||||||
|  | @ -2250,7 +2248,7 @@ describe('BrowserWindow module', () => { | ||||||
|           show: false, |           show: false, | ||||||
|           webPreferences: { |           webPreferences: { | ||||||
|             nodeIntegration: true, |             nodeIntegration: true, | ||||||
|             nativeWindowOpen: true, |             nativeWindowOpen: true | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|         w.loadFile(path.join(fixtures, 'api', 'native-window-open-argv.html')) |         w.loadFile(path.join(fixtures, 'api', 'native-window-open-argv.html')) | ||||||
|  | @ -2280,7 +2278,7 @@ describe('BrowserWindow module', () => { | ||||||
|           }))) |           }))) | ||||||
|         }) |         }) | ||||||
|         afterEach(async () => { |         afterEach(async () => { | ||||||
|           await Promise.all(protocols.map(([scheme,]) => { |           await Promise.all(protocols.map(([scheme]) => { | ||||||
|             return new Promise(resolve => protocol.unregisterProtocol(scheme, () => resolve())) |             return new Promise(resolve => protocol.unregisterProtocol(scheme, () => resolve())) | ||||||
|           })) |           })) | ||||||
|         }) |         }) | ||||||
|  | @ -2659,7 +2657,7 @@ describe('BrowserWindow module', () => { | ||||||
|       const w = new BrowserWindow({ show: false }) |       const w = new BrowserWindow({ show: false }) | ||||||
|       w.loadFile(path.join(fixtures, 'api', 'frame-subscriber.html')) |       w.loadFile(path.join(fixtures, 'api', 'frame-subscriber.html')) | ||||||
|       w.webContents.on('dom-ready', () => { |       w.webContents.on('dom-ready', () => { | ||||||
|         w.webContents.beginFrameSubscription(function (data) { |         w.webContents.beginFrameSubscription(function () { | ||||||
|           // Pending endFrameSubscription to next tick can reliably reproduce
 |           // Pending endFrameSubscription to next tick can reliably reproduce
 | ||||||
|           // a crash which happens when nothing is returned in the callback.
 |           // a crash which happens when nothing is returned in the callback.
 | ||||||
|           setTimeout(() => { |           setTimeout(() => { | ||||||
|  | @ -2853,6 +2851,7 @@ describe('BrowserWindow module', () => { | ||||||
|       w.once('sheet-begin', () => { |       w.once('sheet-begin', () => { | ||||||
|         done() |         done() | ||||||
|       }) |       }) | ||||||
|  |       // eslint-disable-next-line no-new
 | ||||||
|       new BrowserWindow({ |       new BrowserWindow({ | ||||||
|         modal: true, |         modal: true, | ||||||
|         parent: w |         parent: w | ||||||
|  | @ -3871,7 +3870,7 @@ describe('BrowserWindow module', () => { | ||||||
| 
 | 
 | ||||||
|     describe('window.webContents.isPainting()', () => { |     describe('window.webContents.isPainting()', () => { | ||||||
|       it('returns whether is currently painting', (done) => { |       it('returns whether is currently painting', (done) => { | ||||||
|         w.webContents.once('paint', function (event, rect, data) { |         w.webContents.once('paint', function () { | ||||||
|           expect(w.webContents.isPainting()).to.be.true('isPainting') |           expect(w.webContents.isPainting()).to.be.true('isPainting') | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -3895,7 +3894,7 @@ describe('BrowserWindow module', () => { | ||||||
|         w.webContents.on('dom-ready', () => { |         w.webContents.on('dom-ready', () => { | ||||||
|           w.webContents.stopPainting() |           w.webContents.stopPainting() | ||||||
|           w.webContents.startPainting() |           w.webContents.startPainting() | ||||||
|           w.webContents.once('paint', function (event, rect, data) { |           w.webContents.once('paint', function () { | ||||||
|             expect(w.webContents.isPainting()).to.be.true('isPainting') |             expect(w.webContents.isPainting()).to.be.true('isPainting') | ||||||
|             done() |             done() | ||||||
|           }) |           }) | ||||||
|  | @ -3907,7 +3906,7 @@ describe('BrowserWindow module', () => { | ||||||
|     // TODO(codebytere): remove in Electron v8.0.0
 |     // TODO(codebytere): remove in Electron v8.0.0
 | ||||||
|     describe('window.webContents.getFrameRate()', () => { |     describe('window.webContents.getFrameRate()', () => { | ||||||
|       it('has default frame rate', (done) => { |       it('has default frame rate', (done) => { | ||||||
|         w.webContents.once('paint', function (event, rect, data) { |         w.webContents.once('paint', function () { | ||||||
|           expect(w.webContents.getFrameRate()).to.equal(60) |           expect(w.webContents.getFrameRate()).to.equal(60) | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -3920,7 +3919,7 @@ describe('BrowserWindow module', () => { | ||||||
|       it('sets custom frame rate', (done) => { |       it('sets custom frame rate', (done) => { | ||||||
|         w.webContents.on('dom-ready', () => { |         w.webContents.on('dom-ready', () => { | ||||||
|           w.webContents.setFrameRate(30) |           w.webContents.setFrameRate(30) | ||||||
|           w.webContents.once('paint', function (event, rect, data) { |           w.webContents.once('paint', function () { | ||||||
|             expect(w.webContents.getFrameRate()).to.equal(30) |             expect(w.webContents.getFrameRate()).to.equal(30) | ||||||
|             done() |             done() | ||||||
|           }) |           }) | ||||||
|  | @ -3931,7 +3930,7 @@ describe('BrowserWindow module', () => { | ||||||
| 
 | 
 | ||||||
|     describe('window.webContents.FrameRate', () => { |     describe('window.webContents.FrameRate', () => { | ||||||
|       it('has default frame rate', (done) => { |       it('has default frame rate', (done) => { | ||||||
|         w.webContents.once('paint', function (event, rect, data) { |         w.webContents.once('paint', function () { | ||||||
|           expect(w.webContents.frameRate).to.equal(60) |           expect(w.webContents.frameRate).to.equal(60) | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -3941,7 +3940,7 @@ describe('BrowserWindow module', () => { | ||||||
|       it('sets custom frame rate', (done) => { |       it('sets custom frame rate', (done) => { | ||||||
|         w.webContents.on('dom-ready', () => { |         w.webContents.on('dom-ready', () => { | ||||||
|           w.webContents.frameRate = 30 |           w.webContents.frameRate = 30 | ||||||
|           w.webContents.once('paint', function (event, rect, data) { |           w.webContents.once('paint', function () { | ||||||
|             expect(w.webContents.frameRate).to.equal(30) |             expect(w.webContents.frameRate).to.equal(30) | ||||||
|             done() |             done() | ||||||
|           }) |           }) | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { CallbacksRegistry } from '../lib/renderer/remote/callbacks-registry' | import { CallbacksRegistry } from '../lib/renderer/remote/callbacks-registry' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -67,9 +67,8 @@ describe('contextBridge', () => { | ||||||
|         await w.loadFile(path.resolve(fixturesPath, 'empty.html')) |         await w.loadFile(path.resolve(fixturesPath, 'empty.html')) | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       const callWithBindings = async (fn: Function) => { |       const callWithBindings = (fn: Function) => | ||||||
|         return await w.webContents.executeJavaScript(`(${fn.toString()})(window)`) |         w.webContents.executeJavaScript(`(${fn.toString()})(window)`) | ||||||
|       } |  | ||||||
| 
 | 
 | ||||||
|       const getGCInfo = async (): Promise<{ |       const getGCInfo = async (): Promise<{ | ||||||
|         functionCount: number |         functionCount: number | ||||||
|  | @ -84,7 +83,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy numbers', async () => { |       it('should proxy numbers', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myNumber: 123, |             myNumber: 123 | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -96,7 +95,7 @@ describe('contextBridge', () => { | ||||||
|       it('should make properties unwriteable', async () => { |       it('should make properties unwriteable', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myNumber: 123, |             myNumber: 123 | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -109,7 +108,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy strings', async () => { |       it('should proxy strings', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myString: 'my-words', |             myString: 'my-words' | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -121,7 +120,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy arrays', async () => { |       it('should proxy arrays', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myArr: [123, 'my-words'], |             myArr: [123, 'my-words'] | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -133,7 +132,7 @@ describe('contextBridge', () => { | ||||||
|       it('should make arrays immutable', async () => { |       it('should make arrays immutable', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myArr: [123, 'my-words'], |             myArr: [123, 'my-words'] | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const immutable = await callWithBindings((root: any) => { |         const immutable = await callWithBindings((root: any) => { | ||||||
|  | @ -150,7 +149,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy booleans', async () => { |       it('should proxy booleans', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myBool: true, |             myBool: true | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -162,11 +161,11 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy promises and resolve with the correct value', async () => { |       it('should proxy promises and resolve with the correct value', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myPromise: Promise.resolve('i-resolved'), |             myPromise: Promise.resolve('i-resolved') | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|           return await root.example.myPromise |           return root.example.myPromise | ||||||
|         }) |         }) | ||||||
|         expect(result).to.equal('i-resolved') |         expect(result).to.equal('i-resolved') | ||||||
|       }) |       }) | ||||||
|  | @ -174,7 +173,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy promises and reject with the correct value', async () => { |       it('should proxy promises and reject with the correct value', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myPromise: Promise.reject('i-rejected'), |             myPromise: Promise.reject(new Error('i-rejected')) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings(async (root: any) => { | ||||||
|  | @ -185,17 +184,17 @@ describe('contextBridge', () => { | ||||||
|             return err |             return err | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|         expect(result).to.equal('i-rejected') |         expect(result).to.be.an.instanceOf(Error).with.property('message', 'Uncaught Error: i-rejected') | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('should proxy promises and resolve with the correct value if it resolves later', async () => { |       it('should proxy promises and resolve with the correct value if it resolves later', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myPromise: () => new Promise(r => setTimeout(() => r('delayed'), 20)), |             myPromise: () => new Promise(resolve => setTimeout(() => resolve('delayed'), 20)) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|           return await root.example.myPromise() |           return root.example.myPromise() | ||||||
|         }) |         }) | ||||||
|         expect(result).to.equal('delayed') |         expect(result).to.equal('delayed') | ||||||
|       }) |       }) | ||||||
|  | @ -203,11 +202,11 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy nested promises correctly', async () => { |       it('should proxy nested promises correctly', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             myPromise: () => new Promise(r => setTimeout(() => r(Promise.resolve(123)), 20)), |             myPromise: () => new Promise(resolve => setTimeout(() => resolve(Promise.resolve(123)), 20)) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|           return await root.example.myPromise() |           return root.example.myPromise() | ||||||
|         }) |         }) | ||||||
|         expect(result).to.equal(123) |         expect(result).to.equal(123) | ||||||
|       }) |       }) | ||||||
|  | @ -242,7 +241,7 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy methods in the reverse direction', async () => { |       it('should proxy methods in the reverse direction', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             callWithNumber: (fn: any) => fn(123), |             callWithNumber: (fn: any) => fn(123) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings(async (root: any) => { | ||||||
|  | @ -254,11 +253,11 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy promises in the reverse direction', async () => { |       it('should proxy promises in the reverse direction', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             getPromiseValue: async (p: Promise<any>) => await p, |             getPromiseValue: (p: Promise<any>) => p | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings(async (root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|           return await root.example.getPromiseValue(Promise.resolve('my-proxied-value')) |           return root.example.getPromiseValue(Promise.resolve('my-proxied-value')) | ||||||
|         }) |         }) | ||||||
|         expect(result).to.equal('my-proxied-value') |         expect(result).to.equal('my-proxied-value') | ||||||
|       }) |       }) | ||||||
|  | @ -266,8 +265,8 @@ describe('contextBridge', () => { | ||||||
|       it('should proxy objects with number keys', async () => { |       it('should proxy objects with number keys', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             [1]: 123, |             1: 123, | ||||||
|             [2]: 456, |             2: 456, | ||||||
|             '3': 789 |             '3': 789 | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  | @ -299,7 +298,10 @@ describe('contextBridge', () => { | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|           return [root.example.arr.__proto__ === Uint8Array.prototype, root.example.regexp.__proto__ === RegExp.prototype] |           return [ | ||||||
|  |             Object.getPrototypeOf(root.example.arr) === Uint8Array.prototype, | ||||||
|  |             Object.getPrototypeOf(root.example.regexp) === RegExp.prototype | ||||||
|  |           ] | ||||||
|         }) |         }) | ||||||
|         expect(result).to.deep.equal([true, true]) |         expect(result).to.deep.equal([true, true]) | ||||||
|       }) |       }) | ||||||
|  | @ -309,7 +311,7 @@ describe('contextBridge', () => { | ||||||
|           const o: any = { value: 135 } |           const o: any = { value: 135 } | ||||||
|           o.o = o |           o.o = o | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             o, |             o | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -325,7 +327,7 @@ describe('contextBridge', () => { | ||||||
|           o.a = sub |           o.a = sub | ||||||
|           o.b = sub |           o.b = sub | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             o, |             o | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -344,7 +346,7 @@ describe('contextBridge', () => { | ||||||
|               } else { |               } else { | ||||||
|                 return first === arg |                 return first === arg | ||||||
|               } |               } | ||||||
|             }, |             } | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|         const result = await callWithBindings((root: any) => { |         const result = await callWithBindings((root: any) => { | ||||||
|  | @ -421,7 +423,7 @@ describe('contextBridge', () => { | ||||||
|         it('should release the global hold on objects sent across contexts when the object source is de-reffed', async () => { |         it('should release the global hold on objects sent across contexts when the object source is de-reffed', async () => { | ||||||
|           await makeBindingWindow(() => { |           await makeBindingWindow(() => { | ||||||
|             require('electron').ipcRenderer.on('get-gc-info', e => e.sender.send('gc-info', (contextBridge as any).debugGC())) |             require('electron').ipcRenderer.on('get-gc-info', e => e.sender.send('gc-info', (contextBridge as any).debugGC())) | ||||||
|             let myObj: any; |             let myObj: any | ||||||
|             contextBridge.exposeInMainWorld('example', { |             contextBridge.exposeInMainWorld('example', { | ||||||
|               setObj: (o: any) => { |               setObj: (o: any) => { | ||||||
|                 myObj = o |                 myObj = o | ||||||
|  | @ -463,7 +465,7 @@ describe('contextBridge', () => { | ||||||
|         it('should not crash when the object source is de-reffed AND the object proxy is de-reffed', async () => { |         it('should not crash when the object source is de-reffed AND the object proxy is de-reffed', async () => { | ||||||
|           await makeBindingWindow(() => { |           await makeBindingWindow(() => { | ||||||
|             require('electron').ipcRenderer.on('get-gc-info', e => e.sender.send('gc-info', (contextBridge as any).debugGC())) |             require('electron').ipcRenderer.on('get-gc-info', e => e.sender.send('gc-info', (contextBridge as any).debugGC())) | ||||||
|             let myObj: any; |             let myObj: any | ||||||
|             contextBridge.exposeInMainWorld('example', { |             contextBridge.exposeInMainWorld('example', { | ||||||
|               setObj: (o: any) => { |               setObj: (o: any) => { | ||||||
|                 myObj = o |                 myObj = o | ||||||
|  | @ -529,8 +531,8 @@ describe('contextBridge', () => { | ||||||
|       it('should work with complex nested methods and promises', async () => { |       it('should work with complex nested methods and promises', async () => { | ||||||
|         await makeBindingWindow(() => { |         await makeBindingWindow(() => { | ||||||
|           contextBridge.exposeInMainWorld('example', { |           contextBridge.exposeInMainWorld('example', { | ||||||
|             first: (second: Function) => second(async (fourth: Function) => { |             first: (second: Function) => second((fourth: Function) => { | ||||||
|               return await fourth() |               return fourth() | ||||||
|             }) |             }) | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  | @ -594,7 +596,7 @@ describe('contextBridge', () => { | ||||||
|               string: 'string', |               string: 'string', | ||||||
|               boolean: true, |               boolean: true, | ||||||
|               arr: [123, 'string', true, ['foo']], |               arr: [123, 'string', true, ['foo']], | ||||||
|               getPromise: async () => ({ number: 123, string: 'string', boolean: true, fn: () => 'string', arr: [123, 'string', true, ['foo']]}), |               getPromise: async () => ({ number: 123, string: 'string', boolean: true, fn: () => 'string', arr: [123, 'string', true, ['foo']] }) | ||||||
|             }, |             }, | ||||||
|             receiveArguments: (fn: any) => fn({ key: 'value' }) |             receiveArguments: (fn: any) => fn({ key: 'value' }) | ||||||
|           }) |           }) | ||||||
|  | @ -666,7 +668,7 @@ describe('contextBridge', () => { | ||||||
|             [arg.key, String] |             [arg.key, String] | ||||||
|           ] |           ] | ||||||
|           return { |           return { | ||||||
|             protoMatches: protoChecks.map(([a, Constructor]) => a.__proto__ === Constructor.prototype) |             protoMatches: protoChecks.map(([a, Constructor]) => Object.getPrototypeOf(a) === Constructor.prototype) | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|         // Every protomatch should be true
 |         // Every protomatch should be true
 | ||||||
|  |  | ||||||
|  | @ -18,8 +18,7 @@ const afterTest: ((() => void) | (() => Promise<void>))[] = [] | ||||||
| async function cleanup () { | async function cleanup () { | ||||||
|   for (const cleanup of afterTest) { |   for (const cleanup of afterTest) { | ||||||
|     const r = cleanup() |     const r = cleanup() | ||||||
|     if (r instanceof Promise) |     if (r instanceof Promise) { await r } | ||||||
|       await r |  | ||||||
|   } |   } | ||||||
|   afterTest.length = 0 |   afterTest.length = 0 | ||||||
| } | } | ||||||
|  | @ -351,7 +350,7 @@ ifdescribe(!process.mas && !process.env.DISABLE_CRASH_REPORTER_TESTS && process. | ||||||
| type CrashInfo = { | type CrashInfo = { | ||||||
|   prod: string |   prod: string | ||||||
|   ver: string |   ver: string | ||||||
|   process_type: string |   process_type: string // eslint-disable-line camelcase
 | ||||||
|   platform: string |   platform: string | ||||||
|   extra1: string |   extra1: string | ||||||
|   extra2: string |   extra2: string | ||||||
|  | @ -395,7 +394,7 @@ let crashReporterPort = 0 | ||||||
| const startServer = async () => { | const startServer = async () => { | ||||||
|   const crashes: CrashInfo[] = [] |   const crashes: CrashInfo[] = [] | ||||||
|   function getCrashes () { return crashes } |   function getCrashes () { return crashes } | ||||||
|   const emitter = new EventEmitter |   const emitter = new EventEmitter() | ||||||
|   function waitForCrash (): Promise<CrashInfo> { |   function waitForCrash (): Promise<CrashInfo> { | ||||||
|     return new Promise(resolve => { |     return new Promise(resolve => { | ||||||
|       emitter.once('crash', (crash) => { |       emitter.once('crash', (crash) => { | ||||||
|  |  | ||||||
|  | @ -82,7 +82,7 @@ describe('debugger module', () => { | ||||||
|       w.webContents.once('devtools-opened', () => { |       w.webContents.once('devtools-opened', () => { | ||||||
|         w.webContents.debugger.detach() |         w.webContents.debugger.detach() | ||||||
|       }) |       }) | ||||||
|       w.webContents.debugger.on('detach', (e, reason) => { |       w.webContents.debugger.on('detach', () => { | ||||||
|         expect(w.webContents.debugger.isAttached()).to.be.false() |         expect(w.webContents.debugger.isAttached()).to.be.false() | ||||||
|         expect((w as any).devToolsWebContents.isDestroyed()).to.be.false() |         expect((w as any).devToolsWebContents.isDestroyed()).to.be.false() | ||||||
|         done() |         done() | ||||||
|  | @ -201,7 +201,7 @@ describe('debugger module', () => { | ||||||
|         done(`unexpected error : ${err}`) |         done(`unexpected error : ${err}`) | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       w.webContents.debugger.on('message', (event, method, params) => { |       w.webContents.debugger.on('message', (event, method) => { | ||||||
|         // loadingFinished indicates that page has been loaded and it did not
 |         // loadingFinished indicates that page has been loaded and it did not
 | ||||||
|         // crash because of invalid UTF-8 data
 |         // crash because of invalid UTF-8 data
 | ||||||
|         if (method === 'Network.loadingFinished') { |         if (method === 'Network.loadingFinished') { | ||||||
|  |  | ||||||
|  | @ -208,7 +208,7 @@ describe('deprecate', () => { | ||||||
|       deprecate.setHandler(null) |       deprecate.setHandler(null) | ||||||
|       process.throwDeprecation = true |       process.throwDeprecation = true | ||||||
| 
 | 
 | ||||||
|       promiseFunc = param => new Promise((resolve, reject) => resolve(param)) |       promiseFunc = param => new Promise((resolve) => resolve(param)) | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('acts as a pass-through for promise-based invocations', async () => { |     it('acts as a pass-through for promise-based invocations', async () => { | ||||||
|  | @ -233,13 +233,13 @@ describe('deprecate', () => { | ||||||
|           (erringPromiseFunc as any)((err: Error | undefined, data: any) => { |           (erringPromiseFunc as any)((err: Error | undefined, data: any) => { | ||||||
|             resolve([err, data]) |             resolve([err, data]) | ||||||
|           }).catch(() => { /* silence deprecation warning */ }) |           }).catch(() => { /* silence deprecation warning */ }) | ||||||
|         }); |         }) | ||||||
|         expect(data).to.be.undefined() |         expect(data).to.be.undefined() | ||||||
|         expect(err).to.be.an.instanceOf(Error).with.property('message', 'fail') |         expect(err).to.be.an.instanceOf(Error).with.property('message', 'fail') | ||||||
|       } |       } | ||||||
|       { |       { | ||||||
|         const data = await new Promise(resolve => { |         const data = await new Promise(resolve => { | ||||||
|           (erringPromiseFunc as any)(((data: any) => { resolve(data) })) |           (erringPromiseFunc as any)((data: any) => { resolve(data) }) | ||||||
|             .catch(() => { /* silence deprecation warning */ }) |             .catch(() => { /* silence deprecation warning */ }) | ||||||
|         }) |         }) | ||||||
|         expect(data).to.be.undefined() |         expect(data).to.be.undefined() | ||||||
|  |  | ||||||
|  | @ -1,8 +1,8 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { desktopCapturer, screen, BrowserWindow, SourcesOptions } from 'electron' | import { desktopCapturer, screen, BrowserWindow, SourcesOptions } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { ifdescribe, ifit } from './spec-helpers'; | import { ifdescribe, ifit } from './spec-helpers' | ||||||
| import { closeAllWindows } from './window-helpers'; | import { closeAllWindows } from './window-helpers' | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -77,7 +77,7 @@ describe('dialog module', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   describe('showMessageBox', () => { |   describe('showMessageBox', () => { | ||||||
|     afterEach(closeAllWindows); |     afterEach(closeAllWindows) | ||||||
| 
 | 
 | ||||||
|     // parentless message boxes are synchronous on macOS
 |     // parentless message boxes are synchronous on macOS
 | ||||||
|     // dangling message boxes on windows cause a DCHECK: https://cs.chromium.org/chromium/src/base/win/message_window.cc?l=68&rcl=7faa4bf236a866d007dc5672c9ce42660e67a6a6
 |     // dangling message boxes on windows cause a DCHECK: https://cs.chromium.org/chromium/src/base/win/message_window.cc?l=68&rcl=7faa4bf236a866d007dc5672c9ce42660e67a6a6
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ import { expect } from 'chai' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import { ipcMain, BrowserWindow, WebContents, WebPreferences, webContents } from 'electron' | import { ipcMain, BrowserWindow, WebContents, WebPreferences, webContents } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { closeWindow } from './window-helpers'; | import { closeWindow } from './window-helpers' | ||||||
| 
 | 
 | ||||||
| describe('ipcRenderer module', () => { | describe('ipcRenderer module', () => { | ||||||
|   const fixtures = path.join(__dirname, '..', 'spec', 'fixtures') |   const fixtures = path.join(__dirname, '..', 'spec', 'fixtures') | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ chai.use(chaiAsPromised) | ||||||
| 
 | 
 | ||||||
| describe('ipc module', () => { | describe('ipc module', () => { | ||||||
|   describe('invoke', () => { |   describe('invoke', () => { | ||||||
|     let w = (null as unknown as BrowserWindow); |     let w = (null as unknown as BrowserWindow) | ||||||
| 
 | 
 | ||||||
|     before(async () => { |     before(async () => { | ||||||
|       w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } }) |       w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } }) | ||||||
|  | @ -111,7 +111,7 @@ describe('ipc module', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   describe('ordering', () => { |   describe('ordering', () => { | ||||||
|     let w = (null as unknown as BrowserWindow); |     let w = (null as unknown as BrowserWindow) | ||||||
| 
 | 
 | ||||||
|     before(async () => { |     before(async () => { | ||||||
|       w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } }) |       w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } }) | ||||||
|  | @ -126,21 +126,21 @@ describe('ipc module', () => { | ||||||
|       ipcMain.on('test-async', (e, i) => { received.push(i) }) |       ipcMain.on('test-async', (e, i) => { received.push(i) }) | ||||||
|       ipcMain.on('test-sync', (e, i) => { received.push(i); e.returnValue = null }) |       ipcMain.on('test-sync', (e, i) => { received.push(i); e.returnValue = null }) | ||||||
|       const done = new Promise(resolve => ipcMain.once('done', () => { resolve() })) |       const done = new Promise(resolve => ipcMain.once('done', () => { resolve() })) | ||||||
|       try { |  | ||||||
|       function rendererStressTest () { |       function rendererStressTest () { | ||||||
|         const { ipcRenderer } = require('electron') |         const { ipcRenderer } = require('electron') | ||||||
|         for (let i = 0; i < 1000; i++) { |         for (let i = 0; i < 1000; i++) { | ||||||
|           switch ((Math.random() * 2) | 0) { |           switch ((Math.random() * 2) | 0) { | ||||||
|             case 0: |             case 0: | ||||||
|               ipcRenderer.send('test-async', i) |               ipcRenderer.send('test-async', i) | ||||||
|                 break; |               break | ||||||
|             case 1: |             case 1: | ||||||
|               ipcRenderer.sendSync('test-sync', i) |               ipcRenderer.sendSync('test-sync', i) | ||||||
|                 break; |               break | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|         ipcRenderer.send('done') |         ipcRenderer.send('done') | ||||||
|       } |       } | ||||||
|  |       try { | ||||||
|         w.webContents.executeJavaScript(`(${rendererStressTest})()`) |         w.webContents.executeJavaScript(`(${rendererStressTest})()`) | ||||||
|         await done |         await done | ||||||
|       } finally { |       } finally { | ||||||
|  | @ -157,24 +157,24 @@ describe('ipc module', () => { | ||||||
|       ipcMain.on('test-async', (e, i) => { received.push(i) }) |       ipcMain.on('test-async', (e, i) => { received.push(i) }) | ||||||
|       ipcMain.on('test-sync', (e, i) => { received.push(i); e.returnValue = null }) |       ipcMain.on('test-sync', (e, i) => { received.push(i); e.returnValue = null }) | ||||||
|       const done = new Promise(resolve => ipcMain.once('done', () => { resolve() })) |       const done = new Promise(resolve => ipcMain.once('done', () => { resolve() })) | ||||||
|       try { |  | ||||||
|       function rendererStressTest () { |       function rendererStressTest () { | ||||||
|         const { ipcRenderer } = require('electron') |         const { ipcRenderer } = require('electron') | ||||||
|         for (let i = 0; i < 1000; i++) { |         for (let i = 0; i < 1000; i++) { | ||||||
|           switch ((Math.random() * 3) | 0) { |           switch ((Math.random() * 3) | 0) { | ||||||
|             case 0: |             case 0: | ||||||
|               ipcRenderer.send('test-async', i) |               ipcRenderer.send('test-async', i) | ||||||
|                 break; |               break | ||||||
|             case 1: |             case 1: | ||||||
|               ipcRenderer.sendSync('test-sync', i) |               ipcRenderer.sendSync('test-sync', i) | ||||||
|                 break; |               break | ||||||
|             case 2: |             case 2: | ||||||
|               ipcRenderer.invoke('test-invoke', i) |               ipcRenderer.invoke('test-invoke', i) | ||||||
|                 break; |               break | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|         ipcRenderer.send('done') |         ipcRenderer.send('done') | ||||||
|       } |       } | ||||||
|  |       try { | ||||||
|         w.webContents.executeJavaScript(`(${rendererStressTest})()`) |         w.webContents.executeJavaScript(`(${rendererStressTest})()`) | ||||||
|         await done |         await done | ||||||
|       } finally { |       } finally { | ||||||
|  |  | ||||||
|  | @ -1,8 +1,7 @@ | ||||||
| import { BrowserWindow, app, Menu, MenuItem, MenuItemConstructorOptions } from 'electron' | import { BrowserWindow, app, Menu, MenuItem, MenuItemConstructorOptions } from 'electron' | ||||||
| const { roleList, execute } = require('../lib/browser/api/menu-item-roles') |  | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { closeAllWindows } from './window-helpers'; | import { closeAllWindows } from './window-helpers' | ||||||
| 
 | const { roleList, execute } = require('../lib/browser/api/menu-item-roles') | ||||||
| 
 | 
 | ||||||
| describe('MenuItems', () => { | describe('MenuItems', () => { | ||||||
|   describe('MenuItem instance properties', () => { |   describe('MenuItem instance properties', () => { | ||||||
|  | @ -48,7 +47,7 @@ describe('MenuItems', () => { | ||||||
|           expect(item.label).to.equal('text') |           expect(item.label).to.equal('text') | ||||||
|           done() |           done() | ||||||
|         } |         } | ||||||
|       }]); |       }]) | ||||||
|       menu.delegate.executeCommand(menu, {}, menu.items[0].commandId) |       menu.delegate.executeCommand(menu, {}, menu.items[0].commandId) | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ import * as os from 'os' | ||||||
| import * as semver from 'semver' | import * as semver from 'semver' | ||||||
| 
 | 
 | ||||||
| import { delay, ifdescribe } from './spec-helpers' | import { delay, ifdescribe } from './spec-helpers' | ||||||
| import { emittedOnce } from './events-helpers'; | import { emittedOnce } from './events-helpers' | ||||||
| 
 | 
 | ||||||
| describe('nativeTheme module', () => { | describe('nativeTheme module', () => { | ||||||
|   describe('nativeTheme.shouldUseDarkColors', () => { |   describe('nativeTheme.shouldUseDarkColors', () => { | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import * as os from 'os' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import * as ChildProcess from 'child_process' | import * as ChildProcess from 'child_process' | ||||||
| import { session, net } from 'electron' | import { session, net } from 'electron' | ||||||
| import { Socket, AddressInfo } from 'net'; | import { Socket, AddressInfo } from 'net' | ||||||
| import { ifit } from './spec-helpers' | import { ifit } from './spec-helpers' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| 
 | 
 | ||||||
|  | @ -89,7 +89,7 @@ describe('netLog module', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   it('should include cookies when requested', async () => { |   it('should include cookies when requested', async () => { | ||||||
|     await testNetLog().startLogging(dumpFileDynamic, {captureMode: "includeSensitive"}) |     await testNetLog().startLogging(dumpFileDynamic, { captureMode: 'includeSensitive' }) | ||||||
|     const unique = require('uuid').v4() |     const unique = require('uuid').v4() | ||||||
|     await new Promise((resolve) => { |     await new Promise((resolve) => { | ||||||
|       const req = net.request(serverUrl) |       const req = net.request(serverUrl) | ||||||
|  | @ -107,7 +107,7 @@ describe('netLog module', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   it('should include socket bytes when requested', async () => { |   it('should include socket bytes when requested', async () => { | ||||||
|     await testNetLog().startLogging(dumpFileDynamic, {captureMode: "everything"}) |     await testNetLog().startLogging(dumpFileDynamic, { captureMode: 'everything' }) | ||||||
|     const unique = require('uuid').v4() |     const unique = require('uuid').v4() | ||||||
|     await new Promise((resolve) => { |     await new Promise((resolve) => { | ||||||
|       const req = net.request({ method: 'POST', url: serverUrl }) |       const req = net.request({ method: 'POST', url: serverUrl }) | ||||||
|  |  | ||||||
|  | @ -39,8 +39,7 @@ function respondOnce(fn: http.RequestListener): Promise<string> { | ||||||
|     const server = http.createServer((request, response) => { |     const server = http.createServer((request, response) => { | ||||||
|       fn(request, response) |       fn(request, response) | ||||||
|       // don't close if a redirect was returned
 |       // don't close if a redirect was returned
 | ||||||
|       if (response.statusCode < 300 || response.statusCode >= 399) |       if (response.statusCode < 300 || response.statusCode >= 399) { server.close() } | ||||||
|         server.close() |  | ||||||
|     }) |     }) | ||||||
|     server.listen(0, '127.0.0.1', () => { |     server.listen(0, '127.0.0.1', () => { | ||||||
|       resolve(`http://127.0.0.1:${(server.address() as AddressInfo).port}`) |       resolve(`http://127.0.0.1:${(server.address() as AddressInfo).port}`) | ||||||
|  | @ -459,7 +458,7 @@ describe('net module', () => { | ||||||
|         let requestAbortEventEmitted = false |         let requestAbortEventEmitted = false | ||||||
| 
 | 
 | ||||||
|         const urlRequest = net.request(serverUrl) |         const urlRequest = net.request(serverUrl) | ||||||
|         urlRequest.on('response', (response) => { |         urlRequest.on('response', () => { | ||||||
|           expect.fail('Unexpected response event') |           expect.fail('Unexpected response event') | ||||||
|         }) |         }) | ||||||
|         urlRequest.on('finish', () => { |         urlRequest.on('finish', () => { | ||||||
|  | @ -484,14 +483,14 @@ describe('net module', () => { | ||||||
|     it('it should be able to abort an HTTP request before request end', (done) => { |     it('it should be able to abort an HTTP request before request end', (done) => { | ||||||
|       let requestReceivedByServer = false |       let requestReceivedByServer = false | ||||||
|       let urlRequest: ClientRequest | null = null |       let urlRequest: ClientRequest | null = null | ||||||
|       respondOnce.toSingleURL((request, response) => { |       respondOnce.toSingleURL(() => { | ||||||
|         requestReceivedByServer = true |         requestReceivedByServer = true | ||||||
|         urlRequest!.abort() |         urlRequest!.abort() | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         let requestAbortEventEmitted = false |         let requestAbortEventEmitted = false | ||||||
| 
 | 
 | ||||||
|         urlRequest = net.request(serverUrl) |         urlRequest = net.request(serverUrl) | ||||||
|         urlRequest.on('response', (response) => { |         urlRequest.on('response', () => { | ||||||
|           expect.fail('Unexpected response event') |           expect.fail('Unexpected response event') | ||||||
|         }) |         }) | ||||||
|         urlRequest.on('finish', () => { |         urlRequest.on('finish', () => { | ||||||
|  | @ -530,7 +529,7 @@ describe('net module', () => { | ||||||
|         let requestFinishEventEmitted = false |         let requestFinishEventEmitted = false | ||||||
| 
 | 
 | ||||||
|         urlRequest = net.request(serverUrl) |         urlRequest = net.request(serverUrl) | ||||||
|         urlRequest.on('response', (response) => { |         urlRequest.on('response', () => { | ||||||
|           expect.fail('Unexpected response event') |           expect.fail('Unexpected response event') | ||||||
|         }) |         }) | ||||||
|         urlRequest.on('finish', () => { |         urlRequest.on('finish', () => { | ||||||
|  | @ -571,8 +570,7 @@ describe('net module', () => { | ||||||
|           requestResponseEventEmitted = true |           requestResponseEventEmitted = true | ||||||
|           const statusCode = response.statusCode |           const statusCode = response.statusCode | ||||||
|           expect(statusCode).to.equal(200) |           expect(statusCode).to.equal(200) | ||||||
|           response.on('data', (chunk) => { |           response.on('data', () => {}) | ||||||
|           }) |  | ||||||
|           response.on('end', () => { |           response.on('end', () => { | ||||||
|             expect.fail('Unexpected end event') |             expect.fail('Unexpected end event') | ||||||
|           }) |           }) | ||||||
|  | @ -608,7 +606,7 @@ describe('net module', () => { | ||||||
|     it('abort event should be emitted at most once', (done) => { |     it('abort event should be emitted at most once', (done) => { | ||||||
|       let requestReceivedByServer = false |       let requestReceivedByServer = false | ||||||
|       let urlRequest: ClientRequest | null = null |       let urlRequest: ClientRequest | null = null | ||||||
|       respondOnce.toSingleURL((request, response) => { |       respondOnce.toSingleURL(() => { | ||||||
|         requestReceivedByServer = true |         requestReceivedByServer = true | ||||||
|         urlRequest!.abort() |         urlRequest!.abort() | ||||||
|         urlRequest!.abort() |         urlRequest!.abort() | ||||||
|  | @ -721,7 +719,7 @@ describe('net module', () => { | ||||||
|           requestIsRedirected = true |           requestIsRedirected = true | ||||||
|           response.end() |           response.end() | ||||||
|         }).then(serverUrl => { |         }).then(serverUrl => { | ||||||
|           session.defaultSession.webRequest.onBeforeRequest((details, callback) => { |           session.defaultSession.webRequest.onBeforeRequest(() => { | ||||||
|             expect.fail('Request should not be intercepted by the default session') |             expect.fail('Request should not be intercepted by the default session') | ||||||
|           }) |           }) | ||||||
| 
 | 
 | ||||||
|  | @ -748,8 +746,7 @@ describe('net module', () => { | ||||||
|           }) |           }) | ||||||
|           urlRequest.on('response', (response) => { |           urlRequest.on('response', (response) => { | ||||||
|             expect(response.statusCode).to.equal(200) |             expect(response.statusCode).to.equal(200) | ||||||
|             response.on('data', (chunk) => { |             response.on('data', () => {}) | ||||||
|             }) |  | ||||||
|             response.on('end', () => { |             response.on('end', () => { | ||||||
|               expect(requestIsRedirected).to.be.true('The server should receive a request to the forward URL') |               expect(requestIsRedirected).to.be.true('The server should receive a request to the forward URL') | ||||||
|               expect(requestIsIntercepted).to.be.true('The request should be intercepted by the webRequest module') |               expect(requestIsIntercepted).to.be.true('The request should be intercepted by the webRequest module') | ||||||
|  | @ -769,7 +766,7 @@ describe('net module', () => { | ||||||
|           requestIsRedirected = true |           requestIsRedirected = true | ||||||
|           response.end() |           response.end() | ||||||
|         }).then(serverUrl => { |         }).then(serverUrl => { | ||||||
|           session.defaultSession.webRequest.onBeforeRequest((details, callback) => { |           session.defaultSession.webRequest.onBeforeRequest(() => { | ||||||
|             expect.fail('Request should not be intercepted by the default session') |             expect.fail('Request should not be intercepted by the default session') | ||||||
|           }) |           }) | ||||||
| 
 | 
 | ||||||
|  | @ -796,8 +793,7 @@ describe('net module', () => { | ||||||
|           }) |           }) | ||||||
|           urlRequest.on('response', (response) => { |           urlRequest.on('response', (response) => { | ||||||
|             expect(response.statusCode).to.equal(200) |             expect(response.statusCode).to.equal(200) | ||||||
|             response.on('data', (chunk) => { |             response.on('data', () => {}) | ||||||
|             }) |  | ||||||
|             response.on('end', () => { |             response.on('end', () => { | ||||||
|               expect(requestIsRedirected).to.be.true('The server should receive a request to the forward URL') |               expect(requestIsRedirected).to.be.true('The server should receive a request to the forward URL') | ||||||
|               expect(requestIsIntercepted).to.be.true('The request should be intercepted by the webRequest module') |               expect(requestIsIntercepted).to.be.true('The request should be intercepted by the webRequest module') | ||||||
|  | @ -849,7 +845,7 @@ describe('net module', () => { | ||||||
|         '/200': (request, response) => { |         '/200': (request, response) => { | ||||||
|           response.statusCode = 200 |           response.statusCode = 200 | ||||||
|           response.end() |           response.end() | ||||||
|         }, |         } | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         const urlRequest = net.request({ |         const urlRequest = net.request({ | ||||||
|           url: `${serverUrl}${requestUrl}` |           url: `${serverUrl}${requestUrl}` | ||||||
|  | @ -877,7 +873,7 @@ describe('net module', () => { | ||||||
|         '/200': (request, response) => { |         '/200': (request, response) => { | ||||||
|           response.statusCode = 200 |           response.statusCode = 200 | ||||||
|           response.end() |           response.end() | ||||||
|         }, |         } | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         const urlRequest = net.request({ |         const urlRequest = net.request({ | ||||||
|           url: `${serverUrl}/redirectChain` |           url: `${serverUrl}/redirectChain` | ||||||
|  | @ -925,7 +921,7 @@ describe('net module', () => { | ||||||
|         '/200': (request, response) => { |         '/200': (request, response) => { | ||||||
|           response.statusCode = 200 |           response.statusCode = 200 | ||||||
|           response.end() |           response.end() | ||||||
|         }, |         } | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         const urlRequest = net.request({ |         const urlRequest = net.request({ | ||||||
|           url: `${serverUrl}/redirectChain`, |           url: `${serverUrl}/redirectChain`, | ||||||
|  | @ -957,7 +953,7 @@ describe('net module', () => { | ||||||
|         '/200': (request, response) => { |         '/200': (request, response) => { | ||||||
|           response.statusCode = 200 |           response.statusCode = 200 | ||||||
|           response.end() |           response.end() | ||||||
|         }, |         } | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         const urlRequest = net.request({ |         const urlRequest = net.request({ | ||||||
|           url: `${serverUrl}/redirect`, |           url: `${serverUrl}/redirect`, | ||||||
|  | @ -991,7 +987,7 @@ describe('net module', () => { | ||||||
|           url: 'https://foo', |           url: 'https://foo', | ||||||
|           session: 1 as any |           session: 1 as any | ||||||
|         }) |         }) | ||||||
|       }).to.throw("`session` should be an instance of the Session class") |       }).to.throw('`session` should be an instance of the Session class') | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('should throw if given an invalid partition option', () => { |     it('should throw if given an invalid partition option', () => { | ||||||
|  | @ -1000,7 +996,7 @@ describe('net module', () => { | ||||||
|           url: 'https://foo', |           url: 'https://foo', | ||||||
|           partition: 1 as any |           partition: 1 as any | ||||||
|         }) |         }) | ||||||
|       }).to.throw("`partition` should be a string") |       }).to.throw('`partition` should be a string') | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('should be able to create a request with options', (done) => { |     it('should be able to create a request with options', (done) => { | ||||||
|  | @ -1059,7 +1055,7 @@ describe('net module', () => { | ||||||
|           const netRequest = net.request(netServerUrl) |           const netRequest = net.request(netServerUrl) | ||||||
|           netRequest.on('response', (netResponse) => { |           netRequest.on('response', (netResponse) => { | ||||||
|             expect(netResponse.statusCode).to.equal(200) |             expect(netResponse.statusCode).to.equal(200) | ||||||
|             netResponse.on('data', (chunk) => {}) |             netResponse.on('data', () => {}) | ||||||
|             netResponse.on('end', () => { |             netResponse.on('end', () => { | ||||||
|               expect(netRequestReceived).to.be.true('net request received') |               expect(netRequestReceived).to.be.true('net request received') | ||||||
|               expect(netRequestEnded).to.be.true('net request ended') |               expect(netRequestEnded).to.be.true('net request ended') | ||||||
|  | @ -1073,7 +1069,7 @@ describe('net module', () => { | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('should emit error event on server socket close', (done) => { |     it('should emit error event on server socket close', (done) => { | ||||||
|       respondOnce.toSingleURL((request, response) => { |       respondOnce.toSingleURL((request) => { | ||||||
|         request.socket.destroy() |         request.socket.destroy() | ||||||
|       }).then(serverUrl => { |       }).then(serverUrl => { | ||||||
|         let requestErrorEventEmitted = false |         let requestErrorEventEmitted = false | ||||||
|  | @ -1122,7 +1118,7 @@ describe('net module', () => { | ||||||
|           const httpVersionMinor = response.httpVersionMinor |           const httpVersionMinor = response.httpVersionMinor | ||||||
|           expect(httpVersionMinor).to.be.a('number').and.to.be.at.least(0) |           expect(httpVersionMinor).to.be.a('number').and.to.be.at.least(0) | ||||||
| 
 | 
 | ||||||
|           response.on('data', chunk => {}) |           response.on('data', () => {}) | ||||||
|           response.on('end', () => { done() }) |           response.on('end', () => { done() }) | ||||||
|         }) |         }) | ||||||
|         urlRequest.end() |         urlRequest.end() | ||||||
|  | @ -1156,7 +1152,7 @@ describe('net module', () => { | ||||||
|           expect(headers).to.not.have.property(discardableHeader) |           expect(headers).to.not.have.property(discardableHeader) | ||||||
|           expect(headers[includedHeader]).to.equal(includedHeaderValue) |           expect(headers[includedHeader]).to.equal(includedHeaderValue) | ||||||
| 
 | 
 | ||||||
|           response.on('data', chunk => {}) |           response.on('data', () => {}) | ||||||
|           response.on('end', () => { done() }) |           response.on('end', () => { done() }) | ||||||
|         }) |         }) | ||||||
|         urlRequest.end() |         urlRequest.end() | ||||||
|  | @ -1181,7 +1177,7 @@ describe('net module', () => { | ||||||
|           expect(headers).to.have.property('referrer-policy') |           expect(headers).to.have.property('referrer-policy') | ||||||
|           expect(headers['referrer-policy']).to.equal('first-text, second-text') |           expect(headers['referrer-policy']).to.equal('first-text, second-text') | ||||||
| 
 | 
 | ||||||
|           response.on('data', chunk => {}) |           response.on('data', () => {}) | ||||||
|           response.on('end', () => { done() }) |           response.on('end', () => { done() }) | ||||||
|         }) |         }) | ||||||
|         urlRequest.end() |         urlRequest.end() | ||||||
|  | @ -1215,7 +1211,7 @@ describe('net module', () => { | ||||||
|             port: serverUrl.port |             port: serverUrl.port | ||||||
|           } |           } | ||||||
|           const nodeRequest = http.request(nodeOptions, res => { |           const nodeRequest = http.request(nodeOptions, res => { | ||||||
|             res.on('data', (chunk) => {}) |             res.on('data', () => {}) | ||||||
|             res.on('end', () => { |             res.on('end', () => { | ||||||
|               done() |               done() | ||||||
|             }) |             }) | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ import { expect } from 'chai' | ||||||
| import * as dbus from 'dbus-native' | import * as dbus from 'dbus-native' | ||||||
| import { app } from 'electron' | import { app } from 'electron' | ||||||
| import { ifdescribe } from './spec-helpers' | import { ifdescribe } from './spec-helpers' | ||||||
| import { promisify } from 'util'; | import { promisify } from 'util' | ||||||
| 
 | 
 | ||||||
| const skip = process.platform !== 'linux' || | const skip = process.platform !== 'linux' || | ||||||
|              process.arch === 'ia32' || |              process.arch === 'ia32' || | ||||||
|  |  | ||||||
|  | @ -117,6 +117,7 @@ describe('powerMonitor', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   describe('when powerMonitor module is loaded', () => { |   describe('when powerMonitor module is loaded', () => { | ||||||
|  |     // eslint-disable-next-line no-undef
 | ||||||
|     let powerMonitor: typeof Electron.powerMonitor |     let powerMonitor: typeof Electron.powerMonitor | ||||||
|     before(() => { |     before(() => { | ||||||
|       powerMonitor = require('electron').powerMonitor |       powerMonitor = require('electron').powerMonitor | ||||||
|  |  | ||||||
|  | @ -75,7 +75,7 @@ function defer(): Promise<any> & {resolve: Function, reject: Function} { | ||||||
| describe('protocol module', () => { | describe('protocol module', () => { | ||||||
|   let contents: WebContents = null as unknown as WebContents |   let contents: WebContents = null as unknown as WebContents | ||||||
|   // NB. sandbox: true is used because it makes navigations much (~8x) faster.
 |   // NB. sandbox: true is used because it makes navigations much (~8x) faster.
 | ||||||
|   before(() => contents = (webContents as any).create({sandbox: true})) |   before(() => { contents = (webContents as any).create({ sandbox: true }) }) | ||||||
|   after(() => (contents as any).destroy()) |   after(() => (contents as any).destroy()) | ||||||
| 
 | 
 | ||||||
|   async function ajax (url: string, options = {}) { |   async function ajax (url: string, options = {}) { | ||||||
|  | @ -731,7 +731,7 @@ describe('protocol module', () => { | ||||||
|         const { ipcRenderer } = require('electron') |         const { ipcRenderer } = require('electron') | ||||||
|         fetch('cors://myhost').then(function (response) { |         fetch('cors://myhost').then(function (response) { | ||||||
|           ipcRenderer.send('response', response.status) |           ipcRenderer.send('response', response.status) | ||||||
|         }).catch(function (response) { |         }).catch(function () { | ||||||
|           ipcRenderer.send('response', 'failed') |           ipcRenderer.send('response', 'failed') | ||||||
|         }) |         }) | ||||||
|       }) |       }) | ||||||
|  | @ -787,7 +787,7 @@ describe('protocol module', () => { | ||||||
| 
 | 
 | ||||||
|       const newContents: WebContents = (webContents as any).create({ nodeIntegration: true }) |       const newContents: WebContents = (webContents as any).create({ nodeIntegration: true }) | ||||||
|       const consoleMessages: string[] = [] |       const consoleMessages: string[] = [] | ||||||
|       newContents.on('console-message', (e, level, message, line, sourceId) => consoleMessages.push(message)) |       newContents.on('console-message', (e, level, message) => consoleMessages.push(message)) | ||||||
|       try { |       try { | ||||||
|         newContents.loadURL(standardScheme + '://fake-host') |         newContents.loadURL(standardScheme + '://fake-host') | ||||||
|         const [, response] = await emittedOnce(ipcMain, 'response') |         const [, response] = await emittedOnce(ipcMain, 'response') | ||||||
|  |  | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { closeWindow, closeAllWindows } from './window-helpers' | import { closeWindow, closeAllWindows } from './window-helpers' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| import { ipcMain, BrowserWindow } from 'electron' | import { ipcMain, BrowserWindow } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers'; | import { emittedOnce } from './events-helpers' | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  | @ -47,7 +47,7 @@ ifdescribe(features.isRemoteModuleEnabled())('remote module', () => { | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('throws when no returnValue set', async () => { |       it('throws when no returnValue set', async () => { | ||||||
|         w.webContents.once('remote-get-global', (event, name) => { |         w.webContents.once('remote-get-global', (event) => { | ||||||
|           event.preventDefault() |           event.preventDefault() | ||||||
|         }) |         }) | ||||||
|         await expect(remotely(`require('electron').remote.getGlobal('test')`)).to.eventually.be.rejected(`Blocked remote.getGlobal('test')`) |         await expect(remotely(`require('electron').remote.getGlobal('test')`)).to.eventually.be.rejected(`Blocked remote.getGlobal('test')`) | ||||||
|  | @ -63,7 +63,7 @@ ifdescribe(features.isRemoteModuleEnabled())('remote module', () => { | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('throws when no returnValue set', async () => { |       it('throws when no returnValue set', async () => { | ||||||
|         w.webContents.once('remote-get-builtin', (event, name) => { |         w.webContents.once('remote-get-builtin', (event) => { | ||||||
|           event.preventDefault() |           event.preventDefault() | ||||||
|         }) |         }) | ||||||
|         await expect(remotely(`require('electron').remote.getBuiltin('test')`)).to.eventually.be.rejected(`Blocked remote.getGlobal('test')`) |         await expect(remotely(`require('electron').remote.getBuiltin('test')`)).to.eventually.be.rejected(`Blocked remote.getGlobal('test')`) | ||||||
|  | @ -79,7 +79,7 @@ ifdescribe(features.isRemoteModuleEnabled())('remote module', () => { | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|       it('throws when no returnValue set', async () => { |       it('throws when no returnValue set', async () => { | ||||||
|         w.webContents.once('remote-require', (event, name) => { |         w.webContents.once('remote-require', (event) => { | ||||||
|           event.preventDefault() |           event.preventDefault() | ||||||
|         }) |         }) | ||||||
|         await expect(remotely(`require('electron').remote.require('test')`)).to.eventually.be.rejected(`Blocked remote.require('test')`) |         await expect(remotely(`require('electron').remote.require('test')`)).to.eventually.be.rejected(`Blocked remote.require('test')`) | ||||||
|  | @ -180,9 +180,9 @@ ifdescribe(features.isRemoteModuleEnabled())('remote module', () => { | ||||||
| 
 | 
 | ||||||
|       expect(w.webContents.listenerCount('remote-handler')).to.equal(2) |       expect(w.webContents.listenerCount('remote-handler')).to.equal(2) | ||||||
|       let warnMessage: string | null = null |       let warnMessage: string | null = null | ||||||
|       let originalWarn = console.warn |       const originalWarn = console.warn | ||||||
|       try { |       try { | ||||||
|         console.warn = (message: string) => warnMessage = message |         console.warn = (message: string) => { warnMessage = message } | ||||||
|         w.webContents.emit('remote-handler', { sender: w.webContents }) |         w.webContents.emit('remote-handler', { sender: w.webContents }) | ||||||
|       } finally { |       } finally { | ||||||
|         console.warn = originalWarn |         console.warn = originalWarn | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ import * as send from 'send' | ||||||
| import * as auth from 'basic-auth' | import * as auth from 'basic-auth' | ||||||
| import { closeAllWindows } from './window-helpers' | import { closeAllWindows } from './window-helpers' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { AddressInfo } from 'net'; | import { AddressInfo } from 'net' | ||||||
| 
 | 
 | ||||||
| /* The whole session API doesn't use standard callbacks */ | /* The whole session API doesn't use standard callbacks */ | ||||||
| /* eslint-disable standard/no-callback-literal */ | /* eslint-disable standard/no-callback-literal */ | ||||||
|  | @ -78,7 +78,7 @@ describe('session module', () => { | ||||||
|       const name = '1' |       const name = '1' | ||||||
|       const value = '1' |       const value = '1' | ||||||
| 
 | 
 | ||||||
|       await cookies.set({ url, name, value, expirationDate: (+new Date) / 1000 + 120 }) |       await cookies.set({ url, name, value, expirationDate: (+new Date()) / 1000 + 120 }) | ||||||
|       const cs = await cookies.get({ url }) |       const cs = await cookies.get({ url }) | ||||||
|       expect(cs.some(c => c.name === name && c.value === value)).to.equal(true) |       expect(cs.some(c => c.name === name && c.value === value)).to.equal(true) | ||||||
|     }) |     }) | ||||||
|  | @ -88,7 +88,7 @@ describe('session module', () => { | ||||||
|       const name = '1' |       const name = '1' | ||||||
|       const value = '1' |       const value = '1' | ||||||
| 
 | 
 | ||||||
|       await cookies.set({ url, name, value, expirationDate: (+new Date) / 1000 + 120 }) |       await cookies.set({ url, name, value, expirationDate: (+new Date()) / 1000 + 120 }) | ||||||
|       const cs = await cookies.get({ domain: '127.0.0.1' }) |       const cs = await cookies.get({ domain: '127.0.0.1' }) | ||||||
|       expect(cs.some(c => c.name === name && c.value === value)).to.equal(true) |       expect(cs.some(c => c.name === name && c.value === value)).to.equal(true) | ||||||
|     }) |     }) | ||||||
|  | @ -191,7 +191,7 @@ describe('session module', () => { | ||||||
|       const appPath = path.join(fixtures, 'api', 'cookie-app') |       const appPath = path.join(fixtures, 'api', 'cookie-app') | ||||||
| 
 | 
 | ||||||
|       const runAppWithPhase = (phase: string) => { |       const runAppWithPhase = (phase: string) => { | ||||||
|         return new Promise((resolve, reject) => { |         return new Promise((resolve) => { | ||||||
|           let output = '' |           let output = '' | ||||||
| 
 | 
 | ||||||
|           const appProcess = ChildProcess.spawn( |           const appProcess = ChildProcess.spawn( | ||||||
|  | @ -297,7 +297,7 @@ describe('session module', () => { | ||||||
|         show: false, |         show: false, | ||||||
|         webPreferences: { |         webPreferences: { | ||||||
|           partition: partitionName, |           partition: partitionName, | ||||||
|           nodeIntegration: true, |           nodeIntegration: true | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|       customSession = session.fromPartition(partitionName) |       customSession = session.fromPartition(partitionName) | ||||||
|  | @ -448,7 +448,7 @@ describe('session module', () => { | ||||||
|     afterEach(closeAllWindows) |     afterEach(closeAllWindows) | ||||||
| 
 | 
 | ||||||
|     it('accepts the request when the callback is called with 0', async () => { |     it('accepts the request when the callback is called with 0', async () => { | ||||||
|       session.defaultSession.setCertificateVerifyProc(({ hostname, certificate, verificationResult, errorCode }, callback) => { |       session.defaultSession.setCertificateVerifyProc(({ verificationResult, errorCode }, callback) => { | ||||||
|         expect(['net::ERR_CERT_AUTHORITY_INVALID', 'net::ERR_CERT_COMMON_NAME_INVALID'].includes(verificationResult)).to.be.true() |         expect(['net::ERR_CERT_AUTHORITY_INVALID', 'net::ERR_CERT_COMMON_NAME_INVALID'].includes(verificationResult)).to.be.true() | ||||||
|         expect([-202, -200].includes(errorCode)).to.be.true() |         expect([-202, -200].includes(errorCode)).to.be.true() | ||||||
|         callback(0) |         callback(0) | ||||||
|  | @ -483,7 +483,7 @@ describe('session module', () => { | ||||||
| 
 | 
 | ||||||
|     it('saves cached results', async () => { |     it('saves cached results', async () => { | ||||||
|       let numVerificationRequests = 0 |       let numVerificationRequests = 0 | ||||||
|       session.defaultSession.setCertificateVerifyProc(({ hostname, certificate, verificationResult }, callback) => { |       session.defaultSession.setCertificateVerifyProc((e, callback) => { | ||||||
|         numVerificationRequests++ |         numVerificationRequests++ | ||||||
|         callback(-2) |         callback(-2) | ||||||
|       }) |       }) | ||||||
|  | @ -524,7 +524,7 @@ describe('session module', () => { | ||||||
|             resolve(data) |             resolve(data) | ||||||
|           }) |           }) | ||||||
|           response.on('error', (error: any) => { reject(new Error(error)) }) |           response.on('error', (error: any) => { reject(new Error(error)) }) | ||||||
|         }); |         }) | ||||||
|         request.end() |         request.end() | ||||||
|       }) |       }) | ||||||
|       // the first time should throw due to unauthenticated
 |       // the first time should throw due to unauthenticated
 | ||||||
|  | @ -684,7 +684,7 @@ describe('session module', () => { | ||||||
|       const w = new BrowserWindow({ show: false }) |       const w = new BrowserWindow({ show: false }) | ||||||
|       w.webContents.session.once('will-download', function (e, item) { |       w.webContents.session.once('will-download', function (e, item) { | ||||||
|         item.savePath = downloadFilePath |         item.savePath = downloadFilePath | ||||||
|         item.on('done', function (e, state) { |         item.on('done', function () { | ||||||
|           expect(item.getFilename()).to.equal('download.pdf') |           expect(item.getFilename()).to.equal('download.pdf') | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -716,7 +716,7 @@ describe('session module', () => { | ||||||
|       w.webContents.session.once('will-download', function (e, item) { |       w.webContents.session.once('will-download', function (e, item) { | ||||||
|         item.setSavePath(filePath) |         item.setSavePath(filePath) | ||||||
|         item.setSaveDialogOptions(options) |         item.setSaveDialogOptions(options) | ||||||
|         item.on('done', function (e, state) { |         item.on('done', function () { | ||||||
|           expect(item.getSaveDialogOptions()).to.deep.equal(options) |           expect(item.getSaveDialogOptions()).to.deep.equal(options) | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|  | @ -781,7 +781,7 @@ describe('session module', () => { | ||||||
|         const downloadCancelled: Promise<Electron.DownloadItem> = new Promise((resolve) => { |         const downloadCancelled: Promise<Electron.DownloadItem> = new Promise((resolve) => { | ||||||
|           w.webContents.session.once('will-download', function (e, item) { |           w.webContents.session.once('will-download', function (e, item) { | ||||||
|             item.setSavePath(downloadFilePath) |             item.setSavePath(downloadFilePath) | ||||||
|             item.on('done', function (e, state) { |             item.on('done', function () { | ||||||
|               resolve(item) |               resolve(item) | ||||||
|             }) |             }) | ||||||
|             item.cancel() |             item.cancel() | ||||||
|  | @ -799,14 +799,14 @@ describe('session module', () => { | ||||||
|           offset: item.getReceivedBytes(), |           offset: item.getReceivedBytes(), | ||||||
|           length: item.getTotalBytes(), |           length: item.getTotalBytes(), | ||||||
|           lastModified: item.getLastModifiedTime(), |           lastModified: item.getLastModifiedTime(), | ||||||
|           eTag: item.getETag(), |           eTag: item.getETag() | ||||||
|         } |         } | ||||||
|         const downloadResumed: Promise<Electron.DownloadItem> = new Promise((resolve) => { |         const downloadResumed: Promise<Electron.DownloadItem> = new Promise((resolve) => { | ||||||
|           w.webContents.session.once('will-download', function (e, item) { |           w.webContents.session.once('will-download', function (e, item) { | ||||||
|             expect(item.getState()).to.equal('interrupted') |             expect(item.getState()).to.equal('interrupted') | ||||||
|             item.setSavePath(downloadFilePath) |             item.setSavePath(downloadFilePath) | ||||||
|             item.resume() |             item.resume() | ||||||
|             item.on('done', function (e, state) { |             item.on('done', function () { | ||||||
|               resolve(item) |               resolve(item) | ||||||
|             }) |             }) | ||||||
|           }) |           }) | ||||||
|  | @ -834,7 +834,7 @@ describe('session module', () => { | ||||||
|         show: false, |         show: false, | ||||||
|         webPreferences: { |         webPreferences: { | ||||||
|           partition: `very-temp-permision-handler`, |           partition: `very-temp-permision-handler`, | ||||||
|           nodeIntegration: true, |           nodeIntegration: true | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
| 
 | 
 | ||||||
|  | @ -851,8 +851,8 @@ describe('session module', () => { | ||||||
| 
 | 
 | ||||||
|       function remote () { |       function remote () { | ||||||
|         (navigator as any).requestMIDIAccess({ sysex: true }).then(() => {}, (err: any) => { |         (navigator as any).requestMIDIAccess({ sysex: true }).then(() => {}, (err: any) => { | ||||||
|           require('electron').ipcRenderer.send('message', err.name); |           require('electron').ipcRenderer.send('message', err.name) | ||||||
|         }); |         }) | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       await w.loadURL('https://myfakesite') |       await w.loadURL('https://myfakesite') | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import { emittedNTimes, emittedOnce } from './events-helpers' | ||||||
| import { closeWindow } from './window-helpers' | import { closeWindow } from './window-helpers' | ||||||
| import { app, BrowserWindow, ipcMain } from 'electron' | import { app, BrowserWindow, ipcMain } from 'electron' | ||||||
| import { AddressInfo } from 'net' | import { AddressInfo } from 'net' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| describe('renderer nodeIntegrationInSubFrames', () => { | describe('renderer nodeIntegrationInSubFrames', () => { | ||||||
|   const generateTests = (description: string, webPreferences: any) => { |   const generateTests = (description: string, webPreferences: any) => { | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ import { Menu, Tray, nativeImage } from 'electron' | ||||||
| import { ifdescribe, ifit } from './spec-helpers' | import { ifdescribe, ifit } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| describe('tray module', () => { | describe('tray module', () => { | ||||||
|   let tray: Tray; |   let tray: Tray | ||||||
| 
 | 
 | ||||||
|   beforeEach(() => { tray = new Tray(nativeImage.createEmpty()) }) |   beforeEach(() => { tray = new Tray(nativeImage.createEmpty()) }) | ||||||
| 
 | 
 | ||||||
|  | @ -58,7 +58,7 @@ describe('tray module', () => { | ||||||
| 
 | 
 | ||||||
|     ifit(process.platform !== 'linux')('returns a bounds object', function () { |     ifit(process.platform !== 'linux')('returns a bounds object', function () { | ||||||
|       const bounds = tray.getBounds() |       const bounds = tray.getBounds() | ||||||
|       expect(bounds).to.be.an('object').and.to.have.all.keys('x', 'y', 'width', 'height'); |       expect(bounds).to.be.an('object').and.to.have.all.keys('x', 'y', 'width', 'height') | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -49,7 +49,7 @@ describe('webContents module', () => { | ||||||
|     it('does not emit if beforeunload returns undefined', (done) => { |     it('does not emit if beforeunload returns undefined', (done) => { | ||||||
|       const w = new BrowserWindow({ show: false }) |       const w = new BrowserWindow({ show: false }) | ||||||
|       w.once('closed', () => done()) |       w.once('closed', () => done()) | ||||||
|       w.webContents.once('will-prevent-unload', (e) => { |       w.webContents.once('will-prevent-unload', () => { | ||||||
|         expect.fail('should not have fired') |         expect.fail('should not have fired') | ||||||
|       }) |       }) | ||||||
|       w.loadFile(path.join(fixturesPath, 'api', 'close-beforeunload-undefined.html')) |       w.loadFile(path.join(fixturesPath, 'api', 'close-beforeunload-undefined.html')) | ||||||
|  | @ -98,7 +98,7 @@ describe('webContents module', () => { | ||||||
|       }) |       }) | ||||||
|       w.loadFile(path.join(fixturesPath, 'pages', 'send-after-node.html')) |       w.loadFile(path.join(fixturesPath, 'pages', 'send-after-node.html')) | ||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         w.webContents.send("test") |         w.webContents.send('test') | ||||||
|       }, 50) |       }, 50) | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
|  | @ -169,7 +169,7 @@ describe('webContents module', () => { | ||||||
|       }) |       }) | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     describe("on a real page", () => { |     describe('on a real page', () => { | ||||||
|       let w: BrowserWindow |       let w: BrowserWindow | ||||||
|       beforeEach(() => { |       beforeEach(() => { | ||||||
|         w = new BrowserWindow({ show: false }) |         w = new BrowserWindow({ show: false }) | ||||||
|  | @ -211,7 +211,7 @@ describe('webContents module', () => { | ||||||
| 
 | 
 | ||||||
|       it('executes after page load', (done) => { |       it('executes after page load', (done) => { | ||||||
|         w.webContents.executeJavaScript(`(() => "test")()`).then(result => { |         w.webContents.executeJavaScript(`(() => "test")()`).then(result => { | ||||||
|           expect(result).to.equal("test") |           expect(result).to.equal('test') | ||||||
|           done() |           done() | ||||||
|         }) |         }) | ||||||
|         w.loadURL(serverUrl) |         w.loadURL(serverUrl) | ||||||
|  | @ -266,7 +266,7 @@ describe('webContents module', () => { | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     it('rejects if the load is aborted', async () => { |     it('rejects if the load is aborted', async () => { | ||||||
|       const s = http.createServer((req, res) => { /* never complete the request */ }) |       const s = http.createServer(() => { /* never complete the request */ }) | ||||||
|       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) |       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) | ||||||
|       const { port } = s.address() as AddressInfo |       const { port } = s.address() as AddressInfo | ||||||
|       const p = expect(w.loadURL(`http://127.0.0.1:${port}`)).to.eventually.be.rejectedWith(Error, /ERR_ABORTED/) |       const p = expect(w.loadURL(`http://127.0.0.1:${port}`)).to.eventually.be.rejectedWith(Error, /ERR_ABORTED/) | ||||||
|  | @ -288,7 +288,7 @@ describe('webContents module', () => { | ||||||
|       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) |       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) | ||||||
|       const { port } = s.address() as AddressInfo |       const { port } = s.address() as AddressInfo | ||||||
|       const p = new Promise(resolve => { |       const p = new Promise(resolve => { | ||||||
|         w.webContents.on('did-fail-load', (event, errorCode, errorDescription, validatedURL, isMainFrame, frameProcessId, frameRoutingId) => { |         w.webContents.on('did-fail-load', (event, errorCode, errorDescription, validatedURL, isMainFrame) => { | ||||||
|           if (!isMainFrame) { |           if (!isMainFrame) { | ||||||
|             resolve() |             resolve() | ||||||
|           } |           } | ||||||
|  | @ -312,7 +312,7 @@ describe('webContents module', () => { | ||||||
|       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) |       await new Promise(resolve => s.listen(0, '127.0.0.1', resolve)) | ||||||
|       const { port } = s.address() as AddressInfo |       const { port } = s.address() as AddressInfo | ||||||
|       const p = new Promise(resolve => { |       const p = new Promise(resolve => { | ||||||
|         w.webContents.on('did-frame-finish-load', (event, isMainFrame, frameProcessId, frameRoutingId) => { |         w.webContents.on('did-frame-finish-load', (event, isMainFrame) => { | ||||||
|           if (!isMainFrame) { |           if (!isMainFrame) { | ||||||
|             resolve() |             resolve() | ||||||
|           } |           } | ||||||
|  | @ -358,7 +358,7 @@ describe('webContents module', () => { | ||||||
|       expect(() => { webContents.getFocusedWebContents() }).to.not.throw() |       expect(() => { webContents.getFocusedWebContents() }).to.not.throw() | ||||||
| 
 | 
 | ||||||
|       // Work around https://github.com/electron/electron/issues/19985
 |       // Work around https://github.com/electron/electron/issues/19985
 | ||||||
|       await new Promise(r => setTimeout(r, 0)) |       await new Promise(resolve => setTimeout(resolve, 0)) | ||||||
| 
 | 
 | ||||||
|       const devToolsClosed = emittedOnce(w.webContents, 'devtools-closed') |       const devToolsClosed = emittedOnce(w.webContents, 'devtools-closed') | ||||||
|       w.webContents.closeDevTools() |       w.webContents.closeDevTools() | ||||||
|  | @ -440,7 +440,7 @@ describe('webContents module', () => { | ||||||
|       w.webContents.openDevTools({ mode: 'detach', activate: true }) |       w.webContents.openDevTools({ mode: 'detach', activate: true }) | ||||||
|       await Promise.all([ |       await Promise.all([ | ||||||
|         emittedOnce(w.webContents, 'devtools-opened'), |         emittedOnce(w.webContents, 'devtools-opened'), | ||||||
|         emittedOnce(w.webContents, 'devtools-focused'), |         emittedOnce(w.webContents, 'devtools-focused') | ||||||
|       ]) |       ]) | ||||||
|       await new Promise(resolve => setTimeout(resolve, 0)) |       await new Promise(resolve => setTimeout(resolve, 0)) | ||||||
|       expect(w.isFocused()).to.be.false() |       expect(w.isFocused()).to.be.false() | ||||||
|  | @ -464,7 +464,7 @@ describe('webContents module', () => { | ||||||
|         ipcMain.once('keydown', (event, key) => resolve(key)) |         ipcMain.once('keydown', (event, key) => resolve(key)) | ||||||
|       }) |       }) | ||||||
|       w.webContents.once('before-input-event', (event, input) => { |       w.webContents.once('before-input-event', (event, input) => { | ||||||
|         if ('a' === input.key) event.preventDefault() |         if (input.key === 'a') event.preventDefault() | ||||||
|       }) |       }) | ||||||
|       w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'a' }) |       w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'a' }) | ||||||
|       w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'b' }) |       w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'b' }) | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ import * as http from 'http' | ||||||
| import * as qs from 'querystring' | import * as qs from 'querystring' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import { session, WebContents, webContents } from 'electron' | import { session, WebContents, webContents } from 'electron' | ||||||
| import { AddressInfo } from 'net'; | import { AddressInfo } from 'net' | ||||||
| 
 | 
 | ||||||
| const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures') | const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures') | ||||||
| 
 | 
 | ||||||
|  | @ -103,7 +103,7 @@ describe('webRequest module', () => { | ||||||
|       }) |       }) | ||||||
|       await expect(ajax(defaultURL, { |       await expect(ajax(defaultURL, { | ||||||
|         type: 'POST', |         type: 'POST', | ||||||
|         data: postData, |         data: postData | ||||||
|       })).to.eventually.be.rejectedWith('404') |       })).to.eventually.be.rejectedWith('404') | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,4 @@ | ||||||
| import * as chai from 'chai' | import * as chai from 'chai' | ||||||
| import { expect } from 'chai' |  | ||||||
| import * as chaiAsPromised from 'chai-as-promised' | import * as chaiAsPromised from 'chai-as-promised' | ||||||
| import { BrowserWindow, WebContents, session, ipcMain, app, protocol, webContents } from 'electron' | import { BrowserWindow, WebContents, session, ipcMain, app, protocol, webContents } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
|  | @ -15,6 +14,8 @@ import { promisify } from 'util' | ||||||
| import { ifit, ifdescribe } from './spec-helpers' | import { ifit, ifdescribe } from './spec-helpers' | ||||||
| import { AddressInfo } from 'net' | import { AddressInfo } from 'net' | ||||||
| 
 | 
 | ||||||
|  | const { expect } = chai | ||||||
|  | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
| chai.use(chaiAsPromised) | chai.use(chaiAsPromised) | ||||||
|  | @ -22,7 +23,7 @@ const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures') | ||||||
| 
 | 
 | ||||||
| describe('reporting api', () => { | describe('reporting api', () => { | ||||||
|   it('sends a report for a deprecation', async () => { |   it('sends a report for a deprecation', async () => { | ||||||
|     const reports = new EventEmitter |     const reports = new EventEmitter() | ||||||
| 
 | 
 | ||||||
|     // The Reporting API only works on https with valid certs. To dodge having
 |     // The Reporting API only works on https with valid certs. To dodge having
 | ||||||
|     // to set up a trusted certificate, hack the validator.
 |     // to set up a trusted certificate, hack the validator.
 | ||||||
|  | @ -44,7 +45,7 @@ describe('reporting api', () => { | ||||||
|     const server = https.createServer(options, (req, res) => { |     const server = https.createServer(options, (req, res) => { | ||||||
|       if (req.url === '/report') { |       if (req.url === '/report') { | ||||||
|         let data = '' |         let data = '' | ||||||
|         req.on('data', (d) => data += d.toString('utf-8')) |         req.on('data', (d) => { data += d.toString('utf-8') }) | ||||||
|         req.on('end', () => { |         req.on('end', () => { | ||||||
|           reports.emit('report', JSON.parse(data)) |           reports.emit('report', JSON.parse(data)) | ||||||
|         }) |         }) | ||||||
|  | @ -52,16 +53,16 @@ describe('reporting api', () => { | ||||||
|       res.setHeader('Report-To', JSON.stringify({ |       res.setHeader('Report-To', JSON.stringify({ | ||||||
|         group: 'default', |         group: 'default', | ||||||
|         max_age: 120, |         max_age: 120, | ||||||
|         endpoints: [ {url: `https://localhost:${(server.address() as any).port}/report`} ], |         endpoints: [ { url: `https://localhost:${(server.address() as any).port}/report` } ] | ||||||
|       })) |       })) | ||||||
|       res.setHeader('Content-Type', 'text/html') |       res.setHeader('Content-Type', 'text/html') | ||||||
|       // using the deprecated `webkitRequestAnimationFrame` will trigger a
 |       // using the deprecated `webkitRequestAnimationFrame` will trigger a
 | ||||||
|       // "deprecation" report.
 |       // "deprecation" report.
 | ||||||
|       res.end('<script>webkitRequestAnimationFrame(() => {})</script>') |       res.end('<script>webkitRequestAnimationFrame(() => {})</script>') | ||||||
|     }) |     }) | ||||||
|     await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); |     await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)) | ||||||
|     const bw = new BrowserWindow({ |     const bw = new BrowserWindow({ | ||||||
|       show: false, |       show: false | ||||||
|     }) |     }) | ||||||
|     try { |     try { | ||||||
|       const reportGenerated = emittedOnce(reports, 'report') |       const reportGenerated = emittedOnce(reports, 'report') | ||||||
|  | @ -670,7 +671,7 @@ describe('chromium features', () => { | ||||||
|       { parent: httpBlank, child: httpUrl2, nodeIntegration: false, nativeWindowOpen: false, openerAccessible: false }, |       { parent: httpBlank, child: httpUrl2, nodeIntegration: false, nativeWindowOpen: false, openerAccessible: false }, | ||||||
|       { parent: httpBlank, child: httpUrl2, nodeIntegration: false, nativeWindowOpen: true, openerAccessible: false }, |       { parent: httpBlank, child: httpUrl2, nodeIntegration: false, nativeWindowOpen: true, openerAccessible: false }, | ||||||
|       { parent: httpBlank, child: httpUrl2, nodeIntegration: true, nativeWindowOpen: false, openerAccessible: true }, |       { parent: httpBlank, child: httpUrl2, nodeIntegration: true, nativeWindowOpen: false, openerAccessible: true }, | ||||||
|       {parent: httpBlank, child: httpUrl2, nodeIntegration: true, nativeWindowOpen: true, openerAccessible: false}, |       { parent: httpBlank, child: httpUrl2, nodeIntegration: true, nativeWindowOpen: true, openerAccessible: false } | ||||||
|     ] |     ] | ||||||
|     const s = (url: string) => url.startsWith('file') ? 'file://...' : url |     const s = (url: string) => url.startsWith('file') ? 'file://...' : url | ||||||
| 
 | 
 | ||||||
|  | @ -698,7 +699,7 @@ describe('chromium features', () => { | ||||||
|             window.addEventListener('message', function f(e) { |             window.addEventListener('message', function f(e) { | ||||||
|               resolve(e.data) |               resolve(e.data) | ||||||
|             }) |             }) | ||||||
|             window.open(${JSON.stringify(child)}, "", "show=no,nodeIntegration=${nodeIntegration ? "yes" : "no"}") |             window.open(${JSON.stringify(child)}, "", "show=no,nodeIntegration=${nodeIntegration ? 'yes' : 'no'}") | ||||||
|           })`)
 |           })`)
 | ||||||
|           if (openerAccessible) { |           if (openerAccessible) { | ||||||
|             expect(childOpenerLocation).to.be.a('string') |             expect(childOpenerLocation).to.be.a('string') | ||||||
|  | @ -735,8 +736,8 @@ describe('chromium features', () => { | ||||||
|           const childOpenerLocation = await w.webContents.executeJavaScript(`new Promise((resolve, reject) => {
 |           const childOpenerLocation = await w.webContents.executeJavaScript(`new Promise((resolve, reject) => {
 | ||||||
|             // This is context (2), a WebView which will call window.open()
 |             // This is context (2), a WebView which will call window.open()
 | ||||||
|             const webview = new WebView() |             const webview = new WebView() | ||||||
|             webview.setAttribute('nodeintegration', '${nodeIntegration ? "on" : "off"}') |             webview.setAttribute('nodeintegration', '${nodeIntegration ? 'on' : 'off'}') | ||||||
|             webview.setAttribute('webpreferences', 'nativeWindowOpen=${nativeWindowOpen ? "yes" : "no"}') |             webview.setAttribute('webpreferences', 'nativeWindowOpen=${nativeWindowOpen ? 'yes' : 'no'}') | ||||||
|             webview.setAttribute('allowpopups', 'on') |             webview.setAttribute('allowpopups', 'on') | ||||||
|             webview.src = ${JSON.stringify(parent + '?p=' + encodeURIComponent(child))} |             webview.src = ${JSON.stringify(parent + '?p=' + encodeURIComponent(child))} | ||||||
|             webview.addEventListener('dom-ready', async () => { |             webview.addEventListener('dom-ready', async () => { | ||||||
|  | @ -976,7 +977,7 @@ describe('chromium features', () => { | ||||||
|       const w = createBrowserWindow({ plugins: false, preload: 'preload-pdf-loaded.js' }) |       const w = createBrowserWindow({ plugins: false, preload: 'preload-pdf-loaded.js' }) | ||||||
|       w.webContents.loadURL(pdfSource) |       w.webContents.loadURL(pdfSource) | ||||||
|       const [state, filename, mimeType] = await new Promise(resolve => { |       const [state, filename, mimeType] = await new Promise(resolve => { | ||||||
|         session.defaultSession.once('will-download', (event, item, webContents) => { |         session.defaultSession.once('will-download', (event, item) => { | ||||||
|           item.setSavePath(path.join(fixturesPath, 'mock.pdf')) |           item.setSavePath(path.join(fixturesPath, 'mock.pdf')) | ||||||
|           item.on('done', (e, state) => { |           item.on('done', (e, state) => { | ||||||
|             resolve([state, item.getFilename(), item.getMimeType()]) |             resolve([state, item.getFilename(), item.getMimeType()]) | ||||||
|  | @ -1026,7 +1027,6 @@ describe('chromium features', () => { | ||||||
|   }) |   }) | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| describe('font fallback', () => { | describe('font fallback', () => { | ||||||
|   async function getRenderedFonts (html: string) { |   async function getRenderedFonts (html: string) { | ||||||
|     const w = new BrowserWindow({ show: false }) |     const w = new BrowserWindow({ show: false }) | ||||||
|  | @ -1048,12 +1048,7 @@ describe('font fallback', () => { | ||||||
|     const fonts = await getRenderedFonts(html) |     const fonts = await getRenderedFonts(html) | ||||||
|     expect(fonts).to.be.an('array') |     expect(fonts).to.be.an('array') | ||||||
|     expect(fonts).to.have.length(1) |     expect(fonts).to.have.length(1) | ||||||
|     if (process.platform === 'win32') |     if (process.platform === 'win32') { expect(fonts[0].familyName).to.equal('Arial') } else if (process.platform === 'darwin') { expect(fonts[0].familyName).to.equal('Helvetica') } else if (process.platform === 'linux') { expect(fonts[0].familyName).to.equal('DejaVu Sans') } // I think this depends on the distro? We don't specify a default.
 | ||||||
|       expect(fonts[0].familyName).to.equal('Arial') |  | ||||||
|     else if (process.platform === 'darwin') |  | ||||||
|       expect(fonts[0].familyName).to.equal('Helvetica') |  | ||||||
|     else if (process.platform === 'linux') |  | ||||||
|       expect(fonts[0].familyName).to.equal('DejaVu Sans') // I think this depends on the distro? We don't specify a default.
 |  | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   ifit(process.platform !== 'linux')('should fall back to Japanese font for sans-serif Japanese script', async function () { |   ifit(process.platform !== 'linux')('should fall back to Japanese font for sans-serif Japanese script', async function () { | ||||||
|  | @ -1068,9 +1063,6 @@ describe('font fallback', () => { | ||||||
|     const fonts = await getRenderedFonts(html) |     const fonts = await getRenderedFonts(html) | ||||||
|     expect(fonts).to.be.an('array') |     expect(fonts).to.be.an('array') | ||||||
|     expect(fonts).to.have.length(1) |     expect(fonts).to.have.length(1) | ||||||
|     if (process.platform === 'win32') |     if (process.platform === 'win32') { expect(fonts[0].familyName).to.be.oneOf(['Meiryo', 'Yu Gothic']) } else if (process.platform === 'darwin') { expect(fonts[0].familyName).to.equal('Hiragino Kaku Gothic ProN') } | ||||||
|       expect(fonts[0].familyName).to.be.oneOf(['Meiryo', 'Yu Gothic']) |  | ||||||
|     else if (process.platform === 'darwin') |  | ||||||
|       expect(fonts[0].familyName).to.equal('Hiragino Kaku Gothic ProN') |  | ||||||
|   }) |   }) | ||||||
| }) | }) | ||||||
|  | @ -1,13 +1,12 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { session, BrowserWindow, ipcMain } from 'electron' | import { session, BrowserWindow, ipcMain } from 'electron' | ||||||
| import { closeAllWindows } from './window-helpers' | import { closeAllWindows, closeWindow } from './window-helpers' | ||||||
| import * as http from 'http' | import * as http from 'http' | ||||||
| import { AddressInfo } from 'net' | import { AddressInfo } from 'net' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import * as fs from 'fs' | import * as fs from 'fs' | ||||||
| import { ifdescribe } from './spec-helpers' | import { ifdescribe } from './spec-helpers' | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { closeWindow } from './window-helpers'; |  | ||||||
| 
 | 
 | ||||||
| const fixtures = path.join(__dirname, 'fixtures') | const fixtures = path.join(__dirname, 'fixtures') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
|  | /* eslint-disable */ | ||||||
| document.documentElement.textContent = JSON.stringify({ | document.documentElement.textContent = JSON.stringify({ | ||||||
|   manifest: chrome.runtime.getManifest(), |   manifest: chrome.runtime.getManifest(), | ||||||
|   id: chrome.runtime.id, |   id: chrome.runtime.id, | ||||||
|   url: chrome.runtime.getURL('main.js'), |   url: chrome.runtime.getURL('main.js') | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | /* eslint-disable */ | ||||||
| chrome.storage.local.set({ key: 'value' }, () => { | chrome.storage.local.set({ key: 'value' }, () => { | ||||||
|   chrome.storage.local.get(['key'], ({ key }) => { |   chrome.storage.local.get(['key'], ({ key }) => { | ||||||
|     const script = document.createElement('script') |     const script = document.createElement('script') | ||||||
|  |  | ||||||
|  | @ -2,9 +2,9 @@ import { expect } from 'chai' | ||||||
| import * as childProcess from 'child_process' | import * as childProcess from 'child_process' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| import * as util from 'util' | import * as util from 'util' | ||||||
| import { emittedOnce } from './events-helpers'; | import { emittedOnce } from './events-helpers' | ||||||
| import { ifdescribe, ifit } from './spec-helpers'; | import { ifdescribe, ifit } from './spec-helpers' | ||||||
| import { webContents, WebContents } from 'electron'; | import { webContents, WebContents } from 'electron' | ||||||
| 
 | 
 | ||||||
| const features = process.electronBinding('features') | const features = process.electronBinding('features') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,8 +7,8 @@ import * as url from 'url' | ||||||
| import { BrowserWindow, WebPreferences } from 'electron' | import { BrowserWindow, WebPreferences } from 'electron' | ||||||
| 
 | 
 | ||||||
| import { closeWindow } from './window-helpers' | import { closeWindow } from './window-helpers' | ||||||
| import { AddressInfo } from 'net'; | import { AddressInfo } from 'net' | ||||||
| import { emittedUntil } from './events-helpers'; | import { emittedUntil } from './events-helpers' | ||||||
| 
 | 
 | ||||||
| const messageContainsSecurityWarning = (event: Event, level: number, message: string) => { | const messageContainsSecurityWarning = (event: Event, level: number, message: string) => { | ||||||
|   return message.indexOf('Electron Security Warning') > -1 |   return message.indexOf('Electron Security Warning') > -1 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| export const ifit = (condition: boolean) => (condition ? it : it.skip) | export const ifit = (condition: boolean) => (condition ? it : it.skip) | ||||||
| export const ifdescribe = (condition: boolean) => (condition ? describe : describe.skip) | export const ifdescribe = (condition: boolean) => (condition ? describe : describe.skip) | ||||||
| 
 | 
 | ||||||
| export const delay = (time: number) => new Promise(r => setTimeout(r, time)) | export const delay = (time: number) => new Promise(resolve => setTimeout(resolve, time)) | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { nextVersion } from '../script/release/version-bumper' | import { nextVersion } from '../script/release/version-bumper' | ||||||
| import * as utils from '../script/release/version-utils' | import * as utils from '../script/release/version-utils' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| describe('version-bumper', () => { | describe('version-bumper', () => { | ||||||
|   describe('makeVersion', () => { |   describe('makeVersion', () => { | ||||||
|  |  | ||||||
|  | @ -1,11 +1,11 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import * as cp from 'child_process'; | import * as cp from 'child_process' | ||||||
| import { BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron' | import { BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron' | ||||||
| import * as path from 'path' | import * as path from 'path' | ||||||
| 
 | 
 | ||||||
| import { emittedOnce } from './events-helpers' | import { emittedOnce } from './events-helpers' | ||||||
| import { closeWindow } from './window-helpers'; | import { closeWindow } from './window-helpers' | ||||||
| import { ifdescribe } from './spec-helpers'; | import { ifdescribe, delay } from './spec-helpers' | ||||||
| 
 | 
 | ||||||
| // visibilityState specs pass on linux with a real window manager but on CI
 | // visibilityState specs pass on linux with a real window manager but on CI
 | ||||||
| // the environment does not let these specs pass
 | // the environment does not let these specs pass
 | ||||||
|  | @ -45,7 +45,7 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   itWithOptions('should be visible when the window is initially shown', { |   itWithOptions('should be visible when the window is initially shown', { | ||||||
|     show: true, |     show: true | ||||||
|   }, async () => { |   }, async () => { | ||||||
|     await load() |     await load() | ||||||
|     const state = await getVisibilityState() |     const state = await getVisibilityState() | ||||||
|  | @ -53,7 +53,7 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   itWithOptions('should be hidden when the window is initially hidden', { |   itWithOptions('should be hidden when the window is initially hidden', { | ||||||
|     show: false, |     show: false | ||||||
|   }, async () => { |   }, async () => { | ||||||
|     await load() |     await load() | ||||||
|     const state = await getVisibilityState() |     const state = await getVisibilityState() | ||||||
|  | @ -61,7 +61,7 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   itWithOptions('should be visible when the window is initially hidden but shown before the page is loaded', { |   itWithOptions('should be visible when the window is initially hidden but shown before the page is loaded', { | ||||||
|     show: false, |     show: false | ||||||
|   }, async () => { |   }, async () => { | ||||||
|     w.show() |     w.show() | ||||||
|     await load() |     await load() | ||||||
|  | @ -70,12 +70,12 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   itWithOptions('should be hidden when the window is initially shown but hidden before the page is loaded', { |   itWithOptions('should be hidden when the window is initially shown but hidden before the page is loaded', { | ||||||
|     show: true, |     show: true | ||||||
|   }, async () => { |   }, async () => { | ||||||
|     // TODO(MarshallOfSound): Figure out if we can work around this 1 tick issue for users
 |     // TODO(MarshallOfSound): Figure out if we can work around this 1 tick issue for users
 | ||||||
|     if (process.platform === 'darwin') { |     if (process.platform === 'darwin') { | ||||||
|       // Wait for a tick, the window being "shown" takes 1 tick on macOS
 |       // Wait for a tick, the window being "shown" takes 1 tick on macOS
 | ||||||
|       await new Promise(r => setTimeout(r, 0)) |       await delay(0) | ||||||
|     } |     } | ||||||
|     w.hide() |     w.hide() | ||||||
|     await load() |     await load() | ||||||
|  | @ -133,13 +133,13 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|       x: 0, |       x: 0, | ||||||
|       y: 0, |       y: 0, | ||||||
|       width: 200, |       width: 200, | ||||||
|       height: 200, |       height: 200 | ||||||
|     }, async () => { |     }, async () => { | ||||||
|       await makeOtherWindow({ |       await makeOtherWindow({ | ||||||
|         x: 200, |         x: 200, | ||||||
|         y: 0, |         y: 0, | ||||||
|         width: 200, |         width: 200, | ||||||
|         height: 200, |         height: 200 | ||||||
|       }) |       }) | ||||||
|       await load() |       await load() | ||||||
|       const state = await getVisibilityState() |       const state = await getVisibilityState() | ||||||
|  | @ -150,13 +150,13 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|       x: 50, |       x: 50, | ||||||
|       y: 50, |       y: 50, | ||||||
|       width: 150, |       width: 150, | ||||||
|       height: 150, |       height: 150 | ||||||
|     }, async () => { |     }, async () => { | ||||||
|       await makeOtherWindow({ |       await makeOtherWindow({ | ||||||
|         x: 100, |         x: 100, | ||||||
|         y: 0, |         y: 0, | ||||||
|         width: 200, |         width: 200, | ||||||
|         height: 200, |         height: 200 | ||||||
|       }) |       }) | ||||||
|       await load() |       await load() | ||||||
|       const state = await getVisibilityState() |       const state = await getVisibilityState() | ||||||
|  | @ -167,7 +167,7 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|       x: 50, |       x: 50, | ||||||
|       y: 50, |       y: 50, | ||||||
|       width: 50, |       width: 50, | ||||||
|       height: 50, |       height: 50 | ||||||
|     }, async function () { |     }, async function () { | ||||||
|       this.timeout(240000) |       this.timeout(240000) | ||||||
|       await load() |       await load() | ||||||
|  | @ -176,7 +176,7 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => { | ||||||
|           x: 0, |           x: 0, | ||||||
|           y: 0, |           y: 0, | ||||||
|           width: 300, |           width: 300, | ||||||
|           height: 300, |           height: 300 | ||||||
|         }) |         }) | ||||||
|       }) |       }) | ||||||
|       const state = await getVisibilityState() |       const state = await getVisibilityState() | ||||||
|  |  | ||||||
|  | @ -523,7 +523,7 @@ describe('<webview> tag', function () { | ||||||
|     it('emits when accessing external protocol', async () => { |     it('emits when accessing external protocol', async () => { | ||||||
|       loadWebView(w.webContents, { |       loadWebView(w.webContents, { | ||||||
|         src: `magnet:test`, |         src: `magnet:test`, | ||||||
|         partition, |         partition | ||||||
|       }) |       }) | ||||||
|       const [, webViewContents] = await emittedOnce(app, 'web-contents-created') |       const [, webViewContents] = await emittedOnce(app, 'web-contents-created') | ||||||
|       await setUpRequestHandler(webViewContents.id, 'openExternal') |       await setUpRequestHandler(webViewContents.id, 'openExternal') | ||||||
|  | @ -544,5 +544,4 @@ describe('<webview> tag', function () { | ||||||
|       expect(error).to.equal('denied') |       expect(error).to.equal('denied') | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
| 
 |  | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| import { expect } from 'chai' | import { expect } from 'chai' | ||||||
| import { BrowserWindow } from 'electron' | import { BrowserWindow } from 'electron' | ||||||
| import { emittedOnce } from './events-helpers'; | import { emittedOnce } from './events-helpers' | ||||||
| 
 | 
 | ||||||
| async function ensureWindowIsClosed (window: BrowserWindow | null) { | async function ensureWindowIsClosed (window: BrowserWindow | null) { | ||||||
|   if (window && !window.isDestroyed()) { |   if (window && !window.isDestroyed()) { | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| resources: | resources: | ||||||
|   containers: |   containers: | ||||||
|   - container: arm32v7-test-container |   - container: arm32v7-test-container | ||||||
|     image: electronbuilds/arm32v7:0.0.2 |     image: electronbuilds/arm32v7:0.0.3 | ||||||
|     options: --shm-size 128m |     options: --shm-size 128m | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|  |  | ||||||
							
								
								
									
										188
									
								
								yarn.lock
									
										
									
									
									
								
							
							
						
						
									
										188
									
								
								yarn.lock
									
										
									
									
									
								
							|  | @ -3,9 +3,9 @@ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| "@babel/code-frame@^7.0.0": | "@babel/code-frame@^7.0.0": | ||||||
|   version "7.0.0" |   version "7.5.5" | ||||||
|   resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" |   resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" | ||||||
|   integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== |   integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== | ||||||
|   dependencies: |   dependencies: | ||||||
|     "@babel/highlight" "^7.0.0" |     "@babel/highlight" "^7.0.0" | ||||||
| 
 | 
 | ||||||
|  | @ -219,6 +219,11 @@ | ||||||
|   dependencies: |   dependencies: | ||||||
|     "@types/node" "*" |     "@types/node" "*" | ||||||
| 
 | 
 | ||||||
|  | "@types/json-schema@^7.0.3": | ||||||
|  |   version "7.0.3" | ||||||
|  |   resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" | ||||||
|  |   integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== | ||||||
|  | 
 | ||||||
| "@types/linkify-it@*": | "@types/linkify-it@*": | ||||||
|   version "2.1.0" |   version "2.1.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806" |   resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806" | ||||||
|  | @ -344,42 +349,46 @@ | ||||||
|     "@types/uglify-js" "*" |     "@types/uglify-js" "*" | ||||||
|     source-map "^0.6.0" |     source-map "^0.6.0" | ||||||
| 
 | 
 | ||||||
| "@typescript-eslint/eslint-plugin@^1.4.2": | "@typescript-eslint/eslint-plugin@^2.6.0": | ||||||
|   version "1.11.0" |   version "2.6.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.11.0.tgz#870f752c520db04db6d3668af7479026a6f2fb9a" |   resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.0.tgz#e82ed43fc4527b21bfe35c20a2d6e4ed49fc7957" | ||||||
|   integrity sha512-mXv9ccCou89C8/4avKHuPB2WkSZyY/XcTQUXd5LFZAcLw1I3mWYVjUu6eS9Ja0QkP/ClolbcW9tb3Ov/pMdcqw== |   integrity sha512-iCcXREU4RciLmLniwKLRPCOFVXrkF7z27XuHq5DrykpREv/mz6ztKAyLg2fdkM0hQC7659p5ZF5uStH7uzAJ/w== | ||||||
|   dependencies: |   dependencies: | ||||||
|     "@typescript-eslint/experimental-utils" "1.11.0" |     "@typescript-eslint/experimental-utils" "2.6.0" | ||||||
|     eslint-utils "^1.3.1" |     eslint-utils "^1.4.2" | ||||||
|     functional-red-black-tree "^1.0.1" |     functional-red-black-tree "^1.0.1" | ||||||
|     regexpp "^2.0.1" |     regexpp "^2.0.1" | ||||||
|     tsutils "^3.7.0" |     tsutils "^3.17.1" | ||||||
| 
 | 
 | ||||||
| "@typescript-eslint/experimental-utils@1.11.0": | "@typescript-eslint/experimental-utils@2.6.0": | ||||||
|   version "1.11.0" |   version "2.6.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.11.0.tgz#594abe47091cbeabac1d6f9cfed06d0ad99eb7e3" |   resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz#ed70bef72822bff54031ff0615fc888b9e2b6e8a" | ||||||
|   integrity sha512-7LbfaqF6B8oa8cp/315zxKk8FFzosRzzhF8Kn/ZRsRsnpm7Qcu25cR/9RnAQo5utZ2KIWVgaALr+ZmcbG47ruw== |   integrity sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA== | ||||||
|   dependencies: |   dependencies: | ||||||
|     "@typescript-eslint/typescript-estree" "1.11.0" |     "@types/json-schema" "^7.0.3" | ||||||
|     eslint-scope "^4.0.0" |     "@typescript-eslint/typescript-estree" "2.6.0" | ||||||
|  |     eslint-scope "^5.0.0" | ||||||
| 
 | 
 | ||||||
| "@typescript-eslint/parser@^1.4.2": | "@typescript-eslint/parser@^2.6.0": | ||||||
|   version "1.11.0" |   version "2.6.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.11.0.tgz#2f6d4f7e64eeb1e7c25b422f8df14d0c9e508e36" |   resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.6.0.tgz#5106295c6a7056287b4719e24aae8d6293d5af49" | ||||||
|   integrity sha512-5xBExyXaxVyczrZvbRKEXvaTUFFq7gIM9BynXukXZE0zF3IQP/FxF4mPmmh3gJ9egafZFqByCpPTFm3dk4SY7Q== |   integrity sha512-AvLejMmkcjRTJ2KD72v565W4slSrrzUIzkReu1JN34b8JnsEsxx7S9Xx/qXEuMQas0mkdUfETr0j3zOhq2DIqQ== | ||||||
|   dependencies: |   dependencies: | ||||||
|     "@types/eslint-visitor-keys" "^1.0.0" |     "@types/eslint-visitor-keys" "^1.0.0" | ||||||
|     "@typescript-eslint/experimental-utils" "1.11.0" |     "@typescript-eslint/experimental-utils" "2.6.0" | ||||||
|     "@typescript-eslint/typescript-estree" "1.11.0" |     "@typescript-eslint/typescript-estree" "2.6.0" | ||||||
|     eslint-visitor-keys "^1.0.0" |     eslint-visitor-keys "^1.1.0" | ||||||
| 
 | 
 | ||||||
| "@typescript-eslint/typescript-estree@1.11.0": | "@typescript-eslint/typescript-estree@2.6.0": | ||||||
|   version "1.11.0" |   version "2.6.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.11.0.tgz#b7b5782aab22e4b3b6d84633652c9f41e62d37d5" |   resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.0.tgz#d3e9d8e001492e2b9124c4d4bd4e7f03c0fd7254" | ||||||
|   integrity sha512-fquUHF5tAx1sM2OeRCC7wVxFd1iMELWMGCzOSmJ3pLzArj9+kRixdlC4d5MncuzXpjEqc6045p3KwM0o/3FuUA== |   integrity sha512-A3lSBVIdj2Gp0lFEL6in2eSPqJ33uAc3Ko+Y4brhjkxzjbzLnwBH22CwsW2sCo+iwogfIyvb56/AJri15H0u5Q== | ||||||
|   dependencies: |   dependencies: | ||||||
|  |     debug "^4.1.1" | ||||||
|  |     glob "^7.1.4" | ||||||
|  |     is-glob "^4.0.1" | ||||||
|     lodash.unescape "4.0.1" |     lodash.unescape "4.0.1" | ||||||
|     semver "5.5.0" |     semver "^6.3.0" | ||||||
| 
 | 
 | ||||||
| "@webassemblyjs/ast@1.8.5": | "@webassemblyjs/ast@1.8.5": | ||||||
|   version "1.8.5" |   version "1.8.5" | ||||||
|  | @ -551,15 +560,20 @@ accepts@~1.3.7: | ||||||
|     negotiator "0.6.2" |     negotiator "0.6.2" | ||||||
| 
 | 
 | ||||||
| acorn-jsx@^5.0.0: | acorn-jsx@^5.0.0: | ||||||
|   version "5.0.1" |   version "5.1.0" | ||||||
|   resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" |   resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" | ||||||
|   integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== |   integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== | ||||||
| 
 | 
 | ||||||
| acorn@^6.0.2, acorn@^6.0.7, acorn@^6.2.0: | acorn@^6.0.2, acorn@^6.2.0: | ||||||
|   version "6.2.0" |   version "6.2.0" | ||||||
|   resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3" |   resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3" | ||||||
|   integrity sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw== |   integrity sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw== | ||||||
| 
 | 
 | ||||||
|  | acorn@^6.0.7: | ||||||
|  |   version "6.3.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" | ||||||
|  |   integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== | ||||||
|  | 
 | ||||||
| ajv-errors@^1.0.0: | ajv-errors@^1.0.0: | ||||||
|   version "1.0.1" |   version "1.0.1" | ||||||
|   resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" |   resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" | ||||||
|  | @ -570,7 +584,7 @@ ajv-keywords@^3.0.0, ajv-keywords@^3.1.0: | ||||||
|   resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" |   resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" | ||||||
|   integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== |   integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== | ||||||
| 
 | 
 | ||||||
| ajv@^6.0.1, ajv@^6.1.0, ajv@^6.5.0, ajv@^6.5.5, ajv@^6.9.1: | ajv@^6.0.1, ajv@^6.1.0, ajv@^6.5.0, ajv@^6.5.5: | ||||||
|   version "6.10.1" |   version "6.10.1" | ||||||
|   resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.1.tgz#ebf8d3af22552df9dd049bfbe50cc2390e823593" |   resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.1.tgz#ebf8d3af22552df9dd049bfbe50cc2390e823593" | ||||||
|   integrity sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ== |   integrity sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ== | ||||||
|  | @ -580,6 +594,16 @@ ajv@^6.0.1, ajv@^6.1.0, ajv@^6.5.0, ajv@^6.5.5, ajv@^6.9.1: | ||||||
|     json-schema-traverse "^0.4.1" |     json-schema-traverse "^0.4.1" | ||||||
|     uri-js "^4.2.2" |     uri-js "^4.2.2" | ||||||
| 
 | 
 | ||||||
|  | ajv@^6.10.2, ajv@^6.9.1: | ||||||
|  |   version "6.10.2" | ||||||
|  |   resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" | ||||||
|  |   integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== | ||||||
|  |   dependencies: | ||||||
|  |     fast-deep-equal "^2.0.1" | ||||||
|  |     fast-json-stable-stringify "^2.0.0" | ||||||
|  |     json-schema-traverse "^0.4.1" | ||||||
|  |     uri-js "^4.2.2" | ||||||
|  | 
 | ||||||
| ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: | ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: | ||||||
|   version "3.2.0" |   version "3.2.0" | ||||||
|   resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" |   resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" | ||||||
|  | @ -2188,14 +2212,29 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: | ||||||
|     esrecurse "^4.1.0" |     esrecurse "^4.1.0" | ||||||
|     estraverse "^4.1.1" |     estraverse "^4.1.1" | ||||||
| 
 | 
 | ||||||
| eslint-utils@^1.3.0, eslint-utils@^1.3.1: | eslint-scope@^5.0.0: | ||||||
|  |   version "5.0.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" | ||||||
|  |   integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== | ||||||
|  |   dependencies: | ||||||
|  |     esrecurse "^4.1.0" | ||||||
|  |     estraverse "^4.1.1" | ||||||
|  | 
 | ||||||
|  | eslint-utils@^1.3.0: | ||||||
|   version "1.4.2" |   version "1.4.2" | ||||||
|   resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" |   resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" | ||||||
|   integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== |   integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== | ||||||
|   dependencies: |   dependencies: | ||||||
|     eslint-visitor-keys "^1.0.0" |     eslint-visitor-keys "^1.0.0" | ||||||
| 
 | 
 | ||||||
| eslint-visitor-keys@^1.0.0: | eslint-utils@^1.3.1, eslint-utils@^1.4.2: | ||||||
|  |   version "1.4.3" | ||||||
|  |   resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" | ||||||
|  |   integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== | ||||||
|  |   dependencies: | ||||||
|  |     eslint-visitor-keys "^1.1.0" | ||||||
|  | 
 | ||||||
|  | eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: | ||||||
|   version "1.1.0" |   version "1.1.0" | ||||||
|   resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" |   resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" | ||||||
|   integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== |   integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== | ||||||
|  | @ -2324,14 +2363,14 @@ esrecurse@^4.1.0: | ||||||
|     estraverse "^4.1.0" |     estraverse "^4.1.0" | ||||||
| 
 | 
 | ||||||
| estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: | ||||||
|   version "4.2.0" |   version "4.3.0" | ||||||
|   resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" |   resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" | ||||||
|   integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= |   integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== | ||||||
| 
 | 
 | ||||||
| esutils@^2.0.2: | esutils@^2.0.2: | ||||||
|   version "2.0.2" |   version "2.0.3" | ||||||
|   resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" |   resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" | ||||||
|   integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= |   integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== | ||||||
| 
 | 
 | ||||||
| etag@~1.8.1: | etag@~1.8.1: | ||||||
|   version "1.8.1" |   version "1.8.1" | ||||||
|  | @ -2943,7 +2982,7 @@ glob-to-regexp@^0.3.0: | ||||||
|   resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" |   resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" | ||||||
|   integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= |   integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= | ||||||
| 
 | 
 | ||||||
| glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: | glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.4: | ||||||
|   version "7.1.4" |   version "7.1.4" | ||||||
|   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" |   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" | ||||||
|   integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== |   integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== | ||||||
|  | @ -2955,6 +2994,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: | ||||||
|     once "^1.3.0" |     once "^1.3.0" | ||||||
|     path-is-absolute "^1.0.0" |     path-is-absolute "^1.0.0" | ||||||
| 
 | 
 | ||||||
|  | glob@^7.1.2, glob@^7.1.3: | ||||||
|  |   version "7.1.5" | ||||||
|  |   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" | ||||||
|  |   integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== | ||||||
|  |   dependencies: | ||||||
|  |     fs.realpath "^1.0.0" | ||||||
|  |     inflight "^1.0.4" | ||||||
|  |     inherits "2" | ||||||
|  |     minimatch "^3.0.4" | ||||||
|  |     once "^1.3.0" | ||||||
|  |     path-is-absolute "^1.0.0" | ||||||
|  | 
 | ||||||
| global-modules@2.0.0: | global-modules@2.0.0: | ||||||
|   version "2.0.0" |   version "2.0.0" | ||||||
|   resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" |   resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" | ||||||
|  | @ -3354,9 +3405,9 @@ inquirer@^5.2.0: | ||||||
|     through "^2.3.6" |     through "^2.3.6" | ||||||
| 
 | 
 | ||||||
| inquirer@^6.2.2: | inquirer@^6.2.2: | ||||||
|   version "6.4.1" |   version "6.5.2" | ||||||
|   resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.4.1.tgz#7bd9e5ab0567cd23b41b0180b68e0cfa82fc3c0b" |   resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" | ||||||
|   integrity sha512-/Jw+qPZx4EDYsaT6uz7F4GJRNFMRdKNeUZw3ZnKV8lyuUgz/YWRCSUAJMZSVhSq4Ec0R2oYnyi6b3d4JXcL5Nw== |   integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== | ||||||
|   dependencies: |   dependencies: | ||||||
|     ansi-escapes "^3.2.0" |     ansi-escapes "^3.2.0" | ||||||
|     chalk "^2.4.2" |     chalk "^2.4.2" | ||||||
|  | @ -3364,7 +3415,7 @@ inquirer@^6.2.2: | ||||||
|     cli-width "^2.0.0" |     cli-width "^2.0.0" | ||||||
|     external-editor "^3.0.3" |     external-editor "^3.0.3" | ||||||
|     figures "^2.0.0" |     figures "^2.0.0" | ||||||
|     lodash "^4.17.11" |     lodash "^4.17.12" | ||||||
|     mute-stream "0.0.7" |     mute-stream "0.0.7" | ||||||
|     run-async "^2.2.0" |     run-async "^2.2.0" | ||||||
|     rxjs "^6.4.0" |     rxjs "^6.4.0" | ||||||
|  | @ -3577,7 +3628,7 @@ is-glob@^3.1.0: | ||||||
|   dependencies: |   dependencies: | ||||||
|     is-extglob "^2.1.0" |     is-extglob "^2.1.0" | ||||||
| 
 | 
 | ||||||
| is-glob@^4.0.0: | is-glob@^4.0.0, is-glob@^4.0.1: | ||||||
|   version "4.0.1" |   version "4.0.1" | ||||||
|   resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" |   resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" | ||||||
|   integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== |   integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== | ||||||
|  | @ -4122,7 +4173,7 @@ lodash.uniq@^4.5.0: | ||||||
|   resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" |   resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" | ||||||
|   integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= |   integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= | ||||||
| 
 | 
 | ||||||
| lodash@^4.0.0, lodash@^4.17.11: | lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14: | ||||||
|   version "4.17.15" |   version "4.17.15" | ||||||
|   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" |   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" | ||||||
|   integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== |   integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== | ||||||
|  | @ -6414,13 +6465,20 @@ rxjs@^5.5.2: | ||||||
|   dependencies: |   dependencies: | ||||||
|     symbol-observable "1.0.1" |     symbol-observable "1.0.1" | ||||||
| 
 | 
 | ||||||
| rxjs@^6.3.3, rxjs@^6.4.0: | rxjs@^6.3.3: | ||||||
|   version "6.5.2" |   version "6.5.2" | ||||||
|   resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" |   resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" | ||||||
|   integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== |   integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== | ||||||
|   dependencies: |   dependencies: | ||||||
|     tslib "^1.9.0" |     tslib "^1.9.0" | ||||||
| 
 | 
 | ||||||
|  | rxjs@^6.4.0: | ||||||
|  |   version "6.5.3" | ||||||
|  |   resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" | ||||||
|  |   integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== | ||||||
|  |   dependencies: | ||||||
|  |     tslib "^1.9.0" | ||||||
|  | 
 | ||||||
| safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | ||||||
|   version "5.1.2" |   version "5.1.2" | ||||||
|   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" |   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" | ||||||
|  | @ -6462,17 +6520,12 @@ semver-compare@^1.0.0: | ||||||
|   resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" |   resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" | ||||||
|   integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= |   integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= | ||||||
| 
 | 
 | ||||||
| "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: | "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.6.0: | ||||||
|   version "5.7.0" |   version "5.7.0" | ||||||
|   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" |   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" | ||||||
|   integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== |   integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== | ||||||
| 
 | 
 | ||||||
| semver@5.5.0: | semver@^5.1.0, semver@^5.5.0, semver@^5.5.1: | ||||||
|   version "5.5.0" |  | ||||||
|   resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" |  | ||||||
|   integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== |  | ||||||
| 
 |  | ||||||
| semver@^5.1.0: |  | ||||||
|   version "5.7.1" |   version "5.7.1" | ||||||
|   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" |   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" | ||||||
|   integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== |   integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== | ||||||
|  | @ -6482,6 +6535,11 @@ semver@^6.0.0: | ||||||
|   resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" |   resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" | ||||||
|   integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== |   integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== | ||||||
| 
 | 
 | ||||||
|  | semver@^6.3.0: | ||||||
|  |   version "6.3.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" | ||||||
|  |   integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== | ||||||
|  | 
 | ||||||
| send@0.17.1: | send@0.17.1: | ||||||
|   version "0.17.1" |   version "0.17.1" | ||||||
|   resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" |   resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" | ||||||
|  | @ -7045,12 +7103,12 @@ table@^4.0.3: | ||||||
|     string-width "^2.1.1" |     string-width "^2.1.1" | ||||||
| 
 | 
 | ||||||
| table@^5.2.3: | table@^5.2.3: | ||||||
|   version "5.4.1" |   version "5.4.6" | ||||||
|   resolved "https://registry.yarnpkg.com/table/-/table-5.4.1.tgz#0691ae2ebe8259858efb63e550b6d5f9300171e8" |   resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" | ||||||
|   integrity sha512-E6CK1/pZe2N75rGZQotFOdmzWQ1AILtgYbMAbAjvms0S1l5IDB47zG3nCnFGB/w+7nB3vKofbLXCH7HPBo864w== |   integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== | ||||||
|   dependencies: |   dependencies: | ||||||
|     ajv "^6.9.1" |     ajv "^6.10.2" | ||||||
|     lodash "^4.17.11" |     lodash "^4.17.14" | ||||||
|     slice-ansi "^2.1.0" |     slice-ansi "^2.1.0" | ||||||
|     string-width "^3.0.0" |     string-width "^3.0.0" | ||||||
| 
 | 
 | ||||||
|  | @ -7342,10 +7400,10 @@ tslib@^1.8.1, tslib@^1.9.0: | ||||||
|   resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" |   resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" | ||||||
|   integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== |   integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== | ||||||
| 
 | 
 | ||||||
| tsutils@^3.7.0: | tsutils@^3.17.1: | ||||||
|   version "3.14.0" |   version "3.17.1" | ||||||
|   resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.14.0.tgz#bf8d5a7bae5369331fa0f2b0a5a10bd7f7396c77" |   resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" | ||||||
|   integrity sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw== |   integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== | ||||||
|   dependencies: |   dependencies: | ||||||
|     tslib "^1.8.1" |     tslib "^1.8.1" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Apthorp
				Jeremy Apthorp