From 2dae88251ea0513a363e34c1a6f36df83211a4cb Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Sat, 23 Dec 2017 18:09:58 +0100 Subject: [PATCH 1/8] initial implementation of reportFiles --- package.json | 2 + src/index.ts | 5 +- src/interfaces.ts | 1 + src/utils.ts | 12 +- test/comparison-tests/reportFiles/app.ts | 3 + .../reportFiles/expectedOutput-2.6/bundle.js | 88 ++++ .../expectedOutput-2.6/output.transpiled.txt | 4 + .../reportFiles/expectedOutput-2.6/output.txt | 8 + test/comparison-tests/reportFiles/skip.ts | 2 + .../reportFiles/tsconfig.json | 4 + .../reportFiles/webpack.config.js | 18 + yarn.lock | 487 +++++++++++++++++- 12 files changed, 624 insertions(+), 10 deletions(-) create mode 100644 test/comparison-tests/reportFiles/app.ts create mode 100644 test/comparison-tests/reportFiles/expectedOutput-2.6/bundle.js create mode 100644 test/comparison-tests/reportFiles/expectedOutput-2.6/output.transpiled.txt create mode 100644 test/comparison-tests/reportFiles/expectedOutput-2.6/output.txt create mode 100644 test/comparison-tests/reportFiles/skip.ts create mode 100644 test/comparison-tests/reportFiles/tsconfig.json create mode 100644 test/comparison-tests/reportFiles/webpack.config.js diff --git a/package.json b/package.json index 4ab4d410b..3f9df1597 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,11 @@ "chalk": "^2.3.0", "enhanced-resolve": "^3.0.0", "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", "semver": "^5.0.1" }, "devDependencies": { + "@types/micromatch": "^3.1.0", "@types/semver": "^5.4.0", "babel": "^6.0.0", "babel-core": "^6.0.0", diff --git a/src/index.ts b/src/index.ts index 1150d3974..117b75fed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,7 +110,7 @@ function getLoaderOptions(loader: Webpack) { } type ValidLoaderOptions = keyof LoaderOptions; -const validLoaderOptions: ValidLoaderOptions[] = ['silent', 'logLevel', 'logInfoToStdOut', 'instance', 'compiler', 'contextAsConfigBasePath', 'configFile', 'transpileOnly', 'ignoreDiagnostics', 'errorFormatter', 'colors', 'compilerOptions', 'appendTsSuffixTo', 'appendTsxSuffixTo', 'entryFileCannotBeJs' /* DEPRECATED */, 'onlyCompileBundledFiles', 'happyPackMode', 'getCustomTransformers']; +const validLoaderOptions: ValidLoaderOptions[] = ['silent', 'logLevel', 'logInfoToStdOut', 'instance', 'compiler', 'contextAsConfigBasePath', 'configFile', 'transpileOnly', 'ignoreDiagnostics', 'errorFormatter', 'colors', 'compilerOptions', 'appendTsSuffixTo', 'appendTsxSuffixTo', 'entryFileCannotBeJs' /* DEPRECATED */, 'onlyCompileBundledFiles', 'happyPackMode', 'getCustomTransformers', 'reportFiles']; /** * Validate the supplied loader options. @@ -148,7 +148,8 @@ function makeLoaderOptions(instanceName: string, configFileOptions: Partial, configFileOptions, loaderOptions); options.ignoreDiagnostics = arrify(options.ignoreDiagnostics).map(Number); diff --git a/src/interfaces.ts b/src/interfaces.ts index 7bf894c2b..6b76d659a 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -269,6 +269,7 @@ export interface LoaderOptions { contextAsConfigBasePath: boolean; transpileOnly: boolean; ignoreDiagnostics: number[]; + reportFiles: string[]; errorFormatter: (message: ErrorInfo, colors: Chalk) => string; onlyCompileBundledFiles: boolean; colors: boolean; diff --git a/src/utils.ts b/src/utils.ts index b6912f9a2..4b7bee000 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -2,6 +2,7 @@ import * as typescript from 'typescript'; import * as path from 'path'; import * as fs from 'fs'; import { Chalk } from 'chalk'; +import * as micromatch from 'micromatch'; import constants = require('./constants'); import { @@ -49,12 +50,21 @@ export function formatErrors( loaderOptions: LoaderOptions, colors: Chalk, compiler: typeof typescript, - merge?: { file?: string; module?: WebpackModule } + merge: { file?: string; module?: WebpackModule } ): WebpackError[] { return diagnostics ? diagnostics .filter(diagnostic => loaderOptions.ignoreDiagnostics.indexOf(diagnostic.code) === -1) + .filter(diagnostic => { + if (loaderOptions.reportFiles.length === 0 + || diagnostic.file === undefined) { + return true; + } + const fileName = diagnostic.file.fileName; + const matchResult = micromatch([fileName], loaderOptions.reportFiles); + return matchResult.length > 0; + }) .map(diagnostic => { const file = diagnostic.file; const position = file === undefined ? undefined : file.getLineAndCharacterOfPosition(diagnostic.start!); diff --git a/test/comparison-tests/reportFiles/app.ts b/test/comparison-tests/reportFiles/app.ts new file mode 100644 index 000000000..1d75a9332 --- /dev/null +++ b/test/comparison-tests/reportFiles/app.ts @@ -0,0 +1,3 @@ +import './skip'; +export let a: number +a = '10' \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/expectedOutput-2.6/bundle.js b/test/comparison-tests/reportFiles/expectedOutput-2.6/bundle.js new file mode 100644 index 000000000..b161c2931 --- /dev/null +++ b/test/comparison-tests/reportFiles/expectedOutput-2.6/bundle.js @@ -0,0 +1,88 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +__webpack_require__(1); +exports.a = '10'; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +exports.a = '10'; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/expectedOutput-2.6/output.transpiled.txt b/test/comparison-tests/reportFiles/expectedOutput-2.6/output.transpiled.txt new file mode 100644 index 000000000..ca0441865 --- /dev/null +++ b/test/comparison-tests/reportFiles/expectedOutput-2.6/output.transpiled.txt @@ -0,0 +1,4 @@ + Asset Size Chunks Chunk Names +bundle.js 2.71 kB 0 [emitted] main + [0] ./.test/reportFiles/app.ts 78 bytes {0} [built] + [1] ./.test/reportFiles/skip.ts 59 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/expectedOutput-2.6/output.txt b/test/comparison-tests/reportFiles/expectedOutput-2.6/output.txt new file mode 100644 index 000000000..293cb501a --- /dev/null +++ b/test/comparison-tests/reportFiles/expectedOutput-2.6/output.txt @@ -0,0 +1,8 @@ + Asset Size Chunks Chunk Names +bundle.js 2.71 kB 0 [emitted] main + [0] ./.test/reportFiles/app.ts 78 bytes {0} [built] [1 error] + [1] ./.test/reportFiles/skip.ts 59 bytes {0} [built] + +ERROR in ./.test/reportFiles/app.ts +[tsl] ERROR in app.ts(3,1) + TS2322: Type '"10"' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/skip.ts b/test/comparison-tests/reportFiles/skip.ts new file mode 100644 index 000000000..2aafb987f --- /dev/null +++ b/test/comparison-tests/reportFiles/skip.ts @@ -0,0 +1,2 @@ +export let a: number +a = '10' \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/tsconfig.json b/test/comparison-tests/reportFiles/tsconfig.json new file mode 100644 index 000000000..0efa0a638 --- /dev/null +++ b/test/comparison-tests/reportFiles/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": { + } +} \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/webpack.config.js b/test/comparison-tests/reportFiles/webpack.config.js new file mode 100644 index 000000000..6b5ce7a95 --- /dev/null +++ b/test/comparison-tests/reportFiles/webpack.config.js @@ -0,0 +1,18 @@ +module.exports = { + entry: './app.ts', + output: { + filename: 'bundle.js' + }, + resolve: { + extensions: ['.ts', 'tsx', '.js'] + }, + module: { + rules: [ + { + test: /\.tsx?$/, loader: 'ts-loader', options: { + reportFiles: [ '/**/.test/**/app.ts' ] + } + } + ] + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4faf0d682..ada87f653 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,16 @@ # yarn lockfile v1 +"@types/braces@*": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@types/braces/-/braces-2.3.0.tgz#d00ec0a76562b2acb6f29330be33a093e33ed25c" + +"@types/micromatch@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/micromatch/-/micromatch-3.1.0.tgz#514c8a3d24b2680a9b838eeb80e6d7d724545433" + dependencies: + "@types/braces" "*" + "@types/semver@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.4.0.tgz#f3658535af7f1f502acd6da7daf405ffeb1f7ee4" @@ -109,10 +119,18 @@ arr-diff@^2.0.0: dependencies: arr-flatten "^1.0.1" -arr-flatten@^1.0.1: +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + array-slice@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" @@ -121,6 +139,10 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + arraybuffer.slice@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" @@ -151,6 +173,10 @@ assert@^1.1.1: dependencies: util "0.10.3" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -169,6 +195,10 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +atob@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -717,6 +747,18 @@ base64id@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -801,6 +843,22 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +braces@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.0.tgz#a46941cb5fb492156b3d6a656e06c35364e3e66e" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -885,6 +943,20 @@ bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + callsite@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" @@ -955,6 +1027,16 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +class-utils@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.5.tgz#17e793103750f9627b2176ea34cfd1b565903c80" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + lazy-cache "^2.0.2" + static-extend "^0.1.1" + clean-css@4.1.x: version "4.1.9" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301" @@ -985,6 +1067,13 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" @@ -1027,7 +1116,7 @@ component-emitter@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" -component-emitter@1.2.1: +component-emitter@1.2.1, component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" @@ -1074,6 +1163,10 @@ cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" @@ -1184,7 +1277,7 @@ debug@2.3.3: dependencies: ms "0.7.2" -debug@2.6.9, debug@^2.2.0, debug@^2.6.8: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1200,10 +1293,26 @@ decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1532,6 +1641,18 @@ expand-brackets@^0.1.4: dependencies: is-posix-bracket "^0.1.0" +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + expand-range@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" @@ -1545,6 +1666,19 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + extend@^3.0.0, extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -1555,6 +1689,19 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" +extglob@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.3.tgz#55e019d0c95bf873949c737b7e5172dba84ebb29" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -1581,6 +1728,15 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + finalhandler@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.6.tgz#007aea33d1a4d3e42017f624848ad58d212f814f" @@ -1607,7 +1763,7 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" -for-in@^1.0.1: +for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -1629,6 +1785,12 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + fs-access@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" @@ -1692,6 +1854,10 @@ get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -1769,6 +1935,33 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + hash-base@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" @@ -1931,6 +2124,12 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -1951,6 +2150,28 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.1.tgz#2c6023599bde2de9d5d2c8b9a9d94082036b6ef2" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -1961,10 +2182,16 @@ is-equal-shallow@^0.1.3: dependencies: is-primitive "^2.0.0" -is-extendable@^0.1.1: +is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" @@ -2007,6 +2234,18 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-odd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-1.0.0.tgz#3b8a932eb028b3775c39bb09e91767accdb69088" + dependencies: + is-number "^3.0.0" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -2045,6 +2284,10 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -2185,7 +2428,7 @@ karma@^1.3.0: tmp "0.0.31" useragent "^2.1.12" -kind-of@^3.0.2: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: @@ -2197,10 +2440,24 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" +kind-of@^5.0.0, kind-of@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + dependencies: + set-getter "^0.1.0" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -2296,6 +2553,16 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + md5.js@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" @@ -2338,6 +2605,24 @@ micromatch@^2.1.5: parse-glob "^3.0.4" regex-cache "^0.4.2" +micromatch@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.4.tgz#bb812e741a41f982c854e42b421a7eac458796f4" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.0" + define-property "^1.0.0" + extend-shallow "^2.0.1" + extglob "^2.0.2" + fragment-cache "^0.2.1" + kind-of "^6.0.0" + nanomatch "^1.2.5" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -2389,6 +2674,13 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" +mixin-deep@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.0.tgz#47a8732ba97799457c8c1eca28f95132d7e8150a" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2426,6 +2718,22 @@ nan@^2.3.0: version "2.7.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" +nanomatch@^1.2.5: + version "1.2.6" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.6.tgz#f27233e97c34a8706b7e781a4bc611c957a81625" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + is-odd "^1.0.0" + kind-of "^5.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + ncname@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" @@ -2553,6 +2861,20 @@ object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -2560,6 +2882,12 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -2681,6 +3009,10 @@ parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" @@ -2731,6 +3063,10 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" @@ -2913,6 +3249,12 @@ regex-cache@^0.4.2: dependencies: is-equal-shallow "^0.1.3" +regex-not@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.0.tgz#42f83e39771622df826b02af176525d6a5f157f9" + dependencies: + extend-shallow "^2.0.1" + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -2957,7 +3299,7 @@ repeat-string@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" -repeat-string@^1.5.2: +repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" @@ -3006,6 +3348,10 @@ requires-port@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -3041,10 +3387,34 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + dependencies: + to-object-path "^0.3.0" + set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + setimmediate@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -3078,6 +3448,33 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^2.0.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -3132,12 +3529,26 @@ source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" +source-map-resolve@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + dependencies: + atob "^2.0.0" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: source-map "^0.5.6" +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -3166,6 +3577,12 @@ spdx-license-ids@^1.0.2: version "1.2.2" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + sshpk@^1.7.0: version "1.13.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" @@ -3180,6 +3597,13 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + "statuses@>= 1.3.1 < 2": version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -3333,6 +3757,27 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.1.tgz#15358bee4a2c83bd76377ba1dc049d0f18837aae" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + regex-not "^1.0.0" + toposort@^1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec" @@ -3408,6 +3853,15 @@ ultron@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -3416,10 +3870,21 @@ unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -3427,6 +3892,14 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" + dependencies: + define-property "^0.2.5" + isobject "^3.0.0" + lazy-cache "^2.0.2" + useragent@^2.1.12: version "2.2.1" resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.2.1.tgz#cf593ef4f2d175875e8bb658ea92e18a4fd06d8e" From 47f5765c3b6daefb203d8f310e3cfc90a40ade56 Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Sat, 23 Dec 2017 22:14:02 +0100 Subject: [PATCH 2/8] patterns are now relative to the webpack context --- src/after-compile.ts | 11 ++++++--- src/config.ts | 3 ++- src/index.ts | 4 +++- src/instances.ts | 6 +++-- src/utils.ts | 23 ++++++++++++------- .../reportFiles/webpack.config.js | 2 +- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/after-compile.ts b/src/after-compile.ts index e84f7e878..7a428bc7c 100644 --- a/src/after-compile.ts +++ b/src/after-compile.ts @@ -66,7 +66,8 @@ function provideCompilerOptionDiagnosticErrorsToWebpack( formatErrors( languageService!.getCompilerOptionsDiagnostics(), loaderOptions, instance.colors, compiler, - { file: configFilePath || 'tsconfig.json' })); + { file: configFilePath || 'tsconfig.json' }, + compilation.compiler.context)); } } @@ -152,13 +153,17 @@ function provideErrorsToWebpack( removeTSLoaderErrors(module.errors); // append errors - const formattedErrors = formatErrors(errors, loaderOptions, instance.colors, compiler, { module }); + const formattedErrors = formatErrors(errors, loaderOptions, + instance.colors, compiler, { module }, + compilation.compiler.context); registerWebpackErrors(module.errors, formattedErrors); registerWebpackErrors(compilation.errors, formattedErrors); }); } else { // otherwise it's a more generic error - registerWebpackErrors(compilation.errors, formatErrors(errors, loaderOptions, instance.colors, compiler, { file: filePath })); + registerWebpackErrors(compilation.errors, formatErrors(errors, + loaderOptions, instance.colors, compiler, { file: filePath }, + compilation.compiler.context)); } }); } diff --git a/src/config.ts b/src/config.ts index 89323f6a2..6d7a41807 100644 --- a/src/config.ts +++ b/src/config.ts @@ -40,7 +40,8 @@ export function getConfigFile( ); if (configFile.error !== undefined) { - configFileError = formatErrors([configFile.error], loaderOptions, colors, compiler, { file: configFilePath })[0]; + configFileError = formatErrors([configFile.error], loaderOptions, + colors, compiler, { file: configFilePath }, loader.context)[0]; } } else { if (compilerCompatible) { log.logInfo(compilerDetailsLogMessage); } diff --git a/src/index.ts b/src/index.ts index 117b75fed..16fb3dc8d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -249,7 +249,9 @@ function getTranspilationEmit( if (!instance.loaderOptions.happyPackMode) { registerWebpackErrors( loader._module.errors, - formatErrors(diagnostics, instance.loaderOptions, instance.colors, instance.compiler, { module: loader._module }) + formatErrors(diagnostics, instance.loaderOptions, instance.colors, + instance.compiler, { module: loader._module }, + loader.context) ); } diff --git a/src/instances.ts b/src/instances.ts index c99f29485..bdd6373dd 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -78,7 +78,8 @@ function successfulTypeScriptInstance( const configParseResult = getConfigParseResult(compiler, configFile, basePath); if (configParseResult.errors.length > 0 && !loaderOptions.happyPackMode) { - const errors = formatErrors(configParseResult.errors, loaderOptions, colors, compiler, { file: configFilePath }); + const errors = formatErrors(configParseResult.errors, loaderOptions, colors, + compiler, { file: configFilePath }, loader.context); registerWebpackErrors(loader._module.errors, errors); @@ -100,7 +101,8 @@ function successfulTypeScriptInstance( if (!loaderOptions.happyPackMode) { registerWebpackErrors( loader._module.errors, - formatErrors(diagnostics, loaderOptions, colors, compiler!, {file: configFilePath || 'tsconfig.json'})); + formatErrors(diagnostics, loaderOptions, colors, compiler!, + {file: configFilePath || 'tsconfig.json'}, loader.context)); } const instance = { diff --git a/src/utils.ts b/src/utils.ts index 4b7bee000..934a789d7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -50,20 +50,27 @@ export function formatErrors( loaderOptions: LoaderOptions, colors: Chalk, compiler: typeof typescript, - merge: { file?: string; module?: WebpackModule } + merge: { file?: string; module?: WebpackModule }, + context: string ): WebpackError[] { return diagnostics ? diagnostics - .filter(diagnostic => loaderOptions.ignoreDiagnostics.indexOf(diagnostic.code) === -1) .filter(diagnostic => { - if (loaderOptions.reportFiles.length === 0 - || diagnostic.file === undefined) { - return true; + + if (loaderOptions.ignoreDiagnostics.indexOf(diagnostic.code) !== -1) { + return false; } - const fileName = diagnostic.file.fileName; - const matchResult = micromatch([fileName], loaderOptions.reportFiles); - return matchResult.length > 0; + + if (loaderOptions.reportFiles.length > 0 && diagnostic.file) { + const relativeFileName = path.relative(context, diagnostic.file.fileName); + const matchResult = micromatch([relativeFileName], loaderOptions.reportFiles); + if (matchResult.length === 0) { + return false; + } + } + + return true; }) .map(diagnostic => { const file = diagnostic.file; diff --git a/test/comparison-tests/reportFiles/webpack.config.js b/test/comparison-tests/reportFiles/webpack.config.js index 6b5ce7a95..a9aa91bc0 100644 --- a/test/comparison-tests/reportFiles/webpack.config.js +++ b/test/comparison-tests/reportFiles/webpack.config.js @@ -10,7 +10,7 @@ module.exports = { rules: [ { test: /\.tsx?$/, loader: 'ts-loader', options: { - reportFiles: [ '/**/.test/**/app.ts' ] + reportFiles: [ '**/*.ts', '!skip.ts' ] } } ] From 4a674fa8b8864e1a012941d5392b4b1d56358604 Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Sat, 23 Dec 2017 22:17:39 +0100 Subject: [PATCH 3/8] add to README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8ab29a410..7bcce6015 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,10 @@ messages are emitted via webpack which is not affected by this flag. You can squelch certain TypeScript errors by specifying an array of diagnostic codes to ignore. +#### reportFiles *(string[]) (default=[])* + +Only report errors on files matching these glob patterns. + #### compiler *(string) (default='typescript')* Allows use of TypeScript compilers other than the official one. Should be From 71d37765ae86d9c483d49efc60a5d0c52b6f6ecb Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Thu, 28 Dec 2017 20:17:59 +0100 Subject: [PATCH 4/8] fix validateLoaderOptionNames test --- .../validateLoaderOptionNames/expectedOutput-2.6/bundle.js | 2 +- .../validateLoaderOptionNames/expectedOutput-2.6/output.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/bundle.js index f031c9c0f..8ac959abb 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/bundle.js @@ -67,7 +67,7 @@ /* 0 */ /***/ (function(module, exports) { -throw new Error("Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption\n\nPlease take a look at the options you are supplying; the following are valid options:\nsilent / logLevel / logInfoToStdOut / instance / compiler / contextAsConfigBasePath / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers\n\n at validateLoaderOptions (C:/source/ts-loader/dist/index.js:92:19)\n at getLoaderOptions (C:/source/ts-loader/dist/index.js:75:5)\n at Object.loader (C:/source/ts-loader/dist/index.js:23:19)"); +throw new Error("Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption\n\nPlease take a look at the options you are supplying; the following are valid options:\nsilent / logLevel / logInfoToStdOut / instance / compiler / contextAsConfigBasePath / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles\n\n at validateLoaderOptions (C:/source/ts-loader/dist/index.js:92:19)\n at getLoaderOptions (C:/source/ts-loader/dist/index.js:75:5)\n at Object.loader (C:/source/ts-loader/dist/index.js:23:19)"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/output.txt index d6a0e7042..487940f83 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.6/output.txt @@ -6,7 +6,7 @@ ERROR in ./.test/validateLoaderOptionNames/app.ts Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption Please take a look at the options you are supplying; the following are valid options: -silent / logLevel / logInfoToStdOut / instance / compiler / contextAsConfigBasePath / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers +silent / logLevel / logInfoToStdOut / instance / compiler / contextAsConfigBasePath / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles at validateLoaderOptions (dist\index.js:92:19) at getLoaderOptions (dist\index.js:75:5) From 3b20728395f2cae55501cecc8d4bf6587ce07237 Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Fri, 29 Dec 2017 10:09:50 +0100 Subject: [PATCH 5/8] formatting --- src/utils.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 934a789d7..d05598d2b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -57,11 +57,9 @@ export function formatErrors( return diagnostics ? diagnostics .filter(diagnostic => { - if (loaderOptions.ignoreDiagnostics.indexOf(diagnostic.code) !== -1) { return false; } - if (loaderOptions.reportFiles.length > 0 && diagnostic.file) { const relativeFileName = path.relative(context, diagnostic.file.fileName); const matchResult = micromatch([relativeFileName], loaderOptions.reportFiles); @@ -69,7 +67,6 @@ export function formatErrors( return false; } } - return true; }) .map(diagnostic => { From a0da49a2724158a2d00e1b9e1f8d7273864b5b8f Mon Sep 17 00:00:00 2001 From: Michel Rasschaert Date: Fri, 29 Dec 2017 10:17:44 +0100 Subject: [PATCH 6/8] improve documentation --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 7bcce6015..c5925bba0 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,17 @@ codes to ignore. Only report errors on files matching these glob patterns. +```javascript + // in webpack.config.js + { + test: /\.ts$/, + loader: 'ts-loader', + options: { reportFiles: ['src/**/*.{ts,tsx}', '!src/skip.ts'] } + } +``` + +This can be useful when certain types definitions have errors that are not fatal to your application. + #### compiler *(string) (default='typescript')* Allows use of TypeScript compilers other than the official one. Should be From 27469c2b02b305ca7e95ef539a533aa8d7084784 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Sat, 20 Jan 2018 22:13:14 +0000 Subject: [PATCH 7/8] Add missing comma --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b2525636f..988374fee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -149,7 +149,7 @@ function makeLoaderOptions(instanceName: string, configFileOptions: Partial, configFileOptions, loaderOptions); From 92a73e2364f2beef4c546abfddea67ad3924d69f Mon Sep 17 00:00:00 2001 From: John Reilly Date: Sat, 20 Jan 2018 22:21:52 +0000 Subject: [PATCH 8/8] Merge in watch fixes --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 988374fee..9f10db5b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -179,14 +179,16 @@ function updateFileInCache(filePath: string, contents: string, instance: TSInsta instance.files[filePath] = file; } else { - fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Created; + if (instance.watchHost) { + fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Created; + } file = instance.files[filePath] = { version: 0 }; } instance.changedFilesList = true; } - if (contents === undefined) { - fileWatcherEventKind === instance.compiler.FileWatcherEventKind.Deleted; + if (instance.watchHost && contents === undefined) { + fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Deleted; } if (file.text !== contents) {