@atlaspack/diagnostic 2.12.1-dev.3450 → 2.12.1-dev.3466
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/package.json +2 -2
- package/src/diagnostic.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/diagnostic",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3466+9a12fb8bd",
|
|
4
4
|
"description": "Types and utilities for printing source-code located errors, warning and information messages.",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
25
25
|
"nullthrows": "^1.1.1"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
|
|
28
28
|
}
|
package/src/diagnostic.js
CHANGED
|
@@ -114,7 +114,7 @@ export type Diagnostifiable =
|
|
|
114
114
|
/** Normalize the given value into a diagnostic. */
|
|
115
115
|
export function anyToDiagnostic(input: Diagnostifiable): Array<Diagnostic> {
|
|
116
116
|
if (Array.isArray(input)) {
|
|
117
|
-
return input.flatMap(e => anyToDiagnostic(e));
|
|
117
|
+
return input.flatMap((e) => anyToDiagnostic(e));
|
|
118
118
|
} else if (input instanceof ThrowableDiagnostic) {
|
|
119
119
|
return input.diagnostics;
|
|
120
120
|
} else if (input instanceof Error) {
|
|
@@ -148,7 +148,7 @@ export function errorToDiagnostic(
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
if (error instanceof ThrowableDiagnostic) {
|
|
151
|
-
return error.diagnostics.map(d => {
|
|
151
|
+
return error.diagnostics.map((d) => {
|
|
152
152
|
return {
|
|
153
153
|
...d,
|
|
154
154
|
origin: d.origin ?? defaultValues?.origin ?? 'unknown',
|