Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: ts-loader @ 5.3.3 .. 5.4.5

appveyor.yml

@@ -1,26 +0,0 @@
-image: Visual Studio 2017
-environment:
- FORCE_COLOR: 1
- nodejs_version: "10"
- matrix:
- - TYPESCRIPT: typescript@3.2.1
- - TYPESCRIPT: typescript@next
- - TYPESCRIPT: typescript@3.1.1
- - TYPESCRIPT: typescript@3.0.1
- - TYPESCRIPT: typescript@2.9.2
- - TYPESCRIPT: typescript@2.8.1
- - TYPESCRIPT: typescript@2.7.1
- - TYPESCRIPT: typescript@2.6.1
- - TYPESCRIPT: typescript@2.5.2
- - TYPESCRIPT: typescript@2.4.1
-install:
- - ps: Install-Product node $env:nodejs_version
- - yarn install
- - yarn build
- - yarn lint
- - yarn add %TYPESCRIPT%
-test_script:
- - node --version
- - yarn --version
- - yarn test
-build: off

CHANGELOG.md

@@ -1,5 +1,18 @@
# Changelog
+## v5.4.5
+
+* [use @types/webpack for loader typings](https://github.com/TypeStrong/ts-loader/pull/927) - thanks @LukeSheard!
+
+## v5.4.4
+
+* [refactor: add common appendTsTsxSuffixesIfRequired function to instance](https://github.com/TypeStrong/ts-loader/pull/924) - thanks @johnnyreilly!
+
+## v5.4.3
+
+* [feat: resolveTypeReferenceDirective support for yarn PnP](https://github.com/TypeStrong/ts-loader/pull/921) - thanks @johnnyreilly!
+* [fix: don't include anything apart from ts-loader in publish](https://github.com/TypeStrong/ts-loader/pull/923) - thanks @johnnyreilly!
+
## v5.3.3
* [fix: Pass ts.Program to getCustomTransformers](https://github.com/TypeStrong/ts-loader/pull/889) (#860) - thanks @andersekdahl!

CONTRIBUTING.md

@@ -1,46 +0,0 @@
-# Contributer's Guide
-
-We welcome contributions from the community and have gathered guidelines
-here to help you get started.
-
-## Discussion
-
-While not absolutely required, it is encouraged that you first open an issue
-for any bug or feature request. This allows discussion on the proper course of
-action to take before coding begins.
-
-## Building
-
-```shell
-yarn install
-yarn build
-```
-
-## Changing
-
-Most of the information you need to contribute code changes can [be found here](https://guides.github.com/activities/contributing-to-open-source/).
-In short: fork, make your changes, and submit a pull request.
-
-## Testing
-
-This project makes use of 2 integration test packs to make sure we don't break anything. That's right, count them, 2! There is a comparison test pack which compares compilation outputs and is long established. There is also an execution test pack which executes the compiled JavaScript. This test pack is young and contains fewer tests; but it shows promise.
-
-You can run all the tests (in both test packs) with `yarn test`.
-
-To run comparison tests alone use `yarn run comparison-tests`.
-To run execution tests alone use `yarn run execution-tests`.
-
-Not all bugs/features necessarily fit into either framework and that's OK. However, most do and therefore you should make every effort to create at least one test which demonstrates the issue or exercises the feature. Use your judgement to decide whether you think a comparison test or an execution test is most appropriate.
-
-To read about the comparison test pack take a look [here](test/comparison-tests/README.md)
-To read about the execution test pack take a look [here](test/execution-tests/README.md)
-
-## Debugging
-
-To debug ts-loader itself:
-
-```
-node --inspect-brk node_modules/webpack/bin/webpack.js --config webpack.dev.js # Obviously configure this depending upon your project setup
-```
-
-Then put a breakpoint in `node_modules/ts-loader/dist/index.js`, and debug in VS Code with "Attach to Node Process". The dist is JS compiled from TS, but it’s still pretty readable.
\ No newline at end of file

dist/after-compile.js

@@ -47,9 +47,7 @@
* based on filepath
*/
function determineModules(compilation) {
- // TODO: Convert to reduce
- const modules = new Map();
- compilation.modules.forEach(module => {
+ return compilation.modules.reduce((modules, module) => {
if (module.resource) {
const modulePath = path.normalize(module.resource);
const existingModules = modules.get(modulePath);
@@ -62,8 +60,8 @@
modules.set(modulePath, [module]);
}
}
- });
return modules;
+ }, new Map());
}
function determineFilesToCheckForErrors(checkAllFilesForErrors, instance) {
const { files, modifiedFiles, filesWithErrors, otherFiles } = instance;

dist/compilerSetup.js

@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const semver = require("semver");
-const constants = require("./constants");
+const typescript = require("typescript");
function getCompiler(loaderOptions, log) {
let compiler;
let errorMessage;
@@ -49,8 +49,8 @@
// if `module` is not specified and not using ES6+ target, default to CJS module output
if (compilerOptions.module === undefined &&
(compilerOptions.target !== undefined &&
- compilerOptions.target < constants.ScriptTargetES2015)) {
- compilerOptions.module = constants.ModuleKindCommonJs;
+ compilerOptions.target < typescript.ScriptTarget.ES2015)) {
+ compilerOptions.module = typescript.ModuleKind.CommonJS;
}
return compilerOptions;
}

dist/constants.js

@@ -6,8 +6,6 @@
exports.LineFeed = '\n';
exports.CarriageReturnLineFeedCode = 0;
exports.LineFeedCode = 1;
-exports.ScriptTargetES2015 = 2;
-exports.ModuleKindCommonJs = 1;
exports.extensionRegex = /\.[^.]+$/;
exports.tsxRegex = /\.tsx$/i;
exports.tsTsxRegex = /\.ts(x?)$/i;

dist/index.js

@@ -135,7 +135,8 @@
'allowTsInNodeModules',
'experimentalFileCaching',
'projectReferences',
- 'resolveModuleName'
+ 'resolveModuleName',
+ 'resolveTypeReferenceDirective'
];
/**
* Validate the supplied loader options.

dist/instances.js

@@ -55,6 +55,13 @@
const compilerOptions = compilerSetup_1.getCompilerOptions(configParseResult);
const files = new Map();
const otherFiles = new Map();
+ const appendTsTsxSuffixesIfRequired = loaderOptions.appendTsSuffixTo.length > 0 ||
+ loaderOptions.appendTsxSuffixTo.length > 0
+ ? (filePath) => utils_1.appendSuffixesIfMatch({
+ '.ts': loaderOptions.appendTsSuffixTo,
+ '.tsx': loaderOptions.appendTsxSuffixTo
+ }, filePath)
+ : (filePath) => filePath;
// same strategy as https://github.com/s-panferov/awesome-typescript-loader/pull/531/files
let { getCustomTransformers: customerTransformers } = loaderOptions;
let getCustomTransformers = Function.prototype;
@@ -92,6 +99,7 @@
instances[loaderOptions.instance] = {
compiler,
compilerOptions,
+ appendTsTsxSuffixesIfRequired,
loaderOptions,
files,
otherFiles,
@@ -129,6 +137,7 @@
const instance = (instances[loaderOptions.instance] = {
compiler,
compilerOptions,
+ appendTsTsxSuffixesIfRequired,
loaderOptions,
files,
otherFiles,
@@ -146,7 +155,7 @@
if (loaderOptions.experimentalWatchApi && compiler.createWatchProgram) {
log.logInfo('Using watch api');
// If there is api available for watch, use it instead of language service
- instance.watchHost = servicesHost_1.makeWatchHost(scriptRegex, log, loader, instance, loaderOptions.appendTsSuffixTo, loaderOptions.appendTsxSuffixTo, configParseResult.projectReferences);
+ instance.watchHost = servicesHost_1.makeWatchHost(scriptRegex, log, loader, instance, configParseResult.projectReferences);
instance.watchOfFilesAndCompilerOptions = compiler.createWatchProgram(instance.watchHost);
instance.program = instance.watchOfFilesAndCompilerOptions
.getProgram()

dist/logger.js

@@ -6,7 +6,7 @@
LogLevel[LogLevel["INFO"] = 1] = "INFO";
LogLevel[LogLevel["WARN"] = 2] = "WARN";
LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
-})(LogLevel || (LogLevel = {}));
+})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
const stderrConsole = new console_1.Console(process.stderr);
const stdoutConsole = new console_1.Console(process.stdout);
const doNothingLogger = (_message) => { };

dist/servicesHost.js

@@ -8,7 +8,7 @@
* Create the TypeScript language service
*/
function makeServicesHost(scriptRegex, log, loader, instance, enableFileCaching, projectReferences) {
- const { compiler, compilerOptions, files, loaderOptions: { appendTsSuffixTo, appendTsxSuffixTo, resolveModuleName: customResolveModuleName } } = instance;
+ const { compiler, compilerOptions, appendTsTsxSuffixesIfRequired, files, loaderOptions: { resolveModuleName: customResolveModuleName, resolveTypeReferenceDirective: customResolveTypeReferenceDirective } } = instance;
const newLine = compilerOptions.newLine === constants.CarriageReturnLineFeedCode
? constants.CarriageReturnLineFeed
: compilerOptions.newLine === constants.LineFeedCode
@@ -28,6 +28,7 @@
const clearCache = enableFileCaching ? addCache(moduleResolutionHost) : null;
// loader.context seems to work fine on Linux / Mac regardless causes problems for @types resolution on Windows for TypeScript < 2.3
const getCurrentDirectory = () => loader.context;
+ const resolvers = makeResolvers(compiler, compilerOptions, moduleResolutionHost, customResolveTypeReferenceDirective, customResolveModuleName, resolveSync, appendTsTsxSuffixesIfRequired, scriptRegex, instance);
const servicesHost = {
getProjectVersion: () => `${instance.version}`,
getProjectReferences: () => projectReferences,
@@ -73,22 +74,34 @@
getNewLine: () => newLine,
trace: log.log,
log: log.log,
- /* Unclear if this is useful
- resolveTypeReferenceDirectives: (typeDirectiveNames: string[], containingFile: string) =>
- typeDirectiveNames.map(directive =>
- compiler.resolveTypeReferenceDirective(directive, containingFile, compilerOptions, moduleResolutionHost).resolvedTypeReferenceDirective),
- */
- resolveModuleNames: (moduleNames, containingFile) => resolveModuleNames(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleNames, containingFile, getResolutionStrategy, customResolveModuleName),
+ // used for (/// <reference types="...">) see https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250#issuecomment-485061329
+ resolveTypeReferenceDirectives: resolvers.resolveTypeReferenceDirectives,
+ resolveModuleNames: resolvers.resolveModuleNames,
getCustomTransformers: () => instance.transformers
};
return { servicesHost, clearCache };
}
exports.makeServicesHost = makeServicesHost;
+function makeResolvers(compiler, compilerOptions, moduleResolutionHost, customResolveTypeReferenceDirective, customResolveModuleName, resolveSync, appendTsTsxSuffixesIfRequired, scriptRegex, instance) {
+ const resolveTypeReferenceDirective = makeResolveTypeReferenceDirective(compiler, compilerOptions, moduleResolutionHost, customResolveTypeReferenceDirective);
+ const resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile, _redirectedReference) => typeDirectiveNames.map(directive => resolveTypeReferenceDirective(directive, containingFile)
+ .resolvedTypeReferenceDirective);
+ const resolveModuleName = makeResolveModuleName(compiler, compilerOptions, moduleResolutionHost, customResolveModuleName);
+ const resolveModuleNames = (moduleNames, containingFile, _reusedNames, _redirectedReference) => {
+ const resolvedModules = moduleNames.map(moduleName => resolveModule(resolveSync, resolveModuleName, appendTsTsxSuffixesIfRequired, scriptRegex, moduleName, containingFile));
+ populateDependencyGraphs(resolvedModules, instance, containingFile);
+ return resolvedModules;
+ };
+ return {
+ resolveTypeReferenceDirectives,
+ resolveModuleNames
+ };
+}
/**
* Create the TypeScript Watch host
*/
-function makeWatchHost(scriptRegex, log, loader, instance, appendTsSuffixTo, appendTsxSuffixTo, projectReferences) {
- const { compiler, compilerOptions, files, otherFiles } = instance;
+function makeWatchHost(scriptRegex, log, loader, instance, projectReferences) {
+ const { compiler, compilerOptions, appendTsTsxSuffixesIfRequired, files, otherFiles, loaderOptions: { resolveModuleName: customResolveModuleName, resolveTypeReferenceDirective: customResolveTypeReferenceDirective } } = instance;
const newLine = compilerOptions.newLine === constants.CarriageReturnLineFeedCode
? constants.CarriageReturnLineFeed
: compilerOptions.newLine === constants.LineFeedCode
@@ -107,6 +120,7 @@
const watchedFiles = {};
const watchedDirectories = {};
const watchedDirectoriesRecursive = {};
+ const resolvers = makeResolvers(compiler, compilerOptions, moduleResolutionHost, customResolveTypeReferenceDirective, customResolveModuleName, resolveSync, appendTsTsxSuffixesIfRequired, scriptRegex, instance);
const watchHost = {
rootFiles: getRootFileNames(),
options: compilerOptions,
@@ -123,7 +137,9 @@
trace: logData => log.log(logData),
watchFile,
watchDirectory,
- resolveModuleNames: (moduleNames, containingFile) => resolveModuleNames(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleNames, containingFile, getResolutionStrategy),
+ // used for (/// <reference types="...">) see https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250#issuecomment-485061329
+ resolveTypeReferenceDirectives: resolvers.resolveTypeReferenceDirectives,
+ resolveModuleNames: resolvers.resolveModuleNames,
invokeFileWatcher,
invokeDirectoryWatcher,
updateRootFileNames: () => {
@@ -223,38 +239,28 @@
}
}
exports.makeWatchHost = makeWatchHost;
-function resolveModuleNames(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleNames, containingFile, resolutionStrategy, customResolveModuleName) {
- const resolvedModules = moduleNames.map(moduleName => resolveModuleName(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleName, containingFile, resolutionStrategy, customResolveModuleName));
- populateDependencyGraphs(resolvedModules, instance, containingFile);
- return resolvedModules;
+function makeResolveTypeReferenceDirective(compiler, compilerOptions, moduleResolutionHost, customResolveTypeReferenceDirective) {
+ if (customResolveTypeReferenceDirective === undefined) {
+ return (directive, containingFile) => compiler.resolveTypeReferenceDirective(directive, containingFile, compilerOptions, moduleResolutionHost);
+ }
+ return (directive, containingFile) => customResolveTypeReferenceDirective(directive, containingFile, compilerOptions, moduleResolutionHost, compiler.resolveTypeReferenceDirective);
}
function isJsImplementationOfTypings(resolvedModule, tsResolution) {
return (resolvedModule.resolvedFileName.endsWith('js') &&
/\.d\.ts$/.test(tsResolution.resolvedFileName));
}
-function applyTsResolver(compiler, moduleName, containingFile, compilerOptions, moduleResolutionHost) {
- return compiler.resolveModuleName(moduleName, containingFile, compilerOptions, moduleResolutionHost);
-}
-function resolveModuleName(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleName, containingFile, resolutionStrategy, customResolveModuleName) {
- const { compiler, compilerOptions } = instance;
+function resolveModule(resolveSync, resolveModuleName, appendTsTsxSuffixesIfRequired, scriptRegex, moduleName, containingFile) {
let resolutionResult;
try {
const originalFileName = resolveSync(undefined, path.normalize(path.dirname(containingFile)), moduleName);
- const resolvedFileName = appendTsSuffixTo.length > 0 || appendTsxSuffixTo.length > 0
- ? utils_1.appendSuffixesIfMatch({
- '.ts': appendTsSuffixTo,
- '.tsx': appendTsxSuffixTo
- }, originalFileName)
- : originalFileName;
+ const resolvedFileName = appendTsTsxSuffixesIfRequired(originalFileName);
if (resolvedFileName.match(scriptRegex) !== null) {
resolutionResult = { resolvedFileName, originalFileName };
}
// tslint:disable-next-line:no-empty
}
catch (e) { }
- const tsResolution = customResolveModuleName !== undefined
- ? customResolveModuleName(moduleName, containingFile, compilerOptions, moduleResolutionHost, (moduleNameFromCustomFn, containingFileFromCustomFn, compilerOptionsFromCustomFn, moduleResolutionHostFromCustomFn) => applyTsResolver(compiler, moduleNameFromCustomFn, containingFileFromCustomFn, compilerOptionsFromCustomFn, moduleResolutionHostFromCustomFn))
- : applyTsResolver(compiler, moduleName, containingFile, compilerOptions, moduleResolutionHost);
+ const tsResolution = resolveModuleName(moduleName, containingFile);
if (tsResolution.resolvedModule !== undefined) {
const resolvedFileName = path.normalize(tsResolution.resolvedModule.resolvedFileName);
const tsResolutionResult = {
@@ -262,17 +268,20 @@
resolvedFileName,
isExternalLibraryImport: tsResolution.resolvedModule.isExternalLibraryImport
};
- return resolutionStrategy(resolutionResult, tsResolutionResult);
- }
- return resolutionResult;
-}
-function getResolutionStrategy(resolutionResult, tsResolutionResult) {
return resolutionResult === undefined ||
resolutionResult.resolvedFileName ===
tsResolutionResult.resolvedFileName ||
isJsImplementationOfTypings(resolutionResult, tsResolutionResult)
? tsResolutionResult
: resolutionResult;
+ }
+ return resolutionResult;
+}
+function makeResolveModuleName(compiler, compilerOptions, moduleResolutionHost, customResolveModuleName) {
+ if (customResolveModuleName === undefined) {
+ return (moduleName, containingFile) => compiler.resolveModuleName(moduleName, containingFile, compilerOptions, moduleResolutionHost);
+ }
+ return (moduleName, containingFile) => customResolveModuleName(moduleName, containingFile, compilerOptions, moduleResolutionHost, compiler.resolveModuleName);
}
function populateDependencyGraphs(resolvedModules, instance, containingFile) {
resolvedModules = resolvedModules.filter(mod => mod !== null && mod !== undefined);

dist/types/after-compile.d.ts

@@ -1,2 +1,3 @@
-import { TSInstance, WebpackCompilation } from './interfaces';
-export declare function makeAfterCompile(instance: TSInstance, configFilePath: string | undefined): (compilation: WebpackCompilation, callback: () => void) => void;
+import * as webpack from 'webpack';
+import { TSInstance } from './interfaces';
+export declare function makeAfterCompile(instance: TSInstance, configFilePath: string | undefined): (compilation: webpack.compilation.Compilation, callback: () => void) => void;

dist/types/config.d.ts

@@ -1,12 +1,13 @@
import { Chalk } from 'chalk';
import * as typescript from 'typescript';
-import { LoaderOptions, Webpack, WebpackError } from './interfaces';
+import * as webpack from 'webpack';
+import { LoaderOptions, WebpackError } from './interfaces';
import * as logger from './logger';
interface ConfigFile {
config?: any;
error?: typescript.Diagnostic;
}
-export declare function getConfigFile(compiler: typeof typescript, colors: Chalk, loader: Webpack, loaderOptions: LoaderOptions, compilerCompatible: boolean, log: logger.Logger, compilerDetailsLogMessage: string): {
+export declare function getConfigFile(compiler: typeof typescript, colors: Chalk, loader: webpack.loader.LoaderContext, loaderOptions: LoaderOptions, compilerCompatible: boolean, log: logger.Logger, compilerDetailsLogMessage: string): {
configFilePath: string | undefined;
configFile: ConfigFile;
configFileError: WebpackError | undefined;

dist/types/constants.d.ts

@@ -3,8 +3,6 @@
export declare const LineFeed = "\n";
export declare const CarriageReturnLineFeedCode = 0;
export declare const LineFeedCode = 1;
-export declare const ScriptTargetES2015 = 2;
-export declare const ModuleKindCommonJs = 1;
export declare const extensionRegex: RegExp;
export declare const tsxRegex: RegExp;
export declare const tsTsxRegex: RegExp;

dist/types/index.d.ts

@@ -1,8 +1,9 @@
-import { LoaderOptions, Webpack } from './interfaces';
+import * as webpack from 'webpack';
+import { LoaderOptions } from './interfaces';
/**
* The entry point for ts-loader
*/
-declare function loader(this: Webpack, contents: string): void;
+declare function loader(this: webpack.loader.LoaderContext, contents: string): void;
export = loader;
/**
* expose public types via declaration merging

dist/types/instances.d.ts

@@ -1,5 +1,6 @@
import * as typescript from 'typescript';
-import { LoaderOptions, TSInstance, Webpack, WebpackError } from './interfaces';
+import * as webpack from 'webpack';
+import { LoaderOptions, TSInstance, WebpackError } from './interfaces';
/**
* The loader is executed once for each file seen by webpack. However, we need to keep
* a persistent instance of TypeScript that contains all of the files in the program
@@ -7,7 +8,7 @@
* or returns the existing one. Multiple instances are possible by using the
* `instance` property.
*/
-export declare function getTypeScriptInstance(loaderOptions: LoaderOptions, loader: Webpack): {
+export declare function getTypeScriptInstance(loaderOptions: LoaderOptions, loader: webpack.loader.LoaderContext): {
instance?: TSInstance;
error?: WebpackError;
};

dist/types/interfaces.d.ts

@@ -1,11 +1,6 @@
-import * as typescript from 'typescript';
export { ModuleResolutionHost } from 'typescript';
+import * as typescript from 'typescript';
import { Chalk } from 'chalk';
-export interface SourceMap {
- sources: any[];
- file: string;
- sourcesContent: string[];
-}
export interface ErrorInfo {
code: number;
severity: Severity;
@@ -15,100 +10,6 @@
character: number;
context: string;
}
-export declare type AsyncCallback = (err: Error | WebpackError | null, source?: string, map?: string) => void;
-/**
- * Details here: https://webpack.github.io/docs/loaders.html#loader-context
- */
-export interface Webpack {
- _compiler: Compiler;
- _module: WebpackModule;
- /**
- * 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.
- */
- cacheable: () => void;
- /**
- * The directory of the module. Can be used as context for resolving other stuff.
- */
- context: string;
- /**
- * The root directory of the Webpack project.
- * Starting with webpack 4, the formerly `this.options.context` is provided as `this.rootContext`.
- */
- rootContext: string;
- /**
- * The resolved request string.
- * eg: "/abc/loader1.js?xyz!/abc/node_modules/loader2/index.js!/abc/resource.js?rrr"
- */
- request: string;
- /**
- * The query of the request for the current loader.
- */
- query: string;
- /**
- * A data object shared between the pitch and the normal phase.
- */
- data: Object;
- async: () => AsyncCallback;
- /**
- * The resource part of the request, including query.
- * eg: "/abc/resource.js?rrr"
- */
- resource: string;
- /**
- * The resource file.
- * eg: "/abc/resource.js"
- */
- resourcePath: string;
- /**
- * The query of the resource.
- * eg: "?rrr"
- */
- resourceQuery: string;
- /**
- * Resolve a request like a require expression.
- */
- resolve: (context: string, request: string, callback: (err: Error, result: string) => void) => void;
- /**
- * Resolve a request like a require expression.
- */
- resolveSync: (context: string, request: string) => string;
- /**
- * Add a file as dependency of the loader result in order to make them watchable.
- */
- addDependency: (file: string) => void;
- /**
- * Add a directory as dependency of the loader result.
- */
- addContextDependency: (directory: string) => void;
- /**
- * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders. Consider using pitch.
- */
- clearDependencies: () => void;
- /**
- * Emit a warning.
- */
- emitWarning: (message: Error) => void;
- /**
- * Emit an error.
- */
- emitError: (message: Error) => void;
- /**
- * Emit a file. This is webpack-specific
- */
- emitFile: (fileName: string, text: string) => void;
-}
-export interface Compiler {
- plugin: (name: string, callback: Function) => void;
- hooks: any;
- /**
- * The options passed to the Compiler.
- */
- options: {
- resolve: Resolve;
- };
-}
export declare type FileLocation = {
line: number;
character: number;
@@ -120,31 +21,6 @@
location?: FileLocation;
loaderSource: string;
}
-/**
- * webpack/lib/Compilation.js
- */
-export interface WebpackCompilation {
- compiler: WebpackCompiler;
- errors: WebpackError[];
- modules: WebpackModule[];
- assets: {
- [index: string]: {
- size: () => number;
- source: () => string;
- };
- };
-}
-/**
- * webpack/lib/Compiler.js
- */
-export interface WebpackCompiler {
- isChild(): boolean;
- context: string;
- outputPath: string;
- watchFileSystem: WebpackNodeWatchFileSystem;
- /** key is filepath and value is Date as a number */
- fileTimestamps: Map<string, number>;
-}
export interface WebpackModule {
resource: string;
errors: WebpackError[];
@@ -153,55 +29,6 @@
tsLoaderDefinitionFileVersions: string[];
};
}
-export interface Watcher {
- getTimes(): {
- [filePath: string]: number;
- };
-}
-export interface WebpackNodeWatchFileSystem {
- watcher?: Watcher;
- wfs?: {
- watcher: Watcher;
- };
-}
-export interface Resolve {
- /** Replace modules by other modules or paths. */
- alias?: {
- [key: string]: string;
- };
- /**
- * The directory (absolute path) that contains your modules.
- * May also be an array of directories.
- * This setting should be used to add individual directories to the search path.
- */
- root?: string | string[];
- /**
- * An array of directory names to be resolved to the current directory as well as its ancestors, and searched for modules.
- * This functions similarly to how node finds “node_modules” directories.
- * For example, if the value is ["mydir"], webpack will look in “./mydir”, “../mydir”, “../../mydir”, etc.
- */
- modulesDirectories?: string[];
- /**
- * A directory (or array of directories absolute paths),
- * in which webpack should look for modules that weren’t found in resolve.root or resolve.modulesDirectories.
- */
- fallback?: string | string[];
- /**
- * An array of extensions that should be used to resolve modules.
- * For example, in order to discover CoffeeScript files, your array should contain the string ".coffee".
- */
- extensions?: string[];
- /** Check these fields in the package.json for suitable files. */
- packageMains?: Array<string | string[]>;
- /** Check this field in the package.json for an object. Key-value-pairs are threaded as aliasing according to this spec */
- packageAlias?: Array<string | string[]>;
- /**
- * Enable aggressive but unsafe caching for the resolving of a part of your files.
- * Changes to cached paths may cause failure (in rare cases). An array of RegExps, only a RegExp or true (all files) is expected.
- * If the resolved path matches, it’ll be cached.
- */
- unsafeCache?: RegExp | RegExp[] | boolean;
-}
export declare type ResolveSync = (context: string | undefined, path: string, moduleName: string) => string;
export interface WatchHost extends typescript.WatchCompilerHostOfFilesAndCompilerOptions<typescript.BuilderProgram> {
invokeFileWatcher(fileName: string, eventKind: typescript.FileWatcherEventKind): void;
@@ -211,6 +38,8 @@
export interface TSInstance {
compiler: typeof typescript;
compilerOptions: typescript.CompilerOptions;
+ /** Used for Vue for the most part */
+ appendTsTsxSuffixesIfRequired: (filePath: string) => string;
loaderOptions: LoaderOptions;
/**
* a cache of all the files
@@ -257,6 +86,7 @@
export declare type LogLevel = 'INFO' | 'WARN' | 'ERROR';
export declare type ResolveModuleName = (moduleName: string, containingFile: string, compilerOptions: typescript.CompilerOptions, moduleResolutionHost: typescript.ModuleResolutionHost) => typescript.ResolvedModuleWithFailedLookupLocations;
export declare type CustomResolveModuleName = (moduleName: string, containingFile: string, compilerOptions: typescript.CompilerOptions, moduleResolutionHost: typescript.ModuleResolutionHost, parentResolver: ResolveModuleName) => typescript.ResolvedModuleWithFailedLookupLocations;
+export declare type CustomResolveTypeReferenceDirective = (typeDirectiveName: string, containingFile: string, compilerOptions: typescript.CompilerOptions, moduleResolutionHost: typescript.ModuleResolutionHost, parentResolver: typeof typescript.resolveTypeReferenceDirective) => typescript.ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
export interface LoaderOptions {
silent: boolean;
logLevel: LogLevel;
@@ -275,12 +105,13 @@
appendTsSuffixTo: RegExp[];
appendTsxSuffixTo: RegExp[];
happyPackMode: boolean;
- getCustomTransformers?: string | ((program: typescript.Program) => typescript.CustomTransformers | undefined);
+ getCustomTransformers: string | ((program: typescript.Program) => typescript.CustomTransformers | undefined);
experimentalWatchApi: boolean;
allowTsInNodeModules: boolean;
experimentalFileCaching: boolean;
projectReferences: boolean;
- resolveModuleName?: CustomResolveModuleName;
+ resolveModuleName: CustomResolveModuleName;
+ resolveTypeReferenceDirective: CustomResolveTypeReferenceDirective;
}
export interface TSFile {
text?: string;

dist/types/logger.d.ts

@@ -7,5 +7,10 @@
logWarning: LoggerFunc;
logError: LoggerFunc;
}
+export declare enum LogLevel {
+ INFO = 1,
+ WARN = 2,
+ ERROR = 3
+}
export declare function makeLogger(loaderOptions: LoaderOptions, colors: Chalk): Logger;
export {};

dist/types/resolver.d.ts

@@ -1,4 +1,3 @@
-import { Resolve, ResolveSync } from './interfaces';
-export declare function makeResolver(options: {
- resolve: Resolve;
-}): ResolveSync;
+import * as webpack from 'webpack';
+import { ResolveSync } from './interfaces';
+export declare function makeResolver(options: webpack.Configuration): ResolveSync;

dist/types/servicesHost.d.ts

@@ -1,5 +1,6 @@
import * as typescript from 'typescript';
-import { TSInstance, WatchHost, Webpack } from './interfaces';
+import * as webpack from 'webpack';
+import { TSInstance, WatchHost } from './interfaces';
import * as logger from './logger';
export declare type Action = () => void;
export interface ServiceHostWhichMayBeCacheable {
@@ -9,8 +10,8 @@
/**
* Create the TypeScript language service
*/
-export declare function makeServicesHost(scriptRegex: RegExp, log: logger.Logger, loader: Webpack, instance: TSInstance, enableFileCaching: boolean, projectReferences?: ReadonlyArray<typescript.ProjectReference>): ServiceHostWhichMayBeCacheable;
+export declare function makeServicesHost(scriptRegex: RegExp, log: logger.Logger, loader: webpack.loader.LoaderContext, instance: TSInstance, enableFileCaching: boolean, projectReferences?: ReadonlyArray<typescript.ProjectReference>): ServiceHostWhichMayBeCacheable;
/**
* Create the TypeScript Watch host
*/
-export declare function makeWatchHost(scriptRegex: RegExp, log: logger.Logger, loader: Webpack, instance: TSInstance, appendTsSuffixTo: RegExp[], appendTsxSuffixTo: RegExp[], projectReferences?: ReadonlyArray<typescript.ProjectReference>): WatchHost;
+export declare function makeWatchHost(scriptRegex: RegExp, log: logger.Logger, loader: webpack.loader.LoaderContext, instance: TSInstance, projectReferences?: ReadonlyArray<typescript.ProjectReference>): WatchHost;

dist/types/utils.d.ts

@@ -1,6 +1,7 @@
import { Chalk } from 'chalk';
import * as typescript from 'typescript';
-import { DependencyGraph, LoaderOptions, ReverseDependencyGraph, TSInstance, Webpack, WebpackError, WebpackModule } from './interfaces';
+import * as webpack from 'webpack';
+import { DependencyGraph, LoaderOptions, ReverseDependencyGraph, TSInstance, WebpackError, WebpackModule } from './interfaces';
/**
* Take TypeScript errors, parse them and format to webpack errors
* Optionally adds a file name
@@ -40,7 +41,7 @@
* or gets it from TypeScript and caches it otherwise.
*/
export declare function getAndCacheProjectReference(filePath: string, instance: TSInstance): typescript.ResolvedProjectReference | undefined;
-export declare function validateSourceMapOncePerProject(instance: TSInstance, loader: Webpack, jsFileName: string, project: typescript.ResolvedProjectReference): void;
+export declare function validateSourceMapOncePerProject(instance: TSInstance, loader: webpack.loader.LoaderContext, jsFileName: string, project: typescript.ResolvedProjectReference): void;
/**
* Gets the output JS file path for an input file governed by a composite project.
* Pulls from the cache if it exists; computes and caches the result otherwise.

dist/types/watch-run.d.ts

@@ -1,5 +1,6 @@
-import { TSInstance, WebpackCompiler } from './interfaces';
+import * as webpack from 'webpack';
+import { TSInstance } from './interfaces';
/**
* Make function which will manually update changed files
*/
-export declare function makeWatchRun(instance: TSInstance): (compiler: WebpackCompiler, callback: () => void) => void;
+export declare function makeWatchRun(instance: TSInstance): (compiler: webpack.Compiler, callback: () => void) => void;

.gitattributes

@@ -1,2 +0,0 @@
-*.ts eol=lf
-*.js eol=lf

.github/issue_template.md

@@ -1,7 +0,0 @@
-### Expected Behaviour
-
-### Actual Behaviour
-
-### Steps to Reproduce the Problem
-
-### Location of a Minimal Repository that Demonstrates the Issue.

.github/main.workflow

@@ -1,35 +0,0 @@
-workflow "build, test and publish on release" {
- on = "release"
- resolves = "publish"
-}
-
-# install with yarn
-action "install" {
- uses = "actions/npm@1.0.0"
- runs = "yarn"
- args = "install"
-}
-
-# build with yarn
-action "build" {
- needs = "install"
- uses = "actions/npm@1.0.0"
- runs = "yarn"
- args = "build"
-}
-
-# test with yarn
-action "test" {
- needs = "build"
- uses = "actions/npm@1.0.0"
- runs = "yarn"
- args = "test"
-}
-
-# publish with npm
-action "publish" {
- needs = "test"
- uses = "actions/npm@1.0.0"
- args = "publish"
- secrets = ["NPM_AUTH_TOKEN"]
-}

package.json

@@ -1,6 +1,6 @@
{
"name": "ts-loader",
- "version": "5.3.3",
+ "version": "5.4.5",
"description": "TypeScript loader for webpack",
"main": "index.js",
"types": "dist/types/index.d.ts",
@@ -9,8 +9,10 @@
"lint": "tslint --project \"./src\"",
"comparison-tests": "tsc --project \"./test/comparison-tests\" && npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js",
"comparison-tests-generate": "node test/comparison-tests/stub-new-version.js",
- "execution-tests": "npm i -g pnpm && node test/execution-tests/run-tests.js",
- "test": "node test/run-tests.js"
+ "execution-tests": "node test/execution-tests/run-tests.js",
+ "test": "node test/run-tests.js",
+ "docker:build": "docker build -t ts-loader .",
+ "postdocker:build": "docker run -it ts-loader yarn test"
},
"husky": {
"hooks": {
@@ -57,8 +59,9 @@
},
"devDependencies": {
"@types/micromatch": "^3.1.0",
- "@types/node": "^10.0.0",
+ "@types/node": "*",
"@types/semver": "^5.4.0",
+ "@types/webpack": "^4.4.29",
"babel": "^6.0.0",
"babel-core": "^6.0.0",
"babel-loader": "^7.0.0",

README.md

@@ -14,11 +14,12 @@
### Examples
-We have a number of example setups to accomodate different workflows. From "[vanilla](examples/vanilla)" ts-loader, to using ts-loader in combination with [babel](https://babeljs.io/) for transpilation, [happypack](https://github.com/amireh/happypack) or [thread-loader](https://github.com/webpack-contrib/thread-loader) for faster builds and [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) for performing type checking in a separate process. Not forgetting [Hot Module Replacement](https://webpack.js.org/api/hot-module-replacement/). Our examples can be found [here](examples/).
+We have a number of example setups to accomodate different workflows. Our examples can be found [here](examples/).
-### Babel
+We probably have more examples than we need. That said, here's a good way to get started:
-ts-loader works very well in combination with [babel](https://babeljs.io/) and [babel-loader](https://github.com/babel/babel-loader). There is an [example](https://github.com/Microsoft/TypeScriptSamples/tree/master/react-flux-babel-karma) of this in the official [TypeScript Samples](https://github.com/Microsoft/TypeScriptSamples). Alternatively take a look at our own [example](examples/react-babel-karma-gulp).
+- I want the simplest setup going. Use "[vanilla](examples/vanilla)" ts-loader
+- I want the fastest compilation that's available. Use [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin). It performs type checking in a separate process with `ts-loader` just handling transpilation.
### Faster Builds
@@ -26,13 +27,21 @@
You probably don't want to give up type checking; that's rather the point of TypeScript. So what you can do is use the [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin). It runs the type checker on a separate process, so your build remains fast thanks to `transpileOnly: true` but you still have the type checking. Also, the plugin has several optimizations to make incremental type checking faster (AST cache, multiple workers).
-If you'd like to see a simple setup take a look at [our simple example](examples/fork-ts-checker/). For a more complex setup take a look at our [more involved example](examples/react-babel-karma-gulp).
+If you'd like to see a simple setup take a look at [our simple example](examples/fork-ts-checker-webpack-plugin/). For a more complex setup take a look at our [more involved example](examples/react-babel-karma-gulp).
+
+### Yarn Plug’n’Play
+
+`ts-loader` supports [Yarn Plug’n’Play](https://yarnpkg.com/en/docs/pnp). The recommended way to integrate is using the [pnp-webpack-plugin](https://github.com/arcanis/pnp-webpack-plugin#ts-loader-integration).
+
+### Babel
+
+ts-loader works very well in combination with [babel](https://babeljs.io/) and [babel-loader](https://github.com/babel/babel-loader). There is an [example](https://github.com/Microsoft/TypeScriptSamples/tree/master/react-flux-babel-karma) of this in the official [TypeScript Samples](https://github.com/Microsoft/TypeScriptSamples). Alternatively take a look at our own [example](examples/react-babel-karma-gulp).
### Parallelising Builds
It's possible to parallelise your builds. Historically this was useful from a performance perspective with webpack 2 / 3. [With webpack 4+ there appears to be significantly less benefit and perhaps even cost.](https://blog.johnnyreilly.com/2018/12/you-might-not-need-thread-loader.html)
-There's two ways to achieve this: [happypack](https://github.com/amireh/happypack) and [thread-loader](https://github.com/webpack-contrib/thread-loader). Both should be used in combination with [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) for typechecking.)
+But if that's what you want to do, there's two ways to achieve this: [happypack](https://github.com/amireh/happypack) and [thread-loader](https://github.com/webpack-contrib/thread-loader). Both should be used in combination with [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) for typechecking.)
To read more, look at [this post](https://medium.com/webpack/typescript-webpack-super-pursuit-mode-83cc568dea79) by [@johnny_reilly](https://twitter.com/johnny_reilly) on the webpack publication channel.
@@ -146,7 +155,7 @@
Then you can simply require assets or chunks per the [webpack documentation](https://webpack.js.org/guides/code-splitting/).
-```js
+```javascript
require("!style!css!./style.css");
```
@@ -171,7 +180,7 @@
This feature requires webpack 2.1+ and TypeScript 2.0+. Use the config below or check the [package](https://github.com/dividab/tsconfig-paths-webpack-plugin/blob/master/README.md) for more information on usage.
-```js
+```javascript
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
@@ -216,7 +225,7 @@
However, many of the benefits you get from static type checking between
different dependencies in your application will be lost.
-It's advisable to use `transpileOnly` alongside the [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) to get full type checking again. To see what this looks like in practice then either take a look at [our simple example](examples/fork-ts-checker). For a more complex setup take a look at our [more involved example](examples/react-babel-karma-gulp-fork-ts-checker).
+It's advisable to use `transpileOnly` alongside the [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) to get full type checking again. To see what this looks like in practice then either take a look at [our simple example](examples/fork-ts-checker-webpack-plugin). For a more complex setup take a look at our [more involved example](examples/react-babel-karma-gulp).
If you enable this option, webpack 4 will give you "export not found" warnings any time you re-export a type:
@@ -244,7 +253,7 @@
It's advisable to use this with the [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) to get full type checking again. To see what this looks like in practice then either take a look at [our simple HappyPack example](examples/happypack) / [our simple thread-loader example](examples/thread-loader). For a more complex setup take a look at our [more involved HappyPack example](examples/react-babel-karma-gulp-happypack) / [more involved thread-loader example](examples/react-babel-karma-gulp-thread-loader). **_IMPORTANT_**: If you are using fork-ts-checker-webpack-plugin alongside HappyPack or thread-loader then ensure you set the `checkSyntacticErrors` option like so:
-```
+```javascript
new ForkTsCheckerWebpackPlugin({ checkSyntacticErrors: true })
```
@@ -252,6 +261,10 @@
Also, if you are using `thread-loader` in watch mode, remember to set `poolTimeout: Infinity` so workers don't die.
+#### resolveModuleName and resolveTypeReferenceDirective:
+
+These options should be functions which will be used to resolve the import statements and the `<reference types="...">` directives instead of the default TypeScript implementation. It's not intended that these will typically be used by a user of `ts-loader` - they exist to facilitate functionality such as [Yarn Plug’n’Play](https://yarnpkg.com/en/docs/pnp).
+
#### getCustomTransformers _( (program: Program) => { before?: TransformerFactory<SourceFile>[]; after?: TransformerFactory<SourceFile>[]; } )_
Provide custom transformers - only compatible with TypeScript 2.3+ (and 2.4 if using `transpileOnly` mode). For example usage take a look at [typescript-plugin-styled-components](https://github.com/Igorbek/typescript-plugin-styled-components) or our [test](test/comparison-tests/customTransformer).
@@ -326,7 +339,7 @@
If that format is not to your taste you can supply your own formatter using the `errorFormatter` option. Below is a template for a custom error formatter. Please note that the `colors` parameter is an instance of [`chalk`](https://github.com/chalk/chalk) which you can use to color your output. (This instance will respect the `colors` option.)
-```js
+```javascript
function customErrorFormatter(error, colors) {
const messageColor =
error.severity === "warning" ? colors.bold.yellow : colors.bold.red;
@@ -339,7 +352,7 @@
If the above formatter received an error like this:
-```
+```json
{
"code":2307,
"severity": "error",
@@ -588,7 +601,7 @@
Because TS will generate .js and .d.ts files, you should ignore these files, otherwise watchers may go into an infinite watch loop. For example, when using webpack, you may wish to add this to your webpack.conf.js file:
-```js
+```javascript
plugins: [
new webpack.WatchIgnorePlugin([
/\.js$/,

RELEASING.md

@@ -1,25 +0,0 @@
-# Publishing
-
-So the time has come to publish the latest version of ts-loader to npm. Exciting!
-
-Before you can actually publish make sure the following statements are true:
-
-- Tests should be green
-- The version number in [package.json](package.json) has been incremented.
-- The [changelog](CHANGELOG.md) has been updated with details of the changes in this release. Where possible include the details of the issues affected and the PRs raised.
-
-OK - you're actually ready. We're going to publish. Here we need to tread carefully. Follow these steps:
-
-- clone ts-loader from the main repo with this command: `git clone https://github.com/TypeStrong/ts-loader.git`
-- [Login to npm](https://docs.npmjs.com/cli/adduser) if you need to: `npm login`
-- install ts-loaders packages with `yarn install`
-- build ts-loader with `yarn build`
-- run the tests to ensure all is still good: `yarn test`
-
-If all the tests passed then we're going to ship:
-- tag the release in git. You can see existing tags with the command `git tag`. If the version in your `package.json` is `"1.0.1"` then you would tag the release like so: `git tag v1.0.1`. For more on type of tags we're using read [here](https://git-scm.com/book/en/v2/Git-Basics-Tagging#Lightweight-Tags).
-- Push the tag so the new version will show up in the [releases](https://github.com/TypeStrong/ts-loader/releases): `git push origin --tags`
-- On the releases page, click the "Draft a new release button" and, on the presented page, select the version you've just released, name it and copy in the new markdown that you added to the [changelog](CHANGELOG.md).
-- Now the big moment: `npm publish` ([alas `yarn publish` doesn't seem to publish all the js to npm](https://github.com/TypeStrong/ts-loader/issues/654))
-
-You've released! Pat yourself on the back.
\ No newline at end of file

.travis.yml

@@ -1,27 +0,0 @@
-os:
- - linux
-addons:
- chrome: stable
-language: node_js
-node_js:
- - "6"
- - "8"
- - "10"
-sudo: required
-install:
- - yarn install
- - yarn build
- - yarn lint
- - yarn add $TYPESCRIPT
-env:
- - TYPESCRIPT=typescript@3.2.1
- - TYPESCRIPT=typescript@next
- - TYPESCRIPT=typescript@3.1.1
- - TYPESCRIPT=typescript@3.0.1
- - TYPESCRIPT=typescript@2.9.2
- - TYPESCRIPT=typescript@2.8.1
- - TYPESCRIPT=typescript@2.7.1
- - TYPESCRIPT=typescript@2.6.1
- - TYPESCRIPT=typescript@2.5.2
- - TYPESCRIPT=typescript@2.4.1
-
\ No newline at end of file

yarn.lock

@@ -9,6 +9,11 @@
dependencies:
any-observable "^0.3.0"
+"@types/anymatch@*":
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
+ integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==
+
"@types/braces@*":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@types/braces/-/braces-2.3.0.tgz#d00ec0a76562b2acb6f29330be33a093e33ed25c"
@@ -19,15 +24,38 @@
dependencies:
"@types/braces" "*"
-"@types/node@^10.0.0":
- version "10.12.12"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.12.tgz#e15a9d034d9210f00320ef718a50c4a799417c47"
- integrity sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==
+"@types/node@*":
+ version "11.13.8"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.8.tgz#e5d71173c95533be9842b2c798978f095f912aab"
+ integrity sha512-szA3x/3miL90ZJxUCzx9haNbK5/zmPieGraZEe4WI+3srN0eGLiT22NXeMHmyhNEopn+IrxqMc7wdVwvPl8meg==
"@types/semver@^5.4.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45"
+"@types/tapable@*":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
+ integrity sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==
+
+"@types/uglify-js@*":
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
+ integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==
+ dependencies:
+ source-map "^0.6.1"
+
+"@types/webpack@^4.4.29":
+ version "4.4.29"
+ resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.29.tgz#d2a1c1d8c071b06521d32cee1c6b33d704b54b2c"
+ integrity sha512-8KVp+cNy9OPYsa4jU6vWsBemn5ixJ0Durh95Cw/YpEKm5ks2ODhdXc4FG3Xc46KIbPrJolwY7mSZFNn1aU3hKg==
+ dependencies:
+ "@types/anymatch" "*"
+ "@types/node" "*"
+ "@types/tapable" "*"
+ "@types/uglify-js" "*"
+ source-map "^0.6.0"
+
"@webassemblyjs/ast@1.7.8":
version "1.7.8"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.8.tgz#f31f480debeef957f01b623f27eabc695fa4fe8f"
@@ -203,9 +231,9 @@
uri-js "^4.2.2"
ansi-colors@^3.0.0:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.2.tgz#e49349137dbeb6d381b91e607c189915e53265ba"
- integrity sha512-kJmcp4PrviBBEx95fC3dYRiC/QSN3EBd0GU1XoNEk/IuUa92rsB6o90zP3w5VAyNznR38Vkc9i8vk5zK6T7TxA==
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813"
+ integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==
ansi-escapes@^3.0.0:
version "3.1.0"
@@ -935,6 +963,11 @@
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==
+big.js@^5.2.2:
+ version "5.2.2"
+ resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
+ integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
+
binary-extensions@^1.0.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14"
@@ -2832,6 +2865,13 @@
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=
+json5@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
+ integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
+ dependencies:
+ minimist "^1.2.0"
+
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
@@ -2866,9 +2906,9 @@
graceful-fs "^4.1.2"
karma-webpack@^4.0.0-rc.5:
- version "4.0.0-rc.5"
- resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-4.0.0-rc.5.tgz#7282945c9af56d9fc6e0bb053df9afc73dae1b15"
- integrity sha512-JCFLWIpX1Yx/pX086/2K+c1QdsPQI3K4HVcCo4QzYPWvu7rHOHMV2d3YYVMqL1mZd7iqFlcU8vBO8xKH4CpTyg==
+ version "4.0.0-rc.6"
+ resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-4.0.0-rc.6.tgz#02ac6a47c7fc166c8b208446069a424698082405"
+ integrity sha512-fN3EfHc10bZxP7dqgsaIFdmkynABFsgMxqgVZJYqxzt0CDBH6j1LbHrMilnijnDYZ8fZDLtx/OKWshXiYyhIig==
dependencies:
async "^2.0.0"
loader-utils "^1.1.0"
@@ -3029,7 +3069,7 @@
json5 "^0.5.0"
object-assign "^4.0.1"
-loader-utils@^1.0.2, loader-utils@^1.1.0:
+loader-utils@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
dependencies:
@@ -3037,6 +3077,15 @@
emojis-list "^2.0.0"
json5 "^0.5.0"
+loader-utils@^1.1.0:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
+ integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==
+ dependencies:
+ big.js "^5.2.2"
+ emojis-list "^2.0.0"
+ json5 "^1.0.1"
+
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
@@ -3810,9 +3859,9 @@
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
prettier@^1.11.1:
- version "1.15.3"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a"
- integrity sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg==
+ version "1.16.4"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
+ integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
pretty-error@^2.0.2:
version "2.1.1"
@@ -4392,7 +4441,7 @@
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
-source-map@^0.6.1, source-map@~0.6.1:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
@@ -4727,9 +4776,9 @@
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
typescript@^3.1.1:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192"
- integrity sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==
+ version "3.4.4"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.4.tgz#aac4a08abecab8091a75f10842ffa0631818f785"
+ integrity sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==
uglify-es@^3.3.4:
version "3.3.9"
@@ -4931,9 +4980,9 @@
yargs "^12.0.2"
webpack-dev-middleware@^3.2.0:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz#1132fecc9026fd90f0ecedac5cbff75d1fb45890"
- integrity sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.5.2.tgz#d768b6194f3fe8d72d51feded49de359e8d96ffb"
+ integrity sha512-nPmshdt1ckcwWjI0Ubrdp8KroeuprW6xFKYqk0u3MflNMBXvHPnMATsC7/L/enwav2zvLCfj/Usr47qnF3KQyA==
dependencies:
memory-fs "~0.4.1"
mime "^2.3.1"