Skip to content

Commit

Permalink
Speculative fix for #565 (#566)
Browse files Browse the repository at this point in the history
* Speculative fix for #565

* Added 2.4.1 to the build matrix

* Added 2.4.1 to the build matrix

* Update CHANGELOG.md
  • Loading branch information
johnnyreilly authored Jun 28, 2017
1 parent 91a7edb commit b24d350
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ env:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
# - TYPESCRIPT=typescript@next
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v2.2.1 - NOT RELEASED YET

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

## v2.2.0

Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ environment:
- TYPESCRIPT: [email protected]
- TYPESCRIPT: [email protected]
- TYPESCRIPT: [email protected]
- TYPESCRIPT: [email protected]
# - TYPESCRIPT: typescript@next
install:
- ps: Install-Product node $env:nodejs_version
Expand Down
6 changes: 6 additions & 0 deletions src/servicesHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ function makeServicesHost(
* For @types expansion, these two functions are needed.
*/
directoryExists: compiler.sys ? (<any> compiler.sys).directoryExists : undefined,

// The following three methods are necessary for @types resolution from TS 2.4.1 onwards see: https://github.com/Microsoft/TypeScript/issues/16772
fileExists: moduleResolutionHost.fileExists,
readFile: moduleResolutionHost.readFile,
readDirectory: compiler.sys ? (<any> compiler.sys).readDirectory : undefined,

getCurrentDirectory: () => process.cwd(),

getCompilationSettings: () => compilerOptions,
Expand Down

0 comments on commit b24d350

Please sign in to comment.