summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2022-08-24fix(unstable): various resolution bugs for npm: specifiers (#15546)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-24feat(ext/flash): split upgradeHttp into two APIs (#15557)Luca Casonato
This commit splits `Deno.upgradeHttp` into two different APIs, because the same API is currently overloaded with two different functions. Flash requests upgrade immediately, with no need to return a `Response` object. Instead you have to manually write the response to the socket. Hyper requests only upgrade once a `Response` object has been sent. These two behaviours are now split into `Deno.upgradeHttp` and `Deno.upgradeHttpRaw`. The latter is flash only. The former only supports hyper requests at the moment, but can be updated to support flash in the future. Additionally this removes `void | Promise<void>` as valid return types for the handler function. If one wants to use `Deno.upgradeHttpRaw`, they will have to type cast the handler signature - the signature is meant for the 99.99%, and should not be complicated for the 0.01% that use `Deno.upgradeHttpRaw()`.
2022-08-23feat(npm): support packages with multiple command names (#15565)David Sherret
2022-08-24feat: update `Deno.serve` function signature (#15563)Luca Casonato
This commit changes the `Deno.serve` function signature to be more versatile and easier to use. It is now a drop in replacement for std/http's `serve`. The input validation has also been reworked.
2022-08-23feat: binary npm commands (#15542)David Sherret
2022-08-23fix(cache): do not attempt to emit non-emitable files (#15562)David Sherret
2022-08-23fix(ext/fetch): ignore user content-length header (#15555)Luca Casonato
Previously if a user specified a content-length header for an POST request without a body, the request would contain two `content-length` headers. One added by us, and one added by the user. This commit ignores all content-length headers coming from the user, because we need to have the sole authority on the content-length because we transmit the body.
2022-08-22feat(unstable): Respect --cached-only flags for npm: specifiers (#15512)Bartek Iwańczuk
This commit changes "npm:" specifier handling to respect "--cached-only" flags and adds "Download" messages for npm registry api calls. Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-22fix(ext/flash): fix default onListen callback (#15533)Yoshiya Hinosawa
2022-08-21fix(unstable): better error for invalid hostname in Deno.serve() (#15529)Bartek Iwańczuk
2022-08-21feat: `queueMicrotask()` error handling (#15522)Nayeem Rahman
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158).
2022-08-21fix(ext/flash): fix listening port (#15519)Yoshiya Hinosawa
2022-08-21fix(core/runtime): always cancel termination in exception handling (#15514)Nayeem Rahman
2022-08-20feat(unstable): initial support for npm specifiers (#15484)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20feat: add "deno init" subcommand (#15469)Leo Kettmeir
This adds an init subcommand to that creates a project starter similar to cargo init. ``` $ deno init my_project Project initialized Run these commands to get started: cd my_project deno run main.ts deno run main_test.ts $ deno run main.ts Add 2 + 3 5 $ cat main.ts export function add(a: number, b: number): number { return a + b; } if (import.meta.main) { console.log("Add 2 + 3", add(2, 3)); } $ cat main_test.ts import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts"; import { add } from "./main.ts"; Deno.test(function addTest() { assertEquals(add(2, 3), 5); }); ``` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-19feat(unstable): change Deno.serve() API (#15498)Bartek Iwańczuk
- Merge "Deno.serve()" and "Deno.serveTls()" API - Remove first argument and use "fetch" field options instead - Update type declarations - Add more documentation
2022-08-19fix(ext/flash): concurrent response streams (#15493)Divy Srivastava
2022-08-18feat(ext/flash): An optimized http/1.1 server (#15405)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-17docs: add category tag for built-in APIs (#15480)Kitson Kelly
2022-08-15chore: upgrade rusty_v8 to 0.48.1 (#15310)Bartek Iwańczuk
2022-08-12fix(coverage): ensure coverage is only collected in certain situations (#15467)David Sherret
2022-08-11perf(ops): Monomorphic sync op calls (#15337)Aapo Alasuutari
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params). Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple: ``` opSync("op_foo", param1, param2); // -> turns to ops.op_foo(param1, param2); ``` This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path. Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11fix(cli): allow configurations files to also be json modules (#15444)Nayeem Rahman
Closes #15440
2022-08-10fix: allow setting `globalThis.location` when no `--location` is provided ↵Kayla Washburn
(#15448)
2022-08-09chore: temporarily disable `op_require_read_file` (#15433)David Sherret
2022-08-10fix: update deno_graph to fix importing config as JSON module (#15388)Kitson Kelly
Ref: denoland/deno_graph#166
2022-08-09feat: add ext/node for require support (#15362)Bartek Iwańczuk
This commit adds "ext/node" extension that implementes CommonJS module system. In the future this extension might be extended to actually contain implementation of Node compatibility layer in favor of "deno_std/node". Currently this functionality is not publicly exposed, it is available via "Deno[Deno.internal].require" namespace and is meant to be used by other functionality to be landed soon. This is a minimal first pass, things that still don't work: support for dynamic imports in CJS conditional exports
2022-08-04fix(test): output parallel test results independently (#15399)Nayeem Rahman
2022-08-02fix(test): race condition for cancelled tests (#15233)Nayeem Rahman
2022-08-02fix(lsp): use correct commit chars for completions (#15366)Kitson Kelly
Fixes: #15252
2022-07-30fix(core): BorrowMutError in nested error (#15352)Bartek Iwańczuk
2022-07-23feat(ext/crypto): deriveBits P-384 (#15138)diachedelic
This commit adds P-384 curve support for crypto.subtle.deriveBits. Co-authored-by: James Diacono <james@diacono.com.au>
2022-07-23fix: unhandledrejection handling for sync throw in top level (#15279)Bartek Iwańczuk
Fixes an edge in "unhandledrejection" event that prevent synchronous errors being surfaced when throw from a top-level scope.
2022-07-22fix: Child.unref() unrefs stdio streams properly (#15275)Bartek Iwańczuk
2022-07-21fix: proper typings for unhandledrejection event (#15271)Bartek Iwańczuk
2022-07-21fix(cli): unset jsxFragmentFactory & jsxFactory options (#15264)Satya Rohith
2022-07-20feat(test): add `--parallel` flag, soft deprecate `--jobs` (#15259)David Sherret
Co-authored-by: mrkldshv <markladyshev@gmail.com>
2022-07-20Reland "feat: add "unhandledrejection" event support" (#15211)Bartek Iwańczuk
2022-07-20chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options ↵Nayeem Rahman
(#15202)
2022-07-20chore: use import.meta.resolve() in tests (#15256)Bartek Iwańczuk
2022-07-20fix(task): resolve deno configuration file first from specified `--cwd` arg ↵David Sherret
(#15257)
2022-07-20chore: align some Web API type definitions to lib.dom.d.ts (#15219)ayame113
2022-07-20fix(ext/web): align DOMException better with spec (#15097)Phosra
2022-07-20chore(ext): update webgpu (#15059)Dante Issaias
2022-07-19feat: emit files on demand and fix racy emit (#15220)David Sherret
2022-07-18fix: WebSocketStream ping event causes pending promises (#15235)Leo Kettmeir
2022-07-18feat(unstable): Ability to ref/unref "Child" in "Deno.spawnChild()" API (#15151)Leo Kettmeir
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-18feat(cli): support configuring the test tool in the config file (#15079)Roj
2022-07-18feat: import.meta.resolve() (#15074)Bartek Iwańczuk
This commit adds new "import.meta.resolve()" API which allows to resolve specifiers relative to the module the API is called in. This API supports resolving using import maps.
2022-07-18chore: fix flaky captured_output (#15234)David Sherret