@roots/bud-compiler 2023.8.3-210 → 2023.8.6-752
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/index.d.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
* @see https://bud.js.org
|
5
5
|
* @see https://github.com/roots/bud
|
6
6
|
*/
|
7
|
-
import { Compiler } from '
|
7
|
+
import { default as Compiler } from '@roots/bud-compiler/service';
|
8
8
|
declare module '@roots/bud-framework' {
|
9
9
|
interface Services {
|
10
10
|
compiler: Compiler;
|
package/lib/index.js
CHANGED
@@ -6,7 +6,7 @@ import { Service } from '@roots/bud-framework/service';
|
|
6
6
|
/**
|
7
7
|
* {@link BudCompiler} implementation
|
8
8
|
*/
|
9
|
-
|
9
|
+
declare class Compiler extends Service implements BudCompiler {
|
10
10
|
/**
|
11
11
|
* {@link BudCompiler.compilationStats}
|
12
12
|
*/
|
@@ -45,3 +45,4 @@ export declare class Compiler extends Service implements BudCompiler {
|
|
45
45
|
register?(bud: Bud): Promise<any>;
|
46
46
|
sourceErrors?(errors: Array<StatsError> | undefined): Array<ErrorWithSourceFile | StatsError>;
|
47
47
|
}
|
48
|
+
export { Compiler as default };
|
@@ -15,7 +15,7 @@ import stripAnsi from '@roots/bud-support/strip-ansi';
|
|
15
15
|
/**
|
16
16
|
* {@link BudCompiler} implementation
|
17
17
|
*/
|
18
|
-
|
18
|
+
class Compiler extends Service {
|
19
19
|
/**
|
20
20
|
* {@link BudCompiler.config}
|
21
21
|
*/
|
@@ -246,3 +246,4 @@ const statsOptions = {
|
|
246
246
|
},
|
247
247
|
name: true,
|
248
248
|
};
|
249
|
+
export { Compiler as default };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@roots/bud-compiler",
|
3
|
-
"version": "2023.8.
|
3
|
+
"version": "2023.8.6-752",
|
4
4
|
"description": "Compilation handler",
|
5
5
|
"engines": {
|
6
6
|
"node": ">=16"
|
@@ -49,27 +49,31 @@
|
|
49
49
|
],
|
50
50
|
"type": "module",
|
51
51
|
"exports": {
|
52
|
-
".": "./lib/index.js"
|
52
|
+
".": "./lib/index.js",
|
53
|
+
"./service": "./lib/service/index.js"
|
53
54
|
},
|
54
55
|
"typesVersions": {
|
55
56
|
"*": {
|
56
57
|
".": [
|
57
58
|
"./lib/index.d.ts"
|
59
|
+
],
|
60
|
+
"service": [
|
61
|
+
"./lib/service/index.d.ts"
|
58
62
|
]
|
59
63
|
}
|
60
64
|
},
|
61
65
|
"types": "./lib/index.d.ts",
|
62
66
|
"module": "./lib/index.js",
|
63
67
|
"devDependencies": {
|
64
|
-
"@roots/bud-api": "2023.8.
|
68
|
+
"@roots/bud-api": "2023.8.6-752",
|
65
69
|
"@skypack/package-check": "0.2.2",
|
66
70
|
"@types/node": "18.16.19",
|
67
71
|
"@types/react": "18.2.15"
|
68
72
|
},
|
69
73
|
"dependencies": {
|
70
|
-
"@roots/bud-dashboard": "2023.8.
|
71
|
-
"@roots/bud-framework": "2023.8.
|
72
|
-
"@roots/bud-support": "2023.8.
|
74
|
+
"@roots/bud-dashboard": "2023.8.6-752",
|
75
|
+
"@roots/bud-framework": "2023.8.6-752",
|
76
|
+
"@roots/bud-support": "2023.8.6-752",
|
73
77
|
"react": "18.2.0",
|
74
78
|
"tslib": "2.6.0"
|
75
79
|
},
|
package/src/index.ts
CHANGED
@@ -30,7 +30,7 @@ import stripAnsi from '@roots/bud-support/strip-ansi'
|
|
30
30
|
/**
|
31
31
|
* {@link BudCompiler} implementation
|
32
32
|
*/
|
33
|
-
|
33
|
+
class Compiler extends Service implements BudCompiler {
|
34
34
|
/**
|
35
35
|
* {@link BudCompiler.compilationStats}
|
36
36
|
*/
|
@@ -86,7 +86,8 @@ export class Compiler extends Service implements BudCompiler {
|
|
86
86
|
try {
|
87
87
|
this.instance = this.implementation(this.config)
|
88
88
|
} catch (error: unknown) {
|
89
|
-
const normalError =
|
89
|
+
const normalError =
|
90
|
+
error instanceof Error ? error : BudError.normalize(error)
|
90
91
|
this.onError(normalError)
|
91
92
|
}
|
92
93
|
|
@@ -309,3 +310,5 @@ const statsOptions = {
|
|
309
310
|
},
|
310
311
|
name: true,
|
311
312
|
}
|
313
|
+
|
314
|
+
export {Compiler as default}
|