From 18c259dc22b183fe42ba0cb433ca2d8b1e73ab7a Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Mon, 24 Feb 2020 05:17:16 -0800 Subject: [PATCH] Typescriptify the main process code (1/N) Summary: As a first step I've configured bundling for the main process code using Metro. For now I haven't converted anything to ts, just made that possible. The bundle is just produced into the "static" directory. To avoid too many changes I kept the "static" folder as it is, but probably non-static code should be moved from there. Also installed modules from "node_modules" for the main process are not bundled to avoid potential issues with node native modules. Reviewed By: mweststrate Differential Revision: D19960982 fbshipit-source-id: efbd426254e2b37c913c5f5f75f042c50ccee2f3 --- .gitignore | 1 + .vscode/launch.json | 12 +- package.json | 1 - scripts/build-release.js | 2 + scripts/build-utils.js | 46 ++- scripts/start-dev-server.js | 2 + static/index.js | 303 +--------------- static/main.js | 310 ++++++++++++++++ static/package.json | 10 +- .../__tests__/electron-process.node.js | 66 ++++ static/transforms/electron-process.js | 33 ++ static/transforms/electron-requires-main.js | 37 ++ static/transforms/electron-requires.js | 5 +- static/transforms/index.js | 38 +- static/yarn.lock | 342 ++++++++++++++++-- yarn.lock | 24 +- 16 files changed, 868 insertions(+), 364 deletions(-) create mode 100644 static/main.js create mode 100644 static/transforms/__tests__/electron-process.node.js create mode 100644 static/transforms/electron-process.js create mode 100644 static/transforms/electron-requires-main.js diff --git a/.gitignore b/.gitignore index d6a2bf980..7a7f206c7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules dist website/build yarn-error.log +static/main.bundle.* # iOS / Xcode *.xcworkspace diff --git a/.vscode/launch.json b/.vscode/launch.json index c1d4d7d18..fbf906bbb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,8 @@ "name": "Attach to Running Main", "type": "node", "request": "attach", - "port": 9229 + "port": 9229, + "sourceMaps": true }, { "type": "node", @@ -21,7 +22,14 @@ "name": "Launch Current Jest Suite", "program": "${workspaceFolder}/node_modules/.bin/jest", "args": ["--runInBand", "${relativeFile}"] - } + }, + { + "type": "node", + "request": "launch", + "name": "Launch Current Script", + "program": "${file}", + "cwd": "${workspaceFolder}" + } ], "compounds": [ { diff --git a/package.json b/package.json index a81f46d97..1e4d396c1 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,6 @@ "decompress-unzip": "^4.0.1", "deep-equal": "^2.0.1", "detect-port": "^1.1.1", - "electron-devtools-installer": "^2.2.0", "emotion": "^10.0.23", "expand-tilde": "^2.0.2", "express": "^4.15.2", diff --git a/scripts/build-release.js b/scripts/build-release.js index 80af993ce..9cadbd7cc 100755 --- a/scripts/build-release.js +++ b/scripts/build-release.js @@ -15,6 +15,7 @@ const cp = require('promisify-child-process'); const { buildFolder, compile, + compileMain, die, compileDefaultPlugins, getVersionNumber, @@ -168,6 +169,7 @@ function downloadIcons(buildFolder) { const dir = await buildFolder(); // eslint-disable-next-line no-console console.log('Created build directory', dir); + await compileMain(); copyStaticFolder(dir); await downloadIcons(dir); await compileDefaultPlugins(path.join(dir, 'defaultPlugins')); diff --git a/scripts/build-utils.js b/scripts/build-utils.js index 5dfafa5ad..2ce1202d8 100644 --- a/scripts/build-utils.js +++ b/scripts/build-utils.js @@ -46,9 +46,7 @@ function compileDefaultPlugins(defaultPluginDir, skipAll = false) { } function compile(buildFolder, entry) { - // eslint-disable-next-line no-console - console.log('Building main bundle', entry); - + console.log(`⚙️ Compiling renderer bundle...`); const projectRoots = path.join(__dirname, '..'); return Metro.runBuild( { @@ -77,7 +75,46 @@ function compile(buildFolder, entry) { entry, out: path.join(buildFolder, 'bundle.js'), }, - ).catch(die); + ) + .then(() => console.log('✅ Compiled renderer bundle.')) + .catch(die); +} + +async function compileMain() { + console.log(`⚙️ Compiling main bundle...`); + try { + const staticDir = path.resolve(__dirname, '..', 'static'); + const config = Object.assign({}, await Metro.loadConfig(), { + reporter: {update: () => {}}, + projectRoot: staticDir, + watchFolders: [staticDir], + transformer: { + babelTransformerPath: path.join( + __dirname, + '..', + 'static', + 'transforms', + 'index.js', + ), + }, + resolver: { + sourceExts: ['tsx', 'ts', 'js'], + blacklistRE: /(\/|\\)(sonar|flipper|flipper-public)(\/|\\)(dist|doctor)(\/|\\)|(\.native\.js$)/, + }, + }); + await Metro.runBuild(config, { + platform: 'web', + entry: path.join(staticDir, 'main.js'), + out: path.join(staticDir, 'main.bundle.js'), + dev: false, + minify: false, + sourceMap: true, + resetCache: true, + }); + console.log('✅ Compiled main bundle.'); + } catch (err) { + die(err); + } } function buildFolder() { @@ -114,6 +151,7 @@ function genMercurialRevision() { module.exports = { buildFolder, compile, + compileMain, die, compileDefaultPlugins, getVersionNumber, diff --git a/scripts/start-dev-server.js b/scripts/start-dev-server.js index 24cd004d3..106f911fc 100644 --- a/scripts/start-dev-server.js +++ b/scripts/start-dev-server.js @@ -17,6 +17,7 @@ const Convert = require('ansi-to-html'); const chalk = require('chalk'); const http = require('http'); const path = require('path'); +const {compileMain} = require('./build-utils'); const Metro = require('../static/node_modules/metro'); const MetroResolver = require('../static/node_modules/metro-resolver'); const fs = require('fs'); @@ -245,6 +246,7 @@ function outputScreen(socket) { const socket = await addWebsocket(server); await startMetroServer(app); outputScreen(socket); + await compileMain(); shutdownElectron = launchElectron({ devServerURL: `http://localhost:${port}`, bundleURL: `http://localhost:${port}/src/init.bundle`, diff --git a/static/index.js b/static/index.js index 6733f9174..fbe62a06d 100644 --- a/static/index.js +++ b/static/index.js @@ -7,304 +7,7 @@ * @format */ -const [s, ns] = process.hrtime(); -let launchStartTime = s * 1e3 + ns / 1e6; +global.electronRequire = require; +global.electronProcess = process; -const {app, BrowserWindow, ipcMain, Notification} = require('electron'); -const path = require('path'); -const url = require('url'); -const fs = require('fs'); -const fixPath = require('fix-path'); -const {exec} = require('child_process'); -const compilePlugins = require('./compilePlugins'); -const setup = require('./setup'); -const delegateToLauncher = require('./launcher'); -const expandTilde = require('expand-tilde'); -const yargs = require('yargs'); - -// Adds system PATH folders to process.env.PATH for MacOS production bundles. -fixPath(); - -// disable electron security warnings: https://github.com/electron/electron/blob/master/docs/tutorial/security.md#security-native-capabilities-and-your-responsibility -process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; - -if (process.platform === 'darwin') { - // If we are running on macOS and the app is called Flipper, we add a comment - // with the old name, to make it findable via Spotlight using its old name. - const APP_NAME = 'Flipper.app'; - const i = process.execPath.indexOf(`/${APP_NAME}/`); - if (i > -1) { - exec( - `osascript -e 'on run {f, c}' -e 'tell app "Finder" to set comment of (POSIX file f as alias) to c' -e end "${process.execPath.substr( - 0, - i, - )}/${APP_NAME}" "sonar"`, - ); - } -} - -const argv = yargs - .usage('$0 [args]') - .option('file', { - describe: 'Define a file to open on startup.', - type: 'string', - }) - .option('url', { - describe: 'Define a flipper:// URL to open on startup.', - type: 'string', - }) - .option('updater', { - default: true, - describe: 'Toggle the built-in update mechanism.', - type: 'boolean', - }) - .option('launcher', { - default: true, - describe: 'Toggle delegating to the update launcher on startup.', - type: 'boolean', - }) - .option('launcher-msg', { - describe: - '[Internal] Used to provide a user message from the launcher to the user.', - type: 'string', - }) - .version(global.__VERSION__) - .help() - .parse(process.argv.slice(1)); - -const {config, configPath, flipperDir} = setup(argv); - -const skipLoadingEmbeddedPlugins = process.env.FLIPPER_NO_EMBEDDED_PLUGINS; - -const pluginPaths = config.pluginPaths - .concat([ - path.join(configPath, '..', 'thirdparty'), - ...(skipLoadingEmbeddedPlugins - ? [] - : [ - path.join(__dirname, '..', 'src', 'plugins'), - path.join(__dirname, '..', 'src', 'fb', 'plugins'), - ]), - ]) - .map(expandTilde) - .filter(fs.existsSync); - -process.env.CONFIG = JSON.stringify({ - ...config, - pluginPaths, -}); - -// possible reference to main app window -let win; -let appReady = false; -let pluginsCompiled = false; -let deeplinkURL = argv.url; -let filePath = argv.file; - -// tracking -setInterval(() => { - if (win) { - win.webContents.send('trackUsage'); - } -}, 60 * 1000); - -compilePlugins( - () => { - if (win) { - win.reload(); - } - }, - pluginPaths, - path.join(flipperDir, 'plugins'), -).then(dynamicPlugins => { - ipcMain.on('get-dynamic-plugins', event => { - event.returnValue = dynamicPlugins; - }); - pluginsCompiled = true; - tryCreateWindow(); -}); - -// check if we already have an instance of this app open -const gotTheLock = app.requestSingleInstanceLock(); - -if (!gotTheLock) { - app.quit(); -} else { - app.on('second-instance', (event, commandLine, workingDirectory) => { - // Someone tried to run a second instance, we should focus our window. - if (win) { - if (win.isMinimized()) { - win.restore(); - } - win.focus(); - } - }); - - // Create myWindow, load the rest of the app, etc... - app.on('ready', () => {}); -} - -// quit app once all windows are closed -app.on('window-all-closed', () => { - appReady = false; - app.quit(); -}); - -app.on('will-finish-launching', () => { - // Protocol handler for osx - app.on('open-url', function(event, url) { - event.preventDefault(); - deeplinkURL = url; - argv.url = url; - if (win) { - win.webContents.send('flipper-protocol-handler', deeplinkURL); - } - }); - app.on('open-file', (event, path) => { - // When flipper app is running, and someone double clicks the import file, `componentDidMount` will not be called again and windows object will exist in that case. That's why calling `win.webContents.send('open-flipper-file', filePath);` again. - event.preventDefault(); - filePath = path; - argv.file = path; - if (win) { - win.webContents.send('open-flipper-file', filePath); - filePath = null; - } - }); -}); - -app.on('ready', () => { - // If we delegate to the launcher, shut down this instance of the app. - delegateToLauncher(argv).then(hasLauncherInvoked => { - if (hasLauncherInvoked) { - app.quit(); - return; - } - appReady = true; - app.commandLine.appendSwitch('scroll-bounce'); - tryCreateWindow(); - // if in development install the react devtools extension - if (process.env.NODE_ENV === 'development') { - const { - default: installExtension, - REACT_DEVELOPER_TOOLS, - REDUX_DEVTOOLS, - } = require('electron-devtools-installer'); - installExtension(REACT_DEVELOPER_TOOLS.id); - installExtension(REDUX_DEVTOOLS.id); - } - }); -}); - -ipcMain.on('componentDidMount', event => { - if (deeplinkURL) { - win.webContents.send('flipper-protocol-handler', deeplinkURL); - deeplinkURL = null; - } - if (filePath) { - // When flipper app is not running, the windows object might not exist in the callback of `open-file`, but after ``componentDidMount` it will definitely exist. - win.webContents.send('open-flipper-file', filePath); - filePath = null; - } -}); - -ipcMain.on('getLaunchTime', event => { - if (launchStartTime) { - event.sender.send('getLaunchTime', launchStartTime); - // set launchTime to null to only report it once, to prevents reporting wrong - // launch times for example after reloading the renderer process - launchStartTime = null; - } -}); - -ipcMain.on( - 'sendNotification', - (e, {payload, pluginNotification, closeAfter}) => { - // notifications can only be sent when app is ready - if (appReady) { - const n = new Notification(payload); - - // Forwarding notification events to renderer process - // https://electronjs.org/docs/api/notification#instance-events - ['show', 'click', 'close', 'reply', 'action'].forEach(eventName => { - n.on(eventName, (event, ...args) => { - e.sender.send( - 'notificationEvent', - eventName, - pluginNotification, - ...args, - ); - }); - }); - n.show(); - - if (closeAfter) { - setTimeout(() => { - n.close(); - }, closeAfter); - } - } - }, -); - -// Define custom protocol handler. Deep linking works on packaged versions of the application! -app.setAsDefaultProtocolClient('flipper'); - -function tryCreateWindow() { - if (appReady && pluginsCompiled) { - win = new BrowserWindow({ - show: false, - title: 'Flipper', - width: config.lastWindowPosition.width || 1400, - height: config.lastWindowPosition.height || 1000, - minWidth: 800, - minHeight: 600, - center: true, - backgroundThrottling: false, - titleBarStyle: 'hiddenInset', - vibrancy: 'sidebar', - webPreferences: { - webSecurity: false, - scrollBounce: true, - experimentalFeatures: true, - nodeIntegration: true, - webviewTag: true, - nativeWindowOpen: true, - }, - }); - win.once('ready-to-show', () => win.show()); - win.once('close', ({sender}) => { - if (process.env.NODE_ENV === 'development') { - // Removes as a default protocol for debug builds. Because even when the - // production application is installed, and one tries to deeplink through - // browser, it still looks for the debug one and tries to open electron - app.removeAsDefaultProtocolClient('flipper'); - } - const [x, y] = sender.getPosition(); - const [width, height] = sender.getSize(); - // save window position and size - fs.writeFileSync( - configPath, - JSON.stringify({ - ...config, - lastWindowPosition: { - x, - y, - width, - height, - }, - }), - ); - }); - if (config.lastWindowPosition.x && config.lastWindowPosition.y) { - win.setPosition(config.lastWindowPosition.x, config.lastWindowPosition.y); - } - const entryUrl = - process.env.ELECTRON_URL || - url.format({ - pathname: path.join(__dirname, 'index.html'), - protocol: 'file:', - slashes: true, - }); - win.loadURL(entryUrl); - } -} +require('./main.bundle.js'); diff --git a/static/main.js b/static/main.js new file mode 100644 index 000000000..6733f9174 --- /dev/null +++ b/static/main.js @@ -0,0 +1,310 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +const [s, ns] = process.hrtime(); +let launchStartTime = s * 1e3 + ns / 1e6; + +const {app, BrowserWindow, ipcMain, Notification} = require('electron'); +const path = require('path'); +const url = require('url'); +const fs = require('fs'); +const fixPath = require('fix-path'); +const {exec} = require('child_process'); +const compilePlugins = require('./compilePlugins'); +const setup = require('./setup'); +const delegateToLauncher = require('./launcher'); +const expandTilde = require('expand-tilde'); +const yargs = require('yargs'); + +// Adds system PATH folders to process.env.PATH for MacOS production bundles. +fixPath(); + +// disable electron security warnings: https://github.com/electron/electron/blob/master/docs/tutorial/security.md#security-native-capabilities-and-your-responsibility +process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; + +if (process.platform === 'darwin') { + // If we are running on macOS and the app is called Flipper, we add a comment + // with the old name, to make it findable via Spotlight using its old name. + const APP_NAME = 'Flipper.app'; + const i = process.execPath.indexOf(`/${APP_NAME}/`); + if (i > -1) { + exec( + `osascript -e 'on run {f, c}' -e 'tell app "Finder" to set comment of (POSIX file f as alias) to c' -e end "${process.execPath.substr( + 0, + i, + )}/${APP_NAME}" "sonar"`, + ); + } +} + +const argv = yargs + .usage('$0 [args]') + .option('file', { + describe: 'Define a file to open on startup.', + type: 'string', + }) + .option('url', { + describe: 'Define a flipper:// URL to open on startup.', + type: 'string', + }) + .option('updater', { + default: true, + describe: 'Toggle the built-in update mechanism.', + type: 'boolean', + }) + .option('launcher', { + default: true, + describe: 'Toggle delegating to the update launcher on startup.', + type: 'boolean', + }) + .option('launcher-msg', { + describe: + '[Internal] Used to provide a user message from the launcher to the user.', + type: 'string', + }) + .version(global.__VERSION__) + .help() + .parse(process.argv.slice(1)); + +const {config, configPath, flipperDir} = setup(argv); + +const skipLoadingEmbeddedPlugins = process.env.FLIPPER_NO_EMBEDDED_PLUGINS; + +const pluginPaths = config.pluginPaths + .concat([ + path.join(configPath, '..', 'thirdparty'), + ...(skipLoadingEmbeddedPlugins + ? [] + : [ + path.join(__dirname, '..', 'src', 'plugins'), + path.join(__dirname, '..', 'src', 'fb', 'plugins'), + ]), + ]) + .map(expandTilde) + .filter(fs.existsSync); + +process.env.CONFIG = JSON.stringify({ + ...config, + pluginPaths, +}); + +// possible reference to main app window +let win; +let appReady = false; +let pluginsCompiled = false; +let deeplinkURL = argv.url; +let filePath = argv.file; + +// tracking +setInterval(() => { + if (win) { + win.webContents.send('trackUsage'); + } +}, 60 * 1000); + +compilePlugins( + () => { + if (win) { + win.reload(); + } + }, + pluginPaths, + path.join(flipperDir, 'plugins'), +).then(dynamicPlugins => { + ipcMain.on('get-dynamic-plugins', event => { + event.returnValue = dynamicPlugins; + }); + pluginsCompiled = true; + tryCreateWindow(); +}); + +// check if we already have an instance of this app open +const gotTheLock = app.requestSingleInstanceLock(); + +if (!gotTheLock) { + app.quit(); +} else { + app.on('second-instance', (event, commandLine, workingDirectory) => { + // Someone tried to run a second instance, we should focus our window. + if (win) { + if (win.isMinimized()) { + win.restore(); + } + win.focus(); + } + }); + + // Create myWindow, load the rest of the app, etc... + app.on('ready', () => {}); +} + +// quit app once all windows are closed +app.on('window-all-closed', () => { + appReady = false; + app.quit(); +}); + +app.on('will-finish-launching', () => { + // Protocol handler for osx + app.on('open-url', function(event, url) { + event.preventDefault(); + deeplinkURL = url; + argv.url = url; + if (win) { + win.webContents.send('flipper-protocol-handler', deeplinkURL); + } + }); + app.on('open-file', (event, path) => { + // When flipper app is running, and someone double clicks the import file, `componentDidMount` will not be called again and windows object will exist in that case. That's why calling `win.webContents.send('open-flipper-file', filePath);` again. + event.preventDefault(); + filePath = path; + argv.file = path; + if (win) { + win.webContents.send('open-flipper-file', filePath); + filePath = null; + } + }); +}); + +app.on('ready', () => { + // If we delegate to the launcher, shut down this instance of the app. + delegateToLauncher(argv).then(hasLauncherInvoked => { + if (hasLauncherInvoked) { + app.quit(); + return; + } + appReady = true; + app.commandLine.appendSwitch('scroll-bounce'); + tryCreateWindow(); + // if in development install the react devtools extension + if (process.env.NODE_ENV === 'development') { + const { + default: installExtension, + REACT_DEVELOPER_TOOLS, + REDUX_DEVTOOLS, + } = require('electron-devtools-installer'); + installExtension(REACT_DEVELOPER_TOOLS.id); + installExtension(REDUX_DEVTOOLS.id); + } + }); +}); + +ipcMain.on('componentDidMount', event => { + if (deeplinkURL) { + win.webContents.send('flipper-protocol-handler', deeplinkURL); + deeplinkURL = null; + } + if (filePath) { + // When flipper app is not running, the windows object might not exist in the callback of `open-file`, but after ``componentDidMount` it will definitely exist. + win.webContents.send('open-flipper-file', filePath); + filePath = null; + } +}); + +ipcMain.on('getLaunchTime', event => { + if (launchStartTime) { + event.sender.send('getLaunchTime', launchStartTime); + // set launchTime to null to only report it once, to prevents reporting wrong + // launch times for example after reloading the renderer process + launchStartTime = null; + } +}); + +ipcMain.on( + 'sendNotification', + (e, {payload, pluginNotification, closeAfter}) => { + // notifications can only be sent when app is ready + if (appReady) { + const n = new Notification(payload); + + // Forwarding notification events to renderer process + // https://electronjs.org/docs/api/notification#instance-events + ['show', 'click', 'close', 'reply', 'action'].forEach(eventName => { + n.on(eventName, (event, ...args) => { + e.sender.send( + 'notificationEvent', + eventName, + pluginNotification, + ...args, + ); + }); + }); + n.show(); + + if (closeAfter) { + setTimeout(() => { + n.close(); + }, closeAfter); + } + } + }, +); + +// Define custom protocol handler. Deep linking works on packaged versions of the application! +app.setAsDefaultProtocolClient('flipper'); + +function tryCreateWindow() { + if (appReady && pluginsCompiled) { + win = new BrowserWindow({ + show: false, + title: 'Flipper', + width: config.lastWindowPosition.width || 1400, + height: config.lastWindowPosition.height || 1000, + minWidth: 800, + minHeight: 600, + center: true, + backgroundThrottling: false, + titleBarStyle: 'hiddenInset', + vibrancy: 'sidebar', + webPreferences: { + webSecurity: false, + scrollBounce: true, + experimentalFeatures: true, + nodeIntegration: true, + webviewTag: true, + nativeWindowOpen: true, + }, + }); + win.once('ready-to-show', () => win.show()); + win.once('close', ({sender}) => { + if (process.env.NODE_ENV === 'development') { + // Removes as a default protocol for debug builds. Because even when the + // production application is installed, and one tries to deeplink through + // browser, it still looks for the debug one and tries to open electron + app.removeAsDefaultProtocolClient('flipper'); + } + const [x, y] = sender.getPosition(); + const [width, height] = sender.getSize(); + // save window position and size + fs.writeFileSync( + configPath, + JSON.stringify({ + ...config, + lastWindowPosition: { + x, + y, + width, + height, + }, + }), + ); + }); + if (config.lastWindowPosition.x && config.lastWindowPosition.y) { + win.setPosition(config.lastWindowPosition.x, config.lastWindowPosition.y); + } + const entryUrl = + process.env.ELECTRON_URL || + url.format({ + pathname: path.join(__dirname, 'index.html'), + protocol: 'file:', + slashes: true, + }); + win.loadURL(entryUrl); + } +} diff --git a/static/package.json b/static/package.json index c762103a6..dee869097 100644 --- a/static/package.json +++ b/static/package.json @@ -2,7 +2,7 @@ "name": "flipper-static", "version": "1.0.0", "main": "index.js", - "license": "MIT", + "license": "MIT", "dependencies": { "@babel/core": "^7.8.3", "@babel/generator": "^7.8.3", @@ -15,6 +15,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.8.3", "@babel/plugin-transform-typescript": "^7.8.3", "@babel/preset-react": "^7.8.3", + "electron-devtools-installer": "^2.2.4", "expand-tilde": "^2.0.2", "fb-watchman": "^2.0.0", "fix-path": "^3.0.0", @@ -23,12 +24,15 @@ "mkdirp": "^1.0.0", "p-map": "^3.0.0", "recursive-readdir": "2.2.2", + "uuid": "^3.3.2", "xdg-basedir": "^4.0.0", - "yargs": "^15.0.1", - "uuid": "^3.3.2" + "yargs": "^15.0.1" }, "resolutions": { "metro/temp": "0.9.0", "ws": "7.2.0" + }, + "devDependencies": { + "@babel/preset-env": "^7.8.3" } } diff --git a/static/transforms/__tests__/electron-process.node.js b/static/transforms/__tests__/electron-process.node.js new file mode 100644 index 000000000..a124c36bb --- /dev/null +++ b/static/transforms/__tests__/electron-process.node.js @@ -0,0 +1,66 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import {transform} from '@babel/core'; +import electronProcess from '../electron-process'; + +const babelOptions = { + ast: true, + plugins: [electronProcess], + filename: 'index.js', +}; + +test('transform "process.exit(0);"', () => { + const src = 'process.exit(0);'; + const code = transform(src, babelOptions).code; + expect(code).toMatchInlineSnapshot(`"electronProcess.exit(0);"`); +}); + +test('transform "global.process.exit(0);"', () => { + const src = 'global.process.exit(0);'; + const code = transform(src, babelOptions).code; + expect(code).toMatchInlineSnapshot(`"global.electronProcess.exit(0);"`); +}); + +test('transform "process.ENV.TEST = "true";"', () => { + const src = 'process.ENV.TEST = "true";'; + const code = transform(src, babelOptions).code; + expect(code).toMatchInlineSnapshot( + `"electronProcess.ENV.TEST = \\"true\\";"`, + ); +}); + +test('do not transform if process bound in an upper scope', () => { + const src = ` + const process = {}; + for (const i=0; i<10; i++) { + process.ENV[i] = i; + } + `; + const code = transform(src, babelOptions).code; + expect(code).toMatchInlineSnapshot(` + "const process = {}; + + for (const i = 0; i < 10; i++) { + process.ENV[i] = i; + }" + `); +}); + +test('do not transform if process bound to the current scope', () => { + const src = ` + const process = {}; + process.ENV.TEST = "true"; + `; + const code = transform(src, babelOptions).code; + expect(code).toMatchInlineSnapshot(` + "const process = {}; + process.ENV.TEST = \\"true\\";" + `); +}); diff --git a/static/transforms/electron-process.js b/static/transforms/electron-process.js new file mode 100644 index 000000000..425ef9ab3 --- /dev/null +++ b/static/transforms/electron-process.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +module.exports = function(babel, options) { + return { + name: 'change-process-to-electronProcess', + visitor: { + MemberExpression(path) { + if ( + path.node.object.type === 'Identifier' && + path.node.object.name === 'process' && + !path.scope.hasBinding('process') + ) { + path.node.object.name = 'electronProcess'; + } else if ( + path.node.object.type === 'MemberExpression' && + path.node.object.object.type === 'Identifier' && + path.node.object.object.name === 'global' && + path.node.object.property.type === 'Identifier' && + path.node.object.property.name === 'process' + ) { + path.node.object.property.name = 'electronProcess'; + } + }, + }, + }; +}; diff --git a/static/transforms/electron-requires-main.js b/static/transforms/electron-requires-main.js new file mode 100644 index 000000000..5c6d6cf30 --- /dev/null +++ b/static/transforms/electron-requires-main.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +function isRequire(node) { + return ( + node.type === 'CallExpression' && + node.callee.type === 'Identifier' && + node.callee.name === 'require' && + node.arguments.length === 1 && + node.arguments[0].type === 'StringLiteral' + ); +} + +module.exports = function(babel, options) { + return { + name: 'change-electron-to-electronRequire-in-main', + visitor: { + CallExpression(path) { + if (!isRequire(path.node)) { + return; + } + + const source = path.node.arguments[0].value; + + if (!source.startsWith('./')) { + path.node.callee.name = 'electronRequire'; + } + }, + }, + }; +}; diff --git a/static/transforms/electron-requires.js b/static/transforms/electron-requires.js index 372f385af..1db70f2bf 100644 --- a/static/transforms/electron-requires.js +++ b/static/transforms/electron-requires.js @@ -78,7 +78,10 @@ module.exports = function(babel) { const source = path.node.arguments[0].value; - if (BUILTINS.includes(source)) { + if ( + BUILTINS.includes(source) || + BUILTINS.some(moduleName => source.startsWith(`${moduleName}/`)) + ) { path.node.callee.name = 'electronRequire'; } diff --git a/static/transforms/index.js b/static/transforms/index.js index ccee3d9ab..8630c7775 100644 --- a/static/transforms/index.js +++ b/static/transforms/index.js @@ -12,12 +12,24 @@ const babylon = require('@babel/parser'); const babel = require('@babel/core'); const fs = require('fs'); const path = require('path'); +const staticDir = path.resolve(__dirname, '..'); function transform({filename, options, src}) { - const presets = [require('../node_modules/@babel/preset-react')]; const isPlugin = options.projectRoot && !__dirname.startsWith(options.projectRoot); - const isTypeScript = filename.endsWith('.tsx'); + const isMain = + options.projectRoot && + options.projectRoot === staticDir && + !options.isTestRunner; + const isTypeScript = filename.endsWith('.tsx') || filename.endsWith('.ts'); + const presets = [ + isMain + ? [ + require('../node_modules/@babel/preset-env'), + {targets: {electron: require('electron/package.json').version}}, + ] + : require('../node_modules/@babel/preset-react'), + ]; const ast = babylon.parse(src, { filename, @@ -75,11 +87,21 @@ function transform({filename, options, src}) { plugins.push(require('./electron-stubs.js')); } if (!options.isTestRunner) { - // Replacing require statements with electronRequire to prevent metro from - // resolving them. electronRequire are resolved during runtime by electron. - // As the tests are not bundled by metro and run in @jest-runner/electron, - // electron imports are working out of the box. - plugins.push(require('./electron-requires.js')); + if (isMain) { + // For the main Electron process ("static" folder), to avoid issues with + // native node modules, we prevent Metro from resolving any installed modules. + // Instead all of them are just resolved from "node_modules" as usual. + plugins.push(require('./electron-requires-main')); + // Metro bundler messes up "global.process", so we're changing all its occurrences to "global.electronProcess" instead. + // https://github.com/facebook/metro/blob/7e6b3114fc4a9b07a8c0dd3797b1e0c55a4c32ad/packages/metro/src/lib/getPreludeCode.js#L24 + plugins.push(require('./electron-process')); + } else { + // Replacing require statements with electronRequire to prevent metro from + // resolving them. electronRequire are resolved during runtime by electron. + // As the tests are not bundled by metro and run in @jest-runner/electron, + // electron imports are working out of the box. + plugins.push(require('./electron-requires')); + } } if (isPlugin) { plugins.push(require('./flipper-requires.js')); @@ -97,6 +119,7 @@ function transform({filename, options, src}) { plugins, presets, sourceMaps: true, + retainLines: !!options.isTestRunner, }); const result = generate( @@ -105,6 +128,7 @@ function transform({filename, options, src}) { filename, sourceFileName: filename, sourceMaps: true, + retainLines: !!options.isTestRunner, }, src, ); diff --git a/static/yarn.lock b/static/yarn.lock index 1e686eeb1..921394ec8 100644 --- a/static/yarn.lock +++ b/static/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"7zip@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" + integrity sha1-nK+xca+CMpSQNTtIFvAzR6oVCjA= + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" @@ -9,6 +14,15 @@ dependencies: "@babel/highlight" "^7.8.3" +"@babel/compat-data@^7.8.4": + version "7.8.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.5.tgz#d28ce872778c23551cbb9432fc68d28495b613b9" + integrity sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg== + dependencies: + browserslist "^4.8.5" + invariant "^2.2.4" + semver "^5.5.0" + "@babel/core@^7.0.0", "@babel/core@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" @@ -72,6 +86,17 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-compilation-targets@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz#03d7ecd454b7ebe19a254f76617e61770aed2c88" + integrity sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg== + dependencies: + "@babel/compat-data" "^7.8.4" + browserslist "^4.8.5" + invariant "^2.2.4" + levenary "^1.1.1" + semver "^5.5.0" + "@babel/helper-create-class-features-plugin@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz#5b94be88c255f140fd2c10dd151e7f98f4bff397" @@ -253,6 +278,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-proposal-async-generator-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" + integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-remap-async-to-generator" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" @@ -261,6 +295,14 @@ "@babel/helper-create-class-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-proposal-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" + integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-proposal-export-default-from@^7.0.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.8.3.tgz#4cb7c2fdeaed490b60d9bfd3dc8a20f81f9c2e7c" @@ -269,6 +311,14 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-export-default-from" "^7.8.3" +"@babel/plugin-proposal-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b" + integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" @@ -285,7 +335,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" -"@babel/plugin-proposal-optional-catch-binding@^7.0.0": +"@babel/plugin-proposal-optional-catch-binding@^7.0.0", "@babel/plugin-proposal-optional-catch-binding@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9" integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw== @@ -301,6 +351,21 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" +"@babel/plugin-proposal-unicode-property-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" + integrity sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-class-properties@^7.0.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz#6cb933a8872c8d359bfde69bbeaae5162fd1e8f7" @@ -308,7 +373,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-dynamic-import@^7.0.0": +"@babel/plugin-syntax-dynamic-import@^7.0.0", "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== @@ -329,6 +394,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz#521b06c83c40480f1e58b4fd33b92eceb1d6ea94" @@ -364,6 +436,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391" + integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-typescript@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc" @@ -371,14 +450,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-arrow-functions@^7.0.0": +"@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-async-to-generator@^7.0.0": +"@babel/plugin-transform-async-to-generator@^7.0.0", "@babel/plugin-transform-async-to-generator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086" integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ== @@ -387,14 +466,14 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-remap-async-to-generator" "^7.8.3" -"@babel/plugin-transform-block-scoped-functions@^7.0.0": +"@babel/plugin-transform-block-scoped-functions@^7.0.0", "@babel/plugin-transform-block-scoped-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3" integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-block-scoping@^7.0.0": +"@babel/plugin-transform-block-scoping@^7.0.0", "@babel/plugin-transform-block-scoping@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a" integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w== @@ -402,7 +481,7 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.0.0": +"@babel/plugin-transform-classes@^7.0.0", "@babel/plugin-transform-classes@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8" integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w== @@ -416,21 +495,36 @@ "@babel/helper-split-export-declaration" "^7.8.3" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.0.0": +"@babel/plugin-transform-computed-properties@^7.0.0", "@babel/plugin-transform-computed-properties@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b" integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-destructuring@^7.0.0": +"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz#20ddfbd9e4676906b1056ee60af88590cc7aaa0b" integrity sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-exponentiation-operator@^7.0.0": +"@babel/plugin-transform-dotall-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" + integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-duplicate-keys@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1" + integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-exponentiation-operator@^7.0.0", "@babel/plugin-transform-exponentiation-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7" integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ== @@ -453,7 +547,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-function-name@^7.0.0": +"@babel/plugin-transform-for-of@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d" + integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-function-name@^7.0.0", "@babel/plugin-transform-function-name@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b" integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ== @@ -461,20 +562,29 @@ "@babel/helper-function-name" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-literals@^7.0.0": +"@babel/plugin-transform-literals@^7.0.0", "@babel/plugin-transform-literals@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1" integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-member-expression-literals@^7.0.0": +"@babel/plugin-transform-member-expression-literals@^7.0.0", "@babel/plugin-transform-member-expression-literals@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410" integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA== dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-transform-modules-amd@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz#65606d44616b50225e76f5578f33c568a0b876a5" + integrity sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ== + dependencies: + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + "@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz#df251706ec331bd058a34bdd72613915f82928a5" @@ -485,6 +595,38 @@ "@babel/helper-simple-access" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" +"@babel/plugin-transform-modules-systemjs@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz#d8bbf222c1dbe3661f440f2f00c16e9bb7d0d420" + integrity sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg== + dependencies: + "@babel/helper-hoist-variables" "^7.8.3" + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + +"@babel/plugin-transform-modules-umd@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz#592d578ce06c52f5b98b02f913d653ffe972661a" + integrity sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw== + dependencies: + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" + integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + +"@babel/plugin-transform-new-target@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43" + integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-object-assign@^7.0.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.8.3.tgz#dc3b8dd50ef03837868a37b7df791f64f288538e" @@ -492,7 +634,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-object-super@^7.0.0": +"@babel/plugin-transform-object-super@^7.0.0", "@babel/plugin-transform-object-super@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725" integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ== @@ -509,7 +651,16 @@ "@babel/helper-get-function-arity" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-property-literals@^7.0.0": +"@babel/plugin-transform-parameters@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz#1d5155de0b65db0ccf9971165745d3bb990d77d3" + integrity sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA== + dependencies: + "@babel/helper-call-delegate" "^7.8.3" + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-property-literals@^7.0.0", "@babel/plugin-transform-property-literals@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263" integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg== @@ -548,13 +699,20 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-jsx" "^7.8.3" -"@babel/plugin-transform-regenerator@^7.0.0": +"@babel/plugin-transform-regenerator@^7.0.0", "@babel/plugin-transform-regenerator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz#b31031e8059c07495bf23614c97f3d9698bc6ec8" integrity sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA== dependencies: regenerator-transform "^0.14.0" +"@babel/plugin-transform-reserved-words@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5" + integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-runtime@^7.0.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.8.3.tgz#c0153bc0a5375ebc1f1591cb7eea223adea9f169" @@ -565,21 +723,21 @@ resolve "^1.8.1" semver "^5.5.1" -"@babel/plugin-transform-shorthand-properties@^7.0.0": +"@babel/plugin-transform-shorthand-properties@^7.0.0", "@babel/plugin-transform-shorthand-properties@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-spread@^7.0.0": +"@babel/plugin-transform-spread@^7.0.0", "@babel/plugin-transform-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8" integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-sticky-regex@^7.0.0": +"@babel/plugin-transform-sticky-regex@^7.0.0", "@babel/plugin-transform-sticky-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100" integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw== @@ -587,7 +745,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-regex" "^7.8.3" -"@babel/plugin-transform-template-literals@^7.0.0": +"@babel/plugin-transform-template-literals@^7.0.0", "@babel/plugin-transform-template-literals@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80" integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ== @@ -595,6 +753,13 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" + integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-typescript@^7.5.0", "@babel/plugin-transform-typescript@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.3.tgz#be6f01a7ef423be68e65ace1f04fc407e6d88917" @@ -604,7 +769,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-typescript" "^7.8.3" -"@babel/plugin-transform-unicode-regex@^7.0.0": +"@babel/plugin-transform-unicode-regex@^7.0.0", "@babel/plugin-transform-unicode-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw== @@ -612,6 +777,69 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" +"@babel/preset-env@^7.8.3": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.4.tgz#9dac6df5f423015d3d49b6e9e5fa3413e4a72c4e" + integrity sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w== + dependencies: + "@babel/compat-data" "^7.8.4" + "@babel/helper-compilation-targets" "^7.8.4" + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-proposal-async-generator-functions" "^7.8.3" + "@babel/plugin-proposal-dynamic-import" "^7.8.3" + "@babel/plugin-proposal-json-strings" "^7.8.3" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread" "^7.8.3" + "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.8.3" + "@babel/plugin-transform-async-to-generator" "^7.8.3" + "@babel/plugin-transform-block-scoped-functions" "^7.8.3" + "@babel/plugin-transform-block-scoping" "^7.8.3" + "@babel/plugin-transform-classes" "^7.8.3" + "@babel/plugin-transform-computed-properties" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-dotall-regex" "^7.8.3" + "@babel/plugin-transform-duplicate-keys" "^7.8.3" + "@babel/plugin-transform-exponentiation-operator" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.8.4" + "@babel/plugin-transform-function-name" "^7.8.3" + "@babel/plugin-transform-literals" "^7.8.3" + "@babel/plugin-transform-member-expression-literals" "^7.8.3" + "@babel/plugin-transform-modules-amd" "^7.8.3" + "@babel/plugin-transform-modules-commonjs" "^7.8.3" + "@babel/plugin-transform-modules-systemjs" "^7.8.3" + "@babel/plugin-transform-modules-umd" "^7.8.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" + "@babel/plugin-transform-new-target" "^7.8.3" + "@babel/plugin-transform-object-super" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.4" + "@babel/plugin-transform-property-literals" "^7.8.3" + "@babel/plugin-transform-regenerator" "^7.8.3" + "@babel/plugin-transform-reserved-words" "^7.8.3" + "@babel/plugin-transform-shorthand-properties" "^7.8.3" + "@babel/plugin-transform-spread" "^7.8.3" + "@babel/plugin-transform-sticky-regex" "^7.8.3" + "@babel/plugin-transform-template-literals" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.4" + "@babel/plugin-transform-unicode-regex" "^7.8.3" + "@babel/types" "^7.8.3" + browserslist "^4.8.5" + core-js-compat "^3.6.2" + invariant "^2.2.2" + levenary "^1.1.1" + semver "^5.5.0" + "@babel/preset-react@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.8.3.tgz#23dc63f1b5b0751283e04252e78cf1d6589273d2" @@ -966,6 +1194,15 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +browserslist@^4.8.3, browserslist@^4.8.5: + version "4.8.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.7.tgz#ec8301ff415e6a42c949d0e66b405eb539c532d0" + integrity sha512-gFOnZNYBHrEyUML0xr5NJ6edFaaKbTFX9S9kQHlYfCP0Rit/boRIz4G+Avq6/4haEKJXdGGUnoolx+5MWW2BoA== + dependencies: + caniuse-lite "^1.0.30001027" + electron-to-chromium "^1.3.349" + node-releases "^1.1.49" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1027,6 +1264,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +caniuse-lite@^1.0.30001027: + version "1.0.30001028" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001028.tgz#f2241242ac70e0fa9cda55c2776d32a0867971c2" + integrity sha512-Vnrq+XMSHpT7E+LWoIYhs3Sne8h9lx9YJV3acH3THNCwU/9zV93/ta4xVfzTtnqd3rvnuVpVjE3DFqf56tr3aQ== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1165,6 +1407,14 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +core-js-compat@^3.6.2: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.4.tgz#938476569ebb6cda80d339bcf199fae4f16fff17" + integrity sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA== + dependencies: + browserslist "^4.8.3" + semver "7.0.0" + core-js@^2.2.2, core-js@^2.4.1: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" @@ -1204,6 +1454,11 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cross-unzip@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/cross-unzip/-/cross-unzip-0.0.2.tgz#5183bc47a09559befcf98cc4657964999359372f" + integrity sha1-UYO8R6CVWb78+YzEZXlkmZNZNy8= + debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1272,6 +1527,21 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +electron-devtools-installer@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-2.2.4.tgz#261a50337e37121d338b966f07922eb4939a8763" + integrity sha512-b5kcM3hmUqn64+RUcHjjr8ZMpHS2WJ5YO0pnG9+P/RTdx46of/JrEjuciHWux6pE+On6ynWhHJF53j/EDJN0PA== + dependencies: + "7zip" "0.0.6" + cross-unzip "0.0.2" + rimraf "^2.5.2" + semver "^5.3.0" + +electron-to-chromium@^1.3.349: + version "1.3.354" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.354.tgz#6c6ad9ef63654c4c022269517c5a3095cebc94db" + integrity sha512-24YMkNiZWOUeF6YeoscWfIGP0oMx+lJpU/miwI+lcu7plIDpyZn8Gx0lx0qTDlzGoz7hx+lpyD8QkbkX5L2Pqw== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -1680,7 +1950,7 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -invariant@^2.2.4: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -2009,6 +2279,13 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== + dependencies: + leven "^3.1.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -2446,6 +2723,13 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= +node-releases@^1.1.49: + version "1.1.49" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.49.tgz#67ba5a3fac2319262675ef864ed56798bb33b93e" + integrity sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg== + dependencies: + semver "^6.3.0" + normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -2822,7 +3106,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@^2.5.4: +rimraf@^2.5.2, rimraf@^2.5.4: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -2880,11 +3164,21 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +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== + serialize-error@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" diff --git a/yarn.lock b/yarn.lock index 6965f590b..8e96fd54f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,11 +12,6 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.0.3.tgz#bc5b5532ecafd923a61f2fb097e3b108c0106a3f" integrity sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA== -"7zip@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" - integrity sha1-nK+xca+CMpSQNTtIFvAzR6oVCjA= - "@algolia/cache-browser-local-storage@4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.0.0.tgz#53085805373aeb6f3dfe06a1028c944343f087b5" @@ -3072,11 +3067,6 @@ cross-spawn@^7.0.1: shebang-command "^2.0.0" which "^2.0.1" -cross-unzip@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/cross-unzip/-/cross-unzip-0.0.2.tgz#5183bc47a09559befcf98cc4657964999359372f" - integrity sha1-UYO8R6CVWb78+YzEZXlkmZNZNy8= - crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -3493,16 +3483,6 @@ electron-builder@^21.2.0: update-notifier "^3.0.1" yargs "^13.3.0" -electron-devtools-installer@^2.2.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-2.2.4.tgz#261a50337e37121d338b966f07922eb4939a8763" - integrity sha512-b5kcM3hmUqn64+RUcHjjr8ZMpHS2WJ5YO0pnG9+P/RTdx46of/JrEjuciHWux6pE+On6ynWhHJF53j/EDJN0PA== - dependencies: - "7zip" "0.0.6" - cross-unzip "0.0.2" - rimraf "^2.5.2" - semver "^5.3.0" - electron-publish@21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-21.2.0.tgz#cc225cb46aa62e74b899f2f7299b396c9802387d" @@ -8068,7 +8048,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -8259,7 +8239,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==