From c791c5318443b5187e66d81ec966e94cb41a391e Mon Sep 17 00:00:00 2001 From: markuskobler Date: Tue, 28 May 2019 00:32:21 -0400 Subject: [PATCH 1/3] Upgrade typescript --- package.json | 2 +- src/compiler/create-parse-config-host.ts | 14 ++++++++++++-- vendor/typescript | 2 +- yarn.lock | 8 ++++---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7c61787..63c3773 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "fs-tree-diff": "^0.5.7", "heimdalljs": "0.3.3", "md5-hex": "^2.0.0", - "typescript": "~3.2.1", + "typescript": "~3.4.1", "walk-sync": "^0.3.2" }, "devDependencies": { diff --git a/src/compiler/create-parse-config-host.ts b/src/compiler/create-parse-config-host.ts index f49c8ba..70e4def 100644 --- a/src/compiler/create-parse-config-host.ts +++ b/src/compiler/create-parse-config-host.ts @@ -11,6 +11,14 @@ export default function createParseConfigHost( return input.getFileSystemEntries(path); } + function realpath(path: string): string { + try { + return input.realpath(path) || path; + } catch { + return path; + } + } + function readDirectory( rootDir: string, extensions: ReadonlyArray, @@ -26,7 +34,8 @@ export default function createParseConfigHost( useCaseSensitiveFileNames, workingPath, depth, - getFileSystemEntries + getFileSystemEntries, + realpath ); } @@ -60,6 +69,7 @@ declare module "typescript" { useCaseSensitiveFileNames: boolean, currentDirectory: string, depth: number | undefined, - getFileSystemEntries: (path: string) => FileSystemEntries + getFileSystemEntries: (path: string) => FileSystemEntries, + realpath: (path: string) => string, ): string[]; } diff --git a/vendor/typescript b/vendor/typescript index 9aae7a6..7eda7ef 160000 --- a/vendor/typescript +++ b/vendor/typescript @@ -1 +1 @@ -Subproject commit 9aae7a668e68d987d1159cc808b679c1f742b3b4 +Subproject commit 7eda7ef338a52a39d31d0a4e883b5a09fff096be diff --git a/yarn.lock b/yarn.lock index 0c6c371..4d45fb0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2532,10 +2532,10 @@ tsutils@^2.27.2: dependencies: tslib "^1.8.1" -typescript@~3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192" - integrity sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg== +typescript@~3.4.1: + version "3.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" + integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== uglify-js@^2.6: version "2.8.29" From 0895963a6276ce68091fa9df7d6a2f53b8f27bda Mon Sep 17 00:00:00 2001 From: Tom Dale Date: Thu, 17 Oct 2019 17:11:57 -0400 Subject: [PATCH 2/3] Don't catch input.realpath() exceptions Since the underlying realpath implementation performs an existence check, there's no need to guard for ENOENT errors, and we can let exceptions propagate as they will represent a more serious error. --- src/compiler/create-parse-config-host.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/create-parse-config-host.ts b/src/compiler/create-parse-config-host.ts index 70e4def..7f83cf4 100644 --- a/src/compiler/create-parse-config-host.ts +++ b/src/compiler/create-parse-config-host.ts @@ -12,11 +12,7 @@ export default function createParseConfigHost( } function realpath(path: string): string { - try { - return input.realpath(path) || path; - } catch { - return path; - } + return input.realpath(path) || path; } function readDirectory( From 5321fc714c4d2c43738ec59538121e3c4e3fdcce Mon Sep 17 00:00:00 2001 From: Tom Dale Date: Thu, 17 Oct 2019 17:23:04 -0400 Subject: [PATCH 3/3] Upgrade to TypeScript v3.5.3 --- package.json | 2 +- src/generated/typescript-config.ts | 27 +++++++++++++++++++++++++-- vendor/typescript | 2 +- yarn.lock | 8 ++++---- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 63c3773..fd88c74 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "fs-tree-diff": "^0.5.7", "heimdalljs": "0.3.3", "md5-hex": "^2.0.0", - "typescript": "~3.4.1", + "typescript": "~3.5.3", "walk-sync": "^0.3.2" }, "devDependencies": { diff --git a/src/generated/typescript-config.ts b/src/generated/typescript-config.ts index 46fda3a..8a9a339 100644 --- a/src/generated/typescript-config.ts +++ b/src/generated/typescript-config.ts @@ -42,6 +42,14 @@ export interface CompilerOptionsDefinition { * Only emit '.d.ts' declaration files. */ emitDeclarationOnly?: boolean; + /** + * Enable incremental compilation. + */ + incremental?: boolean; + /** + * Specify file to store incremental compilation information. + */ + tsBuildInfoFile?: string; /** * Emit a single file with source maps instead of having a separate file. */ @@ -184,10 +192,10 @@ export interface CompilerOptionsDefinition { */ stripInternal?: boolean; /** - * Specify ECMAScript target version. Permitted values are 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018' or 'esnext'. + * Specify ECMAScript target version. Permitted values are 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020' or 'esnext'. */ target?: - | ("es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "esnext") + | ("es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "esnext") | { [k: string]: any; }; @@ -302,10 +310,13 @@ export interface CompilerOptionsDefinition { | "es2016" | "es2017" | "es2018" + | "es2019" + | "es2020" | "esnext" | "dom" | "dom.iterable" | "webworker" + | "webworker.importscripts" | "scripthost" | "es2015.core" | "es2015.collection" @@ -322,11 +333,19 @@ export interface CompilerOptionsDefinition { | "es2017.sharedmemory" | "es2017.string" | "es2017.typedarrays" + | "es2018.asynciterable" | "es2018.intl" | "es2018.promise" | "es2018.regexp" + | "es2019.array" + | "es2019.object" + | "es2019.string" + | "es2019.symbol" + | "es2020.string" + | "es2020.symbol.wellknown" | "esnext.asynciterable" | "esnext.array" + | "esnext.bigint" | "esnext.intl" | "esnext.symbol")[]; /** @@ -377,6 +396,10 @@ export interface CompilerOptionsDefinition { * Emit '__importStar' and '__importDefault' helpers for runtime babel ecosystem compatibility and enable '--allowSyntheticDefaultImports' for typesystem compatibility. Requires TypeScript version 2.7 or later. */ esModuleInterop?: boolean; + /** + * Allow accessing UMD globals from modules. + */ + allowUmdGlobalAccess?: boolean; /** * Resolve 'keyof' to string valued property names only (no numbers or symbols). Requires TypeScript version 2.9 or later. */ diff --git a/vendor/typescript b/vendor/typescript index 7eda7ef..aff7ef1 160000 --- a/vendor/typescript +++ b/vendor/typescript @@ -1 +1 @@ -Subproject commit 7eda7ef338a52a39d31d0a4e883b5a09fff096be +Subproject commit aff7ef12305de00cca7ac405fdaf8402ba0e6973 diff --git a/yarn.lock b/yarn.lock index 4d45fb0..04d48af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2532,10 +2532,10 @@ tsutils@^2.27.2: dependencies: tslib "^1.8.1" -typescript@~3.4.1: - version "3.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" - integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== +typescript@~3.5.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" + integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== uglify-js@^2.6: version "2.8.29"