Yazan AbdAl-Rahman
4473e81a93
fix(http): Adjust hostname display for Windows when using 0.0.0.0 ( #24698 )
...
Fixes #24687
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
(cherry picked from commit 41f8988dc7
)
2024-07-31 20:26:17 +02:00
David Sherret
bcb7e600c0
fix: actually add missing node:readline/promises
module ( #24772 )
...
Closes #24768
(cherry picked from commit 50fa4d7ef5
)
2024-07-31 20:26:13 +02:00
Yoshiya Hinosawa
b5b9904285
test(ext/node): reduce http_test flakiness ( #24742 )
...
(cherry picked from commit 99e811f5eb
)
2024-07-31 20:26:08 +02:00
Kyle Kelley
a3126d221b
fix: adapt to new jupyter runtime API and include session IDs ( #24762 )
...
Closes #24737 , #24437 .
(cherry picked from commit 63f8218a7d
)
2024-07-31 20:25:44 +02:00
David Sherret
1a87be73e6
fix(unstable/compile): handle byonm import in sub dir ( #24755 )
...
Regression in 1.45.0 caused by storing relative paths instead of
absolute paths in the binary.
Closes #24654
(cherry picked from commit 06b6352292
)
2024-07-31 20:25:33 +02:00
David Sherret
6429eff115
fix(publish): workspace included license file had incorrect path ( #24747 )
...
Also fixes the issue where we say a package was successfully published
before it wasn't.
Bug in https://github.com/denoland/deno/pull/24714
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
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
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
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
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
fec792ee9c
Revert "fix(cli): add NAPI support in standalone mode ( #24642 )"
...
This reverts commit 4e8f5875bc
.
2024-07-23 00:54:29 +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
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
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
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
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
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
Nathan Whitaker
f310e51430
chore: fix flakey lifecycle scripts test ( #24629 )
...
Failed in
https://github.com/denoland/deno/actions/runs/9982978127/job/27589707376
2024-07-22 22:47:57 +02:00
Bartek Iwańczuk
b2bacd969c
Reland "refactor(fetch): reimplement fetch with hyper instead of reqwest" ( #24593 )
...
Originally landed in
f6fd6619e7
.
Reverted in https://github.com/denoland/deno/pull/24574 .
This reland contains a fix that sends "Accept: */*" header for calls made
from "FileFetcher". Absence of this header made downloading source code
from JSR broken. This is tested by ensuring this header is present in the
test server that servers JSR packages.
---------
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2024-07-22 22:47:57 +02:00
David Sherret
a84ca673da
fix(workspace): support resolving bare specifiers to npm pkgs within a workspace ( #24611 )
...
This makes bare specifiers for npm packages work when inside a
workspace, which emulates the same behaviour as when there's a
node_modules directory. The bare specifier can be overwritten by
specifying an import map entry or package.json dependency entry.
* https://github.com/denoland/deno_config/pull/88
Closes #24605
2024-07-22 22:47:09 +02:00
Nathan Whitaker
6e6c5ab51a
fix(cli): Create child node_modules for conflicting dependency versions, respect aliases in package.json ( #24609 )
...
Fixes #24419 .
2024-07-22 22:47:08 +02:00
Satya Rohith
1ec76fb22a
fix(ext/node): http request uploads of subarray of buffer should work ( #24603 )
...
Closes https://github.com/denoland/deno/issues/24571
2024-07-22 22:47:08 +02:00
Nathan Whitaker
9a859318d6
fix(node): Fix --allow-scripts
with no deno.json
( #24533 )
...
We would resolve the wrong package.json, resulting in an inability to
run CJS (or other node-mode) scripts
2024-07-22 22:47:08 +02:00
David Sherret
ce638654f0
fix(workspace): do not resolve to self for npm pkg depending on matching req ( #24591 )
...
Closes #24584
2024-07-22 22:47:08 +02:00
Rano | Ranadeep
c97451977e
fix(std/http2): release window capacity back to remote stream ( #24576 )
...
This PR adds logic to release window capacity after reading the chunks
from the stream. Without it, large response (more than `u16::MAX`) may
fill up the capacity and the whole response can't be read.
Closes https://github.com/denoland/deno/issues/24552
Closes https://github.com/denoland/deno/issues/24305
2024-07-22 22:46:40 +02:00
Igor Borisoglebski
9c2adb0b4f
fix(docs): fix some deno.land/manual broken urls ( #24557 )
...
Fixing some broken urls found after the docs migration
2024-07-22 22:46:39 +02:00
David Sherret
7caefa963e
fix(init): use bare specifier for jsr:@std/assert
( #24581 )
...
Closes #24580
2024-07-22 22:46:39 +02:00
Ryan Dahl
dd83e3fb71
Revert "refactor(fetch): reimplement fetch with hyper instead of reqwest ( #24237 )" ( #24574 )
...
This reverts commit f6fd6619e7
.
I'm seeing a difference between canary and 1.45.2. In
`deno-docs/reference_gen` I can't download dax when running `deno task
types`
```
~/src/deno-docs/reference_gen# deno upgrade --canary
Looking up latest canary version
Found latest version f6fd6619e7
Downloading https://dl.deno.land/canary/f6fd6619e708a515831f707438368d81b0c9aa56/deno-aarch64-apple-darwin.zip
Deno is upgrading to version f6fd6619e7
Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmpb5lDnq/deno.zip
inflating: deno
Upgraded successfully
~/src/deno-docs/reference_gen# deno -v
deno 1.45.2+f6fd661
~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno
~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
error: JSR package manifest for '@david/dax' failed to load. expected value at line 1 column 1
at file:///Users/ry/src/deno-docs/reference_gen/deno-docs.ts:2:15
~/src/deno-docs/reference_gen# deno upgrade --version 1.45.2
Downloading https://github.com/denoland/deno/releases/download/v1.45.2/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.45.2
Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmp3R7uhF/deno.zip
inflating: deno
Upgraded successfully
~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno
~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
Task types:node deno run --allow-read --allow-write=. --allow-env --allow-sys node-docs.ts
```
2024-07-22 22:46:39 +02:00
Sean McArthur
aa7e1fc362
refactor(fetch): reimplement fetch with hyper instead of reqwest ( #24237 )
...
This commit re-implements `ext/fetch` and all dependent crates
using `hyper` and `hyper-util`, instead of `reqwest`.
The reasoning is that we want to have greater control and access
to low level `hyper` APIs when implementing `fetch` API as well
as `node:http` module.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-22 22:46:39 +02:00