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

1089 commits

Author SHA1 Message Date
Matt Mastracci
f35161d3c5
chore: Ensure we only end up with the clang version we want & upgrade libffi (#19421)
The number of clang versions installed on the build machines is too dang
high.
2023-06-08 15:16:24 +00:00
Bartek Iwańczuk
0197f42e6b
perf: use sendto syscalls (#19414)
This switches syscall used in HTTP and WS server from "writev"
to "sendto".

"DENO_USE_WRITEV=1" can be used to enable using "writev" syscall.
Doing this for easier testing of various setups.
2023-06-08 12:55:33 +02:00
David Sherret
7e91f74d2b
chore: downgrade to Rust 1.69 (#19407) 2023-06-07 21:02:43 +00:00
David Sherret
5c55f2b4fb
chore: upgrade to Rust 1.70.0 (#19345)
Co-authored-by: linbingquan <695601626@qq.com>
2023-06-06 00:35:39 +00:00
David Sherret
8829a1d362
fix: upgrade to deno_ast 0.27 (#19375)
Closes #19148
2023-06-05 19:03:39 -04:00
Kenta Moriuchi
d54ef02dfe
chore: update deno_lint to 0.46.0 (#19372) 2023-06-05 15:57:01 -04:00
Kamil Ogórek
260d2ec3a1
perf(ext/http): Migrate op_http_get_request_headers to v8::Array (#19354) 2023-06-02 22:31:27 +00:00
Bartek Iwańczuk
acc6cdc0b1
chore: forward v1.34.1 to main (#19312)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-05-29 20:26:03 -06:00
Bartek Iwańczuk
7f5a61c859
pin enum-as-inner dependency (#19311)
Ref https://github.com/bluejekyll/enum-as-inner/issues/98

Had to pin it during the release to publish crates.
2023-05-30 01:55:38 +00:00
Bartek Iwańczuk
d72e0281ff
chore: upgrade rusty_v8 to 0.73.0 (#19278) 2023-05-26 16:17:12 +02:00
denobot
935071dd0e
1.34.0 (#19246)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-24 23:38:01 +00:00
David Sherret
91ca9904b5
refactor: upgrade to deno_npm 0.6 (#19244) 2023-05-24 16:23:10 -04:00
David Sherret
787e1f0f92
fix(npm): better handling of optional peer dependencies (#19236)
Has fix for https://github.com/denoland/deno_npm/pull/9
2023-05-24 10:56:23 +02:00
Bartek Iwańczuk
01a95d677f
chore: upgrade rusty_v8 to 0.72.0 (#19228)
This commit updates rusty_v8 to 0.72.0 and by extension
V8 to version 11.5.150.1.
2023-05-24 00:11:37 +02:00
Bartek Iwańczuk
5874fc3d0a
feat: add support for globs in the config file and CLI arguments for files (#19102)
Follow up to https://github.com/denoland/deno/pull/19084.

This commit adds support for globs in the configuration file as well 
as CLI arguments for files. 

With this change users can now use glob syntax for "include" and 
"exclude" fields, like so:

```json
{
  "lint": {
    "include": [
      "directory/test*.ts",
      "other_dir/"
    ],
    "exclude": [
      "other_dir/foo*.ts",
      "nested/nested2/*"
    ]
  },
  "test": {
    "include": [
      "data/test*.ts",
      "nested/",
      "tests/test[1-9].ts"
    ],
    "exclude": [
      "nested/foo?.ts",
      "nested/nested2/*"
    ]
  }
}
```

Or in CLI args like so:
```
// notice quotes here; these values will be passed to Deno verbatim
// and deno will perform glob expansion

$ deno fmt --ignore="data/*.ts"
$ deno lint "data/**/*.ts"
```

Closes https://github.com/denoland/deno/issues/17971
Closes https://github.com/denoland/deno/issues/6365
2023-05-23 03:39:59 +02:00
David Sherret
7b4c483aa1
fix(npm): store npm binary command resolution in lockfile (#19219)
Part of #19038

Closes #19034 (eliminates the time spent re-resolving)
2023-05-22 16:55:04 -04:00
Matt Mastracci
612226de8e
chore(cli): One Rust test per JS and Node unit test file (#19199)
This runs our `js_unit_tests` and `node_unit_tests` in parallel, one
rust test per JS unit test file. Some of our JS tests don't like running
in parallel due to port requirements, so this also makes those use a
specific port-per-file. This does not attempt to make the node-compat
tests work.
2023-05-22 13:35:59 -06:00
Bartek Iwańczuk
af72a9c657
Revert "perf: use jemalloc as global allocator (#18957)" (#19187)
This reverts commit 798c1ad0f1.

Reverting because this change caused a spike in memory usage, but we
can't fully realise gains from lower GC pressure from more optimal
malloc/ free provided by "jemalloc". 

We might revisit the topic in future.
2023-05-19 09:10:33 -04:00
David Sherret
55db691174
feat(task): glob expansion (#19084)
This adds cross-platform glob expansion to deno task.
2023-05-18 15:56:10 -04:00
denobot
877b38b370
chore: forward v1.33.4 release commit to main (#19181)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.4

Please ensure:
- [x] Everything looks ok in the PR
- [ ] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.4 && git checkout -b forward_v1.33.4 upstream/forward_v1.33.4
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-18 20:44:10 +02:00
David Sherret
41f618a1df
fix(npm): improved optional dependency support (#19135)
Note: If the package information has already been cached, then this
requires running with `--reload` or for the registry information to be
fetched some other way (ex. the cache busting).

Closes #15544

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-17 17:38:50 -04:00
Matt Mastracci
ad22336245
feat(ext/web): Request higher-resolution timer on Windows if user requests setTimeout w/short delay (#19149)
If a timer is requested with <=100ms resolution, request the high-res
timer. Since the default Windows timer period is 15ms, this means a
100ms timer could fire at 115ms (15% late). We assume that timers longer
than 100ms are a reasonable cutoff here.

The high-res timers on Windows are still limited. Unfortuntely this
means that our shortest duration 4ms timers can still be 25% late, but
without a more complex timer system or spinning on the clock itself,
we're somewhat bounded by the OS' scheduler itself.
2023-05-17 13:59:55 -06:00
Bartek Iwańczuk
cb87cb0283
fix: support "fetch" over HTTPS for IP addresses (#18499)
This commit adds support for connecting to IP addresses over HTTPS.

This is done by updating "rustls" to "0.21.0" and other related crates.

Closes https://github.com/denoland/deno/issues/7660
Closes https://github.com/denoland/deno/issues/17967

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-05-17 02:19:23 +02:00
Leo Kettmeir
867a6d3032
refactor(node): reimplement http client (#19122)
This commit reimplements most of "node:http" client APIs using
"ext/fetch".

There is some duplicated code and two removed Node compat tests that
will be fixed in follow up PRs.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-17 01:20:32 +02:00
Luca Casonato
bfe93c6e81
refactor(ext/http): generic abstract listeners (#19132)
Improve abstractions around listeners to support listener + connection
network stream combinations not previously possible (for example a
listener exposed as a Tcp, creating Unix network streams).
2023-05-15 16:55:47 +02:00
Bartek Iwańczuk
cf6f965e25
chore: upgrade rusty_v8 to 0.71.2 (#19116)
Closes https://github.com/denoland/deno/issues/19021
2023-05-13 21:11:40 +02:00
denobot
7476ee34fa
chore: forward v1.33.3 release commit to main (#19111)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.3

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.3 && git checkout -b forward_v1.33.3 upstream/forward_v1.33.3
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-12 14:47:27 +00:00
Bartek Iwańczuk
dad7744f2c
chore: upgrade rusty_v8 to 0.71.1 (#19104)
Fixes https://github.com/denoland/deno/issues/19021
2023-05-12 04:09:32 +02:00
Miroslav Bajtoš
78c7ff91e3
chore: upgrade thiserror and deno_lockfile (#19073)
Upgrade `thiserror` to `1.40.0`.

Remove version pinning so that consumers of deno crates can install
newer versions of `thiserrors` without waiting for us to upgrade our
Cargo.toml.

Upgrade `deno_lockfile` to `0.14.0` to bring in `thiserror` upgrade, see
https://github.com/denoland/deno_lockfile/pull/1.
2023-05-11 16:14:51 +02:00
Yarden Shoham
20c42286f8
chore(deps): bump tokio version to 1.28.1 (#19069) 2023-05-11 14:52:56 +02:00
David Sherret
28aa489de9
feat(compile): unstable npm and node specifier support (#19005)
This is the initial support for npm and node specifiers in `deno
compile`. The npm packages are included in the binary and read from it via
a virtual file system. This also supports the `--node-modules-dir` flag,
dependencies specified in a package.json, and npm binary commands (ex.
`deno compile --unstable npm:cowsay`)

Closes #16632
2023-05-10 20:06:59 -04:00
Matt Mastracci
234cef982c
feat(ext/http): Automatic compression for Deno.serve (#19031)
`Content-Encoding: gzip` support for `Deno.serve`. This doesn't support
Brotli (`br`) yet, however it should not be difficult to add. Heuristics
for compression are modelled after those in `Deno.serveHttp`.

Tests are provided to ensure that the gzip compression is correct. We
chunk a number of different streams (zeros, hard-to-compress data,
already-gzipped data) in a number of different ways (regular, random,
large/small, small/large).
2023-05-10 13:23:14 +02:00
Satya Rohith
3e1cc5dbf5
chore: upgrade tokio to 1.28 (#19053) 2023-05-09 20:13:29 +05:30
David Sherret
723d4b0382
perf(fmt): faster formatting for minified object literals (#19050)
Has fix for
https://github.com/dprint/dprint-plugin-typescript/issues/520
2023-05-09 00:53:58 +02:00
Bartek Iwańczuk
7da8b1d9bb
Revert "perf(core): use jemalloc for V8 array buffer allocator (#18875)" (#19046)
This reverts commit 022aae9854.
2023-05-09 03:42:34 +09:00
David Sherret
a6c47ee740
refactor(ext/node): combine deno_node::Fs with deno_fs::FileSystem (#18991) 2023-05-05 16:44:24 +00:00
David Sherret
5270c43e41
refactor(ext/fs): boxed deno_fs::FileSystem (#18945)
1. Boxed `File` and `FileSystem` to allow more easily passing this
through the CLI code (as shown within this pr).
2. `StdFileResource` is now `FileResource`. `FileResource` now contains
an `Rc<dyn File>`.
2023-05-04 14:28:42 -04:00
denobot
4b645676d6
chore: forward v1.33.2 release commit to main (#18990)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.2

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.2 && git checkout -b forward_v1.33.2 upstream/forward_v1.33.2
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-04 19:19:35 +02:00
Bartek Iwańczuk
798c1ad0f1
perf: use jemalloc as global allocator (#18957)
Follow up to https://github.com/denoland/deno/pull/18875 that enables
`jemalloc` as a global allocator for the Deno CLI.
2023-05-03 00:36:33 +02:00
Divy Srivastava
022aae9854
perf(core): use jemalloc for V8 array buffer allocator (#18875)
This commits changes "deno_core" to use jemalloc allocator as an
allocator
for V8 array buffers. This greatly improves our GC characteristics as we
are using
a lot of short lived array buffers. They no longer go through the
expensive
malloc/free cycle using the default Rust allocator, but instead use
jemallocator's
memory pool.

As a result the flamegraphs for WS/HTTP server flamegraphs no longer
show
stacks for malloc/free around ops that use ZeroCopyBuf and &[u8].

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-02 20:17:11 +05:30
Bartek Iwańczuk
97147faf89
chore: release extension crates, unpin tokio (#18954) 2023-05-02 11:30:11 +00:00
David Sherret
96e214d9d0
fix(fmt/json): support formatting number with exponent and no sign (#18894)
Numbers with an exponent and no sign (ex. `1e1`) would fail to parse.
2023-04-30 10:03:39 -04:00
Divy Srivastava
64e072e499
fix(ext/websocket): update fastwebsockets to 0.3.1 (#18916)
Fixes https://github.com/denoland/deno/issues/18912
Fixes https://github.com/denoland/deno/issues/18808
2023-04-29 22:39:18 +05:30
denobot
6369098ad7
chore: forward v1.33.1 release commit to main (#18897)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-28 21:14:26 +02:00
denobot
39ece1fe0d
1.33.0 (#18879)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-28 01:18:57 +02:00
Bartek Iwańczuk
6cd62ea5e9
chore: upgrade rusty_v8 to 0.71.0 (#18868) 2023-04-27 20:50:46 +02:00
Levente Kurusa
c3d670dbc9
feat(node/crypto): Elliptic Curve Diffie-Hellman (ECDH) support (#18832)
- ECDH class
- crypto.createECDH()
- Supported curves:
  - secp256k1
  - prime256v1 / secp256r1
  - secp384r1
  - secp224r1

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-27 18:31:35 +02:00
Bartek Iwańczuk
4192978c3a
feat(lint): add Deno.run to no-deprecated-deno-api (#18869)
This upgrade includes a warning for the deprecated "Deno.run()" API.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-04-27 02:52:52 +00:00
Bartek Iwańczuk
106e4c475f
chore: upgrade rusty_v8 to 0.70.0 (#18844)
Closes https://github.com/denoland/deno/issues/18369
2023-04-26 10:02:03 +02:00
Nayeem Rahman
667acb075c
fix(lsp): show dependency errors for repeated imports (#18807) 2023-04-24 23:52:27 +00:00