summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-08refactor: prefix ops w/ crate they are defined in (#19044)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-08refactor(core): make sure to always set embedder wrapper offset (#19048)Bartek Iwańczuk
2023-05-08refactor(core): verify there are no ops with duplicate names (#19047)Bartek Iwańczuk
This commit adds a "debug build" only check that verifies on startup that there are no duplicate ops (ie. the op names are unique).
2023-05-09Revert "perf(core): use jemalloc for V8 array buffer allocator (#18875)" ↵Bartek Iwańczuk
(#19046) This reverts commit 022aae9854bed6219d75eeb82fcf46652c21050d.
2023-05-08refactor(ext/fs): `deno_fs::FileSystem` - conditional `Send + Sync` (#18993)David Sherret
This allows for having a conditional `Send + Sync` on the file system trait for Deploy.
2023-05-08perf(ext/ffi): Use `Box<[NativeType]>` in CallbackInfo parameters (#19032)Aapo Alasuutari
2023-05-08fix(ext/http): Ensure Deno.serve works across --watch restarts (#18998)Matt Mastracci
Fixes #16699 and #18960 by ensuring that we release our HTTP `spawn_local` tasks when the HTTP resource is dropped. Because our cancel handle was being projected from the resource via `RcMap`, the resource was never `Drop`ped. By splitting the handle out into its own `Rc`, we can avoid keeping the resource alive and let it drop to cancel everything.
2023-05-08fix(core): always report the first error on unhandled rejection (#18992)ud2
The root cause of denoland/deno_std#3320, I believe, is that `pending_promise_rejections` is a `HashMap` whose entries are in arbitrary order, and as a result either of the two errors (`AddrInUse` and `TypeError`) may be selected when determining which one to report. I changed the field to a `VecDeque` so that the first error (`AddrInUse` in this case) is always selected.
2023-05-07chore: lint ext/fs/std_fs.rs (#19036)Bartek Iwańczuk
2023-05-07fix(ext/ffi): Callbacks panic on returning isize (#19022)Aapo Alasuutari
2023-05-07fix(ext/ffi): UnsafeCallback can hang with 'deno test' (#19018)Aapo Alasuutari
2023-05-06refactor(core): remove run_in_task helper, use tokio::test macro (#19009)Bartek Iwańczuk
2023-05-05refactor(ext/node): combine `deno_node::Fs` with `deno_fs::FileSystem` (#18991)David Sherret
2023-05-04refactor(ext/fs): boxed deno_fs::FileSystem (#18945)David Sherret
1. Boxed `File` and `FileSystem` to allow more easily passing this through the CLI code (as shown within this pr). 2. `StdFileResource` is now `FileResource`. `FileResource` now contains an `Rc<dyn File>`.
2023-05-04chore: forward v1.33.2 release commit to main (#18990)denobot
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED** This is the release commit being forwarded back to main for 1.33.2 Please ensure: - [x] Everything looks ok in the PR - [x] The release has been published To make edits to this PR: ```shell git fetch upstream forward_v1.33.2 && git checkout -b forward_v1.33.2 upstream/forward_v1.33.2 ``` Don't need this PR? Close it. cc @levex Co-authored-by: levex <levex@users.noreply.github.com> Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-04docs: update Deno.Writer docstring (#18987)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/18985#issuecomment-1534493623
2023-05-04refactor(ext/node): remove NodeEnv trait (#18986)Luca Casonato
2023-05-04fix(npm): canonicalize search directory when looking for package.json (#18981)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-05-04fix(core): allow esm extensions not included in snapshot (#18980)Nayeem Rahman
Fixes #18979. This changes the predicate for allowing `ext:` specifier resolution from `snapshot_loaded_and_not_snapshotting` to `ext_resolution_allowed` which is only set to true during the extension module loading phase. Module loaders as used in core are now declared as `ExtModuleLoader` rather than `dyn ModuleLoader`.
2023-05-03fix(test): disable preventDefault() for beforeunload event (#18911)Nayeem Rahman
Fixes #18910.
2023-05-03fix(ext/kv): throw on the Kv constructor (#18978)Luca Casonato
Closes #18963 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-03fix(docs): replace "e.g." with "i.e." in `seek()`/`seekSync()` comment (#18964)kang
Clarify calculation of number "9" in `seek()`/`seekSync()` comment of lib.deno.ns.d.ts by replacing "e.g." with "i.e."
2023-05-03fix(core): rebuild when JS sources for snapshotting change (#18976)Bartek Iwańczuk
2023-05-03chore: update release doc template (#18974)Bartek Iwańczuk
2023-05-03fix(ext/kv): KvU64#valueOf and KvU64 inspect (#18656)Luca Casonato
`new Deno.KvU64(1n) + 2n == 3n` is now true. `new Deno.KvU64(1n)` is now inspected as `[Deno.KvU64: 1n]` (`Object(1n)` is inspected as `[BigInt: 1n]`). --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-03perf: use jemalloc as global allocator (#18957)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/18875 that enables `jemalloc` as a global allocator for the Deno CLI.
2023-05-02refactor(ext/io): move tty metadata to separate collection (#18959)David Sherret
This removes the tty stuff that's hanging on the file resources and instead stores them in a separate `TtyModeStore`. Although this will cause the tty store items to not be removed when the resource is removed, I think this is ok to do because there will be a small number of resources this is every done with and usually those resources won't ever be closed.
2023-05-02docs(lib): document `Deno.Command` requires the `allow-run` permission (#18958)Yarden Shoham
2023-05-02perf(core): use jemalloc for V8 array buffer allocator (#18875)Divy Srivastava
This commits changes "deno_core" to use jemalloc allocator as an allocator for V8 array buffers. This greatly improves our GC characteristics as we are using a lot of short lived array buffers. They no longer go through the expensive malloc/free cycle using the default Rust allocator, but instead use jemallocator's memory pool. As a result the flamegraphs for WS/HTTP server flamegraphs no longer show stacks for malloc/free around ops that use ZeroCopyBuf and &[u8]. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-02chore: release extension crates, unpin tokio (#18954)Bartek Iwańczuk
2023-05-02refactor(core): Use `ObjectHasOwn` instead of ↵Kenta Moriuchi
`ObjectPrototypeHasOwnProperty` (#18952) ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
2023-05-02fix(ext/node): add missing `release` property to node's `process` (#18923)Yarden Shoham
2023-05-02fix(npm): canonicalize filename before returning (#18948)Bartek Iwańczuk
This commit changes how paths for npm packages are handled, by canonicalizing them when resolving. This is done so that instead of returning "node_modules/<package_name>@<version>/node_modules/<dep>/index.js" (which is a symlink) we "node_modules/<dep>@<dep_version>/index.js. Fixes https://github.com/denoland/deno/issues/18924 Fixes https://github.com/bluwy/create-vite-extra/issues/31 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-05-02fix(node/http): Request.setTimeout(0) should clear (#18949)Levente Kurusa
Fixes: #18932
2023-05-01docs: correct example of piping the output of a subprocess to a file (#18933)Michael Lazarev
Fixes #18909
2023-05-01perf: lazily create RootCertStore (#18938)David Sherret
2023-05-01bench: fix benchmarks again (#18942)Bartek Iwańczuk
2023-05-01bench: fix json ops benchmark (#18941)Bartek Iwańczuk
2023-05-01refactor(cli): remove ProcState - add CliFactory (#18900)David Sherret
This removes `ProcState` and replaces it with a new `CliFactory` which initializes our "service structs" on demand. This isn't a performance improvement at the moment for `deno run`, but might unlock performance improvements in the future.
2023-05-01perf: lazily retrieve ppid (#18940)David Sherret
This is very apparent on Windows. Before: 45.74ms (Hello world) After: 33.92ms Closes #18939
2023-05-01refactor: migrate async ops to generated wrappers (#18937)Bartek Iwańczuk
Migrates some of existing async ops to generated wrappers introduced in https://github.com/denoland/deno/pull/18887. As a result "core.opAsync2" was removed. I will follow up with more PRs that migrate all the async ops to generated wrappers.
2023-05-01fix(core): Use primordials for methods (#18839)Kenta Moriuchi
I would like to get this change into Deno before merging https://github.com/denoland/deno_lint/pull/1152
2023-05-01refactor(cli): use CliMainWorker in standalone (#18880)David Sherret
Uses `CliMainWorker` in all the cli code.
2023-05-01chore(ext/websocket): readd autobahn|testsuite fuzzingclient (#18903)Divy Srivastava
This reverts commit https://github.com/denoland/deno/commit/17d1c7e444542f43229a047853605ac22081abdf. The `Deno.serve` signature update in https://github.com/denoland/deno/pull/18759 broke the testee server right after this patch landed on `main`.
2023-05-01refactor(webidl): move prefix & context out of converters options bag (#18931)Leo Kettmeir
2023-05-01perf(ext/web): fast path for ws events (#18905)Divy Srivastava
- Do not use `ReflectHas` in `isNode`. - Avoid copying handler array when handlers.length == 1 - Avoid searching for path target when path.length == 1 ``` Linux divy-2 5.19.0-1022-gcp #24~22.04.1-Ubuntu SMP Sun Apr 23 09:51:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 32GiB System memory Intel(R) Xeon(R) CPU @ 3.10GHz # main + https://github.com/denoland/deno/pull/18904 Msg/sec: 89326.750000 Msg/sec: 90320.000000 Msg/sec: 89576.250000 # this patch Msg/sec: 97250.000000 Msg/sec: 97125.500000 Msg/sec: 97964.500000 ```
2023-04-30refactor(cli): remove `Clone` on `ProcState` (#18874)David Sherret
Slowly phasing this out.
2023-04-30fix(fmt/json): support formatting number with exponent and no sign (#18894)David Sherret
Numbers with an exponent and no sign (ex. `1e1`) would fail to parse.
2023-04-30perf(ext/websocket): use internal dispatch for msg events (#18904)Divy Srivastava
``` Linux divy-2 5.19.0-1022-gcp #24~22.04.1-Ubuntu SMP Sun Apr 23 09:51:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 32GiB System memory Intel(R) Xeon(R) CPU @ 3.10GHz # main Msg/sec: 89398.250000 Msg/sec: 90079.750000 # this patch Msg/sec: 91919.750000 Msg/sec: 91762.250000 ```
2023-04-30fix(ext/url): throw `TypeError` for empty argument (#18896)Kenta Moriuchi
Fixes #18893