From e75578440ea30ee1e276beae4971639f091b75f9 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 16:22:27 -0700 Subject: [PATCH 01/22] Improve demo webpack build --- demo/{main.js => client.js} | 0 demo/index.html | 2 +- demo/{app.js => server.js} | 8 ++------ demo/start.js | 37 +++++++++++++++++++++++++++++++++++++ demo/tsconfig.json | 8 ++++++++ 5 files changed, 48 insertions(+), 7 deletions(-) rename demo/{main.js => client.js} (100%) rename demo/{app.js => server.js} (91%) create mode 100644 demo/start.js create mode 100644 demo/tsconfig.json diff --git a/demo/main.js b/demo/client.js similarity index 100% rename from demo/main.js rename to demo/client.js diff --git a/demo/index.html b/demo/index.html index fff77d09..62ddfcee 100644 --- a/demo/index.html +++ b/demo/index.html @@ -33,6 +33,6 @@

Attention: The demo is a barebones implementation and is designed for the development and evaluation of xterm.js only. Exposing the demo to the public as is would introduce security risks for the host.

- + diff --git a/demo/app.js b/demo/server.js similarity index 91% rename from demo/app.js rename to demo/server.js index 7604e9cd..0aa9deef 100644 --- a/demo/app.js +++ b/demo/server.js @@ -17,12 +17,8 @@ app.get('/style.css', function(req, res){ res.sendFile(__dirname + '/style.css'); }); -app.get('/dist/bundle.js', function(req, res){ - res.sendFile(__dirname + '/dist/bundle.js'); -}); - -app.get('/dist/bundle.js.map', function(req, res){ - res.sendFile(__dirname + '/dist/bundle.js.map'); +app.get('/dist/client-bundle.js', function(req, res){ + res.sendFile(__dirname + '/dist/client-bundle.js'); }); app.post('/terminals', function (req, res) { diff --git a/demo/start.js b/demo/start.js new file mode 100644 index 00000000..018eb985 --- /dev/null +++ b/demo/start.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018 The xterm.js authors. All rights reserved. + * @license MIT + * + * This file is the entry point for browserify. + */ + +const cp = require('child_process'); +const path = require('path'); +const webpack = require('webpack'); + +// Launch server +cp.spawn('node', [path.resolve(__dirname, 'server.js')], { stdio: 'inherit' }); + +// Build/watch client source +const clientConfig = { + entry: path.resolve(__dirname, 'client.js'), + devtool: 'inline-source-map', + output: { + filename: 'client-bundle.js', + path: path.resolve(__dirname, 'dist') + }, + mode: 'development', + watch: true +}; +const compiler = webpack(clientConfig); + +compiler.watch({ + // Example watchOptions + aggregateTimeout: 300, + poll: undefined +}, (err, stats) => { + // Print watch/build result here... + console.log(stats.toString({ + colors: true + })); +}); diff --git a/demo/tsconfig.json b/demo/tsconfig.json new file mode 100644 index 00000000..8e72b6dd --- /dev/null +++ b/demo/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "rootDir": ".", + "sourceMap": true + }, +} From 4d14e000341c54b0debb7136d77c0143f19a73e7 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 16:22:51 -0700 Subject: [PATCH 02/22] Add webpack dependencies, update to webpack 4 --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index db566c68..6b97a9ad 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@types/jsdom": "11.0.1", "@types/mocha": "^2.2.33", "@types/node": "6.0.108", + "@types/webpack": "^4.4.11", "browserify": "^13.3.0", "chai": "3.5.0", "concurrently": "^3.5.1", @@ -36,12 +37,14 @@ "nyc": "^11.8.0", "sorcery": "^0.10.0", "source-map-loader": "^0.2.3", + "ts-loader": "^4.5.0", "tslint": "^5.9.1", "tslint-consistent-codestyle": "^1.13.0", "typescript": "2.8.3", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", - "webpack": "^3.10.0", + "webpack": "^4.17.1", + "webpack-cli": "^3.1.0", "webpack-stream": "^4.0.0", "zmodem.js": "^0.1.5" }, From b3e8980270a8f33ff7a260c15f4d16367f2564b6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 16:34:07 -0700 Subject: [PATCH 03/22] Convert demo client to TS --- demo/{client.js => client.ts} | 121 +++++++++++++++++----------------- demo/start.js | 14 +++- 2 files changed, 75 insertions(+), 60 deletions(-) rename demo/{client.js => client.ts} (67%) diff --git a/demo/client.js b/demo/client.ts similarity index 67% rename from demo/client.js rename to demo/client.ts index 70544e38..e8173513 100644 --- a/demo/client.js +++ b/demo/client.ts @@ -6,6 +6,12 @@ import * as search from '../build/addons/search/search'; import * as webLinks from '../build/addons/webLinks/webLinks'; import * as winptyCompat from '../build/addons/winptyCompat/winptyCompat'; +export interface IWindowWithTerminal extends Window { + // TODO: Type me + term: any; +} +declare let window: IWindowWithTerminal; + Terminal.applyAddon(attach); Terminal.applyAddon(fit); @@ -15,20 +21,20 @@ Terminal.applyAddon(webLinks); Terminal.applyAddon(winptyCompat); -var term, - protocol, - socketURL, - socket, - pid; +let term; +let protocol; +let socketURL; +let socket; +let pid; -var terminalContainer = document.getElementById('terminal-container'), - actionElements = { - findNext: document.querySelector('#find-next'), - findPrevious: document.querySelector('#find-previous') - }, - paddingElement = document.getElementById('padding'); +const terminalContainer = document.getElementById('terminal-container'); +const actionElements = { + findNext: document.querySelector('#find-next'), + findPrevious: document.querySelector('#find-previous') +}; +const paddingElement = document.getElementById('padding'); -function setPadding() { +function setPadding(): void { term.element.style.padding = parseInt(paddingElement.value, 10).toString() + 'px'; term.fit(); } @@ -52,20 +58,20 @@ const disposeRecreateButtonHandler = () => { document.getElementById('dispose').addEventListener('click', disposeRecreateButtonHandler); -function createTerminal() { +function createTerminal(): void { // Clean terminal while (terminalContainer.children.length) { terminalContainer.removeChild(terminalContainer.children[0]); } term = new Terminal({}); window.term = term; // Expose `term` to window for debugging purposes - term.on('resize', function (size) { + term.on('resize', (size: { cols: number, rows: number }) => { if (!pid) { return; } - var cols = size.cols, - rows = size.rows, - url = '/terminals/' + pid + '/size?cols=' + cols + '&rows=' + rows; + const cols = size.cols; + const rows = size.rows; + const url = '/terminals/' + pid + '/size?cols=' + cols + '&rows=' + rows; fetch(url, {method: 'POST'}); }); @@ -80,32 +86,32 @@ function createTerminal() { addDomListener(paddingElement, 'change', setPadding); - addDomListener(actionElements.findNext, 'keypress', function (e) { - if (e.key === "Enter") { + addDomListener(actionElements.findNext, 'keypress', (e) => { + if (e.key === 'Enter') { e.preventDefault(); term.findNext(actionElements.findNext.value); } }); - addDomListener(actionElements.findPrevious, 'keypress', function (e) { - if (e.key === "Enter") { + addDomListener(actionElements.findPrevious, 'keypress', (e) => { + if (e.key === 'Enter') { e.preventDefault(); term.findPrevious(actionElements.findPrevious.value); } }); // fit is called within a setTimeout, cols and rows need this. - setTimeout(function () { + setTimeout(() => { initOptions(term); - document.getElementById(`opt-cols`).value = term.cols; - document.getElementById(`opt-rows`).value = term.rows; - paddingElement.value = 0; + // TODO: Clean this up, opt-cols/rows doesn't exist anymore + (document.getElementById(`opt-cols`)).value = term.cols; + (document.getElementById(`opt-rows`)).value = term.rows; + paddingElement.value = '0'; // Set terminal size again to set the specific dimensions on the demo updateTerminalSize(); - fetch('/terminals?cols=' + term.cols + '&rows=' + term.rows, {method: 'POST'}).then(function (res) { - - res.text().then(function (processId) { + fetch('/terminals?cols=' + term.cols + '&rows=' + term.rows, {method: 'POST'}).then((res) => { + res.text().then((processId) => { pid = processId; socketURL += processId; socket = new WebSocket(socketURL); @@ -117,22 +123,21 @@ function createTerminal() { }, 0); } -function runRealTerminal() { +function runRealTerminal(): void { term.attach(socket); term._initialized = true; } -function runFakeTerminal() { +// TODO: Maybe fake terminal should be removed? Not sure it's useful anymore +function runFakeTerminal(): void { if (term._initialized) { return; } term._initialized = true; - var shellprompt = '$ '; - - term.prompt = function () { - term.write('\r\n' + shellprompt); + term.prompt = () => { + term.write('\r\n$ '); }; term.writeln('Welcome to xterm.js'); @@ -141,14 +146,12 @@ function runFakeTerminal() { term.writeln(''); term.prompt(); - term._core.register(term.addDisposableListener('key', function (key, ev) { - var printable = ( - !ev.altKey && !ev.altGraphKey && !ev.ctrlKey && !ev.metaKey - ); + term._core.register(term.addDisposableListener('key', (key, ev) => { + const printable = !ev.altKey && !ev.altGraphKey && !ev.ctrlKey && !ev.metaKey; - if (ev.keyCode == 13) { + if (ev.keyCode === 13) { term.prompt(); - } else if (ev.keyCode == 8) { + } else if (ev.keyCode === 8) { // Do not delete the prompt if (term.x > 2) { term.write('\b \b'); @@ -158,13 +161,13 @@ function runFakeTerminal() { } })); - term._core.register(term.addDisposableListener('paste', function (data, ev) { + term._core.register(term.addDisposableListener('paste', (data, ev) => { term.write(data); })); } -function initOptions(term) { - var blacklistedOptions = [ +function initOptions(term: any): void { + const blacklistedOptions = [ // Internal only options 'cancelEvents', 'convertEol', @@ -176,7 +179,7 @@ function initOptions(term) { // Complex option 'theme' ]; - var stringOptions = { + const stringOptions = { bellSound: null, bellStyle: ['none', 'sound'], cursorStyle: ['block', 'underline', 'bar'], @@ -186,9 +189,9 @@ function initOptions(term) { fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], rendererType: ['dom', 'canvas'] }; - var options = Object.keys(term._core.options); - var booleanOptions = []; - var numberOptions = []; + const options = Object.keys(term._core.options); + const booleanOptions = []; + const numberOptions = []; options.filter(o => blacklistedOptions.indexOf(o) === -1).forEach(o => { switch (typeof term.getOption(o)) { case 'boolean': @@ -204,7 +207,7 @@ function initOptions(term) { } }); - var html = ''; + let html = ''; html += '
'; booleanOptions.forEach(o => { html += `
`; @@ -218,24 +221,24 @@ function initOptions(term) { if (stringOptions[o]) { html += `
`; } else { - html += `
` + html += `
`; } }); html += '
'; - var container = document.getElementById('options-container'); + const container = document.getElementById('options-container'); container.innerHTML = html; // Attach listeners booleanOptions.forEach(o => { - var input = document.getElementById(`opt-${o}`); + const input = document.getElementById(`opt-${o}`); addDomListener(input, 'change', () => { console.log('change', o, input.checked); term.setOption(o, input.checked); }); }); numberOptions.forEach(o => { - var input = document.getElementById(`opt-${o}`); + const input = document.getElementById(`opt-${o}`); addDomListener(input, 'change', () => { console.log('change', o, input.value); if (o === 'cols' || o === 'rows') { @@ -246,7 +249,7 @@ function initOptions(term) { }); }); Object.keys(stringOptions).forEach(o => { - var input = document.getElementById(`opt-${o}`); + const input = document.getElementById(`opt-${o}`); addDomListener(input, 'change', () => { console.log('change', o, input.value); term.setOption(o, input.value); @@ -254,16 +257,16 @@ function initOptions(term) { }); } -function addDomListener(element, type, handler) { +function addDomListener(element: HTMLElement, type: string, handler: (...args: any[]) => any): void { element.addEventListener(type, handler); term._core.register({ dispose: () => element.removeEventListener(type, handler) }); } -function updateTerminalSize() { - var cols = parseInt(document.getElementById(`opt-cols`).value, 10); - var rows = parseInt(document.getElementById(`opt-rows`).value, 10); - var width = (cols * term._core.renderer.dimensions.actualCellWidth + term._core.viewport.scrollBarWidth).toString() + 'px'; - var height = (rows * term._core.renderer.dimensions.actualCellHeight).toString() + 'px'; +function updateTerminalSize(): void { + const cols = parseInt((document.getElementById(`opt-cols`)).value, 10); + const rows = parseInt((document.getElementById(`opt-rows`)).value, 10); + const width = (cols * term._core.renderer.dimensions.actualCellWidth + term._core.viewport.scrollBarWidth).toString() + 'px'; + const height = (rows * term._core.renderer.dimensions.actualCellHeight).toString() + 'px'; terminalContainer.style.width = width; terminalContainer.style.height = height; term.fit(); diff --git a/demo/start.js b/demo/start.js index 018eb985..ad9e9f2f 100644 --- a/demo/start.js +++ b/demo/start.js @@ -14,8 +14,20 @@ cp.spawn('node', [path.resolve(__dirname, 'server.js')], { stdio: 'inherit' }); // Build/watch client source const clientConfig = { - entry: path.resolve(__dirname, 'client.js'), + entry: path.resolve(__dirname, 'client.ts'), devtool: 'inline-source-map', + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + } + ] + }, + resolve: { + extensions: [ '.tsx', '.ts', '.js' ] + }, output: { filename: 'client-bundle.js', path: path.resolve(__dirname, 'dist') From d58f5cac01eb844a2eb77131bf46e9c759ab8e83 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 16:48:28 -0700 Subject: [PATCH 04/22] Type Terminal --- demo/client.ts | 22 +++++++++++++++++----- demo/tsconfig.json | 4 ++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/demo/client.ts b/demo/client.ts index e8173513..7911b5ab 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -1,4 +1,13 @@ -import * as Terminal from '../build/xterm'; +/** + * Copyright (c) 2018 The xterm.js authors. All rights reserved. + * @license MIT + * + * This file is the entry point for browserify. + */ + +/// + +import { Terminal } from '../lib/public/Terminal'; import * as attach from '../build/addons/attach/attach'; import * as fit from '../build/addons/fit/fit'; import * as fullscreen from '../build/addons/fullscreen/fullscreen'; @@ -6,13 +15,16 @@ import * as search from '../build/addons/search/search'; import * as webLinks from '../build/addons/webLinks/webLinks'; import * as winptyCompat from '../build/addons/winptyCompat/winptyCompat'; +// Pulling in the module's types relies on the above, it's looks a +// little weird here as we're importing "this" module +import { Terminal as TerminalType } from 'xterm'; + export interface IWindowWithTerminal extends Window { // TODO: Type me - term: any; + term: TerminalType; } declare let window: IWindowWithTerminal; - Terminal.applyAddon(attach); Terminal.applyAddon(fit); Terminal.applyAddon(fullscreen); @@ -166,7 +178,7 @@ function runFakeTerminal(): void { })); } -function initOptions(term: any): void { +function initOptions(term: TerminalType): void { const blacklistedOptions = [ // Internal only options 'cancelEvents', @@ -189,7 +201,7 @@ function initOptions(term: any): void { fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], rendererType: ['dom', 'canvas'] }; - const options = Object.keys(term._core.options); + const options = Object.keys((term)._core.options); const booleanOptions = []; const numberOptions = []; options.filter(o => blacklistedOptions.indexOf(o) === -1).forEach(o => { diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 8e72b6dd..2edfe2f7 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -5,4 +5,8 @@ "rootDir": ".", "sourceMap": true }, + "include": [ + "client.ts", + "../typings/xterm.d.ts" + ] } From 54187b35972fc4eacce625d1ed6b27980e4fcd0a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 17:03:02 -0700 Subject: [PATCH 05/22] Fix build by adding es6 lib Targets are still es5, es6 is needed for @types/webpack to parse --- src/addons/attach/tsconfig.json | 4 ++++ src/addons/fit/tsconfig.json | 4 ++++ src/addons/fullscreen/tsconfig.json | 4 ++++ src/addons/search/tsconfig.json | 4 ++++ src/addons/terminado/tsconfig.json | 4 ++++ src/addons/webLinks/tsconfig.json | 4 ++++ src/addons/winptyCompat/tsconfig.json | 4 ++++ src/addons/zmodem/tsconfig.json | 4 ++++ tsconfig.json | 1 + 9 files changed, 33 insertions(+) diff --git a/src/addons/attach/tsconfig.json b/src/addons/attach/tsconfig.json index 12e75810..359fbd24 100644 --- a/src/addons/attach/tsconfig.json +++ b/src/addons/attach/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/attach/", "sourceMap": true, diff --git a/src/addons/fit/tsconfig.json b/src/addons/fit/tsconfig.json index f806af18..bccb2ef1 100644 --- a/src/addons/fit/tsconfig.json +++ b/src/addons/fit/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/fit/", "sourceMap": true, diff --git a/src/addons/fullscreen/tsconfig.json b/src/addons/fullscreen/tsconfig.json index 2fbb295f..cdebd36d 100644 --- a/src/addons/fullscreen/tsconfig.json +++ b/src/addons/fullscreen/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/fullscreen/", "sourceMap": true, diff --git a/src/addons/search/tsconfig.json b/src/addons/search/tsconfig.json index 47876a00..5e9fa502 100644 --- a/src/addons/search/tsconfig.json +++ b/src/addons/search/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/search/", "sourceMap": true, diff --git a/src/addons/terminado/tsconfig.json b/src/addons/terminado/tsconfig.json index b664a5e0..66e90d90 100644 --- a/src/addons/terminado/tsconfig.json +++ b/src/addons/terminado/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/terminado/", "sourceMap": true, diff --git a/src/addons/webLinks/tsconfig.json b/src/addons/webLinks/tsconfig.json index 7dd999f6..a1cc8968 100644 --- a/src/addons/webLinks/tsconfig.json +++ b/src/addons/webLinks/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/webLinks/", "sourceMap": true, diff --git a/src/addons/winptyCompat/tsconfig.json b/src/addons/winptyCompat/tsconfig.json index ecad2563..8a4fe2dc 100644 --- a/src/addons/winptyCompat/tsconfig.json +++ b/src/addons/winptyCompat/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/winptyCompat/", "sourceMap": true, diff --git a/src/addons/zmodem/tsconfig.json b/src/addons/zmodem/tsconfig.json index d4577108..e2fdfeb0 100644 --- a/src/addons/zmodem/tsconfig.json +++ b/src/addons/zmodem/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "dom", + "es6", + ], "rootDir": ".", "outDir": "../../../lib/addons/zmodem/", "sourceMap": true, diff --git a/tsconfig.json b/tsconfig.json index d7085822..2d1d6e35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "lib": [ "dom", "es5", + "es6", "scripthost", "es2015.promise" ], From ca76ebc396953755624dbd2e7e171d5e063f4419 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 17:34:52 -0700 Subject: [PATCH 06/22] Remove todo --- demo/client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/demo/client.ts b/demo/client.ts index 7911b5ab..d86b960b 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -20,7 +20,6 @@ import * as winptyCompat from '../build/addons/winptyCompat/winptyCompat'; import { Terminal as TerminalType } from 'xterm'; export interface IWindowWithTerminal extends Window { - // TODO: Type me term: TerminalType; } declare let window: IWindowWithTerminal; From 71aa7027bd5e293a456b1649819b33aef11a865d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 19:48:06 -0700 Subject: [PATCH 07/22] Use new script for yarn start --- package.json | 2 +- yarn.lock | 737 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 707 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 6b97a9ad..408a88f8 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "zmodem.js": "^0.1.5" }, "scripts": { - "start": "concurrently --kill-others-on-fail --names \"demo,server\" \"gulp watch-demo\" \"node demo/app\"", + "start": "node demo/start", "start-zmodem": "node demo/zmodem/app", "lint": "tslint 'src/**/*.ts'", "test": "npm-run-all mocha lint", diff --git a/yarn.lock b/yarn.lock index ec58250a..6f5b1f6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -59,10 +59,165 @@ version "6.0.108" resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.108.tgz#852e8496bcfc5e74cae83a5eb3b30e5661e9b7b9" +"@types/tapable@*": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370" + "@types/tough-cookie@*": version "2.3.3" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.3.tgz#7f226d67d654ec9070e755f46daebf014628e9d9" +"@types/uglify-js@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.3.tgz#801a5ca1dc642861f47c46d14b700ed2d610840b" + dependencies: + source-map "^0.6.1" + +"@types/webpack@^4.4.11": + version "4.4.11" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.11.tgz#0ca832870d55c4e92498c01d22d00d02b0f62ae9" + dependencies: + "@types/node" "*" + "@types/tapable" "*" + "@types/uglify-js" "*" + source-map "^0.6.0" + +"@webassemblyjs/ast@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25" + dependencies: + "@webassemblyjs/helper-module-context" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/wast-parser" "1.5.13" + debug "^3.1.0" + mamacro "^0.0.3" + +"@webassemblyjs/floating-point-hex-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz#29ce0baa97411f70e8cce68ce9c0f9d819a4e298" + +"@webassemblyjs/helper-api-error@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz#e49b051d67ee19a56e29b9aa8bd949b5b4442a59" + +"@webassemblyjs/helper-buffer@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz#873bb0a1b46449231137c1262ddfd05695195a1e" + dependencies: + debug "^3.1.0" + +"@webassemblyjs/helper-code-frame@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz#1bd2181b6a0be14e004f0fe9f5a660d265362b58" + dependencies: + "@webassemblyjs/wast-printer" "1.5.13" + +"@webassemblyjs/helper-fsm@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz#cdf3d9d33005d543a5c5e5adaabf679ffa8db924" + +"@webassemblyjs/helper-module-context@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz#dc29ddfb51ed657655286f94a5d72d8a489147c5" + dependencies: + debug "^3.1.0" + mamacro "^0.0.3" + +"@webassemblyjs/helper-wasm-bytecode@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz#03245817f0a762382e61733146f5773def15a747" + +"@webassemblyjs/helper-wasm-section@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz#efc76f44a10d3073b584b43c38a179df173d5c7d" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" + debug "^3.1.0" + +"@webassemblyjs/ieee754@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz#573e97c8c12e4eebb316ca5fde0203ddd90b0364" + dependencies: + ieee754 "^1.1.11" + +"@webassemblyjs/leb128@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.13.tgz#ab52ebab9cec283c1c1897ac1da833a04a3f4cee" + dependencies: + long "4.0.0" + +"@webassemblyjs/utf8@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.13.tgz#6b53d2cd861cf94fa99c1f12779dde692fbc2469" + +"@webassemblyjs/wasm-edit@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz#c9cef5664c245cf11b3b3a73110c9155831724a8" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/helper-wasm-section" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" + "@webassemblyjs/wasm-opt" "1.5.13" + "@webassemblyjs/wasm-parser" "1.5.13" + "@webassemblyjs/wast-printer" "1.5.13" + debug "^3.1.0" + +"@webassemblyjs/wasm-gen@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz#8e6ea113c4b432fa66540189e79b16d7a140700e" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/ieee754" "1.5.13" + "@webassemblyjs/leb128" "1.5.13" + "@webassemblyjs/utf8" "1.5.13" + +"@webassemblyjs/wasm-opt@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz#147aad7717a7ee4211c36b21a5f4c30dddf33138" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" + "@webassemblyjs/wasm-parser" "1.5.13" + debug "^3.1.0" + +"@webassemblyjs/wasm-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz#6f46516c5bb23904fbdf58009233c2dd8a54c72f" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-api-error" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/ieee754" "1.5.13" + "@webassemblyjs/leb128" "1.5.13" + "@webassemblyjs/utf8" "1.5.13" + +"@webassemblyjs/wast-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz#5727a705d397ae6a3ae99d7f5460acf2ec646eea" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/floating-point-hex-parser" "1.5.13" + "@webassemblyjs/helper-api-error" "1.5.13" + "@webassemblyjs/helper-code-frame" "1.5.13" + "@webassemblyjs/helper-fsm" "1.5.13" + long "^3.2.0" + mamacro "^0.0.3" + +"@webassemblyjs/wast-printer@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz#bb34d528c14b4f579e7ec11e793ec50ad7cd7c95" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/wast-parser" "1.5.13" + long "^3.2.0" + JSONStream@^1.0.3: version "1.3.3" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf" @@ -129,6 +284,10 @@ acorn@^5.0.0, acorn@^5.2.1, acorn@^5.3.0, acorn@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +acorn@^5.6.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.2.tgz#91fa871883485d06708800318404e72bfb26dcc5" + ajv-keywords@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" @@ -169,6 +328,10 @@ ansi-colors@^1.0.1: dependencies: ansi-wrap "^0.1.0" +ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + ansi-gray@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" @@ -217,7 +380,7 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" -aproba@^1.0.3: +aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -484,6 +647,10 @@ bl@^1.2.1: readable-stream "^2.3.5" safe-buffer "^5.1.1" +bluebird@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + bluebird@~3.4.6: version "3.4.7" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" @@ -696,6 +863,24 @@ builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" +cacache@^10.0.4: + version "10.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^2.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^5.2.4" + unique-filename "^1.1.0" + y18n "^4.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -769,7 +954,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -777,6 +962,10 @@ chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + chokidar@^1.4.3: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -815,6 +1004,12 @@ chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" +chrome-trace-event@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48" + dependencies: + tslib "^1.9.0" + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -831,6 +1026,16 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -945,6 +1150,10 @@ commander@^2.12.1: version "2.16.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -957,7 +1166,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.6.1: +concat-stream@^1.5.0, concat-stream@^1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" dependencies: @@ -1045,6 +1254,17 @@ cookie@0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.1.5.tgz#6ab9948a4b1ae21952cd2588530a4722d4044d7c" +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -1125,7 +1345,7 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.4: +cross-spawn@^6.0.4, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -1170,6 +1390,10 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -1242,6 +1466,12 @@ decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +decamelize@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" + dependencies: + xregexp "4.0.0" + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -1409,7 +1639,7 @@ duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" -duplexify@^3.2.0: +duplexify@^3.2.0, duplexify@^3.4.2, duplexify@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" dependencies: @@ -1451,7 +1681,7 @@ emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" -end-of-stream@^1.0.0: +end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" dependencies: @@ -1472,7 +1702,15 @@ enhanced-resolve@^3.4.0: object-assign "^4.0.1" tapable "^0.2.7" -errno@^0.1.3: +enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" dependencies: @@ -1587,6 +1825,13 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + espree@~3.1.7: version "3.1.7" resolved "https://registry.yarnpkg.com/espree/-/espree-3.1.7.tgz#fd5deec76a97a5120a9cd3a7cb1177a0923b11d2" @@ -1749,6 +1994,14 @@ extend@^3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" +external-editor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -1800,6 +2053,12 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -1840,6 +2099,14 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + find-index@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" @@ -1857,6 +2124,12 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + dependencies: + locate-path "^3.0.0" + findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -1890,6 +2163,13 @@ flagged-respawn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7" +flush-write-stream@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.4" + for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -1943,6 +2223,13 @@ fresh@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" @@ -1961,6 +2248,15 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2114,6 +2410,17 @@ glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + 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" + glob@~3.1.21: version "3.1.21" resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" @@ -2122,6 +2429,10 @@ glob@~3.1.21: inherits "1" minimatch "~0.2.11" +global-modules-path@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.3.0.tgz#b0e2bac6beac39745f7db5c59d26a36a0b94f7dc" + global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -2481,16 +2792,26 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + dependencies: + safer-buffer ">= 2.1.2 < 3" + iconv-lite@^0.4.4: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.4: +ieee754@^1.1.11, ieee754@^1.1.4: version "1.1.12" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + ignore-by-default@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -2501,6 +2822,13 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -2542,6 +2870,24 @@ inline-source-map@~0.6.0: dependencies: source-map "~0.5.3" +inquirer@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.0" + figures "^2.0.0" + lodash "^4.17.10" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.1.0" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + insert-module-globals@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.2.0.tgz#ec87e5b42728479e327bd5c5c71611ddfb4752ba" @@ -2557,7 +2903,7 @@ insert-module-globals@^7.0.0: undeclared-identifiers "^1.1.2" xtend "^4.0.0" -interpret@^1.0.0: +interpret@^1.0.0, interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" @@ -2754,6 +3100,10 @@ is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" @@ -2956,7 +3306,7 @@ json-loader@^0.5.4: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" -json-parse-better-errors@^1.0.1: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -3139,7 +3489,7 @@ loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" -loader-utils@^1.1.0: +loader-utils@^1.0.2, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" dependencies: @@ -3163,6 +3513,13 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + lodash._baseassign@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" @@ -3336,6 +3693,14 @@ log-driver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" +long@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + +long@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -3354,19 +3719,29 @@ lru-cache@2: version "2.7.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + dependencies: + pify "^3.0.0" + make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" dependencies: kind-of "^6.0.2" +mamacro@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" + map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -3569,6 +3944,21 @@ minizlib@^1.1.0: dependencies: minipass "^2.2.1" +mississippi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^2.0.1" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -3619,6 +4009,17 @@ module-deps@^4.0.8: through2 "^2.0.0" xtend "^4.0.0" +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -3637,6 +4038,10 @@ mute-stdout@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.0.tgz#5b32ea07eb43c9ded6130434cf926f46b2a7fd4d" +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + nan@2.10.0, nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" @@ -3932,7 +4337,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@^1.3.0, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -3944,6 +4349,12 @@ once@~1.3.0: dependencies: wrappy "1" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -4011,7 +4422,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.0: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4032,16 +4443,32 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + dependencies: + p-limit "^2.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" +p-try@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + package-json@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/package-json/-/package-json-1.2.0.tgz#c8ecac094227cdf76a316874ed05e27cc939a0e0" @@ -4057,6 +4484,14 @@ pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + parents@^1.0.0, parents@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" @@ -4241,6 +4676,12 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + plugin-error@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" @@ -4296,6 +4737,10 @@ process@^0.11.10, process@~0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + proxy-addr@~1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.0.10.tgz#0d40a82f801fc355567d2ecb65efe3f077f121c5" @@ -4331,6 +4776,21 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" +pump@^2.0.0, pump@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -4444,16 +4904,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -4465,6 +4916,15 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@~1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -4624,6 +5084,12 @@ requizzle@~0.2.1: dependencies: underscore "~1.6.0" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" @@ -4635,6 +5101,10 @@ resolve-from@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -4649,6 +5119,13 @@ resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: dependencies: path-parse "^1.0.5" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -4659,7 +5136,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.5.2, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -4676,10 +5153,28 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + dependencies: + aproba "^1.1.1" + rx@2.3.24: version "2.3.24" resolved "https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7" +rxjs@^6.1.0: + version "6.3.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.1.tgz#878a1a8c64b8a5da11dcf74b5033fe944cdafb84" + dependencies: + tslib "^1.9.0" + safe-buffer@^5.0.1, 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" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -4707,6 +5202,13 @@ sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +schema-utils@^0.4.4, schema-utils@^0.4.5: + version "0.4.7" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" @@ -4727,6 +5229,10 @@ semver@^4.1.0: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" +semver@^5.0.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + send@0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/send/-/send-0.13.1.tgz#a30d5f4c82c8a9bae9ad00a1d9b1bdbe6f199ed7" @@ -4765,6 +5271,10 @@ sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" +serialize-javascript@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" + serve-static@~1.10.2: version "1.10.3" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.10.3.tgz#ce5a6ecd3101fed5ec09827dac22a9c29bfb0535" @@ -4934,7 +5444,7 @@ source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, sour version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -5014,6 +5524,12 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +ssri@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + dependencies: + safe-buffer "^5.1.1" + stack-trace@0.0.9: version "0.0.9" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" @@ -5061,6 +5577,13 @@ stream-consume@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.1.tgz#d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48" +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + stream-http@^2.0.0, stream-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" @@ -5096,7 +5619,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -5199,6 +5722,12 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^5.4.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + sver-compat@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" @@ -5224,6 +5753,10 @@ tapable@^0.2.7: version "0.2.8" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" +tapable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" + tar@^4: version "4.4.4" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" @@ -5274,7 +5807,7 @@ through2@^0.6.0, through2@^0.6.1: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -5304,6 +5837,12 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + to-absolute-glob@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" @@ -5373,7 +5912,17 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1: +ts-loader@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-4.5.0.tgz#a1ce70b2dc799941fb2197605f0d67874097859b" + dependencies: + chalk "^2.3.0" + enhanced-resolve "^4.0.0" + loader-utils "^1.0.2" + micromatch "^3.1.4" + semver "^5.0.1" + +tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -5455,6 +6004,13 @@ typescript@2.8.3: version "2.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170" +uglify-es@^3.3.4: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" @@ -5476,6 +6032,19 @@ uglifyjs-webpack-plugin@^0.4.6: uglify-js "^2.8.29" webpack-sources "^1.0.1" +uglifyjs-webpack-plugin@^1.2.4: + version "1.3.0" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz#75f548160858163a08643e086d5fefe18a5d67de" + dependencies: + cacache "^10.0.4" + find-cache-dir "^1.0.0" + schema-utils "^0.4.5" + serialize-javascript "^1.4.0" + source-map "^0.6.1" + uglify-es "^3.3.4" + webpack-sources "^1.1.0" + worker-farm "^1.5.2" + ultron@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" @@ -5524,6 +6093,18 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + unique-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" @@ -5617,6 +6198,10 @@ uuid@^3.1.0: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" +v8-compile-cache@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c" + v8flags@^2.0.2, v8flags@^2.0.9: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" @@ -5741,7 +6326,7 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" -watchpack@^1.4.0: +watchpack@^1.4.0, watchpack@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" dependencies: @@ -5753,6 +6338,22 @@ webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" +webpack-cli@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.1.0.tgz#d71a83687dcfeb758fdceeb0fe042f96bcf62994" + dependencies: + chalk "^2.4.1" + cross-spawn "^6.0.5" + enhanced-resolve "^4.0.0" + global-modules-path "^2.1.0" + import-local "^1.0.0" + inquirer "^6.0.0" + interpret "^1.1.0" + loader-utils "^1.1.0" + supports-color "^5.4.0" + v8-compile-cache "^2.0.0" + yargs "^12.0.1" + webpack-sources@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" @@ -5760,6 +6361,13 @@ webpack-sources@^1.0.1: source-list-map "^2.0.0" source-map "~0.6.1" +webpack-sources@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.2.0.tgz#18181e0d013fce096faf6f8e6d41eeffffdceac2" + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + webpack-stream@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-4.0.3.tgz#96399fd7911b94c264bfc59e356738a89b5ca136" @@ -5774,7 +6382,7 @@ webpack-stream@^4.0.0: vinyl "^2.1.0" webpack "^3.4.1" -webpack@^3.10.0, webpack@^3.4.1: +webpack@^3.4.1: version "3.12.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.12.0.tgz#3f9e34360370602fcf639e97939db486f4ec0d74" dependencies: @@ -5801,6 +6409,36 @@ webpack@^3.10.0, webpack@^3.4.1: webpack-sources "^1.0.1" yargs "^8.0.2" +webpack@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.17.1.tgz#0f026e3d823f3fc604f811ed3ea8f0d9b267fb1e" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-module-context" "1.5.13" + "@webassemblyjs/wasm-edit" "1.5.13" + "@webassemblyjs/wasm-opt" "1.5.13" + "@webassemblyjs/wasm-parser" "1.5.13" + acorn "^5.6.2" + acorn-dynamic-import "^3.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^1.0.0" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" + json-parse-better-errors "^1.0.2" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^0.4.4" + tapable "^1.0.0" + uglifyjs-webpack-plugin "^1.2.4" + watchpack "^1.5.0" + webpack-sources "^1.0.1" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" @@ -5855,6 +6493,12 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +worker-farm@^1.5.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" + dependencies: + errno "~0.1.7" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -5905,6 +6549,10 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" +xregexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" + "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -5913,6 +6561,10 @@ y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -5921,6 +6573,12 @@ yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" +yargs-parser@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + dependencies: + camelcase "^4.1.0" + yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" @@ -5956,6 +6614,23 @@ yargs@11.1.0: y18n "^3.2.1" yargs-parser "^9.0.2" +yargs@^12.0.1: + version "12.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2" + dependencies: + cliui "^4.0.0" + decamelize "^2.0.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^10.1.0" + yargs@^3.28.0: version "3.32.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" From 784a142dac4823be88cb83eca550f4f5eb249780 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 19:50:45 -0700 Subject: [PATCH 08/22] Remove old gulp tasks --- gulpfile.js | 12 --- package.json | 1 - yarn.lock | 235 ++++----------------------------------------------- 3 files changed, 15 insertions(+), 233 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 7026ec43..9af8d6e4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -14,7 +14,6 @@ const source = require('vinyl-source-stream'); const sourcemaps = require('gulp-sourcemaps'); const ts = require('gulp-typescript'); const util = require('gulp-util'); -const webpack = require('webpack-stream'); const buildDir = process.env.BUILD_DIR || 'build'; const tsProject = ts.createProject('tsconfig.json'); @@ -137,17 +136,6 @@ gulp.task('sorcery-addons', ['browserify-addons'], function () { }) }); -gulp.task('webpack', ['build'], function() { - return gulp.src('demo/main.js') - .pipe(webpack(require('./webpack.config.js'))) - .pipe(gulp.dest('demo/dist/')); -}); - - -gulp.task('watch-demo', ['webpack'], () => { - gulp.watch(['./demo/*', './lib/**/*'], ['webpack']); -}); - gulp.task('build', ['sorcery', 'sorcery-addons']); gulp.task('test', ['mocha']); gulp.task('default', ['build']); diff --git a/package.json b/package.json index 408a88f8..a8203268 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "vinyl-source-stream": "^1.1.0", "webpack": "^4.17.1", "webpack-cli": "^3.1.0", - "webpack-stream": "^4.0.0", "zmodem.js": "^0.1.5" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 6f5b1f6b..7e28a3c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -240,12 +240,6 @@ accepts@~1.2.12: mime-types "~2.1.6" negotiator "0.5.3" -acorn-dynamic-import@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - dependencies: - acorn "^4.0.3" - acorn-dynamic-import@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" @@ -272,7 +266,7 @@ acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2: acorn-dynamic-import "^3.0.0" xtend "^4.0.1" -acorn@4.X, acorn@^4.0.3: +acorn@4.X: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" @@ -322,12 +316,6 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - dependencies: - ansi-wrap "^0.1.0" - ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" @@ -356,7 +344,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: +ansi-wrap@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -509,7 +497,7 @@ async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2, async@^2.5.0: +async@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" dependencies: @@ -1044,7 +1032,7 @@ cliui@^2.1.0: right-align "^0.1.1" wordwrap "0.0.2" -cliui@^3.0.3, cliui@^3.2.0: +cliui@^3.0.3: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" dependencies: @@ -1693,15 +1681,6 @@ end-of-stream@~0.1.5: dependencies: once "~1.3.0" -enhanced-resolve@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.7" - enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" @@ -1740,7 +1719,7 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: +es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.45" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.45.tgz#0bfdf7b473da5919d5adf3bd25ceb754fccc3653" dependencies: @@ -1748,7 +1727,7 @@ es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: es6-symbol "~3.1.1" next-tick "1" -es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: +es6-iterator@^2.0.1, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" dependencies: @@ -1756,47 +1735,17 @@ es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - es6-promise@^3.0.2, es6-promise@^3.1.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: +es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: d "1" es5-ext "~0.10.14" -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -1816,15 +1765,6 @@ escodegen@^1.9.0: optionalDependencies: source-map "~0.6.1" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -1865,13 +1805,6 @@ etag@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.7.0.tgz#03d30b5f67dd6e632d2945d30d6652731a34d5d8" -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - event-stream@~3.3.0: version "3.3.4" resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" @@ -2029,7 +1962,7 @@ extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" -fancy-log@^1.1.0, fancy-log@^1.3.2: +fancy-log@^1.1.0: version "1.3.2" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" dependencies: @@ -2118,7 +2051,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -2664,10 +2597,6 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -3302,10 +3231,6 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" -json-loader@^0.5.4: - version "0.5.7" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" - json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -3342,7 +3267,7 @@ json3@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -3467,15 +3392,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -3587,10 +3503,6 @@ lodash.assign@^3.0.0: lodash._createassigner "^3.0.0" lodash.keys "^3.0.0" -lodash.clone@^4.3.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - lodash.create@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" @@ -3652,10 +3564,6 @@ lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" -lodash.some@^4.2.2: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - lodash.sortby@^4.5.0, lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -3800,7 +3708,7 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: +memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" dependencies: @@ -4620,12 +4528,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -4682,15 +4584,6 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -plugin-error@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" - dependencies: - ansi-colors "^1.0.1" - arr-diff "^4.0.0" - arr-union "^3.1.0" - extend-shallow "^3.0.2" - plur@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" @@ -4873,13 +4766,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -4888,14 +4774,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -5710,12 +5588,6 @@ supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" @@ -5749,10 +5621,6 @@ taffydb@2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" -tapable@^0.2.7: - version "0.2.8" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" - tapable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" @@ -5807,7 +5675,7 @@ through2@^0.6.0, through2@^0.6.1: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -6011,7 +5879,7 @@ uglify-es@^3.3.4: commander "~2.13.0" source-map "~0.6.1" -uglify-js@^2.6, uglify-js@^2.8.29: +uglify-js@^2.6: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: @@ -6024,14 +5892,6 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" -uglifyjs-webpack-plugin@^0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" - dependencies: - source-map "^0.5.6" - uglify-js "^2.8.29" - webpack-sources "^1.0.1" - uglifyjs-webpack-plugin@^1.2.4: version "1.3.0" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz#75f548160858163a08643e086d5fefe18a5d67de" @@ -6303,7 +6163,7 @@ vinyl@^0.5.0: clone-stats "^0.0.1" replace-ext "0.0.1" -vinyl@^2.0.0, vinyl@^2.1.0: +vinyl@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" dependencies: @@ -6326,7 +6186,7 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" -watchpack@^1.4.0, watchpack@^1.5.0: +watchpack@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" dependencies: @@ -6368,47 +6228,6 @@ webpack-sources@^1.1.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-stream@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-4.0.3.tgz#96399fd7911b94c264bfc59e356738a89b5ca136" - dependencies: - fancy-log "^1.3.2" - lodash.clone "^4.3.2" - lodash.some "^4.2.2" - memory-fs "^0.4.1" - plugin-error "^1.0.1" - supports-color "^5.3.0" - through "^2.3.8" - vinyl "^2.1.0" - webpack "^3.4.1" - -webpack@^3.4.1: - version "3.12.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.12.0.tgz#3f9e34360370602fcf639e97939db486f4ec0d74" - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^2.0.0" - ajv "^6.1.0" - ajv-keywords "^3.1.0" - async "^2.1.2" - enhanced-resolve "^3.4.0" - escope "^3.6.0" - interpret "^1.0.0" - json-loader "^0.5.4" - json5 "^0.5.1" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^4.2.1" - tapable "^0.2.7" - uglifyjs-webpack-plugin "^0.4.6" - watchpack "^1.4.0" - webpack-sources "^1.0.1" - yargs "^8.0.2" - webpack@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.17.1.tgz#0f026e3d823f3fc604f811ed3ea8f0d9b267fb1e" @@ -6579,12 +6398,6 @@ yargs-parser@^10.1.0: dependencies: camelcase "^4.1.0" -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - dependencies: - camelcase "^4.1.0" - yargs-parser@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" @@ -6643,24 +6456,6 @@ yargs@^3.28.0: window-size "^0.1.4" y18n "^3.2.0" -yargs@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" From e2267fce926c0e8b843d1114ff8e4d5d5aaaa434 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Sep 2018 19:57:51 -0700 Subject: [PATCH 09/22] Remove old webpack.config.js --- webpack.config.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 webpack.config.js diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 07913e0f..00000000 --- a/webpack.config.js +++ /dev/null @@ -1,19 +0,0 @@ -const path = require('path'); - -module.exports = { - entry: './demo/main.js', - output: { - path: path.resolve(__dirname, 'demo/dist'), - filename: 'bundle.js' - }, - devtool: 'source-map', - module: { - rules: [ - { - test: /\.js$/, - use: ["source-map-loader"], - enforce: "pre" - } - ] - } -}; From 57b8e064a8ff842ba65d8a73f2d23e83476224bc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 2 Sep 2018 13:43:37 -0700 Subject: [PATCH 10/22] Move tslint prefer-const with the other core rules The ones at the bottom are separated as they're part of tslint-consistent-codestyle --- tslint.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tslint.json b/tslint.json index 40e26fcf..d2daef09 100644 --- a/tslint.json +++ b/tslint.json @@ -39,6 +39,7 @@ "one-variable-per-declaration": true, "no-unsafe-finally": true, "no-var-keyword": true, + "prefer-const": true, "quotemark": [ true, "single" @@ -107,7 +108,6 @@ }, "prefer-const-enum": [ true - ], - "prefer-const": true + ] } } From 53193d0a473c0f402b1e15eec872bd0e5f30a765 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Sep 2018 07:34:13 -0700 Subject: [PATCH 11/22] Use es6 in typings test --- fixtures/typings-test/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fixtures/typings-test/tsconfig.json b/fixtures/typings-test/tsconfig.json index 699a055a..e10b6955 100644 --- a/fixtures/typings-test/tsconfig.json +++ b/fixtures/typings-test/tsconfig.json @@ -5,6 +5,9 @@ "compilerOptions": { "module": "commonjs", "target": "es5", + "lib": [ + "es6" + ], "noEmit": true } } From 53e995a2d8f2718a00c59c38ea78232701bb536b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Sep 2018 07:38:52 -0700 Subject: [PATCH 12/22] Add dom lib to typings-test --- fixtures/typings-test/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/fixtures/typings-test/tsconfig.json b/fixtures/typings-test/tsconfig.json index e10b6955..9cd56129 100644 --- a/fixtures/typings-test/tsconfig.json +++ b/fixtures/typings-test/tsconfig.json @@ -6,6 +6,7 @@ "module": "commonjs", "target": "es5", "lib": [ + "dom", "es6" ], "noEmit": true From 443b2dbc28d3ca9ee5455435a06b3071b3c6283a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Sep 2018 08:01:04 -0700 Subject: [PATCH 13/22] Have common only reference within common Part of #1337 --- src/Buffer.ts | 2 +- src/BufferSet.ts | 2 +- src/Linkifier.ts | 2 +- src/SelectionManager.ts | 5 +++-- src/Terminal.ts | 2 +- src/Types.ts | 16 +--------------- src/common/CircularList.ts | 4 ++-- src/{ => common}/EventEmitter.test.ts | 0 src/{ => common}/EventEmitter.ts | 2 +- src/common/Types.ts | 17 +++++++++++++++++ src/handlers/AltClickHandler.ts | 3 ++- src/renderer/Renderer.ts | 2 +- src/renderer/dom/DomRenderer.ts | 2 +- src/ui/CharMeasure.ts | 2 +- src/utils/TestUtils.test.ts | 3 ++- 15 files changed, 35 insertions(+), 29 deletions(-) rename src/{ => common}/EventEmitter.test.ts (100%) rename src/{ => common}/EventEmitter.ts (97%) diff --git a/src/Buffer.ts b/src/Buffer.ts index 81b8a517..9487be4a 100644 --- a/src/Buffer.ts +++ b/src/Buffer.ts @@ -5,7 +5,7 @@ import { CircularList } from './common/CircularList'; import { CharData, ITerminal, IBuffer, IBufferLine } from './Types'; -import { EventEmitter } from './EventEmitter'; +import { EventEmitter } from './common/EventEmitter'; import { IMarker } from 'xterm'; import { BufferLine } from './BufferLine'; diff --git a/src/BufferSet.ts b/src/BufferSet.ts index 4b5ca2d1..c91ab751 100644 --- a/src/BufferSet.ts +++ b/src/BufferSet.ts @@ -5,7 +5,7 @@ import { ITerminal, IBufferSet } from './Types'; import { Buffer } from './Buffer'; -import { EventEmitter } from './EventEmitter'; +import { EventEmitter } from './common/EventEmitter'; /** * The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and diff --git a/src/Linkifier.ts b/src/Linkifier.ts index 8615daf8..74fc72db 100644 --- a/src/Linkifier.ts +++ b/src/Linkifier.ts @@ -6,7 +6,7 @@ import { IMouseZoneManager } from './ui/Types'; import { ILinkHoverEvent, ILinkMatcher, LinkMatcherHandler, LinkHoverEventTypes, ILinkMatcherOptions, ILinkifier, ITerminal, IBufferLine } from './Types'; import { MouseZone } from './ui/MouseZoneManager'; -import { EventEmitter } from './EventEmitter'; +import { EventEmitter } from './common/EventEmitter'; import { CHAR_DATA_ATTR_INDEX } from './Buffer'; /** diff --git a/src/SelectionManager.ts b/src/SelectionManager.ts index 2dd92c5b..bfb57177 100644 --- a/src/SelectionManager.ts +++ b/src/SelectionManager.ts @@ -3,11 +3,12 @@ * @license MIT */ -import { ITerminal, ISelectionManager, IBuffer, CharData, XtermListener, IBufferLine } from './Types'; +import { ITerminal, ISelectionManager, IBuffer, CharData, IBufferLine } from './Types'; +import { XtermListener } from './common/Types'; import { MouseHelper } from './utils/MouseHelper'; import * as Browser from './shared/utils/Browser'; import { CharMeasure } from './ui/CharMeasure'; -import { EventEmitter } from './EventEmitter'; +import { EventEmitter } from './common/EventEmitter'; import { SelectionModel } from './SelectionModel'; import { CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_CODE_INDEX } from './Buffer'; import { AltClickHandler } from './handlers/AltClickHandler'; diff --git a/src/Terminal.ts b/src/Terminal.ts index 3a0ce0ed..b133cb30 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -27,7 +27,7 @@ import { IRenderer } from './renderer/Types'; import { BufferSet } from './BufferSet'; import { Buffer, MAX_BUFFER_SIZE, DEFAULT_ATTR, NULL_CELL_CODE, NULL_CELL_WIDTH, NULL_CELL_CHAR } from './Buffer'; import { CompositionHelper } from './CompositionHelper'; -import { EventEmitter } from './EventEmitter'; +import { EventEmitter } from './common/EventEmitter'; import { Viewport } from './Viewport'; import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './handlers/Clipboard'; import { C0 } from './common/data/EscapeSequences'; diff --git a/src/Types.ts b/src/Types.ts index 5ea2024a..e5cb9edf 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -7,11 +7,10 @@ import { Terminal as PublicTerminal, ITerminalOptions as IPublicTerminalOptions, import { IColorSet, IRenderer } from './renderer/Types'; import { IMouseZoneManager } from './ui/Types'; import { ICharset } from './core/Types'; +import { ICircularList } from './common/Types'; export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean; -export type XtermListener = (...args: any[]) => void; - export type CharData = [number, string, number, number]; export type LineData = CharData[]; @@ -295,19 +294,6 @@ export interface IBufferSet extends IEventEmitter { activateAltBuffer(): void; } -export interface ICircularList extends IEventEmitter { - length: number; - maxLength: number; - - get(index: number): T; - set(index: number, value: T): void; - push(value: T): void; - pop(): T; - splice(start: number, deleteCount: number, ...items: T[]): void; - trimStart(count: number): void; - shiftElements(start: number, count: number, offset: number): void; -} - export interface ISelectionManager { selectionText: string; selectionStart: [number, number]; diff --git a/src/common/CircularList.ts b/src/common/CircularList.ts index ca83d6e1..e12191e3 100644 --- a/src/common/CircularList.ts +++ b/src/common/CircularList.ts @@ -3,8 +3,8 @@ * @license MIT */ -import { EventEmitter } from '../EventEmitter'; -import { ICircularList } from '../Types'; +import { EventEmitter } from './EventEmitter'; +import { ICircularList } from './Types'; /** * Represents a circular list; a list with a maximum size that wraps around when push is called, diff --git a/src/EventEmitter.test.ts b/src/common/EventEmitter.test.ts similarity index 100% rename from src/EventEmitter.test.ts rename to src/common/EventEmitter.test.ts diff --git a/src/EventEmitter.ts b/src/common/EventEmitter.ts similarity index 97% rename from src/EventEmitter.ts rename to src/common/EventEmitter.ts index 0de5999a..56b1e149 100644 --- a/src/EventEmitter.ts +++ b/src/common/EventEmitter.ts @@ -5,7 +5,7 @@ import { XtermListener } from './Types'; import { IEventEmitter, IDisposable } from 'xterm'; -import { Disposable } from './common/Lifecycle'; +import { Disposable } from './Lifecycle'; export class EventEmitter extends Disposable implements IEventEmitter, IDisposable { private _events: {[type: string]: XtermListener[]}; diff --git a/src/common/Types.ts b/src/common/Types.ts index 98cb296d..d95b52e0 100644 --- a/src/common/Types.ts +++ b/src/common/Types.ts @@ -3,6 +3,10 @@ * @license MIT */ +import { IEventEmitter } from 'xterm'; + +export type XtermListener = (...args: any[]) => void; + /** * A keyboard event interface which does not depend on the DOM, KeyboardEvent implicitly extends * this event. @@ -16,3 +20,16 @@ export interface IKeyboardEvent { key: string; type: string; } + +export interface ICircularList extends IEventEmitter { + length: number; + maxLength: number; + + get(index: number): T; + set(index: number, value: T): void; + push(value: T): void; + pop(): T; + splice(start: number, deleteCount: number, ...items: T[]): void; + trimStart(count: number): void; + shiftElements(start: number, count: number, offset: number): void; +} diff --git a/src/handlers/AltClickHandler.ts b/src/handlers/AltClickHandler.ts index aa942f3e..8226fd96 100644 --- a/src/handlers/AltClickHandler.ts +++ b/src/handlers/AltClickHandler.ts @@ -3,7 +3,8 @@ * @license MIT */ -import { ITerminal, ICircularList, IBufferLine } from '../Types'; +import { ITerminal, IBufferLine } from '../Types'; +import { ICircularList } from '../common/Types'; import { C0 } from '../common/data/EscapeSequences'; const enum Direction { diff --git a/src/renderer/Renderer.ts b/src/renderer/Renderer.ts index a6189efc..02328877 100644 --- a/src/renderer/Renderer.ts +++ b/src/renderer/Renderer.ts @@ -10,7 +10,7 @@ import { ColorManager } from './ColorManager'; import { IRenderLayer, IColorSet, IRenderer, IRenderDimensions, ICharacterJoinerRegistry } from './Types'; import { ITerminal, CharacterJoinerHandler } from '../Types'; import { LinkRenderLayer } from './LinkRenderLayer'; -import { EventEmitter } from '../EventEmitter'; +import { EventEmitter } from '../common/EventEmitter'; import { RenderDebouncer } from '../ui/RenderDebouncer'; import { ScreenDprMonitor } from '../ui/ScreenDprMonitor'; import { ITheme } from 'xterm'; diff --git a/src/renderer/dom/DomRenderer.ts b/src/renderer/dom/DomRenderer.ts index 97eabc32..98d3a2cd 100644 --- a/src/renderer/dom/DomRenderer.ts +++ b/src/renderer/dom/DomRenderer.ts @@ -6,7 +6,7 @@ import { IRenderer, IRenderDimensions, IColorSet } from '../Types'; import { ITerminal, CharacterJoinerHandler } from '../../Types'; import { ITheme } from 'xterm'; -import { EventEmitter } from '../../EventEmitter'; +import { EventEmitter } from '../../common/EventEmitter'; import { ColorManager } from '../ColorManager'; import { RenderDebouncer } from '../../ui/RenderDebouncer'; import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, DomRendererRowFactory } from './DomRendererRowFactory'; diff --git a/src/ui/CharMeasure.ts b/src/ui/CharMeasure.ts index 5ad1de76..7d1e5e48 100644 --- a/src/ui/CharMeasure.ts +++ b/src/ui/CharMeasure.ts @@ -4,7 +4,7 @@ */ import { ICharMeasure, ITerminalOptions } from '../Types'; -import { EventEmitter } from '../EventEmitter'; +import { EventEmitter } from '../common/EventEmitter'; /** * Utility class that measures the size of a character. Measurements are done in diff --git a/src/utils/TestUtils.test.ts b/src/utils/TestUtils.test.ts index b9bb0348..32a7e9bc 100644 --- a/src/utils/TestUtils.test.ts +++ b/src/utils/TestUtils.test.ts @@ -4,7 +4,8 @@ */ import { IColorSet, IRenderer, IRenderDimensions, IColorManager } from '../renderer/Types'; -import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ICircularList, ILinkifier, IMouseHelper, ILinkMatcherOptions, XtermListener, CharacterJoinerHandler, IBufferLine } from '../Types'; +import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ILinkifier, IMouseHelper, ILinkMatcherOptions, CharacterJoinerHandler, IBufferLine } from '../Types'; +import { ICircularList, XtermListener } from '../common/Types'; import { Buffer } from '../Buffer'; import * as Browser from '../shared/utils/Browser'; import { ITheme, IDisposable, IMarker } from 'xterm'; From 3618c6495bd18c28095b17cffab3f5e316bf35b0 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Sep 2018 08:02:47 -0700 Subject: [PATCH 14/22] typescript@3.0 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index db566c68..a4c6697c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "source-map-loader": "^0.2.3", "tslint": "^5.9.1", "tslint-consistent-codestyle": "^1.13.0", - "typescript": "2.8.3", + "typescript": "3.0", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", "webpack": "^3.10.0", diff --git a/yarn.lock b/yarn.lock index ec58250a..aef4243e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5451,9 +5451,9 @@ typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170" +typescript@3.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" From 7c1b1e2eb840f5c569c1cdc064385221563a7229 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Sep 2018 09:56:29 -0700 Subject: [PATCH 15/22] Fix strict null checks in ./common Part of #1319 --- src/common/CircularList.ts | 10 +++++----- src/common/EventEmitter.ts | 5 +++-- src/common/Types.ts | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/common/CircularList.ts b/src/common/CircularList.ts index e12191e3..542dbf12 100644 --- a/src/common/CircularList.ts +++ b/src/common/CircularList.ts @@ -11,7 +11,7 @@ import { ICircularList } from './Types'; * overriding values at the start of the list. */ export class CircularList extends EventEmitter implements ICircularList { - protected _array: T[]; + protected _array: (T | undefined)[]; private _startIndex: number; private _length: number; @@ -36,7 +36,7 @@ export class CircularList extends EventEmitter implements ICircularList { // Reconstruct array, starting at index 0. Only transfer values from the // indexes 0 to length. - const newArray = new Array(newMaxLength); + const newArray = new Array(newMaxLength); for (let i = 0; i < Math.min(newMaxLength, this.length); i++) { newArray[i] = this._array[this._getCyclicIndex(i)]; } @@ -66,7 +66,7 @@ export class CircularList extends EventEmitter implements ICircularList { * @param index The index of the value to get. * @return The value corresponding to the index. */ - public get(index: number): T { + public get(index: number): T | undefined { return this._array[this._getCyclicIndex(index)]; } @@ -78,7 +78,7 @@ export class CircularList extends EventEmitter implements ICircularList { * @param index The index to set. * @param value The value to set. */ - public set(index: number, value: T): void { + public set(index: number, value: T | undefined): void { this._array[this._getCyclicIndex(index)] = value; } @@ -104,7 +104,7 @@ export class CircularList extends EventEmitter implements ICircularList { * Removes and returns the last value on the list. * @return The popped value. */ - public pop(): T { + public pop(): T | undefined { return this._array[this._getCyclicIndex(this._length-- - 1)]; } diff --git a/src/common/EventEmitter.ts b/src/common/EventEmitter.ts index 56b1e149..ae8f0069 100644 --- a/src/common/EventEmitter.ts +++ b/src/common/EventEmitter.ts @@ -30,14 +30,15 @@ export class EventEmitter extends Disposable implements IEventEmitter, IDisposab public addDisposableListener(type: string, handler: XtermListener): IDisposable { // TODO: Rename addDisposableEventListener to more easily disambiguate from Dom listener this.on(type, handler); + let disposed = false; return { dispose: () => { - if (!handler) { + if (disposed) { // Already disposed return; } this.off(type, handler); - handler = null; + disposed = true; } }; } diff --git a/src/common/Types.ts b/src/common/Types.ts index d95b52e0..aabe721e 100644 --- a/src/common/Types.ts +++ b/src/common/Types.ts @@ -25,10 +25,10 @@ export interface ICircularList extends IEventEmitter { length: number; maxLength: number; - get(index: number): T; + get(index: number): T | undefined; set(index: number, value: T): void; push(value: T): void; - pop(): T; + pop(): T | undefined; splice(start: number, deleteCount: number, ...items: T[]): void; trimStart(count: number): void; shiftElements(start: number, count: number, offset: number): void; From 374a8b70eb786d28d78b61da34d5b69b1c474647 Mon Sep 17 00:00:00 2001 From: Hindol Adhya Date: Thu, 6 Sep 2018 11:37:24 +0530 Subject: [PATCH 16/22] Add support for block and underline style cursor in DOM rendering mode --- src/Types.ts | 8 +++++ src/renderer/dom/DomRenderer.ts | 18 ++++++---- .../dom/DomRendererRowFactory.test.ts | 36 ++++++++++--------- src/renderer/dom/DomRendererRowFactory.ts | 21 +++++++++-- 4 files changed, 57 insertions(+), 26 deletions(-) diff --git a/src/Types.ts b/src/Types.ts index 21c6c571..cbb068e2 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -522,3 +522,11 @@ export interface IBufferLine { deleteCells(pos: number, n: number, fill: CharData): void; replaceCells(start: number, end: number, fill: CharData): void; } + +/** + * Interface for cursor options in the cursor line of the terminal buffer. + */ +export interface ICursorOptions { + isCursorRow: boolean; + cursorStyle?: string; +} diff --git a/src/renderer/dom/DomRenderer.ts b/src/renderer/dom/DomRenderer.ts index 97eabc32..084edd7b 100644 --- a/src/renderer/dom/DomRenderer.ts +++ b/src/renderer/dom/DomRenderer.ts @@ -9,7 +9,7 @@ import { ITheme } from 'xterm'; import { EventEmitter } from '../../EventEmitter'; import { ColorManager } from '../ColorManager'; import { RenderDebouncer } from '../../ui/RenderDebouncer'; -import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, DomRendererRowFactory } from './DomRendererRowFactory'; +import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, CURSOR_STYLE_BLOCK_CLASS, CURSOR_STYLE_BAR_CLASS, CURSOR_STYLE_UNDERLINE_CLASS, DomRendererRowFactory } from './DomRendererRowFactory'; const TERMINAL_CLASS_PREFIX = 'xterm-dom-renderer-owner-'; const ROW_CONTAINER_CLASS = 'xterm-rows'; @@ -160,13 +160,19 @@ export class DomRenderer extends EventEmitter implements IRenderer { `}`; // Cursor styles += - `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS} {` + + `${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS} {` + + ` outline: 1px solid ${this.colorManager.colors.cursor.css};` + + ` outline-offset: -1px;` + + `}` + + `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` + ` background-color: ${this.colorManager.colors.cursor.css};` + ` color: ${this.colorManager.colors.cursorAccent.css};` + `}` + - `${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS} {` + - ` outline: 1px solid #fff;` + - ` outline-offset: -1px;` + + `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BAR_CLASS} {` + + ` box-shadow: 1px 0 0 ${this.colorManager.colors.cursor.css} inset;` + + `}` + + `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_UNDERLINE_CLASS} {` + + ` box-shadow: 0 -1px 0 ${this.colorManager.colors.cursor.css} inset;` + `}`; // Selection styles += @@ -319,7 +325,7 @@ export class DomRenderer extends EventEmitter implements IRenderer { const row = y + terminal.buffer.ydisp; const lineData = terminal.buffer.lines.get(row); - rowElement.appendChild(this._rowFactory.createRow(lineData, row === cursorAbsoluteY, cursorX, terminal.charMeasure.width, terminal.cols)); + rowElement.appendChild(this._rowFactory.createRow(lineData, { isCursorRow: row === cursorAbsoluteY, cursorStyle: terminal.getOption('cursorStyle') }, cursorX, terminal.charMeasure.width, terminal.cols)); } this._terminal.emit('refresh', {start, end}); diff --git a/src/renderer/dom/DomRendererRowFactory.test.ts b/src/renderer/dom/DomRendererRowFactory.test.ts index 17b1b938..eaf95d59 100644 --- a/src/renderer/dom/DomRendererRowFactory.test.ts +++ b/src/renderer/dom/DomRendererRowFactory.test.ts @@ -24,7 +24,7 @@ describe('DomRendererRowFactory', () => { describe('createRow', () => { it('should create an element for every character in the row', () => { - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), ' ' + ' ' @@ -35,24 +35,26 @@ describe('DomRendererRowFactory', () => { lineData.set(0, [DEFAULT_ATTR, '語', 2, '語'.charCodeAt(0)]); // There should be no element for the following "empty" cell lineData.set(1, [DEFAULT_ATTR, '', 0, undefined]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), '' ); }); - it('should add class for cursor', () => { - const fragment = rowFactory.createRow(lineData, true, 0, 5, 20); - assert.equal(getFragmentHtml(fragment), - ' ' + - ' ' - ); + it('should add class for cursor and cursor style', () => { + for (const style of ['block', 'bar', 'underline']) { + const fragment = rowFactory.createRow(lineData, { isCursorRow: true, cursorStyle: style }, 0, 5, 20); + assert.equal(getFragmentHtml(fragment), + ` ` + + ' ' + ); + } }); it('should not render cells that go beyond the terminal\'s columns', () => { lineData.set(0, [DEFAULT_ATTR, 'a', 1, 'a'.charCodeAt(0)]); lineData.set(1, [DEFAULT_ATTR, 'b', 1, 'b'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 1); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 1); assert.equal(getFragmentHtml(fragment), 'a' ); @@ -61,7 +63,7 @@ describe('DomRendererRowFactory', () => { describe('attributes', () => { it('should add class for bold', () => { lineData.set(0, [DEFAULT_ATTR | (FLAGS.BOLD << 18), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -70,7 +72,7 @@ describe('DomRendererRowFactory', () => { it('should add class for italic', () => { lineData.set(0, [DEFAULT_ATTR | (FLAGS.ITALIC << 18), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -81,7 +83,7 @@ describe('DomRendererRowFactory', () => { const defaultAttrNoFgColor = (0 << 9) | (256 << 0); for (let i = 0; i < 256; i++) { lineData.set(0, [defaultAttrNoFgColor | (i << 9), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' @@ -93,7 +95,7 @@ describe('DomRendererRowFactory', () => { const defaultAttrNoBgColor = (257 << 9) | (0 << 0); for (let i = 0; i < 256; i++) { lineData.set(0, [defaultAttrNoBgColor | (i << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' @@ -103,7 +105,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert colors', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (2 << 9) | (1 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -112,7 +114,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert default fg color', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (257 << 9) | (1 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -121,7 +123,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert default bg color', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (1 << 9) | (256 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -131,7 +133,7 @@ describe('DomRendererRowFactory', () => { it('should turn bold fg text bright', () => { for (let i = 0; i < 8; i++) { lineData.set(0, [(FLAGS.BOLD << 18) | (i << 9) | (256 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, false, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' diff --git a/src/renderer/dom/DomRendererRowFactory.ts b/src/renderer/dom/DomRendererRowFactory.ts index 351055ef..692e09e8 100644 --- a/src/renderer/dom/DomRendererRowFactory.ts +++ b/src/renderer/dom/DomRendererRowFactory.ts @@ -5,11 +5,14 @@ import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_ATTR_INDEX, CHAR_DATA_WIDTH_INDEX } from '../../Buffer'; import { FLAGS } from '../Types'; -import { IBufferLine } from '../../Types'; +import { IBufferLine, ICursorOptions } from '../../Types'; export const BOLD_CLASS = 'xterm-bold'; export const ITALIC_CLASS = 'xterm-italic'; export const CURSOR_CLASS = 'xterm-cursor'; +export const CURSOR_STYLE_BLOCK_CLASS = 'xterm-cursor-block'; +export const CURSOR_STYLE_BAR_CLASS = 'xterm-cursor-bar'; +export const CURSOR_STYLE_UNDERLINE_CLASS = 'xterm-cursor-underline'; export class DomRendererRowFactory { constructor( @@ -17,7 +20,7 @@ export class DomRendererRowFactory { ) { } - public createRow(lineData: IBufferLine, isCursorRow: boolean, cursorX: number, cellWidth: number, cols: number): DocumentFragment { + public createRow(lineData: IBufferLine, cursorOptions: ICursorOptions, cursorX: number, cellWidth: number, cols: number): DocumentFragment { const fragment = this._document.createDocumentFragment(); let colCount = 0; @@ -46,8 +49,20 @@ export class DomRendererRowFactory { let bg = attr & 0x1ff; let fg = (attr >> 9) & 0x1ff; - if (isCursorRow && x === cursorX) { + if (cursorOptions.isCursorRow && x === cursorX) { charElement.classList.add(CURSOR_CLASS); + + switch (cursorOptions.cursorStyle) { + case 'block': + charElement.classList.add(CURSOR_STYLE_BLOCK_CLASS); + break; + case 'bar': + charElement.classList.add(CURSOR_STYLE_BAR_CLASS); + break; + case 'underline': + charElement.classList.add(CURSOR_STYLE_UNDERLINE_CLASS); + break; + } } // If inverse flag is on, the foreground should become the background. From 88205511e62a83f23d677e07da7e55bd3ce391ea Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Fri, 7 Sep 2018 09:47:15 -0700 Subject: [PATCH 17/22] Added support for searching by regular expression --- demo/index.html | 1 + demo/main.js | 4 ++-- src/addons/search/Interfaces.ts | 4 ++-- src/addons/search/SearchHelper.ts | 28 ++++++++++++++++++++-------- src/addons/search/search.ts | 18 ++++++++++-------- 5 files changed, 35 insertions(+), 20 deletions(-) diff --git a/demo/index.html b/demo/index.html index fff77d09..72804f46 100644 --- a/demo/index.html +++ b/demo/index.html @@ -16,6 +16,7 @@

+

diff --git a/demo/main.js b/demo/main.js index 70544e38..79116efb 100644 --- a/demo/main.js +++ b/demo/main.js @@ -83,13 +83,13 @@ function createTerminal() { addDomListener(actionElements.findNext, 'keypress', function (e) { if (e.key === "Enter") { e.preventDefault(); - term.findNext(actionElements.findNext.value); + term.findNext(actionElements.findNext.value, document.getElementById('regex').checked); } }); addDomListener(actionElements.findPrevious, 'keypress', function (e) { if (e.key === "Enter") { e.preventDefault(); - term.findPrevious(actionElements.findPrevious.value); + term.findPrevious(actionElements.findPrevious.value, document.getElementById('regex').checked); } }); diff --git a/src/addons/search/Interfaces.ts b/src/addons/search/Interfaces.ts index 926e3f36..e0ed1173 100644 --- a/src/addons/search/Interfaces.ts +++ b/src/addons/search/Interfaces.ts @@ -17,6 +17,6 @@ export interface ISearchAddonTerminal extends Terminal { } export interface ISearchHelper { - findNext(term: string): boolean; - findPrevious(term: string): boolean; + findNext(term: string, regex: boolean): boolean; + findPrevious(term: string, regex: boolean): boolean; } diff --git a/src/addons/search/SearchHelper.ts b/src/addons/search/SearchHelper.ts index 9b5c06f3..0a22a57e 100644 --- a/src/addons/search/SearchHelper.ts +++ b/src/addons/search/SearchHelper.ts @@ -26,9 +26,10 @@ export class SearchHelper implements ISearchHelper { * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. + * @param regex Should use regular expressions * @return Whether a result was found. */ - public findNext(term: string): boolean { + public findNext(term: string, regex: boolean = false): boolean { if (!term || term.length === 0) { return false; } @@ -43,7 +44,7 @@ export class SearchHelper implements ISearchHelper { // Search from ydisp + 1 to end for (let y = startRow + 1; y < this._terminal._core.buffer.ybase + this._terminal.rows; y++) { - result = this._findInLine(term, y); + result = this._findInLine(term, y, regex); if (result) { break; } @@ -52,7 +53,7 @@ export class SearchHelper implements ISearchHelper { // Search from the top to the current ydisp if (!result) { for (let y = 0; y < startRow; y++) { - result = this._findInLine(term, y); + result = this._findInLine(term, y, regex); if (result) { break; } @@ -67,9 +68,10 @@ export class SearchHelper implements ISearchHelper { * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. + * @param regex Should use regular expressions * @return Whether a result was found. */ - public findPrevious(term: string): boolean { + public findPrevious(term: string, regex: boolean = false): boolean { if (!term || term.length === 0) { return false; } @@ -84,7 +86,7 @@ export class SearchHelper implements ISearchHelper { // Search from ydisp + 1 to end for (let y = startRow - 1; y >= 0; y--) { - result = this._findInLine(term, y); + result = this._findInLine(term, y, regex); if (result) { break; } @@ -93,7 +95,7 @@ export class SearchHelper implements ISearchHelper { // Search from the top to the current ydisp if (!result) { for (let y = this._terminal._core.buffer.ybase + this._terminal.rows - 1; y > startRow; y--) { - result = this._findInLine(term, y); + result = this._findInLine(term, y, regex); if (result) { break; } @@ -108,12 +110,22 @@ export class SearchHelper implements ISearchHelper { * Searches a line for a search term. * @param term Tne search term. * @param y The line to search. + * @param regex Should use regular expressions * @return The search result if it was found. */ - private _findInLine(term: string, y: number): ISearchResult { + private _findInLine(term: string, y: number, regex: boolean): ISearchResult { const lowerStringLine = this._terminal._core.buffer.translateBufferLineToString(y, true).toLowerCase(); const lowerTerm = term.toLowerCase(); - let searchIndex = lowerStringLine.indexOf(lowerTerm); + let searchIndex = -1; + if (regex) { + const searchRegex = RegExp(lowerTerm, 'g'); + const foundTerm = searchRegex.exec(lowerStringLine); + if (foundTerm) { + searchIndex = searchRegex.lastIndex - foundTerm[0].length; + } + } else { + searchIndex = lowerStringLine.indexOf(lowerTerm); + } if (searchIndex >= 0) { const line = this._terminal._core.buffer.lines.get(y); for (let i = 0; i < searchIndex; i++) { diff --git a/src/addons/search/search.ts b/src/addons/search/search.ts index a1dd766f..4e97dd90 100644 --- a/src/addons/search/search.ts +++ b/src/addons/search/search.ts @@ -11,36 +11,38 @@ import { ISearchAddonTerminal } from './Interfaces'; * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. + * @param regex Should use regular expressions * @return Whether a result was found. */ -export function findNext(terminal: Terminal, term: string): boolean { +export function findNext(terminal: Terminal, term: string, regex: boolean): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); } - return addonTerminal.__searchHelper.findNext(term); + return addonTerminal.__searchHelper.findNext(term, regex); } /** * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. + * @param regex Should use regular expressions * @return Whether a result was found. */ -export function findPrevious(terminal: Terminal, term: string): boolean { +export function findPrevious(terminal: Terminal, term: string, regex: boolean): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); } - return addonTerminal.__searchHelper.findPrevious(term); + return addonTerminal.__searchHelper.findPrevious(term, regex); } export function apply(terminalConstructor: typeof Terminal): void { - (terminalConstructor.prototype).findNext = function(term: string): boolean { - return findNext(this, term); + (terminalConstructor.prototype).findNext = function(term: string, regex: boolean): boolean { + return findNext(this, term, regex); }; - (terminalConstructor.prototype).findPrevious = function(term: string): boolean { - return findPrevious(this, term); + (terminalConstructor.prototype).findPrevious = function(term: string, regex: boolean): boolean { + return findPrevious(this, term, regex); }; } From 03e54cce7d289bc198a2cc5caaa50e91558abfc9 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Fri, 7 Sep 2018 11:01:08 -0700 Subject: [PATCH 18/22] Added regex search test --- src/addons/search/search.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/addons/search/search.test.ts b/src/addons/search/search.test.ts index 91ecc4ef..891418f4 100644 --- a/src/addons/search/search.test.ts +++ b/src/addons/search/search.test.ts @@ -46,4 +46,21 @@ describe('search addon', function(): void { expect(hello1).eql(undefined); expect(hello2).eql({col: 11, row: 2, term: 'Hello'}); }); + it('should respect search regex', function(): void { + search.apply(MockTerminal); + const term = new MockTerminal({cols: 10, rows: 3}); + term.core.write('abcdefghijklmnopqrstuvwxyz'); + /* + abcdefghij + klmnopqrst + uvwxyz + */ + term.pushWriteData(); + const hello0 = (term.searchHelper as any)._findInLine('dee*', 0, true); + const hello1 = (term.searchHelper as any)._findInLine('jkk*', 0, true); + const hello2 = (term.searchHelper as any)._findInLine('mnn*', 1, true); + expect(hello0).eql({col: 3, row: 0, term: 'dee*'}); + // TODO: uncomment this test when line wrap search is checked in expect(hello1).eql({col: 9, row: 0, term: 'jkk*'}); + // TODO: uncomment this test when line wrap search is checked in expect(hello2).eql(undefined); + }); }); From e5465841f8de0e89222b4a6827d51f6e19fcf655 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Fri, 7 Sep 2018 15:29:51 -0700 Subject: [PATCH 19/22] Responded to feedback and fixed the returned found term --- demo/main.js | 14 ++++++++++++-- src/addons/search/Interfaces.ts | 10 ++++++++-- src/addons/search/SearchHelper.ts | 28 ++++++++++++++-------------- src/addons/search/search.test.ts | 26 +++++++++++++++++++------- src/addons/search/search.ts | 22 +++++++++++----------- 5 files changed, 64 insertions(+), 36 deletions(-) diff --git a/demo/main.js b/demo/main.js index 79116efb..12537db2 100644 --- a/demo/main.js +++ b/demo/main.js @@ -83,13 +83,23 @@ function createTerminal() { addDomListener(actionElements.findNext, 'keypress', function (e) { if (e.key === "Enter") { e.preventDefault(); - term.findNext(actionElements.findNext.value, document.getElementById('regex').checked); + let searchOptions = { + regex: document.getElementById('regex').checked, + wholeWord: false, + caseSensitive: false + }; + term.findNext(actionElements.findNext.value, searchOptions); } }); addDomListener(actionElements.findPrevious, 'keypress', function (e) { if (e.key === "Enter") { e.preventDefault(); - term.findPrevious(actionElements.findPrevious.value, document.getElementById('regex').checked); + let searchOptions = { + regex: document.getElementById('regex').checked, + wholeWord: false, + caseSensitive: false + }; + term.findPrevious(actionElements.findPrevious.value, searchOptions); } }); diff --git a/src/addons/search/Interfaces.ts b/src/addons/search/Interfaces.ts index e0ed1173..4fa8b77e 100644 --- a/src/addons/search/Interfaces.ts +++ b/src/addons/search/Interfaces.ts @@ -17,6 +17,12 @@ export interface ISearchAddonTerminal extends Terminal { } export interface ISearchHelper { - findNext(term: string, regex: boolean): boolean; - findPrevious(term: string, regex: boolean): boolean; + findNext(term: string, searchOptions: ISearchOptions): boolean; + findPrevious(term: string, searchOptions: ISearchOptions): boolean; +} + +export interface ISearchOptions { + regex: boolean; + wholeWord: boolean; + caseSensitive: boolean; } diff --git a/src/addons/search/SearchHelper.ts b/src/addons/search/SearchHelper.ts index 0a22a57e..be1a1475 100644 --- a/src/addons/search/SearchHelper.ts +++ b/src/addons/search/SearchHelper.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { ISearchHelper, ISearchAddonTerminal } from './Interfaces'; +import { ISearchHelper, ISearchAddonTerminal, ISearchOptions } from './Interfaces'; interface ISearchResult { term: string; @@ -19,17 +19,16 @@ export class SearchHelper implements ISearchHelper { // TODO: Search for multiple instances on 1 line // TODO: Don't use the actual selection, instead use a "find selection" so multiple instances can be highlighted // TODO: Highlight other instances in the viewport - // TODO: Support regex, case sensitivity, etc. } /** * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. - * @param regex Should use regular expressions + * @param searchOptions Search options. * @return Whether a result was found. */ - public findNext(term: string, regex: boolean = false): boolean { + public findNext(term: string, searchOptions: ISearchOptions): boolean { if (!term || term.length === 0) { return false; } @@ -44,7 +43,7 @@ export class SearchHelper implements ISearchHelper { // Search from ydisp + 1 to end for (let y = startRow + 1; y < this._terminal._core.buffer.ybase + this._terminal.rows; y++) { - result = this._findInLine(term, y, regex); + result = this._findInLine(term, y, searchOptions); if (result) { break; } @@ -53,7 +52,7 @@ export class SearchHelper implements ISearchHelper { // Search from the top to the current ydisp if (!result) { for (let y = 0; y < startRow; y++) { - result = this._findInLine(term, y, regex); + result = this._findInLine(term, y, searchOptions); if (result) { break; } @@ -68,10 +67,10 @@ export class SearchHelper implements ISearchHelper { * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. - * @param regex Should use regular expressions + * @param searchOptions Search options. * @return Whether a result was found. */ - public findPrevious(term: string, regex: boolean = false): boolean { + public findPrevious(term: string, searchOptions: ISearchOptions): boolean { if (!term || term.length === 0) { return false; } @@ -86,7 +85,7 @@ export class SearchHelper implements ISearchHelper { // Search from ydisp + 1 to end for (let y = startRow - 1; y >= 0; y--) { - result = this._findInLine(term, y, regex); + result = this._findInLine(term, y, searchOptions); if (result) { break; } @@ -95,7 +94,7 @@ export class SearchHelper implements ISearchHelper { // Search from the top to the current ydisp if (!result) { for (let y = this._terminal._core.buffer.ybase + this._terminal.rows - 1; y > startRow; y--) { - result = this._findInLine(term, y, regex); + result = this._findInLine(term, y, searchOptions); if (result) { break; } @@ -108,20 +107,21 @@ export class SearchHelper implements ISearchHelper { /** * Searches a line for a search term. - * @param term Tne search term. + * @param term The search term. * @param y The line to search. - * @param regex Should use regular expressions + * @param searchOptions Search options. * @return The search result if it was found. */ - private _findInLine(term: string, y: number, regex: boolean): ISearchResult { + private _findInLine(term: string, y: number, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): ISearchResult { const lowerStringLine = this._terminal._core.buffer.translateBufferLineToString(y, true).toLowerCase(); const lowerTerm = term.toLowerCase(); let searchIndex = -1; - if (regex) { + if (searchOptions.regex) { const searchRegex = RegExp(lowerTerm, 'g'); const foundTerm = searchRegex.exec(lowerStringLine); if (foundTerm) { searchIndex = searchRegex.lastIndex - foundTerm[0].length; + term = foundTerm[0]; } } else { searchIndex = lowerStringLine.indexOf(lowerTerm); diff --git a/src/addons/search/search.test.ts b/src/addons/search/search.test.ts index 891418f4..9616ae3c 100644 --- a/src/addons/search/search.test.ts +++ b/src/addons/search/search.test.ts @@ -48,19 +48,31 @@ describe('search addon', function(): void { }); it('should respect search regex', function(): void { search.apply(MockTerminal); - const term = new MockTerminal({cols: 10, rows: 3}); - term.core.write('abcdefghijklmnopqrstuvwxyz'); + const term = new MockTerminal({cols: 10, rows: 4}); + term.core.write('abcdefghijklmnopqrstuvwxyz\r\n~/dev '); /* abcdefghij klmnopqrst uvwxyz + ~/dev */ term.pushWriteData(); - const hello0 = (term.searchHelper as any)._findInLine('dee*', 0, true); - const hello1 = (term.searchHelper as any)._findInLine('jkk*', 0, true); - const hello2 = (term.searchHelper as any)._findInLine('mnn*', 1, true); - expect(hello0).eql({col: 3, row: 0, term: 'dee*'}); - // TODO: uncomment this test when line wrap search is checked in expect(hello1).eql({col: 9, row: 0, term: 'jkk*'}); + const searchOptions = { + regex: true, + wholeWord: false, + caseSensitive: false + }; + const hello0 = (term.searchHelper as any)._findInLine('dee*', 0, searchOptions); + const hello1 = (term.searchHelper as any)._findInLine('jkk*', 0, searchOptions); + const hello2 = (term.searchHelper as any)._findInLine('mnn*', 1, searchOptions); + const tilda0 = (term.searchHelper as any)._findInLine('^~', 3, searchOptions); + const tilda1 = (term.searchHelper as any)._findInLine('^[~]', 3, searchOptions); + const tilda2 = (term.searchHelper as any)._findInLine('^\\~', 3, searchOptions); + expect(hello0).eql({col: 3, row: 0, term: 'de'}); + // TODO: uncomment this test when line wrap search is checked in expect(hello1).eql({col: 9, row: 0, term: 'jk'}); // TODO: uncomment this test when line wrap search is checked in expect(hello2).eql(undefined); + expect(tilda0).eql({col: 0, row: 3, term: '~'}); + expect(tilda1).eql({col: 0, row: 3, term: '~'}); + expect(tilda2).eql({col: 0, row: 3, term: '~'}); }); }); diff --git a/src/addons/search/search.ts b/src/addons/search/search.ts index 4e97dd90..93ac8843 100644 --- a/src/addons/search/search.ts +++ b/src/addons/search/search.ts @@ -5,44 +5,44 @@ import { SearchHelper } from './SearchHelper'; import { Terminal } from 'xterm'; -import { ISearchAddonTerminal } from './Interfaces'; +import { ISearchAddonTerminal, ISearchOptions } from './Interfaces'; /** * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. - * @param regex Should use regular expressions + * @param searchOptions Search options * @return Whether a result was found. */ -export function findNext(terminal: Terminal, term: string, regex: boolean): boolean { +export function findNext(terminal: Terminal, term: string, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); } - return addonTerminal.__searchHelper.findNext(term, regex); + return addonTerminal.__searchHelper.findNext(term, searchOptions); } /** * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. * @param term Tne search term. - * @param regex Should use regular expressions + * @param searchOptions Search options * @return Whether a result was found. */ -export function findPrevious(terminal: Terminal, term: string, regex: boolean): boolean { +export function findPrevious(terminal: Terminal, term: string, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); } - return addonTerminal.__searchHelper.findPrevious(term, regex); + return addonTerminal.__searchHelper.findPrevious(term, searchOptions); } export function apply(terminalConstructor: typeof Terminal): void { - (terminalConstructor.prototype).findNext = function(term: string, regex: boolean): boolean { - return findNext(this, term, regex); + (terminalConstructor.prototype).findNext = function(term: string, searchOptions: ISearchOptions): boolean { + return findNext(this, term, searchOptions); }; - (terminalConstructor.prototype).findPrevious = function(term: string, regex: boolean): boolean { - return findPrevious(this, term, regex); + (terminalConstructor.prototype).findPrevious = function(term: string, searchOptions: ISearchOptions): boolean { + return findPrevious(this, term, searchOptions); }; } From 2716413e665c4f7b4c30ecd6b3338a6cb220df67 Mon Sep 17 00:00:00 2001 From: Hindol Adhya Date: Fri, 7 Sep 2018 12:50:34 +0530 Subject: [PATCH 20/22] Updates as per code review comments Getting rid of the ICursorOptions interface to improve performance --- src/Types.ts | 8 ------- src/renderer/dom/DomRenderer.ts | 3 ++- .../dom/DomRendererRowFactory.test.ts | 24 +++++++++---------- src/renderer/dom/DomRendererRowFactory.ts | 14 +++++------ 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/Types.ts b/src/Types.ts index cbb068e2..21c6c571 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -522,11 +522,3 @@ export interface IBufferLine { deleteCells(pos: number, n: number, fill: CharData): void; replaceCells(start: number, end: number, fill: CharData): void; } - -/** - * Interface for cursor options in the cursor line of the terminal buffer. - */ -export interface ICursorOptions { - isCursorRow: boolean; - cursorStyle?: string; -} diff --git a/src/renderer/dom/DomRenderer.ts b/src/renderer/dom/DomRenderer.ts index 084edd7b..b3f69ffc 100644 --- a/src/renderer/dom/DomRenderer.ts +++ b/src/renderer/dom/DomRenderer.ts @@ -325,7 +325,8 @@ export class DomRenderer extends EventEmitter implements IRenderer { const row = y + terminal.buffer.ydisp; const lineData = terminal.buffer.lines.get(row); - rowElement.appendChild(this._rowFactory.createRow(lineData, { isCursorRow: row === cursorAbsoluteY, cursorStyle: terminal.getOption('cursorStyle') }, cursorX, terminal.charMeasure.width, terminal.cols)); + const cursorStyle = terminal.options.cursorStyle; + rowElement.appendChild(this._rowFactory.createRow(lineData, row === cursorAbsoluteY, cursorStyle, cursorX, terminal.charMeasure.width, terminal.cols)); } this._terminal.emit('refresh', {start, end}); diff --git a/src/renderer/dom/DomRendererRowFactory.test.ts b/src/renderer/dom/DomRendererRowFactory.test.ts index eaf95d59..4e795b6c 100644 --- a/src/renderer/dom/DomRendererRowFactory.test.ts +++ b/src/renderer/dom/DomRendererRowFactory.test.ts @@ -24,7 +24,7 @@ describe('DomRendererRowFactory', () => { describe('createRow', () => { it('should create an element for every character in the row', () => { - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), ' ' + ' ' @@ -35,7 +35,7 @@ describe('DomRendererRowFactory', () => { lineData.set(0, [DEFAULT_ATTR, '語', 2, '語'.charCodeAt(0)]); // There should be no element for the following "empty" cell lineData.set(1, [DEFAULT_ATTR, '', 0, undefined]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), '' ); @@ -43,7 +43,7 @@ describe('DomRendererRowFactory', () => { it('should add class for cursor and cursor style', () => { for (const style of ['block', 'bar', 'underline']) { - const fragment = rowFactory.createRow(lineData, { isCursorRow: true, cursorStyle: style }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, true, style, 0, 5, 20); assert.equal(getFragmentHtml(fragment), ` ` + ' ' @@ -54,7 +54,7 @@ describe('DomRendererRowFactory', () => { it('should not render cells that go beyond the terminal\'s columns', () => { lineData.set(0, [DEFAULT_ATTR, 'a', 1, 'a'.charCodeAt(0)]); lineData.set(1, [DEFAULT_ATTR, 'b', 1, 'b'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 1); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 1); assert.equal(getFragmentHtml(fragment), 'a' ); @@ -63,7 +63,7 @@ describe('DomRendererRowFactory', () => { describe('attributes', () => { it('should add class for bold', () => { lineData.set(0, [DEFAULT_ATTR | (FLAGS.BOLD << 18), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -72,7 +72,7 @@ describe('DomRendererRowFactory', () => { it('should add class for italic', () => { lineData.set(0, [DEFAULT_ATTR | (FLAGS.ITALIC << 18), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -83,7 +83,7 @@ describe('DomRendererRowFactory', () => { const defaultAttrNoFgColor = (0 << 9) | (256 << 0); for (let i = 0; i < 256; i++) { lineData.set(0, [defaultAttrNoFgColor | (i << 9), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' @@ -95,7 +95,7 @@ describe('DomRendererRowFactory', () => { const defaultAttrNoBgColor = (257 << 9) | (0 << 0); for (let i = 0; i < 256; i++) { lineData.set(0, [defaultAttrNoBgColor | (i << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' @@ -105,7 +105,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert colors', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (2 << 9) | (1 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -114,7 +114,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert default fg color', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (257 << 9) | (1 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -123,7 +123,7 @@ describe('DomRendererRowFactory', () => { it('should correctly invert default bg color', () => { lineData.set(0, [(FLAGS.INVERSE << 18) | (1 << 9) | (256 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), 'a' + ' ' @@ -133,7 +133,7 @@ describe('DomRendererRowFactory', () => { it('should turn bold fg text bright', () => { for (let i = 0; i < 8; i++) { lineData.set(0, [(FLAGS.BOLD << 18) | (i << 9) | (256 << 0), 'a', 1, 'a'.charCodeAt(0)]); - const fragment = rowFactory.createRow(lineData, { isCursorRow: false }, 0, 5, 20); + const fragment = rowFactory.createRow(lineData, false, undefined, 0, 5, 20); assert.equal(getFragmentHtml(fragment), `a` + ' ' diff --git a/src/renderer/dom/DomRendererRowFactory.ts b/src/renderer/dom/DomRendererRowFactory.ts index 692e09e8..4bb59902 100644 --- a/src/renderer/dom/DomRendererRowFactory.ts +++ b/src/renderer/dom/DomRendererRowFactory.ts @@ -5,7 +5,7 @@ import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_ATTR_INDEX, CHAR_DATA_WIDTH_INDEX } from '../../Buffer'; import { FLAGS } from '../Types'; -import { IBufferLine, ICursorOptions } from '../../Types'; +import { IBufferLine } from '../../Types'; export const BOLD_CLASS = 'xterm-bold'; export const ITALIC_CLASS = 'xterm-italic'; @@ -20,7 +20,7 @@ export class DomRendererRowFactory { ) { } - public createRow(lineData: IBufferLine, cursorOptions: ICursorOptions, cursorX: number, cellWidth: number, cols: number): DocumentFragment { + public createRow(lineData: IBufferLine, isCursorRow: boolean, cursorStyle: string | undefined, cursorX: number, cellWidth: number, cols: number): DocumentFragment { const fragment = this._document.createDocumentFragment(); let colCount = 0; @@ -49,19 +49,19 @@ export class DomRendererRowFactory { let bg = attr & 0x1ff; let fg = (attr >> 9) & 0x1ff; - if (cursorOptions.isCursorRow && x === cursorX) { + if (isCursorRow && x === cursorX) { charElement.classList.add(CURSOR_CLASS); - switch (cursorOptions.cursorStyle) { - case 'block': - charElement.classList.add(CURSOR_STYLE_BLOCK_CLASS); - break; + switch (cursorStyle) { case 'bar': charElement.classList.add(CURSOR_STYLE_BAR_CLASS); break; case 'underline': charElement.classList.add(CURSOR_STYLE_UNDERLINE_CLASS); break; + default: + charElement.classList.add(CURSOR_STYLE_BLOCK_CLASS); + break; } } From 599271bde462a8ae5eeabab01baec552c9a67999 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 8 Sep 2018 02:10:02 -0700 Subject: [PATCH 21/22] Make search option props optional, test optional typings --- src/addons/search/Interfaces.ts | 12 +++++++++--- src/addons/search/SearchHelper.ts | 14 ++++---------- src/addons/search/search.test.ts | 30 ++++++++++++++++++------------ src/addons/search/search.ts | 4 ++-- 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/addons/search/Interfaces.ts b/src/addons/search/Interfaces.ts index 4fa8b77e..af06c5d1 100644 --- a/src/addons/search/Interfaces.ts +++ b/src/addons/search/Interfaces.ts @@ -22,7 +22,13 @@ export interface ISearchHelper { } export interface ISearchOptions { - regex: boolean; - wholeWord: boolean; - caseSensitive: boolean; + regex?: boolean; + wholeWord?: boolean; + caseSensitive?: boolean; +} + +export interface ISearchResult { + term: string; + col: number; + row: number; } diff --git a/src/addons/search/SearchHelper.ts b/src/addons/search/SearchHelper.ts index be1a1475..63fd047b 100644 --- a/src/addons/search/SearchHelper.ts +++ b/src/addons/search/SearchHelper.ts @@ -3,13 +3,7 @@ * @license MIT */ -import { ISearchHelper, ISearchAddonTerminal, ISearchOptions } from './Interfaces'; - -interface ISearchResult { - term: string; - col: number; - row: number; -} +import { ISearchHelper, ISearchAddonTerminal, ISearchOptions, ISearchResult } from './Interfaces'; /** * A class that knows how to search the terminal and how to display the results. @@ -28,7 +22,7 @@ export class SearchHelper implements ISearchHelper { * @param searchOptions Search options. * @return Whether a result was found. */ - public findNext(term: string, searchOptions: ISearchOptions): boolean { + public findNext(term: string, searchOptions?: ISearchOptions): boolean { if (!term || term.length === 0) { return false; } @@ -70,7 +64,7 @@ export class SearchHelper implements ISearchHelper { * @param searchOptions Search options. * @return Whether a result was found. */ - public findPrevious(term: string, searchOptions: ISearchOptions): boolean { + public findPrevious(term: string, searchOptions?: ISearchOptions): boolean { if (!term || term.length === 0) { return false; } @@ -112,7 +106,7 @@ export class SearchHelper implements ISearchHelper { * @param searchOptions Search options. * @return The search result if it was found. */ - private _findInLine(term: string, y: number, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): ISearchResult { + protected _findInLine(term: string, y: number, searchOptions: ISearchOptions = {}): ISearchResult { const lowerStringLine = this._terminal._core.buffer.translateBufferLineToString(y, true).toLowerCase(); const lowerTerm = term.toLowerCase(); let searchIndex = -1; diff --git a/src/addons/search/search.test.ts b/src/addons/search/search.test.ts index 9616ae3c..8fcde950 100644 --- a/src/addons/search/search.test.ts +++ b/src/addons/search/search.test.ts @@ -6,17 +6,17 @@ import { assert, expect } from 'chai'; import * as search from './search'; import { SearchHelper } from './SearchHelper'; -import { ISearchHelper } from './Interfaces'; +import { ISearchOptions, ISearchResult } from './Interfaces'; class MockTerminalPlain {} class MockTerminal { private _core: any; - public searchHelper: ISearchHelper; + public searchHelper: TestSearchHelper; constructor(options: any) { this._core = new (require('../../../lib/Terminal').Terminal)(options); - this.searchHelper = new SearchHelper(this as any); + this.searchHelper = new TestSearchHelper(this as any); } get core(): any { return this._core; @@ -26,6 +26,12 @@ class MockTerminal { } } +class TestSearchHelper extends SearchHelper { + public findInLine(term: string, y: number, searchOptions?: ISearchOptions): ISearchResult { + return this._findInLine(term, y, searchOptions); + } +} + describe('search addon', function(): void { describe('apply', () => { it('should register findNext and findPrevious', () => { @@ -39,9 +45,9 @@ describe('search addon', function(): void { const term = new MockTerminal({cols: 20, rows: 3}); term.core.write('Hello World\r\ntest\n123....hello'); term.pushWriteData(); - const hello0 = (term.searchHelper as any)._findInLine('Hello', 0); - const hello1 = (term.searchHelper as any)._findInLine('Hello', 1); - const hello2 = (term.searchHelper as any)._findInLine('Hello', 2); + const hello0 = term.searchHelper.findInLine('Hello', 0); + const hello1 = term.searchHelper.findInLine('Hello', 1); + const hello2 = term.searchHelper.findInLine('Hello', 2); expect(hello0).eql({col: 0, row: 0, term: 'Hello'}); expect(hello1).eql(undefined); expect(hello2).eql({col: 11, row: 2, term: 'Hello'}); @@ -62,12 +68,12 @@ describe('search addon', function(): void { wholeWord: false, caseSensitive: false }; - const hello0 = (term.searchHelper as any)._findInLine('dee*', 0, searchOptions); - const hello1 = (term.searchHelper as any)._findInLine('jkk*', 0, searchOptions); - const hello2 = (term.searchHelper as any)._findInLine('mnn*', 1, searchOptions); - const tilda0 = (term.searchHelper as any)._findInLine('^~', 3, searchOptions); - const tilda1 = (term.searchHelper as any)._findInLine('^[~]', 3, searchOptions); - const tilda2 = (term.searchHelper as any)._findInLine('^\\~', 3, searchOptions); + const hello0 = term.searchHelper.findInLine('dee*', 0, searchOptions); + term.searchHelper.findInLine('jkk*', 0, searchOptions); + term.searchHelper.findInLine('mnn*', 1, searchOptions); + const tilda0 = term.searchHelper.findInLine('^~', 3, searchOptions); + const tilda1 = term.searchHelper.findInLine('^[~]', 3, searchOptions); + const tilda2 = term.searchHelper.findInLine('^\\~', 3, searchOptions); expect(hello0).eql({col: 3, row: 0, term: 'de'}); // TODO: uncomment this test when line wrap search is checked in expect(hello1).eql({col: 9, row: 0, term: 'jk'}); // TODO: uncomment this test when line wrap search is checked in expect(hello2).eql(undefined); diff --git a/src/addons/search/search.ts b/src/addons/search/search.ts index 93ac8843..9be0b33b 100644 --- a/src/addons/search/search.ts +++ b/src/addons/search/search.ts @@ -14,7 +14,7 @@ import { ISearchAddonTerminal, ISearchOptions } from './Interfaces'; * @param searchOptions Search options * @return Whether a result was found. */ -export function findNext(terminal: Terminal, term: string, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): boolean { +export function findNext(terminal: Terminal, term: string, searchOptions: ISearchOptions = {}): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); @@ -29,7 +29,7 @@ export function findNext(terminal: Terminal, term: string, searchOptions: ISearc * @param searchOptions Search options * @return Whether a result was found. */ -export function findPrevious(terminal: Terminal, term: string, searchOptions: ISearchOptions = {regex: false, wholeWord: false, caseSensitive: false}): boolean { +export function findPrevious(terminal: Terminal, term: string, searchOptions: ISearchOptions): boolean { const addonTerminal = terminal; if (!addonTerminal.__searchHelper) { addonTerminal.__searchHelper = new SearchHelper(addonTerminal); From 27c3663470bba7f074ad9e31b77768d12145baf8 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 8 Sep 2018 02:38:05 -0700 Subject: [PATCH 22/22] Bump version to 3.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db566c68..d09fc931 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "xterm", "description": "Full xterm terminal, in your browser", - "version": "3.6.0", + "version": "3.7.0", "main": "lib/public/Terminal.js", "types": "typings/xterm.d.ts", "repository": "https://github.com/xtermjs/xterm.js",