summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2020-05-19Provide better ANSI colorized output when inspecting objects (#5404)Speykious
2020-05-19fix: REPL does not exit properly when close() is called (#5451)uki00a
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-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-15chore: port deno_dir_test to Rust (#5408)uki00a
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-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-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-09refactor(cli): unify display of errors from Rust and JS (#5183)Bartek Iwańczuk
2020-05-09Add support for X-Deno-Warning header (#5161)Ryan Dahl
2020-05-09feat(upgrade): allow specifying a version (#5156)crowlKats
2020-05-08Add hint on how to exit REPL (#5143)Ryan Dahl
Removes exit and help commands
2020-05-08feat(workers): "crypto" global accessible in Worker scope (#5121)Oliver Lenehan
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
2020-05-07feat: format deno bundle output (#5139)Yoshiya Hinosawa
2020-05-07fix(imports): fix panic on unsupported scheme (#5131)Bartek Iwańczuk
2020-05-06remove target_test.py (#5112)Ryan Dahl
2020-05-06BREAKING: execPath should require allow-read (#5109)Ryan Dahl
2020-05-06Clean up 'inspector_break_on_first_line' test and fix its flakiness (#5098)Bert Belder
2020-05-06refactor: merge TS compiler into single file (#5091)Bartek Iwańczuk
2020-05-05fix(cli): fix paths in internal stack traces (#5093)Bartek Iwańczuk
This commit updates "deno_typescript" crate to properly map bundle entrypoint file to internal specifier. All import specifiers were remapped from "file:///a/b/c.ts" to "$deno$/a/b/c.ts", but that was not the case for entrypoint file "main.ts" and "compiler.ts". Because of that internal stack traces were inconsistent; showing "file:///some/random/path/on/ci/machine.ts" URL in frames that originate from "main.ts" or "compiler.ts" and "$deno$/file.ts" for all other imports.
2020-05-05refactor(ts): remove op_cache (#5071)Bartek Iwańczuk
This PR removes op_cache and refactors how Deno interacts with TS compiler. Ultimate goal is to completely sandbox TS compiler worker; it should operate on simple request -> response basis. With this commit TS compiler no longer caches compiled sources as they are generated but rather collects all sources and sends them back to Rust when compilation is done. Additionally "Diagnostic" and its children got refactored to use "Deserialize" trait instead of manually implementing JSON deserialization.
2020-05-05Fix inspector hanging when task budget is exceeded (#5083)Bert Belder
The issue is solved by proxying websocket messages over a pair of `futures::mpsc::unbounded` channels. As these are are implemented in the 'futures' crate, they can't participate in Tokio's cooperative task yielding.
2020-05-04stabilize Deno.cwd and require --allow-read (#5068)Ryan Dahl
2020-05-04simplify unit tests: compiler_api, workers (#5073)Ryan Dahl
2020-05-04BREAKING: remove CLI 'deno script.ts' hack (#5026)Bartek Iwańczuk
This PR removes the hack in CLI that allows to run scripts with shorthand: deno script.ts. Removing this functionality because it hacks around short-comings of clap our CLI parser. We agree that this shorthand syntax is desirable, but it needs to be rethinked and reimplemented. For 1.0 we should go with conservative approach that is correct.
2020-05-02BREAKING: disallow static import of local modules from remote modules (#5050)Bartek Iwańczuk
This commit changes module loading logic to disallow statically import local module (file:// scheme) from remote modules (http://, https:// schemes).
2020-05-02BREAKING: remove support for JSON imports (#5037)Bartek Iwańczuk
This commit removes support for importing JSON files as modules. This change is dictated by security; browsers rolled back on this support as well.
2020-05-01BREAKING: feat(cli/installer): Support guessing the executable name (#5036)Nayeem Rahman
2020-05-01BREAKING: remove window.location and self.location (#5034)Bartek Iwańczuk
This commit removes "location" global available on "window", "globalThis" and "self".
2020-05-01fix misaligned error reporting on tab char (#5032)Fenzland
2020-04-30Unstable methods should not appear in runtime or d.ts (#4957)Luca Casonato
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-29BREAKING: Map-like interface for Deno.env (#4942)Valentin Anger
2020-04-28BREAKING: Remove Deno.EOF, use null instead (#4953)Nayeem Rahman
2020-04-28BREAKING: remove overload of Deno.test() (#4951)Bartek Iwańczuk
This commit removes overload of Deno.test() that accepted named function.
2020-04-28Make import maps unstable (#4934)Luca Casonato
2020-04-27fix(core): fix top-level-await error handling (#4911)Bartek Iwańczuk
2020-04-27Make runtime compile ops unstable (#4912)Ryan Dahl
2020-04-25introduce unstable flag, make a few things unstable (#4892)Ryan Dahl
2020-04-25BREAKING CHANGE: remove Deno.OpenMode (#4884)Bartek Iwańczuk
This commit removes Deno.OpenMode along with overloaded variants of Deno.open() and Deno.openSync() that used OpenMode.
2020-04-25BREAKING CHANGE: change order of args in Deno.copy() (#4885)Bartek Iwańczuk
2020-04-20refactor(cli/fmt_errors): Improve source line formatting (#4832)Nayeem Rahman
2020-04-19fix(core/js_errors): Get error's name and message from JS fields (#4808)Nayeem Rahman
2020-04-16feat(cli/installer.rs): Add DENO_INSTALL_ROOT (#4787)Nayeem Rahman
2020-04-16feat: support Deno namespace in Worker API (#4784)Bartek Iwańczuk
2020-04-16refactor(cli/js/ops/fs): Improve readdir() and FileInfo interfaces (#4763)Nayeem Rahman
2020-04-15Revert "test(inspector): add coverage test case (#4725)" (#4754)Ryan Dahl
Flaky and doesn't implement any features. This reverts commit a7a3a771a0a0cb2df2a14bcf4b8c38bc69525dd6.
2020-04-14test(inspector): add coverage test case (#4725)Bartek Iwańczuk