@parcel/workers 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +6 -6
- package/src/cpuCount.js +3 -2
- package/test/cpuCount.test.js +1 -1
- package/test/workerfarm.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/workers",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.1",
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
5
5
|
"license": "MIT",
|
6
6
|
"publishConfig": {
|
@@ -21,15 +21,15 @@
|
|
21
21
|
"node": ">= 12.0.0"
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
|
-
"@parcel/diagnostic": "^2.0.
|
25
|
-
"@parcel/logger": "^2.0.
|
26
|
-
"@parcel/types": "^2.0.
|
27
|
-
"@parcel/utils": "^2.0.
|
24
|
+
"@parcel/diagnostic": "^2.0.1",
|
25
|
+
"@parcel/logger": "^2.0.1",
|
26
|
+
"@parcel/types": "^2.0.1",
|
27
|
+
"@parcel/utils": "^2.0.1",
|
28
28
|
"chrome-trace-event": "^1.0.2",
|
29
29
|
"nullthrows": "^1.1.1"
|
30
30
|
},
|
31
31
|
"peerDependencies": {
|
32
32
|
"@parcel/core": "^2.0.0"
|
33
33
|
},
|
34
|
-
"gitHead": "
|
34
|
+
"gitHead": "28b47e6bdca7de2a06b7cc39a4a0b1df89f3fe15"
|
35
35
|
}
|
package/src/cpuCount.js
CHANGED
@@ -53,8 +53,9 @@ export default function getCores(bypassCache?: boolean = false): number {
|
|
53
53
|
// Guess the amount of real cores
|
54
54
|
cores = os
|
55
55
|
.cpus()
|
56
|
-
.filter(
|
57
|
-
|
56
|
+
.filter(
|
57
|
+
(cpu, index) => !cpu.model.includes('Intel') || index % 2 === 1,
|
58
|
+
).length;
|
58
59
|
}
|
59
60
|
|
60
61
|
// Another fallback
|
package/test/cpuCount.test.js
CHANGED
@@ -3,7 +3,7 @@ import os from 'os';
|
|
3
3
|
|
4
4
|
import getCores, {detectRealCores} from '../src/cpuCount';
|
5
5
|
|
6
|
-
describe('cpuCount', function() {
|
6
|
+
describe('cpuCount', function () {
|
7
7
|
it('Should be able to detect real cpu count', () => {
|
8
8
|
// Windows not supported as getting the cpu count takes a couple seconds...
|
9
9
|
if (os.platform() === 'win32') return;
|
package/test/workerfarm.js
CHANGED