From 98e2a44cc6e8c38d9ddbde43f929f2fcb1e56460 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 9 Nov 2018 11:25:44 -0800 Subject: [PATCH 01/27] stuff --- webpack.extension.config.js | 184 ++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 webpack.extension.config.js diff --git a/webpack.extension.config.js b/webpack.extension.config.js new file mode 100644 index 000000000000..ede0d7a89cef --- /dev/null +++ b/webpack.extension.config.js @@ -0,0 +1,184 @@ +const path = require('path'); +const nodeExternals = require('webpack-node-externals'); +// const configFileName = 'tsconfig.extension.json'; +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const webpack = require('webpack'); +const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); + +// const extensionTools = require('./build/webpack/extension'); + +// const nodeModuleBundleEntries = extensionTools.getNodeModuleBunleEntries(); +// const exteranlSourceLoaderOptions = extensionTools.getExternalSourceLoaderOptions(); +// const exteranlSourceToIgnore = extensionTools.getExternalSourcesToIgnore(); + +// console.log(exteranlSourceToIgnore); +module.exports = { + mode: 'none', + // mode: 'production' + target: 'node', + entry: { + extension: './src/client/extension.ts', + debugAdapter: './src/client/debugger/debugAdapter/main.ts', + // ...nodeModuleBundleEntries, + // "untildifyx": "untildify" + // unicode_category_Lu: './node_modules/unicode/category/Lu.js', + // unicode_category_Ll: './node_modules/unicode/category/Ll.js', + // unicode_category_Lt: './node_modules/unicode/category/Lt.js', + // unicode_category_Lo: './node_modules/unicode/category/Lo.js', + // unicode_category_Nl: './node_modules/unicode/category/Nl.js', + // unicode_category_Mn: './node_modules/unicode/category/Mn.js', + // unicode_category_Mcc: './node_modules/unicode/category/Mc.js', + // unicode_category_Nd: './node_modules/unicode/category/Nd.js', + // unicode_category_Pc: './node_modules/unicode/category/Pc.js' + }, + // devtool: 'source-map', + devtool: 'none', + node: { + __dirname: false + }, + // resolveLoader: { + // alias: { + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // } + // }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [{ + loader: 'ts-loader', + }, + // { + // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' + // } + ] + }, + // { + // test: /\.ts$/, + // use: [ + // { + // loader: './build/webpack/externalSourceLoader.js', + // options: exteranlSourceLoaderOptions + // }] + // }, + // { + // test: /\.ts$/, + // use: { + // loader: "awesome-typescript-loader", + // options: { + // configFileName, + // reportFiles: [ + // 'src/datascience-ui/**/*.{ts,tsx}' + // ] + // }, + // } + // }, + // { + // test: /\.json$/, + // type: 'javascript/auto', + // include: /node_modules.*remark.*/, + // use: [ + // { + // loader: path.resolve('./build/datascience/jsonloader.js'), + // options: {} + // } + // ] + // } + ] + }, + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static' + }), + // new webpack.HashedModuleIdsPlugin(), // so that file hashes don't change unexpectedly + // new webpack.optimize.CommonsChunkPlugin({ + // name: 'node-static', + // filename: 'node-static.js', + // minChunks(module, count) { + // var context = module.context; + // return context && context.indexOf('node_modules') >= 0; + // }, + // }), + ], + optimization: { + // runtimeChunk: 'single', + // splitChunks: { + // cacheGroups: { + // commons: { + // test: /[\\/]node_modules[\\/]/, + // name: "vendors", + // chunks: "async" + // }, + // wow: { + // test: /[\\/]node_modules[\\/]/, + // name: "wow", + // chunks: "initial" + // } + // } + // } + // splitChunks: { + // chunks: 'all', + // maxInitialRequests: Infinity, + // minSize: 0, + // cacheGroups: { + // vendor: { + // test: /[\\/]node_modules[\\/]/, + // name(module) { + // // get the name. E.g. node_modules/packageName/not/this/part.js + // // or node_modules/packageName + // const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1]; + // // npm package names are URL-safe, but some servers don't like @ symbols + // return `npm.${packageName.replace('@', '')}`; + // } + // } + // } + // } + }, + // externals: [nodeExternals(), 'vscode'], + // externals: ["commonjs", "vscode"], + externals: ["vscode", + // "lodash", + // "azure-storage", + // "vscode-extension-telemetry", + // "@jupyterlab/services", + // // "unicode", + "unicode/category/Lu", "unicode/category/Ll", "unicode/category/Lt", + "unicode/category/Lo", "unicode/category/Lo", "unicode/category/Lm", + "unicode/category/Nl", "unicode/category/Mn", "unicode/category/Mc", + "unicode/category/Nd", "unicode/category/Pc", + + // 'out/client/unicode_category_Llxyz.js', + // './out/client/unicode_category_Llxyz.js', + // './out/client/HELLO.js', + // 'out/client/unicode_category_Lu.js', + // ...exteranlSourceToIgcnore + + + // path.join(__dirname, 'out', 'client', 'unicode_category_Lu'), + // path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + ], + // externals: 'commonjs vscode', + // externals: { + // vscode: "commonjs vscode lodash azure-storage unicode unicode/category" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed + // }, + resolve: { + extensions: ['.ts', '.js'], + // plugins: [new TsconfigPathsPlugin({ configFile: configFileName })], + // alias: { + // 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', + // 'unicode/category/Lu': 'out/client/unicode_category_Lu.js', + // // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // } + }, + output: { + // filename: 'index.js',c + filename: '[name].js', + // chunkFilename: '[name].bundle.js', + path: path.resolve(__dirname, 'out', 'client'), + libraryTarget: "commonjs2", + + } +}; From 2b9b719f3c6d28f6336859c8a6588a420cd919a6 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 13 Nov 2018 11:23:01 -0800 Subject: [PATCH 02/27] changes --- webpack.extension.config.js | 81 ++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/webpack.extension.config.js b/webpack.extension.config.js index ede0d7a89cef..702e32a7b234 100644 --- a/webpack.extension.config.js +++ b/webpack.extension.config.js @@ -1,9 +1,10 @@ -const path = require('path'); -const nodeExternals = require('webpack-node-externals'); -// const configFileName = 'tsconfig.extension.json'; -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -const webpack = require('webpack'); -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); +const path = require("path"); +const nodeExternals = require("webpack-node-externals"); +const configFileName = 'tsconfig.extension.json'; +const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") + .BundleAnalyzerPlugin; +const webpack = require("webpack"); +const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); // const extensionTools = require('./build/webpack/extension'); @@ -13,12 +14,11 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); // console.log(exteranlSourceToIgnore); module.exports = { - mode: 'none', - // mode: 'production' - target: 'node', + mode: "production", + target: "node", entry: { - extension: './src/client/extension.ts', - debugAdapter: './src/client/debugger/debugAdapter/main.ts', + extension: "./src/client/extension.ts", + debugAdapter: "./src/client/debugger/debugAdapter/main.ts" // ...nodeModuleBundleEntries, // "untildifyx": "untildify" // unicode_category_Lu: './node_modules/unicode/category/Lu.js', @@ -31,8 +31,8 @@ module.exports = { // unicode_category_Nd: './node_modules/unicode/category/Nd.js', // unicode_category_Pc: './node_modules/unicode/category/Pc.js' }, - // devtool: 'source-map', - devtool: 'none', + devtool: 'source-map', + // devtool: "none", node: { __dirname: false }, @@ -47,14 +47,15 @@ module.exports = { { test: /\.ts$/, exclude: /node_modules/, - use: [{ - loader: 'ts-loader', - }, + use: [ + { + loader: "ts-loader" + } // { // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' // } ] - }, + } // { // test: /\.ts$/, // use: [ @@ -90,8 +91,8 @@ module.exports = { }, plugins: [ new BundleAnalyzerPlugin({ - analyzerMode: 'static' - }), + analyzerMode: "static" + }) // new webpack.HashedModuleIdsPlugin(), // so that file hashes don't change unexpectedly // new webpack.optimize.CommonsChunkPlugin({ // name: 'node-static', @@ -138,7 +139,9 @@ module.exports = { }, // externals: [nodeExternals(), 'vscode'], // externals: ["commonjs", "vscode"], - externals: ["vscode", + externals: [ + "vscode", + "commonjs", // "lodash", // "azure-storage", // "vscode-extension-telemetry", @@ -149,36 +152,50 @@ module.exports = { "unicode/category/Nl", "unicode/category/Mn", "unicode/category/Mc", "unicode/category/Nd", "unicode/category/Pc", + "out/unicode/category/Lu", "out/unicode/category/Ll", "out/unicode/category/Lt", + "out/unicode/category/Lo", "out/unicode/category/Lo", "out/unicode/category/Lm", + "out/unicode/category/Nl", "out/unicode/category/Mn", "out/unicode/category/Mc", + "out/unicode/category/Nd", "out/unicode/category/Pc", + + "./out/unicode/category/Lu", "./out/unicode/category/Ll", "./out/unicode/category/Lt", + "./out/unicode/category/Lo", "./out/unicode/category/Lo", "./out/unicode/category/Lm", + "./out/unicode/category/Nl", "./out/unicode/category/Mn", "./out/unicode/category/Mc", + "./out/unicode/category/Nd", "./out/unicode/category/Pc", + + "./out/unicode/category/Lu.js", "./out/unicode/category/Ll.js", "./out/unicode/category/Lt.js", + "./out/unicode/category/Lo.js", "./out/unicode/category/Lo.js", "./out/unicode/category/Lm.js", + "./out/unicode/category/Nl.js", "./out/unicode/category/Mn.js", "./out/unicode/category/Mc.js", + "./out/unicode/category/Nd.js", "./out/unicode/category/Pc.js", + // 'out/client/unicode_category_Llxyz.js', // './out/client/unicode_category_Llxyz.js', // './out/client/HELLO.js', // 'out/client/unicode_category_Lu.js', // ...exteranlSourceToIgcnore - // path.join(__dirname, 'out', 'client', 'unicode_category_Lu'), // path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), ], // externals: 'commonjs vscode', // externals: { - // vscode: "commonjs vscode lodash azure-storage unicode unicode/category" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed + // vscode: "commonjs vscode" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed // }, resolve: { - extensions: ['.ts', '.js'], + extensions: [".ts", ".js"], // plugins: [new TsconfigPathsPlugin({ configFile: configFileName })], - // alias: { - // 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', - // 'unicode/category/Lu': 'out/client/unicode_category_Lu.js', - // // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // } + alias: { + 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', + 'unicode/category/Lu': 'out/client/unicode_category_Lu.js', + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + } }, output: { // filename: 'index.js',c - filename: '[name].js', + filename: "[name].js", // chunkFilename: '[name].bundle.js', - path: path.resolve(__dirname, 'out', 'client'), + path: path.resolve(__dirname, "out", "client"), libraryTarget: "commonjs2", - + devtoolModuleFilenameTemplate: "../[resource-path]", } }; From 894a9c04aedfeb9db19d6f89195fd08c141cce94 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 13 Nov 2018 13:07:23 -0800 Subject: [PATCH 03/27] Misc --- build/webpack/externalizeSomeNodeModules.js | 28 + build/webpack/externalizeSomeNodeModules.ts | 74 ++ build/webpack/webpack.dependencies.config.js | 47 ++ build/webpack/webpack.dependencies.config.ts | 49 ++ build/webpack/webpack.extension.config.js | 154 +++++ build/webpack/webpack.extension.config.ts | 163 +++++ package-lock.json | 688 +++++++++++++++++++ package.json | 4 + tsconfig.extension.json | 27 + 9 files changed, 1234 insertions(+) create mode 100644 build/webpack/externalizeSomeNodeModules.js create mode 100644 build/webpack/externalizeSomeNodeModules.ts create mode 100644 build/webpack/webpack.dependencies.config.js create mode 100644 build/webpack/webpack.dependencies.config.ts create mode 100644 build/webpack/webpack.extension.config.js create mode 100644 build/webpack/webpack.extension.config.ts create mode 100644 tsconfig.extension.json diff --git a/build/webpack/externalizeSomeNodeModules.js b/build/webpack/externalizeSomeNodeModules.js new file mode 100644 index 000000000000..a9669169f9c9 --- /dev/null +++ b/build/webpack/externalizeSomeNodeModules.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +// tslint:disable:no-default-export no-invalid-this +function default_1(source) { + const sourcePath = this.resourcePath; + if (sourcePath.indexOf('node_modules') === -1 && sourcePath.endsWith('unicode.ts')) { + console.log('Hello'); + const x = source + .replace(/unicode\/category\//g, './unicode_category_'); + // // .replace(/\'unicode\/category\/Ll\'/g, `'./unicode_category_Ll'`) + // // .replace(/\'unicode\/category\/Lt\'/g, `'./unicode_category_Lt'`) + // // .replace(/\'unicode\/category\/Lo\'/g, `'./unicode_category_Lo'`) + // // .replace(/\'unicode\/category\/Lm\'/g, `'./unicode_category_Lm'`) + // // .replace(/\'unicode\/category\/Nl\'/g, `'./unicode_category_Nl'`) + // // .replace(/\'unicode\/category\/Nd\'/g, `'./unicode_category_Nd'`) + // // .replace(/\'unicode\/category\/Mc\'/g, `'./unicode_category_Mcc'`) + // // .replace(/\'unicode\/category\/Mn\'/g, `'./unicode_category_Mn'`) + // // .replace(/\'unicode\/category\/Pc\'/g, `'./unicode_category_Pc'`); + const fs = require('fs'); + fs.writeFileSync('/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/build/x.ts', x); + return x; + } + return source; +} +exports.default = default_1; diff --git a/build/webpack/externalizeSomeNodeModules.ts b/build/webpack/externalizeSomeNodeModules.ts new file mode 100644 index 000000000000..842e040d3f4f --- /dev/null +++ b/build/webpack/externalizeSomeNodeModules.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as path from 'path'; + +// tslint:disable:no-default-export no-invalid-this +export default function (source: string) { + const sourcePath: string = this.resourcePath; + if (sourcePath.indexOf('node_modules') === -1 && source.indexOf('unicode/category') > 0) { + const relativePathToOutClient = path.relative(sourcePath, path.join(__dirname, '..', '..', 'out', 'client')); + console.log(relativePathToOutClient); + // return source + // .replace(/\'unicode\/category\/Lu\'/g, '\'./unicode_category_Lu\'') + // .replace(/\'unicode\/category\/Ll\'/g, '\'./unicode_category_Ll\'') + // .replace(/\'unicode\/category\/Lt\'/g, '\'./unicode_category_Lt\'') + // .replace(/\'unicode\/category\/Lo\'/g, '\'./unicode_category_Lo\'') + // .replace(/\'unicode\/category\/Lm\'/g, '\'./unicode_category_Lm\'') + // .replace(/\'unicode\/category\/Nl\'/g, '\'./unicode_category_Nl\'') + // .replace(/\'unicode\/category\/Mn\'/g, '\'./unicode_category_Mn\'') + // .replace(/\'unicode\/category\/Nd\'/g, '\'./unicode_category_Nd\'') + // .replace(/\'unicode\/category\/Pc\'/g, '\'./unicode_category_Pc\''); + } + // console.log(this.resourcePath); + // const normalizedFilePath = normalizePath(this.resourcePath); + // if (normalizedFilePath.startsWith(normalizedNodeModulesPath)) { + // const options = getOptions(this) as Options; + // // console.log(options); + // const pathRelativeToNodeModules = normalizedFilePath.substring(normalizedNodeModulesPath.length + 1); + // const dirName = pathRelativeToNodeModules.split('/')[0]; + // if (options.nodeModuleBundles.has(pathRelativeToNodeModules) && this.resourcePath.indexOf(dirName) === -1) { + // const bundleModule = options.nodeModuleBundles.get(pathRelativeToNodeModules); + // const name = Array.isArray(bundleModule) ? bundleModule[0] : bundleModule; + // const defaultSuffix = Array.isArray(bundleModule) ? '.default' : ''; + // // return `export require('${name}')${defaultSuffix};`; + // return ` + // function __export(m) { + // for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + // } + // __export(require('${name}')); + // `; + // } + // // console.log(this.resourcePath); + // console.log(`${pathRelativeToNodeModules} in ${this.resourcePath}`); + // // console.log('Failed'); + // } + return source; +} + +// // import { getOptions } from 'loader-utils'; +// // import validateOptions from 'schema-utils'; +// // const schema = { +// // type: 'object', +// // properties: { +// // test: { +// // type: 'string' +// // } +// // } +// // }; +// // tslint:disable-next-line:no-default-export +// export default function (source) { +// // const options = getOptions(this); +// // validateOptions(schema, options, 'Example Loader'); +// // Apply some transformations to the source... +// const obj = { one: 1 }; +// if (this.resourcePath.endsWith('node_modules/unicode/category/Nl.js') || +// this.resourcePath.endsWith('node_modules/unicode/category/Lo.js')) { +// console.log('this.resourcePath'); +// console.log(this.resourcePath); +// return `const x = require('out/client/unicode_category_Llxyz.js');\nexport default x;`; +// } +// return source; +// }; diff --git a/build/webpack/webpack.dependencies.config.js b/build/webpack/webpack.dependencies.config.js new file mode 100644 index 000000000000..ad01ade122b9 --- /dev/null +++ b/build/webpack/webpack.dependencies.config.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +// tslint:disable-next-line:no-default-export +exports.default = { + mode: 'production', + target: 'node', + entry: { + unicode_category_Lu: './node_modules/unicode/category/Lu.js', + unicode_category_Ll: './node_modules/unicode/category/Ll.js', + unicode_category_Lt: './node_modules/unicode/category/Lt.js', + unicode_category_Lo: './node_modules/unicode/category/Lo.js', + unicode_category_Nl: './node_modules/unicode/category/Nl.js', + unicode_category_Mn: './node_modules/unicode/category/Mn.js', + unicode_category_Mc: './node_modules/unicode/category/Mc.js', + unicode_category_Nd: './node_modules/unicode/category/Nd.js', + unicode_category_Pc: './node_modules/unicode/category/Pc.js' + }, + devtool: 'none', + node: { + __dirname: false + }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + ] + } + ] + }, + resolve: { + extensions: ['.ts', '.js'] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../[resource-path]' + } +}; diff --git a/build/webpack/webpack.dependencies.config.ts b/build/webpack/webpack.dependencies.config.ts new file mode 100644 index 000000000000..09dc3d42a240 --- /dev/null +++ b/build/webpack/webpack.dependencies.config.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as path from 'path'; + +// tslint:disable-next-line:no-default-export +export default { + mode: 'production', + target: 'node', + entry: { + unicode_category_Lu: './node_modules/unicode/category/Lu.js', + unicode_category_Ll: './node_modules/unicode/category/Ll.js', + unicode_category_Lt: './node_modules/unicode/category/Lt.js', + unicode_category_Lo: './node_modules/unicode/category/Lo.js', + unicode_category_Nl: './node_modules/unicode/category/Nl.js', + unicode_category_Mn: './node_modules/unicode/category/Mn.js', + unicode_category_Mc: './node_modules/unicode/category/Mc.js', + unicode_category_Nd: './node_modules/unicode/category/Nd.js', + unicode_category_Pc: './node_modules/unicode/category/Pc.js' + }, + devtool: 'none', // Using 'source-map' causes issues when building the bundle. + node: { + __dirname: false + }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + ] + } + ] + }, + resolve: { + extensions: ['.ts', '.js'] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../[resource-path]' + } +}; diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js new file mode 100644 index 000000000000..a9422172af0b --- /dev/null +++ b/build/webpack/webpack.extension.config.js @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); +const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); +const configFileName = 'tsconfig.extension.json'; +const config = { + mode: 'production', + target: 'node', + entry: { + extension: './src/client/extension.ts', + debugAdapter: './src/client/debugger/debugAdapter/main.ts', + unicode_category_Lu: './node_modules/unicode/category/Lu.js', + unicode_category_Ll: './node_modules/unicode/category/Ll.js', + unicode_category_Lt: './node_modules/unicode/category/Lt.js', + unicode_category_Lo: './node_modules/unicode/category/Lo.js', + unicode_category_Nl: './node_modules/unicode/category/Nl.js', + unicode_category_Mn: './node_modules/unicode/category/Mn.js', + unicode_category_Mcc: './node_modules/unicode/category/Mc.js', + unicode_category_Nd: './node_modules/unicode/category/Nd.js', + unicode_category_Pc: './node_modules/unicode/category/Pc.js' + }, + // devtool: 'source-map', + devtool: false, + node: { + __dirname: false + }, + // resolveLoader: { + // alias: { + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // } + // }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + // { + // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' + // } + ] + } + // { + // test: /\.ts$/, + // use: [ + // { + // loader: './build/webpack/externalSourceLoader.js', + // options: exteranlSourceLoaderOptions + // }] + // }, + // { + // test: /\.ts$/, + // use: { + // loader: 'awesome-typescript-loader', + // options: { + // configFileName, + // reportFiles: [ + // 'src/datascience-ui/**/*.{ts,tsx}' + // ] + // }, + // } + // }, + // { + // test: /\.json$/, + // type: 'javascript/auto', + // include: /node_modules.*remark.*/, + // use: [ + // { + // loader: path.resolve('./build/datascience/jsonloader.js'), + // options: {} + // } + // ] + // } + ] + }, + plugins: [ + new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ + analyzerMode: 'static' + }) + ], + externals: [ + 'vscode', + 'commonjs', + 'unicode/category/Lu', + 'unicode/category/Ll', + 'unicode/category/Lt', + 'unicode/category/Lo', + 'unicode/category/Lo', + 'unicode/category/Lm', + 'unicode/category/Nl', + 'unicode/category/Mn', + 'unicode/category/Mc', + 'unicode/category/Nd', + 'unicode/category/Pc', + 'out/unicode/category/Lu', + 'out/unicode/category/Ll', + 'out/unicode/category/Lt', + 'out/unicode/category/Lo', + 'out/unicode/category/Lo', + 'out/unicode/category/Lm', + 'out/unicode/category/Nl', + 'out/unicode/category/Mn', + 'out/unicode/category/Mc', + 'out/unicode/category/Nd', + 'out/unicode/category/Pc', + './out/unicode/category/Lu', + './out/unicode/category/Ll', + './out/unicode/category/Lt', + './out/unicode/category/Lo', + './out/unicode/category/Lo', + './out/unicode/category/Lm', + './out/unicode/category/Nl', + './out/unicode/category/Mn', + './out/unicode/category/Mc', + './out/unicode/category/Nd', + './out/unicode/category/Pc', + './out/unicode/category/Lu.js', + './out/unicode/category/Ll.js', + './out/unicode/category/Lt.js', + './out/unicode/category/Lo.js', + './out/unicode/category/Lo.js', + './out/unicode/category/Lm.js', + './out/unicode/category/Nl.js', + './out/unicode/category/Mn.js', + './out/unicode/category/Mc.js', + './out/unicode/category/Nd.js', + './out/unicode/category/Pc.js' + ], + resolve: { + extensions: ['.ts', '.js'], + plugins: [new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({ configFile: configFileName })], + alias: { + 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', + 'unicode/category/Lu': 'out/client/unicode_category_Lu.js' + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + } + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../[resource-path]' + } +}; +// tslint:disable-next-line:no-default-export +exports.default = config; diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts new file mode 100644 index 000000000000..276f110ad3ab --- /dev/null +++ b/build/webpack/webpack.extension.config.ts @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as path from 'path'; +import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; +import * as webpack from 'webpack'; +import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; + +const configFileName = 'tsconfig.extension.json'; + +const config: webpack.Configuration = { + mode: 'production', + target: 'node', + entry: { + extension: './src/client/extension.ts', + debugAdapter: './src/client/debugger/debugAdapter/main.ts', + unicode_category_Lu: './node_modules/unicode/category/Lu.js', + unicode_category_Ll: './node_modules/unicode/category/Ll.js', + unicode_category_Lt: './node_modules/unicode/category/Lt.js', + unicode_category_Lo: './node_modules/unicode/category/Lo.js', + unicode_category_Nl: './node_modules/unicode/category/Nl.js', + unicode_category_Mn: './node_modules/unicode/category/Mn.js', + unicode_category_Mcc: './node_modules/unicode/category/Mc.js', + unicode_category_Nd: './node_modules/unicode/category/Nd.js', + unicode_category_Pc: './node_modules/unicode/category/Pc.js' + }, + // devtool: 'source-map', + devtool: false, + node: { + __dirname: false + }, + // resolveLoader: { + // alias: { + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // } + // }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + // { + // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' + // } + ] + } + // { + // test: /\.ts$/, + // use: [ + // { + // loader: './build/webpack/externalSourceLoader.js', + // options: exteranlSourceLoaderOptions + // }] + // }, + // { + // test: /\.ts$/, + // use: { + // loader: 'awesome-typescript-loader', + // options: { + // configFileName, + // reportFiles: [ + // 'src/datascience-ui/**/*.{ts,tsx}' + // ] + // }, + // } + // }, + // { + // test: /\.json$/, + // type: 'javascript/auto', + // include: /node_modules.*remark.*/, + // use: [ + // { + // loader: path.resolve('./build/datascience/jsonloader.js'), + // options: {} + // } + // ] + // } + ] + }, + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static' + }) + ], + externals: [ + 'vscode', + 'commonjs', + + 'unicode/category/Lu', + 'unicode/category/Ll', + 'unicode/category/Lt', + 'unicode/category/Lo', + 'unicode/category/Lo', + 'unicode/category/Lm', + 'unicode/category/Nl', + 'unicode/category/Mn', + 'unicode/category/Mc', + 'unicode/category/Nd', + 'unicode/category/Pc', + + 'out/unicode/category/Lu', + 'out/unicode/category/Ll', + 'out/unicode/category/Lt', + 'out/unicode/category/Lo', + 'out/unicode/category/Lo', + 'out/unicode/category/Lm', + 'out/unicode/category/Nl', + 'out/unicode/category/Mn', + 'out/unicode/category/Mc', + 'out/unicode/category/Nd', + 'out/unicode/category/Pc', + + './out/unicode/category/Lu', + './out/unicode/category/Ll', + './out/unicode/category/Lt', + './out/unicode/category/Lo', + './out/unicode/category/Lo', + './out/unicode/category/Lm', + './out/unicode/category/Nl', + './out/unicode/category/Mn', + './out/unicode/category/Mc', + './out/unicode/category/Nd', + './out/unicode/category/Pc', + + './out/unicode/category/Lu.js', + './out/unicode/category/Ll.js', + './out/unicode/category/Lt.js', + './out/unicode/category/Lo.js', + './out/unicode/category/Lo.js', + './out/unicode/category/Lm.js', + './out/unicode/category/Nl.js', + './out/unicode/category/Mn.js', + './out/unicode/category/Mc.js', + './out/unicode/category/Nd.js', + './out/unicode/category/Pc.js' + ], + resolve: { + extensions: ['.ts', '.js'], + plugins: [new TsconfigPathsPlugin({ configFile: configFileName })], + alias: { + 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', + 'unicode/category/Lu': 'out/client/unicode_category_Lu.js' + // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), + } + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../[resource-path]' + } +}; + +// tslint:disable-next-line:no-default-export +export default config; diff --git a/package-lock.json b/package-lock.json index 92b44a77f158..11d9bd4a6480 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1263,6 +1263,12 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, + "@types/anymatch": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.0.tgz", + "integrity": "sha512-7WcbyctkE8GTzogDb0ulRAEw7v8oIS54ft9mQTU7PfM0hp5e+8kpa+HeQ7IQrFbKtJXBKcZ4bh+Em9dTw5L6AQ==", + "dev": true + }, "@types/caseless": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", @@ -1459,6 +1465,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "http://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/lodash": { "version": "4.14.109", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.109.tgz", @@ -1569,6 +1581,12 @@ "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", "dev": true }, + "@types/tapable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", + "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", + "dev": true + }, "@types/temp": { "version": "0.8.32", "resolved": "https://registry.npmjs.org/@types/temp/-/temp-0.8.32.tgz", @@ -1590,6 +1608,23 @@ "integrity": "sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ==", "dev": true }, + "@types/uglify-js": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz", + "integrity": "sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "@types/untildify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/untildify/-/untildify-3.0.0.tgz", @@ -1605,6 +1640,36 @@ "@types/node": "*" } }, + "@types/webpack": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.19.tgz", + "integrity": "sha512-vO/PuQ9iF9Gy8spN8RUUjt5reu9Z+Tb7iWxeAopCmXaIZaIsOgtY5U6UE2ELlcRUBO1HbNWhy+lQE9G92IJcmQ==", + "dev": true, + "requires": { + "@types/anymatch": "*", + "@types/node": "*", + "@types/tapable": "*", + "@types/uglify-js": "*", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@types/webpack-bundle-analyzer": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.0.tgz", + "integrity": "sha512-+qy5xatScNZW4NbIVaiV38XOeHbKRa4FIPeMf2VDpZEon9W/cxjaVR080vRrRGvfq4tRvOusTEypSMxTvjcSzw==", + "dev": true, + "requires": { + "@types/webpack": "*" + } + }, "@types/winreg": { "version": "1.2.30", "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", @@ -1826,6 +1891,16 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, "acorn": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", @@ -2218,6 +2293,12 @@ "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -2882,6 +2963,18 @@ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", "dev": true }, + "bfj": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", + "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "check-types": "^7.3.0", + "hoopy": "^0.1.2", + "tryer": "^1.0.0" + } + }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -2963,6 +3056,35 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -3179,6 +3301,12 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, "cacache": { "version": "10.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", @@ -3378,6 +3506,12 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "check-types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", + "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", + "dev": true + }, "cheerio": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", @@ -3870,12 +4004,30 @@ "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -4832,6 +4984,12 @@ "dev": true, "optional": true }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -4842,6 +5000,12 @@ "minimalistic-assert": "^1.0.0" } }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -5168,6 +5332,18 @@ } } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, "electron-to-chromium": { "version": "1.3.71", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.71.tgz", @@ -5205,6 +5381,12 @@ "create-emotion": "^9.2.12" } }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -5392,6 +5574,12 @@ "integrity": "sha1-Nc5Rp5YO/LWui7Wbg/VmqYyUbf0=", "dev": true }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -5475,6 +5663,12 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -5632,6 +5826,44 @@ "homedir-polyfill": "^1.0.1" } }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -5927,6 +6159,21 @@ } } }, + "finalhandler": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", @@ -6045,6 +6292,12 @@ "mime-types": "^2.1.12" } }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -6053,6 +6306,12 @@ "map-cache": "^0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, "from": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", @@ -8641,6 +8900,12 @@ "parse-passwd": "^1.0.0" } }, + "hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true + }, "hosted-git-info": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", @@ -8744,6 +9009,18 @@ "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, "http-parser-js": { "version": "0.4.13", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", @@ -9140,6 +9417,12 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", + "dev": true + }, "is": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", @@ -10632,6 +10915,12 @@ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", "dev": true }, + "media-typer": { + "version": "0.3.0", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, "mem": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", @@ -10675,6 +10964,12 @@ "readable-stream": "^2.0.1" } }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, "merge-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", @@ -10684,6 +10979,12 @@ "readable-stream": "^2.0.1" } }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -11026,6 +11327,12 @@ "semver": "^5.4.1" } }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, "neo-async": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", @@ -11477,6 +11784,15 @@ "has": "^1.0.1" } }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -11494,6 +11810,12 @@ "mimic-fn": "^1.0.0" } }, + "opener": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "dev": true + }, "opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -11825,6 +12147,12 @@ "@types/node": "*" } }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -11894,6 +12222,12 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -12275,6 +12609,16 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -12459,6 +12803,35 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "raw-loader": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", @@ -13497,12 +13870,53 @@ "sver-compat": "^1.5.0" } }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + } + } + }, "serialize-javascript": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", "dev": true }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -13542,6 +13956,12 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, "sha.js": { "version": "2.4.11", "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -13912,6 +14332,12 @@ } } }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -14094,6 +14520,12 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-bom-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", @@ -14679,6 +15111,62 @@ "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", "dev": true }, + "tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true + }, + "ts-loader": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.0.tgz", + "integrity": "sha512-lGSNs7szRFj/rK9T1EQuayE3QNLg6izDUxt5jpmq0RG1rU2bapAt7E7uLckLCUPeO1jwxCiet2oRaWovc53UAg==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "ts-mockito": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/ts-mockito/-/ts-mockito-2.3.1.tgz", @@ -14688,6 +15176,78 @@ "lodash": "^4.17.5" } }, + "tsconfig-paths": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz", + "integrity": "sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "tsconfig-paths-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-S/gOOPOkV8rIL4LurZ1vUdYCVgo15iX9ZMJ6wx6w2OgcpT/G4wMyHB6WM+xheSqGMrWKuxFul+aXpCju3wmj/g==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "tsconfig-paths": "^3.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "tslib": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.1.tgz", @@ -14838,6 +15398,16 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, "typed-react-markdown": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/typed-react-markdown/-/typed-react-markdown-0.1.0.tgz", @@ -15288,6 +15858,12 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -15460,6 +16036,12 @@ "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "dev": true }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -15507,6 +16089,12 @@ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -16105,6 +16693,106 @@ } } }, + "webpack-bundle-analyzer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.3.tgz", + "integrity": "sha512-naLWiRfmtH4UJgtUktRTLw6FdoZJ2RvCR9ePbwM9aRMsS/KjFerkPZG9epEvXRAw5d5oPdrs9+3p+afNjxW8Xw==", + "dev": true, + "requires": { + "acorn": "^5.7.3", + "bfj": "^6.1.1", + "chalk": "^2.4.1", + "commander": "^2.18.0", + "ejs": "^2.6.1", + "express": "^4.16.3", + "filesize": "^3.6.1", + "gzip-size": "^5.0.0", + "lodash": "^4.17.10", + "mkdirp": "^0.5.1", + "opener": "^1.5.1", + "ws": "^6.0.0" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "gzip-size": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", + "integrity": "sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "ws": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", + "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, "webpack-cli": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", diff --git a/package.json b/package.json index 7eafa0f67fad..6d2178987e0d 100644 --- a/package.json +++ b/package.json @@ -1779,6 +1779,7 @@ "@types/tmp": "0.0.33", "@types/untildify": "^3.0.0", "@types/uuid": "^3.4.3", + "@types/webpack-bundle-analyzer": "^2.13.0", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", "JSONStream": "^1.3.2", @@ -1835,7 +1836,9 @@ "style-loader": "^0.23.1", "styled-jsx": "^3.1.0", "svg-inline-loader": "^0.8.0", + "ts-loader": "^5.3.0", "ts-mockito": "^2.3.1", + "tsconfig-paths-webpack-plugin": "^3.2.0", "tslint": "^5.9.1", "tslint-eslint-rules": "^5.1.0", "tslint-microsoft-contrib": "^5.0.3", @@ -1848,6 +1851,7 @@ "vscode": "^1.1.21", "vscode-debugadapter-testsupport": "^1.27.0", "webpack": "^4.20.2", + "webpack-bundle-analyzer": "^3.0.3", "webpack-cli": "^3.1.2", "webpack-fix-default-import-plugin": "^1.0.3", "webpack-merge": "^4.1.4", diff --git a/tsconfig.extension.json b/tsconfig.extension.json new file mode 100644 index 000000000000..3df66d8a2f6c --- /dev/null +++ b/tsconfig.extension.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "target": "es6", + "outDir": "out", + "lib": [ + "es6", "dom" + ], + "jsx": "react", + "sourceMap": true, + "rootDir": "src", + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "noImplicitThis": false + // TODO: enable to ensure all code complies with strict coding standards + // , "noUnusedLocals": true + // , "noUnusedParameters": false + // , "strict": true + }, + "exclude": [ + "node_modules", + ".vscode-test", + "src/datascience-ui", + "build" + ] +} From 1ae1e8c27b1f76bc655fd9d221e2dae112b2110c Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 13 Nov 2018 13:51:34 -0800 Subject: [PATCH 04/27] Use EXTENSION_DIR instead of __dirname --- resources/defaultTheme.json | 740 ++++++++++++++++++------------------ 1 file changed, 370 insertions(+), 370 deletions(-) diff --git a/resources/defaultTheme.json b/resources/defaultTheme.json index 71c7e74ffcd2..c73f4e01b0b0 100644 --- a/resources/defaultTheme.json +++ b/resources/defaultTheme.json @@ -1,370 +1,370 @@ -{ - "$schema": "vscode://schemas/color-theme", - "name": "Embedded Light Theme", - "tokenColors": [ - { - "scope": ["meta.embedded", "source.groovy.embedded"], - "settings": { - "foreground": "#000000ff" - } - }, - { - "scope": "emphasis", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "strong", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "meta.diff.header", - "settings": { - "foreground": "#000080" - } - }, - { - "scope": "comment", - "settings": { - "foreground": "#008000" - } - }, - { - "scope": "constant.language", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": [ - "constant.numeric" - ], - "settings": { - "foreground": "#09885a" - } - }, - { - "scope": "constant.regexp", - "settings": { - "foreground": "#811f3f" - } - }, - { - "name": "css tags in selectors, xml tags", - "scope": "entity.name.tag", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "entity.name.selector", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "entity.other.attribute-name", - "settings": { - "foreground": "#ff0000" - } - }, - { - "scope": [ - "entity.other.attribute-name.class.css", - "entity.other.attribute-name.class.mixin.css", - "entity.other.attribute-name.id.css", - "entity.other.attribute-name.parent-selector.css", - "entity.other.attribute-name.pseudo-class.css", - "entity.other.attribute-name.pseudo-element.css", - "source.css.less entity.other.attribute-name.id", - "entity.other.attribute-name.attribute.scss", - "entity.other.attribute-name.scss" - ], - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "invalid", - "settings": { - "foreground": "#cd3131" - } - }, - { - "scope": "markup.underline", - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": "markup.bold", - "settings": { - "fontStyle": "bold", - "foreground": "#000080" - } - }, - { - "scope": "markup.heading", - "settings": { - "fontStyle": "bold", - "foreground": "#800000" - } - }, - { - "scope": "markup.italic", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "markup.inserted", - "settings": { - "foreground": "#09885a" - } - }, - { - "scope": "markup.deleted", - "settings": { - "foreground": "#a31515" - } - }, - { - "scope": "markup.changed", - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": [ - "punctuation.definition.quote.begin.markdown", - "punctuation.definition.list.begin.markdown" - ], - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": "markup.inline.raw", - "settings": { - "foreground": "#800000" - } - }, - { - "name": "brackets of XML/HTML tags", - "scope": "punctuation.definition.tag", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "meta.preprocessor", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "meta.preprocessor.string", - "settings": { - "foreground": "#a31515" - } - }, - { - "scope": "meta.preprocessor.numeric", - "settings": { - "foreground": "#09885a" - } - }, - { - "scope": "meta.structure.dictionary.key.python", - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": "storage", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "storage.type", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "storage.modifier", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "string", - "settings": { - "foreground": "#a31515" - } - }, - { - "scope": [ - "string.comment.buffered.block.pug", - "string.quoted.pug", - "string.interpolated.pug", - "string.unquoted.plain.in.yaml", - "string.unquoted.plain.out.yaml", - "string.unquoted.block.yaml", - "string.quoted.single.yaml", - "string.quoted.double.xml", - "string.quoted.single.xml", - "string.unquoted.cdata.xml", - "string.quoted.double.html", - "string.quoted.single.html", - "string.unquoted.html", - "string.quoted.single.handlebars", - "string.quoted.double.handlebars" - ], - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "string.regexp", - "settings": { - "foreground": "#811f3f" - } - }, - { - "name": "String interpolation", - "scope": [ - "punctuation.definition.template-expression.begin", - "punctuation.definition.template-expression.end", - "punctuation.section.embedded" - ], - "settings": { - "foreground": "#0000ff" - } - }, - { - "name": "Reset JavaScript string interpolation expression", - "scope": [ - "meta.template.expression" - ], - "settings": { - "foreground": "#000000" - } - }, - { - "scope": [ - "support.constant.property-value", - "support.constant.font-name", - "support.constant.media-type", - "support.constant.media", - "constant.other.color.rgb-value", - "constant.other.rgb-value", - "support.constant.color" - ], - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": [ - "support.type.vendored.property-name", - "support.type.property-name", - "variable.css", - "variable.scss", - "variable.other.less", - "source.coffee.embedded" - ], - "settings": { - "foreground": "#ff0000" - } - }, - { - "scope": [ - "support.type.property-name.json" - ], - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": "keyword", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "keyword.control", - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "keyword.operator", - "settings": { - "foreground": "#000000" - } - }, - { - "scope": [ - "keyword.operator.new", - "keyword.operator.expression", - "keyword.operator.cast", - "keyword.operator.sizeof", - "keyword.operator.instanceof", - "keyword.operator.logical.python" - ], - "settings": { - "foreground": "#0000ff" - } - }, - { - "scope": "keyword.other.unit", - "settings": { - "foreground": "#09885a" - } - }, - { - "scope": [ - "punctuation.section.embedded.begin.php", - "punctuation.section.embedded.end.php" - ], - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "support.function.git-rebase", - "settings": { - "foreground": "#0451a5" - } - }, - { - "scope": "constant.sha.git-rebase", - "settings": { - "foreground": "#09885a" - } - }, - { - "name": "coloring of the Java import and package identifiers", - "scope": [ - "storage.modifier.import.java", - "variable.language.wildcard.java", - "storage.modifier.package.java" - ], - "settings": { - "foreground": "#000000" - } - }, - { - "name": "this.self", - "scope": "variable.language", - "settings": { - "foreground": "#0000ff" - } - } - ] -} +{ + "$schema": "vscode://schemas/color-theme", + "name": "Embedded Light Theme", + "tokenColors": [ + { + "scope": ["meta.embedded", "source.groovy.embedded"], + "settings": { + "foreground": "#000000ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#008000" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": [ + "constant.numeric" + ], + "settings": { + "foreground": "#09885a" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "css tags in selectors, xml tags", + "scope": "entity.name.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#ff0000" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.attribute.scss", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#000080" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#800000" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#09885a" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "punctuation.definition.quote.begin.markdown", + "punctuation.definition.list.begin.markdown" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#800000" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#09885a" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": [ + "string.comment.buffered.block.pug", + "string.quoted.pug", + "string.interpolated.pug", + "string.unquoted.plain.in.yaml", + "string.unquoted.plain.out.yaml", + "string.unquoted.block.yaml", + "string.quoted.single.yaml", + "string.quoted.double.xml", + "string.quoted.single.xml", + "string.unquoted.cdata.xml", + "string.quoted.double.html", + "string.quoted.single.html", + "string.unquoted.html", + "string.quoted.single.handlebars", + "string.quoted.double.handlebars" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#ff0000" + } + }, + { + "scope": [ + "support.type.property-name.json" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.instanceof", + "keyword.operator.logical.python" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#09885a" + } + }, + { + "scope": [ + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" + ], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#09885a" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#0000ff" + } + } + ] +} From 8bde9fa335c0ddd23282b91c2aa40959004fef4a Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 13 Nov 2018 14:19:17 -0800 Subject: [PATCH 05/27] Remove unwanted files --- build/webpack/externalizeSomeNodeModules.js | 28 --- build/webpack/externalizeSomeNodeModules.ts | 74 ------- build/webpack/webpack.dependencies.config.js | 47 ----- build/webpack/webpack.dependencies.config.ts | 49 ----- build/webpack/webpack.extension.config.js | 154 -------------- build/webpack/webpack.extension.config.ts | 163 --------------- tsconfig.extension.json | 27 --- webpack.extension.config.js | 201 ------------------- 8 files changed, 743 deletions(-) delete mode 100644 build/webpack/externalizeSomeNodeModules.js delete mode 100644 build/webpack/externalizeSomeNodeModules.ts delete mode 100644 build/webpack/webpack.dependencies.config.js delete mode 100644 build/webpack/webpack.dependencies.config.ts delete mode 100644 build/webpack/webpack.extension.config.js delete mode 100644 build/webpack/webpack.extension.config.ts delete mode 100644 tsconfig.extension.json delete mode 100644 webpack.extension.config.js diff --git a/build/webpack/externalizeSomeNodeModules.js b/build/webpack/externalizeSomeNodeModules.js deleted file mode 100644 index a9669169f9c9..000000000000 --- a/build/webpack/externalizeSomeNodeModules.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -const path = require("path"); -// tslint:disable:no-default-export no-invalid-this -function default_1(source) { - const sourcePath = this.resourcePath; - if (sourcePath.indexOf('node_modules') === -1 && sourcePath.endsWith('unicode.ts')) { - console.log('Hello'); - const x = source - .replace(/unicode\/category\//g, './unicode_category_'); - // // .replace(/\'unicode\/category\/Ll\'/g, `'./unicode_category_Ll'`) - // // .replace(/\'unicode\/category\/Lt\'/g, `'./unicode_category_Lt'`) - // // .replace(/\'unicode\/category\/Lo\'/g, `'./unicode_category_Lo'`) - // // .replace(/\'unicode\/category\/Lm\'/g, `'./unicode_category_Lm'`) - // // .replace(/\'unicode\/category\/Nl\'/g, `'./unicode_category_Nl'`) - // // .replace(/\'unicode\/category\/Nd\'/g, `'./unicode_category_Nd'`) - // // .replace(/\'unicode\/category\/Mc\'/g, `'./unicode_category_Mcc'`) - // // .replace(/\'unicode\/category\/Mn\'/g, `'./unicode_category_Mn'`) - // // .replace(/\'unicode\/category\/Pc\'/g, `'./unicode_category_Pc'`); - const fs = require('fs'); - fs.writeFileSync('/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/build/x.ts', x); - return x; - } - return source; -} -exports.default = default_1; diff --git a/build/webpack/externalizeSomeNodeModules.ts b/build/webpack/externalizeSomeNodeModules.ts deleted file mode 100644 index 842e040d3f4f..000000000000 --- a/build/webpack/externalizeSomeNodeModules.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -'use strict'; - -import * as path from 'path'; - -// tslint:disable:no-default-export no-invalid-this -export default function (source: string) { - const sourcePath: string = this.resourcePath; - if (sourcePath.indexOf('node_modules') === -1 && source.indexOf('unicode/category') > 0) { - const relativePathToOutClient = path.relative(sourcePath, path.join(__dirname, '..', '..', 'out', 'client')); - console.log(relativePathToOutClient); - // return source - // .replace(/\'unicode\/category\/Lu\'/g, '\'./unicode_category_Lu\'') - // .replace(/\'unicode\/category\/Ll\'/g, '\'./unicode_category_Ll\'') - // .replace(/\'unicode\/category\/Lt\'/g, '\'./unicode_category_Lt\'') - // .replace(/\'unicode\/category\/Lo\'/g, '\'./unicode_category_Lo\'') - // .replace(/\'unicode\/category\/Lm\'/g, '\'./unicode_category_Lm\'') - // .replace(/\'unicode\/category\/Nl\'/g, '\'./unicode_category_Nl\'') - // .replace(/\'unicode\/category\/Mn\'/g, '\'./unicode_category_Mn\'') - // .replace(/\'unicode\/category\/Nd\'/g, '\'./unicode_category_Nd\'') - // .replace(/\'unicode\/category\/Pc\'/g, '\'./unicode_category_Pc\''); - } - // console.log(this.resourcePath); - // const normalizedFilePath = normalizePath(this.resourcePath); - // if (normalizedFilePath.startsWith(normalizedNodeModulesPath)) { - // const options = getOptions(this) as Options; - // // console.log(options); - // const pathRelativeToNodeModules = normalizedFilePath.substring(normalizedNodeModulesPath.length + 1); - // const dirName = pathRelativeToNodeModules.split('/')[0]; - // if (options.nodeModuleBundles.has(pathRelativeToNodeModules) && this.resourcePath.indexOf(dirName) === -1) { - // const bundleModule = options.nodeModuleBundles.get(pathRelativeToNodeModules); - // const name = Array.isArray(bundleModule) ? bundleModule[0] : bundleModule; - // const defaultSuffix = Array.isArray(bundleModule) ? '.default' : ''; - // // return `export require('${name}')${defaultSuffix};`; - // return ` - // function __export(m) { - // for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - // } - // __export(require('${name}')); - // `; - // } - // // console.log(this.resourcePath); - // console.log(`${pathRelativeToNodeModules} in ${this.resourcePath}`); - // // console.log('Failed'); - // } - return source; -} - -// // import { getOptions } from 'loader-utils'; -// // import validateOptions from 'schema-utils'; -// // const schema = { -// // type: 'object', -// // properties: { -// // test: { -// // type: 'string' -// // } -// // } -// // }; -// // tslint:disable-next-line:no-default-export -// export default function (source) { -// // const options = getOptions(this); -// // validateOptions(schema, options, 'Example Loader'); -// // Apply some transformations to the source... -// const obj = { one: 1 }; -// if (this.resourcePath.endsWith('node_modules/unicode/category/Nl.js') || -// this.resourcePath.endsWith('node_modules/unicode/category/Lo.js')) { -// console.log('this.resourcePath'); -// console.log(this.resourcePath); -// return `const x = require('out/client/unicode_category_Llxyz.js');\nexport default x;`; -// } -// return source; -// }; diff --git a/build/webpack/webpack.dependencies.config.js b/build/webpack/webpack.dependencies.config.js deleted file mode 100644 index ad01ade122b9..000000000000 --- a/build/webpack/webpack.dependencies.config.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -const path = require("path"); -// tslint:disable-next-line:no-default-export -exports.default = { - mode: 'production', - target: 'node', - entry: { - unicode_category_Lu: './node_modules/unicode/category/Lu.js', - unicode_category_Ll: './node_modules/unicode/category/Ll.js', - unicode_category_Lt: './node_modules/unicode/category/Lt.js', - unicode_category_Lo: './node_modules/unicode/category/Lo.js', - unicode_category_Nl: './node_modules/unicode/category/Nl.js', - unicode_category_Mn: './node_modules/unicode/category/Mn.js', - unicode_category_Mc: './node_modules/unicode/category/Mc.js', - unicode_category_Nd: './node_modules/unicode/category/Nd.js', - unicode_category_Pc: './node_modules/unicode/category/Pc.js' - }, - devtool: 'none', - node: { - __dirname: false - }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } - ] - } - ] - }, - resolve: { - extensions: ['.ts', '.js'] - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), - libraryTarget: 'commonjs2', - devtoolModuleFilenameTemplate: '../[resource-path]' - } -}; diff --git a/build/webpack/webpack.dependencies.config.ts b/build/webpack/webpack.dependencies.config.ts deleted file mode 100644 index 09dc3d42a240..000000000000 --- a/build/webpack/webpack.dependencies.config.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -'use strict'; - -import * as path from 'path'; - -// tslint:disable-next-line:no-default-export -export default { - mode: 'production', - target: 'node', - entry: { - unicode_category_Lu: './node_modules/unicode/category/Lu.js', - unicode_category_Ll: './node_modules/unicode/category/Ll.js', - unicode_category_Lt: './node_modules/unicode/category/Lt.js', - unicode_category_Lo: './node_modules/unicode/category/Lo.js', - unicode_category_Nl: './node_modules/unicode/category/Nl.js', - unicode_category_Mn: './node_modules/unicode/category/Mn.js', - unicode_category_Mc: './node_modules/unicode/category/Mc.js', - unicode_category_Nd: './node_modules/unicode/category/Nd.js', - unicode_category_Pc: './node_modules/unicode/category/Pc.js' - }, - devtool: 'none', // Using 'source-map' causes issues when building the bundle. - node: { - __dirname: false - }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } - ] - } - ] - }, - resolve: { - extensions: ['.ts', '.js'] - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), - libraryTarget: 'commonjs2', - devtoolModuleFilenameTemplate: '../[resource-path]' - } -}; diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js deleted file mode 100644 index a9422172af0b..000000000000 --- a/build/webpack/webpack.extension.config.js +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -const path = require("path"); -const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); -const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); -const configFileName = 'tsconfig.extension.json'; -const config = { - mode: 'production', - target: 'node', - entry: { - extension: './src/client/extension.ts', - debugAdapter: './src/client/debugger/debugAdapter/main.ts', - unicode_category_Lu: './node_modules/unicode/category/Lu.js', - unicode_category_Ll: './node_modules/unicode/category/Ll.js', - unicode_category_Lt: './node_modules/unicode/category/Lt.js', - unicode_category_Lo: './node_modules/unicode/category/Lo.js', - unicode_category_Nl: './node_modules/unicode/category/Nl.js', - unicode_category_Mn: './node_modules/unicode/category/Mn.js', - unicode_category_Mcc: './node_modules/unicode/category/Mc.js', - unicode_category_Nd: './node_modules/unicode/category/Nd.js', - unicode_category_Pc: './node_modules/unicode/category/Pc.js' - }, - // devtool: 'source-map', - devtool: false, - node: { - __dirname: false - }, - // resolveLoader: { - // alias: { - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // } - // }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } - // { - // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' - // } - ] - } - // { - // test: /\.ts$/, - // use: [ - // { - // loader: './build/webpack/externalSourceLoader.js', - // options: exteranlSourceLoaderOptions - // }] - // }, - // { - // test: /\.ts$/, - // use: { - // loader: 'awesome-typescript-loader', - // options: { - // configFileName, - // reportFiles: [ - // 'src/datascience-ui/**/*.{ts,tsx}' - // ] - // }, - // } - // }, - // { - // test: /\.json$/, - // type: 'javascript/auto', - // include: /node_modules.*remark.*/, - // use: [ - // { - // loader: path.resolve('./build/datascience/jsonloader.js'), - // options: {} - // } - // ] - // } - ] - }, - plugins: [ - new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ - analyzerMode: 'static' - }) - ], - externals: [ - 'vscode', - 'commonjs', - 'unicode/category/Lu', - 'unicode/category/Ll', - 'unicode/category/Lt', - 'unicode/category/Lo', - 'unicode/category/Lo', - 'unicode/category/Lm', - 'unicode/category/Nl', - 'unicode/category/Mn', - 'unicode/category/Mc', - 'unicode/category/Nd', - 'unicode/category/Pc', - 'out/unicode/category/Lu', - 'out/unicode/category/Ll', - 'out/unicode/category/Lt', - 'out/unicode/category/Lo', - 'out/unicode/category/Lo', - 'out/unicode/category/Lm', - 'out/unicode/category/Nl', - 'out/unicode/category/Mn', - 'out/unicode/category/Mc', - 'out/unicode/category/Nd', - 'out/unicode/category/Pc', - './out/unicode/category/Lu', - './out/unicode/category/Ll', - './out/unicode/category/Lt', - './out/unicode/category/Lo', - './out/unicode/category/Lo', - './out/unicode/category/Lm', - './out/unicode/category/Nl', - './out/unicode/category/Mn', - './out/unicode/category/Mc', - './out/unicode/category/Nd', - './out/unicode/category/Pc', - './out/unicode/category/Lu.js', - './out/unicode/category/Ll.js', - './out/unicode/category/Lt.js', - './out/unicode/category/Lo.js', - './out/unicode/category/Lo.js', - './out/unicode/category/Lm.js', - './out/unicode/category/Nl.js', - './out/unicode/category/Mn.js', - './out/unicode/category/Mc.js', - './out/unicode/category/Nd.js', - './out/unicode/category/Pc.js' - ], - resolve: { - extensions: ['.ts', '.js'], - plugins: [new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({ configFile: configFileName })], - alias: { - 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', - 'unicode/category/Lu': 'out/client/unicode_category_Lu.js' - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - } - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), - libraryTarget: 'commonjs2', - devtoolModuleFilenameTemplate: '../[resource-path]' - } -}; -// tslint:disable-next-line:no-default-export -exports.default = config; diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts deleted file mode 100644 index 276f110ad3ab..000000000000 --- a/build/webpack/webpack.extension.config.ts +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -'use strict'; - -import * as path from 'path'; -import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; -import * as webpack from 'webpack'; -import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; - -const configFileName = 'tsconfig.extension.json'; - -const config: webpack.Configuration = { - mode: 'production', - target: 'node', - entry: { - extension: './src/client/extension.ts', - debugAdapter: './src/client/debugger/debugAdapter/main.ts', - unicode_category_Lu: './node_modules/unicode/category/Lu.js', - unicode_category_Ll: './node_modules/unicode/category/Ll.js', - unicode_category_Lt: './node_modules/unicode/category/Lt.js', - unicode_category_Lo: './node_modules/unicode/category/Lo.js', - unicode_category_Nl: './node_modules/unicode/category/Nl.js', - unicode_category_Mn: './node_modules/unicode/category/Mn.js', - unicode_category_Mcc: './node_modules/unicode/category/Mc.js', - unicode_category_Nd: './node_modules/unicode/category/Nd.js', - unicode_category_Pc: './node_modules/unicode/category/Pc.js' - }, - // devtool: 'source-map', - devtool: false, - node: { - __dirname: false - }, - // resolveLoader: { - // alias: { - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // } - // }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } - // { - // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' - // } - ] - } - // { - // test: /\.ts$/, - // use: [ - // { - // loader: './build/webpack/externalSourceLoader.js', - // options: exteranlSourceLoaderOptions - // }] - // }, - // { - // test: /\.ts$/, - // use: { - // loader: 'awesome-typescript-loader', - // options: { - // configFileName, - // reportFiles: [ - // 'src/datascience-ui/**/*.{ts,tsx}' - // ] - // }, - // } - // }, - // { - // test: /\.json$/, - // type: 'javascript/auto', - // include: /node_modules.*remark.*/, - // use: [ - // { - // loader: path.resolve('./build/datascience/jsonloader.js'), - // options: {} - // } - // ] - // } - ] - }, - plugins: [ - new BundleAnalyzerPlugin({ - analyzerMode: 'static' - }) - ], - externals: [ - 'vscode', - 'commonjs', - - 'unicode/category/Lu', - 'unicode/category/Ll', - 'unicode/category/Lt', - 'unicode/category/Lo', - 'unicode/category/Lo', - 'unicode/category/Lm', - 'unicode/category/Nl', - 'unicode/category/Mn', - 'unicode/category/Mc', - 'unicode/category/Nd', - 'unicode/category/Pc', - - 'out/unicode/category/Lu', - 'out/unicode/category/Ll', - 'out/unicode/category/Lt', - 'out/unicode/category/Lo', - 'out/unicode/category/Lo', - 'out/unicode/category/Lm', - 'out/unicode/category/Nl', - 'out/unicode/category/Mn', - 'out/unicode/category/Mc', - 'out/unicode/category/Nd', - 'out/unicode/category/Pc', - - './out/unicode/category/Lu', - './out/unicode/category/Ll', - './out/unicode/category/Lt', - './out/unicode/category/Lo', - './out/unicode/category/Lo', - './out/unicode/category/Lm', - './out/unicode/category/Nl', - './out/unicode/category/Mn', - './out/unicode/category/Mc', - './out/unicode/category/Nd', - './out/unicode/category/Pc', - - './out/unicode/category/Lu.js', - './out/unicode/category/Ll.js', - './out/unicode/category/Lt.js', - './out/unicode/category/Lo.js', - './out/unicode/category/Lo.js', - './out/unicode/category/Lm.js', - './out/unicode/category/Nl.js', - './out/unicode/category/Mn.js', - './out/unicode/category/Mc.js', - './out/unicode/category/Nd.js', - './out/unicode/category/Pc.js' - ], - resolve: { - extensions: ['.ts', '.js'], - plugins: [new TsconfigPathsPlugin({ configFile: configFileName })], - alias: { - 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', - 'unicode/category/Lu': 'out/client/unicode_category_Lu.js' - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - } - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), - libraryTarget: 'commonjs2', - devtoolModuleFilenameTemplate: '../[resource-path]' - } -}; - -// tslint:disable-next-line:no-default-export -export default config; diff --git a/tsconfig.extension.json b/tsconfig.extension.json deleted file mode 100644 index 3df66d8a2f6c..000000000000 --- a/tsconfig.extension.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "module": "commonjs", - "target": "es6", - "outDir": "out", - "lib": [ - "es6", "dom" - ], - "jsx": "react", - "sourceMap": true, - "rootDir": "src", - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "noImplicitThis": false - // TODO: enable to ensure all code complies with strict coding standards - // , "noUnusedLocals": true - // , "noUnusedParameters": false - // , "strict": true - }, - "exclude": [ - "node_modules", - ".vscode-test", - "src/datascience-ui", - "build" - ] -} diff --git a/webpack.extension.config.js b/webpack.extension.config.js deleted file mode 100644 index 702e32a7b234..000000000000 --- a/webpack.extension.config.js +++ /dev/null @@ -1,201 +0,0 @@ -const path = require("path"); -const nodeExternals = require("webpack-node-externals"); -const configFileName = 'tsconfig.extension.json'; -const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") - .BundleAnalyzerPlugin; -const webpack = require("webpack"); -const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); - -// const extensionTools = require('./build/webpack/extension'); - -// const nodeModuleBundleEntries = extensionTools.getNodeModuleBunleEntries(); -// const exteranlSourceLoaderOptions = extensionTools.getExternalSourceLoaderOptions(); -// const exteranlSourceToIgnore = extensionTools.getExternalSourcesToIgnore(); - -// console.log(exteranlSourceToIgnore); -module.exports = { - mode: "production", - target: "node", - entry: { - extension: "./src/client/extension.ts", - debugAdapter: "./src/client/debugger/debugAdapter/main.ts" - // ...nodeModuleBundleEntries, - // "untildifyx": "untildify" - // unicode_category_Lu: './node_modules/unicode/category/Lu.js', - // unicode_category_Ll: './node_modules/unicode/category/Ll.js', - // unicode_category_Lt: './node_modules/unicode/category/Lt.js', - // unicode_category_Lo: './node_modules/unicode/category/Lo.js', - // unicode_category_Nl: './node_modules/unicode/category/Nl.js', - // unicode_category_Mn: './node_modules/unicode/category/Mn.js', - // unicode_category_Mcc: './node_modules/unicode/category/Mc.js', - // unicode_category_Nd: './node_modules/unicode/category/Nd.js', - // unicode_category_Pc: './node_modules/unicode/category/Pc.js' - }, - devtool: 'source-map', - // devtool: "none", - node: { - __dirname: false - }, - // resolveLoader: { - // alias: { - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // } - // }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: "ts-loader" - } - // { - // loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/myloader.js' - // } - ] - } - // { - // test: /\.ts$/, - // use: [ - // { - // loader: './build/webpack/externalSourceLoader.js', - // options: exteranlSourceLoaderOptions - // }] - // }, - // { - // test: /\.ts$/, - // use: { - // loader: "awesome-typescript-loader", - // options: { - // configFileName, - // reportFiles: [ - // 'src/datascience-ui/**/*.{ts,tsx}' - // ] - // }, - // } - // }, - // { - // test: /\.json$/, - // type: 'javascript/auto', - // include: /node_modules.*remark.*/, - // use: [ - // { - // loader: path.resolve('./build/datascience/jsonloader.js'), - // options: {} - // } - // ] - // } - ] - }, - plugins: [ - new BundleAnalyzerPlugin({ - analyzerMode: "static" - }) - // new webpack.HashedModuleIdsPlugin(), // so that file hashes don't change unexpectedly - // new webpack.optimize.CommonsChunkPlugin({ - // name: 'node-static', - // filename: 'node-static.js', - // minChunks(module, count) { - // var context = module.context; - // return context && context.indexOf('node_modules') >= 0; - // }, - // }), - ], - optimization: { - // runtimeChunk: 'single', - // splitChunks: { - // cacheGroups: { - // commons: { - // test: /[\\/]node_modules[\\/]/, - // name: "vendors", - // chunks: "async" - // }, - // wow: { - // test: /[\\/]node_modules[\\/]/, - // name: "wow", - // chunks: "initial" - // } - // } - // } - // splitChunks: { - // chunks: 'all', - // maxInitialRequests: Infinity, - // minSize: 0, - // cacheGroups: { - // vendor: { - // test: /[\\/]node_modules[\\/]/, - // name(module) { - // // get the name. E.g. node_modules/packageName/not/this/part.js - // // or node_modules/packageName - // const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1]; - // // npm package names are URL-safe, but some servers don't like @ symbols - // return `npm.${packageName.replace('@', '')}`; - // } - // } - // } - // } - }, - // externals: [nodeExternals(), 'vscode'], - // externals: ["commonjs", "vscode"], - externals: [ - "vscode", - "commonjs", - // "lodash", - // "azure-storage", - // "vscode-extension-telemetry", - // "@jupyterlab/services", - // // "unicode", - "unicode/category/Lu", "unicode/category/Ll", "unicode/category/Lt", - "unicode/category/Lo", "unicode/category/Lo", "unicode/category/Lm", - "unicode/category/Nl", "unicode/category/Mn", "unicode/category/Mc", - "unicode/category/Nd", "unicode/category/Pc", - - "out/unicode/category/Lu", "out/unicode/category/Ll", "out/unicode/category/Lt", - "out/unicode/category/Lo", "out/unicode/category/Lo", "out/unicode/category/Lm", - "out/unicode/category/Nl", "out/unicode/category/Mn", "out/unicode/category/Mc", - "out/unicode/category/Nd", "out/unicode/category/Pc", - - "./out/unicode/category/Lu", "./out/unicode/category/Ll", "./out/unicode/category/Lt", - "./out/unicode/category/Lo", "./out/unicode/category/Lo", "./out/unicode/category/Lm", - "./out/unicode/category/Nl", "./out/unicode/category/Mn", "./out/unicode/category/Mc", - "./out/unicode/category/Nd", "./out/unicode/category/Pc", - - "./out/unicode/category/Lu.js", "./out/unicode/category/Ll.js", "./out/unicode/category/Lt.js", - "./out/unicode/category/Lo.js", "./out/unicode/category/Lo.js", "./out/unicode/category/Lm.js", - "./out/unicode/category/Nl.js", "./out/unicode/category/Mn.js", "./out/unicode/category/Mc.js", - "./out/unicode/category/Nd.js", "./out/unicode/category/Pc.js", - - // 'out/client/unicode_category_Llxyz.js', - // './out/client/unicode_category_Llxyz.js', - // './out/client/HELLO.js', - // 'out/client/unicode_category_Lu.js', - // ...exteranlSourceToIgcnore - - // path.join(__dirname, 'out', 'client', 'unicode_category_Lu'), - // path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - ], - // externals: 'commonjs vscode', - // externals: { - // vscode: "commonjs vscode" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed - // }, - resolve: { - extensions: [".ts", ".js"], - // plugins: [new TsconfigPathsPlugin({ configFile: configFileName })], - alias: { - 'unicode/category/Lu$': 'out/client/unicode_category_Lu.js', - 'unicode/category/Lu': 'out/client/unicode_category_Lu.js', - // 'unicode/category/Lu$': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - // 'unicode/category/Lu': path.join(__dirname, 'out', 'client', 'unicode_category_Lu.js'), - } - }, - output: { - // filename: 'index.js',c - filename: "[name].js", - // chunkFilename: '[name].bundle.js', - path: path.resolve(__dirname, "out", "client"), - libraryTarget: "commonjs2", - devtoolModuleFilenameTemplate: "../[resource-path]", - } -}; From 92783db5e7295b1332b184b32d133d3b367444e8 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 13 Nov 2018 14:21:42 -0800 Subject: [PATCH 06/27] Revert package json changes --- package-lock.json | 688 ---------------------------------------------- package.json | 4 - 2 files changed, 692 deletions(-) diff --git a/package-lock.json b/package-lock.json index 11d9bd4a6480..92b44a77f158 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1263,12 +1263,6 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, - "@types/anymatch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.0.tgz", - "integrity": "sha512-7WcbyctkE8GTzogDb0ulRAEw7v8oIS54ft9mQTU7PfM0hp5e+8kpa+HeQ7IQrFbKtJXBKcZ4bh+Em9dTw5L6AQ==", - "dev": true - }, "@types/caseless": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", @@ -1465,12 +1459,6 @@ } } }, - "@types/json5": { - "version": "0.0.29", - "resolved": "http://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, "@types/lodash": { "version": "4.14.109", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.109.tgz", @@ -1581,12 +1569,6 @@ "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", "dev": true }, - "@types/tapable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", - "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", - "dev": true - }, "@types/temp": { "version": "0.8.32", "resolved": "https://registry.npmjs.org/@types/temp/-/temp-0.8.32.tgz", @@ -1608,23 +1590,6 @@ "integrity": "sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ==", "dev": true }, - "@types/uglify-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz", - "integrity": "sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "@types/untildify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/untildify/-/untildify-3.0.0.tgz", @@ -1640,36 +1605,6 @@ "@types/node": "*" } }, - "@types/webpack": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.19.tgz", - "integrity": "sha512-vO/PuQ9iF9Gy8spN8RUUjt5reu9Z+Tb7iWxeAopCmXaIZaIsOgtY5U6UE2ELlcRUBO1HbNWhy+lQE9G92IJcmQ==", - "dev": true, - "requires": { - "@types/anymatch": "*", - "@types/node": "*", - "@types/tapable": "*", - "@types/uglify-js": "*", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@types/webpack-bundle-analyzer": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.0.tgz", - "integrity": "sha512-+qy5xatScNZW4NbIVaiV38XOeHbKRa4FIPeMf2VDpZEon9W/cxjaVR080vRrRGvfq4tRvOusTEypSMxTvjcSzw==", - "dev": true, - "requires": { - "@types/webpack": "*" - } - }, "@types/winreg": { "version": "1.2.30", "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", @@ -1891,16 +1826,6 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, "acorn": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", @@ -2293,12 +2218,6 @@ "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", "dev": true }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -2963,18 +2882,6 @@ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", "dev": true }, - "bfj": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", - "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "check-types": "^7.3.0", - "hoopy": "^0.1.2", - "tryer": "^1.0.0" - } - }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -3056,35 +2963,6 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -3301,12 +3179,6 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, "cacache": { "version": "10.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", @@ -3506,12 +3378,6 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, - "check-types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", - "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", - "dev": true - }, "cheerio": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", @@ -4004,30 +3870,12 @@ "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -4984,12 +4832,6 @@ "dev": true, "optional": true }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -5000,12 +4842,6 @@ "minimalistic-assert": "^1.0.0" } }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -5332,18 +5168,6 @@ } } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.71", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.71.tgz", @@ -5381,12 +5205,6 @@ "create-emotion": "^9.2.12" } }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -5574,12 +5392,6 @@ "integrity": "sha1-Nc5Rp5YO/LWui7Wbg/VmqYyUbf0=", "dev": true }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -5663,12 +5475,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -5826,44 +5632,6 @@ "homedir-polyfill": "^1.0.1" } }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -6159,21 +5927,6 @@ } } }, - "finalhandler": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", @@ -6292,12 +6045,6 @@ "mime-types": "^2.1.12" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -6306,12 +6053,6 @@ "map-cache": "^0.2.2" } }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, "from": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", @@ -8900,12 +8641,6 @@ "parse-passwd": "^1.0.0" } }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", - "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", - "dev": true - }, "hosted-git-info": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", @@ -9009,18 +8744,6 @@ "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, - "http-errors": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, "http-parser-js": { "version": "0.4.13", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", @@ -9417,12 +9140,6 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, "is": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", @@ -10915,12 +10632,6 @@ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", "dev": true }, - "media-typer": { - "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, "mem": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", @@ -10964,12 +10675,6 @@ "readable-stream": "^2.0.1" } }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, "merge-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", @@ -10979,12 +10684,6 @@ "readable-stream": "^2.0.1" } }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -11327,12 +11026,6 @@ "semver": "^5.4.1" } }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, "neo-async": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", @@ -11784,15 +11477,6 @@ "has": "^1.0.1" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -11810,12 +11494,6 @@ "mimic-fn": "^1.0.0" } }, - "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", - "dev": true - }, "opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -12147,12 +11825,6 @@ "@types/node": "*" } }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -12222,12 +11894,6 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -12609,16 +12275,6 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -12803,35 +12459,6 @@ "safe-buffer": "^5.1.0" } }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, "raw-loader": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", @@ -13870,53 +13497,12 @@ "sver-compat": "^1.5.0" } }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - } - } - }, "serialize-javascript": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", "dev": true }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -13956,12 +13542,6 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, "sha.js": { "version": "2.4.11", "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -14332,12 +13912,6 @@ } } }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -14520,12 +14094,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, "strip-bom-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", @@ -15111,62 +14679,6 @@ "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", "dev": true }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", - "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", - "dev": true - }, - "ts-loader": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.0.tgz", - "integrity": "sha512-lGSNs7szRFj/rK9T1EQuayE3QNLg6izDUxt5jpmq0RG1rU2bapAt7E7uLckLCUPeO1jwxCiet2oRaWovc53UAg==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "ts-mockito": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/ts-mockito/-/ts-mockito-2.3.1.tgz", @@ -15176,78 +14688,6 @@ "lodash": "^4.17.5" } }, - "tsconfig-paths": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz", - "integrity": "sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A==", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "deepmerge": "^2.0.1", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "tsconfig-paths-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.2.0.tgz", - "integrity": "sha512-S/gOOPOkV8rIL4LurZ1vUdYCVgo15iX9ZMJ6wx6w2OgcpT/G4wMyHB6WM+xheSqGMrWKuxFul+aXpCju3wmj/g==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "tsconfig-paths": "^3.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "tslib": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.1.tgz", @@ -15398,16 +14838,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, "typed-react-markdown": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/typed-react-markdown/-/typed-react-markdown-0.1.0.tgz", @@ -15858,12 +15288,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -16036,12 +15460,6 @@ "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "dev": true }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -16089,12 +15507,6 @@ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -16693,106 +16105,6 @@ } } }, - "webpack-bundle-analyzer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.3.tgz", - "integrity": "sha512-naLWiRfmtH4UJgtUktRTLw6FdoZJ2RvCR9ePbwM9aRMsS/KjFerkPZG9epEvXRAw5d5oPdrs9+3p+afNjxW8Xw==", - "dev": true, - "requires": { - "acorn": "^5.7.3", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.10", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, - "gzip-size": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", - "integrity": "sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^3.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "ws": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", - "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, "webpack-cli": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", diff --git a/package.json b/package.json index 6d2178987e0d..7eafa0f67fad 100644 --- a/package.json +++ b/package.json @@ -1779,7 +1779,6 @@ "@types/tmp": "0.0.33", "@types/untildify": "^3.0.0", "@types/uuid": "^3.4.3", - "@types/webpack-bundle-analyzer": "^2.13.0", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", "JSONStream": "^1.3.2", @@ -1836,9 +1835,7 @@ "style-loader": "^0.23.1", "styled-jsx": "^3.1.0", "svg-inline-loader": "^0.8.0", - "ts-loader": "^5.3.0", "ts-mockito": "^2.3.1", - "tsconfig-paths-webpack-plugin": "^3.2.0", "tslint": "^5.9.1", "tslint-eslint-rules": "^5.1.0", "tslint-microsoft-contrib": "^5.0.3", @@ -1851,7 +1848,6 @@ "vscode": "^1.1.21", "vscode-debugadapter-testsupport": "^1.27.0", "webpack": "^4.20.2", - "webpack-bundle-analyzer": "^3.0.3", "webpack-cli": "^3.1.2", "webpack-fix-default-import-plugin": "^1.0.3", "webpack-merge": "^4.1.4", From b23577f921420a94bbb13e8dbb192c2823907d7c Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 14 Nov 2018 16:35:52 -0800 Subject: [PATCH 07/27] Webpack for extension --- build/webpack/webpack.extension.config.js | 64 ++ build/webpack/webpack.extension.config.ts | 69 +++ package-lock.json | 722 +++++++++++++++++++++- package.json | 7 + src/client/constants.ts | 6 +- tsconfig.extension.json | 23 + 6 files changed, 880 insertions(+), 11 deletions(-) create mode 100644 build/webpack/webpack.extension.config.js create mode 100644 build/webpack/webpack.extension.config.ts create mode 100644 tsconfig.extension.json diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js new file mode 100644 index 000000000000..993bccd22662 --- /dev/null +++ b/build/webpack/webpack.extension.config.js @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); +const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); +const nodeExternals = require("webpack-node-externals"); +// tslint:disable-next-line:no-var-requires no-require-imports +const WrapperPlugin = require('wrapper-webpack-plugin'); +const configFileName = path.join(__dirname, '..', '..', 'tsconfig.extension.json'); +const config = { + mode: 'production', + target: 'node', + entry: { + extension: './src/client/extension.ts', + 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' + }, + devtool: 'source-map', + node: { + __dirname: false + }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + ] + } + ] + }, + externals: [ + 'vscode', + 'commonjs', + nodeExternals() + ], + plugins: [ + new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ + analyzerMode: 'static' + }), + new WrapperPlugin({ + test: /\.js$/, + header: 'require(\'source-map-support\').install();' + }) + ], + resolve: { + extensions: ['.ts', '.js'], + plugins: [ + new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({ configFile: configFileName }) + ] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../../[resource-path]' + } +}; +// tslint:disable-next-line:no-default-export +exports.default = config; diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts new file mode 100644 index 000000000000..f2a318bb0b9c --- /dev/null +++ b/build/webpack/webpack.extension.config.ts @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as path from 'path'; +import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; +import * as webpack from 'webpack'; +import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; +import * as nodeExternals from 'webpack-node-externals'; +// tslint:disable-next-line:no-var-requires no-require-imports +const WrapperPlugin = require('wrapper-webpack-plugin'); + +const configFileName = path.join(__dirname, '..', '..', 'tsconfig.extension.json'); + +const config: webpack.Configuration = { + mode: 'production', + target: 'node', + entry: { + extension: './src/client/extension.ts', + 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' + }, + devtool: 'source-map', + node: { + __dirname: false + }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + ] + } + ] + }, + externals: [ + 'vscode', + 'commonjs', + nodeExternals() + ], + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static' + }), + new WrapperPlugin({ + test: /\.js$/, + header: 'require(\'source-map-support\').install();' + }) + ], + resolve: { + extensions: ['.ts', '.js'], + plugins: [ + new TsconfigPathsPlugin({ configFile: configFileName }) + ] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../../[resource-path]' + } +}; + +// tslint:disable-next-line:no-default-export +export default config; diff --git a/package-lock.json b/package-lock.json index 92b44a77f158..7c514df9ff78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1263,6 +1263,12 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, + "@types/anymatch": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.0.tgz", + "integrity": "sha512-7WcbyctkE8GTzogDb0ulRAEw7v8oIS54ft9mQTU7PfM0hp5e+8kpa+HeQ7IQrFbKtJXBKcZ4bh+Em9dTw5L6AQ==", + "dev": true + }, "@types/caseless": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", @@ -1459,6 +1465,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "http://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/lodash": { "version": "4.14.109", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.109.tgz", @@ -1569,6 +1581,12 @@ "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", "dev": true }, + "@types/tapable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", + "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", + "dev": true + }, "@types/temp": { "version": "0.8.32", "resolved": "https://registry.npmjs.org/@types/temp/-/temp-0.8.32.tgz", @@ -1590,6 +1608,23 @@ "integrity": "sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ==", "dev": true }, + "@types/uglify-js": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz", + "integrity": "sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "@types/untildify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/untildify/-/untildify-3.0.0.tgz", @@ -1605,6 +1640,45 @@ "@types/node": "*" } }, + "@types/webpack": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.19.tgz", + "integrity": "sha512-vO/PuQ9iF9Gy8spN8RUUjt5reu9Z+Tb7iWxeAopCmXaIZaIsOgtY5U6UE2ELlcRUBO1HbNWhy+lQE9G92IJcmQ==", + "dev": true, + "requires": { + "@types/anymatch": "*", + "@types/node": "*", + "@types/tapable": "*", + "@types/uglify-js": "*", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@types/webpack-bundle-analyzer": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.0.tgz", + "integrity": "sha512-+qy5xatScNZW4NbIVaiV38XOeHbKRa4FIPeMf2VDpZEon9W/cxjaVR080vRrRGvfq4tRvOusTEypSMxTvjcSzw==", + "dev": true, + "requires": { + "@types/webpack": "*" + } + }, + "@types/webpack-node-externals": { + "version": "1.6.3", + "resolved": "http://registry.npmjs.org/@types/webpack-node-externals/-/webpack-node-externals-1.6.3.tgz", + "integrity": "sha512-sIYCMSV4Z1FbxqSKKvhmEnjd1UoZnTBT0VIhoZ0iT8gck7FB1MzJ1eH+yFyOgY65WU4LJBTxj3ySMKKfzfEiCw==", + "dev": true, + "requires": { + "@types/webpack": "*" + } + }, "@types/winreg": { "version": "1.2.30", "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", @@ -1826,6 +1900,16 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, "acorn": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", @@ -2218,6 +2302,12 @@ "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -2882,6 +2972,18 @@ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", "dev": true }, + "bfj": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", + "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "check-types": "^7.3.0", + "hoopy": "^0.1.2", + "tryer": "^1.0.0" + } + }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -2963,6 +3065,35 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -3158,8 +3289,7 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-xor": { "version": "1.0.3", @@ -3179,6 +3309,12 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, "cacache": { "version": "10.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", @@ -3378,6 +3514,12 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "check-types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", + "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", + "dev": true + }, "cheerio": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", @@ -3870,12 +4012,30 @@ "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -4832,6 +4992,12 @@ "dev": true, "optional": true }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -4842,6 +5008,12 @@ "minimalistic-assert": "^1.0.0" } }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -5168,6 +5340,18 @@ } } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, "electron-to-chromium": { "version": "1.3.71", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.71.tgz", @@ -5205,6 +5389,12 @@ "create-emotion": "^9.2.12" } }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -5392,6 +5582,12 @@ "integrity": "sha1-Nc5Rp5YO/LWui7Wbg/VmqYyUbf0=", "dev": true }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -5475,6 +5671,12 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -5632,6 +5834,44 @@ "homedir-polyfill": "^1.0.1" } }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -5927,6 +6167,21 @@ } } }, + "finalhandler": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", @@ -6045,6 +6300,12 @@ "mime-types": "^2.1.12" } }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -6053,6 +6314,12 @@ "map-cache": "^0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, "from": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", @@ -6309,8 +6576,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -8641,6 +8907,12 @@ "parse-passwd": "^1.0.0" } }, + "hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true + }, "hosted-git-info": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", @@ -8744,6 +9016,18 @@ "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, "http-parser-js": { "version": "0.4.13", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", @@ -9140,6 +9424,12 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", + "dev": true + }, "is": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", @@ -10632,6 +10922,12 @@ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", "dev": true }, + "media-typer": { + "version": "0.3.0", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, "mem": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", @@ -10675,6 +10971,12 @@ "readable-stream": "^2.0.1" } }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, "merge-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", @@ -10684,6 +10986,12 @@ "readable-stream": "^2.0.1" } }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -11026,6 +11334,12 @@ "semver": "^5.4.1" } }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, "neo-async": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", @@ -11477,6 +11791,15 @@ "has": "^1.0.1" } }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -11494,6 +11817,12 @@ "mimic-fn": "^1.0.0" } }, + "opener": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "dev": true + }, "opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -11825,6 +12154,12 @@ "@types/node": "*" } }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -11894,6 +12229,12 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -12275,6 +12616,16 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -12459,6 +12810,35 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "raw-loader": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", @@ -13497,12 +13877,53 @@ "sver-compat": "^1.5.0" } }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + } + } + }, "serialize-javascript": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", "dev": true }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -13542,6 +13963,12 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, "sha.js": { "version": "2.4.11", "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -13768,10 +14195,9 @@ } }, "source-map-support": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.8.tgz", - "integrity": "sha512-WqAEWPdb78u25RfKzOF0swBpY0dKrNdjc4GvLwm7ScX/o9bj8Eh/YL8mcMhBHYDGl87UkkSXDOFnW4G7GhWhGg==", - "dev": true, + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -13780,8 +14206,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -13912,6 +14337,12 @@ } } }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -14094,6 +14525,12 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-bom-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", @@ -14679,6 +15116,62 @@ "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", "dev": true }, + "tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true + }, + "ts-loader": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.0.tgz", + "integrity": "sha512-lGSNs7szRFj/rK9T1EQuayE3QNLg6izDUxt5jpmq0RG1rU2bapAt7E7uLckLCUPeO1jwxCiet2oRaWovc53UAg==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "ts-mockito": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/ts-mockito/-/ts-mockito-2.3.1.tgz", @@ -14688,6 +15181,78 @@ "lodash": "^4.17.5" } }, + "tsconfig-paths": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz", + "integrity": "sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "tsconfig-paths-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-S/gOOPOkV8rIL4LurZ1vUdYCVgo15iX9ZMJ6wx6w2OgcpT/G4wMyHB6WM+xheSqGMrWKuxFul+aXpCju3wmj/g==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "tsconfig-paths": "^3.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "tslib": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.1.tgz", @@ -14838,6 +15403,16 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, "typed-react-markdown": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/typed-react-markdown/-/typed-react-markdown-0.1.0.tgz", @@ -15288,6 +15863,12 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -15460,6 +16041,12 @@ "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "dev": true }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -15507,6 +16094,12 @@ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -16105,6 +16698,106 @@ } } }, + "webpack-bundle-analyzer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.3.tgz", + "integrity": "sha512-naLWiRfmtH4UJgtUktRTLw6FdoZJ2RvCR9ePbwM9aRMsS/KjFerkPZG9epEvXRAw5d5oPdrs9+3p+afNjxW8Xw==", + "dev": true, + "requires": { + "acorn": "^5.7.3", + "bfj": "^6.1.1", + "chalk": "^2.4.1", + "commander": "^2.18.0", + "ejs": "^2.6.1", + "express": "^4.16.3", + "filesize": "^3.6.1", + "gzip-size": "^5.0.0", + "lodash": "^4.17.10", + "mkdirp": "^0.5.1", + "opener": "^1.5.1", + "ws": "^6.0.0" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "gzip-size": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", + "integrity": "sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "ws": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", + "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, "webpack-cli": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", @@ -16387,6 +17080,15 @@ } } }, + "wrapper-webpack-plugin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wrapper-webpack-plugin/-/wrapper-webpack-plugin-2.0.0.tgz", + "integrity": "sha512-HiykPJTuiaPiR9Q89sRbTjWJ9J/AkriPTbIYaAAW5ulfaK7p5GqK9cB+RWwFhfa17Sn5ehqJ2/qxF4XbQCDGvg==", + "dev": true, + "requires": { + "webpack-sources": "^1.1.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 7eafa0f67fad..d2e12fa03476 100644 --- a/package.json +++ b/package.json @@ -1722,6 +1722,7 @@ "request-progress": "^3.0.0", "rxjs": "^5.5.9", "semver": "^5.5.0", + "source-map-support": "^0.5.9", "sudo-prompt": "^8.2.0", "tmp": "^0.0.29", "tree-kill": "^1.2.0", @@ -1779,6 +1780,8 @@ "@types/tmp": "0.0.33", "@types/untildify": "^3.0.0", "@types/uuid": "^3.4.3", + "@types/webpack-bundle-analyzer": "^2.13.0", + "@types/webpack-node-externals": "^1.6.3", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", "JSONStream": "^1.3.2", @@ -1835,7 +1838,9 @@ "style-loader": "^0.23.1", "styled-jsx": "^3.1.0", "svg-inline-loader": "^0.8.0", + "ts-loader": "^5.3.0", "ts-mockito": "^2.3.1", + "tsconfig-paths-webpack-plugin": "^3.2.0", "tslint": "^5.9.1", "tslint-eslint-rules": "^5.1.0", "tslint-microsoft-contrib": "^5.0.3", @@ -1848,10 +1853,12 @@ "vscode": "^1.1.21", "vscode-debugadapter-testsupport": "^1.27.0", "webpack": "^4.20.2", + "webpack-bundle-analyzer": "^3.0.3", "webpack-cli": "^3.1.2", "webpack-fix-default-import-plugin": "^1.0.3", "webpack-merge": "^4.1.4", "webpack-node-externals": "^1.7.2", + "wrapper-webpack-plugin": "^2.0.0", "yargs": "^12.0.2" }, "__metadata": { diff --git a/src/client/constants.ts b/src/client/constants.ts index a355e25d7233..25ffeb974f36 100644 --- a/src/client/constants.ts +++ b/src/client/constants.ts @@ -4,4 +4,8 @@ 'use strict'; import * as path from 'path'; -export const EXTENSION_ROOT_DIR = path.join(__dirname, '..', '..'); + +// This file is also used by the debug adapter. +// When bundling, the bundle file for the da ends up elsewhere. +const folderName = path.basename(__dirname); +export const EXTENSION_ROOT_DIR = folderName === 'client' ? path.join(__dirname, '..', '..') : path.join(__dirname, '..', '..', '..', '..'); diff --git a/tsconfig.extension.json b/tsconfig.extension.json new file mode 100644 index 000000000000..22a940225adf --- /dev/null +++ b/tsconfig.extension.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "module": "commonjs", + "target": "es6", + "outDir": "out", + "lib": [ + "es6" + ], + "jsx": "react", + "sourceMap": true, + "rootDir": "src", + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "noImplicitThis": false + }, + "exclude": [ + "node_modules", + ".vscode-test", + "src/datascience-ui", + "build" + ] +} From cbecd7834db34ce9bd4de6d2af359a95b2dae1d3 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 14 Nov 2018 17:02:04 -0800 Subject: [PATCH 08/27] Create copy of DS webpack config to move later --- .../webpack/webpack.datascience-ui.config.js | 87 +++++++++++++++++ .../webpack/webpack.datascience-ui.config.ts | 94 +++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 build/webpack/webpack.datascience-ui.config.js create mode 100644 build/webpack/webpack.datascience-ui.config.ts diff --git a/build/webpack/webpack.datascience-ui.config.js b/build/webpack/webpack.datascience-ui.config.js new file mode 100644 index 000000000000..c5bc3b348974 --- /dev/null +++ b/build/webpack/webpack.datascience-ui.config.js @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const CopyWebpackPlugin = require("copy-webpack-plugin"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const path = require("path"); +// tslint:disable-next-line:no-var-requires no-require-imports +const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin'); +const configFileName = 'tsconfig.datascience-ui.json'; +const config = { + entry: ['babel-polyfill', './src/datascience-ui/history-react/index.tsx'], + output: { + path: path.join(__dirname, '..', '..', 'out'), + filename: 'datascience-ui/history-react/index_bundle.js', + publicPath: path.join(__dirname, '..', '..') + }, + mode: 'development', + // Use 'eval' for release and `eval-source-map` for development. + // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, + // this seems to prevent chrome from downloading the source maps) + devtool: 'eval-source-map', + node: { + fs: 'empty' + }, + plugins: [ + new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', filename: 'datascience-ui/history-react/index.html' }), + new FixDefaultImportPlugin(), + new CopyWebpackPlugin([ + { from: './**/*.png', to: '.' }, + { from: './**/*.svg', to: '.' }, + { from: './**/*.css', to: '.' }, + { from: './**/*theme*.json', to: '.' } + ]) + ], + resolve: { + // Add '.ts' and '.tsx' as resolvable extensions. + extensions: ['.ts', '.tsx', '.js', '.json'] + }, + module: { + rules: [ + // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'. + { + test: /\.tsx?$/, + use: { + loader: 'awesome-typescript-loader', + options: { + configFileName, + reportFiles: [ + 'src/datascience-ui/**/*.{ts,tsx}' + ] + } + } + }, + { + test: /\.css$/, + use: [ + 'style-loader', + 'css-loader' + ] + }, + { + test: /\.js$/, + include: /node_modules.*remark.*default.*js/, + use: [ + { + loader: path.resolve('./build/datascience/remarkLoader.js'), + options: {} + } + ] + }, + { + test: /\.json$/, + type: 'javascript/auto', + include: /node_modules.*remark.*/, + use: [ + { + loader: path.resolve('./build/datascience/jsonloader.js'), + options: {} + } + ] + } + ] + } +}; +// tslint:disable-next-line:no-default-export +exports.default = config; diff --git a/build/webpack/webpack.datascience-ui.config.ts b/build/webpack/webpack.datascience-ui.config.ts new file mode 100644 index 000000000000..c5723f97ec59 --- /dev/null +++ b/build/webpack/webpack.datascience-ui.config.ts @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as CopyWebpackPlugin from 'copy-webpack-plugin'; +import * as HtmlWebpackPlugin from 'html-webpack-plugin'; +import * as path from 'path'; +import * as webpack from 'webpack'; + +// tslint:disable-next-line:no-var-requires no-require-imports +const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin'); + +const configFileName = 'tsconfig.datascience-ui.json'; + +const config: webpack.Configuration = { + entry: ['babel-polyfill', './src/datascience-ui/history-react/index.tsx'], + output: { + path: path.join(__dirname, '..', '..', 'out'), + filename: 'datascience-ui/history-react/index_bundle.js', + publicPath: path.join(__dirname, '..', '..') + }, + mode: 'development', // Leave as is, we'll need to see stack traces when there are errors. + // Use 'eval' for release and `eval-source-map` for development. + // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, + // this seems to prevent chrome from downloading the source maps) + devtool: 'eval-source-map', + node: { + fs: 'empty' + }, + plugins: [ + new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', filename: 'datascience-ui/history-react/index.html' }), + new FixDefaultImportPlugin(), + new CopyWebpackPlugin([ + { from: './**/*.png', to: '.' }, + { from: './**/*.svg', to: '.' }, + { from: './**/*.css', to: '.' }, + { from: './**/*theme*.json', to: '.' } + ]) + ], + resolve: { + // Add '.ts' and '.tsx' as resolvable extensions. + extensions: ['.ts', '.tsx', '.js', '.json'] + }, + + module: { + rules: [ + // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'. + { + test: /\.tsx?$/, + use: { + loader: 'awesome-typescript-loader', + options: { + configFileName, + reportFiles: [ + 'src/datascience-ui/**/*.{ts,tsx}' + ] + } + } + }, + { + test: /\.css$/, + use: [ + 'style-loader', + 'css-loader' + ] + }, + { + test: /\.js$/, + include: /node_modules.*remark.*default.*js/, + use: [ + { + loader: path.resolve('./build/datascience/remarkLoader.js'), + options: {} + } + ] + }, + { + test: /\.json$/, + type: 'javascript/auto', + include: /node_modules.*remark.*/, + use: [ + { + loader: path.resolve('./build/datascience/jsonloader.js'), + options: {} + } + ] + } + ] + } +}; + +// tslint:disable-next-line:no-default-export +export default config; From ff02e2f7d0a16daaebadd0f5e1ab43f8f37a7990 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 14 Nov 2018 17:10:58 -0800 Subject: [PATCH 09/27] Unified webpack --- package-lock.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ webpack.config.js | 18 +++++++++++++++--- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c514df9ff78..4b1d9fbee487 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1305,6 +1305,12 @@ "integrity": "sha512-q6LuBI0t5u04f0Q4/R+cGBqIbZMtJkVvCSF+nTfFBBdQqQvJR/mNHeWjRkszyLl7oyf2rDoKUYMEjTw5AV0hiw==", "dev": true }, + "@types/clean-css": { + "version": "3.4.30", + "resolved": "http://registry.npmjs.org/@types/clean-css/-/clean-css-3.4.30.tgz", + "integrity": "sha1-AFLBNvUkgAJCjjY4s33ko5gYZB0=", + "dev": true + }, "@types/commander": { "version": "2.12.2", "resolved": "https://registry.npmjs.org/@types/commander/-/commander-2.12.2.tgz", @@ -1314,6 +1320,16 @@ "commander": "*" } }, + "@types/copy-webpack-plugin": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.2.tgz", + "integrity": "sha512-/L0m5kc7pKGpsu97TTgAP6YcVRmau2Wj0HpRPQBGEbZXT1DZkdozZPCZHGDWXpxcvWDFTxob2JmYJj3RC7CwFA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/webpack": "*" + } + }, "@types/decompress": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/decompress/-/decompress-4.2.2.tgz", @@ -1430,6 +1446,28 @@ "@types/node": "*" } }, + "@types/html-minifier": { + "version": "3.5.2", + "resolved": "http://registry.npmjs.org/@types/html-minifier/-/html-minifier-3.5.2.tgz", + "integrity": "sha512-yikK28/KlVyf8g9i/k+TDFlteLuZ6QQTUdVqvKtzEB+8DSLCTjxfh6IK45KnW4rYFI3Y8T4LWpYJMTmfJleWaQ==", + "dev": true, + "requires": { + "@types/clean-css": "*", + "@types/relateurl": "*", + "@types/uglify-js": "*" + } + }, + "@types/html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-in9rViBsTRB4ZApndZ12It68nGzSMHVK30JD7c49iLIHMFeTPbP7I7wevzMv7re2o0k5TlU6Ry/beyrmgWX7Bg==", + "dev": true, + "requires": { + "@types/html-minifier": "*", + "@types/tapable": "*", + "@types/webpack": "*" + } + }, "@types/iconv-lite": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/@types/iconv-lite/-/iconv-lite-0.0.1.tgz", @@ -1551,6 +1589,12 @@ "@types/react": "*" } }, + "@types/relateurl": { + "version": "0.2.28", + "resolved": "http://registry.npmjs.org/@types/relateurl/-/relateurl-0.2.28.tgz", + "integrity": "sha1-a9p9uGU/piZD9e5p6facEaOS46Y=", + "dev": true + }, "@types/request": { "version": "2.47.0", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz", diff --git a/package.json b/package.json index d2e12fa03476..3b48fd77d44f 100644 --- a/package.json +++ b/package.json @@ -1751,6 +1751,7 @@ "@types/chai": "^4.1.2", "@types/chai-arrays": "^1.0.2", "@types/chai-as-promised": "^7.1.0", + "@types/copy-webpack-plugin": "^4.4.2", "@types/del": "^3.0.0", "@types/dotenv": "^4.0.3", "@types/download": "^6.2.2", @@ -1760,6 +1761,7 @@ "@types/fs-extra": "^5.0.1", "@types/get-port": "^3.2.0", "@types/glob": "^5.0.35", + "@types/html-webpack-plugin": "^3.2.0", "@types/iconv-lite": "^0.0.1", "@types/istanbul": "^0.4.29", "@types/jsdom": "^11.12.0", diff --git a/webpack.config.js b/webpack.config.js index 7188b10ab0a1..2523ae041de3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + const merge = require('webpack-merge'); const datascience = require('./webpack.datascience-ui.config.js'); +const extension = require('./build/webpack/webpack.extension.config.js').default; -module.exports = [merge(datascience, { - devtool: 'eval' -})]; +module.exports = [ + merge(datascience, { + devtool: 'eval' + }), + merge(extension, { + mode: 'production', + devtool: 'source-map', + }) +]; From f4dd06ba040b4a9e5669eb19e059c0849535a462 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 14 Nov 2018 17:15:40 -0800 Subject: [PATCH 10/27] Update comments --- src/client/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/constants.ts b/src/client/constants.ts index 25ffeb974f36..d0b1f89025b6 100644 --- a/src/client/constants.ts +++ b/src/client/constants.ts @@ -6,6 +6,6 @@ import * as path from 'path'; // This file is also used by the debug adapter. -// When bundling, the bundle file for the da ends up elsewhere. +// When bundling, the bundle file for the debug adapter ends up elsewhere. const folderName = path.basename(__dirname); export const EXTENSION_ROOT_DIR = folderName === 'client' ? path.join(__dirname, '..', '..') : path.join(__dirname, '..', '..', '..', '..'); From ae34d98d65cfc44b8968e1150d66993ffd63fd5e Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 15 Nov 2018 10:50:27 -0800 Subject: [PATCH 11/27] Refactor --- build/webpack/datascience/inlinePlugin.js | 52 +++++++++++++++++++++++ build/webpack/datascience/jsonloader.js | 8 ++++ build/webpack/datascience/remarkLoader.js | 8 ++++ 3 files changed, 68 insertions(+) create mode 100644 build/webpack/datascience/inlinePlugin.js create mode 100644 build/webpack/datascience/jsonloader.js create mode 100644 build/webpack/datascience/remarkLoader.js diff --git a/build/webpack/datascience/inlinePlugin.js b/build/webpack/datascience/inlinePlugin.js new file mode 100644 index 000000000000..c7702dea413e --- /dev/null +++ b/build/webpack/datascience/inlinePlugin.js @@ -0,0 +1,52 @@ +class HelloWorldPlugin { + apply(compiler) { + compiler.hooks.done.tap('Hello World Plugin', ( + stats /* stats is passed as argument when done hook is tapped. */ + ) => { + console.log('Hello World!'); + }); + } +} + +//module.exports = HelloWorldPlugin; + +class InlineResolverPlugin { + constructor(regex) { + this.source = 'described-resolve'; // Before plugin + this.target = 'resolve'; // After plugin + this.regex = regex; + } + + apply(resolver) { + const normal = resolver.ensureHook(this.target) + const skip = resolver.ensureHook('resolved'); + resolver.getHook(this.source).tapAsync('InlineResolverPlugin', (request, resolveContext, callback) => { + const parsed = resolver.parse(request.request); + if (parsed.request == './block-elements.json') { + const source = { + foo: 'bar' + }; + console.log(`Skipping request for ${parsed.request}\n`); + return callback(null, `${JSON.stringify(source)}`); + } + + resolver.doResolve(normal, request, null, resolveContext, callback); + }); + } +} + +// module.exports = InlineResolverPlugin; + +class InlineCompilerPlugin { + constructor(regex) { + this.regex = regex; + } + + apply(compiler) { + compiler.plugin("after-emit", function(compilation) { + console.log('Done emitting'); + }); + } +} + +module.exports = InlineCompilerPlugin; diff --git a/build/webpack/datascience/jsonloader.js b/build/webpack/datascience/jsonloader.js new file mode 100644 index 000000000000..a5c8927a7d3a --- /dev/null +++ b/build/webpack/datascience/jsonloader.js @@ -0,0 +1,8 @@ +// For some reason this has to be in commonjs format + +module.exports = function(source) { + + // Just inline the source and fix up defaults so that they don't + // mess up the logic in the setOptions.js file + return `module.exports = ${source}\nmodule.exports.default = false`; +} diff --git a/build/webpack/datascience/remarkLoader.js b/build/webpack/datascience/remarkLoader.js new file mode 100644 index 000000000000..6e4f45d99f11 --- /dev/null +++ b/build/webpack/datascience/remarkLoader.js @@ -0,0 +1,8 @@ +// For some reason this has to be in commonjs format + +module.exports = function(source) { + + // Just inline the source and fix up defaults so that they don't + // mess up the logic in the setOptions.js file + return `module.exports = ${source}\nmodule.exports.default = false`; + } From 2e5fdafa0a8b9f9683161817b3b4d5dd870a597d Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 15 Nov 2018 15:55:07 -0800 Subject: [PATCH 12/27] Incremental changes --- build/datascience/inlinePlugin.js | 52 ------------------- build/datascience/jsonloader.js | 8 --- .../loaders/externalizeDependencies.js | 25 +++++++++ .../{datascience => loaders}/jsonloader.js | 0 .../loaders}/remarkLoader.js | 16 +++--- build/webpack/webpack.extension.config.js | 50 +++++++++++++++--- .../webpack.extension.dependencies.config.js | 47 +++++++++++++++++ webpack.config.js | 5 ++ webpack.datascience-ui.config.js | 4 +- 9 files changed, 131 insertions(+), 76 deletions(-) delete mode 100644 build/datascience/inlinePlugin.js delete mode 100644 build/datascience/jsonloader.js create mode 100644 build/webpack/loaders/externalizeDependencies.js rename build/webpack/{datascience => loaders}/jsonloader.js (100%) rename build/{datascience => webpack/loaders}/remarkLoader.js (97%) create mode 100644 build/webpack/webpack.extension.dependencies.config.js diff --git a/build/datascience/inlinePlugin.js b/build/datascience/inlinePlugin.js deleted file mode 100644 index b14e08e56c26..000000000000 --- a/build/datascience/inlinePlugin.js +++ /dev/null @@ -1,52 +0,0 @@ -class HelloWorldPlugin { - apply(compiler) { - compiler.hooks.done.tap('Hello World Plugin', ( - stats /* stats is passed as argument when done hook is tapped. */ - ) => { - console.log('Hello World!'); - }); - } -} - -//module.exports = HelloWorldPlugin; - -class InlineResolverPlugin { - constructor(regex) { - this.source = 'described-resolve'; // Before plugin - this.target = 'resolve'; // After plugin - this.regex = regex; - } - - apply(resolver) { - const normal = resolver.ensureHook(this.target) - const skip = resolver.ensureHook('resolved'); - resolver.getHook(this.source).tapAsync('InlineResolverPlugin', (request, resolveContext, callback) => { - const parsed = resolver.parse(request.request); - if (parsed.request == './block-elements.json') { - const source = { - foo: 'bar' - }; - console.log(`Skipping request for ${parsed.request}\n`); - return callback(null, `${JSON.stringify(source)}`); - } - - resolver.doResolve(normal, request, null, resolveContext, callback); - }); - } -} - -// module.exports = InlineResolverPlugin; - -class InlineCompilerPlugin { - constructor(regex) { - this.regex = regex; - } - - apply(compiler) { - compiler.plugin("after-emit", function(compilation) { - console.log('Done emitting'); - }); - } -} - -module.exports = InlineCompilerPlugin; diff --git a/build/datascience/jsonloader.js b/build/datascience/jsonloader.js deleted file mode 100644 index d8198617422d..000000000000 --- a/build/datascience/jsonloader.js +++ /dev/null @@ -1,8 +0,0 @@ -// For some reason this has to be in commonjs format - -module.exports = function(source) { - - // Just inline the source and fix up defaults so that they don't - // mess up the logic in the setOptions.js file - return `module.exports = ${source}\nmodule.exports.default = false`; -} diff --git a/build/webpack/loaders/externalizeDependencies.js b/build/webpack/loaders/externalizeDependencies.js new file mode 100644 index 000000000000..e34fcfbcc08f --- /dev/null +++ b/build/webpack/loaders/externalizeDependencies.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +// tslint:disable:no-default-export no-invalid-this +function default_1(source) { + const sourcePath = this.resourcePath; + if (sourcePath.indexOf('node_modules') === -1) { + if (source.indexOf('unicode/category') > 0) { + source = source.replace(/\'unicode\/category\//gm, '\'./unicode_category_'); + source = source.replace(/"unicode\/category\//gm, '"./unicode_category_'); + } + if (source.indexOf('@jupyterlab\/services') > 0) { + console.log('Updated Jupyter Services'); + source = source.replace(/\'@jupyterlab\/services\'/gm, '\'./@jupyterlab/services\''); + source = source.replace(/"@jupyterlab\/services"/gm, '"./@jupyterlab/services"'); + } + if (source.indexOf('azure-storage') > 0) { + source = source.replace(/\'azure-storage\'/gm, '\'./azure-storage\''); + source = source.replace(/"azure-storage"/gm, '"./azure-storage"'); + } + } + return source; +} +exports.default = default_1; diff --git a/build/webpack/datascience/jsonloader.js b/build/webpack/loaders/jsonloader.js similarity index 100% rename from build/webpack/datascience/jsonloader.js rename to build/webpack/loaders/jsonloader.js diff --git a/build/datascience/remarkLoader.js b/build/webpack/loaders/remarkLoader.js similarity index 97% rename from build/datascience/remarkLoader.js rename to build/webpack/loaders/remarkLoader.js index 6abc812f60a6..6e4f45d99f11 100644 --- a/build/datascience/remarkLoader.js +++ b/build/webpack/loaders/remarkLoader.js @@ -1,8 +1,8 @@ -// For some reason this has to be in commonjs format - -module.exports = function(source) { - - // Just inline the source and fix up defaults so that they don't - // mess up the logic in the setOptions.js file - return `module.exports = ${source}\nmodule.exports.default = false`; - } +// For some reason this has to be in commonjs format + +module.exports = function(source) { + + // Just inline the source and fix up defaults so that they don't + // mess up the logic in the setOptions.js file + return `module.exports = ${source}\nmodule.exports.default = false`; + } diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index 993bccd22662..5497f0dd5784 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -2,19 +2,30 @@ // Licensed under the MIT License. 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +const glob = require("glob"); const path = require("path"); const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); +const webpack = require("webpack"); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); -const nodeExternals = require("webpack-node-externals"); +const constants_1 = require("../constants"); // tslint:disable-next-line:no-var-requires no-require-imports const WrapperPlugin = require('wrapper-webpack-plugin'); const configFileName = path.join(__dirname, '..', '..', 'tsconfig.extension.json'); +// Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin +// We need to ensure they do not get bundled into the output (as they are large). +const existingModulesInOutDir = getListOfExistingModulesInOutDir(); +function getListOfExistingModulesInOutDir() { + const outDir = path.join(constants_1.ExtensionRootDir, 'out', 'client'); + const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); + return files.map(filePath => `./${filePath.slice(0, -3)}`); +} +console.log(existingModulesInOutDir); const config = { - mode: 'production', + mode: 'development', target: 'node', entry: { extension: './src/client/extension.ts', - 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' + // 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' }, devtool: 'source-map', node: { @@ -22,6 +33,13 @@ const config = { }, module: { rules: [ + { + test: /\.ts$/, + use: [ + { + loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/build/webpack/loaders/externalizeDependencies.js' + }] + }, { test: /\.ts$/, exclude: /node_modules/, @@ -36,7 +54,10 @@ const config = { externals: [ 'vscode', 'commonjs', - nodeExternals() + // '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/out/client/unicode_category_Lu.js', + // './unicode_category_Lu', + // './unicode_category_Lu.js', + ...existingModulesInOutDir ], plugins: [ new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ @@ -45,7 +66,24 @@ const config = { new WrapperPlugin({ test: /\.js$/, header: 'require(\'source-map-support\').install();' - }) + }), + // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource) => { + // const fileName = path.basename(resource.request); + // console.log('resource.request for unicode'); + // console.log(resource.request); + // // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); + // resource.request = `./unicode_category_${fileName}`; + // }), + // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource) => { + // console.log('resource.request for @jupyter/services'); + // console.log(resource.request); + // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); + // }), + // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource) => { + // console.log('resource.request for azure-storage'); + // console.log(resource.request); + // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', 'azure-storage'); + // }) ], resolve: { extensions: ['.ts', '.js'], @@ -55,7 +93,7 @@ const config = { }, output: { filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), + path: path.resolve(constants_1.ExtensionRootDir, 'out', 'client'), libraryTarget: 'commonjs2', devtoolModuleFilenameTemplate: '../../[resource-path]' } diff --git a/build/webpack/webpack.extension.dependencies.config.js b/build/webpack/webpack.extension.dependencies.config.js new file mode 100644 index 000000000000..c228ff5e5cd7 --- /dev/null +++ b/build/webpack/webpack.extension.dependencies.config.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); +const config = { + mode: 'production', + target: 'node', + entry: { + unicode_category_Lu: './node_modules/unicode/category/Lu', + unicode_category_Ll: './node_modules/unicode/category/Ll', + unicode_category_Lt: './node_modules/unicode/category/Lt', + unicode_category_Lo: './node_modules/unicode/category/Lo', + unicode_category_Lm: './node_modules/unicode/category/Lm', + unicode_category_Nl: './node_modules/unicode/category/Nl', + unicode_category_Mn: './node_modules/unicode/category/Mn', + unicode_category_Mc: './node_modules/unicode/category/Mc', + unicode_category_Nd: './node_modules/unicode/category/Nd', + unicode_category_Pc: './node_modules/unicode/category/Pc', + '@jupyterlab/services': './node_modules/@jupyterlab/services', + 'azure-storage': './node_modules/azure-storage' + }, + devtool: 'source-map', + node: { + __dirname: false + }, + externals: [ + 'commonjs' + ], + plugins: [ + new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ + analyzerMode: 'static' + }) + ], + resolve: { + extensions: ['.js'] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, '..', '..', 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../../[resource-path]' + } +}; +// tslint:disable-next-line:no-default-export +exports.default = config; diff --git a/webpack.config.js b/webpack.config.js index 2523ae041de3..b9f092889672 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,11 +6,16 @@ const merge = require('webpack-merge'); const datascience = require('./webpack.datascience-ui.config.js'); const extension = require('./build/webpack/webpack.extension.config.js').default; +const extensionDependencies = require('./build/webpack/webpack.extension.dependencies.config.js').default; module.exports = [ merge(datascience, { devtool: 'eval' }), + merge(extensionDependencies, { + mode: 'production', + devtool: 'source-map', + }), merge(extension, { mode: 'production', devtool: 'source-map', diff --git a/webpack.datascience-ui.config.js b/webpack.datascience-ui.config.js index 9fab6027ed4f..b133f01805cb 100644 --- a/webpack.datascience-ui.config.js +++ b/webpack.datascience-ui.config.js @@ -63,7 +63,7 @@ module.exports = { include: /node_modules.*remark.*default.*js/, use: [ { - loader: path.resolve('./build/datascience/remarkLoader.js'), + loader: path.resolve('./build/webpack/loaders/remarkLoader.js'), options: {} } ] @@ -74,7 +74,7 @@ module.exports = { include: /node_modules.*remark.*/, use: [ { - loader: path.resolve('./build/datascience/jsonloader.js'), + loader: path.resolve('./build/webpack/loaders/jsonloader.js'), options: {} } ] From a995f6e0cb650710953368ede1d36fb9456272e7 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 15 Nov 2018 16:09:07 -0800 Subject: [PATCH 13/27] Web pack configurations --- .../loaders/externalizeDependencies.js | 1 - .../loaders/externalizeDependencies.ts | 24 +++++++++ build/webpack/webpack.extension.config.js | 37 +++++-------- build/webpack/webpack.extension.config.ts | 36 +++++++++++-- .../webpack.extension.dependencies.config.js | 3 +- .../webpack.extension.dependencies.config.ts | 52 +++++++++++++++++++ 6 files changed, 123 insertions(+), 30 deletions(-) create mode 100644 build/webpack/loaders/externalizeDependencies.ts create mode 100644 build/webpack/webpack.extension.dependencies.config.ts diff --git a/build/webpack/loaders/externalizeDependencies.js b/build/webpack/loaders/externalizeDependencies.js index e34fcfbcc08f..7cbc61a18e4d 100644 --- a/build/webpack/loaders/externalizeDependencies.js +++ b/build/webpack/loaders/externalizeDependencies.js @@ -11,7 +11,6 @@ function default_1(source) { source = source.replace(/"unicode\/category\//gm, '"./unicode_category_'); } if (source.indexOf('@jupyterlab\/services') > 0) { - console.log('Updated Jupyter Services'); source = source.replace(/\'@jupyterlab\/services\'/gm, '\'./@jupyterlab/services\''); source = source.replace(/"@jupyterlab\/services"/gm, '"./@jupyterlab/services"'); } diff --git a/build/webpack/loaders/externalizeDependencies.ts b/build/webpack/loaders/externalizeDependencies.ts new file mode 100644 index 000000000000..9292de4fb9fa --- /dev/null +++ b/build/webpack/loaders/externalizeDependencies.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +// tslint:disable:no-default-export no-invalid-this +export default function (source: string) { + const sourcePath = this.resourcePath; + if (sourcePath.indexOf('node_modules') === -1) { + if (source.indexOf('unicode/category') > 0) { + source = source.replace(/\'unicode\/category\//gm, '\'./unicode_category_'); + source = source.replace(/"unicode\/category\//gm, '"./unicode_category_'); + } + if (source.indexOf('@jupyterlab\/services') > 0) { + source = source.replace(/\'@jupyterlab\/services\'/gm, '\'./@jupyterlab/services\''); + source = source.replace(/"@jupyterlab\/services"/gm, '"./@jupyterlab/services"'); + } + if (source.indexOf('azure-storage') > 0) { + source = source.replace(/\'azure-storage\'/gm, '\'./azure-storage\''); + source = source.replace(/"azure-storage"/gm, '"./azure-storage"'); + } + } + return source; +} diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index 5497f0dd5784..f765cc838359 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -5,12 +5,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); const glob = require("glob"); const path = require("path"); const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); -const webpack = require("webpack"); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); // tslint:disable-next-line:no-var-requires no-require-imports const WrapperPlugin = require('wrapper-webpack-plugin'); -const configFileName = path.join(__dirname, '..', '..', 'tsconfig.extension.json'); +const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json'); // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). const existingModulesInOutDir = getListOfExistingModulesInOutDir(); @@ -19,13 +18,12 @@ function getListOfExistingModulesInOutDir() { const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); return files.map(filePath => `./${filePath.slice(0, -3)}`); } -console.log(existingModulesInOutDir); const config = { - mode: 'development', + mode: 'production', target: 'node', entry: { extension: './src/client/extension.ts', - // 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' + 'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts' }, devtool: 'source-map', node: { @@ -37,8 +35,9 @@ const config = { test: /\.ts$/, use: [ { - loader: '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/build/webpack/loaders/externalizeDependencies.js' - }] + loader: path.join(__dirname, 'loaders', 'externalizeDependencies.js') + } + ] }, { test: /\.ts$/, @@ -54,9 +53,6 @@ const config = { externals: [ 'vscode', 'commonjs', - // '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/out/client/unicode_category_Lu.js', - // './unicode_category_Lu', - // './unicode_category_Lu.js', ...existingModulesInOutDir ], plugins: [ @@ -66,23 +62,16 @@ const config = { new WrapperPlugin({ test: /\.js$/, header: 'require(\'source-map-support\').install();' - }), - // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource) => { + }) + // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource: { request: string }) => { // const fileName = path.basename(resource.request); - // console.log('resource.request for unicode'); - // console.log(resource.request); - // // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); - // resource.request = `./unicode_category_${fileName}`; + // resource.request = path.join(ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); // }), - // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource) => { - // console.log('resource.request for @jupyter/services'); - // console.log(resource.request); - // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); + // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource: { request: string }) => { + // resource.request = path.join(ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); // }), - // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource) => { - // console.log('resource.request for azure-storage'); - // console.log(resource.request); - // resource.request = path.join(constants_1.ExtensionRootDir, 'out', 'client', 'azure-storage'); + // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource: { request: string }) => { + // resource.request = path.join(ExtensionRootDir, 'out', 'client', 'azure-storage'); // }) ], resolve: { diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index f2a318bb0b9c..8af9eb808d48 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -3,15 +3,25 @@ 'use strict'; +import * as glob from 'glob'; import * as path from 'path'; import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; import * as webpack from 'webpack'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; -import * as nodeExternals from 'webpack-node-externals'; +import { ExtensionRootDir } from '../constants'; + // tslint:disable-next-line:no-var-requires no-require-imports const WrapperPlugin = require('wrapper-webpack-plugin'); +const configFileName = path.join(ExtensionRootDir, 'tsconfig.extension.json'); -const configFileName = path.join(__dirname, '..', '..', 'tsconfig.extension.json'); +// Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin +// We need to ensure they do not get bundled into the output (as they are large). +const existingModulesInOutDir = getListOfExistingModulesInOutDir(); +function getListOfExistingModulesInOutDir() { + const outDir = path.join(ExtensionRootDir, 'out', 'client'); + const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); + return files.map(filePath => `./${filePath.slice(0, -3)}`); +} const config: webpack.Configuration = { mode: 'production', @@ -26,6 +36,14 @@ const config: webpack.Configuration = { }, module: { rules: [ + { + test: /\.ts$/, + use: [ + { + loader: path.join(__dirname, 'loaders', 'externalizeDependencies.js') + } + ] + }, { test: /\.ts$/, exclude: /node_modules/, @@ -40,7 +58,7 @@ const config: webpack.Configuration = { externals: [ 'vscode', 'commonjs', - nodeExternals() + ...existingModulesInOutDir ], plugins: [ new BundleAnalyzerPlugin({ @@ -50,6 +68,16 @@ const config: webpack.Configuration = { test: /\.js$/, header: 'require(\'source-map-support\').install();' }) + // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource: { request: string }) => { + // const fileName = path.basename(resource.request); + // resource.request = path.join(ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); + // }), + // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource: { request: string }) => { + // resource.request = path.join(ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); + // }), + // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource: { request: string }) => { + // resource.request = path.join(ExtensionRootDir, 'out', 'client', 'azure-storage'); + // }) ], resolve: { extensions: ['.ts', '.js'], @@ -59,7 +87,7 @@ const config: webpack.Configuration = { }, output: { filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), + path: path.resolve(ExtensionRootDir, 'out', 'client'), libraryTarget: 'commonjs2', devtoolModuleFilenameTemplate: '../../[resource-path]' } diff --git a/build/webpack/webpack.extension.dependencies.config.js b/build/webpack/webpack.extension.dependencies.config.js index c228ff5e5cd7..92a1fa2cb383 100644 --- a/build/webpack/webpack.extension.dependencies.config.js +++ b/build/webpack/webpack.extension.dependencies.config.js @@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); +const constants_1 = require("../constants"); const config = { mode: 'production', target: 'node', @@ -38,7 +39,7 @@ const config = { }, output: { filename: '[name].js', - path: path.resolve(__dirname, '..', '..', 'out', 'client'), + path: path.resolve(constants_1.ExtensionRootDir, 'out', 'client'), libraryTarget: 'commonjs2', devtoolModuleFilenameTemplate: '../../[resource-path]' } diff --git a/build/webpack/webpack.extension.dependencies.config.ts b/build/webpack/webpack.extension.dependencies.config.ts new file mode 100644 index 000000000000..1dc90b1a452c --- /dev/null +++ b/build/webpack/webpack.extension.dependencies.config.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import * as path from 'path'; +import * as webpack from 'webpack'; +import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; +import { ExtensionRootDir } from '../constants'; + +const config: webpack.Configuration = { + mode: 'production', + target: 'node', + entry: { + unicode_category_Lu: './node_modules/unicode/category/Lu', + unicode_category_Ll: './node_modules/unicode/category/Ll', + unicode_category_Lt: './node_modules/unicode/category/Lt', + unicode_category_Lo: './node_modules/unicode/category/Lo', + unicode_category_Lm: './node_modules/unicode/category/Lm', + unicode_category_Nl: './node_modules/unicode/category/Nl', + unicode_category_Mn: './node_modules/unicode/category/Mn', + unicode_category_Mc: './node_modules/unicode/category/Mc', + unicode_category_Nd: './node_modules/unicode/category/Nd', + unicode_category_Pc: './node_modules/unicode/category/Pc', + '@jupyterlab/services': './node_modules/@jupyterlab/services', + 'azure-storage': './node_modules/azure-storage' + }, + devtool: 'source-map', + node: { + __dirname: false + }, + externals: [ + 'commonjs' + ], + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static' + }) + ], + resolve: { + extensions: ['.js'] + }, + output: { + filename: '[name].js', + path: path.resolve(ExtensionRootDir, 'out', 'client'), + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../../[resource-path]' + } +}; + +// tslint:disable-next-line:no-default-export +export default config; From 4612d32f22c0f7643f157b64164e90f942f2a8f2 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 16 Nov 2018 12:14:01 -0800 Subject: [PATCH 14/27] Automation --- build/webpack/constants.js | 32 +++++++++++++++++ build/webpack/constants.ts | 33 +++++++++++++++++ build/webpack/loaders/addHeader.js | 10 ++++++ build/webpack/loaders/addHeader.ts | 16 +++++++++ .../loaders/externalizeDependencies.js | 25 ++++++------- .../loaders/externalizeDependencies.ts | 26 +++++++------- build/webpack/webpack.extension.config.js | 33 ++++++++--------- build/webpack/webpack.extension.config.ts | 35 +++++++++++-------- .../webpack.extension.dependencies.config.js | 23 +++++------- .../webpack.extension.dependencies.config.ts | 24 +++++-------- package-lock.json | 28 +++++++++++++++ package.json | 5 ++- webpack.config.js | 8 ++--- 13 files changed, 204 insertions(+), 94 deletions(-) create mode 100644 build/webpack/constants.js create mode 100644 build/webpack/constants.ts create mode 100644 build/webpack/loaders/addHeader.js create mode 100644 build/webpack/loaders/addHeader.ts diff --git a/build/webpack/constants.js b/build/webpack/constants.js new file mode 100644 index 000000000000..0fc4cc86d44d --- /dev/null +++ b/build/webpack/constants.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.nodeModulesToExternalize = [ + // 'source-map-support', + 'unicode/category/Lu', + 'unicode/category/Ll', + 'unicode/category/Lt', + 'unicode/category/Lo', + 'unicode/category/Lm', + 'unicode/category/Nl', + 'unicode/category/Mn', + 'unicode/category/Mc', + 'unicode/category/Nd', + 'unicode/category/Pc' + // '@jupyterlab/services', + // 'azure-storage', + // 'lodash', + // 'request', + // 'semver', + // 'glob', + // 'getos', + // 'iconv-lite', + // 'sudo-prompt', + // 'diff-match-patch', + // 'xml2js', + // 'fs-extra', + // 'vscode-languageclient', + // 'vscode-debugadapter', + // 'rxjs' +]; diff --git a/build/webpack/constants.ts b/build/webpack/constants.ts new file mode 100644 index 000000000000..b5f0108135e5 --- /dev/null +++ b/build/webpack/constants.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +export const nodeModulesToExternalize = [ + // 'source-map-support', + 'unicode/category/Lu', + 'unicode/category/Ll', + 'unicode/category/Lt', + 'unicode/category/Lo', + 'unicode/category/Lm', + 'unicode/category/Nl', + 'unicode/category/Mn', + 'unicode/category/Mc', + 'unicode/category/Nd', + 'unicode/category/Pc' + // '@jupyterlab/services', + // 'azure-storage', + // 'lodash', + // 'request', + // 'semver', + // 'glob', + // 'getos', + // 'iconv-lite', + // 'sudo-prompt', + // 'diff-match-patch', + // 'xml2js', + // 'fs-extra', + // 'vscode-languageclient', + // 'vscode-debugadapter', + // 'rxjs' +]; diff --git a/build/webpack/loaders/addHeader.js b/build/webpack/loaders/addHeader.js new file mode 100644 index 000000000000..bc76b4b15299 --- /dev/null +++ b/build/webpack/loaders/addHeader.js @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const loader_utils_1 = require("loader-utils"); +function default_1(source) { + const options = loader_utils_1.getOptions(this); + return (options.header || '') + source; +} +exports.default = default_1; diff --git a/build/webpack/loaders/addHeader.ts b/build/webpack/loaders/addHeader.ts new file mode 100644 index 000000000000..303d9528f03a --- /dev/null +++ b/build/webpack/loaders/addHeader.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +import { getOptions } from 'loader-utils'; + +// tslint:disable:no-default-export no-invalid-this +export type Options = { + header: string; +}; + +export default function (source: string) { + const options = getOptions(this) as Options; + return (options.header || '') + source; +} diff --git a/build/webpack/loaders/externalizeDependencies.js b/build/webpack/loaders/externalizeDependencies.js index 7cbc61a18e4d..0a2340c1e2d9 100644 --- a/build/webpack/loaders/externalizeDependencies.js +++ b/build/webpack/loaders/externalizeDependencies.js @@ -2,23 +2,20 @@ // Licensed under the MIT License. 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +const constants_1 = require("../constants"); +function replaceModule(contents, moduleName, quotes) { + const stringToSearch = `${quotes}${moduleName}${quotes}`; + const stringToReplaceWith = `${quotes}./node_modules/${moduleName}${quotes}`; + return contents.replace(new RegExp(stringToSearch, 'gm'), stringToReplaceWith); +} // tslint:disable:no-default-export no-invalid-this function default_1(source) { - const sourcePath = this.resourcePath; - if (sourcePath.indexOf('node_modules') === -1) { - if (source.indexOf('unicode/category') > 0) { - source = source.replace(/\'unicode\/category\//gm, '\'./unicode_category_'); - source = source.replace(/"unicode\/category\//gm, '"./unicode_category_'); - } - if (source.indexOf('@jupyterlab\/services') > 0) { - source = source.replace(/\'@jupyterlab\/services\'/gm, '\'./@jupyterlab/services\''); - source = source.replace(/"@jupyterlab\/services"/gm, '"./@jupyterlab/services"'); - } - if (source.indexOf('azure-storage') > 0) { - source = source.replace(/\'azure-storage\'/gm, '\'./azure-storage\''); - source = source.replace(/"azure-storage"/gm, '"./azure-storage"'); + constants_1.nodeModulesToExternalize.forEach(moduleName => { + if (source.indexOf(moduleName) > 0) { + source = replaceModule(source, moduleName, '"'); + source = replaceModule(source, moduleName, '\''); } - } + }); return source; } exports.default = default_1; diff --git a/build/webpack/loaders/externalizeDependencies.ts b/build/webpack/loaders/externalizeDependencies.ts index 9292de4fb9fa..ae6531d6b34a 100644 --- a/build/webpack/loaders/externalizeDependencies.ts +++ b/build/webpack/loaders/externalizeDependencies.ts @@ -3,22 +3,20 @@ 'use strict'; +import { nodeModulesToExternalize } from '../constants'; + +function replaceModule(contents: string, moduleName: string, quotes: '"' | '\''): string { + const stringToSearch = `${quotes}${moduleName}${quotes}`; + const stringToReplaceWith = `${quotes}./node_modules/${moduleName}${quotes}`; + return contents.replace(new RegExp(stringToSearch, 'gm'), stringToReplaceWith); +} // tslint:disable:no-default-export no-invalid-this export default function (source: string) { - const sourcePath = this.resourcePath; - if (sourcePath.indexOf('node_modules') === -1) { - if (source.indexOf('unicode/category') > 0) { - source = source.replace(/\'unicode\/category\//gm, '\'./unicode_category_'); - source = source.replace(/"unicode\/category\//gm, '"./unicode_category_'); - } - if (source.indexOf('@jupyterlab\/services') > 0) { - source = source.replace(/\'@jupyterlab\/services\'/gm, '\'./@jupyterlab/services\''); - source = source.replace(/"@jupyterlab\/services"/gm, '"./@jupyterlab/services"'); - } - if (source.indexOf('azure-storage') > 0) { - source = source.replace(/\'azure-storage\'/gm, '\'./azure-storage\''); - source = source.replace(/"azure-storage"/gm, '"./azure-storage"'); + nodeModulesToExternalize.forEach(moduleName => { + if (source.indexOf(moduleName) > 0) { + source = replaceModule(source, moduleName, '"'); + source = replaceModule(source, moduleName, '\''); } - } + }); return source; } diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index f765cc838359..d6ec8a760d4d 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -8,7 +8,7 @@ const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin") const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); // tslint:disable-next-line:no-var-requires no-require-imports -const WrapperPlugin = require('wrapper-webpack-plugin'); +// const WrapperPlugin = require('wrapper-webpack-plugin'); const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json'); // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). @@ -19,7 +19,7 @@ function getListOfExistingModulesInOutDir() { return files.map(filePath => `./${filePath.slice(0, -3)}`); } const config = { - mode: 'production', + mode: 'development', target: 'node', entry: { extension: './src/client/extension.ts', @@ -31,6 +31,21 @@ const config = { }, module: { rules: [ + { + // JupyterServices imports node-fetch using `eval`. + test: require.resolve('@jupyterlab/services'), + use: 'imports-loader?_node_fetch=node-fetch' + }, + { + // JupyterServices imports node-fetch using `eval`. + test: require.resolve('@jupyterlab/services'), + use: 'imports-loader?_ws=ws' + }, + // { + // // Ensure source-map-support is injected as a + // test: /src\/client\/extension.ts$/, + // use: 'imports-loader?_source_map_support=source-map-support' + // }, { test: /\.ts$/, use: [ @@ -59,20 +74,6 @@ const config = { new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ analyzerMode: 'static' }), - new WrapperPlugin({ - test: /\.js$/, - header: 'require(\'source-map-support\').install();' - }) - // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource: { request: string }) => { - // const fileName = path.basename(resource.request); - // resource.request = path.join(ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); - // }), - // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource: { request: string }) => { - // resource.request = path.join(ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); - // }), - // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource: { request: string }) => { - // resource.request = path.join(ExtensionRootDir, 'out', 'client', 'azure-storage'); - // }) ], resolve: { extensions: ['.ts', '.js'], diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 8af9eb808d48..082c934e58e3 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -11,7 +11,7 @@ import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; // tslint:disable-next-line:no-var-requires no-require-imports -const WrapperPlugin = require('wrapper-webpack-plugin'); +// const WrapperPlugin = require('wrapper-webpack-plugin'); const configFileName = path.join(ExtensionRootDir, 'tsconfig.extension.json'); // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin @@ -24,7 +24,7 @@ function getListOfExistingModulesInOutDir() { } const config: webpack.Configuration = { - mode: 'production', + mode: 'development', target: 'node', entry: { extension: './src/client/extension.ts', @@ -36,6 +36,21 @@ const config: webpack.Configuration = { }, module: { rules: [ + { + // JupyterServices imports node-fetch using `eval`. + test: require.resolve('@jupyterlab/services'), + use: 'imports-loader?_node_fetch=node-fetch' + }, + { + // JupyterServices imports node-fetch using `eval`. + test: require.resolve('@jupyterlab/services'), + use: 'imports-loader?_ws=ws' + }, + // { + // // Ensure source-map-support is injected as a + // test: /src\/client\/extension.ts$/, + // use: 'imports-loader?_source_map_support=source-map-support' + // }, { test: /\.ts$/, use: [ @@ -64,19 +79,9 @@ const config: webpack.Configuration = { new BundleAnalyzerPlugin({ analyzerMode: 'static' }), - new WrapperPlugin({ - test: /\.js$/, - header: 'require(\'source-map-support\').install();' - }) - // new webpack.NormalModuleReplacementPlugin(/unicode\/category\//, (resource: { request: string }) => { - // const fileName = path.basename(resource.request); - // resource.request = path.join(ExtensionRootDir, 'out', 'client', `unicode_category_${fileName}`); - // }), - // new webpack.NormalModuleReplacementPlugin(/@jupyter\/services/, (resource: { request: string }) => { - // resource.request = path.join(ExtensionRootDir, 'out', 'client', '@jupyter', 'services'); - // }), - // new webpack.NormalModuleReplacementPlugin(/azure-storage/, (resource: { request: string }) => { - // resource.request = path.join(ExtensionRootDir, 'out', 'client', 'azure-storage'); + // new WrapperPlugin({ + // test: /\.js$/, + // header: 'require(\'./node_modules/source-map-support\').install();' // }) ], resolve: { diff --git a/build/webpack/webpack.extension.dependencies.config.js b/build/webpack/webpack.extension.dependencies.config.js index 92a1fa2cb383..91351123c257 100644 --- a/build/webpack/webpack.extension.dependencies.config.js +++ b/build/webpack/webpack.extension.dependencies.config.js @@ -5,28 +5,21 @@ Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); +const constants_2 = require("./constants"); +const entryItems = {}; +constants_2.nodeModulesToExternalize.forEach(moduleName => { + entryItems[`node_modules/${moduleName}`] = `./node_modules/${moduleName}`; +}); const config = { - mode: 'production', + mode: 'development', target: 'node', - entry: { - unicode_category_Lu: './node_modules/unicode/category/Lu', - unicode_category_Ll: './node_modules/unicode/category/Ll', - unicode_category_Lt: './node_modules/unicode/category/Lt', - unicode_category_Lo: './node_modules/unicode/category/Lo', - unicode_category_Lm: './node_modules/unicode/category/Lm', - unicode_category_Nl: './node_modules/unicode/category/Nl', - unicode_category_Mn: './node_modules/unicode/category/Mn', - unicode_category_Mc: './node_modules/unicode/category/Mc', - unicode_category_Nd: './node_modules/unicode/category/Nd', - unicode_category_Pc: './node_modules/unicode/category/Pc', - '@jupyterlab/services': './node_modules/@jupyterlab/services', - 'azure-storage': './node_modules/azure-storage' - }, + entry: entryItems, devtool: 'source-map', node: { __dirname: false }, externals: [ + 'vscode', 'commonjs' ], plugins: [ diff --git a/build/webpack/webpack.extension.dependencies.config.ts b/build/webpack/webpack.extension.dependencies.config.ts index 1dc90b1a452c..e1548505b8c1 100644 --- a/build/webpack/webpack.extension.dependencies.config.ts +++ b/build/webpack/webpack.extension.dependencies.config.ts @@ -7,29 +7,23 @@ import * as path from 'path'; import * as webpack from 'webpack'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; +import { nodeModulesToExternalize } from './constants'; + +const entryItems: { [key: string]: string } = {}; +nodeModulesToExternalize.forEach(moduleName => { + entryItems[`node_modules/${moduleName}`] = `./node_modules/${moduleName}`; +}); const config: webpack.Configuration = { - mode: 'production', + mode: 'development', target: 'node', - entry: { - unicode_category_Lu: './node_modules/unicode/category/Lu', - unicode_category_Ll: './node_modules/unicode/category/Ll', - unicode_category_Lt: './node_modules/unicode/category/Lt', - unicode_category_Lo: './node_modules/unicode/category/Lo', - unicode_category_Lm: './node_modules/unicode/category/Lm', - unicode_category_Nl: './node_modules/unicode/category/Nl', - unicode_category_Mn: './node_modules/unicode/category/Mn', - unicode_category_Mc: './node_modules/unicode/category/Mc', - unicode_category_Nd: './node_modules/unicode/category/Nd', - unicode_category_Pc: './node_modules/unicode/category/Pc', - '@jupyterlab/services': './node_modules/@jupyterlab/services', - 'azure-storage': './node_modules/azure-storage' - }, + entry: entryItems, devtool: 'source-map', node: { __dirname: false }, externals: [ + 'vscode', 'commonjs' ], plugins: [ diff --git a/package-lock.json b/package-lock.json index 4b1d9fbee487..95358f5a221b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1509,6 +1509,16 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/loader-utils": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.3.tgz", + "integrity": "sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt6SmFRxytq/i2w9LQYNQekEtGBz+pE3qG6fQTNvRg==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/webpack": "*" + } + }, "@types/lodash": { "version": "4.14.109", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.109.tgz", @@ -9294,6 +9304,24 @@ } } }, + "imports-loader": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.8.0.tgz", + "integrity": "sha512-kXWL7Scp8KQ4552ZcdVTeaQCZSLW+e6nJfp3cwUMB673T7Hr98Xjx5JK+ql7ADlJUvj1JS5O01RLbKoutN5QDQ==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", diff --git a/package.json b/package.json index 3b48fd77d44f..554f2a85a801 100644 --- a/package.json +++ b/package.json @@ -1722,7 +1722,6 @@ "request-progress": "^3.0.0", "rxjs": "^5.5.9", "semver": "^5.5.0", - "source-map-support": "^0.5.9", "sudo-prompt": "^8.2.0", "tmp": "^0.0.29", "tree-kill": "^1.2.0", @@ -1765,6 +1764,7 @@ "@types/iconv-lite": "^0.0.1", "@types/istanbul": "^0.4.29", "@types/jsdom": "^11.12.0", + "@types/loader-utils": "^1.1.3", "@types/lodash": "^4.14.104", "@types/md5": "^2.1.32", "@types/mocha": "^2.2.48", @@ -1820,10 +1820,12 @@ "gulp-watch": "^5.0.0", "html-webpack-plugin": "^3.2.0", "husky": "^1.1.2", + "imports-loader": "^0.8.0", "is-running": "^2.1.0", "istanbul": "^0.4.5", "jsdom": "^12.2.0", "json-loader": "^0.5.7", + "loader-utils": "^1.1.0", "mocha": "^5.0.4", "mocha-junit-reporter": "^1.17.0", "node-has-native-dependencies": "^1.0.2", @@ -1837,6 +1839,7 @@ "remap-istanbul": "^0.10.1", "retyped-diff-match-patch-tsd-ambient": "^1.0.0-0", "shortid": "^2.2.8", + "source-map-support": "^0.5.9", "style-loader": "^0.23.1", "styled-jsx": "^3.1.0", "svg-inline-loader": "^0.8.0", diff --git a/webpack.config.js b/webpack.config.js index b9f092889672..85b1ea7befba 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,8 +16,8 @@ module.exports = [ mode: 'production', devtool: 'source-map', }), - merge(extension, { - mode: 'production', - devtool: 'source-map', - }) + // merge(extension, { + // mode: 'production', + // devtool: 'source-map', + // }) ]; From 93cee6ffa36eb2bafd8f6f03b5f5df6701a9e445 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 16 Nov 2018 12:55:34 -0800 Subject: [PATCH 15/27] Updated gulp and package.json --- gulpfile.js | 2 +- package.datascience-ui.dependencies.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 89de5ceb5171..4f5902811d1e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -170,7 +170,7 @@ async function checkDatascienceDependencies() { if (modulesInPackageLock.some(dependency => dependency.indexOf('/') !== dependency.lastIndexOf('/'))) { throwAndLogError('Dependencies detected with more than one \'/\', please update this script.'); } - json.children[0].modules.forEach(m => { + json.chunks[0].modules.forEach(m => { const name = m.name; if (!name.startsWith('./node_modules')) { return; diff --git a/package.datascience-ui.dependencies.json b/package.datascience-ui.dependencies.json index 4175452faa9b..7e32b49a61ad 100644 --- a/package.datascience-ui.dependencies.json +++ b/package.datascience-ui.dependencies.json @@ -84,8 +84,8 @@ "lodash.set", "lodash.uniq", "lodash", - "markdown-escapes", "martinez-polygon-clipping", + "markdown-escapes", "material-colors", "mdast-add-list-metadata", "memoize-one", diff --git a/package.json b/package.json index 554f2a85a801..bdb8f15b7474 100644 --- a/package.json +++ b/package.json @@ -1676,7 +1676,7 @@ "vscode:prepublish": "gulp checkNativeDependencies && gulp check-datascience-dependencies && tsc -p ./ && webpack", "compile": "tsc -watch -p ./", "compile-webviews-watch": "npx webpack --config webpack.datascience-ui.config.js --watch", - "dump-datascience-webpack-stats": "webpack --profile --json > tmp/ds-stats.json", + "dump-datascience-webpack-stats": "webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json", "compile-webviews": "npx webpack --config webpack.datascience-ui.config.js", "postinstall": "node ./node_modules/vscode/bin/install", "test": "node ./out/test/standardTest.js && node ./out/test/multiRootTest.js", From ba0baf971794d384d3cd904794e463aadd0d8a85 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 16 Nov 2018 13:59:12 -0800 Subject: [PATCH 16/27] Prepare gulp --- build/constants.js | 1 + build/constants.ts | 2 + build/webpack/common.js | 51 +++++++++++++++++++ build/webpack/{constants.ts => common.ts} | 24 +++++++++ .../loaders/externalizeDependencies.js | 4 +- .../loaders/externalizeDependencies.ts | 2 +- .../webpack/webpack.datascience-ui.config.js | 2 + .../webpack/webpack.datascience-ui.config.ts | 2 + build/webpack/webpack.extension.config.js | 10 ++-- build/webpack/webpack.extension.config.ts | 5 +- .../webpack.extension.dependencies.config.js | 9 ++-- .../webpack.extension.dependencies.config.ts | 6 +-- gulpfile.js | 40 ++++++++++----- package.json | 3 +- src/test/common.ts | 23 +++++++++ webpack.datascience-ui.config.js | 2 + 16 files changed, 151 insertions(+), 35 deletions(-) create mode 100644 build/webpack/common.js rename build/webpack/{constants.ts => common.ts} (51%) diff --git a/build/constants.js b/build/constants.js index 4f4ec35998d7..e0a56db3e4a3 100644 --- a/build/constants.js +++ b/build/constants.js @@ -11,3 +11,4 @@ function getListOfExcludedFiles() { return files.map(file => path.join(exports.ExtensionRootDir, file.replace(/\//g, path.sep))); } exports.filesNotToCheck = getListOfExcludedFiles(); +exports.isCI = process.env.TRAVIS === 'true' || process.env.TF_BUILD !== undefined; diff --git a/build/constants.ts b/build/constants.ts index 4b8ba9fb07dd..7866cdedc2e8 100644 --- a/build/constants.ts +++ b/build/constants.ts @@ -15,3 +15,5 @@ function getListOfExcludedFiles() { } export const filesNotToCheck: string[] = getListOfExcludedFiles(); + +export const isCI = process.env.TRAVIS === 'true' || process.env.TF_BUILD !== undefined; diff --git a/build/webpack/common.js b/build/webpack/common.js new file mode 100644 index 000000000000..2dd5a2c2a3ef --- /dev/null +++ b/build/webpack/common.js @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const webpack = require("webpack"); +const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); +const constants_1 = require("../constants"); +exports.nodeModulesToExternalize = [ + // 'source-map-support', + 'unicode/category/Lu', + 'unicode/category/Ll', + 'unicode/category/Lt', + 'unicode/category/Lo', + 'unicode/category/Lm', + 'unicode/category/Nl', + 'unicode/category/Mn', + 'unicode/category/Mc', + 'unicode/category/Nd', + 'unicode/category/Pc' + // '@jupyterlab/services', + // 'azure-storage', + // 'lodash', + // 'request', + // 'semver', + // 'glob', + // 'getos', + // 'iconv-lite', + // 'sudo-prompt', + // 'diff-match-patch', + // 'xml2js', + // 'fs-extra', + // 'vscode-languageclient', + // 'vscode-debugadapter', + // 'rxjs' +]; +// tslint:disable-next-line:no-any +function progressReporter(percentage, message, ...args) { + // tslint:disable-next-line:no-console + console.info(percentage, message, ...args); +} +function getDefaultPlugins(name) { + const plugins = [new webpack.ProgressPlugin(progressReporter)]; + if (!constants_1.isCI) { + plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ + analyzerMode: 'static', + reportFilename: `${name}.html` + })); + } + return plugins; +} +exports.getDefaultPlugins = getDefaultPlugins; diff --git a/build/webpack/constants.ts b/build/webpack/common.ts similarity index 51% rename from build/webpack/constants.ts rename to build/webpack/common.ts index b5f0108135e5..8258ac093ff4 100644 --- a/build/webpack/constants.ts +++ b/build/webpack/common.ts @@ -1,8 +1,13 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; +import * as webpack from 'webpack'; +import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; +import { isCI } from '../constants'; + export const nodeModulesToExternalize = [ // 'source-map-support', 'unicode/category/Lu', @@ -31,3 +36,22 @@ export const nodeModulesToExternalize = [ // 'vscode-debugadapter', // 'rxjs' ]; + +// tslint:disable-next-line:no-any +function progressReporter(percentage: any, message: any, ...args: any[]) { + // tslint:disable-next-line:no-console + console.info(percentage, message, ...args); +} + +export function getDefaultPlugins(name: 'extension' | 'debugger' | 'dependencies' | 'datascience-ui') { + const plugins = [new webpack.ProgressPlugin(progressReporter)]; + if (!isCI) { + plugins.push( + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + reportFilename: `${name}.html` + }) + ); + } + return plugins; +} diff --git a/build/webpack/loaders/externalizeDependencies.js b/build/webpack/loaders/externalizeDependencies.js index 0a2340c1e2d9..9ae5ec711517 100644 --- a/build/webpack/loaders/externalizeDependencies.js +++ b/build/webpack/loaders/externalizeDependencies.js @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); -const constants_1 = require("../constants"); +const common_1 = require("../common"); function replaceModule(contents, moduleName, quotes) { const stringToSearch = `${quotes}${moduleName}${quotes}`; const stringToReplaceWith = `${quotes}./node_modules/${moduleName}${quotes}`; @@ -10,7 +10,7 @@ function replaceModule(contents, moduleName, quotes) { } // tslint:disable:no-default-export no-invalid-this function default_1(source) { - constants_1.nodeModulesToExternalize.forEach(moduleName => { + common_1.nodeModulesToExternalize.forEach(moduleName => { if (source.indexOf(moduleName) > 0) { source = replaceModule(source, moduleName, '"'); source = replaceModule(source, moduleName, '\''); diff --git a/build/webpack/loaders/externalizeDependencies.ts b/build/webpack/loaders/externalizeDependencies.ts index ae6531d6b34a..a6771cad5ad3 100644 --- a/build/webpack/loaders/externalizeDependencies.ts +++ b/build/webpack/loaders/externalizeDependencies.ts @@ -3,7 +3,7 @@ 'use strict'; -import { nodeModulesToExternalize } from '../constants'; +import { nodeModulesToExternalize } from '../common'; function replaceModule(contents: string, moduleName: string, quotes: '"' | '\''): string { const stringToSearch = `${quotes}${moduleName}${quotes}`; diff --git a/build/webpack/webpack.datascience-ui.config.js b/build/webpack/webpack.datascience-ui.config.js index c5bc3b348974..70b4d6e649d0 100644 --- a/build/webpack/webpack.datascience-ui.config.js +++ b/build/webpack/webpack.datascience-ui.config.js @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const CopyWebpackPlugin = require("copy-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); +const common_1 = require("./common"); // tslint:disable-next-line:no-var-requires no-require-imports const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin'); const configFileName = 'tsconfig.datascience-ui.json'; @@ -24,6 +25,7 @@ const config = { fs: 'empty' }, plugins: [ + ...common_1.getDefaultPlugins('datascience-ui'), new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', filename: 'datascience-ui/history-react/index.html' }), new FixDefaultImportPlugin(), new CopyWebpackPlugin([ diff --git a/build/webpack/webpack.datascience-ui.config.ts b/build/webpack/webpack.datascience-ui.config.ts index c5723f97ec59..07256d010579 100644 --- a/build/webpack/webpack.datascience-ui.config.ts +++ b/build/webpack/webpack.datascience-ui.config.ts @@ -7,6 +7,7 @@ import * as CopyWebpackPlugin from 'copy-webpack-plugin'; import * as HtmlWebpackPlugin from 'html-webpack-plugin'; import * as path from 'path'; import * as webpack from 'webpack'; +import { getDefaultPlugins } from './common'; // tslint:disable-next-line:no-var-requires no-require-imports const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin'); @@ -29,6 +30,7 @@ const config: webpack.Configuration = { fs: 'empty' }, plugins: [ + ...getDefaultPlugins('datascience-ui'), new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', filename: 'datascience-ui/history-react/index.html' }), new FixDefaultImportPlugin(), new CopyWebpackPlugin([ diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index d6ec8a760d4d..ea897f03bc2c 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const glob = require("glob"); const path = require("path"); const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); -const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); +const common_1 = require("./common"); // tslint:disable-next-line:no-var-requires no-require-imports // const WrapperPlugin = require('wrapper-webpack-plugin'); const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json'); @@ -71,9 +71,11 @@ const config = { ...existingModulesInOutDir ], plugins: [ - new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ - analyzerMode: 'static' - }), + ...common_1.getDefaultPlugins('extension') + // new WrapperPlugin({ + // test: /\.js$/, + // header: 'require(\'./node_modules/source-map-support\').install();' + // }) ], resolve: { extensions: ['.ts', '.js'], diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 082c934e58e3..239ddca1d470 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -9,6 +9,7 @@ import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; import * as webpack from 'webpack'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; +import { getDefaultPlugins } from './common'; // tslint:disable-next-line:no-var-requires no-require-imports // const WrapperPlugin = require('wrapper-webpack-plugin'); @@ -76,9 +77,7 @@ const config: webpack.Configuration = { ...existingModulesInOutDir ], plugins: [ - new BundleAnalyzerPlugin({ - analyzerMode: 'static' - }), + ...getDefaultPlugins('extension') // new WrapperPlugin({ // test: /\.js$/, // header: 'require(\'./node_modules/source-map-support\').install();' diff --git a/build/webpack/webpack.extension.dependencies.config.js b/build/webpack/webpack.extension.dependencies.config.js index 91351123c257..011d1ee8dc1d 100644 --- a/build/webpack/webpack.extension.dependencies.config.js +++ b/build/webpack/webpack.extension.dependencies.config.js @@ -3,11 +3,10 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); -const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); -const constants_2 = require("./constants"); +const common_1 = require("./common"); const entryItems = {}; -constants_2.nodeModulesToExternalize.forEach(moduleName => { +common_1.nodeModulesToExternalize.forEach(moduleName => { entryItems[`node_modules/${moduleName}`] = `./node_modules/${moduleName}`; }); const config = { @@ -23,9 +22,7 @@ const config = { 'commonjs' ], plugins: [ - new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ - analyzerMode: 'static' - }) + ...common_1.getDefaultPlugins('dependencies') ], resolve: { extensions: ['.js'] diff --git a/build/webpack/webpack.extension.dependencies.config.ts b/build/webpack/webpack.extension.dependencies.config.ts index e1548505b8c1..7c5f2b4033b2 100644 --- a/build/webpack/webpack.extension.dependencies.config.ts +++ b/build/webpack/webpack.extension.dependencies.config.ts @@ -7,7 +7,7 @@ import * as path from 'path'; import * as webpack from 'webpack'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; -import { nodeModulesToExternalize } from './constants'; +import { getDefaultPlugins, nodeModulesToExternalize } from './common'; const entryItems: { [key: string]: string } = {}; nodeModulesToExternalize.forEach(moduleName => { @@ -27,9 +27,7 @@ const config: webpack.Configuration = { 'commonjs' ], plugins: [ - new BundleAnalyzerPlugin({ - analyzerMode: 'static' - }) + ...getDefaultPlugins('dependencies') ], resolve: { extensions: ['.js'] diff --git a/gulpfile.js b/gulpfile.js index 4f5902811d1e..928b3ce465e0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -101,6 +101,8 @@ gulp.task('cover:clean', () => del(['coverage', 'debug_coverage*'])); gulp.task('output:clean', () => del(['coverage', 'debug_coverage*'])); +gulp.task('clean:cleanExceptTests', () => del(['out/client', 'out/datascience-ui', 'out/server'])); + gulp.task('clean', gulp.parallel('output:clean', 'cover:clean')); gulp.task('clean:ptvsd', () => del(['coverage', 'pythonFiles/experimental/ptvsd/*'])); @@ -114,34 +116,44 @@ gulp.task('checkNativeDependencies', (done) => { gulp.task('cover:enable', () => { return gulp.src("./build/coverconfig.json") - .pipe(jeditor((json) => { - json.enabled = true; - return json; - })) - .pipe(gulp.dest("./out", { 'overwrite': true })); + .pipe(jeditor((json) => { + json.enabled = true; + return json; + })) + .pipe(gulp.dest("./out", { 'overwrite': true })); }); gulp.task('cover:disable', () => { return gulp.src("./build/coverconfig.json") - .pipe(jeditor((json) => { + .pipe(jeditor((json) => { json.enabled = false; return json; })) .pipe(gulp.dest("./out", { 'overwrite': true })); -}); + }); -/** - * Inline CSS into the coverage report for better visualizations on - * the VSTS report page for code coverage. - */ -gulp.task('inlinesource', () => { + /** + * Inline CSS into the coverage report for better visualizations on + * the VSTS report page for code coverage. + */ + gulp.task('inlinesource', () => { return gulp.src('./coverage/lcov-report/*.html') - .pipe(inlinesource({ attribute: false })) - .pipe(gulp.dest('./coverage/lcov-report-inline')); + .pipe(inlinesource({ attribute: false })) + .pipe(gulp.dest('./coverage/lcov-report-inline')); }); gulp.task('check-datascience-dependencies', () => checkDatascienceDependencies()); + +gulp.task("compile", () => { + const tsProject = ts.createProject("tsconfig.json"); + return tsProject.src() + .pipe(tsProject()) + .js.pipe(gulp.dest("out")); +}); + +gulp.task('prePublishBundle', gulp.series('checkNativeDependencies','check-datascience-dependencies', 'compile', 'clean:cleanExceptTests')); + function buildDatascienceDependencies() { fsExtra.ensureDirSync(path.join(__dirname, 'tmp')); spawn.sync('npm', ['run', 'dump-datascience-webpack-stats']); diff --git a/package.json b/package.json index bdb8f15b7474..d95feef421a6 100644 --- a/package.json +++ b/package.json @@ -1673,7 +1673,8 @@ ] }, "scripts": { - "vscode:prepublish": "gulp checkNativeDependencies && gulp check-datascience-dependencies && tsc -p ./ && webpack", + "vscode:prepublish": "gulp checkNativeDependencies && gulp check-datascience-dependencies && gulp compile && webpack --inline --progress", + "prePublishBundle": "gulp prePublishBundle && webpack --inline --progress && webpack --config ./build/webpack/webpack.extension.config.js --inline --progress ", "compile": "tsc -watch -p ./", "compile-webviews-watch": "npx webpack --config webpack.datascience-ui.config.js --watch", "dump-datascience-webpack-stats": "webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json", diff --git a/src/test/common.ts b/src/test/common.ts index c044fcf4a25c..8a7445e294bb 100644 --- a/src/test/common.ts +++ b/src/test/common.ts @@ -2,6 +2,8 @@ // Licensed under the MIT License. 'use strict'; +// tslint:disable:no-console no-require-imports no-var-requires + import * as fs from 'fs-extra'; import * as glob from 'glob'; import * as path from 'path'; @@ -18,6 +20,7 @@ import { noop } from '../client/common/utils/misc'; import { getOSType, OSType } from '../client/common/utils/platform'; import { IServiceContainer } from '../client/ioc/types'; import { IS_MULTI_ROOT_TEST } from './initialize'; +const StreamZip = require('node-stream-zip'); export { sleep } from './core'; @@ -305,3 +308,23 @@ export async function isPythonVersion(...versions: string[]): Promise { export interface IExtensionTestApi extends IExtensionApi { serviceContainer: IServiceContainer; } + +export async function unzip(zipFile: string, targetFolder: string): Promise { + await fs.ensureDir(targetFolder); + return new Promise((resolve, reject) => { + const zip = new StreamZip({ + file: zipFile, + storeEntries: true + }); + zip.on('ready', async () => { + zip.extract('extension', targetFolder, err => { + if (err) { + reject(err); + } else { + resolve(); + } + zip.close(); + }); + }); + }); +} diff --git a/webpack.datascience-ui.config.js b/webpack.datascience-ui.config.js index b133f01805cb..1c8706b3305b 100644 --- a/webpack.datascience-ui.config.js +++ b/webpack.datascience-ui.config.js @@ -4,6 +4,7 @@ const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin') const configFileName = 'tsconfig.datascience-ui.json'; +const common = require('./build/webpack/common'); module.exports = { entry: ['babel-polyfill', './src/datascience-ui/history-react/index.tsx'], @@ -22,6 +23,7 @@ module.exports = { fs: 'empty' }, plugins: [ + ...common.getDefaultPlugins('datascience-ui'), new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', baseUrl: path.join(__dirname, 'out', 'dummy'), filename: './datascience-ui/history-react/index.html' }), new FixDefaultImportPlugin(), new CopyWebpackPlugin([ From f712fc8a96e433c6a039737c664db904f59b5fd7 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 16 Nov 2018 15:06:36 -0800 Subject: [PATCH 17/27] package.json changes --- build/webpack/common.js | 8 +--- build/webpack/common.ts | 10 +---- .../webpack/webpack.datascience-ui.config.js | 4 +- .../webpack/webpack.datascience-ui.config.ts | 4 +- build/webpack/webpack.extension.config.js | 2 +- build/webpack/webpack.extension.config.ts | 2 +- .../webpack.extension.dependencies.config.js | 2 +- .../webpack.extension.dependencies.config.ts | 2 +- gulpfile.js | 39 +++++++++++++------ package-lock.json | 22 ++++++++++- package.json | 6 ++- webpack.datascience-ui.config.js | 1 - 12 files changed, 62 insertions(+), 40 deletions(-) diff --git a/build/webpack/common.js b/build/webpack/common.js index 2dd5a2c2a3ef..930763ef705a 100644 --- a/build/webpack/common.js +++ b/build/webpack/common.js @@ -2,7 +2,6 @@ // Licensed under the MIT License. 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); -const webpack = require("webpack"); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); exports.nodeModulesToExternalize = [ @@ -33,13 +32,8 @@ exports.nodeModulesToExternalize = [ // 'vscode-debugadapter', // 'rxjs' ]; -// tslint:disable-next-line:no-any -function progressReporter(percentage, message, ...args) { - // tslint:disable-next-line:no-console - console.info(percentage, message, ...args); -} function getDefaultPlugins(name) { - const plugins = [new webpack.ProgressPlugin(progressReporter)]; + const plugins = []; if (!constants_1.isCI) { plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ analyzerMode: 'static', diff --git a/build/webpack/common.ts b/build/webpack/common.ts index 8258ac093ff4..033e785169d1 100644 --- a/build/webpack/common.ts +++ b/build/webpack/common.ts @@ -4,10 +4,8 @@ 'use strict'; -import * as webpack from 'webpack'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { isCI } from '../constants'; - export const nodeModulesToExternalize = [ // 'source-map-support', 'unicode/category/Lu', @@ -37,14 +35,8 @@ export const nodeModulesToExternalize = [ // 'rxjs' ]; -// tslint:disable-next-line:no-any -function progressReporter(percentage: any, message: any, ...args: any[]) { - // tslint:disable-next-line:no-console - console.info(percentage, message, ...args); -} - export function getDefaultPlugins(name: 'extension' | 'debugger' | 'dependencies' | 'datascience-ui') { - const plugins = [new webpack.ProgressPlugin(progressReporter)]; + const plugins = []; if (!isCI) { plugins.push( new BundleAnalyzerPlugin({ diff --git a/build/webpack/webpack.datascience-ui.config.js b/build/webpack/webpack.datascience-ui.config.js index 70b4d6e649d0..98e1f0cdee3e 100644 --- a/build/webpack/webpack.datascience-ui.config.js +++ b/build/webpack/webpack.datascience-ui.config.js @@ -16,11 +16,11 @@ const config = { filename: 'datascience-ui/history-react/index_bundle.js', publicPath: path.join(__dirname, '..', '..') }, - mode: 'development', + mode: 'production', // Use 'eval' for release and `eval-source-map` for development. // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, // this seems to prevent chrome from downloading the source maps) - devtool: 'eval-source-map', + devtool: 'eval', node: { fs: 'empty' }, diff --git a/build/webpack/webpack.datascience-ui.config.ts b/build/webpack/webpack.datascience-ui.config.ts index 07256d010579..b67af6800ae3 100644 --- a/build/webpack/webpack.datascience-ui.config.ts +++ b/build/webpack/webpack.datascience-ui.config.ts @@ -21,11 +21,11 @@ const config: webpack.Configuration = { filename: 'datascience-ui/history-react/index_bundle.js', publicPath: path.join(__dirname, '..', '..') }, - mode: 'development', // Leave as is, we'll need to see stack traces when there are errors. + mode: 'production', // Leave as is, we'll need to see stack traces when there are errors. // Use 'eval' for release and `eval-source-map` for development. // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, // this seems to prevent chrome from downloading the source maps) - devtool: 'eval-source-map', + devtool: 'eval', node: { fs: 'empty' }, diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index ea897f03bc2c..a86a1bd57e79 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -19,7 +19,7 @@ function getListOfExistingModulesInOutDir() { return files.map(filePath => `./${filePath.slice(0, -3)}`); } const config = { - mode: 'development', + mode: 'production', target: 'node', entry: { extension: './src/client/extension.ts', diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 239ddca1d470..39cfe3d09d02 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -25,7 +25,7 @@ function getListOfExistingModulesInOutDir() { } const config: webpack.Configuration = { - mode: 'development', + mode: 'production', target: 'node', entry: { extension: './src/client/extension.ts', diff --git a/build/webpack/webpack.extension.dependencies.config.js b/build/webpack/webpack.extension.dependencies.config.js index 011d1ee8dc1d..560bb0f1821c 100644 --- a/build/webpack/webpack.extension.dependencies.config.js +++ b/build/webpack/webpack.extension.dependencies.config.js @@ -10,7 +10,7 @@ common_1.nodeModulesToExternalize.forEach(moduleName => { entryItems[`node_modules/${moduleName}`] = `./node_modules/${moduleName}`; }); const config = { - mode: 'development', + mode: 'production', target: 'node', entry: entryItems, devtool: 'source-map', diff --git a/build/webpack/webpack.extension.dependencies.config.ts b/build/webpack/webpack.extension.dependencies.config.ts index 7c5f2b4033b2..b03cb99396bc 100644 --- a/build/webpack/webpack.extension.dependencies.config.ts +++ b/build/webpack/webpack.extension.dependencies.config.ts @@ -15,7 +15,7 @@ nodeModulesToExternalize.forEach(moduleName => { }); const config: webpack.Configuration = { - mode: 'development', + mode: 'production', target: 'node', entry: entryItems, devtool: 'source-map', diff --git a/gulpfile.js b/gulpfile.js index 928b3ce465e0..684af0fd8977 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -116,16 +116,16 @@ gulp.task('checkNativeDependencies', (done) => { gulp.task('cover:enable', () => { return gulp.src("./build/coverconfig.json") - .pipe(jeditor((json) => { - json.enabled = true; - return json; - })) - .pipe(gulp.dest("./out", { 'overwrite': true })); + .pipe(jeditor((json) => { + json.enabled = true; + return json; + })) + .pipe(gulp.dest("./out", { 'overwrite': true })); }); gulp.task('cover:disable', () => { return gulp.src("./build/coverconfig.json") - .pipe(jeditor((json) => { + .pipe(jeditor((json) => { json.enabled = false; return json; })) @@ -138,8 +138,8 @@ gulp.task('cover:disable', () => { */ gulp.task('inlinesource', () => { return gulp.src('./coverage/lcov-report/*.html') - .pipe(inlinesource({ attribute: false })) - .pipe(gulp.dest('./coverage/lcov-report-inline')); + .pipe(inlinesource({ attribute: false })) + .pipe(gulp.dest('./coverage/lcov-report-inline')); }); gulp.task('check-datascience-dependencies', () => checkDatascienceDependencies()); @@ -148,12 +148,29 @@ gulp.task('check-datascience-dependencies', () => checkDatascienceDependencies() gulp.task("compile", () => { const tsProject = ts.createProject("tsconfig.json"); return tsProject.src() - .pipe(tsProject()) - .js.pipe(gulp.dest("out")); + .pipe(tsProject()) + .js.pipe(gulp.dest("out")); +}); + + +gulp.task('compile-webviews', async () => spawnAsync('npx', ['webpack', '--config', 'webpack.datascience-ui.config.js', '--mode', 'production'])); +gulp.task('webpack', async () => { + await spawnAsync('npx', ['webpack', '--mode', 'production', '--inline', '--progress']); + await spawnAsync('npx', ['webpack', '--config', './build/webpack/webpack.extension.config.js', '--mode', 'production', '--inline', '--progress']); }); -gulp.task('prePublishBundle', gulp.series('checkNativeDependencies','check-datascience-dependencies', 'compile', 'clean:cleanExceptTests')); +gulp.task('prePublishWebpack', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'clean:cleanExceptTests', 'webpack')); +gulp.task('prePublishNonWebpack', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile-webviews')); +function spawnAsync(command, args) { + return new Promise((resolve, reject) => { + const proc = spawn(command, args, { cwd: __dirname }); + proc.stdout.on('data', data => console.log(data.toString())); + proc.stderr.on('data', data => console.error(data.toString())); + proc.on('close', () => resolve()); + proc.on('error', error => reject(error)); + }); +} function buildDatascienceDependencies() { fsExtra.ensureDirSync(path.join(__dirname, 'tmp')); spawn.sync('npm', ['run', 'dump-datascience-webpack-stats']); diff --git a/package-lock.json b/package-lock.json index 95358f5a221b..a1316009e484 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1558,6 +1558,15 @@ "integrity": "sha512-zeh+xd2pcCvWm1XtWLR4v5pzZMybKeq6X8Q4cIZMMx8GmyKDUfJaOtw+JaONHUQt5ncKFXezl8QGIDQsSF5YfA==", "dev": true }, + "@types/progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-1Smw4LvkCM4zgie7Zo/GtzrMx1Zlq1XVfPoOBXPLIkmtep06wBE7sXupVDq7MXWrHCYtsM0d6i5eF6OM+LJJrQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/promisify-node": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@types/promisify-node/-/promisify-node-0.4.0.tgz", @@ -3343,7 +3352,8 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -12657,6 +12667,12 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "dev": true + }, "promise": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.1.tgz", @@ -14270,6 +14286,7 @@ "version": "0.5.9", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -14278,7 +14295,8 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, diff --git a/package.json b/package.json index d95feef421a6..220ae363b4e2 100644 --- a/package.json +++ b/package.json @@ -1674,11 +1674,11 @@ }, "scripts": { "vscode:prepublish": "gulp checkNativeDependencies && gulp check-datascience-dependencies && gulp compile && webpack --inline --progress", - "prePublishBundle": "gulp prePublishBundle && webpack --inline --progress && webpack --config ./build/webpack/webpack.extension.config.js --inline --progress ", + "package": "gulp prePublishWebpack && vsce package", "compile": "tsc -watch -p ./", "compile-webviews-watch": "npx webpack --config webpack.datascience-ui.config.js --watch", "dump-datascience-webpack-stats": "webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json", - "compile-webviews": "npx webpack --config webpack.datascience-ui.config.js", + "compile-webviews": "gulp compile-webviews", "postinstall": "node ./node_modules/vscode/bin/install", "test": "node ./out/test/standardTest.js && node ./out/test/multiRootTest.js", "test:unittests": "node ./out/test/unittests.js", @@ -1771,6 +1771,7 @@ "@types/mocha": "^2.2.48", "@types/node": "9.4.7", "@types/prismjs": "^1.9.0", + "@types/progress": "^2.0.1", "@types/promisify-node": "^0.4.0", "@types/react": "^16.4.14", "@types/react-dom": "^16.0.8", @@ -1831,6 +1832,7 @@ "mocha-junit-reporter": "^1.17.0", "node-has-native-dependencies": "^1.0.2", "prismjs": "^1.15.0", + "progress": "^2.0.1", "raw-loader": "^0.5.1", "react": "^16.5.2", "react-dev-utils": "^5.0.2", diff --git a/webpack.datascience-ui.config.js b/webpack.datascience-ui.config.js index 1c8706b3305b..50a52d0e7301 100644 --- a/webpack.datascience-ui.config.js +++ b/webpack.datascience-ui.config.js @@ -4,7 +4,6 @@ const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin') const configFileName = 'tsconfig.datascience-ui.json'; -const common = require('./build/webpack/common'); module.exports = { entry: ['babel-polyfill', './src/datascience-ui/history-react/index.tsx'], From dfc92a3644e548f7ffb45c6c02aa94b83d7b8d05 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 16 Nov 2018 16:29:58 -0800 Subject: [PATCH 18/27] More gulp file changes --- build/webpack/constants.js | 32 ------------------- build/webpack/loaders/fixEvalRequire.js | 23 +++++++++++++ build/webpack/loaders/fixEvalRequire.ts | 23 +++++++++++++ build/webpack/webpack.extension.config.js | 9 ++++++ build/webpack/webpack.extension.config.ts | 9 ++++++ gulpfile.js | 11 +++++-- src/testMultiRootWkspc/multi.code-workspace | 3 ++ .../smokeTests/testExecInTerminal.log | 1 + .../smokeTests/testExecInTerminal.py | 7 ++++ 9 files changed, 83 insertions(+), 35 deletions(-) delete mode 100644 build/webpack/constants.js create mode 100644 build/webpack/loaders/fixEvalRequire.js create mode 100644 build/webpack/loaders/fixEvalRequire.ts create mode 100644 src/testMultiRootWkspc/smokeTests/testExecInTerminal.log create mode 100644 src/testMultiRootWkspc/smokeTests/testExecInTerminal.py diff --git a/build/webpack/constants.js b/build/webpack/constants.js deleted file mode 100644 index 0fc4cc86d44d..000000000000 --- a/build/webpack/constants.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.nodeModulesToExternalize = [ - // 'source-map-support', - 'unicode/category/Lu', - 'unicode/category/Ll', - 'unicode/category/Lt', - 'unicode/category/Lo', - 'unicode/category/Lm', - 'unicode/category/Nl', - 'unicode/category/Mn', - 'unicode/category/Mc', - 'unicode/category/Nd', - 'unicode/category/Pc' - // '@jupyterlab/services', - // 'azure-storage', - // 'lodash', - // 'request', - // 'semver', - // 'glob', - // 'getos', - // 'iconv-lite', - // 'sudo-prompt', - // 'diff-match-patch', - // 'xml2js', - // 'fs-extra', - // 'vscode-languageclient', - // 'vscode-debugadapter', - // 'rxjs' -]; diff --git a/build/webpack/loaders/fixEvalRequire.js b/build/webpack/loaders/fixEvalRequire.js new file mode 100644 index 000000000000..53ae03e46b84 --- /dev/null +++ b/build/webpack/loaders/fixEvalRequire.js @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +// tslint:disable:no-default-export no-invalid-this +function default_1(source) { + if (source.indexOf('eval') > 0) { + let matches = source.match(/eval\('require'\)\('.*'\)/gm) || []; + matches.forEach(item => { + const moduleName = item.split('\'')[3]; + const stringToReplaceWith = `require('${moduleName}')`; + source = source.replace(item, stringToReplaceWith); + }); + matches = source.match(/eval\("require"\)\(".*"\)/gm) || []; + matches.forEach(item => { + const moduleName = item.split('\'')[3]; + const stringToReplaceWith = `require("${moduleName}")`; + source = source.replace(item, stringToReplaceWith); + }); + } + return source; +} +exports.default = default_1; diff --git a/build/webpack/loaders/fixEvalRequire.ts b/build/webpack/loaders/fixEvalRequire.ts new file mode 100644 index 000000000000..7cdc031d830a --- /dev/null +++ b/build/webpack/loaders/fixEvalRequire.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +'use strict'; + +// tslint:disable:no-default-export no-invalid-this +export default function (source: string) { + if (source.indexOf('eval') > 0) { + let matches = source.match(/eval\('require'\)\('.*'\)/gm) || []; + matches.forEach(item => { + const moduleName = item.split('\'')[3]; + const stringToReplaceWith = `require('${moduleName}')`; + source = source.replace(item, stringToReplaceWith); + }); + matches = source.match(/eval\("require"\)\(".*"\)/gm) || []; + matches.forEach(item => { + const moduleName = item.split('\'')[3]; + const stringToReplaceWith = `require("${moduleName}")`; + source = source.replace(item, stringToReplaceWith); + }); + } + return source; +} diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index a86a1bd57e79..99983bd4489e 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -41,6 +41,15 @@ const config = { test: require.resolve('@jupyterlab/services'), use: 'imports-loader?_ws=ws' }, + { + // JupyterServices imports node-fetch using `eval`. + test: /@jupyterlab\/services\/.*js$/, + use: [ + { + loader: path.join(__dirname, 'loaders', 'fixEvalRequire.js') + } + ] + }, // { // // Ensure source-map-support is injected as a // test: /src\/client\/extension.ts$/, diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 39cfe3d09d02..072bb58a458c 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -47,6 +47,15 @@ const config: webpack.Configuration = { test: require.resolve('@jupyterlab/services'), use: 'imports-loader?_ws=ws' }, + { + // JupyterServices imports node-fetch using `eval`. + test: /@jupyterlab\/services\/.*js$/, + use: [ + { + loader: path.join(__dirname, 'loaders', 'fixEvalRequire.js') + } + ] + }, // { // // Ensure source-map-support is injected as a // test: /src\/client\/extension.ts$/, diff --git a/gulpfile.js b/gulpfile.js index 684af0fd8977..c4bae9248a82 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -155,8 +155,8 @@ gulp.task("compile", () => { gulp.task('compile-webviews', async () => spawnAsync('npx', ['webpack', '--config', 'webpack.datascience-ui.config.js', '--mode', 'production'])); gulp.task('webpack', async () => { - await spawnAsync('npx', ['webpack', '--mode', 'production', '--inline', '--progress']); - await spawnAsync('npx', ['webpack', '--config', './build/webpack/webpack.extension.config.js', '--mode', 'production', '--inline', '--progress']); + await spawnAsync('npx', ['webpack', '--mode', 'production']); + await spawnAsync('npx', ['webpack', '--config', './build/webpack/webpack.extension.config.js', '--mode', 'production']); }); gulp.task('prePublishWebpack', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'clean:cleanExceptTests', 'webpack')); @@ -165,7 +165,12 @@ gulp.task('prePublishNonWebpack', gulp.series('checkNativeDependencies', 'check- function spawnAsync(command, args) { return new Promise((resolve, reject) => { const proc = spawn(command, args, { cwd: __dirname }); - proc.stdout.on('data', data => console.log(data.toString())); + proc.stdout.on('data', data => { + // Log output on CI. + if (isCI) { + console.log(data.toString()); + } + }); proc.stderr.on('data', data => console.error(data.toString())); proc.on('close', () => resolve()); proc.on('error', error => reject(error)); diff --git a/src/testMultiRootWkspc/multi.code-workspace b/src/testMultiRootWkspc/multi.code-workspace index 66d2f293689d..65859ed0254a 100644 --- a/src/testMultiRootWkspc/multi.code-workspace +++ b/src/testMultiRootWkspc/multi.code-workspace @@ -15,6 +15,9 @@ { "path": "workspace5" }, + { + "path": "smokeTests" + }, { "path": "parent\\child" }, diff --git a/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log b/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log new file mode 100644 index 000000000000..dfc3ebede46c --- /dev/null +++ b/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log @@ -0,0 +1 @@ +/usr/local/opt/python@2/bin/python2.7 \ No newline at end of file diff --git a/src/testMultiRootWkspc/smokeTests/testExecInTerminal.py b/src/testMultiRootWkspc/smokeTests/testExecInTerminal.py new file mode 100644 index 000000000000..84c0c03d6ba0 --- /dev/null +++ b/src/testMultiRootWkspc/smokeTests/testExecInTerminal.py @@ -0,0 +1,7 @@ +import sys +import os + + +log_file = os.path.splitext(sys.argv[0])[0] + '.log' +with open(log_file, "a") as f: + f.write(sys.executable) From 5b7309b6d6e4f7dc64a5ac1c5911c013e3e3904d Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 09:08:36 -0800 Subject: [PATCH 19/27] update webpack --- build/webpack/webpack.extension.config.js | 10 ---------- build/webpack/webpack.extension.config.ts | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index 99983bd4489e..bf29f18606f2 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -31,16 +31,6 @@ const config = { }, module: { rules: [ - { - // JupyterServices imports node-fetch using `eval`. - test: require.resolve('@jupyterlab/services'), - use: 'imports-loader?_node_fetch=node-fetch' - }, - { - // JupyterServices imports node-fetch using `eval`. - test: require.resolve('@jupyterlab/services'), - use: 'imports-loader?_ws=ws' - }, { // JupyterServices imports node-fetch using `eval`. test: /@jupyterlab\/services\/.*js$/, diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 072bb58a458c..5f2a413648d2 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -37,16 +37,6 @@ const config: webpack.Configuration = { }, module: { rules: [ - { - // JupyterServices imports node-fetch using `eval`. - test: require.resolve('@jupyterlab/services'), - use: 'imports-loader?_node_fetch=node-fetch' - }, - { - // JupyterServices imports node-fetch using `eval`. - test: require.resolve('@jupyterlab/services'), - use: 'imports-loader?_ws=ws' - }, { // JupyterServices imports node-fetch using `eval`. test: /@jupyterlab\/services\/.*js$/, From 8879bd7c318a56dd88c092ef7209da798c9c09f8 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 13:27:32 -0800 Subject: [PATCH 20/27] Clean up --- build/webpack/common.js | 16 ---------------- build/webpack/common.ts | 16 ---------------- build/webpack/webpack.extension.config.js | 5 ----- build/webpack/webpack.extension.config.ts | 6 ------ .../webpack.extension.dependencies.config.ts | 1 - 5 files changed, 44 deletions(-) diff --git a/build/webpack/common.js b/build/webpack/common.js index 930763ef705a..8e990bb6d4be 100644 --- a/build/webpack/common.js +++ b/build/webpack/common.js @@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); const constants_1 = require("../constants"); exports.nodeModulesToExternalize = [ - // 'source-map-support', 'unicode/category/Lu', 'unicode/category/Ll', 'unicode/category/Lt', @@ -16,21 +15,6 @@ exports.nodeModulesToExternalize = [ 'unicode/category/Mc', 'unicode/category/Nd', 'unicode/category/Pc' - // '@jupyterlab/services', - // 'azure-storage', - // 'lodash', - // 'request', - // 'semver', - // 'glob', - // 'getos', - // 'iconv-lite', - // 'sudo-prompt', - // 'diff-match-patch', - // 'xml2js', - // 'fs-extra', - // 'vscode-languageclient', - // 'vscode-debugadapter', - // 'rxjs' ]; function getDefaultPlugins(name) { const plugins = []; diff --git a/build/webpack/common.ts b/build/webpack/common.ts index 033e785169d1..c1d7b92c31ca 100644 --- a/build/webpack/common.ts +++ b/build/webpack/common.ts @@ -7,7 +7,6 @@ import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { isCI } from '../constants'; export const nodeModulesToExternalize = [ - // 'source-map-support', 'unicode/category/Lu', 'unicode/category/Ll', 'unicode/category/Lt', @@ -18,21 +17,6 @@ export const nodeModulesToExternalize = [ 'unicode/category/Mc', 'unicode/category/Nd', 'unicode/category/Pc' - // '@jupyterlab/services', - // 'azure-storage', - // 'lodash', - // 'request', - // 'semver', - // 'glob', - // 'getos', - // 'iconv-lite', - // 'sudo-prompt', - // 'diff-match-patch', - // 'xml2js', - // 'fs-extra', - // 'vscode-languageclient', - // 'vscode-debugadapter', - // 'rxjs' ]; export function getDefaultPlugins(name: 'extension' | 'debugger' | 'dependencies' | 'datascience-ui') { diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index bf29f18606f2..77d75101191e 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -40,11 +40,6 @@ const config = { } ] }, - // { - // // Ensure source-map-support is injected as a - // test: /src\/client\/extension.ts$/, - // use: 'imports-loader?_source_map_support=source-map-support' - // }, { test: /\.ts$/, use: [ diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 5f2a413648d2..cbc5ad692344 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -7,7 +7,6 @@ import * as glob from 'glob'; import * as path from 'path'; import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; import * as webpack from 'webpack'; -import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; import { getDefaultPlugins } from './common'; @@ -46,11 +45,6 @@ const config: webpack.Configuration = { } ] }, - // { - // // Ensure source-map-support is injected as a - // test: /src\/client\/extension.ts$/, - // use: 'imports-loader?_source_map_support=source-map-support' - // }, { test: /\.ts$/, use: [ diff --git a/build/webpack/webpack.extension.dependencies.config.ts b/build/webpack/webpack.extension.dependencies.config.ts index b03cb99396bc..a31c5388185d 100644 --- a/build/webpack/webpack.extension.dependencies.config.ts +++ b/build/webpack/webpack.extension.dependencies.config.ts @@ -5,7 +5,6 @@ import * as path from 'path'; import * as webpack from 'webpack'; -import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { ExtensionRootDir } from '../constants'; import { getDefaultPlugins, nodeModulesToExternalize } from './common'; From 9eb87bbce20dce6ec8f5db267f59acfd24a82127 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 14:21:39 -0800 Subject: [PATCH 21/27] Lazy load azure storage --- src/client/common/nuget/azureBlobStoreNugetRepository.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/common/nuget/azureBlobStoreNugetRepository.ts b/src/client/common/nuget/azureBlobStoreNugetRepository.ts index f3f995a4d7d3..66874b2bceac 100644 --- a/src/client/common/nuget/azureBlobStoreNugetRepository.ts +++ b/src/client/common/nuget/azureBlobStoreNugetRepository.ts @@ -3,7 +3,6 @@ 'use strict'; -import * as azStorageTypes from 'azure-storage'; import { inject, injectable, unmanaged } from 'inversify'; import { IServiceContainer } from '../../ioc/types'; import { captureTelemetry } from '../../telemetry'; @@ -23,15 +22,15 @@ export class AzureBlobStoreNugetRepository implements INugetRepository { @captureTelemetry(PYTHON_LANGUAGE_SERVER_LIST_BLOB_STORE_PACKAGES) @traceVerbose('Listing Nuget Packages') - protected listPackages(azureBlobStorageAccount: string, azureBlobStorageContainer: string, packageName: string, azureCDNBlobStorageAccount: string) { + protected async listPackages(azureBlobStorageAccount: string, azureBlobStorageContainer: string, packageName: string, azureCDNBlobStorageAccount: string) { // tslint:disable-next-line:no-require-imports - const az = require('azure-storage') as typeof azStorageTypes; + const az = await import('azure-storage') as typeof import('azure-storage'); const blobStore = az.createBlobServiceAnonymous(azureBlobStorageAccount); const nugetService = this.serviceContainer.get(INugetService); return new Promise((resolve, reject) => { // We must pass undefined according to docs, but type definition doesn't all it to be undefined or null!!! // tslint:disable-next-line:no-any - const token = undefined as any as azStorageTypes.common.ContinuationToken; + const token = undefined as any; blobStore.listBlobsSegmentedWithPrefix(azureBlobStorageContainer, packageName, token, (error, result) => { if (error) { From d3c3ace1452e00d6c16f49447dba4616e036542f Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 14:34:38 -0800 Subject: [PATCH 22/27] Fix code review comments --- .../webpack/webpack.datascience-ui.config.js | 2 +- .../webpack/webpack.datascience-ui.config.ts | 2 +- build/webpack/webpack.extension.config.js | 7 ---- build/webpack/webpack.extension.config.ts | 8 ---- package-lock.json | 42 ------------------- package.json | 4 -- .../smokeTests/testExecInTerminal.log | 1 - webpack.config.js | 6 +-- 8 files changed, 3 insertions(+), 69 deletions(-) delete mode 100644 src/testMultiRootWkspc/smokeTests/testExecInTerminal.log diff --git a/build/webpack/webpack.datascience-ui.config.js b/build/webpack/webpack.datascience-ui.config.js index 98e1f0cdee3e..c64c65c00025 100644 --- a/build/webpack/webpack.datascience-ui.config.js +++ b/build/webpack/webpack.datascience-ui.config.js @@ -19,7 +19,7 @@ const config = { mode: 'production', // Use 'eval' for release and `eval-source-map` for development. // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, - // this seems to prevent chrome from downloading the source maps) + // this seems to prevent chrome from downloading the source maps) devtool: 'eval', node: { fs: 'empty' diff --git a/build/webpack/webpack.datascience-ui.config.ts b/build/webpack/webpack.datascience-ui.config.ts index b67af6800ae3..9aac11324ecd 100644 --- a/build/webpack/webpack.datascience-ui.config.ts +++ b/build/webpack/webpack.datascience-ui.config.ts @@ -24,7 +24,7 @@ const config: webpack.Configuration = { mode: 'production', // Leave as is, we'll need to see stack traces when there are errors. // Use 'eval' for release and `eval-source-map` for development. // We need to use one where source is embedded, due to webviews (they restrict resources to specific schemes, - // this seems to prevent chrome from downloading the source maps) + // this seems to prevent chrome from downloading the source maps) devtool: 'eval', node: { fs: 'empty' diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index 77d75101191e..fe551222390a 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -7,9 +7,6 @@ const path = require("path"); const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); const constants_1 = require("../constants"); const common_1 = require("./common"); -// tslint:disable-next-line:no-var-requires no-require-imports -// const WrapperPlugin = require('wrapper-webpack-plugin'); -const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json'); // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). const existingModulesInOutDir = getListOfExistingModulesInOutDir(); @@ -66,10 +63,6 @@ const config = { ], plugins: [ ...common_1.getDefaultPlugins('extension') - // new WrapperPlugin({ - // test: /\.js$/, - // header: 'require(\'./node_modules/source-map-support\').install();' - // }) ], resolve: { extensions: ['.ts', '.js'], diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index cbc5ad692344..5bf69d69e0f3 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -10,10 +10,6 @@ import * as webpack from 'webpack'; import { ExtensionRootDir } from '../constants'; import { getDefaultPlugins } from './common'; -// tslint:disable-next-line:no-var-requires no-require-imports -// const WrapperPlugin = require('wrapper-webpack-plugin'); -const configFileName = path.join(ExtensionRootDir, 'tsconfig.extension.json'); - // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). const existingModulesInOutDir = getListOfExistingModulesInOutDir(); @@ -71,10 +67,6 @@ const config: webpack.Configuration = { ], plugins: [ ...getDefaultPlugins('extension') - // new WrapperPlugin({ - // test: /\.js$/, - // header: 'require(\'./node_modules/source-map-support\').install();' - // }) ], resolve: { extensions: ['.ts', '.js'], diff --git a/package-lock.json b/package-lock.json index a1316009e484..fdc827e354c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1558,15 +1558,6 @@ "integrity": "sha512-zeh+xd2pcCvWm1XtWLR4v5pzZMybKeq6X8Q4cIZMMx8GmyKDUfJaOtw+JaONHUQt5ncKFXezl8QGIDQsSF5YfA==", "dev": true }, - "@types/progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-1Smw4LvkCM4zgie7Zo/GtzrMx1Zlq1XVfPoOBXPLIkmtep06wBE7sXupVDq7MXWrHCYtsM0d6i5eF6OM+LJJrQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/promisify-node": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@types/promisify-node/-/promisify-node-0.4.0.tgz", @@ -1733,15 +1724,6 @@ "@types/webpack": "*" } }, - "@types/webpack-node-externals": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/@types/webpack-node-externals/-/webpack-node-externals-1.6.3.tgz", - "integrity": "sha512-sIYCMSV4Z1FbxqSKKvhmEnjd1UoZnTBT0VIhoZ0iT8gck7FB1MzJ1eH+yFyOgY65WU4LJBTxj3ySMKKfzfEiCw==", - "dev": true, - "requires": { - "@types/webpack": "*" - } - }, "@types/winreg": { "version": "1.2.30", "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", @@ -9314,24 +9296,6 @@ } } }, - "imports-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.8.0.tgz", - "integrity": "sha512-kXWL7Scp8KQ4552ZcdVTeaQCZSLW+e6nJfp3cwUMB673T7Hr98Xjx5JK+ql7ADlJUvj1JS5O01RLbKoutN5QDQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -12667,12 +12631,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, - "progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", - "dev": true - }, "promise": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.1.tgz", diff --git a/package.json b/package.json index 220ae363b4e2..186fc7d312b4 100644 --- a/package.json +++ b/package.json @@ -1771,7 +1771,6 @@ "@types/mocha": "^2.2.48", "@types/node": "9.4.7", "@types/prismjs": "^1.9.0", - "@types/progress": "^2.0.1", "@types/promisify-node": "^0.4.0", "@types/react": "^16.4.14", "@types/react-dom": "^16.0.8", @@ -1785,7 +1784,6 @@ "@types/untildify": "^3.0.0", "@types/uuid": "^3.4.3", "@types/webpack-bundle-analyzer": "^2.13.0", - "@types/webpack-node-externals": "^1.6.3", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", "JSONStream": "^1.3.2", @@ -1822,7 +1820,6 @@ "gulp-watch": "^5.0.0", "html-webpack-plugin": "^3.2.0", "husky": "^1.1.2", - "imports-loader": "^0.8.0", "is-running": "^2.1.0", "istanbul": "^0.4.5", "jsdom": "^12.2.0", @@ -1832,7 +1829,6 @@ "mocha-junit-reporter": "^1.17.0", "node-has-native-dependencies": "^1.0.2", "prismjs": "^1.15.0", - "progress": "^2.0.1", "raw-loader": "^0.5.1", "react": "^16.5.2", "react-dev-utils": "^5.0.2", diff --git a/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log b/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log deleted file mode 100644 index dfc3ebede46c..000000000000 --- a/src/testMultiRootWkspc/smokeTests/testExecInTerminal.log +++ /dev/null @@ -1 +0,0 @@ -/usr/local/opt/python@2/bin/python2.7 \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 85b1ea7befba..a6c71a0217a7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,9 +15,5 @@ module.exports = [ merge(extensionDependencies, { mode: 'production', devtool: 'source-map', - }), - // merge(extension, { - // mode: 'production', - // devtool: 'source-map', - // }) + }) ]; From ce02e8d3b3a04c7854583b0d866a63abe5130494 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 14:36:56 -0800 Subject: [PATCH 23/27] Fix code review comments --- build/webpack/webpack.extension.config.js | 2 ++ build/webpack/webpack.extension.config.ts | 3 +++ webpack.config.js | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/webpack/webpack.extension.config.js b/build/webpack/webpack.extension.config.js index fe551222390a..fbe7e687ae70 100644 --- a/build/webpack/webpack.extension.config.js +++ b/build/webpack/webpack.extension.config.js @@ -7,6 +7,8 @@ const path = require("path"); const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin"); const constants_1 = require("../constants"); const common_1 = require("./common"); +// tslint:disable-next-line:no-var-requires no-require-imports +const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json'); // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). const existingModulesInOutDir = getListOfExistingModulesInOutDir(); diff --git a/build/webpack/webpack.extension.config.ts b/build/webpack/webpack.extension.config.ts index 5bf69d69e0f3..1ce78feb3b77 100644 --- a/build/webpack/webpack.extension.config.ts +++ b/build/webpack/webpack.extension.config.ts @@ -10,6 +10,9 @@ import * as webpack from 'webpack'; import { ExtensionRootDir } from '../constants'; import { getDefaultPlugins } from './common'; +// tslint:disable-next-line:no-var-requires no-require-imports +const configFileName = path.join(ExtensionRootDir, 'tsconfig.extension.json'); + // Some modules will be pre-genearted and stored in out/.. dir and they'll be referenced via NormalModuleReplacementPlugin // We need to ensure they do not get bundled into the output (as they are large). const existingModulesInOutDir = getListOfExistingModulesInOutDir(); diff --git a/webpack.config.js b/webpack.config.js index a6c71a0217a7..7955a6f511f6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,6 @@ const merge = require('webpack-merge'); const datascience = require('./webpack.datascience-ui.config.js'); -const extension = require('./build/webpack/webpack.extension.config.js').default; const extensionDependencies = require('./build/webpack/webpack.extension.dependencies.config.js').default; module.exports = [ From bd3f9f134009b26bbbfc4bdd512d77f3dc0f502f Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 14:58:08 -0800 Subject: [PATCH 24/27] Fix merge issues --- build/webpack/datascience/inlinePlugin.js | 52 ------------------- build/webpack/datascience/remarkLoader.js | 8 --- build/webpack/loaders/addHeader.js | 10 ---- build/webpack/loaders/addHeader.ts | 16 ------ build/webpack/loaders/remarkLoader.js | 3 +- .../webpack/webpack.datascience-ui.config.js | 2 +- .../webpack/webpack.datascience-ui.config.ts | 2 +- 7 files changed, 4 insertions(+), 89 deletions(-) delete mode 100644 build/webpack/datascience/inlinePlugin.js delete mode 100644 build/webpack/datascience/remarkLoader.js delete mode 100644 build/webpack/loaders/addHeader.js delete mode 100644 build/webpack/loaders/addHeader.ts diff --git a/build/webpack/datascience/inlinePlugin.js b/build/webpack/datascience/inlinePlugin.js deleted file mode 100644 index c7702dea413e..000000000000 --- a/build/webpack/datascience/inlinePlugin.js +++ /dev/null @@ -1,52 +0,0 @@ -class HelloWorldPlugin { - apply(compiler) { - compiler.hooks.done.tap('Hello World Plugin', ( - stats /* stats is passed as argument when done hook is tapped. */ - ) => { - console.log('Hello World!'); - }); - } -} - -//module.exports = HelloWorldPlugin; - -class InlineResolverPlugin { - constructor(regex) { - this.source = 'described-resolve'; // Before plugin - this.target = 'resolve'; // After plugin - this.regex = regex; - } - - apply(resolver) { - const normal = resolver.ensureHook(this.target) - const skip = resolver.ensureHook('resolved'); - resolver.getHook(this.source).tapAsync('InlineResolverPlugin', (request, resolveContext, callback) => { - const parsed = resolver.parse(request.request); - if (parsed.request == './block-elements.json') { - const source = { - foo: 'bar' - }; - console.log(`Skipping request for ${parsed.request}\n`); - return callback(null, `${JSON.stringify(source)}`); - } - - resolver.doResolve(normal, request, null, resolveContext, callback); - }); - } -} - -// module.exports = InlineResolverPlugin; - -class InlineCompilerPlugin { - constructor(regex) { - this.regex = regex; - } - - apply(compiler) { - compiler.plugin("after-emit", function(compilation) { - console.log('Done emitting'); - }); - } -} - -module.exports = InlineCompilerPlugin; diff --git a/build/webpack/datascience/remarkLoader.js b/build/webpack/datascience/remarkLoader.js deleted file mode 100644 index 6e4f45d99f11..000000000000 --- a/build/webpack/datascience/remarkLoader.js +++ /dev/null @@ -1,8 +0,0 @@ -// For some reason this has to be in commonjs format - -module.exports = function(source) { - - // Just inline the source and fix up defaults so that they don't - // mess up the logic in the setOptions.js file - return `module.exports = ${source}\nmodule.exports.default = false`; - } diff --git a/build/webpack/loaders/addHeader.js b/build/webpack/loaders/addHeader.js deleted file mode 100644 index bc76b4b15299..000000000000 --- a/build/webpack/loaders/addHeader.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -const loader_utils_1 = require("loader-utils"); -function default_1(source) { - const options = loader_utils_1.getOptions(this); - return (options.header || '') + source; -} -exports.default = default_1; diff --git a/build/webpack/loaders/addHeader.ts b/build/webpack/loaders/addHeader.ts deleted file mode 100644 index 303d9528f03a..000000000000 --- a/build/webpack/loaders/addHeader.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -'use strict'; - -import { getOptions } from 'loader-utils'; - -// tslint:disable:no-default-export no-invalid-this -export type Options = { - header: string; -}; - -export default function (source: string) { - const options = getOptions(this) as Options; - return (options.header || '') + source; -} diff --git a/build/webpack/loaders/remarkLoader.js b/build/webpack/loaders/remarkLoader.js index 6e4f45d99f11..8dde61d300ea 100644 --- a/build/webpack/loaders/remarkLoader.js +++ b/build/webpack/loaders/remarkLoader.js @@ -4,5 +4,6 @@ module.exports = function(source) { // Just inline the source and fix up defaults so that they don't // mess up the logic in the setOptions.js file - return `module.exports = ${source}\nmodule.exports.default = false`; + return `module.exports = ${source}\nmodule.exports.default = false`; + } diff --git a/build/webpack/webpack.datascience-ui.config.js b/build/webpack/webpack.datascience-ui.config.js index c64c65c00025..1e1956db220b 100644 --- a/build/webpack/webpack.datascience-ui.config.js +++ b/build/webpack/webpack.datascience-ui.config.js @@ -77,7 +77,7 @@ const config = { include: /node_modules.*remark.*/, use: [ { - loader: path.resolve('./build/datascience/jsonloader.js'), + loader: path.resolve('./build/webpack/loaders/jsonloader.js'), options: {} } ] diff --git a/build/webpack/webpack.datascience-ui.config.ts b/build/webpack/webpack.datascience-ui.config.ts index 9aac11324ecd..d531ae4a6c83 100644 --- a/build/webpack/webpack.datascience-ui.config.ts +++ b/build/webpack/webpack.datascience-ui.config.ts @@ -83,7 +83,7 @@ const config: webpack.Configuration = { include: /node_modules.*remark.*/, use: [ { - loader: path.resolve('./build/datascience/jsonloader.js'), + loader: path.resolve('./build/webpack/loaders/jsonloader.js'), options: {} } ] From 8d544e3d41fdb03594f3ba67cbc766060a28cc21 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 14:59:26 -0800 Subject: [PATCH 25/27] Fix formatting --- gulpfile.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c4bae9248a82..5ec84f2a4d8b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -130,13 +130,13 @@ gulp.task('cover:disable', () => { return json; })) .pipe(gulp.dest("./out", { 'overwrite': true })); - }); +}); - /** - * Inline CSS into the coverage report for better visualizations on - * the VSTS report page for code coverage. - */ - gulp.task('inlinesource', () => { +/** + * Inline CSS into the coverage report for better visualizations on + * the VSTS report page for code coverage. + */ +gulp.task('inlinesource', () => { return gulp.src('./coverage/lcov-report/*.html') .pipe(inlinesource({ attribute: false })) .pipe(gulp.dest('./coverage/lcov-report-inline')); From 39f3f25d8a8bc3acc880fe47e4a1df4dd074def6 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 19 Nov 2018 15:03:38 -0800 Subject: [PATCH 26/27] Fix merge issue --- webpack.datascience-ui.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/webpack.datascience-ui.config.js b/webpack.datascience-ui.config.js index 50a52d0e7301..b133f01805cb 100644 --- a/webpack.datascience-ui.config.js +++ b/webpack.datascience-ui.config.js @@ -22,7 +22,6 @@ module.exports = { fs: 'empty' }, plugins: [ - ...common.getDefaultPlugins('datascience-ui'), new HtmlWebpackPlugin({ template: 'src/datascience-ui/history-react/index.html', baseUrl: path.join(__dirname, 'out', 'dummy'), filename: './datascience-ui/history-react/index.html' }), new FixDefaultImportPlugin(), new CopyWebpackPlugin([ From 8b2998837a50911d4a78df9047e72683b7d212fd Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 20 Nov 2018 09:44:58 -0800 Subject: [PATCH 27/27] Updates --- .travis.yml | 4 +++- .vscodeignore | 4 +++- gulpfile.js | 41 +++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e0c14ec9760..a67cab3004ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ before_install: | install: - travis_wait 5 npm ci - npm run clean - - npm run vscode:prepublish + - npx gulp prePublishNonBundle - npx gulp hygiene-modified - python -m pip install --upgrade -r requirements.txt - python -m pip install -t ./pythonFiles/experimental/ptvsd git+https://github.com/Microsoft/ptvsd/ @@ -131,6 +131,8 @@ script: npm run clean; vsce package; azure storage blob upload python*.vsix $AZURE_STORAGE_CONTAINER ms-python-insiders.vsix --account-name $AZURE_STORAGE_ACCOUNT --account-key $AZURE_STORAGE_ACCESS_KEY --quiet; + npm run package; + azure storage blob upload python*.vsix $AZURE_STORAGE_CONTAINER ms-python-insiders-bundled.vsix --account-name $AZURE_STORAGE_ACCOUNT --account-key $AZURE_STORAGE_ACCESS_KEY --quiet; fi - if [[ $AZURE_STORAGE_ACCOUNT && "$TRAVIS_BRANCH" == release* && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run clean; diff --git a/.vscodeignore b/.vscodeignore index 285ada34cf13..874fa7010476 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,4 +1,6 @@ +!out/**/*.map **/*.map +*.vsix .appveyor.yml .editorconfig .eslintrc @@ -26,7 +28,7 @@ typings.json vsc-extension-quickstart.md vscode-python-signing.* webpack.config.js -webpack.default.config.js +webpack.datascience-ui.config.js .github/** .mocha-reporter/** diff --git a/gulpfile.js b/gulpfile.js index 5ec84f2a4d8b..88e8419bbb17 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -102,6 +102,7 @@ gulp.task('cover:clean', () => del(['coverage', 'debug_coverage*'])); gulp.task('output:clean', () => del(['coverage', 'debug_coverage*'])); gulp.task('clean:cleanExceptTests', () => del(['out/client', 'out/datascience-ui', 'out/server'])); +gulp.task('clean:out', () => del(['out'])); gulp.task('clean', gulp.parallel('output:clean', 'cover:clean')); @@ -154,13 +155,49 @@ gulp.task("compile", () => { gulp.task('compile-webviews', async () => spawnAsync('npx', ['webpack', '--config', 'webpack.datascience-ui.config.js', '--mode', 'production'])); +gulp.task('webpack', async () => { + await spawnAsync('npx', ['webpack', '--mode', 'production', '--inline', '--progress']); + await spawnAsync('npx', ['webpack', '--config', './build/webpack/webpack.extension.config.js', '--mode', 'production', '--inline', '--progress']); +}); + +gulp.task('updateVSCodeIgnore', (done) => { + // Temporary work around, we need to old technique of building extension is still supported. + // Once Azure DevOps has been updated, we can hard code this value in `.vscodeignore` + fs.appendFileSync(path.join(__dirname, '.vscodeignore'), '\nnode_modules/**'); + done(); +}); + +gulp.task('removePrePublishScript', (done) => { + // Temporary work around + const packageJson = require('./package.json'); + const scripts = packageJson.scripts; + if (scripts['vscode:prepublish']) { + scripts['vscode:prepublish_Old'] = scripts['vscode:prepublish']; + delete scripts['vscode:prepublish']; + fs.writeFileSync(path.join(__dirname, 'package.json'), JSON.stringify(packageJson, undefined, 4)); + } + done(); +}); + +gulp.task('restorePrePublishScript', (done) => { + // Temporary work around + const packageJson = require('./package.json'); + const scripts = packageJson.scripts; + if (scripts['vscode:prepublish_Old']) { + scripts['vscode:prepublish'] = scripts['vscode:prepublish_Old']; + delete scripts['vscode:prepublish_Old']; + fs.writeFileSync(path.join(__dirname, 'package.json'), JSON.stringify(packageJson, undefined, 4)); + } + done(); +}); + gulp.task('webpack', async () => { await spawnAsync('npx', ['webpack', '--mode', 'production']); await spawnAsync('npx', ['webpack', '--config', './build/webpack/webpack.extension.config.js', '--mode', 'production']); }); -gulp.task('prePublishWebpack', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'clean:cleanExceptTests', 'webpack')); -gulp.task('prePublishNonWebpack', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile-webviews')); +gulp.task('prePublishBundle', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'clean:cleanExceptTests', 'webpack')); +gulp.task('prePublishNonBundle', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'compile-webviews')); function spawnAsync(command, args) { return new Promise((resolve, reject) => { diff --git a/package.json b/package.json index 186fc7d312b4..84df26d45651 100644 --- a/package.json +++ b/package.json @@ -1674,7 +1674,7 @@ }, "scripts": { "vscode:prepublish": "gulp checkNativeDependencies && gulp check-datascience-dependencies && gulp compile && webpack --inline --progress", - "package": "gulp prePublishWebpack && vsce package", + "package": "gulp clean:cleanExceptTests && gulp prePublishBundle && gulp updateVSCodeIgnore && gulp removePrePublishScript && vsce package && gulp restorePrePublishScript", "compile": "tsc -watch -p ./", "compile-webviews-watch": "npx webpack --config webpack.datascience-ui.config.js --watch", "dump-datascience-webpack-stats": "webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json",