Skip to content

Commit f57ece2

Browse files
authored
Merge pull request #172 from superlbr/master
fix os.cpus is not a function
2 parents aa4a97e + e35b9e2 commit f57ece2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v0.4.11
2+
3+
* [Fix os.cpus is not a function](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/172) (#172)
4+
15
## v0.4.10
26

37
* [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)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fork-ts-checker-webpack-plugin",
3-
"version": "0.4.10",
3+
"version": "0.4.11",
44
"description": "Runs typescript type checker and linter on separate process.",
55
"main": "lib/index.js",
66
"types": "lib/types/index.d.ts",

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interface Options {
6565
class ForkTsCheckerWebpackPlugin {
6666
static DEFAULT_MEMORY_LIMIT = 2048;
6767
static ONE_CPU = 1;
68-
static ALL_CPUS = os.cpus() ? os.cpus().length : 1;
68+
static ALL_CPUS = os.cpus && os.cpus() ? os.cpus().length : 1;
6969
static ONE_CPU_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 1);
7070
static TWO_CPUS_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 2);
7171

0 commit comments

Comments
 (0)