@parcel/workers 2.0.0-rc.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.ts CHANGED
@@ -15,6 +15,8 @@ export type FarmOptions = {
15
15
 
16
16
  declare class WorkerFarm {
17
17
  constructor(options: FarmOptions);
18
+
19
+ end(): Promise<void>;
18
20
  }
19
21
 
20
22
  export default WorkerFarm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/workers",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.1.1",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,15 +21,20 @@
21
21
  "node": ">= 12.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@parcel/diagnostic": "2.0.0-rc.0",
25
- "@parcel/logger": "2.0.0-rc.0",
26
- "@parcel/types": "2.0.0-rc.0",
27
- "@parcel/utils": "2.0.0-rc.0",
24
+ "@parcel/diagnostic": "^2.1.1",
25
+ "@parcel/logger": "^2.1.1",
26
+ "@parcel/types": "^2.1.1",
27
+ "@parcel/utils": "^2.1.1",
28
28
  "chrome-trace-event": "^1.0.2",
29
29
  "nullthrows": "^1.1.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@parcel/core": "^2.0.0-alpha.3.1"
32
+ "@parcel/core": "^2.1.1"
33
33
  },
34
- "gitHead": "8fc248f1f8eeb4428f7abd768bd23111451b1903"
34
+ "browser": {
35
+ "./src/cpuCount.js": false,
36
+ "./src/process/ProcessWorker.js": false,
37
+ "./src/threads/ThreadsWorker.js": false
38
+ },
39
+ "gitHead": "f53ffe772a8259d94ca2937d02fde149454112f3"
35
40
  }
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((cpu, index) => !cpu.model.includes('Intel') || index % 2 === 1)
57
- .length;
56
+ .filter(
57
+ (cpu, index) => !cpu.model.includes('Intel') || index % 2 === 1,
58
+ ).length;
58
59
  }
59
60
 
60
61
  // Another fallback
@@ -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;
@@ -2,7 +2,7 @@ import Logger from '@parcel/logger';
2
2
  import assert from 'assert';
3
3
  import WorkerFarm from '../src';
4
4
 
5
- describe('WorkerFarm', function() {
5
+ describe('WorkerFarm', function () {
6
6
  this.timeout(30000);
7
7
 
8
8
  it('Should start up workers', async () => {