0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-15 10:06:23 -05:00
Commit graph

11141 commits

Author SHA1 Message Date
Divy Srivastava
ee8148bc68
fix(ext/node): Add "module" to builtinsModule (#23242)
Fixes https://github.com/denoland/deno/issues/22731
2024-04-11 10:31:50 +05:30
Nayeem Rahman
c3823e1e78
perf(lsp): don't keep remote module ast's in memory (#23230) 2024-04-11 10:31:50 +05:30
JOTSR
ce552f3624
fix(cli): update deno doc help to fit current usage (#23224) 2024-04-11 10:31:50 +05:30
Matt Mastracci
e576014aea
fix(cli): fix deadlock in test writer when test pipe is full (#23210)
The tests would deadlock if we tried to write the sync marker into a
pipe that was full because one test streamed just enough data to fill
the pipe, so when we went to actually write the sync marker we blocked
when nobody was reading.

We use a two-phase lock for sync markers now: one to indicate "ready to
sync" and the second to indicate that the sync bytes have been received.
2024-04-11 10:31:50 +05:30
Asher Gomez
472aef2269
FUTURE: remove deprecated APIs within workers (#23220) 2024-04-11 10:31:50 +05:30
Matt Mastracci
2e921e1bec
fix(runtime): fix Windows permission prompt (#23212)
Followup to https://github.com/denoland/deno/pull/23184
2024-04-11 10:31:50 +05:30
Satya Rohith
471644caf7
fix(ext/node): count MessagePort message listeners in hasMessageEventListener (#23209) 2024-04-11 10:31:50 +05:30
Bartek Iwańczuk
ffd68ff78b
refactor(flags): prepare for deno install changes (#23217)
This commit adds enum to "InstallFlags" and "UninstallFlags" that will
allow to support both local and global (un)installation.

Currently the local variant is not used.

Towards https://github.com/denoland/deno/issues/23062
2024-04-11 10:31:50 +05:30
Matt Mastracci
a8b6c4ad2c
chore: try to fix mac runner (#23214)
https://github.com/actions/runner-images/issues/9626
2024-04-11 10:31:50 +05:30
Matt Mastracci
d73005189f
chore: Make WPT repo shallow (#23205)
This is a particularly large repo and making it shallow improves
checkout time.
2024-04-11 10:31:50 +05:30
Satya Rohith
5499d750b9
refactor(ext/node): remove worker_threads dependency on ext:runtime (#23206) 2024-04-11 10:31:50 +05:30
Bartek Iwańczuk
0307d88360
fix(ext/node): polyfill node:domain module (#23088)
Closes https://github.com/denoland/deno/issues/16852

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-04-11 10:31:49 +05:30
Satya Rohith
dba1c58933
fix(ext/node): patch MessagePort if provided as workerData (#23198)
MessagePort if directly assigned to workerData property instead of
embedding it in an object then it is not patched to a NodeMessagePort.
This commit fixes the bug.
2024-04-11 10:31:49 +05:30
Nathan Whitaker
4649005648
fix(lsp): Remove client-facing format failure warning (#23196)
Fixes #23163.

The client-facing warning doesn't provide any value and is super
annoying. We still emit a warning message on the server side for format
errors, which should fulfill the same (less intrusive) purpose.
2024-04-11 10:31:49 +05:30
Asher Gomez
47420d8449
chore: ensure python@3.11 is installed for WPT tests (#23195)
This provides a more thorough check of whether the correct Python
version is installed for running WPT tests.
2024-04-11 10:31:49 +05:30
Matt Mastracci
f358f6958c
chore(tests): rewrite tls_test to avoid any hardcoded ports (#23191)
To avoid the risk of port collisions during tests, we listen on port 0
and use that for both ends of the connections (for any tests we run in
this file).
2024-04-11 10:31:49 +05:30
Nathan Whitaker
77f2a2c3f2
fix(ext/node): Support returning tokens and option defaults in node:util.parseArgs (#23192)
Fixes #23179.
Fixes #22454.

Enables passing `{tokens: true}` to `parseArgs` and setting default
values for options.

With this PR, the observable framework works with deno out of the box
(no unstable flags needed).

The existing code was basically copied straight from node, so this PR
mostly just updates that (out of date) vendored code. Also fixes some
issues with error exports (before this PR, in certain error cases we
were attempting to construct error classes that weren't actually in
scope).

The last change (in the second commit) adds a small hack so that we
actually exercise the `test-parse-args.js` node_compat test, previously
it was reported as passing though it should have failed. That test now
passes.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-11 10:31:49 +05:30
Alex Yang
f4e4e1baaf
feat: improve AsyncLocalStorage api (#23175)
Fixes: https://github.com/denoland/deno/issues/23174
2024-04-11 10:31:49 +05:30
Bartek Iwańczuk
473212a8b3
FUTURE: enable BYONM by default (#23194)
When `DENO_FUTURE=1` env var is present, then BYONM
("bring your own node_modules") is enabled by default.
That means that is there's a `package.json` present, users
are expected to explicitly install dependencies from that file.

Towards https://github.com/denoland/deno/issues/23151
2024-04-11 10:31:49 +05:30
Asher Gomez
2352b83a9a
chore: move tools/node_compat to tests/node_compat/runner (#23025)
The `tools/node_compat/node` submodule has been moved to
`tests/node_compat/runner/suite` and the remaining files within
`tools/node_compat` to `tests/node_compat/runner`.

Most of the changes are of the header within `tests/node_compat/test`
files. The `setup` and `test` tasks within `tests/node_comapt` execute
successfully.

Towards #22525
CC @mmastrac
2024-04-11 10:31:49 +05:30
Nayeem Rahman
37dba20c76
feat(lsp): respect nested deno.json for fmt and lint config (#23159) 2024-04-11 10:31:49 +05:30
Matt Mastracci
5a2ff6557c
fix(cli): Enforce a human delay in prompt to fix paste problem (#23184)
The permission prompt doesn't wait for quiescent input, so someone
pasting a large text file into the console may end up losing the prompt.
We enforce a minimum human delay and wait for a 100ms quiescent period
before we write and accept prompt input to avoid this problem.

This does require adding a human delay in all prompt tests, but that's
pretty straightforward. I rewrote the locked stdout/stderr test while I
was in here.
2024-04-11 10:31:49 +05:30
David Sherret
6a32ae8f28
perf: reduce allocations in MediaType::from_specifier (#23190)
Includes https://github.com/denoland/deno_media_type/pull/7
2024-04-11 10:31:49 +05:30
Matt Mastracci
9f7b025a1f
chore: Update to macos-13 for mac runners (#23193) 2024-04-11 10:31:49 +05:30
Matt Mastracci
2d1e1a7a94
chore(ext/ffi): sym is unused on aarch64 linux (#23188)
Fix a warning on linux aarch64

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-04-11 10:31:49 +05:30
Satya Rohith
36808d89d5
fix(ext/node): MessagePort works (#22999)
Closes https://github.com/denoland/deno/issues/22951
Closes https://github.com/denoland/deno/issues/23001

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-11 10:31:49 +05:30
Nathan Whitaker
0a5e4cb233
fix(ext/node): Add fs.readv, fs.readvSync (#23166)
Part of #18218.

Implements `fs.readv` and `fs.readvSync` and enables the corresponding
`node_compat` tests.
2024-04-11 10:31:49 +05:30
David Sherret
9aef08b46b
chore(specs): add jsr and npm env vars to tests by default (#23171) 2024-04-11 10:31:49 +05:30
Asher Gomez
7c732cd95f
chore: update std submodule to 0.221.0 (#23112) 2024-04-11 10:31:49 +05:30
David Sherret
c793649b9e
fix: prevent cache db errors when deno_dir not exists (#23168)
Closes #20202
2024-04-11 10:31:49 +05:30
David Sherret
b25cc8034d
perf(node): put pkg json into an Rc (#23156)
Was doing a bit of debugging on why some stuff is not working in a
personal project and ran a quick debug profile and saw it cloning the
pkg json a lot. We should put this in an Rc.
2024-04-11 10:31:49 +05:30
denobot
08f0613b39
1.42.1 (#23158)
Bumped versions for 1.42.1

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-04-01 12:03:06 +05:30
David Sherret
8698492128
fix(node): handle empty 'main' entry in pkg json (#23155) 2024-04-01 07:07:11 +01:00
David Sherret
b8af46e007
fix(check): ignore certain diagnostics in remote modules and when publishing (#23119)
Unused locals and parameters don't make sense to surface in remote
modules. Additionally, fast check can cause these kind of diagnostics
when publishing, so they should be ignored.

Closes #22959
2024-03-31 16:39:40 -04:00
Nayeem Rahman
0144594044
fix(lsp): don't apply preload limit to workspace walk (#23123) 2024-03-31 21:39:23 +01:00
David Sherret
db89ce33f4
chore(lsp): remove recursion in recurse_dependents (#23153)
Was investigating a separate stack overflow (that I've now found in the
node resolution code) and came across this. We should avoid recursion
(this is very old code).
2024-03-31 13:04:42 -04:00
David Sherret
eb6f6ff33d
refactor: cleanup main entrypoint (#23145) 2024-03-31 10:58:19 -04:00
Javier Viola
05598af36e
chore: unpin log crate version (#23082) 2024-03-31 05:07:38 +00:00
David Sherret
d0a579a7b2
fix: deno_graph 0.69.10 (#23147)
* https://github.com/denoland/deno_graph/issues/420
* https://github.com/denoland/deno_graph/pull/424
2024-03-31 04:06:29 +01:00
Nathan Whitaker
99720d0713
chore: Make jupyter integration tests less flaky and avoid hang (#23134)
There's a TOCTOU issue that can happen when selecting unused ports for
the server to use (we get assigned an unused port by the OS, and between
then and when the server actually binds to the port another test steals
it). Improve this by checking if the server existed soon after setup,
and if so we retry starting it. Client connection can also fail
spuriously (in local testing) so added a retry mechanism.

This also fixes a hang, where if the server exited (almost always due to
the issue described above) before we connected to it, attempting to
connect our client ZMQ sockets to it would just hang. To resolve this, I
added a timeout so we can't wait forever.
2024-03-29 23:23:48 -07:00
Nayeem Rahman
524e451bfb
fix(lsp): implement missing ts server host apis (#23131) 2024-03-29 20:00:58 +00:00
David Sherret
c53b720656
fix(node): remove unwrap in op_require_node_module_paths (#23114)
Part of #22671
2024-03-28 17:51:41 -04:00
Nayeem Rahman
d347e73f5a
fix(jsr): exclude yanked versions from 'deno add' and completions (#23113) 2024-03-28 19:02:07 +00:00
Divy Srivastava
bca0fe1cde
fix(ext/node): support stdin: "inherit" in node:child_process (#23110)
Fixes https://github.com/denoland/deno/issues/23051
2024-03-28 19:44:42 +05:30
Divy Srivastava
de0b230078
fix(ext/node): use tty stdin from ext/io (#23044)
Fixes https://github.com/denoland/deno/issues/23043
2024-03-28 04:25:05 +01:00
denobot
9c6eca1064
1.42.0 (#23105)
Bumped versions for 1.42.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-03-28 01:47:33 +01:00
Leo Kettmeir
dc985954e1
chore: update deno_doc to 0.119.0 (#23103) 2024-03-28 00:25:39 +01:00
Łukasz Czerniawski
08d5d32dfc
feat: add --watch-exclude flag (#21935)
This PR introduces the ability to exclude certain paths from the file watcher
in Deno. This is particularly useful when running scripts in watch mode,
as it allows developers to prevent unnecessary restarts when changes are
made to files that do not affect the running script, or when executing
scripts that generate new files which results in an infinite restart
loop.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-03-27 22:47:46 +00:00
Bartek Iwańczuk
d31f2307ee
feat(install): require -g / --global flag (#23060)
In preparation for upcoming changes to `deno install` in Deno 2.

If `-g` or `--global` flag is not provided a warning will be emitted:
```
⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use `-g` or `--global` flag.
```

The same will happen for `deno uninstall` - unless `-g`/`--global` flag
is provided
a warning will be emitted.

Towards https://github.com/denoland/deno/issues/23062

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-03-27 23:45:57 +01:00
Nathan Whitaker
2dc37f411e
feat(task): Task description in the form of comments (#23101)
Closes #22786.

TLDR;
```jsonc
{
  "tasks": {
    // Some comment
    //
    // describing what the task does
    "dev": "deno run -A --watch main.ts"
  }
}
```
```bash
deno task
```
![Screenshot 2024-03-27 at 1 43
49 PM](https://github.com/denoland/deno/assets/17734409/7a14da8c-8e63-45ba-9bfb-590d250b56a9)
2024-03-27 14:14:27 -07:00