summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2020-05-25Add more tests for fetch response body (#5852)Marcos Casagrande
2020-05-25fix(cli/web/fetch): Make Response constructor standard (#5787)Marcos Casagrande
2020-05-25fix: Allow ArrayBuffer as Fetch request body (#5831)Marcos Casagrande
2020-05-25fix: BorrowMutError when evaluating expression in inspector console (#5822)Bert Belder
Note that this does not fix the 'Uncaught ReferenceError' issue that happens when 'eager evaluation' is enabled in the inspector. Fixes: #5807
2020-05-25test: add utility function for assigning unique port to inspector (#5822)Bert Belder
2020-05-24Re-enable several fetch tests (#5803)Andrew Mitchell
2020-05-23fix: TSX analysis in module graph loader (#5785)Bartek Iwańczuk
2020-05-22fix: SWC lexer settings and silent errors (#5752)Bartek Iwańczuk
This commit changes how error occurring in SWC are handled. Changed lexer settings to properly handle TS decorators. Changed output of SWC error to annotate with position in file.
2020-05-22fix: ts type imports (#5733)Bartek Iwańczuk
2020-05-22fix: redirects handling in module analysis (#5726)Bartek Iwańczuk
This commit fixes a bug introduced in #5029 that caused bad handling of redirects during module analysis. Also ensured that duplicate modules are not downloaded.
2020-05-21fix: --inspect flag working like --inspect-brk (#5697)Bartek Iwańczuk
2020-05-21ci: Errors in benchmarks should fail CI (#5422)Colin Harrington
2020-05-21fix: disallow http imports for modules loaded over https (#5680)Bartek Iwańczuk
2020-05-20fix: streams hwm validation (#5681)Marcos Casagrande
2020-05-20move js unit tests to cli/tests (#5678)Ryan Dahl
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