Age | Commit message (Collapse) | Author |
|
Fixes #4101
Previously, we would just provide the raw JSON to the TypeScript
compiler worker, but TypeScript does not transform JSON. This caused
a problem when emitting a bundle, that the JSON would just be "inlined"
into the output, instead of being transformed into a module.
This fixes this problem by providing the compiled JSON to the TypeScript
compiler, so TypeScript just sees JSON as a "normal" TypeScript module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Listener and UDPConn are AsyncIterables instead of AsyncIterators.
The [Symbol.asyncIterator]()s are defined as generators and the
next() methods are gone.
"Listener/Socket has been closed" errors are now BadResource.
|
|
|
|
* "op_close" - moved to "cli/ops/resources.rs"
* "op_seek", "op_open" - moved to "cli/ops/fs.rs"
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
|
|
There's a lot of variation in doc comments and internal code about
whether the first parameter to file system calls is `path` or `name` or
`filename`. For consistency, have made it always be `path`.
|
|
|
|
|
|
It contains a clippy issue, and there's no need for this macro anyway.
|
|
|
|
|
|
* rename structures related to ES Modules; add "Modules" prefix
* remove unneeded Unpin trait requirement for "ModuleLoader"
|
|
|
|
|
|
|
|
|
|
Rewrite "normalize_path()" to remove all intermediate components from the path, ie. "./" and "../". It's very similar in functionality to fs::canonicalize(), however "normalize_path() doesn't resolve symlinks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To better reflect changes in error types in JS from #3662 this PR changes
default error type used in ops from "ErrBox" to "OpError".
"OpError" is a type that can be sent over to JSON; it has all
information needed to construct error in JavaScript. That
made "GetErrorKind" trait useless and so it was removed altogether.
To provide compatibility with previous use of "ErrBox" an implementation of
"From<ErrBox> for OpError" was added, however, it is an escape hatch and
ops implementors should strive to use "OpError" directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #3726
This PR provides support for referencing other lib files (like lib.dom.d.ts that are not
used by default in Deno.
|
|
* remove run_worker_loop, impl poll for WebWorker
* store JoinHandle to worker thread
|
|
|
|
* rename methods on Worker related to module loading
* reorganize cli/lib.rs
* remove cli/progress.rs and cli/shell.rs
|
|
|
|
Example:
$ python2 -c 'open("\x80\x7F", "w")'
$ deno eval 'Deno.readDirSync(".")'
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli/ops/fs.rs:373:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
Before this commit they made deno panic, now they are silently skipped.
Not ideal but arguably better than panicking.
No test because what characters are and aren't allowed in filenames is
highly file system-dependent.
Closes #3950
|
|
|
|
* replace "AtomicUsize" with "u64" for field type on "Metrics"
* move "compiler_starts" field from "Metrics" to "GlobalState"
|
|
* establish basic event loop for workers
* make "self.close()" inside worker
* remove "runWorkerMessageLoop() - instead manually call global function
in Rust when message arrives. This is done in preparation for structured clone
* refactor "WorkerChannel" and use distinct structs for internal
and external channels; "WorkerChannelsInternal" and "WorkerHandle"
* move "State.worker_channels_internal" to "Worker.internal_channels"
* add "WorkerEvent" enum for child->host communication;
currently "Message(Buf)" and "Error(ErrBox)" variants are supported
* add tests for nested workers
* add tests for worker throwing error on startup
|
|
Fixes: #3925
|
|
* rename ThreadSafeState to State
* State stores InnerState wrapped in Rc and RefCell
|
|
|
|
|
|
Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER,
OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.
|