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

11812 commits

Author SHA1 Message Date
MrEconomical
3ba50bf0c9 fix(ext/node): read correct CPU usage stats on Linux (#24732)
Fixes #24731

<img width="554" alt="deno_fixed"
src="https://github.com/user-attachments/assets/691f2f89-d979-4ca5-be9a-cf51446cd9b2">

The total CPU usage row is ignored and info from `cpu0` and `cpu1` is
correctly read.

---------

Signed-off-by: MrEconomical <47700125+MrEconomical@users.noreply.github.com>
2024-07-26 12:04:11 -04:00
David Sherret
bfea49f36b fix(node): cjs pkg dynamically importing esm-only pkg fails (#24730) 2024-07-26 12:04:11 -04:00
Asher Gomez
d49a151abf chore: fix bench task (#24718)
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2024-07-26 12:04:10 -04:00
David Sherret
80b479d63e refactor: decouple node resolution from deno_core (#24724) 2024-07-26 12:04:10 -04:00
Marvin Hagemeister
eeaceff32b fix(node/worker_threads): support port.once() (#24725)
Support `MessagePort.once` in Node mode and enable relevant
`worker_threads` test. Noticed that another Node test was passing as
well, so I enabled that too.
2024-07-26 12:04:10 -04:00
David Sherret
2a026bee33 fix(unstable): move sloppy-import warnings to lint rule (#24710)
Adds a new `no-sloppy-imports` lint rule and cleans up the lint code.

Closes #22844
Closes https://github.com/denoland/deno_lint/issues/1293
2024-07-26 12:04:10 -04:00
Asher Gomez
f726fe86f3 chore: fix WPT epoch (#24716)
This was missed in the previous `std` updates.
2024-07-26 12:04:10 -04:00
Asher Gomez
d2b9a4e7c3 chore: update to std@2024.07.19 (#24715) 2024-07-26 12:04:10 -04:00
David Sherret
a818db4699 fix(workspaces/publish): include the license file from the workspace root if not in pkg (#24714) 2024-07-26 12:04:09 -04:00
Bartek Iwańczuk
0e0b5ee63c fix: upgrade deno_core to 0.298.0 (#24709)
Fixes percent-encoded filenames in stack traces:
- https://github.com/denoland/deno_core/pull/759

Closes #18983
2024-07-26 12:04:09 -04:00
Asher Gomez
ef64585d13 chore: use @std prefix for internal module specifiers (#24543)
This change aims to replace all relative import specifiers targeted at
`tests/util/std` with mapped ones (using a `deno.json` file). Towards
updating the `std` git submodule.
2024-07-26 12:04:09 -04:00
Nathan Whitaker
4edb86496c fix(future): Emit deno install warning less often, suggest deno install in error message (#24706)
Two small changes:

- In our BYONM errors, suggest running `deno install` instead of `npm
install` if `DENO_FUTURE` is set
- Only emit warning about `deno install` changes if you do `deno install
<foo>` with deno_future unset
2024-07-26 12:04:09 -04:00
Bartek Iwańczuk
a8817fe8cc fix(ext/fetch): respect authority from URL (#24705)
This commit fixes handling of "authority" in the URL by properly
sending "Authorization Basic..." header in `fetch` API.

This is a regression from https://github.com/denoland/deno/pull/24593
Fixes https://github.com/denoland/deno/issues/24697

CC @seanmonstar
2024-07-26 12:04:09 -04:00
Sean McArthur
3b98c6edaf fix(ext/fetch): use correct ALPN to proxies (#24696)
Sending ALPN to a proxy, and then when tunneling, requires better
juggling of TLS configs. This improves the choice of TLS config in the
proxy connector, based on what reqwest does. It also includes some
`ext/fetch/tests.rs` that check the different combinations.

Fixes #24632
Fixes #24691
2024-07-26 12:04:09 -04:00
Leo Kettmeir
f7749a95b4 perf: update deno_doc (#24700)
Ref https://github.com/denoland/deno_doc/pull/616
2024-07-26 12:04:08 -04:00
HasanAlrimawi
8924b02fb6 fix: update lsp error message of 'relative import path' to 'use deno add' for npm/jsr packages (#24524) 2024-07-26 12:04:08 -04:00
Yoshiya Hinosawa
b57789687b fix(ext/node/net): emit error before close when connection is refused (#24656) 2024-07-26 12:04:08 -04:00
Nathan Whitaker
0632b4e44e fix(node): Run node compat tests listed in the ignore field (and fix the ones that fail) (#24631)
The intent is that those tests will be executed, but our check that the
files are up to date won't overwrite the contents of the tests. This is
useful when a test needs some manual edits to work.

It turns out we weren't actually running them.

---

This ended up turning into a couple of small bug fixes to get the tests
passing:

- We weren't canonicalizing the exec path properly (it sometimes still
had `..` or `.` in it)
- We weren't accepting strings in `process.exit`

There was one failure I couldn't figure out quickly, so I disabled the
test for now, and filed a follow up issue: #24694
2024-07-26 12:04:08 -04:00
David Sherret
815354adee fix(node): better detection for when to surface node resolution errors (#24653) 2024-07-26 12:04:08 -04:00
Bartek Iwańczuk
57e0f40812 Reland "fix: CFunctionInfo and CTypeInfo leaks (#24634)" (#24692)
Reverted in
95847f4e94.
2024-07-26 12:04:08 -04:00
David Sherret
99d8193ed2 fix(upgrade): do not error if config in cwd invalid (#24689)
```
> deno upgrade
error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile.
V:\scratch
> V:\deno\target\debug\deno upgrade
Looking up latest version
Local deno version 1.45.3 is the most recent release
```

Closes #24517
Closes #20729
2024-07-26 12:04:07 -04:00
David Sherret
b8c16eda9b refactor: update to use deno_package_json (#24688)
This is in preparation for extracting out node resolution code from
ext/node (which is something I'm going to do gradually over time).

Uses https://github.com/denoland/deno_package_json
2024-07-26 12:04:07 -04:00
HasanAlrimawi
e76330c49d fix: enable the reporting of parsing related problems when running deno lint (#24332) 2024-07-26 12:04:07 -04:00
Nayeem Rahman
142b9f29ae fix(lsp): rewrite import for 'infer return type' action (#24685) 2024-07-26 12:04:07 -04:00
Bartek Iwańczuk
607fd2d314
chore: release deno_napi 0.93.0, release deno_runtime 0.171.0 2024-07-23 01:07:40 +02:00
Bartek Iwańczuk
fec792ee9c
Revert "fix(cli): add NAPI support in standalone mode (#24642)"
This reverts commit 4e8f5875bc.
2024-07-23 00:54:29 +02:00
Bartek Iwańczuk
b812e7cb60
Revert "chore: move all node-api impl to ext (#24662)"
This reverts commit d00fbd7025.
2024-07-23 00:34:29 +02:00
denobot
87ce64e574
1.45.3 (#24679)
Bumped versions for 1.45.3

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-22 23:34:15 +02:00
Kenta Moriuchi
a115a10100
fix(types): Conform lib.deno_web.d.ts to lib.dom.d.ts and lib.webworker.d.ts (#24599)
Fix #24578
Fix #21981
2024-07-22 22:48:40 +02:00
David Sherret
2680b09b0d
fix(publish): warn about missing license file (#24677)
Part of https://github.com/denoland/deno/issues/24676 , but just a
warning for now.
2024-07-22 22:48:40 +02:00
snek
d00fbd7025
chore: move all node-api impl to ext (#24662)
these symbols are re-exported from runtime/cli using `build.rs`, so we
don't need them in the same crate.
2024-07-22 22:48:40 +02:00
David Sherret
b9ddec0137
fix(npm): handle packages with only pre-released 0.0.0 versions (#24563)
* https://github.com/denoland/deno_semver/pull/26

Closes https://github.com/denoland/deno/issues/24550
2024-07-22 22:48:40 +02:00
Nayeem Rahman
181d415ac7
fix(lsp): scope attribution for asset documents (#24663) 2024-07-22 22:48:40 +02:00
Bartek Iwańczuk
b5e5e1de4e
Revert "fix: CFunctionInfo and CTypeInfo leaks (#24634)" (#24665)
This reverts commit 6c5905dbc3.

Reverting because of errors like this in CI:
```
#
# Fatal error in , line 0
# Check failed: FastApiCallNode::ArityForArgc(c_arg_count, slow_arg_count) == value_input_count.
#
#
#
#FailureMessage Object: 0x7fd5b3ffd9d0
==== C stack trace ===============================

    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1111883) [0x55b8d2107883]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1110b6b) [0x55b8d2106b6b]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x110c6f9) [0x55b8d21026f9]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x20413cd) [0x55b8d30373cd]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x2034222) [0x55b8d302a222]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x202ff44) [0x55b8d3025f44]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1e0b253) [0x55b8d2e01253]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1dfcd96) [0x55b8d2df2d96]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1df92aa) [0x55b8d2def2aa]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1df8b71) [0x55b8d2deeb71]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x11ce49b) [0x55b8d21c449b]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x121fb23) [0x55b8d2215b23]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1221359) [0x55b8d2217359]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1112f3b) [0x55b8d2108f3b]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x111792b) [0x55b8d210d92b]
    /home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x110df0f) [0x55b8d2103f0f]
    /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7fd5cb294ac3]
    /lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7fd5cb326850]
```
2024-07-22 22:48:39 +02:00
MujahedSafaa
94a5eaf5b8
fix(ext/console): Error Cause Not Inspect-Formatted when printed (#24526)
This pull request addresses an issue where the Error.cause property was
not formatted correctly when printed using console.log, leading to
confusion.

solution:
Implemented a fix to ensure that Error.cause is formatted properly when
printed by console.log, and the fix done by using JSON.stringify

This PR fixes https://github.com/denoland/deno/issues/23416

---------

Signed-off-by: MujahedSafaa <168719085+MujahedSafaa@users.noreply.github.com>
2024-07-22 22:48:39 +02:00
Ivancing
3c40457820
fix(cli): add NAPI support in standalone mode (#24642)
Currently, importing Node-Addons modules in a standalone binary results
in a `missing symbol called` error
(https://github.com/denoland/deno/issues/24614). Because the NAPI
symbols are not exported in this mode. This PR should fix the issue.
2024-07-22 22:48:39 +02:00
Zebreus
3f88f6a439
fix: make vendor cache manifest more deterministic (#24658)
This PR will bump the deno_cache_dir dependency from 0.10.0 to 0.10.2.
This will make the cache manifest at manifest.json more deterministic
(see denoland/deno_cache_dir#53 )

<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2024-07-22 22:48:39 +02:00
Divy Srivastava
e10e9812d8
fix: CFunctionInfo and CTypeInfo leaks (#24634)
Trying out the deno_core patch

Ref https://github.com/denoland/deno_core/pull/832

Closes https://github.com/denoland/deno/issues/24575

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-22 22:48:39 +02:00
David Sherret
5fbf8a5871
fix(lsp): hang when caching failed (#24651)
Closes #24600
2024-07-22 22:48:39 +02:00
Marvin Hagemeister
2dd8992ec7
fix: missing emitWarning import (#24587)
We were missing an import of `emitWarning` in our streams
implementation. The code prior to this PR assumed that `process` would
be available as a global.

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

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-22 22:48:38 +02:00
David Sherret
3fe388ff5f
refactor: update to deno_config 0.25 (#24645)
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and
`WorkspaceDirectory`
- Uses the workspace cache in the lsp

* https://github.com/denoland/deno_config/pull/95
* https://github.com/denoland/deno_config/pull/96
2024-07-22 22:47:59 +02:00
Nathan Whitaker
9b6959129a
fix(cli): Respect implied BYONM from DENO_FUTURE in deno task (#24652)
Regression from
04f9db5b22

Originally I thought to fix the issue in the PR we needed to explicitly
pass through the `node-modules-dir` flag, but after applying the correct
fix that david pointed out (setting `NPM_PROCESS_STATE`) that wasn't
necessary (or correct).

We had a test for deno task with BYONM, but it only tested with
`"unstable": ["byonm"]` in deno.json, so it didn't catch this.
2024-07-22 22:47:58 +02:00
David Sherret
b443244bda
fix(fmt): was sometimes putting comments in front of commas in parameter lists (#24650)
* https://github.com/dprint/dprint-plugin-typescript/pull/651
2024-07-22 22:47:58 +02:00
Marvin Hagemeister
a2ca399227
fix(node): support tty.hasColors() and tty.getColorDepth() (#24619)
This PR adds support for
[`tty.WriteStream.prototype.hasColors()`](https://nodejs.org/api/tty.html#writestreamhascolorscount-env)
and
[`tty.WriteStream.prototype.getColorDepth()`](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv).

I couldn't find any usage on GitHub which passes parameters to it.
Therefore I've skipped adding support for the `env` parameter to keep
our snapshot size small.

Based on https://github.com/denoland/deno_terminal/pull/3

Fixes https://github.com/denoland/deno/issues/24616
2024-07-22 22:47:58 +02:00
Yoshiya Hinosawa
600b32fdc1
fix(ext/node): do not expose self global in node (#24637)
closes #23727
2024-07-22 22:47:58 +02:00
David Sherret
1469d61055
fix(lsp): support npm workspaces and fix some resolution issues (#24627)
Makes the lsp use the same code as the rest of the cli.
2024-07-22 22:47:58 +02:00
Ian Bull
e0e03e3f6b
fix(cron): improve error message for invalid cron names (#24644)
When a cron name is invalid, it wasn't necessarily clear why. This
change-set improves the error message to inform the user of the valid
characters in a cron name.
2024-07-22 22:47:58 +02:00
David Sherret
0dac01be83
chore: fix ci (#24633) 2024-07-22 22:47:57 +02:00
David Sherret
4945714b71
fix(publish): surface syntax errors when using --no-check (#24620) 2024-07-22 22:47:57 +02:00
Divy Srivastava
dae5cc7e7c
fix(ext/node): stat.mode on windows (#24434) 2024-07-22 22:47:57 +02:00