1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
Commit graph

9105 commits

Author SHA1 Message Date
Bartek Iwańczuk
1613c9f5a6 refactor(ext/node): remove conditional in ServerResponse#enqueue (#18617)
It's superfluous, the issue linked is no longer relevant.

Closes https://github.com/denoland/deno/issues/18579
2023-04-12 15:52:07 +02:00
David Sherret
0117281eef fix(npm): reload an npm package's dependency's information when version not found (#18622)
This reloads an npm package's dependency's information when a
version/version req/tag is not found.

This PR applies only to dependencies of npm packages. It does NOT yet
cause npm specifiers to have their dependency information cache busted.
That requires a different solution, but this should help cache bust in
more scenarios.

Part of #16901, but doesn't close it yet
2023-04-12 15:52:07 +02:00
Bartek Iwańczuk
af6f2de1ad chore: remove lockfile/ (#18618)
New home at https://github.com/denoland/deno_lockfile.
2023-04-12 15:52:07 +02:00
David Sherret
3da1d5f8eb refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
David Sherret
acb9dca497 chore: fix flaky tests checking ms when CI is slow (#18559) 2023-04-12 15:49:40 +02:00
Divy Srivastava
05bc5e522d fix(ext/node): implement hkdf-expand (#18612)
Towards https://github.com/denoland/deno/issues/18455
2023-04-12 15:49:40 +02:00
David Sherret
c61c4f5755 refactor(ext/node): NodeFs - add back altered metadata method (#18613)
From https://github.com/denoland/deno/pull/18604/files#r1159992299

We should still have a `metadata` method because it's one system call
instead of two on most platforms.
2023-04-12 15:49:40 +02:00
Marvin Hagemeister
b7af3caf78 fix(ext/node): fix unable to resolve fraction.js (#18544)
Turns out `autoprefixer` is a better reproduction case then
`microbundle`.

Fixes #18535 
Fixes #18600

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-12 15:49:40 +02:00
Divy Srivastava
cd57451e05 perf(ext/websocket): replace tokio_tungstenite server with fastwebsockets (#18587)
https://github.com/littledivy/fastwebsockets

```
# This PR
./load_test 100 0.0.0.0 8080 0 0
Running benchmark now...
Msg/sec: 176355.000000

# main
./load_test 100 0.0.0.0 8080 0 0
Running benchmark now...
Msg/sec: 157198.750000
```
2023-04-12 15:49:40 +02:00
Divy Srivastava
63454729a2 fix(ext/node): add symmetric keygen (#18609)
Towards #18455
2023-04-12 15:49:40 +02:00
Bartek Iwańczuk
16c1e023a5 refactor(ext/node): add more methods to 'NodeFs' trait (#18604)
Added more methods to `ext/node/clippy.toml` that are not allowed
to be used in the crate.

Prerequisite for https://github.com/denoland/deno/pull/18544
2023-04-12 15:49:40 +02:00
Geert-Jan Zwiers
b039c5f5ac fix(ext/node): json encode binary command name (#18596)
Fixes https://github.com/denoland/deno/issues/18588
2023-04-12 15:49:40 +02:00
Luca Casonato
301c4f4d02 feat(core): sync io ops in core (#18603)
This commit adds op_read_sync and op_write_sync to core. These ops are
similar to op_read and op_write, but they are synchronous. Just like the
async ops, they operate on generic `deno_core::Resource` objects. These
now have new `read_byob_sync` and `write_sync` methods, with default
implementations throwing "NotSupported" errors, just like the async
counterparts.

There are no `write_all` or `read` equivalents, because the
optimizations they unlock are not useful in synchronous contexts.
2023-04-12 15:49:40 +02:00
Luca Casonato
67bf9692df perf(ext/io): remove a data copy from File write (#18601)
Removes a data copy from all async `File::write` operations.
2023-04-12 15:49:39 +02:00
Divy Srivastava
4f5d637841 chore(cli/bench): add ws echo bench (#18595) 2023-04-12 15:49:39 +02:00
Bartek Iwańczuk
aec781cf8f tests: cleanup "node_compat_tests" (#18594)
A few drive-by cleanup while I'm working on the "crypto"
module. It makes it easier and faster to debug the failing
test case.
2023-04-12 15:49:39 +02:00
Bartek Iwańczuk
e222c368c0 refactor(core): run pending dynamic imports before ops (#18592)
This is in preparation to limit number of times we have to cross Rust ->
V8 boundary on each tick of event loop.
2023-04-12 15:49:39 +02:00
Bartek Iwańczuk
5e8209abb3 refactor(ext/http): bring back 'reusePort' option for 'Deno.serve()' (#18590)
Closes https://github.com/denoland/deno/issues/18582
2023-04-12 15:49:39 +02:00
Matt Mastracci
fcb5a89d91 refactor(core): Improve ergonomics of managing ASCII strings (#18498)
This is a follow-on to the earlier work in reducing string copies,
mainly focused on ensuring that ASCII strings are easy to provide to the
JS runtime.

While we are replacing a 16-byte reference in a number of places with a
24-byte structure (measured via `std::mem::size_of`), the reduction in
copies wins out over the additional size of the arguments passed into
functions.

Benchmarking shows approximately the same if not slightly less wallclock
time/instructions retired, but I believe this continues to open up
further refactoring opportunities.
2023-04-12 15:49:39 +02:00
Bartek Iwańczuk
e92b9cea97 refactor: remove remaining references to "flash" server (#18580)
Follow up to https://github.com/denoland/deno/pull/18578

We will need to do another pass cleaning up `ext/fetch/23_request.js`
2023-04-12 15:49:39 +02:00
Bartek Iwańczuk
aa3f85ddd2 refactor: remove "ext/flash" (#18578)
With https://github.com/denoland/deno/pull/18568 landed we no longer
need "ext/flash". 

This commit removes "deno_flash" extension completely.

This should have some impact on the binary and snapshot size.

Closes https://github.com/denoland/deno/issues/17356
2023-04-12 15:44:07 +02:00
Bartek Iwańczuk
fe21f65b6b refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally (#18568)
This commit changes implementation of "Deno.serve()" API to use
"Deno.serveHttp()" under the hood. This change will allow us to
remove the "flash" server implementation, bringing stability to the
"Deno.serve()" API.

"cli/tests/unit/flash_test.ts" was renamed to "serve_test.ts".

Closes https://github.com/denoland/deno/issues/15574
Closes https://github.com/denoland/deno/issues/15504
Closes https://github.com/denoland/deno/issues/15646
Closes https://github.com/denoland/deno/issues/15909
Closes https://github.com/denoland/deno/issues/15911
Closes https://github.com/denoland/deno/issues/16828
Closes https://github.com/denoland/deno/issues/18046
Closes https://github.com/denoland/deno/issues/15869
2023-04-12 15:44:04 +02:00
Yoshiya Hinosawa
bb7b58a991 Revert "fix(cli): don't store blob and data urls in the module cache (#18261)" (#18572)
This reverts commit b4c61c146a.

cc @nayeemrmn
2023-04-12 15:44:00 +02:00
Bartek Iwańczuk
a47b95d231 refactor(ext/node): migrate "http" module to use "Deno.serveHttp" API (#18552)
This commit changes "node:http" module to use "Deno.serveHttp" API
instead of "Deno.serve" API.

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-04-12 15:43:54 +02:00
Matt Mastracci
8f7985434e feat(ext/http): add an op to perform raw HTTP upgrade (#18511)
This commit adds new "op_http_upgrade_early", that allows to hijack
existing "Deno.HttpConn" acquired from "Deno.serveHttp" API 
and performing a Websocket upgrade on this connection.

This is not a public API and is meant to be used internally in the
"ext/node" polyfills for "http" module.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-12 15:43:51 +02:00
David Sherret
0642f9e5c3 ci: improve release docs (#18562) 2023-04-12 15:43:46 +02:00
Kenta Moriuchi
9ccf881763 chore: Turn back on dlintPreferPrimordials (#17715)
Closes #17709
2023-04-12 15:42:30 +02:00
denobot
73d472149c
1.32.3 (#18558)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-04-01 18:51:46 -04:00
Nayeem Rahman
f6f48bcec2 fix(test): don't swallow sanitizer errors with permissions (#18550)
Missing `return` from #18246.
2023-04-01 17:34:09 -04:00
David Sherret
cf3d38d5a7 fix(lsp): add a document preload file system entry limit (#18553)
I was testing this out and it's badly needed. For now, it's not
configurable and limited to 1,000 file system entries.

Related to #18538
2023-04-01 17:34:09 -04:00
David Sherret
78509309fd chore(release): improve merge commit back to main for patch releases (#18554)
This change commits with conflicts that can then be resolved manually.
2023-04-01 17:34:09 -04:00
David Sherret
b1e2601e05 fix(repl): disable language server document preloading in the repl (#18543)
This was an oversight because the repl uses the language server under
the hood. Also, never preloads from a root directory.

Part of #18538
2023-04-01 17:34:08 -04:00
David Sherret
f981becf3e perf(check): faster source hashing (#18534) 2023-04-01 17:34:08 -04:00
David Sherret
94d8ac598c fix(check): ensure diagnostics caused by changes in other files get invalidated between runs (#18541)
Regression caused by the performance improvement in #18329. Figuring
this out was hard. It's luckily still fast after this change.

Closes #18516
2023-04-01 17:34:08 -04:00
Dj
fcc414b13c fix(ext/ffi): crash when same reference struct is used in two fields (#18531)
fix #17482
2023-04-01 17:34:08 -04:00
Divy Srivastava
02584481ee ci: update to Ubuntu 22.04 runners for all workflows (#18526) 2023-04-01 17:34:08 -04:00
Matt Mastracci
24e0b31096
fix(core): use sha-2 dep from workspace (#18536) 2023-03-31 14:41:10 -06:00
denobot
1e10dd1b61
1.32.2 (#18533)
Bumped versions for 1.32.2

---------

Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-03-31 14:01:12 -06:00
Bartek Iwańczuk
7583cb4c52 Revert "fix(cli): deno upgrade file permission (#18427)" (#18467)
This reverts commit 0742ea1170.

Closes https://github.com/denoland/deno/issues/18466
2023-03-31 11:44:37 -06:00
David Sherret
12f3c1a359 fix: upgrade to TypeScript 5.0.3 (#18532) 2023-03-31 11:43:20 -06:00
David Sherret
cd7071beb2 fix(lsp): better handling of data: urls (#18527)
1. Log instead of error when the referrer can't be found
2. Fixes typescript to resolve data urls correctly. Properly documented
here:
https://github.com/denoland/TypeScript/pull/4/files#diff-180da7c288743d11d8590d30f0c07c48e5dcf291aa671bbea0dd520a9a1359d2

Closes #18524
2023-03-31 11:43:20 -06:00
Divy Srivastava
8088a7b786 perf(ext/websocket): use opAsync2 to avoid spread deopt (#18525)
This commit adds a new core API `opAsync2` to call an async op with
atmost 2 arguments. Spread argument iterators has a pretty big perf hit
when calling ops.

| name | avg msg/sec/core |
| --- | --- |
| 1.32.1 | `127820.750000` |
| #18506 | `140079.000000` |
| #18506 + #18509 | `150104.250000` |
| #18506 + #18509 + this | `157340.000000` |
2023-03-31 11:43:20 -06:00
Divy Srivastava
a23252d975 fix(ops): fallback when FastApiOneByteString is not utf8 (#18518)
Fixes https://github.com/denoland/deno/issues/18255
2023-03-31 11:43:20 -06:00
Divy Srivastava
3b65d297c7 perf: const op declaration (#18288)
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-31 11:43:20 -06:00
Divy Srivastava
0cd0a9d5ed perf(ext/websocket): efficient event kind serialization (#18509)
Use u16 to represent the kind of event (0 - 6) & event code > 6 is
treated as the close code. This way we can represent all events + the
close code in a single JS number. This is safe because (as per RFC 6455)
close code from 0-999 are reserved & not used.

| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno #18506 | `140079.000000` |
| deno #18506 + this | `150104.250000` |
2023-03-31 11:43:20 -06:00
David Sherret
5d20c36eaf fix(lsp): include all diagnosable documents on initialize (#17979)
Closes https://github.com/denoland/vscode_deno/issues/797
Closes https://github.com/denoland/deno/issues/11190
Closes https://github.com/denoland/vscode_deno/issues/811
Closes https://github.com/denoland/vscode_deno/issues/761
Closes https://github.com/denoland/vscode_deno/issues/585
Closes https://github.com/denoland/vscode_deno/issues/561
Closes https://github.com/denoland/vscode_deno/issues/410
2023-03-31 11:43:20 -06:00
Luca Casonato
5949321c55 fix(dts): improve types for the Deno.KV API (#18510) 2023-03-31 11:43:20 -06:00
Luca Casonato
e81f677fe4 feat(ext/kv): return versionstamp from set/commit (#18512)
This commit updates the `Deno.Kv` API to return the new commited
versionstamp for the mutated data from `db.set` and `ao.commit`. This is
returned in the form of a `Deno.KvCommitResult` object that has a
`versionstamp` property.
2023-03-31 11:43:20 -06:00
Geert-Jan Zwiers
7f88b9e442 fix(coverage): ignore files from npm registry (#18457)
Fixes https://github.com/denoland/deno/issues/17664 and part of
https://github.com/denoland/deno/issues/18454 by excluding files
belonging to npm modules by default in the coverage output.
2023-03-31 11:43:20 -06:00
Divy Srivastava
842e359f25 perf(ext/websocket): special op for sending binary data frames (#18506)
Easy perf win by avoiding deserializing `SendValue` through serde_v8. 

| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno_this | `140079.000000` |
2023-03-31 11:43:20 -06:00