summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2021-10-30fix(cli): linter/formater watches current directory without args (#12550)Zheyu Zhang
2021-10-30fix(cli): lint/format all discoverd files on each change (#12518)Zheyu Zhang
2021-10-29fix(runtime): require full read and write permissions to create symlinks ↵David Sherret
(#12554)
2021-10-29feat: stabilize Deno.startTls (#12581)Luca Casonato
This commit stabilizes `Deno.startTls` and removes `certFile` from the `StartTlsOptions`.
2021-10-29refactor(lsp): use deno_graph and single document struct (#12535)Kitson Kelly
Closes #12473
2021-10-28feat(compat): integrate import map and classic resolutions in ESM resolution ↵Bartek Iwańczuk
(#12549) This commit integrates import map and "classic" resolutions in the "--compat" mode when using ES modules; in effect "http:", "https:" and "blob:" imports now work in compat mode. The algorithm works as follows: 1. If there's an import map, try to resolve using it and if succeeded return the specifier 2. Try to resolve using "Node ESM resolution", and if succeeded return the specifier 3. Fall back to regular ESM resolution
2021-10-28feat(cli): enable `useUnknownInCatchVariables` by default (#12547)Kitson Kelly
Closes #11826 **BREAKING CHANGE** this behaviour was disable when introduced in Deno 1.14/TypeScript 4.4. It will highlight code that unsafely handles variables that are caught, and will cause type errors in unsafe code.
2021-10-27fix(cli): no-check respects inlineSources compiler option (#12559)Kitson Kelly
Fixes #12064
2021-10-27feat(ext/webstorage): use implied origin when --location not set (#12548)Kitson Kelly
Closes #11882 BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
2021-10-26fix(ext/http): allow multiple values in upgrade header for websocket (#12551)Leo K
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2021-10-26feat(ext/net): add TlsConn.handshake() (#12467)Bert Belder
A `handshake()` method was added that returns when the TLS handshake is complete. The `TlsListener` and `TlsConn` interfaces were added to accomodate this new method. Closes: #11759.
2021-10-26feat(runtime): add Deno.addSignalListener API (#12512)Yoshiya Hinosawa
2021-10-26fix(cli): do not cache emit when diagnostics present (#12541)Kitson Kelly
Fixes #12471
2021-10-25fix(tls): Make TLS clients support HTTP/2 (#12530)Andreu Botella
`fetch()` and client-side websocket used to support HTTP/2, but this regressed in #11491. This patch reenables it by explicitly adding `h2` and `http/1.1` to the list of ALPN protocols on the HTTP and websocket clients.
2021-10-21fix: declare web types as global (#12497)Bartek Iwańczuk
Co-authored-by: Feng Yu <F3n67u@outlook.com>
2021-10-21compat: add DENO_NODE_COMPAT_URL env variable (#12508)Bartek Iwańczuk
2021-10-20fix(ext/net): fix TLS bugs and add 'op_tls_handshake' (#12501)Bert Belder
A bug was fixed that could cause a hang when a method was called on a TlsConn object that had thrown an exception earlier. Additionally, a bug was fixed that caused TlsConn.write() to not completely flush large buffers (>64kB) to the socket. The public `TlsConn.handshake()` API is scheduled for inclusion in the next minor release. See https://github.com/denoland/deno/pull/12467.
2021-10-19fix(core/bindings): use is_instance_of_error() instead of is_native_error() ↵Nayeem Rahman
(#12479)
2021-10-19fix(cli/tests): flaky Deno.watchFs() tests (#12485)Nayeem Rahman
2021-10-18feat(unstable): Node CJS and ESM resolvers for compat mode (#12424)Bartek Iwańczuk
This commit adds CJS and ESM Node resolvers to the "--compat" mode. The functionality is spread across "cli/compat" module and Node compatibility layer in "deno_std/node"; this stems from the fact that ES module resolution can only be implemented in Rust as it needs to directly integrated with "deno_core"; however "deno_std/node" already provided CJS module resolution. Currently this resolution is only active when running a files using "deno run --compat --unstable <filename>", and is not available in other subcommands, which will be changed in follow up commits.
2021-10-18fix(cli/fmt_errors): don't panic on source line formatting errors (#12449)Nayeem Rahman
Returns empty values in case of errors, source lines are non-essential anyway. These errors can happen e.g. when source files change at runtime. A warning is also printed to help us track when it happens in unexpected cases besides this.
2021-10-17fix(core): poll async ops eagerly (#12385)Bert Belder
Currently all async ops are polled lazily, which means that op initialization code is postponed until control is yielded to the event loop. This has some weird consequences, e.g. ```js let listener = Deno.listen(...); let conn_promise = listener.accept(); listener.close(); // `BadResource` is thrown. A reasonable error would be `Interrupted`. let conn = await conn_promise; ``` JavaScript promises are expected to be eagerly evaluated. This patch makes ops actually do that.
2021-10-17chore(cli/tests): fix flaky fs watcher tests (#12385)Bert Belder
On OS X, the watcher sometimes witnesses the creation of it's own root directory. Creating that directory using a sync op instead of an async op sidesteps the issue.
2021-10-14fix(cli): re-enable allowSyntheticDefaultImports for tsc (#12435)Kitson Kelly
Fixes #12434
2021-10-14fix(cli/tests): move worker test assertions out of message handlers (#12439)Nayeem Rahman
2021-10-14fix(console): fix display of primitive wrapper objects (#12425)Kenta Moriuchi
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-13chore: test for bundling export specifier with alias (#12421)David Sherret
2021-10-13chore: fix flaky steps_invalid_usage tests (#12422)David Sherret
2021-10-12feat(ext/crypto): implement deriveKey (#12117)Divy Srivastava
2021-10-12fix(lsp): lint diagnostics respect config file (#12338)Bartek Iwańczuk
This commit fixes problem with LSP where diagnostics coming from "deno lint" don't respect configuration file. LSP was changed to store "Option<ConfigFile>", "Option<LintConfig>" and "Option<FmtConfig>" on "Inner"; as well as storing "Option<LintConfig>" and "Option<FmtConfig>" on "StateSnapshot". Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-10-11perf(webidl): inline ResponseInit converter (#12285)Aaron O'Mullan
2021-10-11feat(compat): pin specific version of std/node (#12396)Bartek Iwańczuk
2021-10-11fix(runtime): Declare `Window.self` and `DedicatedWorkerGlobalScope.name` ↵Andreu Botella
with `util.writable()` (#12378) `Window`'s `self` property and `DedicatedWorkerGlobalScope`'s `name` property are defined as Web IDL read-only attributes with the `[Replaceable]` extended attribute, meaning that their setter will redefine the property as a data property with the set value, rather than changing some internal state. Deno currently defines them as read-only data properties instead. Given that Web IDL requires all attributes to be accessor properties rather than data properties, but Deno exposes almost all of those properties as either read-only or writable data properties, it makes sense to expose `[Replaceable]` properties as writable as well – as is already the case with `WindowOrWorkerGlobalScope`'s `performance` property.
2021-10-11fix(http): don't expose body on GET/HEAD requests (#12260)Luca Casonato
GET/HEAD requests can't have bodies according to `fetch` spec. This commit changes the HTTP server to hide request bodies for requests with GET or HEAD methods.
2021-10-11feat: provide ops details for ops sanitizer failures (#12188)Casper Beyer
2021-10-11feat(ext/crypto): implement AES-CBC encryption & decryption (#12123)Divy Srivastava
* initial stuff * stuff * merge stuff * cleanup * fmt * length * update lockfile * decrypt * fixy * clippy hello? * hmm * fixs * fix lint * add AesCbcParams * fixes * fixy * lockfile fixy * fix dumb assertions * re run CI * rerun CI * rerun CI
2021-10-11feat(unstable/test): imperative test steps API (#12190)David Sherret
2021-10-11feat(runtime): improve error messages of runtime fs (#11984)Feng Yu
This commit annotates errors returned from FS Deno APIs to include paths that were passed to the API calls. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-10-11refactor: integrate deno_graph into CLI (#12369)Kitson Kelly
2021-10-10feat: Show the URL of streaming WASM modules in stack traces (#12268)Andreu Botella
WebAssembly modules compiled through `WebAssembly.compile()` and similar non-streaming APIs don't have a URL associated to them, because they have been compiled from a buffer source. In stack traces, V8 will use a URL such as `wasm://wasm/d1c677ea`, with a hash of the module. However, wasm modules compiled through streaming APIs, like `WebAssembly.compileStreaming()`, do have a known URL, which can be obtained from the `Response` object passed into the streaming APIs. And as per the developer-facing display conventions in the WebAssembly Web API spec, this URL should be used in stack traces. This change implements that.
2021-10-10feat: Stabilize Deno.kill and Deno.Process.kill (#12375)Ryan Dahl
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-10-10test: remove duplicate import (#12374)Feng Yu
2021-10-10feat: stabilize Deno.resolveDns (#12368)Satya Rohith
2021-10-10feat(ext/net): relevant errors for resolveDns (#12370)Satya Rohith
2021-10-08feat(ext/crypto): implement deriveBits for ECDH (p256) (#11873)Divy Srivastava
2021-10-08feat(compat): inject Node globals in REPL (#12352)Bartek Iwańczuk
2021-10-07tests: make worker test deterministic (#12361)Nayeem Rahman
2021-10-07feat(core): cleaner opcall stack traces (#12358)Aaron O'Mullan
2021-10-07fix(runtime): don't equate SIGINT to SIGKILL on Windows (#12356)Bert Belder