1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
Commit graph

4892 commits

Author SHA1 Message Date
Bartek Iwańczuk
df233a498d
fix(cli): avoid crash on import of invalid module names (#19523)
Fixes https://github.com/denoland/deno/issues/17748
Closes #17770

Co-authored-by: Anton Bershanskiy
<bershanskiy@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-06-15 22:50:41 +02:00
David Sherret
7c3a641dae
refactor(flags): move watch flags into subcommand structs (#19516)
Moves the watch setting out of the `Flags` struct and into the
individual subcommands
2023-06-15 22:50:41 +02:00
Heyang Zhou
f5b9af7cd7
chore(ext/kv): disable flaky test (#19522) 2023-06-15 22:50:41 +02:00
Vedant Pandey
8e720515d3
fix(node): Worker constructor doesn't check type: module of package.json (#19480) 2023-06-15 22:50:41 +02:00
Bartek Iwańczuk
c966697cc8
refactor(ext/fetch): simplify fetch ops (#19494)
Addresses feedback from
https://github.com/denoland/deno/pull/19412#discussion_r1227912676
2023-06-15 22:50:40 +02:00
Matt Mastracci
675ba859d5
chore(ext/net): ignore startTls test (#19515) 2023-06-15 22:50:40 +02:00
Igor Zinkovsky
1aa01159a6
chore(kv) another fix for queue flaky test (#19513) 2023-06-15 22:50:40 +02:00
David Sherret
e98b85e5c3
fix: reload config files on watcher restarts (#19487)
Closes #19468
2023-06-15 22:50:40 +02:00
Leo Kettmeir
cde9e99c7d
chore(ext/node): bring back changes to ClientRequest.onSocket (#19509)
Reverts denoland/deno#19426
2023-06-15 22:50:40 +02:00
Igor Zinkovsky
1e725e6fd5
chore(kv) fix flaky queue test (#19495) 2023-06-15 22:50:39 +02:00
Igor Zinkovsky
116972f3fc
feat(kv) queue implementation (#19459)
Extend the unstable `Deno.Kv` API to support queues.
2023-06-15 22:50:38 +02:00
Bartek Iwańczuk
c6bfa8cc43
Revert "refactor(core): cleanup feature flags for js source inclusion… (#19490)
… (#19463)"

This reverts commit ceb03cfb03.

This is being reverted because it causes 3.5Mb increase in the binary
size,
due to runtime JS code being included in the binary, even though it's
already snapshotted.

CC @nayeemrmn
2023-06-15 22:50:38 +02:00
David Sherret
58c79b8dd2
chore: fix compile error on main (#19489) 2023-06-15 22:50:38 +02:00
David Sherret
9d944cfbe6
fix(lsp): don't pre-load documents matched in the config file's "exclude" (#19431)
This prevents documents specified in a deno.json's "exclude" from being
pre-loaded by the lsp.

For example, someone may have something like:

```jsonc
// deno.json
{
  "exclude": [
    "dist" // build directory
  ]
}
```
2023-06-15 22:50:37 +02:00
Leo Kettmeir
e2aee58c89
fix(node/buffer): make slice be the same as subarray (#19481) 2023-06-15 22:50:37 +02:00
Matt Mastracci
d14b0f0564
fix(ext/http): replace await Deno.serve with await Deno.serve().finished (#19485)
We have a bunch of these to clean up after we changed the API.
2023-06-15 22:50:37 +02:00
Matt Mastracci
d158a0bf99
fix(ext/websockets): ensure we fully send frames before close (#19484)
Fixes #19483
2023-06-15 22:50:37 +02:00
Nayeem Rahman
cd61c01545
refactor(core): cleanup feature flags for js source inclusion (#19463)
Remove `ExtensionFileSourceCode::LoadedFromFsDuringSnapshot` and feature
`include_js_for_snapshotting` since they leak paths that are only
applicable in this repo to embedders. Replace with feature
`exclude_js_sources`. Additionally the feature
`force_include_js_sources` allows negating it, if both features are set.
We need both of these because features are additive and there must be a
way of force including sources for snapshot creation while still having
the `exclude_js_sources` feature. `force_include_js_sources` is only set
for build deps, so sources are still excluded from the final binary.

You can also specify `force_include_js_sources` on any extension to
override the above features for that extension. Towards #19398.

But there was still the snapshot-from-snapshot situation where code
could be executed twice, I addressed that by making `mod_evaluate()` and
scripts like `core/01_core.js` behave idempotently. This allowed
unifying `ext::init_ops()` and `ext::init_ops_and_esm()` into
`ext::init()`.
2023-06-15 22:50:36 +02:00
David Sherret
a9595bad3e
fix(npm): warn when tarball contains hardlink or symlink (#19474)
This is to help us get some visibility into whether we need to support
this.
2023-06-15 22:50:36 +02:00
David Sherret
68d8321f16
chore(repl): mark some tests as flaky (#19475) 2023-06-15 22:50:36 +02:00
David Sherret
b78a91d3ba
fix(lsp): update import map config when deno.json changes (#19476)
Half of #19468
2023-06-15 22:50:36 +02:00
Bartek Iwańczuk
0d2eba4b3e
fix(ext/node): handle 'upgrade' responses (#19412)
This commit adds support for "upgrade" events in "node:http"
"ClientRequest". Currently only "Websocket" upgrades are
handled. Thanks to this change package like "npm:puppeteer"
and "npm:discord" should work.

Closes https://github.com/denoland/deno/issues/18913
Closes https://github.com/denoland/deno/issues/17847
2023-06-15 22:50:36 +02:00
Kaique da Silva
8b1df4f9bd
test(ext/node): add fs dirent unit test from std (#19461)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-06-15 22:50:36 +02:00
Leo Kettmeir
28b04b285e
feat(node): HTTPS server (#19362) 2023-06-15 22:50:35 +02:00
Matt Mastracci
8aeec47a62
chore(core): fix flaky flock_test on windows (#19477) 2023-06-15 22:50:35 +02:00
Leo Kettmeir
7e3b5b1a13
chore: update clap (#19467)
Also switches to use defer for all subcommands besides run.
2023-06-15 22:50:35 +02:00
David Sherret
8884c14a2d
chore(tests): test_util - Add PathRef (#19450)
This adds a new `PathRef` struct to test_util for making it easier to
work with paths in test code. I'm going to expand on this more in the
future.
2023-06-15 22:50:34 +02:00
David Sherret
f7cb0b44e3
chore: fix flaky package_json_auto_discovered_for_local_script_arg (#19445) 2023-06-15 22:50:34 +02:00
Gustrb
c67dfaec61
perf(node): cache realpath_sync calls in read permission check (#19379) 2023-06-15 22:50:33 +02:00
David Sherret
7ee3eec58a
chore: fix flaky stdio_streams_are_locked_in_permission_prompt (#19443) 2023-06-15 22:50:33 +02:00
David Sherret
ef9d91dec4
fix(fmt): do not panic formatting json with multiple values (#19442) 2023-06-15 22:50:33 +02:00
David Sherret
8a737f5a16
fix(config): do not canonicalize config file path before loading (#19436)
I'm unsure why we canonicalize the config file path when loading and the
canonicalization is causing issues in #19431 because everything in the
lsp is not canonicalized except the config file (actually, the config
file is only canonicalized when auto-discovered and not whens pecified).
We also don't canonicalize module paths when loading them.

Canonicalization was added in https://github.com/denoland/deno/pull/7621
2023-06-15 22:50:33 +02:00
Bartek Iwańczuk
40cd7a3cda
perf: add Tokio runtime monitor (#19415)
This commit adds ability to print metrics of the Tokio
runtime to the console by passing "DENO_TOKIO_METRICS=1"
env var.

Metrics will be printed every second, but this can be changed
by "DENO_TOKIO_METRICS_INTERVAL=500" env var.
2023-06-15 22:50:32 +02:00
denobot
acf5d44a22
1.34.2 (#19433)
Bumped versions for 1.34.2

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-09 02:13:59 +02:00
Bartek Iwańczuk
d6271e204b
chore(ext/node): revert changes to ClientRequest.onSocket (#19426)
Partially reverts https://github.com/denoland/deno/pull/19340
because it causes hangs in some situations.
2023-06-09 01:13:27 +02:00
Matt Mastracci
270ac0775a
chore: Use relative paths for assert imports to avoid test flakes (#19427)
Tests occasionally fail if we get a bad gateway attempting to fetch the
assertion module
2023-06-09 01:13:27 +02:00
David Sherret
959e795b44
refactor(compile): store the npm snapshot in the eszip (#19343) 2023-06-09 01:13:27 +02:00
Matt Mastracci
1bbf67f6ca
perf(ext/websocket): Reduce GC pressure & monomorpize op_ws_next_event (#19405)
Reduce the GC pressure from the websocket event method by splitting it
into an event getter and a buffer getter.

Before:
165.9k msg/sec

After:
169.9k msg/sec
2023-06-09 01:13:27 +02:00
nasa
94395a7750
feat(node_compat): Add a write method to the FileHandle class (#19385)
## WHY 

ref: https://github.com/denoland/deno/issues/19165

The FileHandle class has many missing methods compared to node.

## WHAT


Add write method
2023-06-09 01:13:26 +02:00
nasa
0fc19df30a
feat(node_compat): Add a read method to the FileHandle class (#19359)
ref: #19165

The FileHandle class has many missing methods compared to node.
2023-06-09 01:13:26 +02:00
Bartek Iwańczuk
220a7d544a
refactor(core): use JoinSet instead of FuturesUnordered (#19378)
This commit migrates "deno_core" from using "FuturesUnordered" to
"tokio::task::JoinSet". This makes every op to be a separate Tokio task
and should unlock better utilization of kqueue/epoll.

There were two quirks added to this PR:
- because of the fact that "JoinSet" immediately polls spawn tasks,
op sanitizers can give false positives in some cases, this was
alleviated by polling event loop once before running a test with 
"deno test", which gives canceled ops an opportunity to settle
- "JsRuntimeState::waker" was moved to "OpState::waker" so that FFI
API can still use threadsafe functions - without this change the
registered wakers were wrong as they would not wake up the 
whole "JsRuntime" but the task associated with an op

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-06-09 01:13:25 +02:00
David Sherret
7d44315ee6
refactor: helpers methods on TypeCheckMode (#19393) 2023-06-09 01:13:25 +02:00
Mike Mulchrone
82c3a56674
fix(cli): formatting bench with colors (#19323) 2023-06-09 01:13:25 +02:00
David Sherret
82b2037f6e
perf(cli): conditionally load typescript declaration files (#19392)
Closes #18583
2023-06-09 01:13:24 +02:00
sigmaSd
9a6d319e18
fix(repl): correctly print string exception (#19391)
Fixes a recent regression where `throw "hello"` in the repl prints
`Uncaught undefined` instead of `throw "hello"`
2023-06-09 01:13:24 +02:00
Leo Kettmeir
b34d95667a
fix(node/http): use fake socket and proper url handling (#19340)
Fixes https://github.com/denoland/deno/issues/19349

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-09 01:13:24 +02:00
Matt Mastracci
03ad309ccd
feat(ext/node): Very basic node:http2 support (#19344)
This commit adds basic support for "node:http2" module. Not
all APIs have been yet implemented, but this change already
allows to use this module for some basic functions. 

The "grpc" package is still not working, but it's a good stepping
stone.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-09 01:13:23 +02:00
ud2
05282308ff
fix(ext/console): fix inspecting large ArrayBuffers (#19373) 2023-06-09 01:13:23 +02:00
David Sherret
7b0a7b1976
chore: upgrade to Rust 1.70.0 (#19345)
Co-authored-by: linbingquan <695601626@qq.com>
2023-06-09 01:13:23 +02:00
David Sherret
ddba4e8c4d
fix: upgrade to deno_ast 0.27 (#19375)
Closes #19148
2023-06-09 01:13:23 +02:00