summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2020-05-18refactor: rewrite TS dependency analysis in Rust (#5029)Bartek Iwańczuk
This commit completely overhauls how module analysis is performed in TS compiler by moving the logic to Rust. In the current setup module analysis is performed using "ts.preProcessFile" API in a special TS compiler worker running on a separate thread. "ts.preProcessFile" allowed us to build a lot of functionality in CLI including X-TypeScript-Types header support and @deno-types directive support. Unfortunately at the same time complexity of the ops required to perform supporting tasks exploded and caused some hidden permission escapes. This PR introduces "ModuleGraphLoader" which can parse source and load recursively all dependent source files; as well as declaration files. All dependencies used in TS compiler and now fetched and collected upfront in Rust before spinning up TS compiler. To achieve feature parity with existing APIs this commit includes a lot of changes: * add "ModuleGraphLoader" - can fetch local and remote sources - parses source code using SWC and extracts imports, exports, file references, special headers - this struct inherited all of the hidden complexity and cruft from TS version and requires several follow up PRs * rewrite cli/tsc.rs to perform module analysis upfront and send all required source code to TS worker in one message * remove op_resolve_modules and op_fetch_source_files from cli/ops/compiler.rs * run TS worker on the same thread
2020-05-17Miscellaneous documentation and spelling improvements (#5527)Bert Belder
* Extended/updated documentation on code editor setup and plugins. * Moved documentation to the right file. * Fixed spelling errors in documentation and code. * Updated broken links. Co-authored-by: 迷渡 <justjavac@gmail.com> Co-authored-by: AlfieriChou <alfierichou@gmail.com> Co-authored-by: Anil Seervi <anil13112000@gmail.com Co-authored-by: Bert Belder <bertbelder@gmail.com> Co-authored-by: Fernando Basso <fernandobasso.br@gmail.com> Co-authored-by: József Sallai <jozsef@sallai.me> Co-authored-by: S4ltyGo4t <mario.weidner@gmx.de> Co-authored-by: Tommy May <tommymay37@gmail.com> Co-authored-by: Turbinya <wownucleos@gmail.com> Co-authored-by: ᴜɴвʏтᴇ <i@shangyes.net>
2020-05-17Implement Deno.kill for windows (#5347)Ali Hasani
2020-05-17Update to dprint 0.18.3 and the latest version of swc (#5509)David Sherret
2020-05-17chore: capture stderr in integration tests (#5549)Bartek Iwańczuk
This commit removes "check_stderr" setting from itest! macro used to generate integration tests. Without this setting on tests discarded output of stderr making it very hard to debug the problem in test. Numerous tests were changed by adding "--quiet" flag to not display "Compile"/"Download" prompts.
2020-05-17Fix definition of URL constructor (#5521)Masahiro Miyashiro (3846masa)
2020-05-17docs: update cli/js/tests README (#5531)Ali Hasani
2020-05-17Return error if more than one listener calls `WorkerHandle::get_event()` (#5461)Yiyu Lin
2020-05-16tsc: use serde to (de)serialize CompiledFileMetadata (#5481)Yiyu Lin
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-05-16Fix formatting of example code in typescript declaration files (#5475)Siddharth Parmar
2020-05-16fix some unwrap() in Rust (#5485)Yiyu Lin
2020-05-16Fix a bunch of spelling errors (#5314)Bert Belder
2020-05-15fix some clippy warning (#5462)Yiyu Lin
2020-05-15fix: panic if $DENO_DIR is a relative path (#5375)Bartek Iwańczuk
This commit fixes panic occurring if $DENO_DIR is set to a relative path, eg. "DENO_DIR=denodir deno run main.ts". Before creating DenoDir instance given path is checked and if necessary resolved against current working directory. Additional sanity checks were put in place to ensure all caches receive absolute path for the location.
2020-05-15chore: port deno_dir_test to Rust (#5408)uki00a
2020-05-15fix: setTimeout and friends have too strict types (#5412)Tomasz Gałkowski
2020-05-15doc: add stream api (#5418)Chris Knight
2020-05-14Remove debug prints introduced in e18aaf49c (#5356)Valentin Anger
2020-05-14cli: don't panic on Deno.close invalid argument (#5320)Kevin (Kun) "Kassimo" Qian
2020-05-14Fix typos across the repo (#5295)Dante Calderón
Corrections made: * cli/js/tests/README.md:44:7: corrected "discoveres" to "discovers" * cli/js/tests/chown_test.ts:111:37: corrected "priviledge" to "privilege" * cli/worker.rs:231:56: corrected "decendants" to "descendants" * deno_typescript/lib.rs:136:50: corrected "emmited" to "emitted" * core/es_isolate.rs:492:67: corrected "registerd" to "registered" * core/isolate.rs:103:28: corrected "initalize" to "initialize" * docs/runtime.md:29:14: corrected "ect" to "etc" * docs/tools/debugger.md:122:16: corrected "implementes" to "implements" * std/encoding/_yaml/dumper/dumper_state.ts:57:63: corrected "everwhere" to "everywhere" * std/encoding/csv.ts:37:43: corrected "referal" to "referral" * std/fmt/sprintf.ts:209:20: corrected "unusuable" to "unusable" * std/fmt/README.md:21:40: corrected "Alternativly" to "Alternatively" * std/fmt/README.md:35:68: corrected "seperated" to "separated" * std/fmt/README.md:179:59: corrected "provded" to "provided" * std/mime/multipart.ts:581:46: corrected "writen" to "written" * std/path/_globrex.ts:19:52: corrected "equivelant" to "equivalent" * std/node/events_test.ts:447:9: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:475:9: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:500:29: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:530:40: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:555:9: corrected "asyncronous" to "asynchronous" * tools/deno_tcp_proxy.ts:1:42: corrected "perfromance" to "performance" * std/node/module.ts:1003:18: corrected "existend" to "existed"
2020-05-13v1.0.0Bartek Iwańczuk
2020-05-13default to 0.0.0.0 for Deno.listen (#5203)Pavan Kumar
2020-05-13Update to TypeScript 3.9 (#4510)Kitson Kelly
2020-05-13Make --inspect-brk pause on the first line of _user_ code (#5250)Bert Belder
2020-05-12fix example of readTextFile (#5247)A.E Clarence
2020-05-12fix: source maps in inspector for local files (#5245)Bartek Iwańczuk
This commit changes handling of source maps by setting proper file URLs for "file" and "sources" fields in the source map.
2020-05-12v1.0.0-rc3Bartek Iwańczuk
2020-05-11fix: source maps in inspector (#5223)Bartek Iwańczuk
This commit fixes problems with source maps in Chrome Devtools by substituting source map URL generated by TS compiler with actual file URL pointing to DENO_DIR. Dummy value of "source_map_url" has been removed from "ScriptOrigin". Also fixes lock file which used compiled source code to generate lock hash; it now uses source code of the file that is being compiled.
2020-05-11BREAKING: There is no public Rust API for the CLI (#5226)Ryan Dahl
2020-05-11Change plugin interface to prevent segfaults when unloading plugin (#5210)Bert Belder
Fixes: #3473 Closes: #5193
2020-05-11Merge std_tests.rs into integration_tests.rs.rs (#5228)Ryan Dahl
* Remove usage of url_to_filename from integration_tests * Make test ports not conflict with each other
2020-05-11fix: Expose ErrorEvent globally (#5222)Kitson Kelly
2020-05-11refactor: check permissions in SourceFileFetcher (#5011)Bartek Iwańczuk
This PR hot-fixes permission escapes in dynamic imports, workers and runtime compiler APIs. "permissions" parameter was added to public APIs of SourceFileFetcher and appropriate permission checks are performed during loading of local and remote files.
2020-05-10fix: remove default --allow-read perm for deno test (#5208)Bartek Iwańczuk
2020-05-10Update to dprint 0.17.2 (#5195)David Sherret
2020-05-091.0.0-rc2Bartek Iwańczuk
2020-05-09refactor(cli): unify display of errors from Rust and JS (#5183)Bartek Iwańczuk
2020-05-09fix: Allow multiple Set-Cookie headers (#5100)Kitson Kelly
2020-05-09fix(cli/installer): Fix concurrent env handling in tests (#5182)Nayeem Rahman
2020-05-09BREAKING: make Deno.hostname unstable (#5108)Ryan Dahl
2020-05-09Add support for X-Deno-Warning header (#5161)Ryan Dahl
2020-05-09BREAKING(std): reorganization (#5087)Nayeem Rahman
* Prepend underscores to private modules * Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result. * Move std/_util/async.ts to std/async * Move std/util/sha*.ts to std/hash
2020-05-09feat(upgrade): allow specifying a version (#5156)crowlKats
2020-05-09add option to lint and format only staged files (#5172)Michał Zdunek
2020-05-08Add hint on how to exit REPL (#5143)Ryan Dahl
Removes exit and help commands
2020-05-08refactor: Remove cli::compilers module (#5138)Bartek Iwańczuk
This PR removes "cli/compilers/" directory. "cli/compilers/ts.rs" has been renamed to "cli/tsc.rs"
2020-05-08feat(workers): "crypto" global accessible in Worker scope (#5121)Oliver Lenehan
2020-05-08fix: correct type error text (#5150)Chris Knight
2020-05-07BREAKING: make Worker.deno unstable (#5128)Bartek Iwańczuk
This commit makes "Worker.deno" option unstable. Added new manual entry "docs/runtime/workers.md". Removed stale workers tests.
2020-05-07BREAKING: Remove support for .wasm imports (#5135)Bartek Iwańczuk
Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports