@parcel/utils 2.0.0-nightly.1294 → 2.0.0-nightly.1298

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/utils",
3
- "version": "2.0.0-nightly.1294+526e33a2a",
3
+ "version": "2.0.0-nightly.1298+eb76826da",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -33,11 +33,11 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@parcel/codeframe": "2.0.0-nightly.1294+526e33a2a",
37
- "@parcel/diagnostic": "2.0.0-nightly.1294+526e33a2a",
38
- "@parcel/hash": "2.8.4-nightly.2917+526e33a2a",
39
- "@parcel/logger": "2.0.0-nightly.1294+526e33a2a",
40
- "@parcel/markdown-ansi": "2.0.0-nightly.1294+526e33a2a",
36
+ "@parcel/codeframe": "2.0.0-nightly.1298+eb76826da",
37
+ "@parcel/diagnostic": "2.0.0-nightly.1298+eb76826da",
38
+ "@parcel/hash": "2.8.4-nightly.2921+eb76826da",
39
+ "@parcel/logger": "2.0.0-nightly.1298+eb76826da",
40
+ "@parcel/markdown-ansi": "2.0.0-nightly.1298+eb76826da",
41
41
  "@parcel/source-map": "^2.1.1",
42
42
  "chalk": "^4.1.0",
43
43
  "nullthrows": "^1.1.1"
@@ -46,7 +46,7 @@
46
46
  "@iarna/toml": "^2.2.0",
47
47
  "ansi-html-community": "0.0.8",
48
48
  "clone": "^2.1.1",
49
- "fast-glob": "3.1.1",
49
+ "fast-glob": "^3.2.12",
50
50
  "fastest-levenshtein": "^1.0.8",
51
51
  "is-glob": "^4.0.0",
52
52
  "is-url": "^1.2.2",
@@ -65,5 +65,5 @@
65
65
  "./src/http-server.js": false,
66
66
  "./src/openInBrowser.js": false
67
67
  },
68
- "gitHead": "526e33a2a274eb898c64b41b44f7fa31a265ddc5"
68
+ "gitHead": "eb76826da305db1e5668bb9b0c1cb5dbe0951a4c"
69
69
  }
@@ -77,10 +77,14 @@ export default async function prettyDiagnostic(
77
77
  });
78
78
  }
79
79
 
80
- let location =
81
- typeof filePath !== 'string'
82
- ? ''
83
- : `${filePath}:${highlights[0].start.line}:${highlights[0].start.column}`;
80
+ let location;
81
+ if (typeof filePath !== 'string') {
82
+ location = '';
83
+ } else if (highlights.length === 0) {
84
+ location = filePath;
85
+ } else {
86
+ location = `${filePath}:${highlights[0].start.line}:${highlights[0].start.column}`;
87
+ }
84
88
  result.codeframe += location ? chalk.gray.underline(location) + '\n' : '';
85
89
  result.codeframe += formattedCodeFrame;
86
90
  if (codeFrame !== codeFrames[codeFrames.length - 1]) {
@@ -1,5 +1,4 @@
1
1
  // @flow
2
- /* global MessageChannel:readonly */
3
2
 
4
3
  export let SharedBuffer: Class<ArrayBuffer> | Class<SharedArrayBuffer>;
5
4