@parcel/diagnostic 2.10.3 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,15 @@
1
1
  import type { Mapping } from "@mischnic/json-sourcemap";
2
2
  /** These positions are 1-based (so <code>1</code> is the first line/column) */
3
- export declare type DiagnosticHighlightLocation = {
3
+ export type DiagnosticHighlightLocation = {
4
4
  readonly line: number;
5
5
  readonly column: number;
6
6
  };
7
- export declare type DiagnosticSeverity = "error" | "warn" | "info";
7
+ export type DiagnosticSeverity = "error" | "warn" | "info";
8
8
  /**
9
9
  * Note: A tab character is always counted as a single character
10
10
  * This is to prevent any mismatch of highlighting across machines
11
11
  */
12
- export declare type DiagnosticCodeHighlight = {
12
+ export type DiagnosticCodeHighlight = {
13
13
  /** Location of the first character that should get highlighted for this highlight. */
14
14
  start: DiagnosticHighlightLocation;
15
15
  /** Location of the last character that should get highlighted for this highlight. */
@@ -22,7 +22,7 @@ export declare type DiagnosticCodeHighlight = {
22
22
  * A code frame is a visualization of a piece of code with a certain amount of
23
23
  * code highlights that point to certain chunk(s) inside the code.
24
24
  */
25
- export declare type DiagnosticCodeFrame = {
25
+ export type DiagnosticCodeFrame = {
26
26
  /**
27
27
  * The contents of the source file.
28
28
  *
@@ -41,7 +41,7 @@ export declare type DiagnosticCodeFrame = {
41
41
  * A style agnostic way of emitting errors, warnings and info.
42
42
  * Reporters are responsible for rendering the message, codeframes, hints, ...
43
43
  */
44
- export declare type Diagnostic = {
44
+ export type Diagnostic = {
45
45
  /** This is the message you want to log. */
46
46
  message: string;
47
47
  /** Name of plugin or file that threw this error */
@@ -70,11 +70,11 @@ export interface PrintableError extends Error {
70
70
  } | null | undefined;
71
71
  source?: string;
72
72
  }
73
- export declare type DiagnosticWithoutOrigin = Diagnostic & {
73
+ export type DiagnosticWithoutOrigin = Diagnostic & {
74
74
  origin?: string;
75
75
  };
76
76
  /** Something that can be turned into a diagnostic. */
77
- export declare type Diagnostifiable = Diagnostic | Array<Diagnostic> | ThrowableDiagnostic | PrintableError | Error | string;
77
+ export type Diagnostifiable = Diagnostic | Array<Diagnostic> | ThrowableDiagnostic | PrintableError | Error | string;
78
78
  /** Normalize the given value into a diagnostic. */
79
79
  export declare function anyToDiagnostic(input: Diagnostifiable): Array<Diagnostic>;
80
80
  /** Normalize the given error into a diagnostic. */
@@ -82,7 +82,7 @@ export declare function errorToDiagnostic(error: ThrowableDiagnostic | Printable
82
82
  origin?: string | null | undefined;
83
83
  filePath?: string | null | undefined;
84
84
  }): Array<Diagnostic>;
85
- declare type ThrowableDiagnosticOpts = {
85
+ type ThrowableDiagnosticOpts = {
86
86
  diagnostic: Diagnostic | Array<Diagnostic>;
87
87
  };
88
88
  /**
@@ -143,7 +143,7 @@ export declare function convertSourceLocationToHighlight<Location extends {
143
143
  /** Sanitizes object keys before using them as <code>key</code> in generateJSONCodeHighlights */
144
144
  export declare function encodeJSONKeyComponent(component: string): string;
145
145
  export declare function escapeMarkdown(s: string): string;
146
- declare type TemplateInput = any;
146
+ type TemplateInput = any;
147
147
  export declare function md(strings: Array<string>, ...params: Array<TemplateInput>): string;
148
148
  export declare namespace md {
149
149
  var bold: (s: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/diagnostic",
3
- "version": "2.10.3",
3
+ "version": "2.11.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,5 +27,5 @@
27
27
  "@mischnic/json-sourcemap": "^0.1.0",
28
28
  "nullthrows": "^1.1.1"
29
29
  },
30
- "gitHead": "65d42a955db665a04817fa9be55df16f588593d4"
30
+ "gitHead": "f8076f1644cabc944695b5ec82602c8ae32bcf21"
31
31
  }