summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2020-02-08refactor: rename ThreadSafeState, use RefCell for mutable state (#3931)Bartek Iwańczuk
* rename ThreadSafeState to State * State stores InnerState wrapped in Rc and RefCell
2020-02-08install: add --force flag and remove yes/no prompt (#3917)Kevin (Kun) "Kassimo" Qian
2020-02-07Add blanket impl for the 'Resource' trait (#3903)Bert Belder
2020-02-07toAsyncIterable: Remove unnecessary EOF check (#3914)Brad Dunbar
In denoland/deno#2335 a conditional was added to make sure toAsyncIterator didn't skip chunks because the reader returned data and EOF in a single call, fixing #2330. Later, in denoland/deno#2591, the `Reader` interface changed to `Promise<number | EOF>`. Since the reader no longer returns data and EOF in a single call, this conditional is not necessary. We can just return `{ done: true }` when we get `EOF`. Co-authored-by: Arun Srinivasan <rulfzid@gmail.com> Co-authored-by: Arun Srinivasan <rulfzid@gmail.com>
2020-02-07Enable thread pool for blocking ops (#3912)Ryan Dahl
2020-02-07Remove conditionals from installer (#3909)Ryan Dahl
2020-02-07Fix deno types | head (#3910)Ryan Dahl
2020-02-07Improve support for diagnostics from runtime compiler APIs (#3911)Kitson Kelly
- Exports diagnostic items from `diagnostics.ts` which are missing at runtime. - Returns an array of diagnostics, instead of an object with a property of `items`. This is because of the way Rust deals with certain structures, and shouldn't be exposed in the APIs.
2020-02-07feat: add std/signal/mod.ts (#3913)Yoshiya Hinosawa
2020-02-06Rename ThreadSafeGlobalState to GlobalState (#3907)Ryan Dahl
simplify
2020-02-06fix(cli/flags.rs): Prevent providing --allow-env flag twice (#3906)Seungho Kim
2020-02-06fix 015_duplicate_parallel_import (#3904)Ryan Dahl
2020-02-05fix: basic web worker message passing (#3893)Ryan Dahl
Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER, OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.
2020-02-05Fix: jsDoc for Deno.dir() (#3888)Chris Knight
2020-02-05fix: Validate all tests included in unit_tests.ts (#3879)Chris Knight
2020-02-05Move create_channels into worker constructor (#3889)Ryan Dahl
2020-02-04refactor: port fetch test to rust (#3887)Luka Hartwig
2020-02-04refactor: CLI subcommands and argv (#3886)Bartek Iwańczuk
2020-02-04Do not encode files loaded from network as utf8 (#3856)Tilman Roeder
2020-02-04reenable some tests (#3882)Bartek Iwańczuk
2020-02-03refactor: Use Tokio's single-threaded runtime (#3844)Ryan Dahl
This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers
2020-02-03upgrade: dprint 0.3.0-alpha.6Ryan Dahl
2020-02-03v0.32.0Bartek Iwańczuk
2020-02-03Make fetch API more standards compliant (#3667)serverhiccups
2020-02-03Use tokio::test for some of cli's unit tests (#3868)Ryan Dahl
2020-02-03fix: Deno.remove() to properly remove dangling symlinks (#3860)Rafael Vargas
For some reason, the unit tests for Deno.remove() were not being imported to unit_tests.ts and, consequently, not being executed. Thus, I imported them, refactored some existent ones and wrote new ones for the symlink removal case. Since the creation of a symlink is not implemented for Windows yet, assertions that consider this state were added when the tests are executed in this OS.
2020-02-02Remove //tests symlink (#3849)Luka Hartwig
2020-02-01feat: support crate imports in deno_typescript (#3814)Andy Finch
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-01-31Add support for multiple files in fetch command (#3845)Tim Ermilov
2020-01-31Add NO_BUILD_SNAPSHOTS to speed up incremental builds (#3847)Ryan Dahl
2020-01-31chore: remove std/installer, port installer tests to Rust (#3843)Bartek Iwańczuk
2020-01-31chore: upgrade dprint (#3842)Bartek Iwańczuk
2020-01-30feat: deno install in Rust (#3806)Bartek Iwańczuk
//std/installer couldn't be removed due to bug, but it's now deprecated.
2020-01-30Use tokio::main (#3831)Ryan Dahl
2020-01-30Remove --current-thread flag (#3830)Ryan Dahl
This flag was added to evaluate performance relative to tokio's threaded runtime. Although it's faster in the HTTP benchmark, it's clear the runtime is not the only perf problem. Removing this flag will simplify further refactors, in particular adopting the #[tokio::main] macro. This will be done in a follow up. Ultimately we expect to move to the current thread runtime with Isolates pinned to specific threads, but that will be a much larger refactor. The --current-thread just complicates that effort.
2020-01-30Adjust dprint configuration to be closer to prettier (#3824)Ryan Dahl
2020-01-30Try to fix docs.rs for cli crate (#3823)Ryan Dahl
2020-01-29Deno.makeTempDir() check permissions (#3810)EnokMan
2020-01-29feat: dprint formatter (#3820)Bartek Iwańczuk
* rewrite fmt_test in Rust, remove tools/fmt_test.py * remove //std/prettier
2020-01-29workers: proper TS libs, more spec-compliant APIs (#3812)Bartek Iwańczuk
* split lib.deno_main.d.ts into: - lib.deno.shared_globals.d.ts - lib.deno.window.d.ts - lib.deno.worker.d.ts * remove no longer used libs: - lib.deno_main.d.ts - lib.deno_worker.d.ts * change module loading to use proper TS library for compilation * align to Worker API spec: - Worker.terminate() - self.close() - self.name
2020-01-27dx: descriptive permission errors (#3808)Bartek Iwańczuk
Before: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ``` After: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ```
2020-01-27refactor: isomorphic snapshot for CLI (#3728)Bartek Iwańczuk
2020-01-26Improve support of type definitions (#3755)Kitson Kelly
2020-01-26lock: support lock-write for fetch command (#3787)Kevin (Kun) "Kassimo" Qian
2020-01-26Remove dead code in cli/shell.rs (#3792)Ryan Dahl
2020-01-26fix clippy warnings (#3798)Ben Noordhuis
2020-01-26feat: make eval support --v8-flags=... (#3797)Ben Noordhuis
Closes #3796
2020-01-25refactor: Modules and Loader trait (#3791)Bartek Iwańczuk
* move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions. * change argument type from &str to &ModuleSpecifier where applicable
2020-01-25Refactor error tracking and scope juggling in deno_core (#3783)Bert Belder
2020-01-24Do not panic and improve error message on cache failure (#3784)Kevin (Kun) "Kassimo" Qian