diff --git a/CHANGELOG.md b/CHANGELOG.md index 634b71b38..a0db262ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## v9.2.2 +* [Start consuming webpack loader types](https://github.com/TypeStrong/ts-loader/issues/1325) - thanks @johnnyreilly * [Add webpack minimum version in peerDependencies](https://github.com/TypeStrong/ts-loader/issues/1324) - thanks @afdev82 ## v9.2.1 diff --git a/src/config.ts b/src/config.ts index cbed735d6..6720b2909 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,7 +4,7 @@ import type * as typescript from 'typescript'; import * as webpack from 'webpack'; import { getCompilerOptions } from './compilerSetup'; -import { LoaderOptions, WebpackLoaderContext } from './interfaces'; +import { LoaderOptions } from './interfaces'; import * as logger from './logger'; import { formatErrors, useCaseSensitiveFileNames } from './utils'; @@ -16,7 +16,7 @@ interface ConfigFile { export function getConfigFile( compiler: typeof typescript, colors: Chalk, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, loaderOptions: LoaderOptions, compilerCompatible: boolean, log: logger.Logger, diff --git a/src/index.ts b/src/index.ts index 4a06d0482..340795b26 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import * as crypto from 'crypto'; import * as path from 'path'; import type * as typescript from 'typescript'; +import type * as webpack from 'webpack'; import * as constants from './constants'; import { @@ -17,8 +18,6 @@ import { LoaderOptionsCache, LogLevel, TSInstance, - WebpackLoaderCallback, - WebpackLoaderContext, } from './interfaces'; import { appendSuffixesIfMatch, @@ -32,9 +31,9 @@ const loaderOptionsCache: LoaderOptionsCache = {}; /** * The entry point for ts-loader */ -function loader(this: WebpackLoaderContext, contents: string) { +function loader(this: webpack.LoaderContext, contents: string) { this.cacheable && this.cacheable(); - const callback = this.async() as WebpackLoaderCallback; + const callback = this.async(); const options = getLoaderOptions(this); const instanceOrError = getTypeScriptInstance(options, this); @@ -48,9 +47,9 @@ function loader(this: WebpackLoaderContext, contents: string) { } function successLoader( - loaderContext: WebpackLoaderContext, + loaderContext: webpack.LoaderContext, contents: string, - callback: WebpackLoaderCallback, + callback: ReturnType['async']>, instance: TSInstance ) { initializeInstance(loaderContext, instance); @@ -96,9 +95,9 @@ function makeSourceMapAndFinish( outputText: string | undefined, filePath: string, contents: string, - loaderContext: WebpackLoaderContext, + loaderContext: webpack.LoaderContext, fileVersion: number, - callback: WebpackLoaderCallback, + callback: ReturnType['async']>, instance: TSInstance ) { if (outputText === null || outputText === undefined) { @@ -135,19 +134,19 @@ function makeSourceMapAndFinish( } function setModuleMeta( - loaderContext: WebpackLoaderContext, + loaderContext: webpack.LoaderContext, instance: TSInstance, fileVersion: number ) { // _module.meta is not available inside happypack if ( !instance.loaderOptions.happyPackMode && - loaderContext._module.buildMeta !== undefined + loaderContext._module!.buildMeta !== undefined ) { // Make sure webpack is aware that even though the emitted JavaScript may be the same as // a previously cached version the TypeScript may be different and therefore should be // treated as new - loaderContext._module.buildMeta.tsLoaderFileVersion = fileVersion; + loaderContext._module!.buildMeta.tsLoaderFileVersion = fileVersion; } } @@ -174,8 +173,8 @@ function getOptionsHash(loaderOptions: LoaderOptions) { * either retrieves loader options from the cache * or creates them, adds them to the cache and returns */ -function getLoaderOptions(loaderContext: WebpackLoaderContext) { - const loaderOptions = loaderContext.getOptions(undefined); +function getLoaderOptions(loaderContext: webpack.LoaderContext) { + const loaderOptions = loaderContext.getOptions(); // If no instance name is given in the options, use the hash of the loader options // In this way, if different options are given the instances will be different @@ -389,7 +388,7 @@ function getEmit( rawFilePath: string, filePath: string, instance: TSInstance, - loaderContext: WebpackLoaderContext + loaderContext: webpack.LoaderContext ) { const outputFiles = getEmitOutput(instance, filePath); loaderContext.clearDependencies(); @@ -435,7 +434,7 @@ function getEmit( addDependenciesFromSolutionBuilder(instance, filePath, addDependency); - loaderContext._module.buildMeta.tsLoaderDefinitionFileVersions = dependencies.map( + loaderContext._module!.buildMeta.tsLoaderDefinitionFileVersions = dependencies.map( defFilePath => path.relative(loaderContext.rootContext, defFilePath) + '@' + @@ -586,7 +585,7 @@ function getTranspilationEmit( fileName: string, contents: string, instance: TSInstance, - loaderContext: WebpackLoaderContext + loaderContext: webpack.LoaderContext ) { if (isReferencedFile(instance, fileName)) { const outputFiles = instance.solutionBuilderHost!.getOutputFilesFromReferencedProjectInput( @@ -625,7 +624,7 @@ function getTranspilationEmit( loaderContext.context ); - errors.forEach(error => module.addError(error)); + errors.forEach(error => module!.addError(error)); } return { outputText, sourceMapText }; @@ -636,7 +635,7 @@ function makeSourceMap( outputText: string, filePath: string, contents: string, - loaderContext: WebpackLoaderContext + loaderContext: webpack.LoaderContext ) { if (sourceMapText === undefined) { return { output: outputText, sourceMap: undefined }; diff --git a/src/instance-cache.ts b/src/instance-cache.ts index 4ed44e9a5..f94d5b445 100644 --- a/src/instance-cache.ts +++ b/src/instance-cache.ts @@ -27,7 +27,7 @@ export function getTSInstanceFromCache( } export function setTSInstanceInCache( - key: webpack.Compiler, + key: webpack.Compiler | undefined, name: string, instance: TSInstance ) { diff --git a/src/instances.ts b/src/instances.ts index d554d195e..481c52ceb 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -9,13 +9,7 @@ import { getCompiler, getCompilerOptions } from './compilerSetup'; import { getConfigFile, getConfigParseResult } from './config'; import { dtsDtsxOrDtsDtsxMapRegex, EOL, tsTsxRegex } from './constants'; import { getTSInstanceFromCache, setTSInstanceInCache } from './instance-cache'; -import { - FilePathKey, - LoaderOptions, - TSFiles, - TSInstance, - WebpackLoaderContext, -} from './interfaces'; +import { FilePathKey, LoaderOptions, TSFiles, TSInstance } from './interfaces'; import * as logger from './logger'; import { getSolutionErrors, @@ -45,10 +39,10 @@ const instancesBySolutionBuilderConfigs = new Map(); */ export function getTypeScriptInstance( loaderOptions: LoaderOptions, - loader: WebpackLoaderContext + loader: webpack.LoaderContext ): { instance?: TSInstance; error?: webpack.WebpackError } { const existing = getTSInstanceFromCache( - loader._compiler, + loader._compiler!, loaderOptions.instance ); if (existing) { @@ -119,7 +113,7 @@ function createFilePathKeyMapper( function successfulTypeScriptInstance( loaderOptions: LoaderOptions, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, log: logger.Logger, colors: chalk.Chalk, compiler: typeof typescript, @@ -159,7 +153,7 @@ function successfulTypeScriptInstance( } } - const module = loader._module; + const module = loader._module!; const basePath = loaderOptions.context || path.dirname(configFilePath || ''); const configParseResult = getConfigParseResult( compiler, @@ -304,7 +298,10 @@ function getExistingSolutionBuilderHost(key: FilePathKey) { return undefined; } -function addAssetHooks(loader: WebpackLoaderContext, instance: TSInstance) { +function addAssetHooks( + loader: webpack.LoaderContext, + instance: TSInstance +) { // makeAfterCompile is a closure. It returns a function which closes over the variable checkAllFilesForErrors // We need to get the function once and then reuse it, otherwise it will be recreated each time // and all files will always be checked. @@ -329,14 +326,14 @@ function addAssetHooks(loader: WebpackLoaderContext, instance: TSInstance) { // We need to add the hook above for each run. // For the first run, we just need to add the hook to loader._compilation - makeAssetsCallback(loader._compilation); + makeAssetsCallback(loader._compilation!); // For future calls in watch mode we need to watch for a new compilation and add the hook - loader._compiler.hooks.compilation.tap('ts-loader', makeAssetsCallback); + loader._compiler!.hooks.compilation.tap('ts-loader', makeAssetsCallback); } export function initializeInstance( - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, instance: TSInstance ) { if (!instance.initialSetupPending) { @@ -384,13 +381,13 @@ export function initializeInstance( // Setup watch run for solution building if (instance.solutionBuilderHost) { addAssetHooks(loader, instance); - loader._compiler.hooks.watchRun.tapAsync( + loader._compiler!.hooks.watchRun.tapAsync( 'ts-loader', makeWatchRun(instance, loader) ); } } else { - if (!loader._compiler.hooks) { + if (!loader._compiler!.hooks) { throw new Error( "You may be using an old version of webpack; please check you're using at least version 4" ); @@ -433,7 +430,7 @@ export function initializeInstance( addAssetHooks(loader, instance); - loader._compiler.hooks.watchRun.tapAsync( + loader._compiler!.hooks.watchRun.tapAsync( 'ts-loader', makeWatchRun(instance, loader) ); @@ -456,7 +453,7 @@ function getScriptRegexp(instance: TSInstance) { export function reportTranspileErrors( instance: TSInstance, - loader: WebpackLoaderContext + loader: webpack.LoaderContext ) { if (!instance.reportTranspileErrors) { return; @@ -479,13 +476,13 @@ export function reportTranspileErrors( loader.context ); - [...solutionErrors, ...errors].forEach(error => module.addError(error)); + [...solutionErrors, ...errors].forEach(error => module!.addError(error)); } } export function buildSolutionReferences( instance: TSInstance, - loader: WebpackLoaderContext + loader: webpack.LoaderContext ) { if (!supportsSolutionBuild(instance)) { return; diff --git a/src/interfaces.ts b/src/interfaces.ts index 41077a6b9..0d215d234 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -2,8 +2,6 @@ import type * as typescript from 'typescript'; import { Chalk } from 'chalk'; import * as logger from './logger'; -import type * as webpack from 'webpack'; -import type * as enhancedResolve from 'enhanced-resolve'; export interface ErrorInfo { code: number; @@ -321,208 +319,3 @@ export interface ResolvedModule { } export type Severity = 'error' | 'warning'; - -export type WebpackLoaderCallback = ( - err: Error | undefined | null, - content?: string | Buffer, - sourceMap?: string | any -) => void; - -/** based on https://github.com/webpack/webpack/pull/13164#issuecomment-821357676 */ -export interface WebpackLoaderContext { - version: number; - - /** - * Hacky access to the Compilation object of webpack. - */ - _compilation: webpack.Compilation; - - /** - * Hacky access to the Compiler object of webpack. - */ - _compiler: webpack.Compiler; - - /** - * Hacky access to the Module object being loaded. - */ - _module: webpack.NormalModule; - - addBuildDependency(dep: string): void; - - /** - * Add a directory as dependency of the loader result. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L305 - */ - addContextDependency(context: string): void; - - /** - * Adds a file as dependency of the loader result in order to make them watchable. - * For example, html-loader uses this technique as it finds src and src-set attributes. - * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L302 - */ - addDependency(file: string): void; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L308 */ - addMissingDependency(context: string): void; - - /** - * Make this loader async. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L108 - */ - async(): WebpackLoaderCallback | undefined; - - /** - * Make this loader result cacheable. By default it's not cacheable. - * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. - * This means the loader shouldn't have other dependencies than specified with this.addDependency. - * Most loaders are deterministic and cacheable. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L297 - */ - cacheable(flag?: boolean): void; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L116 */ - callback(): void; - - /** - * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders. Consider using pitch. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L320 - */ - clearDependencies(): void; - - /** - * The directory of the module. Can be used as context for resolving other stuff. - * eg '/workspaces/ts-loader/examples/vanilla/src' - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L289 - */ - context: string; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L358 */ - readonly currentRequest: string; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L381 */ - readonly data: any; - /** - * alias of addDependency - * Adds a file as dependency of the loader result in order to make them watchable. - * For example, html-loader uses this technique as it finds src and src-set attributes. - * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L302 - */ - dependency(file: string): void; - - /** - * https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L520 - */ - emitError(error: Error | string): void; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L562 */ - emitFile( - name: string, - content: string, - sourceMap: string, - assetInfo: webpack.AssetInfo - ): void; - - /** - * https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L510 - */ - emitWarning(warning: Error | string): void; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L590 */ - fs: enhancedResolve.CachedInputFileSystem; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L314 */ - getContextDependencies(): string[]; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L311 */ - getDependencies(): string[]; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L530 */ - getLogger(name: string): webpack.Compilation['logger']; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L317 */ - getMissingDependencies(): string[]; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L472 */ - getOptions(schema: any): any; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L541 */ - getResolve(options: webpack.Configuration): any; - - /** - * The index in the loaders array of the current loader. - * In the example: in loader1: 0, in loader2: 1 - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L290 - */ - loaderIndex: number; - - /** - * Resolves the given request to a module, applies all configured loaders and calls - * back with the generated source, the sourceMap and the module instance (usually an - * instance of NormalModule). Use this function if you need to know the source code - * of another module to generate the result. - */ - loadModule( - request: string, - callback: ( - err: Error | null, - source: string, - sourceMap: any, - module: webpack.Module - ) => void - ): void; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L586 */ - mode: 'development' | 'production' | 'none'; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L366 */ - readonly previousRequest: any; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L374 */ - readonly query: any; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L348 */ - readonly remainingRequest: any; - - /** https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L340 */ - readonly request: any; - - /** https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L538 */ - resolve(context: string, request: any, callback: any): any; - - /** - * Starting with webpack 4, the formerly `this.options.context` is provided as `this.rootContext`. - * https://github.com/webpack/webpack/blob/49890b77aae455b3204c17fdbed78eeb47bc1d98/lib/NormalModule.js#L583 - */ - rootContext: string; - - /** - * An array of all the loaders. It is writeable in the pitch phase. - * loaders = [{request: string, path: string, query: string, module: function}] - * - * In the example: - * [ - * { request: "/abc/loader1.js?xyz", - * path: "/abc/loader1.js", - * query: "?xyz", - * module: [Function] - * }, - * { request: "/abc/node_modules/loader2/index.js", - * path: "/abc/node_modules/loader2/index.js", - * query: "", - * module: [Function] - * } - * ] - * - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L291 - * https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/LoaderRunner.js#L46 - */ - loaders: { request: string }[]; - - /** - * The resource file. - * In the example: "/abc/resource.js" - */ - resourcePath: string; -} diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 383d437a2..7a7b0bf89 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -10,6 +10,7 @@ import { CustomResolveModuleName, CustomResolveTypeReferenceDirective, FilePathKey, + LoaderOptions, ModuleResolutionCache, ModuleResolutionHostMayBeCacheable, ResolvedModule, @@ -20,7 +21,6 @@ import { WatchCallbacks, WatchFactory, WatchHost, - WebpackLoaderContext, } from './interfaces'; import { makeResolver, ResolveSync } from './resolver'; import { @@ -33,7 +33,7 @@ import { function makeResolversAndModuleResolutionHost( scriptRegex: RegExp, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, instance: TSInstance, fileExists: (fileName: string) => boolean, enableFileCaching: boolean @@ -59,7 +59,7 @@ function makeResolversAndModuleResolutionHost( const getCurrentDirectory = () => loader.context; // make a (sync) resolver that follows webpack's rules - const resolveSync = makeResolver(loader._compiler.options); + const resolveSync = makeResolver(loader._compiler!.options); const moduleResolutionHost: ModuleResolutionHostMayBeCacheable = { trace: logData => instance.log.log(logData), @@ -137,7 +137,7 @@ function makeResolversAndModuleResolutionHost( */ export function makeServicesHost( scriptRegex: RegExp, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, instance: TSInstance, projectReferences?: ReadonlyArray ): ServiceHostWhichMayBeCacheable { @@ -469,7 +469,7 @@ export function updateFileWithText( */ export function makeWatchHost( scriptRegex: RegExp, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, instance: TSInstance, projectReferences?: ReadonlyArray ) { @@ -663,7 +663,7 @@ function createModuleResolutionCache( */ export function makeSolutionBuilderHost( scriptRegex: RegExp, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, instance: TSInstance ): SolutionBuilderWithWatchHost { const { diff --git a/src/watch-run.ts b/src/watch-run.ts index 8380404ea..34acaed57 100644 --- a/src/watch-run.ts +++ b/src/watch-run.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import * as webpack from 'webpack'; import * as constants from './constants'; -import { FilePathKey, TSInstance, WebpackLoaderContext } from './interfaces'; +import { FilePathKey, LoaderOptions, TSInstance } from './interfaces'; import { updateFileWithText } from './servicesHost'; import { fsReadFile } from './utils'; @@ -11,7 +11,7 @@ import { fsReadFile } from './utils'; */ export function makeWatchRun( instance: TSInstance, - loader: WebpackLoaderContext + loader: webpack.LoaderContext ) { // Called Before starting compilation after watch const lastTimes = new Map(); @@ -81,7 +81,7 @@ function updateFile( instance: TSInstance, key: FilePathKey, filePath: string, - loader: WebpackLoaderContext, + loader: webpack.LoaderContext, loaderIndex: number ) { return new Promise((resolve, reject) => { diff --git a/test/comparison-tests/codeSplitting/expectedOutput-4.2/bundle.js b/test/comparison-tests/codeSplitting/expectedOutput-4.2/bundle.js index 46be9f69c..f981deb77 100644 --- a/test/comparison-tests/codeSplitting/expectedOutput-4.2/bundle.js +++ b/test/comparison-tests/codeSplitting/expectedOutput-4.2/bundle.js @@ -246,7 +246,7 @@ eval("\nmodule.exports = 'b';\n\n\n//# sourceURL=webpack:///./b.ts?"); /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } -/******/ if(runtime) runtime(__webpack_require__); +/******/ if(runtime) var result = runtime(__webpack_require__); /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; diff --git a/test/comparison-tests/codeSplitting/expectedOutput-4.2/output.txt b/test/comparison-tests/codeSplitting/expectedOutput-4.2/output.txt index bdbd31a98..4268cc74a 100644 --- a/test/comparison-tests/codeSplitting/expectedOutput-4.2/output.txt +++ b/test/comparison-tests/codeSplitting/expectedOutput-4.2/output.txt @@ -1,6 +1,6 @@ asset bundle.js 11.8 KiB [emitted] (name: main) asset c_ts-d_ts.bundle.js 1 KiB [emitted] -runtime modules 5.93 KiB 7 modules +runtime modules 5.95 KiB 7 modules cacheable modules 733 bytes ./app.ts 589 bytes [built] [code generated] ./a.ts 36 bytes [built] [code generated] diff --git a/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/bundle.js b/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/bundle.js index cebb3c54b..4af44983f 100644 --- a/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/bundle.js +++ b/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/bundle.js @@ -246,7 +246,7 @@ eval("\nmodule.exports = 'b';\n\n\n//# sourceURL=webpack:///./b.ts?"); /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } -/******/ if(runtime) runtime(__webpack_require__); +/******/ if(runtime) var result = runtime(__webpack_require__); /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; diff --git a/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/output.txt b/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/output.txt index fe0f1e559..9689eb821 100644 --- a/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/output.txt +++ b/test/comparison-tests/codeSplitting/expectedOutput-transpile-4.2/output.txt @@ -1,6 +1,6 @@ -asset bundle.js 11.8 KiB [emitted] (name: main) +asset bundle.js 11.9 KiB [emitted] (name: main) asset c_ts-d_ts.bundle.js 1 KiB [emitted] -runtime modules 5.93 KiB 7 modules +runtime modules 5.95 KiB 7 modules cacheable modules 769 bytes ./app.ts 625 bytes [built] [code generated] ./a.ts 36 bytes [built] [code generated] diff --git a/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/bundle.js b/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/bundle.js index 2cb8c3e77..556a72b37 100644 --- a/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/bundle.js +++ b/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/bundle.js @@ -256,7 +256,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } -/******/ if(runtime) runtime(__webpack_require__); +/******/ if(runtime) var result = runtime(__webpack_require__); /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; diff --git a/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/output.txt b/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/output.txt index bf8dd6c5c..86e2f9aa7 100644 --- a/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/output.txt +++ b/test/comparison-tests/es6codeSplitting/expectedOutput-4.2/output.txt @@ -1,6 +1,6 @@ asset bundle.js 12.7 KiB [emitted] (name: main) asset d_ts.bundle.js 925 bytes [emitted] -runtime modules 5.93 KiB 7 modules +runtime modules 5.95 KiB 7 modules cacheable modules 1.39 KiB ./app.ts 1020 bytes [built] [code generated] ./a.ts 100 bytes [built] [code generated] diff --git a/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/bundle.js b/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/bundle.js index 2cb8c3e77..556a72b37 100644 --- a/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/bundle.js +++ b/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/bundle.js @@ -256,7 +256,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } -/******/ if(runtime) runtime(__webpack_require__); +/******/ if(runtime) var result = runtime(__webpack_require__); /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; diff --git a/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/output.txt b/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/output.txt index bf8dd6c5c..86e2f9aa7 100644 --- a/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/output.txt +++ b/test/comparison-tests/es6codeSplitting/expectedOutput-transpile-4.2/output.txt @@ -1,6 +1,6 @@ asset bundle.js 12.7 KiB [emitted] (name: main) asset d_ts.bundle.js 925 bytes [emitted] -runtime modules 5.93 KiB 7 modules +runtime modules 5.95 KiB 7 modules cacheable modules 1.39 KiB ./app.ts 1020 bytes [built] [code generated] ./a.ts 100 bytes [built] [code generated] diff --git a/yarn.lock b/yarn.lock index 4361a3e31..882cf08e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,9 +31,9 @@ regenerator-runtime "^0.13.2" "@discoveryjs/json-ext@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" - integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== + version "0.5.3" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz#90420f9f9c6d3987f176a19a7d8e764271a2f55d" + integrity sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g== "@eslint/eslintrc@^0.4.1": version "0.4.1" @@ -107,23 +107,18 @@ "@types/estree" "*" "@types/eslint@*": - version "7.2.7" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.7.tgz#f7ef1cf0dceab0ae6f9a976a0a9af14ab1baca26" - integrity sha512-EHXbc1z2GoQRqHaAT7+grxlTJ3WE2YNeD6jlpPoRc83cCoThRY+NUWjCUZaYmk51OICkPXn2hhphcWcWXgNW0Q== + version "7.2.11" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.11.tgz#180b58f5bb7d7376e39d22496e2b08901aa52fd2" + integrity sha512-WYhv//5K8kQtsSc9F1Kn2vHzhYor6KpwPbARH7hwYe3C3ETD0EVx/3P5qQybUoaBEuUa9f/02JjBiXFWalYUmw== dependencies: "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": +"@types/estree@*", "@types/estree@^0.0.47": version "0.0.47" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4" integrity sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg== -"@types/estree@^0.0.46": - version "0.0.46" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" - integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== - "@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" @@ -342,22 +337,22 @@ "@webassemblyjs/ast" "1.11.0" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.2.tgz#2a20812bfb3a2ebb0b27ee26a52eeb3e3f000836" - integrity sha512-3OBzV2fBGZ5TBfdW50cha1lHDVf9vlvRXnjpVbJBa20pSZQaSkMJZiwA8V2vD9ogyeXn8nU5s5A6mHyf5jhMzA== +"@webpack-cli/configtest@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.3.tgz#204bcff87cda3ea4810881f7ea96e5f5321b87b9" + integrity sha512-WQs0ep98FXX2XBAfQpRbY0Ma6ADw8JR6xoIkaIiJIzClGOMqVRvPCWqndTxf28DgFopWan0EKtHtg/5W1h0Zkw== -"@webpack-cli/info@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.2.3.tgz#ef819d10ace2976b6d134c7c823a3e79ee31a92c" - integrity sha512-lLek3/T7u40lTqzCGpC6CAbY6+vXhdhmwFRxZLMnRm6/sIF/7qMpT8MocXCRQfz0JAh63wpbXLMnsQ5162WS7Q== +"@webpack-cli/info@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.2.4.tgz#7381fd41c9577b2d8f6c2594fad397ef49ad5573" + integrity sha512-ogE2T4+pLhTTPS/8MM3IjHn0IYplKM4HbVNMCWA9N4NrdPzunwenpCsqKEXyejMfRu6K8mhauIPYf8ZxWG5O6g== dependencies: envinfo "^7.7.3" -"@webpack-cli/serve@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.3.1.tgz#911d1b3ff4a843304b9c3bacf67bb34672418441" - integrity sha512-0qXvpeYO6vaNoRBI52/UsbcaBydJCggoBBnIo/ovQQdn6fug0BgwsjorV1hVS7fMqGVTZGcVxv8334gjmbj5hw== +"@webpack-cli/serve@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.4.0.tgz#f84fd07bcacefe56ce762925798871092f0f228e" + integrity sha512-xgT/HqJ+uLWGX+Mzufusl3cgjAcnqYYskaB7o0vRcwOEfuu6hMzSILQpnIzFMGsTaeaX4Nnekl+6fadLbl1/Vg== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -387,10 +382,10 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4: - version "8.1.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.0.tgz#52311fd7037ae119cbb134309e901aa46295b3fe" - integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA== +acorn@^8.2.1: + version "8.2.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" + integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== ajv-keywords@^3.5.2: version "3.5.2" @@ -1271,15 +1266,15 @@ browser-stdout@1.3.1: integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserslist@^4.14.5: - version "4.16.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" - integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== + version "4.16.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" + integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== dependencies: - caniuse-lite "^1.0.30001181" - colorette "^1.2.1" - electron-to-chromium "^1.3.649" + caniuse-lite "^1.0.30001219" + colorette "^1.2.2" + electron-to-chromium "^1.3.723" escalade "^3.1.1" - node-releases "^1.1.70" + node-releases "^1.1.71" buffer-from@^1.0.0: version "1.1.1" @@ -1335,10 +1330,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001181: - version "1.0.30001204" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz#256c85709a348ec4d175e847a3b515c66e79f2aa" - integrity sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ== +caniuse-lite@^1.0.30001219: + version "1.0.30001228" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" + integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" @@ -1401,11 +1396,9 @@ chokidar@^3.4.2: fsevents "~2.3.1" chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^2.0.0: version "2.0.0" @@ -1506,7 +1499,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.1: +colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== @@ -1817,10 +1810,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.649: - version "1.3.701" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.701.tgz#5e796ed7ce88cd77bc7bf831cf311ef6b067c389" - integrity sha512-Zd9ofdIMYHYhG1gvnejQDvC/kqSeXQvtXF0yRURGxgwGqDZm9F9Fm3dYFnm5gyuA7xpXfBlzVLN1sz0FjxpKfw== +electron-to-chromium@^1.3.723: + version "1.3.735" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.735.tgz#fa1a8660f2790662291cb2136f0e446a444cdfdc" + integrity sha512-cp7MWzC3NseUJV2FJFgaiesdrS+A8ZUjX5fLAxdRlcaPDkaPGFplX930S5vf84yqDp4LjuLdKouWuVOTwUfqHQ== elegant-spinner@^1.0.1: version "1.0.1" @@ -1874,7 +1867,7 @@ engine.io@~4.1.0: engine.io-parser "~4.0.0" ws "~7.4.2" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.7.0: +enhanced-resolve@^5.0.0: version "5.7.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== @@ -1882,7 +1875,15 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.7.0: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enhanced-resolve@^5.8.0: + version "5.8.2" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz#15ddc779345cbb73e97c611cd00c01c1e7bf4d8b" + integrity sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -1895,9 +1896,9 @@ ent@~2.2.0: integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= envinfo@^7.7.3: - version "7.7.4" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" - integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== error-ex@^1.3.1: version "1.3.2" @@ -2477,9 +2478,9 @@ get-stream@^4.0.0: pump "^3.0.0" get-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" - integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" @@ -2877,9 +2878,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + version "2.4.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" + integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== dependencies: has "^1.0.3" @@ -3643,17 +3644,22 @@ mime-db@1.46.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== +mime-db@1.47.0: + version "1.47.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" + integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== + mime-db@~1.37.0: version "1.37.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== -mime-types@^2.1.27, mime-types@~2.1.24: - version "2.1.29" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" - integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== +mime-types@^2.1.27: + version "2.1.30" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" + integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== dependencies: - mime-db "1.46.0" + mime-db "1.47.0" mime-types@~2.1.18: version "2.1.21" @@ -3662,6 +3668,13 @@ mime-types@~2.1.18: dependencies: mime-db "~1.37.0" +mime-types@~2.1.24: + version "2.1.29" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" + integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== + dependencies: + mime-db "1.46.0" + mime@^2.4.5: version "2.5.2" resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" @@ -3803,10 +3816,10 @@ node-environment-flags@1.0.5: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-releases@^1.1.70: - version "1.1.71" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" - integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== +node-releases@^1.1.71: + version "1.1.72" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe" + integrity sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw== normalize-package-data@^2.5.0: version "2.5.0" @@ -4204,9 +4217,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.0.5: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== private@^0.1.6, private@^0.1.7, private@^0.1.8: version "0.1.8" @@ -4544,7 +4557,7 @@ rxjs@^6.3.3: safe-buffer@^5.1.0: version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-buffer@~5.1.0, safe-buffer@~5.1.1: @@ -5056,21 +5069,21 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== terser-webpack-plugin@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" - integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== + version "5.1.2" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.2.tgz#51d295eb7cc56785a67a372575fdc46e42d5c20c" + integrity sha512-6QhDaAiVHIQr5Ab3XUWZyDmrIPCHMiqJVljMF91YKyqwKkL5QHnYMkrMBy96v9Z7ev1hGhSEw1HQZc2p/s5Z8Q== dependencies: jest-worker "^26.6.2" p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" source-map "^0.6.1" - terser "^5.5.1" + terser "^5.7.0" -terser@^5.5.1: - version "5.6.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.6.1.tgz#a48eeac5300c0a09b36854bf90d9c26fb201973c" - integrity sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw== +terser@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693" + integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -5294,25 +5307,24 @@ void-elements@^2.0.0: integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= watchpack@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" - integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce" + integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" webpack-cli@^4.5.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.6.0.tgz#27ae86bfaec0cf393fcfd58abdc5a229ad32fd16" - integrity sha512-9YV+qTcGMjQFiY7Nb1kmnupvb1x40lfpj8pwdO/bom+sQiP4OBMKjHq29YQrlDWDPZO9r/qWaRRywKaRDKqBTA== + version "4.7.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.7.0.tgz#3195a777f1f802ecda732f6c95d24c0004bc5a35" + integrity sha512-7bKr9182/sGfjFm+xdZSwgQuFjgEcy0iCTIBxRUeteJ2Kr8/Wz0qNJX+jw60LU36jApt4nmMkep6+W5AKhok6g== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.0.2" - "@webpack-cli/info" "^1.2.3" - "@webpack-cli/serve" "^1.3.1" + "@webpack-cli/configtest" "^1.0.3" + "@webpack-cli/info" "^1.2.4" + "@webpack-cli/serve" "^1.4.0" colorette "^1.2.1" commander "^7.0.0" - enquirer "^2.3.6" execa "^5.0.0" fastest-levenshtein "^1.0.12" import-local "^3.0.2" @@ -5345,19 +5357,19 @@ webpack-sources@^2.1.1: source-map "^0.6.1" webpack@^5.20.0: - version "5.28.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.28.0.tgz#0de8bcd706186b26da09d4d1e8cbd3e4025a7c2f" - integrity sha512-1xllYVmA4dIvRjHzwELgW4KjIU1fW4PEuEnjsylz7k7H5HgPOctIq7W1jrt3sKH9yG5d72//XWzsHhfoWvsQVg== + version "5.37.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.37.1.tgz#2deb5acd350583c1ab9338471f323381b0b0c14b" + integrity sha512-btZjGy/hSjCAAVHw+cKG+L0M+rstlyxbO2C+BOTaQ5/XAnxkDrP5sVbqWhXgo4pL3X2dcOib6rqCP20Zr9PLow== dependencies: "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.46" + "@types/estree" "^0.0.47" "@webassemblyjs/ast" "1.11.0" "@webassemblyjs/wasm-edit" "1.11.0" "@webassemblyjs/wasm-parser" "1.11.0" - acorn "^8.0.4" + acorn "^8.2.1" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.7.0" + enhanced-resolve "^5.8.0" es-module-lexer "^0.4.0" eslint-scope "^5.1.1" events "^3.2.0"