Commit Graph

657 Commits

Author SHA1 Message Date
Divy Srivastava
069bc15030
feat(ext/node): perf_hooks.monitorEventLoopDelay() (#26905)
Fixes https://github.com/denoland/deno/issues/20961

Depends on https://github.com/denoland/deno_core/pull/965 and
https://github.com/denoland/deno_core/pull/966
2024-11-19 16:49:25 +05:30
Bartek Iwańczuk
84e1238648
feat(task): support object notation, remove support for JSDocs (#26886)
This commit changes three aspects of `deno task`:
1. Tasks can now be written using object notation like so:
```jsonc
{
  "tasks": {
     "foo": "deno run foo.js",
     "bar": {
        "command": "deno run bar.js"
     }
}
```
2. Support for comments for tasks is now removed. Comments above tasks
will
no longer be printed when running `deno task`.
3. Tasks written using object notation can have "description" field that
replaces
support for comments above tasks:
```jsonc
{
  "tasks": {
     "bar": {
        "description": "This is a bar task"
        "command": "deno run bar.js"
     }
}
```
```
$ deno task
Available tasks:
- bar
    // This is a bar task
    deno run bar.js
```

Pulled most of the changes from
https://github.com/denoland/deno/pull/26467 to
support "dependencies" in tasks. Additionally some cleanup was performed
to make code easier to read.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-16 12:18:17 +01:00
David Sherret
48b94c0995
refactor: use boxed_error in some places (#26887)
Some checks are pending
ci / pre-build (push) Waiting to run
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, debug, ubicloud-standard-16-arm) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, release, ubicloud-standard-16-arm, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, debug, ${{ github.repository == 'denoland/deno' && startsWith(github.ref, 'refs/tags/') && 'self-hosted' || 'macos-14' }}) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || github.reposit… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, bench, linux, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request' && !contains(github.event.pull_reques… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, linux, debug, ubuntu-24.04) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, debug, ubuntu-24.04, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, release, ${{ github.repository == 'denoland/deno' && 'ubuntu-24.04-xl' || 'ubuntu-24.04' }}, true, ${{ !startsWith(github.ref, 'refs/tags/') }}) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || 'macos-13' }}, … (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || github.reposi… (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2024-11-15 23:22:50 -05:00
Sahand Akbarzadeh
032ae7fb19
feat(ext/fetch): allow embedders to use hickory_dns_resolver instead of default GaiResolver (#26740)
Allows embedders to use `hickory-dns-resolver` instead of threaded "getaddrinfo" resolver
in the `fetch()` implementation.
2024-11-15 11:44:11 +01:00
David Sherret
617350e79c
refactor(resolver): move more resolution code into deno_resolver (#26873)
Follow-up to cjs refactor.

This moves most of the resolution code into the deno_resolver crate.
Still pending is the npm resolution code.
2024-11-14 15:24:25 -05:00
snek
4e899d48cf
fix: otel resiliency (#26857)
Improving the breadth of collected data, and ensuring that the collected
data is more likely to be successfully reported.

- Use `log` crate in more places
- Hook up `log` crate to otel
- Switch to process-wide otel processors
- Handle places that use `process::exit`

Also adds a more robust testing framework, with a deterministic tracing
setting.

Refs: https://github.com/denoland/deno/issues/26852
2024-11-14 12:16:28 +00:00
Luca Casonato
9331e2cef0
chore: update denokv_* (#26850) 2024-11-13 13:23:36 +00:00
Bartek Iwańczuk
ef4646278e
feat: upgrade V8 to 13.0 (#26851) 2024-11-13 12:04:30 +00:00
snek
aa546189be
feat: OpenTelemetry Tracing API and Exporting (#26710)
Initial import of OTEL code supporting tracing. Metrics soon to come.
Implements APIs for https://jsr.io/@deno/otel so that code using
OpenTelemetry.js just works tm.

There is still a lot of work to do with configuration and adding
built-in tracing to core APIs, which will come in followup PRs.

---------

Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-11-13 10:38:46 +00:00
Soc Virnyl S. Estela
15b6baff33
chore: update zeromq to 0.4.1 (#26811)
Closes: #26810

---------

Signed-off-by: Soc Virnyl Estela <contact@uncomfyhalomacro.pl>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-12 17:25:59 +01:00
denobot
e1b40a69c0
chore: forward v2.0.6 release commit to main (#26804)
This is the release commit being forwarded back to main for 2.0.6

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-11-10 13:12:18 +05:30
denobot
ef7432c03f
chore: forward v2.0.5 release commit to main (#26755)
This is the release commit being forwarded back to main for 2.0.5

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-06 02:27:14 +01:00
Divy Srivastava
383cb85a73
fix: op_run_microtasks crash (#26718)
Upgrade deno_core to 0.318.0

Fixes https://github.com/denoland/deno_core/issues/951
Fixes https://github.com/denoland/deno/issues/26468
2024-11-05 09:13:54 +05:30
David Sherret
826e42a5b5
fix: improved support for cjs and cts modules (#26558)
* cts support
* better cjs/cts type checking
* deno compile cjs/cts support
* More efficient detect cjs (going towards stabilization)
* Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only
done after loading
* Support `import x = require(...);`

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-01 12:27:00 -04:00
Divy Srivastava
8bfd134da6
fix: clamp smi in fast calls by default (#26506)
Fixes https://github.com/denoland/deno/issues/26480

Ref
d2945fb65b
2024-10-31 10:10:07 +05:30
denobot
a1473d82c5
chore: forward v2.0.4 release commit to main (#26636)
This is the release commit being forwarded back to main for 2.0.4

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-30 13:46:31 +01:00
David Sherret
3a306c450c
fix: do not panic when failing to write to http cache (#26591)
Closes https://github.com/denoland/deno/issues/26189
Closes https://github.com/denoland/deno/issues/26575
2024-10-28 02:03:30 +00:00
David Sherret
4626b11d03
fix(install): regression - do not panic when config file contains \r\n newlines (#26547)
This is specifically for `deno install`/`deno add` commands.

* https://github.com/dprint/jsonc-parser/pull/49

Closes https://github.com/denoland/deno/issues/26543
2024-10-25 13:37:26 -04:00
Bartek Iwańczuk
730331622e
chore: forward v2.0.3 commit to main (#26535)
Forwarding v2.0.3 commit to `main`

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-25 09:57:40 -04:00
snek
79a3ad2b95
feat: support node-api in denort (#26389)
exposes node-api symbols in denort so that `deno compile` can run native
addons.
2024-10-24 09:13:54 +02:00
Ronny Chan
227acbbff5
fix: unpin tokio version (#26457)
Fixes https://github.com/denoland/deno/issues/26455

Signed-off-by: Ronny Chan <ronny.chan@okta.com>
2024-10-22 09:58:31 -07:00
David Sherret
49d9c02bfa
fix(npm): support version ranges with && or comma (#26453) 2024-10-21 19:31:16 +00:00
David Sherret
39fb55096e
fix(install): better json editing (#26450)
1. Respects the formatting of the file (ex. keeps four space indents or
tabs).
2. Handles editing of comments.
3. Handles trailing commas.
4. Code is easier to maintain.
2024-10-21 14:17:08 -04:00
Leo Kettmeir
473e3069de
chore: update nix crate (#26422)
Dedupes nix dependency, since `rustyline` depends on a newer version
that what we currently use
2024-10-19 21:59:39 +00:00
Leo Kettmeir
85a99eb405
refactor(ext/fs): use concrete error types (#26317) 2024-10-18 06:38:17 -07:00
denobot
3ae10a01e0
chore: forward v2.0.2 release commit to main (#26376)
This is the release commit being forwarded back to main for 2.0.2

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-18 03:12:49 +02:00
Leo Kettmeir
ed13efc4ac
refactor(ext/net): use concrete error type (#26227) 2024-10-17 09:43:04 -07:00
denobot
3385d1252e
chore: forward v2.0.1 release commit to main (#26338)
This is the release commit being forwarded back to main for 2.0.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-16 23:48:42 +00:00
Bartek Iwańczuk
ee904ec06c
fix: add hint for missing document global in terminal error (#26218)
This came up on Discord as a question so I thought it's worth adding a
hint for this as it might be a common pitfall.

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-10-15 21:51:39 +00:00
David Sherret
403da30ceb
fix(install): handle pkg with dep on self when pkg part of peer dep resolution (#26277)
* https://github.com/denoland/deno_npm/pull/71

Closes #26271
2024-10-15 18:48:33 +00:00
Divy Srivastava
e4b52f5a76
fix: panic in prepare_stack_trace_callback when global interceptor throws (#26241)
Fixes https://github.com/denoland/deno/issues/26240
Fixes
https://github.com/denoland/deno/pull/24985#issuecomment-2365460210

Fix panic when a global interceptor is misconfigured or throws an
exception.

Updates deno_core to 0.313.0
2024-10-15 14:56:49 +02:00
Divy Srivastava
dfbf03eee7
perf: use fast calls for microtask ops (#26236)
Updates deno_core to 0.312.0
2024-10-14 12:31:51 +00:00
David Sherret
251840a60d
fix: do not panic on wsl share file paths on windows (#26081)
A test is going to fail on windows (I'm not on a windows machine atm, so
running the CI to see what fails)

Closes #26080
2024-10-09 18:49:56 +01:00
Bartek Iwańczuk
20ae8db50d
fix(repl): importing json files (#26053)
Closes https://github.com/denoland/deno/issues/26041
2024-10-09 10:04:44 +02:00
denobot
a62c7e036a
2.0.0 (#26063)
Bumped versions for 2.0.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-08 07:37:28 -07:00
Leo Kettmeir
94adfeec78
fix: use tree-sitter for deno_doc (#26066) 2024-10-08 06:55:44 -07:00
Divy Srivastava
e41df20ad9
fix(npm): root package has peer dependency on itself (#26022)
https://github.com/denoland/deno_npm/pull/70

Fixes https://github.com/denoland/deno/issues/26006
2024-10-03 14:18:36 +00:00
Divy Srivastava
19a9990f60
chore: remove custom bench profile (#26008) 2024-10-03 16:48:40 +05:30
Divy Srivastava
f5caf9dd1b
perf: Use -O3 for sui in release builds (#26010) 2024-10-03 09:33:00 +05:30
Divy Srivastava
93b29b5feb
fix: enable Win32_Security feature in windows-sys (#26007)
Fixes https://github.com/denoland/deno/issues/25922
2024-10-03 09:00:11 +05:30
Nathan Whitaker
bbd4ae1bc1
fix(node): implement libuv APIs needed to support npm:sqlite3 (#25893)
Fixes #24740.

Implements the `uv_mutex_*` and `uv_async_*` APIs.

The mutex API is implemented exactly as libuv, a thin wrapper over the
OS's native mutex.

The async API is implemented in terms of napi_async_work. As documented
in the napi docs, you really shouldn't call `napi_queue_async_work`
multiple times (it is documented as undefined behavior). However, our
implementation doesn't have any issue with this, so I believe it suits
our purpose here.
2024-10-02 10:43:42 -07:00
David Sherret
18beb13f0e
fix(workspace): handle when config has members when specified via --config (#25988)
Closes #25847
2024-10-02 16:20:51 +01:00
denobot
55c2a88099
chore: release deno_* crates (#25987)
Testing once again if the crates are being properly released.

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-02 14:27:34 +00:00
denobot
2d3e0284d9
chore: release deno_* crates (#25976)
Test run before Deno 2.0 release to make sure that the publishing
process passes correctly.

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-02 14:44:04 +02:00
Arnau Orriols
7da70f4e58
chore: relax version pinning of deno_package_json (#25985)
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-10-02 12:55:56 +02:00
David Sherret
4c8d57db03
BREAKING: rename "deps" remote cache folder to "remote" (#25969)
Closes https://github.com/denoland/deno/issues/25967
Closes #25968
2024-10-01 14:05:40 -04:00
Marvin Hagemeister
c5c1869992
fix: precompile preserve SVG camelCase attributes (#25945)
See https://github.com/denoland/deno_ast/pull/278

Fixes https://github.com/denoland/deno/issues/25810
2024-09-30 21:25:30 +02:00
David Sherret
a7d0a5540f
fix: eagerly error for specifier with empty version constraint (#25944)
Eagerly errors for something like `export * from "jsr:@type/is@";`
(previously it would just fail elsewhere because it would consider this
as having an empty tag)
2024-09-30 13:34:20 +00:00
David Sherret
69ab720025
refactor: move ByonmNpmResolver to deno_resolver (#25937)
Some more slow progress on moving all the resolution code into
deno_resolver.
2024-09-30 13:33:32 +00:00
David Sherret
5faf769ac6
refactor: extract out sloppy imports resolution from CLI crate (#25920)
This is slow progress towards creating a `deno_resolver`  crate.

Waiting on:

* https://github.com/denoland/deno/pull/25918
* https://github.com/denoland/deno/pull/25916
2024-09-28 19:17:48 -04:00