summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-03fix(dts): make globals available on globalThis (#19438)ud2
This PR changes Web IDL interfaces to be declared with `var` instead of `class`, so that accessing them via `globalThis` does not raise type errors. Closes #13390.
2023-07-03feat(lsp): support import maps in quick fix and auto-imports (#19692)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/849 Closes #15330 Closes #10951 Closes #13623
2023-07-03fix(ext/http): Catch errors in eager stream timeout to avoid uncaught ↵Matt Mastracci
promise rejections (#19691) Fixes #19687 by adding a rejection handler to the write inside the setTimeout. There is a small window where the promise is actually not awaited and may reject without a handler.
2023-07-03fix: Update typings for Deno.errors namespace (#19688)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/19514, where I forgot to update type declarations.
2023-07-02fix(ext/node): ignore cancelled timer when node timer refresh (#19637)await-ovo
For timers that have already executed clearTimeout, there is no need to recreate a new timer when refresh is executed again.
2023-07-02refactor: rename built-in node modules from ext:deno_node/ to node: (#19680)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19510
2023-07-02feat: ReadableStream.from (#19446)Leo Kettmeir
Closes #19417
2023-07-02feat(ext/url): URLSearchParams two-argument delete() and has() (#19654)Lino Le Van
2023-07-02feat(ext/fetch): add Headers#getSetCookie (#13542)Luca Casonato
Spec change: https://github.com/whatwg/fetch/pull/1346 Tests: https://github.com/web-platform-tests/wpt/pull/31442 (ran against this PR and they all pass) --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-02test: ignore fmt_check_all_files_on_each_change_test (#19682)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/19629
2023-07-01fix(npm): handle more reserved words as cjs exports (#19672)David Sherret
Closes #19665
2023-07-02build: remove stale benchmark (#19681)Bartek Iwańczuk
With https://github.com/denoland/deno/pull/19658 we can't bench it anymore.
2023-07-02feat(lsp): basic support of auto-imports for npm specifiers (#19675)David Sherret
Closes #19625 Closes https://github.com/denoland/vscode_deno/issues/857
2023-07-02refactor(core): Extract deno_core (#19658)Matt Mastracci
`deno_core` is moving out! You'll find it at https://github.com/denoland/deno_core/ once this PR lands.
2023-07-02Reland "fix(cli): don't store blob and data urls in the module cache" (#18581)Nayeem Rahman
Relands #18261 now that https://github.com/lucacasonato/esbuild_deno_loader/pull/54 is landed and used by fresh. Fixes #18260.
2023-07-02refactor(core): don't use extension macro for core js (#19616)Nayeem Rahman
Seems like too much of a special case because `init_cbs()` needs to be called right after them. Removes the `Extension::is_core` stuff.
2023-07-01refactor(ops): op2 supports strings in argument and return position (#19613)Matt Mastracci
Support strings (&str, String, and Cow) in the argument position and String in the return position. Avoids copies where possible, though this is not always something we can do.
2023-07-01chore: upgrade rusty_v8 to 0.74.1 (#19677)Bartek Iwańczuk
2023-07-01fix(ext/kv): expose Deno.AtomicOperation (#19674)Luca Casonato
2023-06-30fix(npm): support siblings that are peer dependencies of each other (#19657)David Sherret
https://github.com/denoland/deno_npm/pull/20
2023-06-30test(ext/node): add perf_hooks test (#19648)Hans
2023-06-30test(ext/node): added unit test for net node modules compat from std (#19663)Kaique da Silva
2023-06-30test(ext/node): added assertion errors test (#19609)Kaique da Silva
2023-06-30fix(node/http): add setKeepAlive to FakeSocket (#19659)Leo Kettmeir
Closes #19535
2023-06-29chore: upgrade Rust to 1.70 and libffi-sys to 2.3.0 (#19639)Matt Mastracci
Bump: - Rust -> 1.7.0 - libffi-sys -> 2.3.0 LLVM version won't change often, but it's slightly easier to edit now.
2023-06-29chore: upgrade rusty_v8 to 0.74.0 (#19633)Bartek Iwańczuk
2023-06-29fix(core): consistent extension source resolution (#19615)Nayeem Rahman
Currently the resolution for extension sources is different depending on whether `include_js_files_for_snapshotting` is enabled. If sources are embedded it uses `include_str!()` which is module-relative. If sources are read at runtime paths are joined to `CARGO_MANIFEST_DIR` and are package-relative. This makes them both package-relative. Fixes `cargo run -p deno_runtime --example extension_with_esm --features include_js_files_for_snapshotting`.
2023-06-29fix: add `exactOptionalPropertyTypes` for configuration file JSON schema ↵scarf
(#19647) - fixes #19646 lines copied from: https://github.com/SchemaStore/schemastore/blob/8513fdcc29f89a3b864bd712e6fdd78a6691884f/src/schemas/json/tsconfig.json#L281-L286
2023-06-29refactor(ops): op2 support for generics (#19636)Matt Mastracci
Implementation of generics for `#[op2]`, along with some refactoring to improve the ergonomics of ops with generics parameters: - The ops have generics on the struct rather than the associated methods, which allows us to trait-ify ops (impossible when they are on the methods) - The decl() method can become a trait-associated const field which unlocks future optimizations Callers of ops need to switch from: `op_net_connect_tcp::call::<TestPermission>(conn_state, ip_addr)` to `op_net_connect_tcp::<TestPermission>::call(conn_state, ip_addr)`.
2023-06-29fix(core): Ensure we don't lose the waker when polling an empty JoinSet (#19655)Matt Mastracci
This is a reproduction and fix for a very obscure bug where the Deno runtime locks up we end up polling an empty JoinSet and attempt to resolve ops after-the-fact. There's a small footgun in the JoinSet API where polling it while empty returns Ready(None), which means that it never holds on to the waker. This means that if we aren't testing for this particular return value and don't stash the waker ourselves for a future async op to eventually queue, we can end up losing the waker entirely and the op wakes up, notifies tokio, which notifies the JoinSet, which then has nobody to notify 😢. Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-29fix(ext/websocket): Ensure that errors are available after async response ↵Matt Mastracci
returns (#19642) Fixes the WPT tests that test w/invalid codes. Also explicitly ignoring some h2 tests to hopefully prevent flakes. The previous changes to WebSocketStream introduced a bug where the close errors were not made available if the `pull` method was re-entrant.
2023-06-28fix(console): correct the parseCssColor algorithm (#19645)Nicholas Berlette
This is a fix for issue #19644, concerning the `parseCssColor` function in the file `ext/console/01_console.js`. Changes made on lines 2756-2758. To sum it up: > The internal `parseCssColor` function currently parses 3/4-digit hex colors incorrectly. For example, it parses the string `#FFFFFF` as `[255, 255, 255]` (as expected), but returns `[240, 240, 240]` for `#FFF`, when it should return the same triplet as the former. While it's not going to cause a fatal runtime error, it did bug me enough to fix it real quick.
2023-06-29feat: add more Deno.errors classes (#19514)Bartek Iwańczuk
This commit adds following new error classes: - `Deno.errors.NotADirectory` - `Deno.errors.FilesystemLoop` - `Deno.errors.IsADirectory` - `Deno.errors.NetworkUnreachable` Closes https://github.com/denoland/deno/issues/19408
2023-06-28chore: Don't reconfigure storage on XL runners (#19641)Matt Mastracci
2023-06-28fix(test_ffi): thread_safe_callback is flaky (#19640)Aapo Alasuutari
Attempts to fix the thread_safe_callback flakiness. It's unclear what the flake is about, the exit code is apparently `C0000005` or `ACCESS_VIOLATION`, pointing to an issue with memory access. My only guess is that maybe dropping the `Option<extern "C" fn ()>` is somehow checking the validity of the function pointer and since the function has been dropped, the pointer is no longer valid and sometimes points to memory that should not be accessed. So now the will explicitly drop the functions before they get deallocated. If this doesn't fix the flake then something beyond my understanding is wrong.
2023-06-28chore: reconfigure windows builder storage (#19601)Matt Mastracci
Use `C:` drive to build on Windows, as `D:` is too limited.
2023-06-28fix(console): add assert function (#19635)Leo Kettmeir
2023-06-28fix(cli): Fix the bug where the command description is not displayed. (#19604)nasa
2023-06-27chore: update deno_lint to 0.48.0 (#19619)Bartek Iwańczuk
2023-06-27fix(kv): assertReject should always be awaited (#19612)Heyang Zhou
2023-06-27fix: lint on main branch (#19622)Bartek Iwańczuk
2023-06-27chore(ext/node): disable prefer-primordials on a per-file basis (#19553)Kenta Moriuchi
2023-06-27test(ext/node): port crypto_test.ts from deno_std (#19561)Felipe Baltor
2023-06-26feat(lock): skip saving declaration files in the lockfile (#19447)David Sherret
This is also a performance improvement because declaration file hashes don't need to be stored in the lockfile. Closes #19444
2023-06-26chore: Ensure copyright line is the first in the file (#19608)Matt Mastracci
The copyright checker was allowing files with code above the copyright line in a few places, mainly as a result of IDEs ordering imports improperly. This makes the check more robust, and adds a whitelist of valid lines that may appear before the copyright line.
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-26Revert "Reland "refactor(core): cleanup feature flags for js source i… ↵Bartek Iwańczuk
(#19611) …nclusion" (#19519)" This reverts commit 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2. This change causes failures when used outside Deno repo: ``` ============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: linux x86_64 Version: 1.34.3+b37b286 Args: ["/opt/hostedtoolcache/deno/0.0.0-b37b286f7fa68d5656f7c180f6127bdc38cf2cf5/x64/deno", "test", "--doc", "--unstable", "--allow-all", "--coverage=./cov"] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to read "/home/runner/work/deno/deno/core/00_primordials.js" Caused by: No such file or directory (os error 2)', core/runtime/jsruntime.rs:699:8 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2023-06-26test(ext/node): add fs read unit tests (#19588)Kaique da Silva
2023-06-26fix(ext/node): remove path.toFileUrl (#19536)Ryan Clements
2023-06-25fix(ops): quoting serde_v8::Value (#19593)Kangwook Lee (이강욱)
The following code: ```rust use deno_core::op; #[op] fn ops_serde_v8(value: serde_v8::Value) { // } fn main() { // } ``` ...with the following `Cargo.toml`: ```toml [package] name = "playground" version = "0.1.0" edition = "2021" [dependencies] deno_core = "0.191.0" serde_v8 = "0.102.0" ``` ...will not compile with the error: ``` error[E0433]: failed to resolve: use of undeclared crate or module `v8` --> src/main.rs:3:1 | 3 | #[op] | ^^^^^ use of undeclared crate or module `v8` | = note: this error originates in the attribute macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) ``` This PR is fixing the above issue by properly quoting `deno_core::v8::Value` instead of `v8::Value`.