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

10020 commits

Author SHA1 Message Date
Marvin Hagemeister
4c36e6e6e8 fix: Preact JSX detection 2023-09-30 11:29:03 +02:00
Marvin Hagemeister
b445e0c790 fix: always colorize jsx fragment as component 2023-09-29 19:02:34 +02:00
Marvin Hagemeister
d1677a1a8f feat: serialize JSX for console 2023-09-29 18:57:08 +02:00
David Sherret
5edd102f3f
refactor(cli): make CliNpmResolver a trait (#20732)
This makes `CliNpmResolver` a trait. The terminology used is:

- **managed** - Deno manages the node_modules folder and does an
auto-install (ex. `ManagedCliNpmResolver`)
- **byonm** - "Bring your own node_modules" (ex. `ByonmCliNpmResolver`,
which is in this PR, but unimplemented at the moment)

Part of #18967
2023-09-29 09:26:25 -04:00
David Sherret
d43e48c4e9
refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)
This is required from BYONM (bring your own node_modules).

Part of #18967
2023-09-28 22:43:45 +02:00
Bartek Iwańczuk
0bd53fd52d
fix(jupyter): more robust Deno.jupyter namespace (#20710) 2023-09-28 16:51:44 +02:00
David Sherret
35fad4d2bc
fix(upgrade): use tar.exe to extract on Windows (#20711)
This is what we do for deno install, so it should be fine here
https://github.com/denoland/deno_install/pull/219

Closes https://github.com/denoland/deno/issues/20683
2023-09-27 17:57:58 -04:00
David Sherret
31991e221b
chore: add back dotcom step to release (#20713)
Accidentally removed in
69b7166c20
2023-09-27 19:22:39 +00:00
Matt Mastracci
8ef52b3e6a
chore(ext/ffi): migrate part of FFI to op2 (#20699) 2023-09-27 07:54:43 -06:00
Chen Su
507f24c474
fix(ext/node): fix TypeError in Buffer.from with base64url encoding. (#20705)
For the following example, if I set the encoding to `base64url`, it'll
throw an unexpected TypeError:

```ts
import { Buffer } from "node:buffer";

Buffer.from("IntcImhlbGxvXCI6XCJoZGQvZStpXCJ9Ig", "base64url").toString();

// error: Uncaught TypeError: src.subarray is not a function
// const buf = Buffer.from(
//                    ^
//     at blitBuffer (ext:deno_node/internal/buffer.mjs:1779:15)
//     at Uint8Array.base64urlWrite (ext:deno_node/internal/buffer.mjs:691:10)
//     at Object.write (ext:deno_node/internal/buffer.mjs:2195:11)
//     at Uint8Array.write (ext:deno_node/internal/buffer.mjs:794:14)
//     at fromString (ext:deno_node/internal/buffer.mjs:214:22)
//     at _from (ext:deno_node/internal/buffer.mjs:119:12)
//     at Function.from (ext:deno_node/internal/buffer.mjs:157:10)
//     at file:///Users/foodieats/temp/buffer1.ts:3:20
```

The error caused by `base64urlWrite` function, it should call
`forgivingBase64UrlDecode` not `forgivingBase64UrlEncode`

Also fixed #20563 .
2023-09-27 07:54:19 -06:00
Luca Casonato
aef56f3d70
fix(cli): panic with __runtime_js_sources (#20704)
Also a drive-by cleanup elsewhere (removing unused enum).

Fixes #20702
2023-09-27 10:55:54 +00:00
denobot
3b78981ffe
chore: forward v1.37.1 release commit to main (#20706)
This is the release commit being forwarded back to main for 1.37.1

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-09-27 09:13:48 +00:00
Heyang Zhou
f58a400585
feat(ext/kv): support key expiration in remote backend (#20688)
This patch adds support for [key
expiration](https://docs.deno.com/kv/manual/key_expiration) in the
remote backend.
2023-09-27 13:34:09 +08:00
Igor Zinkovsky
f0a022bed4
fix(kv_queues): graceful shutdown (#20627)
This fixes the `TypeError: Database closed` error during shutdown.
2023-09-26 20:06:57 -07:00
Nayeem Rahman
b433133a1f
fix(lsp): allow query strings for "deno:/status.md" (#20697) 2023-09-27 01:48:34 +01:00
Bartek Iwańczuk
46a4bd5178
feat(unstable): add Deno.jupyter.broadcast API (#20656)
Closes https://github.com/denoland/deno/issues/20591

---------

Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-27 02:21:06 +02:00
Matt Mastracci
d39659332c
chore: update deno_core and cargo update (#20696)
```
    Updating deno_core v0.217.0 -> v0.218.0
    Updating deno_ops v0.93.0 -> v0.94.0
    Updating deno_semver v0.5.0 -> v0.5.1
    Updating fastrand v2.0.0 -> v2.0.1
    Updating serde_v8 v0.126.0 -> v0.127.0
    Updating sha2 v0.10.7 -> v0.10.8
    Updating time v0.3.28 -> v0.3.29
    Updating time-core v0.1.1 -> v0.1.2
    Updating time-macros v0.2.14 -> v0.2.15
```
2023-09-26 23:38:43 +00:00
David Sherret
91832ce278
fix(upgrade): error instead of panic on unzip failure (#20691)
For #20683
2023-09-26 17:52:47 -04:00
Nayeem Rahman
cb154d6afa
chore(lsp): bump tower-lsp to 0.20.0 (#20693) 2023-09-26 21:57:14 +01:00
David Sherret
dcb00bb9b8
chore: slight cleanup in npm resolvers (#20692) 2023-09-26 16:42:39 -04:00
Bartek Iwańczuk
50a3209fff
chore: deprecate Deno.metrics() API (#20684)
This API is providing hoops to jump through with undergoing migration to
`#[op2]` macro. 

The overhead of supporting this API is non-trivial and besides internal
use of it in test sanitizers is very rarely used in the wild.
2023-09-26 17:34:53 +02:00
Bartek Iwańczuk
3c0d6de155
refactor: rewrite ext/node/crypto to op2 macro (#20675) 2023-09-26 12:07:04 +00:00
Laurence Rowe
8fcea5966c
refactor(ext/http): use scopeguard defer to handle async drop (#20652)
Use the [scopeguard](https://docs.rs/scopeguard/) defer macro to run
cleanup code for `new_slab_future`.
This means it can be a single async function, avoiding the need to
create a struct and implement `PinnedDrop`

Async cleanup in Rust is awkward because async functions may be
cancelled at any await point when their Future is dropped.
The scopeguard approach comes from the following articles:
* [How to think about `async`/`await` in
Rust](http://cliffle.com/blog/async-inversion/)
* [Async Cancellation
I](https://blog.yoshuawuyts.com/async-cancellation-1/) (Reddit
[discussion](https://www.reddit.com/r/rust/comments/qrhg39/blog_post_async_cancellation/))
2023-09-26 05:42:48 -06:00
Luca Casonato
c68650d532
fix(cli/test): clear connection pool after tests (#20680)
This helps reduce flakes where a test starts an HTTP server and makes a
request using fetch, then shuts down the server, then starting a new
test with a new server, but the connection pool still has a "not quite
closed yet" connection to the old server, and a new request to the new
server gets sent on the closed connection, which obviously errors out.
2023-09-26 19:46:06 +09:00
Luca Casonato
6f87962a77
chore: clean up lint script (#20682)
Right now, if one of the linters fails, the all other ones continue
running in the background. This fixes this by waiting until all linters
are done before settling.
2023-09-26 04:41:07 +00:00
Nayeem Rahman
939279aa10
feat(lsp): support more vscode built-in settings (#20679) 2023-09-26 03:54:07 +01:00
Luca Casonato
8e1304ced4
perf(test): use fast ops for deno test register (#20670)
Use fast ops for test registration. This speeds up `Deno.test` and
`t.step()` significantly (2x over Deno 1.37.0).
2023-09-26 02:21:18 +00:00
Luca Casonato
a879f8c9fa
test: unflake serve_test/httpServerTcpCancellation (#20672)
Previously could flake on the op sanitizer because the
`await makeTempFile()` promise could leak out of the test. Now we ensure
the request is fully handled before returning.
2023-09-26 02:12:12 +00:00
Luca Casonato
26f431fd14
perf(test): use core.currentUserCallSite (#20669)
Speeds up `Deno.test` calls by a bit.
2023-09-26 10:01:56 +09:00
Matt Mastracci
a27ee8f368
fix(ext/http): ensure that resources are closed when request is cancelled (#20641)
Builds on top of #20622 to fix #10854
2023-09-25 17:23:55 +02:00
Mikko
83f20007aa
docs: fix broken deno manual link (#20667) 2023-09-25 14:09:27 +02:00
Nayeem Rahman
bb4b00df92
feat(lsp): cache all dependencies quick fix (#20665) 2023-09-24 23:33:52 +01:00
Bartek Iwańczuk
b2abae4771
refactor: rewrite more ops to op2 (#20666) 2023-09-24 22:07:22 +00:00
Nayeem Rahman
98ef7bd818
fix(lsp): resolve remote import maps (#20651) 2023-09-24 18:00:15 +01:00
Nayeem Rahman
33f84321b2
refactor(lsp): implement "deno.cacheOnSave" server-side (#20632) 2023-09-24 17:59:42 +01:00
Aapo Alasuutari
cb9ab9c3ac
fix(ext/node): Fix invalid length variable reference in blitBuffer (#20648) 2023-09-24 13:48:23 +03:00
Mikhail
0e2637f851
fix(ext/node): simplified array.from + map (#20653)
`Array.from` has optional second argument. Calling `map` is not required
for this case.
2023-09-24 11:23:25 +02:00
Nayeem Rahman
d955d66a3f
fix(lsp): show related information for tsc diagnostics (#20654) 2023-09-24 08:18:51 +01:00
Igor Zinkovsky
b5ba5f157e
fix(kv): unflake kv unit tests (#20640)
fixes #20635
2023-09-23 17:59:01 -07:00
Bartek Iwańczuk
68851d6f37
refactor: rewrite ops to op2 macro (#20628)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-23 19:33:31 +00:00
Matt Mastracci
65dccc389a
chore: bump deno_core (#20650) 2023-09-23 17:51:44 +00:00
Bartek Iwańczuk
99dd8097c3
refactor: rewrite ext/node/http2 to op2 macro (#20629) 2023-09-23 10:25:36 -06:00
Matt Mastracci
06297d952d
feat(ext/web): use readableStreamDefaultReaderRead in resourceForReadableStream (#20622)
We can go one level down in abstraction and avoid using the public
`ReadableStream` APIs.

This patch ~5% perf boost on small ReadableStream:

```
Running 10s test @ http://localhost:8080/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   148.32us  108.95us   3.88ms   95.71%
    Req/Sec    33.24k     2.68k   37.94k    73.76%
  668188 requests in 10.10s, 77.74MB read
Requests/sec:  66162.91
Transfer/sec:      7.70MB
```

main:

```
Running 10s test @ http://localhost:8080/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   150.23us   67.61us   4.39ms   94.80%
    Req/Sec    31.81k     1.55k   35.56k    83.17%
  639078 requests in 10.10s, 74.36MB read
Requests/sec:  63273.72
Transfer/sec:      7.36MB
```
2023-09-23 14:55:28 +00:00
Bartek Iwańczuk
b1ca67ac01
fix(jupyter): await Jupyter.display evaluation (#20646) 2023-09-23 16:30:16 +02:00
Bartek Iwańczuk
1ad097c4bf
refactor: rewrite ops using i64/usize to op2 (#20647) 2023-09-23 14:04:47 +02:00
Divy Srivastava
75a724890d
fix(node): supported arguments to randomFillSync (#20637)
Fixes https://github.com/denoland/deno/issues/20634
2023-09-23 10:04:55 +02:00
Matt Mastracci
365d1ac7c2
chore: bump deno_core + cargo update (#20636)
```
    Updating aes-gcm v0.10.2 -> v0.10.3
    Updating aho-corasick v1.1.0 -> v1.1.1
    Updating curve25519-dalek v4.1.0 -> v4.1.1
    Updating deno_core v0.214.0 -> v0.215.0
    Updating deno_ops v0.90.0 -> v0.91.0
    Updating deno_unsync v0.2.1 -> v0.3.0
    Updating md-5 v0.10.5 -> v0.10.6
    Updating rustix v0.38.13 -> v0.38.14
    Updating rustls-webpki v0.101.5 -> v0.101.6
    Updating serde_v8 v0.123.0 -> v0.124.0
    Updating sha1 v0.10.5 -> v0.10.6
    Updating smallvec v1.11.0 -> v1.11.1
    Updating tokio-util v0.7.8 -> v0.7.9
    Updating v8 v0.76.0 -> v0.77.0
    Updating winapi-util v0.1.5 -> v0.1.6
```
2023-09-22 19:51:59 +00:00
dependabot[bot]
0418d82e81
build(deps): bump aes-gcm from 0.10.2 to 0.10.3 (#20639)
Bumps [aes-gcm](https://github.com/RustCrypto/AEADs) from 0.10.2 to
0.10.3.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7e82b01cd4"><code>7e82b01</code></a>
aes-gcm v0.10.3 (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/552">#552</a>)</li>
<li><a
href="b587b27270"><code>b587b27</code></a>
aes-gcm: avoid exposing plaintext on tag verification failure (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/551">#551</a>)</li>
<li><a
href="2209bcaa9e"><code>2209bca</code></a>
build(deps): bump actions/checkout from 3 to 4 (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/548">#548</a>)</li>
<li><a
href="035ec25362"><code>035ec25</code></a>
build(deps): bump ascon from 0.3.1 to 0.4.0 (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/545">#545</a>)</li>
<li><a
href="e94ba5ab9f"><code>e94ba5a</code></a>
xsalsa20poly1305: remove source code (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/543">#543</a>)</li>
<li><a
href="31240c1285"><code>31240c1</code></a>
Update Cargo.lock</li>
<li><a
href="40240c4a85"><code>40240c4</code></a>
Update Cargo.lock</li>
<li><a
href="be4ea6fd3b"><code>be4ea6f</code></a>
Update Cargo.lock</li>
<li><a
href="2aef39e90d"><code>2aef39e</code></a>
Update Clippy version (<a
href="https://redirect.github.com/RustCrypto/AEADs/issues/534">#534</a>)</li>
<li><a
href="50710da0cb"><code>50710da</code></a>
Update Cargo.lock</li>
<li>Additional commits viewable in <a
href="https://github.com/RustCrypto/AEADs/compare/aes-gcm-v0.10.2...aes-gcm-v0.10.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aes-gcm&package-manager=cargo&previous-version=0.10.2&new-version=0.10.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/denoland/deno/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 11:20:35 -06:00
Igor Zinkovsky
035df85732
feat(kv_queues): increase max queue delay to 30 days (#20626) 2023-09-22 09:40:35 -07:00
Alessandro Scandone
15cfb67551
fix(node/package_json): Avoid panic when "exports" field is null (#20588)
Fixes #20558

Implementation: when package.json `exports` field is `null`, treat it as
if it was not set
2023-09-22 11:21:38 +02:00