@roots/bud-compiler 2023.7.6-734 → 2023.7.18-452

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/service.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { Bud } from '@roots/bud-framework';
3
3
  import type { MultiCompiler, MultiStats, Stats, StatsError, Webpack } from '@roots/bud-framework/config';
4
4
  import type { ErrorWithSourceFile } from '@roots/bud-support/open';
5
5
  import { Service } from '@roots/bud-framework/service';
6
- import { type BudHandler } from '@roots/bud-support/errors';
6
+ import { type BudErrorClass } from '@roots/bud-support/errors';
7
7
  import webpack from '@roots/bud-support/webpack';
8
8
  /**
9
9
  * {@link BudCompiler} implementation
@@ -36,7 +36,7 @@ export declare class Compiler extends Service implements BudCompiler {
36
36
  /**
37
37
  * {@link BudCompiler.onError}
38
38
  */
39
- onError(error: BudHandler | webpack.WebpackError): void;
39
+ onError(error: BudErrorClass | webpack.WebpackError): void;
40
40
  /**
41
41
  * {@link BudCompiler.onStats}
42
42
  */
package/lib/service.js CHANGED
@@ -44,7 +44,7 @@ export class Compiler extends Service {
44
44
  : await Promise.all(Object.values(bud.children).map(async (child) => await child.build.make().catch(error => {
45
45
  throw error;
46
46
  })));
47
- this.config.parallelism = Math.min(cpus().length - 1, 1);
47
+ this.config.parallelism = Math.max(cpus().length - 1, 1);
48
48
  await bud.hooks.fire(`compiler.before`, bud).catch(error => {
49
49
  throw error;
50
50
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roots/bud-compiler",
3
- "version": "2023.7.6-734",
3
+ "version": "2023.7.18-452",
4
4
  "description": "Compilation handler",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -61,15 +61,15 @@
61
61
  "types": "./lib/index.d.ts",
62
62
  "module": "./lib/index.js",
63
63
  "devDependencies": {
64
- "@roots/bud-api": "2023.7.6-734",
64
+ "@roots/bud-api": "2023.7.18-452",
65
65
  "@skypack/package-check": "0.2.2",
66
- "@types/node": "18.16.18",
67
- "@types/react": "18.2.14"
66
+ "@types/node": "18.16.19",
67
+ "@types/react": "18.2.15"
68
68
  },
69
69
  "dependencies": {
70
- "@roots/bud-dashboard": "2023.7.6-734",
71
- "@roots/bud-framework": "2023.7.6-734",
72
- "@roots/bud-support": "2023.7.6-734",
70
+ "@roots/bud-dashboard": "2023.7.18-452",
71
+ "@roots/bud-framework": "2023.7.18-452",
72
+ "@roots/bud-support": "2023.7.18-452",
73
73
  "react": "18.2.0",
74
74
  "tslib": "2.6.0"
75
75
  },
package/src/service.tsx CHANGED
@@ -20,7 +20,7 @@ import {pathToFileURL} from 'node:url'
20
20
  import {Error} from '@roots/bud-dashboard/components/error'
21
21
  import {Service} from '@roots/bud-framework/service'
22
22
  import {bind} from '@roots/bud-support/decorators/bind'
23
- import {BudError, type BudHandler} from '@roots/bud-support/errors'
23
+ import {BudError, type BudErrorClass} from '@roots/bud-support/errors'
24
24
  import {duration} from '@roots/bud-support/human-readable'
25
25
  import {render} from '@roots/bud-support/ink'
26
26
  import stripAnsi from '@roots/bud-support/strip-ansi'
@@ -70,7 +70,7 @@ export class Compiler extends Service implements BudCompiler {
70
70
  }),
71
71
  ),
72
72
  )
73
- this.config.parallelism = Math.min(cpus().length - 1, 1)
73
+ this.config.parallelism = Math.max(cpus().length - 1, 1)
74
74
 
75
75
  await bud.hooks.fire(`compiler.before`, bud).catch(error => {
76
76
  throw error
@@ -100,7 +100,7 @@ export class Compiler extends Service implements BudCompiler {
100
100
  * {@link BudCompiler.onError}
101
101
  */
102
102
  @bind
103
- public onError(error: BudHandler | webpack.WebpackError) {
103
+ public onError(error: BudErrorClass | webpack.WebpackError) {
104
104
  process.exitCode = 1
105
105
 
106
106
  this.app.server?.appliedMiddleware?.hot?.publish({error})