0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 20:25:12 -05:00
Commit graph

13064 commits

Author SHA1 Message Date
David Sherret
679902a108
perf(node_resolver): reduce url to/from path conversions (#27839)
Extracted out of https://github.com/denoland/deno/pull/27838/files

Reduces some allocations by accepting either a pathbuf or url for the
referrer for resolution and returning either a pathbuf or url at the
end, which the caller can then convert into to their preferred state.

This is about 4% faster when still converting the final result to a url
and 6% faster when keeping the result as a path in a benchmark I ran.
2025-01-27 15:23:20 -05:00
David Sherret
92dce12af7
fix(install/global): warn about not including auto-discovered config file (#27745)
Closes #17855
2025-01-27 14:18:27 -05:00
Divy Srivastava
88490d0927
fix(ext/crypto): export private x25519 JWK key (#27828)
Ref https://github.com/denoland/deno/issues/26431
2025-01-27 22:25:00 +05:30
Marvin Hagemeister
21e8260cc9
fix(lint): update jsx/react related rules and names (#27836)
This PR updates `deno_lint` which contains a couple of bug fixes for
JSX/React related rules. The react rules now have all a `react-*` prefix
in the name as well.
2025-01-27 16:54:35 +00:00
David Sherret
48e86c7025
chore: fix deno_resolver non-sync build (#27824) 2025-01-27 15:28:33 +00:00
Marvin Hagemeister
4e655e543f
feat: Deno.cwd() no longer requires --allow-read permission (#27192)
This commit changes "Deno.cwd()" (as well as "process.cwd()") to no
longer require full "--allow-read" permission. This change was meant to be done
in Deno 2.0.0, but somehow it slipped. Requiring full read permission
just to read the CWD is a mistake, because CWD can already be obtained
with no permission by throwing an error in JS and inspecting its stack.

Fixes https://github.com/denoland/deno/issues/27110

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-27 15:13:59 +01:00
Divy Srivastava
533993efcf
fix(ext/node): implement X509Certificate#checkHost (#27821)
Fixes https://github.com/denoland/deno/issues/27619
2025-01-27 16:33:03 +05:30
Divy Srivastava
f678a17313
fix(ext/node): fix panic when invalid AES GCM key size (#27818)
Fixes https://github.com/denoland/deno/issues/27807
2025-01-27 16:32:25 +05:30
Divy Srivastava
a2d0872225
fix(ext/node): fix async variant of brotliDecompress (#27815)
Fixes https://github.com/denoland/deno/issues/27729
2025-01-27 09:13:47 +05:30
Divy Srivastava
802b9d6309
chore(ext/node): remove internal/streams/buffer_list.mjs (#27822)
This was never used internally and not supposed to be public either.
2025-01-27 09:13:06 +05:30
Divy Srivastava
1efc77331c
fix(ext/node): scrypt panic when log_n > 64 (#27816)
Throws an error instead of panic. Ref
https://github.com/denoland/deno/issues/27716
2025-01-27 09:12:51 +05:30
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
Yoshiya Hinosawa
2511458ac1
fix(ext/node): npm:mqtt compatibility (#27792) 2025-01-27 11:47:32 +09:00
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
Bartek Iwańczuk
23adf99e83
perf(lsp): cache completion item resolution during request (#27831)
This commit adds a simple HashMap cache to completion requests.

On a test project the time to compute completions went from 1200ms
to 75ms and the cache contained ~300 entries when 8000 completion
items were produced by the TSC.

This is a short-lived cache and is discarded once the completion
request is finished. In a follow up commits we could make it persist
between requests.
2025-01-26 22:40:53 +01:00
Kenta Moriuchi
b59c21d2c2
chore: remove LSP global symbols count tests (#27806)
Closes #23102
2025-01-26 20:03:20 +01:00
David Sherret
769f748dd9
fix(node): align type stripping in node_modules error message with Node (#27809) 2025-01-24 13:05:04 -05:00
Kenta Moriuchi
6880608452
fix(types): Deno.readDirSync's type returns an IteratorObject (#27805) 2025-01-24 11:25:55 -05: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
Bartek Iwańczuk
0697578d3e
feat(lint): add rules for react/preact (#27162)
This commit updated to deno_lint 0.69.0, which adds a bunch
or new lint rules dedicated for react/preact users.
2025-01-24 13:08:36 +01:00
Bartek Iwańczuk
ad50c0df34
refactor(tsc): remove TS program creation during snapshotting (#27797)
This commit refactors how a snapshot is created for the TypeScript
compiler.

Instead of having 4 ops, only a single op ("op_load") is left. This is
achieved by not creating a "ts.Program" during snapshotting, that during
benchmarking doesn't provide much benefit.

This greatly simplifies build script for the TS snapshot and opens up
way to simplify it even further in follow up PRs.
2025-01-24 13:06:36 +01:00
Yoshiya Hinosawa
886dbe6be1
chore: trim registry.json files in tests/registry/npm (#27798) 2025-01-24 13:28:13 +09:00
David Sherret
9e0855f160
refactor(node_resolver): remove some allocations and lookups (#27799) 2025-01-24 02:20:45 +00: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
HasanAlrimawi
b70aba6bae
feat(compile): show remote modules and metadata size when compiling (#27415)
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-01-23 16:55:50 +00:00
David Sherret
be703b7878
fix: do not log cache creation failure on readonly file system (#27794) 2025-01-23 16:33:24 +00:00
Luca Casonato
c38dbe500b
fix(publish): unfurl sloppy imports in d.ts files and type imports (#27793)
Fixes a bug discovered while trying to publish a package with .js +
.d.ts with sloppy imports.
2025-01-23 14:32:30 +00:00
Bartek Iwańczuk
ab18dac09d
refactor(tsc): split TS compiler into multiple files, use ESM (#27784)
This is a pure refactor, the `99_main_compiler.js` file
was getting out of hand, being over 1500 lines and serving
3 distinct purposes:
- snapshotting
- type-checking
- running LSP

The file was split into:
- 97_ts_host.js
- 98_lsp.js
- 99_main_compiler.js
2025-01-23 01:37:50 +01:00
Bartek Iwańczuk
80a6179ac4
feat(lint): change behavior of --rules flag (#27245)
This commit changes how `deno lint --rules` behaves:
1. All available rules are now printed and rules enabled are marked as
such
2. `deno lint --rules --json` doesn't include markdown documentation
for rules but rather a link to the docs. This should allow us to save
around 400kB of the final `deno` binary size
2025-01-22 23:43:00 +01: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
David Sherret
25e243ad4e
chore: fix hmr build (#27781)
Closes #27761
2025-01-22 18:00:36 +00:00
Nayeem Rahman
7b11670e13
fix(lsp): silence debug error for 'move to a new file' action (#27780) 2025-01-22 17:21:58 +00:00
Divy Srivastava
f3c0bbf926
fix(ext/node): reference error in zlib.crc32 (#27777)
Fixes https://github.com/denoland/deno/issues/27774
2025-01-22 14:31:17 +00:00
snek
32eb991ef8
feat(unstable): support https otlp endpoints (#27743)
Support HTTPS protocol for otel exporting. Includes support for
`OTEL_EXPORTER_OTLP_CERTIFICATE`, `OTEL_EXPORTER_OTLP_CLIENT_KEY`, and
`OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`

Fixes: https://github.com/denoland/deno/issues/27703
2025-01-22 13:07:04 +00:00
Divy Srivastava
f175b5b50f
perf: full LTO in sysroot (#27771)
Decreases binary size by ~15MB on Linux

```
$ du -h ./deno # full LTO
122M	./deno

$ du -h $(which deno) # thin LTO, canary
137M	/usr/bin/deno
```
2025-01-22 18:11:10 +05:30
Yoshiya Hinosawa
773825aeb9
fix(ext/node): fix formatting of debug logs (#27772) 2025-01-22 20:13:13 +09:00
Ian Bull
c930e13ff1
chore: note in flags output that unstable is deprecated (#27334) 2025-01-21 19:25:46 -08: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
ZYSzys
4e0bf4b093
fix(ext/node): add FileHandle#sync (#27677) 2025-01-21 14:52:40 +09:00
Dimitris Apostolou
6ba99be819
fix(deps): update yanked crates (#27512)
Update yanked crates `bytemuck`, `futures-util`, `pest`, `pest_derive`
and `url`.
2025-01-20 21:47:14 -08:00
David Sherret
0d3d4f5466
fix(install/global): remove importMap field from specified config file (#27744)
Closes https://github.com/denoland/deno/issues/27734
2025-01-20 16:50:34 -05:00
Luca Casonato
5e9b3712de
feat(unstable): add basic support for otel trace links (#27727)
Currently only links with no attributes.
2025-01-20 15:39:59 +01:00
Bartek Iwańczuk
395628026f
fix(ext/os): pass SignalState to web worker (#27741)
Closes https://github.com/denoland/deno/issues/27717

Made a mistake in https://github.com/denoland/deno/pull/27655 and
didn't add the `SignalStore` for web worker.
2025-01-20 19:43:15 +05:30
Divy Srivastava
4f27d7cdc0
fix(ext/node): GCM auth tag check on DechiperIv#final (#27733) 2025-01-20 18:16:44 +05:30
ryu
e4a16e91fa
docs(readme): update redirected links (#27726) 2025-01-20 03:01:25 +00: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
b962b87cfe
chore: fix canary version (#27723)
Broken by
57dd66ec3d

Closes https://github.com/denoland/deno/issues/27719
2025-01-19 11:19:47 +01: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