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

5647 commits

Author SHA1 Message Date
David Sherret
65993e5efa
fix(fmt): "singleQuote": true should prefer single quote—not always use one (#21470) 2023-12-05 22:06:19 -05:00
Bartek Iwańczuk
bd7a6bb016
chore: forward v1.38.5 release commit to main (#21472)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-12-06 00:53:16 +00:00
Raashid Anwar
cac17267fb
fix(ext/kv): throw error if already closed (#21459)
If KV is closed and tries to listen queue should throw an error

closes #20991
2023-12-05 10:16:47 -08:00
Matt Mastracci
4a9f429501
refactor(cli): refactor bench/test for future module changes (#21460)
Extracting some refactorings for the module work that will land in
https://github.com/denoland/deno_core/pull/359/
2023-12-05 09:26:06 -07:00
David Sherret
ce83a849a4
docs: fix description of FileInfo's mode property (#21366) 2023-12-05 10:23:19 -05:00
Luca Casonato
74e39a927c
feat(unstable): kv.watch() (#21147)
This commit adds support for a new `kv.watch()` method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.

---------

Co-authored-by: losfair <zhy20000919@hotmail.com>
2023-12-05 21:21:46 +08:00
David Sherret
a24d3e8763
perf(node/fs): faster existsSync when not exists (#21458) 2023-12-04 21:05:40 +00:00
Luca Casonato
9eb25e3cff
fix: error code used for duplicate version publish (#21457) 2023-12-04 15:19:01 +01:00
Luca Casonato
7d5ddc462c
fix: don't error if a version already published (#21455) 2023-12-04 12:40:58 +01:00
Nayeem Rahman
0a738dc49d
perf(lsp): check tsc request cancellation before execution (#21447) 2023-12-03 22:07:40 +00:00
Nayeem Rahman
28c527c8f5
perf(lsp): fix redundant clones for ts responses (#21445) 2023-12-03 19:02:14 +00:00
Divy Srivastava
32438d25c3
fix(ext/node): sign with PEM private keys (#21287)
Add support for signing with a RSA PEM private key: `pkcs8` and `pkcs1`.

Fixes https://github.com/denoland/deno/issues/18972
Ref #21124 

Verified fix with `npm:sshpk`. Unverfied but fixes
`npm:google-auth-library`, `npm:web-push` & `oracle/oci-typescript-sdk`

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-12-03 09:58:13 +05:30
Bartek Iwańczuk
39c7d8dafe
refactor: faster args for op_load in TSC (#21438)
This commit changes the argument that "op_load" accepts, from
a serde struct to "&str". This should equal to a slightly better
performance.
2023-12-03 02:07:04 +00:00
Bartek Iwańczuk
f6b889b432
refactor: snapshotting of runtime/ and cli/ (#21430)
This commit removes some of the technical debt related 
to snapshotting JS code:
- "cli/ops/mod.rs" and "cli/build.rs" no longer define "cli" extension
which was not required anymore
- Cargo features for "deno_runtime" crate have been unified in
"cli/Cargo.toml"
- "cli/build.rs" uses "deno_runtime::snapshot::create_runtime_snapshot"
API
instead of copy-pasting the code
- "cli/js/99_main.js" was completely removed as it's not necessary
anymore

Towards https://github.com/denoland/deno/issues/21137
2023-12-02 23:40:27 +00:00
Nayeem Rahman
0f990d9d92
perf(lsp): fix redundant serialization of sources (#21435) 2023-12-02 23:28:46 +00:00
David Sherret
f29075ae4c
fix(node): setting process.exitCode should change exit code of process (#21429) 2023-12-02 16:03:37 +00:00
Leo Kettmeir
61a4e88e38
fix(cli/installer): percent decode name (#21392) 2023-12-02 14:33:22 +01:00
Asher Gomez
d2b5254c33
chore: update std to 0.208.0 (#21318)
Re-attempt at #21284. I was more thorough this time.

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-02 03:20:06 +01:00
Bartek Iwańczuk
ec0207e9b1
perf(lsp): better op performance logging (#21423) 2023-12-01 22:57:52 +01:00
David Sherret
a1d823e27d
feat(compile): support discovering modules for more dynamic arguments (#21381)
This PR causes Deno to include more files in the graph based on how a
template literal looks that's provided to a dynamic import:

```ts
const file = await import(`./dir/${expr}`);
```

In this case, it will search the `dir` directory and descendant
directories for any .js/jsx/etc modules and include them in the graph.

To opt out of this behaviour, move the template literal to a separate
line:

```ts
const specifier = `./dir/${expr}`
const file = await import(specifier);
```
2023-12-01 20:12:10 +00:00
David Sherret
d8e8497eb3
fix(fmt): remove trailing comma for single type param in default export in jsx (#21425) 2023-12-01 14:50:38 -05:00
liruifengv
fc8f060ee3
fix(permissions): fix panics when revoking net permission (#21388)
fix #21385
2023-12-01 18:45:51 +01:00
John Spurlock
eae82b34d4
Update doc for deno fmt --no-semicolons arg. (#21414)
Include default, like other bools.

---------

Signed-off-by: John Spurlock <47259736+johnspurlock-skymethod@users.noreply.github.com>
2023-12-01 16:26:06 +00:00
Matt Mastracci
e6e708e46c
refactor: use resourceForReadableStream for fetch (#20217)
Switch `ext/fetch` over to `resourceForReadableStream` to simplify and
unify implementation with `ext/serve`. This allows us to work in Rust
with resources only.

Two additional changes made to `resourceForReadableStream` were
required:

- Add an optional length to `resourceForReadableStream` which translates
to `size_hint`
 - Fix a bug where writing to a closed stream that was full would panic
2023-12-01 08:56:10 -07:00
Daniel Mizerski
687ae870d1
fix(ext/node): add stubbed process.report (#21373)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-12-01 15:36:11 +09:00
Bartek Iwańczuk
fe90ba650d
refactor(lsp): log names (#21413)
This commit changes LSP log names by prefixing them, we now have these
prefixes:
- `lsp.*` - requests coming from the client
- `tsc.request.*` - requests coming from clients that are routed to TSC
- `tsc.op.*` - ops called by the TS host
- `tsc.host.*` - requests that call JavaScript runtime that runs
TypeScript compiler host

Additionall `Performance::mark` was split into `Performance::mark` and 
`Performance::mark_with_args` to reduce verbosity of code and logs.
2023-12-01 03:54:59 +01:00
Igor Zinkovsky
5f6181df4a
fix(cron): move deprecated Deno.cron overload (#21407)
Moving the deprecated `Deno.cron` overload to be the last one.
2023-11-30 15:52:48 -08:00
Luca Casonato
9444bab186
fix: correct the batch upload length (#21401) 2023-11-30 23:07:26 +01:00
Bartek Iwańczuk
b69001bb49
chore: forward v1.38.4 release commit to main (#21400)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-11-30 23:06:54 +01:00
Raashid Anwar
ab755a07d8
feat(cron): added the support for json type schedule to cron api (#21340)
Added the support for JSON type schedule to cron API; previously it was string only.
fixes #21122
2023-11-30 13:51:56 -08:00
Luca Casonato
ffa09541d7
fix: batch upload authentication (#21397) 2023-11-30 19:54:54 +01:00
Nayeem Rahman
91626bac49
perf(lsp): avoid redundant getNavigationTree() calls (#21396) 2023-11-30 16:23:47 +00:00
Bartek Iwańczuk
c803c0eaab
perf(lsp): remove throttling of cancellation token (#21395)
This commit removes "ThrottledCancellationToken" in favor of
"CancellationToken".

Since calling into Rust to check if Tokio's cancellation token has
already been canceled is really cheap, there's no need for us to 
throttle this check and let TSC burn up CPU with heavy computation.
2023-11-30 15:43:35 +00:00
Yoshiya Hinosawa
3591ba8578
fix(ext/node): fix os.freemem (#21347) 2023-11-30 22:06:01 +09:00
Nayeem Rahman
595a2be024
perf(lsp): cancel ts requests on future drop (#21387)
When an old request is obsoleted while the user is typing, the client
will say so to the server and tower-lsp will drop the future associated
with that request.

This wires that up to the ts server by having any request's token be
cancelled when the surrounding state is dropped.
2023-11-30 03:35:39 +00:00
Bartek Iwańczuk
6718be87c8
perf(lsp): add performance marks for TSC requests (#21383)
This should help us get a better picture where most of the time is spent
(the TSC or the surrounding Rust code).
2023-11-29 21:18:23 +00:00
Jakub Jirutka
ae327d0a83
build(cli): allow to build without upgrade feature (#19910)
The self-upgrade feature is undesirable when deno is installed from
(Linux) distribution repository - using a system package manager. This
change will allow package maintainers to build deno with the "upgrade"
subcommand and background check disabled.

When the user runs `deno upgrade <args>` and the upgrade feature is
disabled, it will exit with error message explaining that this deno
binary was built without the upgrade feature.

Note: This patch is already used in the Alpine Linux’s
[deno](https://pkgs.alpinelinux.org/packages?name=deno) package.
2023-11-29 18:52:25 +00:00
David Sherret
9ac405d587
feat(compile): support "bring your own node_modules" in deno compile (#21377)
Not tested thoroughly. This is a good start.

Closes #21350
2023-11-29 09:32:23 -05:00
Luca Casonato
7e56a0466f
fix: use correct import map in tar & upload (#21380) 2023-11-29 13:59:30 +00:00
Yoshiya Hinosawa
e332fa4a83
fix(ext/node): add util.parseArgs (#21342) 2023-11-29 15:42:58 +09:00
Yoshiya Hinosawa
567d7ff923
fix(ext/node): fix Buffer.copy when sourceStart > source.length (#21345) 2023-11-28 22:28:07 +09:00
Yoshiya Hinosawa
4ed9278bf4
fix(ext/node): fix duplexify compatibility (#21346) 2023-11-28 12:14:57 +09:00
David Sherret
d4ef471744
fix(node): spawnSync's status was incorrect (#21359)
The exit code wasn't hooked up properly.
2023-11-27 19:54:01 -05:00
David Sherret
e52033f0f7
fix(fmt/jupyter): handle "source" property that's a string (#21361)
It was corrupting the file.
2023-11-27 23:15:50 +00:00
David Sherret
3e83d686a8
ci: make upgrade_lsp_repl_sleeps less flaky (#21363)
Makes this test less flaky by allowing way more time for the test to
occur in.
2023-11-27 23:12:17 +00:00
David Sherret
3c88654552
chore: temp fix for tools/format.js (#21360) 2023-11-27 22:51:00 +00:00
Luca Casonato
f6cc80cddc
fix: extraneous slash in tar & upload (#21349) 2023-11-27 18:09:33 +01:00
scarf
2b7e145e56
feat(fmt): support formatting code blocks in Jupyter notebooks (#21310) 2023-11-27 10:32:12 -05:00
David Sherret
a4ec7dfae0
feat(unstable): --unstable-unsafe-proto (#21313)
Closes https://github.com/denoland/deno/issues/21276
2023-11-25 11:41:21 -05:00
Yusuke Tanaka
00e4c47890
fix(dts): Deno.ChildProcess actually implements AsyncDisposable (#21326)
What `Deno.ChildProcess` actually implements is `AsyncDisposable`, but the type
declaration says it's `Disposable`. This PR fixes the type declaration to match
the actual implementation.
2023-11-25 13:26:24 +09:00
Divy Srivastava
89424f8e4a
perf: move "cli/js/40_testing.js" out of main snapshot (#21212)
Closes https://github.com/denoland/deno/issues/21136

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-25 04:46:16 +01:00
Yoshiya Hinosawa
7d8f0ae038
chore(ext/node): remove unnecessary test case (#21337)
This test case is covered by the last case in
5710fffb12/cli/tests/node_compat/test/parallel/test-stream2-transform.js
and not necessary anymore.
2023-11-25 12:20:47 +09:00
Yoshiya Hinosawa
5710fffb12
chore: update node_compat test suites to v18.18.2 (#21328) 2023-11-25 11:35:36 +09:00
David Sherret
60b5d32d90
fix(lsp): handle byonm specifiers in jupyter notebooks (#21332)
Part of https://github.com/denoland/deno/issues/21308
2023-11-24 17:35:33 -05:00
Bartek Iwańczuk
998d9061ef
chore: deflake unit_node/crypto/crypto_key_test.ts (#21331)
Ref https://github.com/denoland/deno/issues/21187

On CI we are going to run only fast tests, with an option to
pass `SLOW_TESTS=1` env var to enable more comprehensive tests.
2023-11-24 12:56:05 -07:00
David Sherret
c99de0493a
chore: bump jsonc-parser and dprint-core dependencies (#21330)
This is to reduce duplicate dependencies for
https://github.com/denoland/deno/pull/21310
2023-11-24 12:54:58 -05:00
Luca Casonato
85fd8a7f22
fix: correct flag in tar & upload (#21327) 2023-11-24 14:05:47 +01:00
denobot
2941dd7da8
chore: forward v1.38.3 release commit to main (#21320) 2023-11-24 07:09:15 +01:00
Bartek Iwańczuk
585cf2de89
feat(unstable): tar up directory with deno.json (#21228)
Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-11-23 23:38:07 +00:00
Matt Mastracci
778e4c9710
chore: start codesigning mac release builds (#21303)
- Adds a codesigning step to all mac targets
- Adds a new ci-full label to the build to force aarch64 builds on any
PR
2023-11-23 15:30:26 -07:00
David Sherret
6f22d2424a
fix(task): use exit code 127 for command not found and parse escaped parens (#21316) 2023-11-23 21:13:08 +00:00
David Sherret
d8961a9dfe
chore: fix upgrade_prompt test on main (#21314)
Issue was main does canary builds, which broke this test because it
didn't handle searching for a canary release. Tested by building as
canary locally.
2023-11-23 17:54:27 +00:00
David Sherret
eda3850f84
chore: add upgrade prompt integration test (#21273)
1. Adds an upgrade prompt integration test.
1. Adds a test for when the upgrade check takes a long time in the repl.
2023-11-23 16:20:40 +00:00
Yoshiya Hinosawa
bf42467e21
fix(ext/node): fix node:stream.Writable (#21297)
This change applies the same fix as
https://github.com/nodejs/node/pull/46818, and the original example
given in #20456 works as expected.

closes #20456
2023-11-23 09:57:05 +09:00
Asher Gomez
616354e76c
refactor: replace deferred() from std/async with Promise.withResolvers() (#21234)
Closes #21041

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22 12:11:20 +01:00
Bartek Iwańczuk
0ffcb46e0f
Revert "chore: update to std@0.207.0 (#21284)" (#21295)
This reverts commit 20aa0796e6.

`main` has been failing consistenly on `kv_undelivered_test` and
`serve_test` after this upgrade.
2023-11-22 04:13:56 +00:00
Nayeem Rahman
64997cce6a
fix(lsp): force shutdown after a timeout (#21251) 2023-11-22 04:08:48 +00:00
Bartek Iwańczuk
a8c24d2a8b
fix: 'Promise was collected' error in REPL/jupyter (#21272)
Fixes #20528
2023-11-22 03:45:34 +01:00
Asher Gomez
cc5d6df50b
docs: update Deno.* deprecation notices (#21283)
This PR updates the deprecation notices to point to the same replacement
APIs that the Standard Library points to. I've also tweaked the notices
to be a little more presentable/navigatable.

In particular, a follow-up PR in std will be made that documents the use
of `toArrayBuffer()`.

Closes #21193
Towards #20976
2023-11-22 03:20:27 +01:00
Asher Gomez
20aa0796e6
chore: update to std@0.207.0 (#21284)
Closes #21002
2023-11-22 02:03:03 +01:00
David Sherret
0f2cbcf6a9
fix(fmt): maintain parens for jsx in member expr (#21280)
Fix in
0b44991bb9

Closes https://github.com/denoland/deno/issues/21279
2023-11-20 23:38:06 +00:00
citrusmunch
08f5db5c62
docs(cli/args/flags.rs): Update dead link for run example (#21277)
The `deno run` example in the help output uses
https://deno.land/std/examples/welcome.ts which no longer exists.

Replacing with https://examples.deno.land/hello-world.ts

Signed-off-by: citrusmunch <citrusmunch@users.noreply.github.com>
2023-11-20 23:59:13 +01:00
David Sherret
1eefe3e42b
fix: Deno.noColor should not be true when NO_COLOR is empty string (#21275)
Closes https://github.com/denoland/deno/issues/21274
2023-11-20 15:58:22 -05:00
Divy Srivastava
c97a97240b
fix(ext/node): handle closing process.stdin more than once (#21267)
Fixes https://github.com/denoland/deno/issues/21112

Aligns more towards what Node.js does. Closing stdin more than once is a
nop.
2023-11-20 18:57:18 +05:30
Bartek Iwańczuk
611e71cf3b
chore: update deno_doc to 0.73.3 (#21262)
Removes some unnecessary dependencies.
2023-11-20 14:25:13 +01:00
Jérôme Benoit
0205cff834
docs: typo fixlet in worker type comment (#21268) 2023-11-20 17:04:01 +05:30
Kenta Moriuchi
c806fbdabe
fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
Matt Mastracci
679b7bb8fa
fix(ext/http): fix crash in dropped Deno.serve requests (#21252)
Fixes #21250

We were attempting to recycle dropped resource responses too early.
2023-11-18 13:16:53 -07:00
David Sherret
c213ad380f
chore: combine TestCommandBuilder with DenoCmd (#21248) 2023-11-17 22:46:15 -05:00
Matt Mastracci
4a2d8c4bbd
chore: disable curl --http2 tests (#21247) 2023-11-18 02:08:16 +00:00
Matt Mastracci
23119fc1d4
test(cli): http test reliability fixes (#21246) 2023-11-17 16:19:00 -07:00
Florian Schwalm
20bf697ba6
chore(cli): Fix rename test for XFS (#21215)
Renaming a directory to a path where a non-empty directory already
exists was asserted to always fail with `ENOTEMPTY`
According to glibc manual the function may also fail with `EEXIST` on
"some other systems". One such case is using XFS [^1].

This commit handles the EEXIST case.

[^1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/xfs/xfs_inode.c?h=v4.18&id=94710cac0ef4ee177a63b5227664b38c95bbf703#n3082
2023-11-17 15:24:10 -07:00
David Sherret
f46802cb1e
refactor(upgrade): add unit tests for lsp upgrade check (#21244) 2023-11-17 16:40:12 -05:00
Matt Mastracci
88bc2ed02d
chore: make http benches more reliable to start (#21240) 2023-11-17 14:33:02 -07:00
Matt Mastracci
b563e76f3f
chore: fix and deflake cert store fetch tests (#21241) 2023-11-17 19:16:11 +00:00
David Sherret
daab366b03
ci: fix flaky stdio_streams_are_locked_in_permission_prompt (#21238)
Part of #21187
2023-11-17 16:57:11 +00:00
林炳权
9a1c697045
chore: update to Rust 1.74 (#21210)
Update to Rust 1.74
2023-11-17 08:06:28 -07:00
David Sherret
29011d5929
chore: various improvements to tests (#21222) 2023-11-17 10:05:42 -05:00
denobot
21e6a76519
chore: forward v1.38.2 release commit to main (#21236)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-11-17 17:57:25 +09:00
Bartek Iwańczuk
9534e6e113
feat(unstable): Workspaces support (#20410)
This commit adds unstable workspace support. This is extremely
bare-bones and
minimal first-pass at this.

With this change `deno.json` supports specifying `workspaces` key, that
accepts a list of subdirectories. Each workspace can have its own import
map. It's required to specify a `"name"` and `"version"` properties in the
configuration file for the workspace:

```jsonc
// deno.json
{
  "workspaces": [
     "a",
     "b"
  },
  "imports": {
    "express": "npm:express@5"
   }
}
```
``` jsonc
// a/deno.json
{
  "name": "a",
  "version": "1.0.2",
  "imports": {
    "kleur": "npm:kleur"
  }
}
```
```jsonc
// b/deno.json
{
  "name": "b",
  "version": "0.51.0",
  "imports": {
    "chalk": "npm:chalk"
  }
}
```

`--unstable-workspaces` flag is required to use this feature:
```
$ deno run --unstable-workspaces mod.ts
```

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-11-17 01:28:38 +00:00
David Sherret
544923afdc
fix(doc): issue discovering re-exports of re-exports sometimes (#21223) 2023-11-16 17:34:56 -05:00
David Sherret
ceca097e6f
fix(npm): support cjs entrypoint in node_modules folder (#21224)
Closes #21109
2023-11-16 17:29:35 -05:00
Igor Zinkovsky
b572abfcb3
feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)
This PR changes the `Deno.cron` API:
* Marks the existing function as deprecated
* Introduces 2 new overloads, where the handler arg is always last:
```ts
Deno.cron(
  name: string,
  schedule: string,
  handler: () => Promise<void> | void,
)

Deno.cron(
  name: string,
  schedule: string,
  options?: { backoffSchedule?: number[]; signal?: AbortSignal },
  handler: () => Promise<void> | void,
)
```

This PR also fixes a bug, when other crons continue execution after one
of the crons was closed using `signal`.
2023-11-16 14:19:00 -08:00
Matt Mastracci
6b42cecc06
feat(ext/net): use rustls_tokio_stream (#21205)
Fixes #21121 and #19498

Migrates fully to rustls_tokio_stream. We no longer need to maintain our
own TlsStream implementation to properly support duplex.

This should fix a number of errors with TLS and websockets, HTTP and
"other" places where it's failing.
2023-11-15 16:12:46 -07:00
Bartek Iwańczuk
40726721e2
fix: use short git hash for deno version (#21218) 2023-11-15 19:24:13 +00:00
Bolat Azamat
7687ec87e6
fix(cli): Allow executable name start with digit (#21214) 2023-11-15 09:17:09 -07:00
Divy Srivastava
7f3902b41f
perf: static bootstrap options in snapshot (#21213)
Closes https://github.com/denoland/deno/issues/21133
2023-11-15 13:25:55 +01:00
Yoshiya Hinosawa
c67de43ff3
fix(runtime): fix Deno.noColor when stdout is not tty (#21208) 2023-11-15 14:10:12 +09:00
Nayeem Rahman
4913274a65
feat(lsp): upgrade check on init and notification (#21105) 2023-11-14 22:10:51 +00:00
Divy Srivastava
ab0c637425
perf: move jupyter esm out of main snapshot (#21163)
Towards https://github.com/denoland/deno/issues/21136
2023-11-14 22:06:00 +01:00
David Sherret
d342c0df71
chore: switch compile tests over to the TestBuilder (#21180) 2023-11-14 16:58:06 +00:00
Bartek Iwańczuk
cf6673b23d
fix(ext/node): add APIs perf_hook.performance (#21192)
Required for Next.js.
2023-11-14 16:33:09 +05:30
Kenta Moriuchi
886652156e
fix(ext/web): webstorage has trap for symbol (#21090) 2023-11-14 07:01:15 +01:00
David Sherret
9fed7b9caf
chore: remove duplicate esnext.dispoable (#21184) 2023-11-13 22:43:12 +01:00
Matt Mastracci
fe0d9e078f
chore(cli): unflake signal test (#21185)
If these tests do eventually break, they'll time out.
2023-11-13 18:45:48 +00:00
Matt Mastracci
65b9150f83
chore(ext/web): use a non-resource stream for textDecoderStreamCleansUpOnCancel (#21181)
Follow-up fix to #21074
2023-11-13 11:35:48 -07:00
David Sherret
6e1f3aa013
fix(install): should work with non-existent relative root (#21161)
Closes #21160
2023-11-13 09:44:01 -05:00
Divy Srivastava
1ef617e8f3
perf: lazy bootstrap options - first pass (#21164)
Move most runtime options to be lazily loaded. Constant options will be
covered in a different PR.

Towards https://github.com/denoland/deno/issues/21133
2023-11-13 04:52:59 +00:00
Nayeem Rahman
55e0483626
fix(lsp): update tsconfig after refreshing settings on init (#21170) 2023-11-12 22:30:04 +00:00
Florian Schwalm
3a7abe6906
fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation (#21074)
This PR uses the new `cancel` method of `TransformStream` to properly
clean up the internal `TextDecoder` used in `TextDecoderStream` if the
stream is cancelled.

Fixes #13142

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-12 12:47:03 -07:00
Divy Srivastava
9f4a45561f
perf: snapshot runtime ops (#21127)
Closes https://github.com/denoland/deno/issues/21135

~1ms startup time improvement

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-11-11 17:01:48 +00:00
Matt Mastracci
56e76242f3
chore(ext/node): use libz-sys w/zlib-ng feature in node (#21158)
We only want one zlib dependency.

Zlib dependencies are reorganized so they use a hidden
`__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys
(used by ext/node) and flate2 (used by deno_web).
2023-11-11 07:20:12 -07:00
Kenta Moriuchi
0c1ab2c7f7
fix(ext/node): Re-enable alloc max size test (#21059)
Ref #21036
2023-11-11 08:23:01 +00:00
Jacob Hummer
b2e3389a6a
fix(node/http): export globalAgent (#21081)
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-11 10:13:30 +05:30
Tareque Md Hanif
eff3e43296
chore(cli): Migrate some unit tests to "Promise.withResolvers()" (#21128)
Migrate to use `Promise.withResolvers()` instead of `deferred` in some
of the tests in `cli/tests/unit/`.
Issue: #21041
2023-11-10 14:29:09 -07:00
Divy Srivastava
df14835b83
fix(ext/node): implement process.geteuid (#21151)
Fixes #21097
2023-11-10 11:49:57 -07:00
David Sherret
b78c7130e9
fix: improve deno doc --lint error messages (#21156)
This also updates deno_graph, which has the JSR change to use "exports".
It's not yet useful atm, so I've made this PR a fix about the deno doc
--lint error message improvements. I'll do a follow-up PR that adds
exports to the deno.json
2023-11-10 18:40:39 +00:00
Matt Mastracci
68607b593f
perf(cli): strace mode for ops (undocumented) (#21131)
Example usage:

```
# Trace every op except op_*tick*
cargo run -- run --unstable -A --strace-ops=-tick '/Users/matt/Documents/github/deno/deno/ext/websocket/autobahn/autobahn_server.js

# Trace any op matching op_*http*
cargo run -- run --unstable -A --strace-ops=http ...
```

Example output:

```
[    11.478] op_ws_get_buffer                        : Dispatched Slow
[    11.478] op_ws_get_buffer                        : Completed Slow
[    11.478] op_ws_send_binary                       : Dispatched Fast
[    11.478] op_ws_send_binary                       : Completed Fast
[    11.478] op_ws_next_event                        : Dispatched Async
[    11.478] op_try_close                            : Dispatched Fast
[    11.478] op_try_close                            : Completed Fast
[    11.478] op_timer_handle                         : Dispatched Fast
[    11.478] op_timer_handle                         : Completed Fast
[    11.478] op_sleep                                : Dispatched Asyn
```
2023-11-10 10:41:24 -07:00
Divy Srivastava
9f2e56ba96
chore: use internal namespace in 40_testing.js (#21141)
Towards #21136 

- [x] assign serializePermissions, setTimeout and setExitHandler APIs to
internal namespace
- [x] remove usage of assert
2023-11-10 14:34:41 +00:00
Divy Srivastava
81fd514613
chore: remove primordial usage from 40_testing.js (#21140)
Towards #21136
2023-11-10 19:03:03 +05:30
denobot
1ece7dfd90
chore: forward v1.38.1 release commit to main (#21144)
This is the release commit being forwarded back to main for 1.38.1

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10 18:51:34 +05:30
Igor Zinkovsky
f4305433dc
fix(test) reduce queue persistence test time from 60 secs to 6 secs (#21142)
This PR reduces the time to run `queue persistence with inflight
messages` test from 60 seconds down to about 6 seconds.

The test simulates a crash to ensure that inflight messages are cleaned
up and re-queued when the new process starts. Since messages are
considered dead after 5 seconds of being queued, reopening the db within
5 seconds does not re-queue the messages on startup (they do get
re-queued after 60 seconds, which is the cleanup frequency). By waiting
for 5 seconds before reopening the db, the test ensures that the cleanup
happens quickly when the db is opened.
2023-11-10 11:28:38 +01:00
Bartek Iwańczuk
612b7dfcc7
fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)
Closes https://github.com/denoland/deno/issues/20782
2023-11-10 05:59:39 +00:00
Matt Mastracci
9010b8df53
perf: remove knowledge of promise IDs from deno (#21132)
We can move all promise ID knowledge to deno_core, allowing us to better
experiment with promise implementation in deno_core.

`{un,}refOpPromise(promise)` is equivalent to
`{un,}refOp(promise[promiseIdSymbol])`
2023-11-09 13:57:26 -07:00
Divy Srivastava
c4029f6af2
fix(node): implement createPrivateKey (#20981)
Towards #18455
2023-11-09 23:26:59 +05:30
btoo
09dc5f36d9
fix small Deno.createHttpClient typo in lib.deno.unstable.d.ts (#21115) 2023-11-08 19:34:57 -07:00
Matt Mastracci
02c5f49a7a
chore: refactor test_server and move to rustls-tokio-stream (#21117)
Remove tokio-rustls as a direct dependency of Deno and refactor
test_server to reduce code duplication.

All tcp and tls listener paths go through the same streams now, with the
exception of the simpler Hyper http-only handlers (those can be done in
a later follow-up).

Minor bugs fixed:
 - gRPC server should only serve h2
 - WebSocket over http/2 had a port overlap
- Restored missing eye-catchers for some servers (still missing on Hyper
ones)
2023-11-08 13:00:29 -07:00
Aravind
e4593873a9
fix(ext/http): Throwing Error if the return value of Deno.serve handler is not a Response class (#21099)
---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-07 15:52:44 -07:00
David Sherret
7978bc5d1b
fix(node): cjs export analysis should probe for json files (#21113)
Closes #21064
2023-11-07 16:38:55 -05:00
David Sherret
9201198efd
fix(node): inspect ancestor directories when resolving cjs re-exports during analysis (#21104)
If a CJS re-export can't be resolved, it will check the ancestor
directories, which is more similar to what `require` does at runtime.
2023-11-07 09:56:06 -05:00
Matt Mastracci
50e4806a2d
chore: bump deno_core (#21102) 2023-11-07 01:03:48 +00:00
Luca Casonato
777c142d39
docs: improve some JSDoc (#20841)
Minor improvements to the documentation for https://deno.com/api
2023-11-07 00:35:22 +00:00
Gasman
837c870ff4
fix(node/http): socket.setTimeout (#20930)
Fixes #20923
2023-11-07 00:51:14 +01:00
Kenta Moriuchi
90189dd997
fix(ext): use String#toWellFormed in ext/webidl and ext/node (#21054)
Fixes #18802 

This PR adds `util.toUSVString` to node:util:

```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
2023-11-06 22:18:28 +01:00
David Sherret
7eb34c7a36
fix(byonm): correct resolution for scoped packages (#21083) 2023-11-06 08:35:26 -05:00
Bartek Iwańczuk
fdb4953ea4
refactor: unify CDP types in a single module (#21094)
This commit moves all Chrome Devtools Protocol messages to `cli/cdp.rs`
and refactors all places using these types to pull them from a common
place.

No functional changes.
2023-11-05 22:58:59 +00:00
Jesse Jackson
68a964346d
fix(core/types): Promise.withResolvers: Unmark callback param as optional (#21085)
See discussion on merged commit:
1d19b1011b (r131604700)

Signed-off-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2023-11-05 23:40:56 +01:00
Matt Mastracci
485fade0b6
chore: migrate to new deno_core and metrics (#21057)
- Uses the new OpMetrics system for sync and async calls
- Partial revert of #21048 as we moved Array.fromAsync upstream to
deno_core
2023-11-05 14:27:36 -07:00
Igor Zinkovsky
1097de3e1d
fix(cron): update Deno.cron doc example (#21078)
Signed-off-by: Igor Zinkovsky <igor@deno.com>
2023-11-04 14:04:13 -07:00
David Sherret
e4c947dd2b
fix(node): use closest package.json to resolve package.json imports (#21075) 2023-11-04 16:41:51 +00:00
Divy Srivastava
0b75a7169b
perf: lazy atexit setup (#21053)
`libc::atexit` incurrs 2% dyld cost at startup on macOS. This PR moves
the setup to when the tty mode is changed using op_stdin_set_raw.
2023-11-04 17:30:12 +05:30
David Sherret
8acf059ac6
fix(doc): deno doc --lint mod.ts should output how many files checked (#21084)
As pointed out in https://github.com/denoland/deno/issues/21067 , it's
confusing that `deno doc --lint mod.ts` outputs the documentation to
stdout on success. Instead, it would be better if it outputted how many
files were checked similar to what `deno lint` does on success. It still
outputs the documentation if `--lint` or `--html` are provided so this
is non-breaking.
2023-11-04 04:43:54 +00:00
Bartek Iwańczuk
ee1e9a6434
fix(doc): require source files if --html or --lint used (#21072)
Fixes https://github.com/denoland/deno/issues/21067
Fixes https://github.com/denoland/deno/issues/21070
2023-11-03 17:06:18 +00:00
Matt Mastracci
76fbe85264
chore: finish indexmap1 removal from deno (#21060)
We still pull the dep in from a few other places, but we can let those
get fixed over time.
2023-11-02 16:55:37 -06:00
Bartek Iwańczuk
621440017a
chore: Add 'jupyter' category for Deno.jupyter APIs (#21061) 2023-11-02 22:43:02 +00:00
Igor Zinkovsky
1d0856a4f1
feat(ext/kv): increase checks limit (#21055) 2023-11-02 11:57:11 -07:00
denobot
41877a0b37
1.38.0 (#21051)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-02 01:01:47 +00:00
Asher Gomez
d7348c870a
fix: add missing Object.groupBy() and Map.groupBy() types (#21050) 2023-11-01 23:18:41 +00:00
David Sherret
58d543a480
fix(repl): jsxImportSource was not working (#21049)
I made some fixes in deno_ast to make this possible and we forgot to
update this.
2023-11-01 23:04:54 +00:00
Bartek Iwańczuk
ab72019a17
feat: enable Array.fromAsync (#21048) 2023-11-01 22:25:18 +00:00
Bartek Iwańczuk
24c3c96958
feat: granular --unstable-* flags (#20968)
This commit adds granular `--unstable-*` flags:
- "--unstable-broadcast-channel"
- "--unstable-ffi"
- "--unstable-fs"
- "--unstable-http"
- "--unstable-kv"
- "--unstable-net"
- "--unstable-worker-options"
- "--unstable-cron"

These flags are meant to replace a "catch-all" flag - "--unstable", that
gives a binary control whether unstable features are enabled or not. The
downside of this flag that allowing eg. Deno KV API also enables the FFI
API (though the latter is still gated with a permission).

These flags can also be specified in `deno.json` file under `unstable`
key.

Currently, "--unstable" flag works the same way - I will open a follow
up PR that will print a warning when using "--unstable" and suggest to use
concrete "--unstable-*" flag instead. We plan to phase out "--unstable"
completely in Deno 2.
2023-11-01 23:15:08 +01:00
Matt Mastracci
42c426e769
feat(ext/websocket): websockets over http2 (#21040)
Implements `WebSocket` over http/2. This requires a conformant http/2
server supporting the extended connect protocol.

Passes approximately 100 new WPT tests (mostly `?wpt_flags=h2` versions
of existing websockets APIs).

This is implemented as a fallback when http/1.1 fails, so a server that
supports both h1 and h2 WebSockets will still end up on the http/1.1
upgrade path.

The patch also cleas up the websockets handshake to split it up into
http, https+http1 and https+http2, making it a little less intertwined.

This uncovered a likely bug in the WPT test server:
https://github.com/web-platform-tests/wpt/issues/42896
2023-11-01 21:11:01 +00:00
Bartek Iwańczuk
587f2e0800
feat: precompile JSX (#20962)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-01 20:30:23 +00:00
Matt Mastracci
658f958fb8
chore(cli): bump zeromq dep (#21045)
Reduces the number of crates we need to build pretty significantly
(approx 20).
2023-11-01 20:20:50 +00:00
David Sherret
02822d309f
fix(test): --junit-path should handle when the dir doesn't exist (#21044)
Closes https://github.com/denoland/deno/issues/21022
2023-11-01 19:59:51 +00:00
Luca Casonato
d42f154312
feat: disposable Deno resources (#20845)
This commit implements Symbol.dispose and Symbol.asyncDispose for
the relevant resources.

Closes #20839

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-01 20:26:12 +01:00
Bartek Iwańczuk
1d19b1011b
chore: upgrade deno_core (#21036)
Updated to deno_core 0.224.0 and V8 12.0.

---------

Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-11-01 20:25:09 +01:00
Igor Zinkovsky
01d3e0f317
feat(cron) implement Deno.cron() (#21019)
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs.

* State: All cron state is in memory. Cron jobs are scheduled according
to the cron schedule expression and the current time. No state is
persisted to disk.
* Time zone: Cron expressions specify time in UTC.
* Overlapping executions: not permitted. If the next scheduled execution
time occurs while the same cron job is still executing, the scheduled
execution is skipped.
* Retries: failed jobs are automatically retried until they succeed or
until retry threshold is reached. Retry policy can be optionally
specified using `options.backoffSchedule`.
2023-11-01 11:57:55 -07:00
Divy Srivastava
82643857cc
Revert "chore: use kqueue backend of notify on macOS" (#21039)
Reverts denoland/deno#21028

Reason:
https://github.com/notify-rs/notify/blob/main/notify/src/kqueue.rs#L79-L81
Need to wait for the watcher thread to spawn otherwise we hit flakes

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-11-01 15:54:27 +00:00
Bartek Iwańczuk
8ea2d926a9
feat: deno doc --html (#21015)
This commit adds static documentation site generate to "deno doc"
subcommand.

Example:
```
$ deno doc --html --name="My library" ./mod.ts
# outputs to ./docs/

$ deno doc --html --name="My library" --output=./documentation/ ./mod.ts ./file2.js
# outputs to ./documentation/

$ deno doc --html --name="My library" ./**/mod.ts
# generate docs for all files with "mod.ts" name
```

Closes https://github.com/denoland/deno/issues/8233
2023-11-01 15:25:05 +00:00
Asher Gomez
f8f4e77632
feat(unstable): deno run --env (#20300)
This change adds the `--env=[FILE]` flag to the `run`, `compile`,
`eval`, `install` and `repl` subcommands. Environment variables set in
the CLI overwrite those defined in the `.env` file.
2023-11-01 15:21:13 +00:00
Bartek Iwańczuk
53248e9bb3
fix(repl): support transforming JSX/TSX (#20695)
Closes https://github.com/denoland/deno/issues/16771

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-01 14:42:54 +01:00
David Sherret
f1df22ce0a
feat(doc): improve non-exported diagnostic (#21033)
This will now catch way more scenarios.
2023-11-01 13:54:44 +01:00
Kenta Moriuchi
841f215fd4
fix(ext/node): adapt dynamic type checking to Node.js behavior (#21014) 2023-11-01 16:06:25 +09:00
David Sherret
d1ef561dbf
feat: deno doc --lint (#21032)
Adds a new `--lint` flag to `deno doc` that surfaces three kinds of
diagnostics:

1. Diagnostic for non-exported type referenced in an exported type.
* Why? People often forget to export types from a module in TypeScript.
To supress this diagnostic, add an `@internal` jsdoc tag to the internal
type.
1. Diagnostic for missing return type or missing property type on a
**public** type.
* Why? Otherwise `deno doc` will not display good documentation. Adding
explicit types also helps with type checking performance.
1. Diagnostic for missing jsdoc on a **public** type.
* Why? Everything should be documented. This diagnostic can be supressed
by adding a jsdoc comment description.

If the lint passes, `deno doc` generates documentation as usual.

For example, checking for deno doc diagnostics on the CI:

```shellsession
$ deno doc --lint mod.ts second_entrypoint.ts > /dev/null
```

This feature is incredibly useful for library authors.

## Why not include this in `deno lint`?

1. The command needs the documenation output in order to figure out the
diagnostics.
1. `deno lint` doesn't understand where the entrypoints are. That's
critical for the diagnostics to be useful.
1. It's much more performant to do this while generating documentation.
1. There is precedence in rustdoc (ex. `#![warn(missing_docs)]`).

## Why not `--check`?

It is confusing with `deno run --check`, since that means to run type
checking (and confusing with `deno check --docs`).

## Output Future Improvement

The output is not ideal atm, but it's fine for a first pass. We will
improve it in the future.

Closes https://github.com/denoland/deno_lint/pull/972
Closes https://github.com/denoland/deno_lint/issues/970
Closes https://github.com/denoland/deno/issues/19356
2023-10-31 18:19:42 -04:00
Divy Srivastava
6dd96af1ec
chore: update macOS shared library test (#21031) 2023-10-31 17:39:07 +00:00
Leo Kettmeir
39716183ac
feat(ext/web): EventSource (#14730)
Closes #10298

---------

Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-10-31 18:16:27 +01:00
Divy Srivastava
646afdf259
chore: use kqueue backend of notify on macOS (#21028)
Towards #20996 

"macos_fsevent" feature of notify links us to CoreFoundation on macOS.
2023-10-31 16:43:04 +00:00
Matt Mastracci
e4308aebc0
feat(ext/websocket): use rustls-tokio-stream instead of tokio-rustls (#20518)
Use new https://github.com/denoland/rustls-tokio-stream project instead
of tokio-rustls for direct websocket connections. This library was
written from the ground up to be more reliable and should help with
various bugs that may occur due to underlying bugs in the old library.

Believed to fix #20355, #18977, #20948
2023-10-31 09:34:45 -06:00
Divy Srivastava
ba6bd444b6
perf: use deno_native_certs crate (#18072)
Fixes #18071 

Replace `rustls_native_certs` which links to Security framework.
https://github.com/denoland/deno_native_certs uses dlopen to lazy load
when needed.
2023-10-31 12:55:46 +01:00
Luca Casonato
2d9298f5f5
chore: update ext/kv to use denokv_* crates (#20986)
This commit updates the ext/kv module to use the denokv_* crates for
the protocol and the sqlite backend. This also fixes a couple of bugs in
the sqlite backend, and updates versionstamps to be updated less
linearly.
2023-10-31 11:13:57 +00:00
David Sherret
092555c611
refactor: update to deno_doc 0.71 (#21023) 2023-10-31 09:19:43 +05:30
Bartek Iwańczuk
1713df1352
feat: deno run --unstable-hmr (#20876)
This commit adds `--unstable-hmr` flag, that enabled Hot Module Replacement.

This flag works like `--watch` and accepts the same arguments. If
HMR is not possible the process will be restarted instead.

Currently HMR is only supported in `deno run` subcommand.

Upon HMR a `CustomEvent("hmr")` will be dispatched that contains
information which file was changed in its `details` property.

---------

Co-authored-by: Valentin Anger <syrupthinker@gryphno.de>
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-10-31 01:25:58 +01:00
Bartek Iwańczuk
48c5c3a3fb
feat(doc): support multiple file entry (#21018)
This commit adds support for multiple entry points to `deno doc`.

Unfortunately to achieve that, I had to change the semantics of the
command to explicitly require `--filter` parameter for filtering
symbols, instead of treating second free argument as the filter argument.

`deno doc --builtin` is still supported, but cannot be mixed with
actual entrypoints.
2023-10-30 23:58:57 +01:00
Matt Mastracci
b75f3b5ca0
feat(ext/websocket): split websocket read/write halves (#20579)
Fixes some UB when sending and receiving at the same time.
2023-10-30 11:49:19 -06:00
Divy Srivastava
09204107d8
fix: implement node:tty (#20892)
Fixes #21012
Closes https://github.com/denoland/deno/issues/20855
Fixes https://github.com/denoland/deno/issues/20890
Fixes https://github.com/denoland/deno/issues/20611
Fixes https://github.com/denoland/deno/issues/20336
Fixes `create-svelte` from https://github.com/denoland/deno/issues/17248

Fixes more reports here:
- https://github.com/denoland/deno/issues/6529#issuecomment-1432690559
- https://github.com/denoland/deno/issues/6529#issuecomment-1522059006
- https://github.com/denoland/deno/issues/6529#issuecomment-1695803570
2023-10-30 15:53:08 +00:00
Divy Srivastava
1acef755ca
chore: remove usage of chrono::Utc::now() (#20995)
Remove usage of Chrono's clock feature which pulls in iana-time-zone ->
core-foundation
2023-10-30 11:45:45 -04:00
Divy Srivastava
857e0841c0
chore: bump quick-junit to 0.3.5 (#21004)
Towards #20996
2023-10-28 15:10:17 +02:00
David Sherret
daf9756127
feat(task): add head command (#20998)
Adds a built-in `head` command to deno task:

https://github.com/denoland/deno_task_shell/pull/93
2023-10-27 23:15:00 -04:00
Bartek Iwańczuk
e6ff84c9f9
chore: Remove 'UNSTABLE:' from 'deno compile' help (#21003)
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-28 01:54:52 +00:00
Bartek Iwańczuk
e7abb705f9
Revert "chore: update deno_std submodule (#20994)" (#21001)
This reverts commit 6e2abb2b13.
2023-10-28 01:24:37 +00:00
Divy Srivastava
4c6b986f17
chore(ext/crypto): upgrade to ring 0.17 (#20824)
Ref https://github.com/denoland/deno/issues/18071
2023-10-27 23:15:09 +02:00
Bartek Iwańczuk
6e2abb2b13
chore: update deno_std submodule (#20994) 2023-10-27 10:34:30 -04:00
Luca Casonato
9a97edce05
feat: rename Deno.Server to Deno.HttpServer (#20842)
Keeps the old name around for backwards compat.

Closes #20840
2023-10-27 14:35:31 +02:00
David Sherret
9ec18c35c7
feat(doc): display non-exported types referenced in exported types (#20990)
Upgrades to deno_doc 0.70 which includes the feature for showing
non-exported types referenced in exported types as well as a much more
advanced deno doc that uses a symbol graph.
2023-10-26 21:27:50 -04:00
David Sherret
9026f20b2d
fix(unstable/byonm): improve error messages (#20987)
This improves the error messages when a specifier can't be resolved from
a deno module into an npm package.
2023-10-26 21:22:15 -04:00
David Sherret
347c22dd5e
fix: add 'unstable' property to config json schema (#20984) 2023-10-26 22:11:24 +02:00
Luca Casonato
08b99f3909
chore: update base64 crate (#20877) 2023-10-26 18:39:04 +02:00
David Sherret
842e29057d
refactor: break out ModuleInfoCache from ParsedSourceCache (#20977)
As title. This will help use the two independently from the other, which
will help in an upcoming deno doc PR where I need to parse the source
files with scope analysis.
2023-10-25 18:13:22 -04:00
Nayeem Rahman
79a9f2a77c
perf(lsp): fix redundant walk when collecting tsc code lenses (#20974) 2023-10-25 21:51:02 +01:00
David Sherret
be97170a19
feat(unstable): ability to npm install then deno run main.ts (#20967)
This PR adds a new unstable "bring your own node_modules" (BYONM)
functionality currently behind a `--unstable-byonm` flag (`"unstable":
["byonm"]` in a deno.json).

This enables users to run a separate install command (ex. `npm install`,
`pnpm install`) then run `deno run main.ts` and Deno will respect the
layout of the node_modules directory as setup by the separate install
command. It also works with npm/yarn/pnpm workspaces.

For this PR, the behaviour is opted into by specifying
`--unstable-byonm`/`"unstable": ["byonm"]`, but in the future we may
make this the default behaviour as outlined in
https://github.com/denoland/deno/issues/18967#issuecomment-1761248941

This is an extremely rough initial implementation. Errors are
terrible in this and the LSP requires frequent restarts. Improvements
will be done in follow up PRs.
2023-10-25 14:39:00 -04:00
Nayeem Rahman
6c60859407
build: fix lsp benchmark (#20969) 2023-10-25 03:13:16 +00:00
David Sherret
59a5fe530f
refactor: upgrade to deno_ast 0.31 and deno_graph 0.59 (#20965) 2023-10-24 21:43:19 +00:00
Nayeem Rahman
a7bd0cf7a8
perf(lsp): cleanup workspace settings scopes (#20937) 2023-10-24 21:27:27 +01:00
David Sherret
8f065a60e7
fix: improved using declaration support (#20959)
Upgrades to deno_ast 0.30.
2023-10-24 09:37:02 -04:00
Jérôme Benoit
9df36b33c6
docs(event): fixlets to code comments (#20944) 2023-10-23 14:34:37 +02:00
sigmaSd
9f9c3d9048
fix(polyfill): correctly handle flag when its equal 0 (#20953)
Fixes https://github.com/denoland/deno/issues/20910
2023-10-22 08:02:55 +00:00
Yoshiya Hinosawa
fb73eb1e9d
feat(unstable): allow bare specifier for builtin node module (#20728)
closes #20566
2023-10-20 13:02:08 +09:00
Bartek Iwańczuk
8d9fef3b89
refactor: add WatcherCommunicator helper struct (#20927)
This commit introduces "WatcherCommunicator" struct that
is used facilitate bi-directional communication between CLI
file watcher and the watched function.

Prerequisite for https://github.com/denoland/deno/pull/20876
2023-10-19 07:05:00 +02:00
Bartek Iwańczuk
5095af7801
fix(ext/node): process.argv0 (#20925)
Fixes https://github.com/denoland/deno/issues/20924
2023-10-18 01:51:39 +02:00