From ea2fcf925ec158d0a536d1e766adfec6567f5fb4 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Mon, 22 Apr 2019 18:22:22 +0100 Subject: [PATCH] resolveTypeReferenceDirective support for yarn PnP (#921) * prepare the ground for type directives * implement resolveTypeReferenceDirective option * refactor of resolver construction * ready 5.4.0 release --- .travis.yml | 2 +- CHANGELOG.md | 4 + README.md | 8 + appveyor.yml | 2 +- package.json | 2 +- src/index.ts | 3 +- src/interfaces.ts | 23 +- src/servicesHost.ts | 312 ++++++++++-------- src/tslint.json | 1 + .../expectedOutput-3.4/bundle.js | 2 +- .../expectedOutput-3.4/output.txt | 10 +- yarn.lock | 6 +- 12 files changed, 227 insertions(+), 148 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca376afba..c6be9f6fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - yarn lint - yarn add $TYPESCRIPT env: - - TYPESCRIPT=typescript@3.4.1 + - TYPESCRIPT=typescript@3.4.4 - TYPESCRIPT=typescript@next - TYPESCRIPT=typescript@3.3.3 - TYPESCRIPT=typescript@3.2.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 47100093e..60a838791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v5.4.0 + +* [feat: resolveTypeReferenceDirective support for yarn PnP](https://github.com/TypeStrong/ts-loader/pull/921) - thanks @johnnyreilly! + ## v5.3.3 * [fix: Pass ts.Program to getCustomTransformers](https://github.com/TypeStrong/ts-loader/pull/889) (#860) - thanks @andersekdahl! diff --git a/README.md b/README.md index 063dd486c..62efb7441 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ You probably don't want to give up type checking; that's rather the point of Typ 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). @@ -257,6 +261,10 @@ This will ensure that the plugin checks for both syntactic errors (eg `const arr 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 `` 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[]; after?: TransformerFactory[]; } )_ 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). diff --git a/appveyor.yml b/appveyor.yml index c3f16c277..8e0445037 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ environment: FORCE_COLOR: 1 nodejs_version: "10" matrix: - - TYPESCRIPT: typescript@3.4.1 + - TYPESCRIPT: typescript@3.4.4 - TYPESCRIPT: typescript@next - TYPESCRIPT: typescript@3.3.3 - TYPESCRIPT: typescript@3.2.1 diff --git a/package.json b/package.json index 9c55e97e1..03bd9ee51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "5.3.3", + "version": "5.4.0", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist/types/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 62339c30a..5d2d25c0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -255,7 +255,8 @@ const validLoaderOptions: ValidLoaderOptions[] = [ 'allowTsInNodeModules', 'experimentalFileCaching', 'projectReferences', - 'resolveModuleName' + 'resolveModuleName', + 'resolveTypeReferenceDirective' ]; /** diff --git a/src/interfaces.ts b/src/interfaces.ts index 11914aab3..01a12f0c0 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -227,8 +227,8 @@ export type ResolveSync = ( export interface WatchHost extends typescript.WatchCompilerHostOfFilesAndCompilerOptions< - typescript.BuilderProgram - > { + typescript.BuilderProgram + > { invokeFileWatcher( fileName: string, eventKind: typescript.FileWatcherEventKind @@ -299,7 +299,7 @@ export type ResolveModuleName = ( moduleName: string, containingFile: string, compilerOptions: typescript.CompilerOptions, - moduleResolutionHost: typescript.ModuleResolutionHost, + moduleResolutionHost: typescript.ModuleResolutionHost ) => typescript.ResolvedModuleWithFailedLookupLocations; export type CustomResolveModuleName = ( @@ -310,6 +310,14 @@ export type CustomResolveModuleName = ( parentResolver: ResolveModuleName ) => typescript.ResolvedModuleWithFailedLookupLocations; +export 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; @@ -328,14 +336,17 @@ export interface LoaderOptions { appendTsSuffixTo: RegExp[]; appendTsxSuffixTo: RegExp[]; happyPackMode: boolean; - getCustomTransformers?: + getCustomTransformers: | string - | ((program: typescript.Program) => typescript.CustomTransformers | undefined); + | (( + program: typescript.Program + ) => typescript.CustomTransformers | undefined); experimentalWatchApi: boolean; allowTsInNodeModules: boolean; experimentalFileCaching: boolean; projectReferences: boolean; - resolveModuleName?: CustomResolveModuleName; + resolveModuleName: CustomResolveModuleName; + resolveTypeReferenceDirective: CustomResolveTypeReferenceDirective; } export interface TSFile { diff --git a/src/servicesHost.ts b/src/servicesHost.ts index fcae7366b..7cf9da25d 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -4,6 +4,7 @@ import * as typescript from 'typescript'; import * as constants from './constants'; import { CustomResolveModuleName, + CustomResolveTypeReferenceDirective, ModuleResolutionHost, ResolvedModule, ResolveSync, @@ -40,7 +41,8 @@ export function makeServicesHost( loaderOptions: { appendTsSuffixTo, appendTsxSuffixTo, - resolveModuleName: customResolveModuleName + resolveModuleName: customResolveModuleName, + resolveTypeReferenceDirective: customResolveTypeReferenceDirective } } = instance; @@ -48,8 +50,8 @@ export function makeServicesHost( compilerOptions.newLine === constants.CarriageReturnLineFeedCode ? constants.CarriageReturnLineFeed : compilerOptions.newLine === constants.LineFeedCode - ? constants.LineFeed - : constants.EOL; + ? constants.LineFeed + : constants.EOL; // make a (sync) resolver that follows webpack's rules const resolveSync = makeResolver(loader._compiler.options); @@ -76,6 +78,19 @@ export function makeServicesHost( // 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, + appendTsSuffixTo, + appendTsxSuffixTo, + scriptRegex, + instance + ); + const servicesHost: typescript.LanguageServiceHost = { getProjectVersion: () => `${instance.version}`, @@ -108,6 +123,7 @@ export function makeServicesHost( return compiler.ScriptSnapshot.fromString(file.text!); }, + /** * getDirectories is also required for full import and type reference completions. * Without it defined, certain completions will not be provided @@ -137,30 +153,81 @@ export function makeServicesHost( 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), - */ + // used for (/// ) see https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250#issuecomment-485061329 + resolveTypeReferenceDirectives: resolvers.resolveTypeReferenceDirectives, + + resolveModuleNames: resolvers.resolveModuleNames, + + getCustomTransformers: () => instance.transformers + }; - resolveModuleNames: (moduleNames, containingFile) => - resolveModuleNames( + return { servicesHost, clearCache }; +} + +function makeResolvers( + compiler: typeof typescript, + compilerOptions: typescript.CompilerOptions, + moduleResolutionHost: typescript.ModuleResolutionHost, + customResolveTypeReferenceDirective: CustomResolveTypeReferenceDirective, + customResolveModuleName: CustomResolveModuleName, + resolveSync: ResolveSync, + appendTsSuffixTo: RegExp[], + appendTsxSuffixTo: RegExp[], + scriptRegex: RegExp, + instance: TSInstance +) { + const resolveTypeReferenceDirective = makeResolveTypeReferenceDirective( + compiler, + compilerOptions, + moduleResolutionHost, + customResolveTypeReferenceDirective + ); + + const resolveTypeReferenceDirectives = ( + typeDirectiveNames: string[], + containingFile: string, + _redirectedReference?: typescript.ResolvedProjectReference + ): (typescript.ResolvedTypeReferenceDirective | undefined)[] => + typeDirectiveNames.map( + directive => + resolveTypeReferenceDirective(directive, containingFile) + .resolvedTypeReferenceDirective + ); + + const resolveModuleName = makeResolveModuleName( + compiler, + compilerOptions, + moduleResolutionHost, + customResolveModuleName + ); + + const resolveModuleNames = ( + moduleNames: string[], + containingFile: string, + _reusedNames?: string[] | undefined, + _redirectedReference?: typescript.ResolvedProjectReference | undefined + ): (typescript.ResolvedModule | undefined)[] => { + const resolvedModules = moduleNames.map(moduleName => + resolveModule( resolveSync, - moduleResolutionHost, + resolveModuleName, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, - instance, - moduleNames, - containingFile, - getResolutionStrategy, - customResolveModuleName - ), + moduleName, + containingFile + ) + ); - getCustomTransformers: () => instance.transformers + populateDependencyGraphs(resolvedModules, instance, containingFile); + + return resolvedModules; }; - return { servicesHost, clearCache }; + return { + resolveTypeReferenceDirectives, + resolveModuleNames + }; } /** @@ -175,14 +242,23 @@ export function makeWatchHost( appendTsxSuffixTo: RegExp[], projectReferences?: ReadonlyArray ) { - const { compiler, compilerOptions, files, otherFiles } = instance; + const { + compiler, + compilerOptions, + files, + otherFiles, + loaderOptions: { + resolveModuleName: customResolveModuleName, + resolveTypeReferenceDirective: customResolveTypeReferenceDirective + } + } = instance; const newLine = compilerOptions.newLine === constants.CarriageReturnLineFeedCode ? constants.CarriageReturnLineFeed : compilerOptions.newLine === constants.LineFeedCode - ? constants.LineFeed - : constants.EOL; + ? constants.LineFeed + : constants.EOL; // make a (sync) resolver that follows webpack's rules const resolveSync = makeResolver(loader._compiler.options); @@ -211,6 +287,19 @@ export function makeWatchHost( typescript.DirectoryWatcherCallback > = {}; + const resolvers = makeResolvers( + compiler, + compilerOptions, + moduleResolutionHost, + customResolveTypeReferenceDirective, + customResolveModuleName, + resolveSync, + appendTsSuffixTo, + appendTsxSuffixTo, + scriptRegex, + instance + ); + const watchHost: WatchHost = { rootFiles: getRootFileNames(), options: compilerOptions, @@ -240,18 +329,10 @@ export function makeWatchHost( watchFile, watchDirectory, - resolveModuleNames: (moduleNames, containingFile) => - resolveModuleNames( - resolveSync, - moduleResolutionHost, - appendTsSuffixTo, - appendTsxSuffixTo, - scriptRegex, - instance, - moduleNames, - containingFile, - getResolutionStrategy - ), + // used for (/// ) see https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250#issuecomment-485061329 + resolveTypeReferenceDirectives: resolvers.resolveTypeReferenceDirectives, + + resolveModuleNames: resolvers.resolveModuleNames, invokeFileWatcher, invokeDirectoryWatcher, @@ -423,36 +504,37 @@ export function makeWatchHost( } } -function resolveModuleNames( - resolveSync: ResolveSync, - moduleResolutionHost: ModuleResolutionHost, - appendTsSuffixTo: RegExp[], - appendTsxSuffixTo: RegExp[], - scriptRegex: RegExp, - instance: TSInstance, - moduleNames: string[], - containingFile: string, - resolutionStrategy: ResolutionStrategy, - customResolveModuleName?: CustomResolveModuleName -) { - const resolvedModules = moduleNames.map(moduleName => - resolveModuleName( - resolveSync, - moduleResolutionHost, - appendTsSuffixTo, - appendTsxSuffixTo, - scriptRegex, - instance, - moduleName, - containingFile, - resolutionStrategy, - customResolveModuleName - ) - ); +type ResolveTypeReferenceDirective = ( + directive: string, + containingFile: string +) => typescript.ResolvedTypeReferenceDirectiveWithFailedLookupLocations; - populateDependencyGraphs(resolvedModules, instance, containingFile); +function makeResolveTypeReferenceDirective( + compiler: typeof typescript, + compilerOptions: typescript.CompilerOptions, + moduleResolutionHost: ModuleResolutionHost, + customResolveTypeReferenceDirective: + | CustomResolveTypeReferenceDirective + | undefined +): ResolveTypeReferenceDirective { + if (customResolveTypeReferenceDirective === undefined) { + return (directive: string, containingFile: string) => + compiler.resolveTypeReferenceDirective( + directive, + containingFile, + compilerOptions, + moduleResolutionHost + ); + } - return resolvedModules; + return (directive: string, containingFile: string) => + customResolveTypeReferenceDirective( + directive, + containingFile, + compilerOptions, + moduleResolutionHost, + compiler.resolveTypeReferenceDirective + ); } function isJsImplementationOfTypings( @@ -465,35 +547,15 @@ function isJsImplementationOfTypings( ); } -function applyTsResolver( - compiler: typeof typescript, - moduleName: string, - containingFile: string, - compilerOptions: typescript.CompilerOptions, - moduleResolutionHost: typescript.ModuleResolutionHost -) { - return compiler.resolveModuleName( - moduleName, - containingFile, - compilerOptions, - moduleResolutionHost - ); -} - -function resolveModuleName( +function resolveModule( resolveSync: ResolveSync, - moduleResolutionHost: ModuleResolutionHost, + resolveModuleName: ResolveModuleName, appendTsSuffixTo: RegExp[], appendTsxSuffixTo: RegExp[], scriptRegex: RegExp, - instance: TSInstance, moduleName: string, - containingFile: string, - resolutionStrategy: ResolutionStrategy, - customResolveModuleName?: CustomResolveModuleName + containingFile: string ) { - const { compiler, compilerOptions } = instance; - let resolutionResult: ResolvedModule; try { @@ -520,34 +582,7 @@ function resolveModuleName( // tslint:disable-next-line:no-empty } catch (e) {} - const tsResolution = - customResolveModuleName !== undefined - ? customResolveModuleName( - moduleName, - containingFile, - compilerOptions, - moduleResolutionHost, - ( - moduleNameFromCustomFn: string, - containingFileFromCustomFn: string, - compilerOptionsFromCustomFn: typescript.CompilerOptions, - moduleResolutionHostFromCustomFn: typescript.ModuleResolutionHost - ) => - 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( @@ -560,26 +595,45 @@ function resolveModuleName( tsResolution.resolvedModule.isExternalLibraryImport }; - return resolutionStrategy(resolutionResult!, tsResolutionResult); + return resolutionResult! === undefined || + resolutionResult.resolvedFileName === + tsResolutionResult.resolvedFileName || + isJsImplementationOfTypings(resolutionResult!, tsResolutionResult) + ? tsResolutionResult + : resolutionResult!; } return resolutionResult!; } -type ResolutionStrategy = ( - resolutionResult: ResolvedModule | undefined, - tsResolutionResult: ResolvedModule -) => ResolvedModule; - -function getResolutionStrategy( - resolutionResult: ResolvedModule | undefined, - tsResolutionResult: ResolvedModule -): ResolvedModule { - return resolutionResult! === undefined || - resolutionResult!.resolvedFileName === - tsResolutionResult.resolvedFileName || - isJsImplementationOfTypings(resolutionResult!, tsResolutionResult) - ? tsResolutionResult - : resolutionResult!; +type ResolveModuleName = ( + moduleName: string, + containingFile: string +) => typescript.ResolvedModuleWithFailedLookupLocations; + +function makeResolveModuleName( + compiler: typeof typescript, + compilerOptions: typescript.CompilerOptions, + moduleResolutionHost: ModuleResolutionHost, + customResolveModuleName: CustomResolveModuleName | undefined +): ResolveModuleName { + if (customResolveModuleName === undefined) { + return (moduleName: string, containingFile: string) => + compiler.resolveModuleName( + moduleName, + containingFile, + compilerOptions, + moduleResolutionHost + ); + } + + return (moduleName: string, containingFile: string) => + customResolveModuleName( + moduleName, + containingFile, + compilerOptions, + moduleResolutionHost, + compiler.resolveModuleName + ); } function populateDependencyGraphs( diff --git a/src/tslint.json b/src/tslint.json index 8e3d78aa5..3a48a9589 100644 --- a/src/tslint.json +++ b/src/tslint.json @@ -1,6 +1,7 @@ { "extends": ["tslint:latest", "tslint-config-prettier"], "rules": { + "array-type": false, "ban-types": false, "forin": false, "interface-over-type-literal": false, diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/bundle.js index f469245b1..a2e209d25 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName/n/n at validateLoaderOptions (C://source//ts-loader//dist//index.js:152:19)/n at getLoaderOptions (C://source//ts-loader//dist//index.js:110:5)/n at Object.loader (C://source//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective/n/n at validateLoaderOptions (C://source//ts-loader//dist//index.js:153:19)/n at getLoaderOptions (C://source//ts-loader//dist//index.js:110:5)/n at Object.loader (C://source//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/output.txt index 6f71f590f..da41ad53f 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.4/output.txt @@ -1,15 +1,15 @@ - Asset Size Chunks Chunk Names -bundle.js 4.6 KiB main [emitted] main + Asset Size Chunks Chunk Names +bundle.js 4.63 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 855 bytes {main} [built] [failed] [1 error] +[./app.ts] 887 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): Error: ts-loader was supplied with an unexpected loader option: notRealOption Please take a look at the options you are supplying; the following are valid options: -silent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName +silent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective - at validateLoaderOptions (dist\index.js:152:19) + at validateLoaderOptions (dist\index.js:153:19) at getLoaderOptions (dist\index.js:110:5) at Object.loader (dist\index.js:16:21) \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4bb721ffb..c73c1f867 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4748,9 +4748,9 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" typescript@^3.1.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.1.tgz#b6691be11a881ffa9a05765a205cb7383f3b63c6" - integrity sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q== + 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"