Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove v8-compile-cache #8990

Merged
merged 2 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/parcel/package.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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