0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00
Commit graph

753 commits

Author SHA1 Message Date
Nayeem Rahman
6999048278
fix: respect lockfile for multiple available jsr versions (#28375) 2025-03-03 16:57:25 +00:00
David Sherret
5a0fca9a61
fix(fmt/md): handle callout followed by non-text (#28333) 2025-02-27 22:29:58 +00:00
David Sherret
ff970bd9fe
fix: deno_ast 0.46 (#28331) 2025-02-27 21:28:36 +00:00
Nathan Whitaker
69b59b2296
perf(http): instantiate generic functions in deno_http, increase opt-level for some more hyper deps (#28317)
results on my machine (Macbook pro w/ M3 Max)

canary (hello world):
```
❯ oha -c 125 -n 4000000 --no-tui --disable-compression http://localhost:8000
Summary:
  Success rate: 100.00%
  Total:        31.0160 secs
  Slowest:      0.0083 secs
  Fastest:      0.0005 secs
  Average:      0.0010 secs
  Requests/sec: 128965.6454

  Total data:   49.59 MiB
  Size/request: 13 B
  Size/sec:     1.60 MiB
```

this PR (hello world):
```
❯ oha -c 125 -n 4000000 --no-tui --disable-compression http://localhost:8000
Summary:
  Success rate: 100.00%
  Total:        28.4050 secs
  Slowest:      0.0085 secs
  Fastest:      0.0001 secs
  Average:      0.0009 secs
  Requests/sec: 140820.2060

  Total data:   49.59 MiB
  Size/request: 13 B
  Size/sec:     1.75 MiB
```

---

Two changes here:
- use `opt-level` 3 for some of hyper's deps, since profile overrides
are not transitive
- As noted in the [cargo
reference](https://doc.rust-lang.org/cargo/reference/profiles.html#overrides-and-generics)
generic functions _may_ be optimized at the opt-level of the
_instantiating_ crate, rather than the defining crate. So currently it's
possible that some of the functions in `deno_http` are being compiled at
a lower optimization level. This PR ensures the generics are
instantiated in `deno_http`, which theoretically should guarantee they
actually use opt-level 3.

To allow embedders to still provide a custom property extractor, I put
this behind a feature flag.
2025-02-27 10:07:11 -08:00
Dimitris Apostolou
cdf6ea32c4
chore: prefer workspace dependencies in order to avoid duplicate crates (#28281) 2025-02-26 14:55:47 +00:00
Bartek Iwańczuk
bd372dcdc2
refactor: update deno_core to enable pointer compression (#28306)
Exposes `deno_core/v8_enable_pointer_compression` feature:

d67efcba0a
2025-02-26 04:00:45 +01:00
Nayeem Rahman
0f76f6c211
perf(lsp): don't set resolver npm reqs if unchanged (#28302) 2025-02-25 21:56:50 +00:00
denobot
b9cffda7c9
chore: forward v2.2.2 release commit to main (#28292)
This is the release commit being forwarded back to main for 2.2.2

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-02-25 14:36:11 +05:30
David Sherret
234deac856
fix(config): allow specifying absolute path for patch and fix panic with exports in package.json (#28279)
Closes #28250
Closes #26031
2025-02-24 17:33:01 +00:00
Marvin Hagemeister
6ac6e933dc
fix(lint): update deno_lint (#28271)
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2025-02-24 18:05:17 +01:00
David Sherret
ebe4055b2d
refactor(resolver/node): use deno_path_util::is_relative_specifier (#28238)
Should be slightly faster too because it no longer heap allocates.
2025-02-21 23:27:29 +00:00
Nayeem Rahman
876bac445a
fix(lsp): close server on exit notification (#28232) 2025-02-21 20:02:56 +00:00
David Sherret
a9f404e479
fix(check): regression - implicit jsxImportSource was not resolving (#28228) 2025-02-21 14:09:57 -05:00
denobot
84fabecc9b
chore: forward v2.2.1 release commit to main (#28213)
This is the release commit being forwarded back to main for 2.2.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2025-02-21 01:35:34 +00:00
David Sherret
4523ddd8d7
fix(publish): support jsx/tsx (#28188) 2025-02-20 22:39:51 +00:00
David Sherret
3da3fe8f7b
fix: better jsx workspace config resolution (#28186)
* https://github.com/denoland/deno_config/pull/158
2025-02-19 18:50:44 -05:00
denobot
2968816863
2.2.0 (#28175)
Bumped versions for 2.2.0

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-18 23:12:17 +00:00
David Sherret
3747d2759a
feat: support XDG_CACHE_HOME for deno dir on macos (#28173)
* https://github.com/denoland/deno_cache_dir/pull/73
2025-02-18 14:56:07 -05:00
snek
979e2f7158
feat: Upgrade V8 to 13.4 (#28080)
- upgrade v8 to 13.4
- turbocall conversion for arraybuffers is now much more complex, so use
cranelift
- misc updates for deprecated fns
- v8 default stack size is too small now, causing stack overflow
exceptions in some tests
- add syscall shim to support new syscall in old sysroot
2025-02-14 11:26:47 +00:00
David Sherret
c08a4b61ac
fix(workspace): diagnostic for imports in member with importMap at root (#28116)
Closes https://github.com/denoland/deno/issues/28110
2025-02-14 11:04:25 +00:00
denobot
4921411bb2
chore: forward v2.1.10 release commit to main (#28099)
This is the release commit being forwarded back to main for 2.1.10

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-13 08:33:19 +00:00
Bartek Iwańczuk
55c5b07535
perf(lsp): add built-in tracing support for the LSP (#27843)
adds tracing and opentelemetry exporting to the LSP.

enable it in `.vscode/settings.json` (or wherever you configure the
LSP), like

```
{
  "deno.tracing": true
}
```

which will by default export opentelemetry traces to `localhost:4317`
or
```
{
  "deno.tracing": {
    // all fields optional
     "collector": "openTelemetry" (default) | "logging" (output in lsp log window)
     "collectorEndpoint": "http://localhost:4318" (for opentelemetry)
     "enable": true | false,
     "filter": "info" // defaults to "info", but can be any span filter
   }
}
```

---

a full working setup would be 

1: Run jaeger (an opentelemetry collector with a nice UI):
```
docker run --rm -p 16686:16686 -p 4317:4317 jaegertracing/jaeger
```
2. Enable in .vscode/settings.json
```
{
  "deno.tracing": true
}
```
3. Restart LSP (right now it only will start the opentelemetry exporter
on LSP startup)
3. open `http://localhost:16686` in your browser

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2025-02-12 08:40:40 -08:00
Leo Kettmeir
7253820764
refactor: object wrap WebGPU (#27665)
Fixes #25874
Fixes #26760
Fixes #24288
Fixes #24798
Fixes #25627
Fixes #25915
Fixes #26769
2025-02-12 13:45:41 +00:00
David Sherret
7a112643f5
refactor(lsp): remove Send + Sync requirement (#28035) 2025-02-12 13:37:47 +00:00
Bartek Iwańczuk
b9183c737f
fix: allow creating TSC host without a snapshot (#28058) 2025-02-11 14:34:59 +00:00
Nayeem Rahman
f630057243
ci(lsp): timeout tests after 5 minutes (#28036) 2025-02-10 16:15:43 +00:00
Nayeem Rahman
bc8554878e
fix(check): support sloppy imports with "compilerOptions.rootDirs" (#27973) 2025-02-05 23:08:10 +00:00
Nathan Whitaker
b440d2d4f7
feat(outdated): interactive update (#27812)
interactively select which packages to upgrade. a future improvement
could be to add a way to select the version as well, though not sure how
valuable that would be.
2025-02-04 15:41:56 -08:00
Divy Srivastava
28834a89bb
fix(ext/node): implement SQLite Session API (#27909)
https://nodejs.org/api/sqlite.html#class-session

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-04 21:59:13 +05:30
denobot
d9db0b35e0
chore: forward v2.1.9 release commit to main (#27888)
This is the release commit being forwarded back to main for 2.1.9

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-31 03:02:00 +01:00
denobot
1b7719c5d6
chore: forward v2.1.8 release commit to main (#27882)
This is the release commit being forwarded back to main for 2.1.8

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-30 21:09:06 +01:00
Divy Srivastava
5c2fc88ba6
fix(core): Fix create_stack_trace from empty trace (#27873)
Fixes https://github.com/denoland/deno/issues/27849
2025-01-30 18:12:44 +05:30
Nayeem Rahman
0dd334b512
feat(check/lsp): support "compilerOptions.rootDirs" (#27844) 2025-01-30 00:20:25 +00:00
Bartek Iwańczuk
a5a1cce50d
feat(ext/cache): support lscache (#27628)
This commit adds support for lscache backend for
the Web cache API.

The cache cab be configured using `DENO_CACHE_LSC_ENDPOINT`
env var.
2025-01-28 18:51:06 +00:00
snek
02ed300525
feat(node:http): add http information support (#27381)
Implements some client and server events to improve compat.

Fixes: https://github.com/denoland/deno/issues/27239
2025-01-28 17:37:53 +00:00
David Sherret
4648fc4570
fix(check): compiler options from workspace members (#27785)
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2025-01-28 10:49:58 -05:00
Nathan Whitaker
094e268002
fix(ext/node): implement aes-128-ctr, aes-192-ctr, and aes-256-ctr (#27630)
Fixes https://github.com/denoland/deno/issues/24864

Need to add some tests, also unsure about the right counter size (went
with 128 bit to be safe)

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-01-27 23:35:51 -08:00
David Sherret
48e86c7025
chore: fix deno_resolver non-sync build (#27824) 2025-01-27 15:28:33 +00:00
Divy Srivastava
8ccc05e503
fix(core): handle dyn imports exceeding call stack size (#27825)
Fixes https://github.com/denoland/deno/issues/27736
2025-01-27 09:10:12 +05:30
Cre3per
be080784dd
fix(ext/fetch): update h2 to fix sending a PROTOCOL_ERROR instead of REFUSED_STREAM when receiving oversized headers (#27531)
Fixes #26490

Related PR in h2 https://github.com/hyperium/h2/pull/792  
Related release of h2 https://github.com/hyperium/h2/releases/tag/v0.4.6
2025-01-26 23:04:53 +00:00
David Sherret
e475749935
refactor: make PackageJsonCache injectable (#27800)
This used to be complicated to do, but is now trivial.
2025-01-24 09:50:25 -05:00
Yoshiya Hinosawa
3d8834f957
chore: update ensure_registry_files_local to handle scoped packages (#27801) 2025-01-24 21:47:15 +09:00
David Sherret
273ec9fbf2
refactor: add WorkspaceFactory and ResolverFactory (#27766)
Allows easily constructing a `DenoResolver` using the exact same logic
that we use in the CLI (useful for dnt and for external bundlers). This
code is then used in the CLI to ensure the logic is always up-to-date.

```rs
use std::rc::Rc;

use deno_resolver:🏭:ResolverFactory;
use deno_resolver:🏭:WorkspaceFactory;
use sys_traits::impls::RealSys;

let sys = RealSys;
let cwd = sys.env_current_dir()?;
let workspace_factory = Rc::new(WorkspaceFactory::new(sys, cwd, Default::default()));
let resolver_factory = ResolverFactory::new(workspace_factory.clone(), Default::default());
let deno_resolver = resolver_factory.deno_resolver().await?;
```
2025-01-23 18:52:55 -05:00
David Sherret
563a7c284e
refactor: use DataUrl from deno_media_type (#27783)
This was moved from deno_graph to deno_media_type.
2025-01-22 20:35:16 +00:00
denobot
3ba212649f
chore: forward v2.1.7 release commit to main (#27767)
This is the release commit being forwarded back to main for 2.1.7

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_v2.1.7 && git checkout -b forward_v2.1.7 upstream/forward_v2.1.7
```

Don't need this PR? Close it.

cc @crowlKats

---------

Co-authored-by: crowlKats <crowlKats@users.noreply.github.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2025-01-21 19:25:12 -08:00
David Sherret
9aa02769c8
perf(compile): remove swc from denort (#27721)
This is achieved by storing CJS export analysis ahead of time in the
executable, which should also improve the performance of `denort` by
this never being done anymore (I'm too lazy atm to bench this, but it
will be significant for some programs).
2025-01-19 14:23:07 -05:00
David Sherret
57dd66ec3d
refactor: move denort to separate crate (#27688)
This slightly degrades the performance of CJS export analysis on
subsequent runs because I changed it to no longer cache in the DENO_DIR
with this PR (denort now properly has no idea about the DENO_DIR). We'll
have to change it to embed this data in the binary and that will also
allow us to get rid of swc in denort (will do that in a follow-up PR).
2025-01-17 20:39:29 +00:00
Leo Kettmeir
054075730c
refactor: update deno_core and use more concrete errors (#27620)
waiting for https://github.com/denoland/deno_core/pull/1043

Fixes #27672
2025-01-17 09:41:52 -08:00
Bartek Iwańczuk
0050857f51
refactor: add 'deno_process' crate (#27680)
Untangled the whole `runtime/ops/process.rs` from `ext/node/` and moved
to a separate `ext/process` crate.
2025-01-17 13:30:14 +01:00
denobot
94dc5b16f5
chore: forward v2.1.6 release commit to main (#27705)
This is the release commit being forwarded back to main for 2.1.6

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-17 02:09:13 +01:00