-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Upstream some REPL changes #9328
Conversation
06a866f
to
ebce7d8
Compare
Benchmark ResultsKitchen Sink ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. React HackerNews ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. |
2d5cc41
to
f8e2854
Compare
f8e2854
to
5b14027
Compare
format === 'ansi' | ||
? _chalk | ||
: { | ||
gray: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is gray the only color we use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, gray underline is the only thing used in this function (and if not, Flow would complain as well).
The remaining colors of printed diagnostics come from the function that formats the result of prettyDiagnostic
(like the CLI reporter), and from the codeframe syntax highlighter.
The latter is currently not working in the REPL because by default chalk is a noop in the browser, unless force-enabled with an option. The syntax highlighter emphasize
only exposes these chalk options in newer versions, which are ESM only. That would work fine for the published Parcel packages (@parcel/codeframe
is bundled before publishing), but not in the monorepo where @parcel/codeframe
is only transpiled with Babel and resulting in require("emphasize")
.
worker.on('ready', () => { | ||
this.readyWorkers++; | ||
if (this.readyWorkers === this.options.maxConcurrentWorkers) { | ||
this.emit('ready'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new ready
event on the WorkerFarm is used to show in the REPL UI when the workers are ready (the slow bit is loading the JS/Wasm)
I added a message to signal the main thread when the worker is started, and a message to signal the worker it's about to be |
/
, which usually never happens.makeShared
, only copy contents if the buffer isn't empty (caused some strange errors likecannot perform TypedArray.prototype.set for detached buffer
)process.stdout
is undefined on webchild_process.exec
is undefined on web