0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

9053 commits

Author SHA1 Message Date
Bartek Iwańczuk
7cf6e2a7a6
chore(core): remove stray log statement (#18322) 2023-03-21 14:13:17 +00:00
Yoshiya Hinosawa
aa729a42b4
chore(tools): restore node compat test setup script (#18290) 2023-03-21 22:38:07 +09:00
ayame113
c34e26a9d5
docs: fix broken Deno.FsFile#readable example code (#18277) 2023-03-21 16:22:21 +09:00
Yoshiya Hinosawa
896d7f02cb
chore(ext/console): inspect anonymous function as [Function (anonymous)] (#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-21 13:12:13 +09:00
Sam Gwilym
4c34a2f2df
feat(ext/net): Add multicasting APIs to DatagramConn (#10706) (#17811) 2023-03-20 22:27:00 +01:00
Bartek Iwańczuk
cd53ab5427
refactor(ext/node): untangle dependencies between js files (#18284)
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-20 14:05:13 -04:00
Geert-Jan Zwiers
d78db7c091
fix(ext/node): use Deno.Command from ext:runtime (#18289)
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-20 13:24:43 +00:00
Bartek Iwańczuk
aba5329aec
refactor(ext/node): make initialization functions sync (#18282)
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-20 00:40:21 -04:00
Andreu Botella
090169cfbc
feat(compile): Add support for web workers in standalone mode (#17657)
This commit adds support for spawning Web Workers in self-contained
binaries created with "deno compile" subcommand.

As long as module requested in "new Worker" constructor is part of the
eszip (by means of statically importing it beforehand, or using "--include"
flag), then the worker can be spawned.
2023-03-19 23:32:54 +01:00
Max Dahlgren
bf149d047f
test(ext/node): port _fs tests from std/node (#18262)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-03-20 01:10:39 +09:00
Sanskar Gauchan
3b1cb8af69
test(ext/node): add querystring_test.ts and readline_test.ts (#18256) 2023-03-19 19:49:11 +09:00
Sanskar Gauchan
472c06b92e
test(ext/node): add _fs_access_test.ts and _fs_watch_test.ts (#18249)
part of https://github.com/denoland/deno/issues/17840
2023-03-19 19:37:00 +09:00
Max
84fedabab3
chore: bump http to ^0.29.0 (#18259)
`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-19 00:34:56 +00:00
Kamil Ogórek
dd1e650063
fix(runtime): Extract error code for all OS error variants (#17958) 2023-03-19 00:01:50 +00:00
Andreu Botella
b64ec79268
feat(compile): Enable multiple roots for a standalone module graph (#17663)
This change will enable dynamic imports and web workers to use modules
not reachable from the main module, by passing a list of extra side
module roots as options to `deno compile`. 

This can be done by specifying "--include" flag that accepts a file path or a
URL. This flag can be specified multiple times, to include several modules.
The modules specified with "--include" flag, will be added to the produced
"eszip".
2023-03-19 00:43:07 +01:00
Bartek Iwańczuk
a80d1b6e66
chore: update "deno_third_party" submodule (#18274)
This upgrade "dlint" and "hyperfine" tools we use in our CI.
2023-03-19 00:16:20 +01:00
Bartek Iwańczuk
3c9771deb2
Reland "perf(core): preserve ops between snapshots (#18080)" (#18272)
Relanding 4b6305f4f2
2023-03-18 18:30:04 -04:00
Bartek Iwańczuk
a5ad3a44b5
chore(ci): allow 'Reland' PR title prefix (#18273) 2023-03-18 21:15:45 +00:00
Bartek Iwańczuk
d33369c6c7
perf(core): use static specifier in ExtensionFileSource (#18271)
Relanding #18264

-------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-18 20:09:13 +00:00
Leo Kettmeir
4c1f3daa83
chore(bench): add RUNTIME_SNAPSHOT.bin (#18269) 2023-03-18 21:00:00 +01:00
Bartek Iwańczuk
f6c364fcf6
Revert "perf(core): use static specifier in ExtensionFileSource (#182… (#18270)
…64)"

This reverts commit 8af0c83519.

Causes bench stage to fail on CI.
2023-03-18 20:25:28 +01:00
Divy Srivastava
00f4c0df97
chore(cli/tests): move macos_shared_libraries test to macos_test.rs (#18268)
As per review comment in original PR:
https://github.com/denoland/deno/pull/18244#issuecomment-1473769606
2023-03-18 21:08:51 +05:30
Bartek Iwańczuk
d11e89127d
Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)
This reverts commit 4b6305f4f2.
2023-03-18 14:59:51 +00:00
Divy Srivastava
8af0c83519
perf(core): use static specifier in ExtensionFileSource (#18264)
Closes #18085

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-18 13:14:28 +00:00
Yoshiya Hinosawa
5223f3d9b6
fix(ext/node): add createDecipheriv (#18245) 2023-03-18 21:51:28 +09:00
Andrew
44553aa09e
docs(FFI/UnsafePointerView): fix a typo in a docstring (#18034) 2023-03-18 12:25:06 +00:00
Bartek Iwańczuk
4b6305f4f2
perf(core): preserve ops between snapshots (#18080)
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-18 12:51:21 +01:00
Divy Srivastava
9bfa8dc90c
chore(core): simplify extension config codegen (#18263)
Avoid creating an extra closure when no config needed. I eventually want
to make OpStateFn fixed sized to avoid boxing it.
2023-03-18 12:32:11 +01:00
Geert-Jan Zwiers
058865c9a3
fix(cli): preserve blob store when resetting file watcher (#18253)
Fixes https://github.com/denoland/deno/issues/17733

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-03-17 19:58:25 -06:00
Bartek Iwańczuk
c06d6fb3a2
refactor(core): don't require Clone trait bounds in deno_core::extension (#18257)
These bounds were needlessly strict.
2023-03-17 18:58:00 -06:00
Matt Mastracci
3487fde236
perf(core) Reduce copying and cloning in extension initialization (#18252)
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-17 22:15:27 +00:00
Matt Mastracci
e55b448730
feat(core) deno_core::extension! macro to simplify extension registration (#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-17 18:22:15 +00:00
Bartek Iwańczuk
0bc6bf5d33
chore: add tests for node:async_hooks (#18004)
Closes https://github.com/denoland/deno/issues/17878

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
2023-03-17 18:53:57 +01:00
Farsen976
e6fe1630f0
fix(cli/integration): clippy lints (#18248)
This addresses two warnings from clippy, redundant-static-lifetimes and trim-split-whitespace.
closes #18247
2023-03-17 20:51:32 +09:00
Divy Srivastava
c27e8da2c9
fix(test_util): parse strace usecs/call in total line if present (#18241)
Fixes https://github.com/denoland/deno/issues/18235
2023-03-17 10:39:57 +02:00
Divy Srivastava
0eabd2c6d6
chore: add test for macOS shared libraries (#18244)
Closes https://github.com/denoland/deno/issues/18243
2023-03-17 07:41:17 +02:00
Yoshiya Hinosawa
e30d24be72
chore(ext/console): add 'quotes' internal option to Deno.inspect (#18183) 2023-03-17 12:22:09 +09:00
Bartek Iwańczuk
8f9becee76
perf: disable runtime snapshot compression (#18239)
This commit removes compression for the runtime JS code.

It means that we will have a bigger binary, but faster startup. After
several discussion in the CLI team we decided it's worth to trade
about 3Mb of binary size for 2ms faster startup time. With WebGPU
removed in 35196eab27
it shouldn't have such a big impact on the binary size.
2023-03-17 08:49:46 +05:30
Leo Kettmeir
35196eab27
BREAKING(unstable): remove WebGPU (#18094)
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-17 00:29:32 +01:00
Bartek Iwańczuk
3f031ad9af
BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)
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-17 00:14:56 +01:00
Bartek Iwańczuk
8efda832e2
chore(ci): allow 'BREAKING' PR title prefix (#18238)
So that we can land PRs like https://github.com/denoland/deno/pull/18237
or https://github.com/denoland/deno/pull/18094
2023-03-16 22:42:29 +00:00
Divy Srivastava
5a1d3ea614
chore: bump rusty_v8 to 0.65.0 (#18231)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-16 22:02:09 +00:00
Divy Srivastava
1300d6178e
fix(ext/node): resource leak in createHmac (#18229)
This commit fixes https://github.com/denoland/deno/issues/18140.
Verified that test fails on `main`.
2023-03-16 22:25:12 +01:00
Roy Li
2c7174a5a2
fix(repl): Hide indexable properties in tab completion (#18141)
Closes #17831. This change hides the indices of any indexed collection
when triggering tab completion for object properties in the REPL.

An example is shown in the issue, but for verbosity here is another.

Before the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
0                     map
1                     reverse
2                     reduce
...
```
After the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
constructor               reduce
BYTES_PER_ELEMENT         reduceRight
buffer                    set
...
```

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-03-16 19:46:50 +00:00
David Sherret
56731f2f8d
chore: ignore permission_prompt_strips_ansi_codes_and_control_chars test (#18234)
This test hangs on all operating systems.

Opened https://github.com/denoland/deno/issues/18233 for the future
2023-03-16 14:36:23 -04:00
David Sherret
f603ebba77
chore(ci): save a cargo cache specifically for linting (#18219) 2023-03-16 13:42:31 -04:00
Bartek Iwańczuk
29c9a5c90d
refactor: reorder op initialization (#18228)
To be able to preserve "Deno.core.ops" we need to ensure that
ops are registered in the same order in various places, otherwise
we will get mismatch in external references ordering.

Prerequisite for https://github.com/denoland/deno/pull/18080
2023-03-16 18:36:53 +01:00
Luca Casonato
b99c431ac7
feat(serde_v8): support BigInt serialization (#18225)
This commit enables serializing `v8::BigInt` to `num_bigint::BigInt`
in Rust.

Pre-requisite for sub upcoming feature work.
2023-03-16 16:59:47 +00:00
Nick Hanley
1a3c2e2f1d
feat(repl): add DENO_REPL_HISTORY to change history file path (#18047) 2023-03-17 01:22:24 +09:00
Bartek Iwańczuk
b258763558
refactor(core): op initialization and snapshot creator (#18221)
This PR cleans up APIs related to snapshot creation and how ops are
initialized.

Prerequisite for #18080

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-16 14:27:16 +01:00