@roots/bud-compiler 2024.6.18-8 → 2024.6.20-7

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/README.md CHANGED
@@ -69,3 +69,6 @@ However, the amount of effort needed to maintain and develop new features and pr
69
69
  <a href="https://worksitesafety.ca/careers/">
70
70
  <img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="200" height="150"/>
71
71
  </a>
72
+ <a href="https://www.itineris.co.uk/">
73
+ <img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="200" height="150"/>
74
+ </a>
@@ -25,7 +25,27 @@ class Compiler extends Service {
25
25
  * {@link BudCompiler.onStats}
26
26
  */
27
27
  onStats(stats) {
28
- this.stats = stats.toJson(statsOptions);
28
+ this.stats = stats.toJson({
29
+ all: false,
30
+ children: {
31
+ all: false,
32
+ assets: true,
33
+ cached: true,
34
+ cachedAssets: true,
35
+ cachedModules: true,
36
+ entrypoints: true,
37
+ errorDetails: false,
38
+ errors: true,
39
+ errorsCount: true,
40
+ hash: true,
41
+ modules: true,
42
+ name: true,
43
+ outputPath: true,
44
+ timings: true,
45
+ warnings: true,
46
+ warningsCount: true,
47
+ },
48
+ });
29
49
  this.app.dashboard.render(stats);
30
50
  if (stats.hasErrors()) {
31
51
  process.exitCode = 1;
@@ -84,9 +104,7 @@ class Compiler extends Service {
84
104
  this.config.parallelism = Math.max(cpus().length - 1, 1);
85
105
  this.logger.info(`parallel compilations: ${this.config.parallelism}`);
86
106
  }
87
- await bud.hooks.fire(`compiler.before`, bud).catch(error => {
88
- throw error;
89
- });
107
+ await bud.hooks.fire(`compiler.before`, bud);
90
108
  this.instance = this.implementation(this.config);
91
109
  this.instance.hooks.done.tap(bud.label, this.onStats);
92
110
  this.instance.hooks.done.tap(`${bud.label}-compiler.done`, stats => bud.hooks.fire(`compiler.done`, bud, stats));
@@ -112,25 +130,4 @@ __decorate([
112
130
  __decorate([
113
131
  bind
114
132
  ], Compiler.prototype, "register", null);
115
- const statsOptions = {
116
- all: false,
117
- children: {
118
- all: false,
119
- assets: true,
120
- cached: true,
121
- cachedAssets: true,
122
- cachedModules: true,
123
- entrypoints: true,
124
- errorDetails: false,
125
- errors: true,
126
- errorsCount: true,
127
- hash: true,
128
- modules: true,
129
- name: true,
130
- outputPath: true,
131
- timings: true,
132
- warnings: true,
133
- warningsCount: true,
134
- },
135
- };
136
133
  export { Compiler as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roots/bud-compiler",
3
- "version": "2024.6.18-8",
3
+ "version": "2024.6.20-7",
4
4
  "description": "Compilation handler",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -65,14 +65,14 @@
65
65
  "types": "./lib/index.d.ts",
66
66
  "module": "./lib/index.js",
67
67
  "devDependencies": {
68
- "@roots/bud-api": "2024.6.18-8",
68
+ "@roots/bud-api": "2024.6.20-7",
69
69
  "@skypack/package-check": "0.2.2",
70
70
  "@types/node": "20.12.8"
71
71
  },
72
72
  "dependencies": {
73
- "@roots/bud-dashboard": "2024.6.18-8",
74
- "@roots/bud-framework": "2024.6.18-8",
75
- "@roots/bud-support": "2024.6.18-8",
73
+ "@roots/bud-dashboard": "2024.6.20-7",
74
+ "@roots/bud-framework": "2024.6.20-7",
75
+ "@roots/bud-support": "2024.6.20-7",
76
76
  "tslib": "2.6.2"
77
77
  },
78
78
  "volta": {
@@ -48,7 +48,27 @@ class Compiler extends Service implements BudCompiler {
48
48
  */
49
49
  @bind
50
50
  public onStats(stats: MultiStats) {
51
- this.stats = stats.toJson(statsOptions)
51
+ this.stats = stats.toJson({
52
+ all: false,
53
+ children: {
54
+ all: false,
55
+ assets: true,
56
+ cached: true,
57
+ cachedAssets: true,
58
+ cachedModules: true,
59
+ entrypoints: true,
60
+ errorDetails: false,
61
+ errors: true,
62
+ errorsCount: true,
63
+ hash: true,
64
+ modules: true,
65
+ name: true,
66
+ outputPath: true,
67
+ timings: true,
68
+ warnings: true,
69
+ warningsCount: true,
70
+ },
71
+ })
52
72
  this.app.dashboard.render(stats)
53
73
 
54
74
  if (stats.hasErrors()) {
@@ -124,9 +144,7 @@ class Compiler extends Service implements BudCompiler {
124
144
  this.logger.info(`parallel compilations: ${this.config.parallelism}`)
125
145
  }
126
146
 
127
- await bud.hooks.fire(`compiler.before`, bud).catch(error => {
128
- throw error
129
- })
147
+ await bud.hooks.fire(`compiler.before`, bud)
130
148
 
131
149
  this.instance = this.implementation(this.config)
132
150
  this.instance.hooks.done.tap(bud.label, this.onStats)
@@ -150,26 +168,4 @@ class Compiler extends Service implements BudCompiler {
150
168
  }
151
169
  }
152
170
 
153
- const statsOptions = {
154
- all: false,
155
- children: {
156
- all: false,
157
- assets: true,
158
- cached: true,
159
- cachedAssets: true,
160
- cachedModules: true,
161
- entrypoints: true,
162
- errorDetails: false,
163
- errors: true,
164
- errorsCount: true,
165
- hash: true,
166
- modules: true,
167
- name: true,
168
- outputPath: true,
169
- timings: true,
170
- warnings: true,
171
- warningsCount: true,
172
- },
173
- }
174
-
175
171
  export {Compiler as default}