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

1211 commits

Author SHA1 Message Date
Luca Casonato
08b99f3909
chore: update base64 crate (#20877) 2023-10-26 18:39:04 +02:00
Bartek Iwańczuk
093b3eee58
chore: update deno_core and port all remaining ops to op2 (#20954)
Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-25 13:43:38 +02:00
David Sherret
59a5fe530f
refactor: upgrade to deno_ast 0.31 and deno_graph 0.59 (#20965) 2023-10-24 21:43:19 +00:00
David Sherret
8f065a60e7
fix: improved using declaration support (#20959)
Upgrades to deno_ast 0.30.
2023-10-24 09:37:02 -04:00
Yoshiya Hinosawa
fb73eb1e9d
feat(unstable): allow bare specifier for builtin node module (#20728)
closes #20566
2023-10-20 13:02:08 +09:00
denobot
5da1bd802c
chore: forward v1.37.2 release commit to main (#20897)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-13 03:12:06 +00:00
Bartek Iwańczuk
c464cd7073
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
2023-10-12 15:55:50 +00:00
Bartek Iwańczuk
cee221109a
fix(node/http2): fixes to support grpc (#20712)
This commit improves "node:http2" module implementation, by enabling
to use "options.createConnection" callback when starting an HTTP2
session.
This change enables to pass basic client-side test with "grpc-js/grpc"
package.
Smaller fixes like "Http2Session.unref()" and "Http2Session.setTimeout()"
were handled as well.

Fixes #16647
2023-10-12 14:03:19 +00:00
David Sherret
93e07fa118
fix: upgrade dprint-plugin-markdown 0.16.2 and typescript 0.88.1 (#20879)
Markdown:

* fix: hard break in list was incorrectly being converted to soft with
hard break
6678390b27

TypeScript:

* fix: multi-line string indent was broken in some cases
(https://github.com/dprint/dprint-plugin-typescript/pull/566)
* feat: add parens around unary expressions in in/instanceof
(https://github.com/dprint/dprint-plugin-typescript/pull/564)
2023-10-11 05:48:03 +00:00
Bartek Iwańczuk
5d98a544b4
refactor: rewrite several extension ops to op2 (#20457)
Rewrites following extensions:
- `ext/web`
- `ext/url`
- `ext/webstorage`
- `ext/io`

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-05 14:34:38 +02:00
Divy Srivastava
1a81b2826d
refactor: rewrite websocket to use op2 macro (#20140)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-04 21:43:58 +00:00
Bartek Iwańczuk
494822175f
chore: upgrade deno_core to 0.220.0 (#20766) 2023-10-03 23:01:34 +00:00
David Sherret
54fcf539c8
fix(npm): upgrade to deno_npm 0.15.2 (#20772)
* fix: handle optional deps not found in dependencies map
(https://github.com/denoland/deno_npm/pull/38)
* fix: resolve a version requirement to the latest dist tag if it
matches (https://github.com/denoland/deno_npm/pull/37)

Closes #20771
2023-10-03 17:35:47 +00:00
Nayeem Rahman
2d1af0cf51
feat(lsp): jupyter notebook analysis (#20719) 2023-09-29 20:44:59 +01:00
Igor Zinkovsky
61b91e10ad
fix(ext/kv): send queue wake messages accross different kv instances (#20465)
fixes #20454

Current KV queues implementation assumes that `enqueue` and
`listenQueue` are called on the same instance of `Deno.Kv`. It's
possible that the same Deno process opens multiple KV instances pointing
to the same fs path, and in that case `listenQueue` should still get
notified of messages enqueued through a different KV instance.
2023-09-29 11:40:36 -07: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
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
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
Nayeem Rahman
cb154d6afa
chore(lsp): bump tower-lsp to 0.20.0 (#20693) 2023-09-26 21:57:14 +01: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
Matt Mastracci
65dccc389a
chore: bump deno_core (#20650) 2023-09-23 17:51:44 +00: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
Matt Mastracci
2a1781afcb
chore: bump Rust to 1.72.1 and cargo update (#20572)
> 1.72.1 resolves a few regressions introduced in 1.72.0:

> - [Partially revert codegen change, improving
codegen](https://github.com/rust-lang/rust/pull/115236)
> - [rustdoc: Fix self ty params in objects with
lifetimes](https://github.com/rust-lang/rust/pull/115276)
> - [Fix regression in compile
times](https://github.com/rust-lang/rust/pull/114948)
> - Resolve some ICEs in the compiler:
>   - [#115215](https://github.com/rust-lang/rust/pull/115215)
>   - [#115559](https://github.com/rust-lang/rust/pull/115559)
2023-09-20 01:48:36 +00:00
denobot
997aa604df
1.37.0 (#20574)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-09-19 20:29:17 +00:00
Luca Casonato
2772d302f5
perf: make deno test 10x faster (#20550) 2023-09-19 12:10:20 +02:00
David Sherret
3de9af4d0b
fix(npm): properly handle legacy shasum of package (#20557)
Closes #20554
2023-09-18 16:40:41 -04:00
David Sherret
0709c051f8
feat(unstable): package manager (#20517)
Adds an experimental unstable built-in package manager to Deno, but it is
currently not usable because the registry infrastructure hasn't been
setup and it points to a non-existent url by default. The default
registry url can be configured via the `DENO_REGISTRY_URL` environment
variable.
2023-09-18 10:46:44 -04:00
Bartek Iwańczuk
bf07604113
feat: Add "deno jupyter" subcommand (#20337)
This commit adds "deno jupyter" subcommand which
provides a Deno kernel for Jupyter notebooks.

The implementation is mostly based on Deno's REPL and
reuses large parts of it (though there's some clean up that
needs to happen in follow up PRs). Not all functionality of
Jupyter kernel is implemented and some message type
are still not implemented (eg. "inspect_request") but
the kernel is fully working and provides all the capatibilities
that the Deno REPL has; including TypeScript transpilation
and npm packages support.

Closes https://github.com/denoland/deno/issues/13016

---------

Co-authored-by: Adam Powers <apowers@ato.ms>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-16 02:42:09 +02:00
Bartek Iwańczuk
5a1505db67
feat(ext/node): http2.connect() API (#19671)
This commit improves compatibility of "node:http2" module by polyfilling
"connect" method and "ClientHttp2Session" class. Basic operations like
streaming, header and trailer handling are working correctly. 
Refing/unrefing is still a TODO and "npm:grpc-js/grpc" is not yet working
correctly.

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-15 21:51:25 +02:00
Matt Mastracci
dc505e905e
chore(cli): update chrono to remove broken time dep (#20508)
Fixes the last dependabot security warning
2023-09-14 13:17:38 -06:00
Matt Mastracci
5ba89666af
chore: update deno_core + cargo update (#20507) 2023-09-14 19:00:25 +00:00
David Sherret
6dc8682b9a
feat: explicit resource management in TypeScript (#20506)
This adds support for `using` and `await using` declarations in
TypeScript only. We need to wait for v8 to support it for this to work
in JS.
2023-09-14 18:08:59 +00:00
David Sherret
54890ee98b
chore(tests): ability to pattern match unordered lines (#20488)
This adds the ability to pattern match unordered lines. For example, the
downloading messages may appear in any order

```
[UNORDERED_START]
Download https://localhost:4546/a.ts
Download https://localhost:4546/b.ts
[UNORDERED_END]
Hello!
```

Additionally, I've made the pattern matching slightly more strict and the output better.
2023-09-14 16:21:57 +00:00
David Sherret
e60cbfadc0
refactor: use TaskQueue from deno_unsync (#20485) 2023-09-13 23:36:24 -04:00
Matt Mastracci
81d50e1b66
chore: bump deno_core and cargo update (#20480)
Bump deno_core, pulling in new rusty_v8. Requires some op2/deprecation
fixes.
2023-09-13 22:01:31 +00:00
Matt Mastracci
950e0e9cd6
fix(ext/http): create a graceful shutdown API (#20387)
This PR implements a graceful shutdown API for Deno.serve, allowing all
current connections to drain from the server before shutting down, while
preventing new connections from being started or new transactions on
existing connections from being created.

We split the cancellation handle into two parts: a listener handle, and
a connection handle. A graceful shutdown cancels the listener only,
while allowing the connections to drain. The connection handle aborts
all futures. If the listener handle is cancelled, we put the connections
into graceful shutdown mode, which disables keep-alive on http/1.1 and
uses http/2 mechanisms for http/2 connections.

In addition, we now guarantee that all connections are complete or
cancelled, and all resources are cleaned up when the server `finished`
promise resolves -- we use a Rust-side server refcount for this.

Performance impact: does not appear to affect basic serving performance
by more than 1% (~126k -> ~125k)

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-12 00:06:38 +00:00
Nayeem Rahman
f75a17521d
fix(lsp): respect configured exclusions for testing APIs (#20427)
LSP testing APIs now obey the various file inclusion settings:
- Modules shown in the text explorer now respect the `exclude`,
`test.exclude` and `test.include` fields in `deno.json`, as well as
`deno.enablePaths` in VSCode settings.
- Modules with testing code lens now respect the `"exclude"`,
`test.exclude` and `test.include` fields in `deno.json`. Code lens
already respects `deno.enablePaths`.
2023-09-09 19:37:01 +01:00
Matt Mastracci
947865c054
feat(cli): allow --log-level=trace for additional deep debugging (#20426)
This allows us to opt in to extremely detailed tracing from dependency
libraries, like so:

```
cargo run --features tracing/log,tracing/max_level_trace -- test --log-level=trace -A --unstable ./cli/tests/unit/serve_test.ts 
```

It will not impact normal operation as it requires the
`tracing/max_level_trace` and `tracing/log` to be active.

Note that tracing is already a dependency -- this just makes it a direct
dep of cli so we can access its features more easily.
2023-09-09 12:03:19 -06:00
David Sherret
c521c5fe77
feat: lockfile v3 (#20424)
Details: https://github.com/denoland/deno_lockfile/pull/8
2023-09-08 14:34:57 -04:00
David Sherret
1b7d5937d9
fix(fmt/markdown): improve ignore comment handling (#20421)
Two bug fixes:

* https://github.com/dprint/dprint-plugin-markdown/pull/85
* https://github.com/dprint/dprint-plugin-markdown/pull/84
2023-09-08 16:38:42 +00:00
Nayeem Rahman
17276a1df9
fix: empty include in config file excludes all (#20404) 2023-09-08 15:04:45 +01:00
David Sherret
3fc19dab47
feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
Divy Srivastava
9befa566ec
fix(ext/node): implement AES GCM cipher (#20368)
Adds support for AES-GCM 128/256 bit keys in `node:crypto` and
`setAAD()`, `setAuthTag()` and `getAuthTag()`

Uses https://github.com/littledivy/aead-gcm-stream

Fixes https://github.com/denoland/deno/issues/19836
https://github.com/denoland/deno/issues/20353
2023-09-06 11:01:50 +05:30
Igor Zinkovsky
1dc5d42114
fix(ext/kv): add a warning for listenQueue if used with remote KV (#20341) 2023-09-03 17:47:52 -07:00
Nayeem Rahman
e1fb48524d
Reland "feat(lsp): enable via config file detection (#20334)" (#20349) 2023-09-01 21:13:13 +01:00
Bartek Iwańczuk
2b191c6e9d
chore: forward v1.36.4 to main (#20352)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-09-01 18:08:58 +00:00
Bartek Iwańczuk
cd0fcc2257
chore: upgrade deno_core to 0.208.0 (#20340) 2023-08-31 19:56:25 +00:00
Matt Mastracci
653e668c20
chore: bump deno_core to 0.207.0 (#20333)
rusty_v8 -> "0.75.1"
2023-08-30 21:45:47 +02:00
Nayeem Rahman
1cce306022
fix(runtime/permissions): Resolve executable specifiers in allowlists and queries (#14130)
Closes #14122.

Adds two extensions to `--allow-run` behaviour:
- When `--allow-run=foo` is specified and `foo` is found in the `PATH`
at startup, `RunDescriptor::Path(which("foo"))` is added to the
allowlist alongside `RunDescriptor::Name("foo")`. Currently only the
latter is.
- When run permission for `foo` is queried and `foo` is found in the
`PATH` at runtime, either `RunDescriptor::Path(which("foo"))` or
`RunDescriptor::Name("foo")` would qualify in the allowlist. Currently
only the latter does.
2023-08-30 18:52:01 +01:00