summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2023-03-24fix(ext/node): make cipher/decipher transform stream (#18408)Yoshiya Hinosawa
2023-03-24fix(ext/kv): add missing `getMany` method (#18410)Heyang Zhou
The `getMany` method was missing from the implementation of the `Deno.Kv` class. This patch fixes it.
2023-03-23refactor: make version and user_agent &'static str (#18400)Bartek Iwańczuk
These caused a bunch of unnecessary allocations on each startup.
2023-03-23fix(core): panic at build time if extension code contains anything other ↵Matt Mastracci
than 7-bit ASCII (#18372) This will improve diagnostics and catch any non-ASCII extension code early. This will use `debug_assert!` rather than `assert!` to avoid runtime costs, and ensures (in debug_assert mode only) that all extension source files are ASCII as we load them.
2023-03-23chore: forward v1.32.1 release commit to main (#18399)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-23fix(inspect): ensure non-compact output when object literal has newline in ↵David Sherret
entry text (#18366) Fixes `Deno.inspect` to make an object literal non-compact when an entry has multiple lines in it.
2023-03-23refactor(ext/node): Use Deno.inspect (#17960)Ryan Dahl
No need for two almost identical implementations of the same thing --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-03-22chore: update ext/ code to only use ASCII (#18371)Matt Mastracci
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-23chore(ext/kv): create basic README.md (#18370)Matt Mastracci
2023-03-221.32.0 (#18367)denobot
Bumped versions for 1.32.0 --------- Co-authored-by: mmastrac <mmastrac@users.noreply.github.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-03-22fix(ext/kv): reverse mapping between `AnyValue::Bool` and `KeyPart::Bool` ↵Heyang Zhou
(#18365) Previously the mapping between `AnyValue::Bool` and `KeyPart::Bool` was inverted. This patch also allows using the empty key `[]` as range start/end to `snapshot_read`.
2023-03-22Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)Ryan Dahl
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
2023-03-22refactor: rename Deno.openKv() to Deno.kv() (#18349)Ryan Dahl
2023-03-22fix(ext/kv): don't request permissions for ":memory:" (#18346)Nayeem Rahman
Currently `Deno.openKv(":memory:")` requests read+write permissions for `./:memory:` even though no file is read or written. Also added some guards for special sqlite paths that were unintentionally opted into.
2023-03-22feat(ext/kv): key-value store (#18232)Heyang Zhou
This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-21perf(core) Reduce script name and script code copies (#18298)Matt Mastracci
Reduce the number of copies and allocations of script code by carrying around ownership/reference information from creation time. As an advantage, this allows us to maintain the identity of `&'static str`-based scripts and use v8's external 1-byte strings (to avoid incorrectly passing non-ASCII strings, debug `assert!`s gate all string reference paths). Benchmark results: Perf improvements -- ~0.1 - 0.2ms faster, but should reduce garbage w/external strings and reduces data copies overall. May also unlock some more interesting optimizations in the future. This requires adding some generics to functions, but manual monomorphization has been applied (outer/inner function) to avoid code bloat.
2023-03-21feat: TypeScript 5.0.2 (except decorators) (#18294)David Sherret
This upgrades TypeScript to 5.0.2, but does not have ES decorator support because swc does not support that yet.
2023-03-21chore(ext/console): inspect anonymous function as `[Function (anonymous)]` ↵Yoshiya Hinosawa
(#18283) This PR changes the inspect result of anonymous functions from `[Function]` to `[Function (anonymous)]`. This behavior is aligned to `util.inspect` of Node.js.
2023-03-20feat(ext/net): Add multicasting APIs to DatagramConn (#10706) (#17811)Sam Gwilym
2023-03-20refactor(ext/node): untangle dependencies between js files (#18284)Bartek Iwańczuk
Moving some code around in `ext/node` is it's a bit better well defined and makes it possible for others to embed it. I expect to see no difference in startup perf with this change.
2023-03-20fix(ext/node): use Deno.Command from `ext:runtime` (#18289)Geert-Jan Zwiers
Fixes https://github.com/denoland/deno/issues/18281. This imports `Deno.Command` from `ext:runtime/40_process.js` instead of using `Deno[Deno.internal]?.nodeUnstable?.Command`.
2023-03-20refactor(ext/node): make initialization functions sync (#18282)Bartek Iwańczuk
These functions don't need to be async, as they are only calling synchronous JavaScript code. As a follow up, all 3 functions should be merge together - this will reduce roundtrips for calling V8 from Rust, which is somewhat expensive
2023-03-19chore: bump http to ^0.29.0 (#18259)Max
`http` is very stable, it's safe to "unpin" it from `=0.28.0` version. This helps embedders that depend on newer version of `http` crate.
2023-03-19fix(runtime): Extract error code for all OS error variants (#17958)Kamil Ogórek
2023-03-18Reland "perf(core): preserve ops between snapshots (#18080)" (#18272)Bartek Iwańczuk
Relanding 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4
2023-03-18perf(core): use static specifier in ExtensionFileSource (#18271)Bartek Iwańczuk
Relanding #18264 ------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-18Revert "perf(core): use static specifier in ExtensionFileSource (#182… ↵Bartek Iwańczuk
(#18270) …64)" This reverts commit 8af0c8351935ea7c6c0441055d5164908322c9d6. Causes bench stage to fail on CI.
2023-03-18Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)Bartek Iwańczuk
This reverts commit 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4.
2023-03-18perf(core): use static specifier in ExtensionFileSource (#18264)Divy Srivastava
Closes #18085 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-18fix(ext/node): add createDecipheriv (#18245)Yoshiya Hinosawa
2023-03-18perf(core): preserve ops between snapshots (#18080)Bartek Iwańczuk
This commit changes the build process in a way that preserves already registered ops in the snapshot. This allows us to skip creating hundreds of "v8::String" on each startup, but sadly there is still some op registration going on startup (however we're registering 49 ops instead of >200 ops). This situation could be further improved, by moving some of the ops from "runtime/" to a separate extension crates. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-17perf(core) Reduce copying and cloning in extension initialization (#18252)Matt Mastracci
Follow-up to #18210: * we are passing the generated `cfg` object into the state function rather than passing individual config fields * reduce cloning dramatically by making the state_fn `FnOnce` * `take` for `ExtensionBuilder` to avoid more unnecessary copies * renamed `config` to `options`
2023-03-17feat(core) deno_core::extension! macro to simplify extension registration ↵Matt Mastracci
(#18210) This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements: * `deno_core::ops!` registers a block of `#[op]`s, optionally with type parameters, useful for places where we share lists of ops * `deno_core::extension!` is used to register an extension, and creates two methods that can be used at runtime/snapshot generation time: `init_ops` and `init_ops_and_esm`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17chore: add tests for node:async_hooks (#18004)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17878 --------- Co-authored-by: crowlkats <crowlkats@toaxl.com>
2023-03-17chore(ext/console): add 'quotes' internal option to Deno.inspect (#18183)Yoshiya Hinosawa
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)Bartek Iwańczuk
Addresses feedback from https://github.com/denoland/deno/pull/18073#issuecomment-1471480385. Reverts changes to `FileInfo` fields that are not available on Windows making them `null`. Only `FileInfo.dev` is non-null.
2023-03-16chore: bump rusty_v8 to 0.65.0 (#18231)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-16fix(ext/node): resource leak in createHmac (#18229)Divy Srivastava
This commit fixes https://github.com/denoland/deno/issues/18140. Verified that test fails on `main`.
2023-03-16chore: forward v1.31.3 release commit to main (#18222)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2023-03-16fix(ext/node): implement "ascii" encoding for node:fs writeFile() (#18097)Farsen976
2023-03-16feat(fs): support FileInfo.dev on Windows (#18073)Bartek Iwańczuk
This commit adds support for retrieving `dev` information when stating files on Windows. Additionally `Deno.FileInfo` interfaces was changed to always return 0 for fields that we don't retrieve information for on Windows. Closes https://github.com/denoland/deno/issues/18053 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-03-15fix(ext/http): abort request signal when response errors (#17822)Timo Wilhelm
2023-03-15refactor: remove usages of `map_or` / `map_or_else` (#18212)David Sherret
These methods are confusing because the arguments are backwards. I feel like they should have never been added to `Option<T>` and that clippy should suggest rewriting to `map(...).unwrap_or(...)`/`map(...).unwrap_or_else(|| ...)` https://github.com/rust-lang/rfcs/issues/1025
2023-03-14refactor: deno_core not using std::env::current_dir (#18173)Bartek Iwańczuk
This commit changes "deno_core" to not rely on implicitly calling "std::env::current_dir()" when resolving module specifiers using APIs from "deno_core::modules_specifier". Supersedes https://github.com/denoland/deno/pull/15454
2023-03-14feat(ext/url): URLSearchParams.size (#17884)Lino Le Van
2023-03-14fix(ext/web): Stop using `globalThis.ReadableStream` in `Blob` (#18187)Kenta Moriuchi
2023-03-14fix(ext/node): add crypto.createCipheriv (#18091)Yoshiya Hinosawa
2023-03-13fix(ext/fs): retry if file already exists in makeTempFile (#17787)ud2
Closes #17781.
2023-03-13refactor(core): pass cwd explicitly to resolve_path (#18092)Bartek Iwańczuk
Towards landing #15454