summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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: Honor linter rules in CI and locally (#15492)Mathias Lafeldt
RUSTFLAGS take precedence over `target.<triple>.rustflags`. Therefore, setting the env var globally in CI would always override whatever linter rules are allowed or denied in .cargo/config.toml. With this change, we ensure that problems are detected both in CI and locally, using either cargo clippy or lint.js.
2022-08-19chore(bench): add flash router benchmarks (#15495)Divy Srivastava
2022-08-19perf(runtime): optimize Deno.file open & stream (#15496)Divy Srivastava
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-17refactor(fetch/request): use callback for url and method (#15483)Leo Kettmeir
2022-08-17docs: add category tag for built-in APIs (#15480)Kitson Kelly
2022-08-16feat(runtime): add pre_execute_module_cb (#15485)David Sherret
2022-08-16perf: improve performance.now (#15481)Ryan Dahl
2022-08-15chore(bench,test): list `.mts` under supported file extensions in cli docs ↵Geert-Jan Zwiers
(#15477)
2022-08-15docs: use `irm` instead of `iwr -useb` (#15474)迷渡
2022-08-15chore: upgrade rusty_v8 to 0.48.1 (#15310)Bartek Iwańczuk
2022-08-14fix(npm): handle storing non-all lowercase package names (#15470)David Sherret
2022-08-12fix(coverage): ensure coverage is only collected in certain situations (#15467)David Sherret
2022-08-12docs(cli/dts): fix typo (#15457)Roj
2022-08-11chore(ext/node): correct publishing for ext/node (#15461)David Sherret
2022-08-11refactor(cli): consolidate most MainWorker related code to the same place ↵David Sherret
(#15459)
2022-08-11chore: forward v1.24.3 release commit to main (#15462)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11refactor(ext/node): remove several TODOs (#15452)Bartek Iwańczuk
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-11chore: move lint rules to cargo config for better editor integration (#15453)Mathias Lafeldt
2022-08-11refactor(core): unwrap sync ops in rust (#15449)Nayeem Rahman
2022-08-10refactor(runtime): split up `MainWorker` and `WebWorker`'s `preload_module` ↵David Sherret
method into two separate methods (#15451)
2022-08-11fix(cli): allow configurations files to also be json modules (#15444)Nayeem Rahman
Closes #15440
2022-08-10feat: add initial internal npm client and dependency resolver (#15446)David Sherret
2022-08-10fix(permissions): ignore empty values (#15447)Leo Kettmeir
2022-08-10fix: allow setting `globalThis.location` when no `--location` is provided ↵Kayla Washburn
(#15448)
2022-08-10feat(core): Add support for async ops in realms (#14734)Andreu Botella
Pull request #14019 enabled initial support for realms, but it did not include support for async ops anywhere other than the main realm. The main issue was that the `js_recv_cb` callback, which resolves promises corresponding to async ops, was only set for the main realm, so async ops in other realms would never resolve. Furthermore, promise ID's are specific to each realm, which meant that async ops from other realms would result in a wrong promise from the main realm being resolved. This change creates a `ContextState` struct, similar to `JsRuntimeState` but stored in a slot of each `v8::Context`, which contains a `js_recv_cb` callback for each realm. Combined with a new list of known realms, which stores them as `v8::Weak<v8::Context>`, and a change in the `#[op]` macro to pass the current context to `queue_async_op`, this makes it possible to send the results of promises for different realms to their realm, and prevent the ID's from getting mixed up. Additionally, since promise ID's are no longer unique to the isolate, having a single set of unrefed ops doesn't work. This change therefore also moves `unrefed_ops` from `JsRuntimeState` to `ContextState`, and adds the lengths of the unrefed op sets for all known realms to get the total number of unrefed ops to compare in the event loop. Co-authored-by: Luis Malheiro <luismalheiro@gmail.com>
2022-08-10feat(repl): add color to functions for syntax highlighting (#15434)sigmaSd
2022-08-10fix(task): subcommand parser skips global args (#15297)Cre3per
2022-08-10fix(ext/ffi): unstable op_ffi_unsafe_callback_ref (#15439)Luca Casonato
2022-08-09chore: temporarily disable `ext/node` and use unstable ops (#15438)David Sherret
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-08chore: make the start_release workflow go faster (#15416)David Sherret
2022-08-08chore(ext/ffi): remove flaky test (#15426)Divy Srivastava
2022-08-06chore: use gist for release instruction checklist (#15414)David Sherret
2022-08-05fix: various formatting fixes (#15412)David Sherret
2022-08-05feat(ext/ffi): Add static method variants to Deno.UnsafePointerView (#15146)Aapo Alasuutari
2022-08-05fix(ext/ffi): Check CStr for UTF-8 validity on read (#15318)Aapo Alasuutari
Co-authored-by: Phosra <phosra@tutanota.com>
2022-08-05feat(ext/fetch): Add socks proxy support (#15372)SahAssar
2022-08-05chore(tools): update wpt setup to new spawn api (#15407)Nayeem Rahman
2022-08-05chore: forward v1.24.2 release commit to main (#15410)denobot
2022-08-04fix(test): output parallel test results independently (#15399)Nayeem Rahman
2022-08-04fix: increase websocket message size (#15406)Leo Kettmeir
2022-08-04fix(vendor): existing import map with bare specifier in remote (#15390)David Sherret