Skip to content

Commit

Permalink
Merge pull request #172 from superlbr/master
Browse files Browse the repository at this point in the history
fix os.cpus is not a function
  • Loading branch information
johnnyreilly committed Oct 22, 2018
2 parents aa4a97e + e35b9e2 commit f57ece2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.4.11

* [Fix os.cpus is not a function](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/172) (#172)

## v0.4.10

* [Allow fork-ts-checker-webpack-plugin to be imported in .ts files using ESM import syntax](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/163) (#163)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fork-ts-checker-webpack-plugin",
"version": "0.4.10",
"version": "0.4.11",
"description": "Runs typescript type checker and linter on separate process.",
"main": "lib/index.js",
"types": "lib/types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ interface Options {
class ForkTsCheckerWebpackPlugin {
static DEFAULT_MEMORY_LIMIT = 2048;
static ONE_CPU = 1;
static ALL_CPUS = os.cpus() ? os.cpus().length : 1;
static ALL_CPUS = os.cpus && os.cpus() ? os.cpus().length : 1;
static ONE_CPU_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 1);
static TWO_CPUS_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 2);

Expand Down

0 comments on commit f57ece2

Please sign in to comment.