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

13039 commits

Author SHA1 Message Date
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
Yoshiya Hinosawa
b55451b178
fix(ext/node): tls.connect regression (#27707)
The TLS start sequence has been broken since #26661 because of the way
how we wrap TCP handle to create TLS handle.

#26661 introduced happy-eyeballs algorithm and some connection could be
dropped because of happy-eyeball attempt timeout. The current
implementation doesn't consider that case and it could start TLS
handshake with timed out TCP connection. That caused #27652 .

This PR fixes it by changing the initialization steps. Now `wrapHandle`
of TLSSocket set up `afterConnectTls` callback in TCP handle, and
`afterConnect` of TCP handle calls it at `connect` event timing if it
exists. This avoids starting TLS session with timed out connection.

closes #27652
2025-01-18 00:10:26 +09:00
Bartek Iwańczuk
342ccbb99d
ci: use self-hosted mac arm runner on tags (#27708) 2025-01-17 14:31:58 +01: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
Yoshiya Hinosawa
339bc44c58
fix(ext/node): propagate socket error to client request object (#27678)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2025-01-17 12:30:00 +09: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
Nathan Whitaker
a5ba198b9a
fix(outdated): Use latest tag even when it's the same as the current version (#27699)
Fixes https://github.com/denoland/deno/issues/27696.

Just a `>` that should've been a `>=`. Also made sure to filter out
deprecated versions.
2025-01-16 20:03:25 +00:00
Nathan Whitaker
256950ddb6
fix(outdated): retain strict semver specifier when updating (#27701)
Fixes https://github.com/denoland/deno/issues/27697

If it's a strict bound (e.g. `1.0.0` as opposed to `^1.0.0` or other),
retain the strictness when we update
2025-01-16 19:33:38 +00:00
Nathan Whitaker
464ee9155e
fix(check/lsp): fix bugs with tsc type resolution, allow npm packages to augment ImportMeta (#27690)
Fixes #26224.
Fixes #27042.

There were three bugs here:
- we were only resolving `/// <reference types` directives starting with
`npm:`, which meant we failed to resolve bare specifiers (this broke the
`/// <reference types="vite/client">` directive in most of the vite
templates)
- the `$node_modules` workaround caused us to fail to read files for
tsc. For instance tsc would construct new paths based on specifiers
containing `$node_modules`, and since we hadn't created those we weren't
mapping them back to the original (this broke some type resolution
within `vite/client`)
- our separation of `ImportMeta` across node and deno globals in tsc
meant that npm packages couldn't augment `ImportMeta` (this broke
`vite/client`'s augmentation to add `import.meta.env` and others)


After this, the only remaining issue in the vanilla vite template is our
error on `/vite.svg` (which is an ambient module), and I'll look into
that next.
2025-01-16 19:20:04 +00:00
Bartek Iwańczuk
2debe9c8dd
fix(ext/console): change Temporal color (#27684)
This commit changes output color of `Temporal` instances from
"magenta" to "cyan" to discriminate them from `Date` instances.

Closes https://github.com/denoland/deno/issues/27585
2025-01-16 18:27:54 +00:00
Jo Franchetti
17d6e66ee3
docs: adding jsdocs info for console interface (#27666)
Signed-off-by: Jo Franchetti <jofranchetti@gmail.com>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2025-01-16 14:48:13 +00:00
Phil Hawksworth
8d2f76ae36
docs: JSDocs examples for prompt, confirm, and alert (#27695)
Adds examples
2025-01-16 14:20:45 +00:00
Phil Hawksworth
e54d467812
docs:Adds examples in JSDocs for localStorage and sessionStorage (#27668)
Improves docs for:

- http://docs.deno.com/api/web/~/localStorage
- http://docs.deno.com/api/web/~/sessionStorage
2025-01-16 12:33:08 +00:00
Muthuraj Ramalingakumar
e49d6f2d45
chore: add missing internal core_import_map file paths (#27691)
Noted this when working locally, will help with vscode intellisense.

fixes: https://github.com/denoland/deno/issues/27689
2025-01-16 04:38:43 +00:00
Nathan Whitaker
32708213d5
fix(check/lsp): correctly resolve compilerOptions.types (#27686)
Fixes https://github.com/denoland/deno/issues/27062

In the LSP we were passing `npm` specifiers to TSC as roots, but TSC
needs fully resolved specifiers (like the actual file path).

In `deno check` we were often excluding the specifiers entirely from the
roots.

In both cases, we need to resolve the specifiers fully and then pass
them to tsc
2025-01-15 18:48:10 -08:00
Bartek Iwańczuk
a02ee7adf9
ci: try to fix caching on Mac ARM (#27685) 2025-01-15 10:09:08 -08:00
David Sherret
05dc69932d
refactor: create deno_lib crate (#27673)
Shifts just some code down for now. I'll do the rest of the refactor in
the next pr, but didn't want to drop a huge refactor.
2025-01-15 09:35:46 -05:00
Bartek Iwańczuk
836a623d99
ci: use self-hosted mac arm runner (#27568) 2025-01-15 11:03:05 +00:00
Masato Yoshioka
b22a50cb0c
fix(ext/node): add chown method to FileHandle class (#27638) 2025-01-15 17:15:07 +09:00
David Sherret
afc23fb2e0
chore: fix ci by removing remote server dependent test (#27674)
This was using the lockfile and esm.sh changed breaking the lockfile. We
could pin to a specific esm.sh version, but ideally we shouldn't have
the test suite dependent on remote servers.
2025-01-15 04:06:57 +00:00
Bartek Iwańczuk
974e2f44b2
refactor: add 'deno_os' crate (#27655)
This commit creates "deno_os" extension crate and moves
numerous ops from "runtime/" crate to the new crate.
2025-01-14 17:29:36 +01:00
Yoshiya Hinosawa
c943f56949
fix(ext/node): fix playwright http client (#27662) 2025-01-15 01:00:55 +09:00
David Sherret
0b033140c0
refactor: move CliNpmResolver to deno_resolver::npm::NpmResolver (#27659)
As title. After this PR all npm resolution will be out of the CLI crate.
2025-01-14 10:01:05 -05:00
Marvin Hagemeister
3fb8fc1ba7
feat(unstable): refactor js lint plugin AST (#27615)
This PR changes the underlying buffer backed AST format we use for
JavaScript-based linting plugins. It adds support for various new types,
makes traversal code a lot easier and is more polished compared to
previous iterations.

Here is a quick summary (in no particular order):

- Node prop data is separate from traversal, which makes traversal code
so much easier to reason about. Previously, it was interleaved with node
prop data
- spans are in a separate table as well, as they are rarely needed.
- schema is separate from SWC conversion logic, which makes 
- supports recursive plain objects
- supports numbers
- supports bigint
- supports regex
- adds all SWC nodes

Apologies, this is kinda a big PR, but it's worth it imo.

_Marking as draft because I need to update some tests tomorrow._
2025-01-14 13:31:02 +01:00
David Sherret
1e95c20561
refactor: deno_config 0.45 (#27660) 2025-01-14 13:00:31 +01:00
siaeyy
a1f50a7422
fix(node/fs): add utimes method to the FileHandle class (#27582) 2025-01-14 18:08:22 +09:00