Skip to content

Commit

Permalink
Remove v8-compile-cache (#8990)
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed May 9, 2023
1 parent 526e33a commit 7abd24c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/core/parcel/package.json
Expand Up @@ -33,8 +33,7 @@
"@parcel/utils": "2.8.3",
"chalk": "^4.1.0",
"commander": "^7.0.0",
"get-port": "^4.2.0",
"v8-compile-cache": "^2.0.0"
"get-port": "^4.2.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/core/parcel/src/cli.js
Expand Up @@ -13,8 +13,6 @@ import path from 'path';
import getPort from 'get-port';
import {version} from '../package.json';

require('v8-compile-cache');

const program = new commander.Command();

// Exit codes in response to signals are traditionally
Expand Down
12 changes: 8 additions & 4 deletions packages/core/utils/src/prettyDiagnostic.js
Expand Up @@ -77,10 +77,14 @@ export default async function prettyDiagnostic(
});
}

let location =
typeof filePath !== 'string'
? ''
: `${filePath}:${highlights[0].start.line}:${highlights[0].start.column}`;
let location;
if (typeof filePath !== 'string') {
location = '';
} else if (highlights.length === 0) {
location = filePath;
} else {
location = `${filePath}:${highlights[0].start.line}:${highlights[0].start.column}`;
}
result.codeframe += location ? chalk.gray.underline(location) + '\n' : '';
result.codeframe += formattedCodeFrame;
if (codeFrame !== codeFrames[codeFrames.length - 1]) {
Expand Down

0 comments on commit 7abd24c

Please sign in to comment.