diff --git a/CHANGELOG.md b/CHANGELOG.md index 8097f06c7..d0eff8a9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # Changelog -## v0.9.x - not released yet +## v0.9.4 -- [Make logging to stderr or stdout configurable; introduce logging levels](https://github.com/TypeStrong/ts-loader/pull/313) [#214] -- [Fix regression that broke hot module replacement](https://github.com/TypeStrong/ts-loader/pull/322) [#321] +- [Make logging to stderr or stdout configurable; introduce logging levels](https://github.com/TypeStrong/ts-loader/pull/313) [#214] - thanks @ThYpHo0n +- [Fix regression that broke hot module replacement](https://github.com/TypeStrong/ts-loader/pull/322) [#321] - thanks @dopare ## v0.9.3 diff --git a/README.md b/README.md index 60b2c4f18..b8f380950 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Tutorials and examples can be [found here](https://github.com/TypeStrong/ts-load ts-loader supports the latest and greatest version of TypeScript right back to v1.6. (Including the [nightly build](http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx).) -A full test suite runs against the following versions of TypeScript each night (and on each pull request): +A full test suite runs each night (and on each pull request). It runs both on Linux ([Travis](https://travis-ci.org/)) and Windows ([AppVeyor](https://www.appveyor.com/)), testing ts-loader against the following versions of TypeScript: - TypeScript 2.0 - TypeScript 1.8 - TypeScript 1.7 @@ -24,7 +24,7 @@ A full test suite runs against the following versions of TypeScript each night ( and also: - TypeScript@next (because we want to use it as much as you do) -If you become aware of issues not caught by the test suite then please let us know. +If you become aware of issues not caught by the test suite then please let us know. Better yet, write a test and submit it in a PR! ### Babel diff --git a/index.ts b/index.ts index 0b44b11df..37aca43a4 100644 --- a/index.ts +++ b/index.ts @@ -156,9 +156,8 @@ function findConfigFile(compiler: typeof typescript, searchPath: string, configF // or returns the existing one. Multiple instances are possible by using the // `instance` property. function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): { instance?: TSInstance, error?: WebpackError } { - function log(...messages: string[]): void { - logToConsole(stdoutConsole, messages); + logToConsole(loaderOptions.logInfoToStdOut ? stdoutConsole : stderrConsole, messages); } function logToConsole(logConsole:any, messages: string[]): void { @@ -169,11 +168,7 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): { function logInfo(...messages: string[]): void { if (LogLevel[loaderOptions.logLevel] <= LogLevel.INFO) { - if(loaderOptions.logInfoToStdOut) { - logToConsole(stdoutConsole, messages); - } else { - logToConsole(stderrConsole, messages); - } + logToConsole(loaderOptions.logInfoToStdOut ? stdoutConsole : stderrConsole, messages); } } diff --git a/package.json b/package.json index c24aecac0..d14b28a70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "0.9.3", + "version": "0.9.4", "description": "TypeScript loader for webpack", "main": "index.js", "scripts": {