Skip to content

Commit b24d350

Browse files
authored
Speculative fix for #565 (#566)
* Speculative fix for #565 * Added 2.4.1 to the build matrix * Added 2.4.1 to the build matrix * Update CHANGELOG.md
1 parent 91a7edb commit b24d350

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ env:
1717
1818
1919
20+
2021
# - TYPESCRIPT=typescript@next

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## v2.2.1 - NOT RELEASED YET
44

55
- [Report errors in JS(X) files when CheckJS is enabled](https://github.com/TypeStrong/ts-loader/pull/564) - thanks @schmuli!
6+
- [Cater for change to @types acquisition strategy in TypeScript 2.4.1](https://github.com/TypeStrong/ts-loader/pull/566) - thanks @johnnyreilly
67

78
## v2.2.0
89

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ environment:
88
- TYPESCRIPT: [email protected]
99
- TYPESCRIPT: [email protected]
1010
- TYPESCRIPT: [email protected]
11+
- TYPESCRIPT: [email protected]
1112
# - TYPESCRIPT: typescript@next
1213
install:
1314
- ps: Install-Product node $env:nodejs_version

src/servicesHost.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ function makeServicesHost(
6363
* For @types expansion, these two functions are needed.
6464
*/
6565
directoryExists: compiler.sys ? (<any> compiler.sys).directoryExists : undefined,
66+
67+
// The following three methods are necessary for @types resolution from TS 2.4.1 onwards see: https://github.com/Microsoft/TypeScript/issues/16772
68+
fileExists: moduleResolutionHost.fileExists,
69+
readFile: moduleResolutionHost.readFile,
70+
readDirectory: compiler.sys ? (<any> compiler.sys).readDirectory : undefined,
71+
6672
getCurrentDirectory: () => process.cwd(),
6773

6874
getCompilationSettings: () => compilerOptions,

0 commit comments

Comments
 (0)