Commit Graph

6145 Commits

Author SHA1 Message Date
denobot
e6dc4dfbff
chore: forward v1.43.2 release commit to main (#23749)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.43.2

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.43.2 && git checkout -b forward_v1.43.2 upstream/forward_v1.43.2
```

Don't need this PR? Close it.

cc @nathanwhit

Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-09 00:45:01 +00:00
Bartek Iwańczuk
4e23a5b1fc
FUTURE: deno install changes (#23498)
This PR implements the changes we plan to make to `deno install` in deno
2.0.
- `deno install` without arguments caches dependencies from
`package.json` / `deno.json` and sets up the `node_modules` folder
- `deno install <pkg>` adds the package to the config file (either
`package.json` or `deno.json`), i.e. it aliases `deno add`
- `deno add` can also add deps to `package.json` (this is gated behind
`DENO_FUTURE` due to uncertainty around handling projects with both
`deno.json` and `package.json`)
- `deno install -g <bin>` installs a package as a globally available
binary (the same as `deno install <bin>` in 1.0)

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-08 12:34:46 -07:00
David Sherret
525b3c8d74
fix: upgrade TypeScript from 5.4.3 to 5.4.5 (#23740)
https://github.com/denoland/TypeScript/pull/11
2024-05-08 13:54:56 -04:00
Nayeem Rahman
5e6c72d39f
refactor(lsp): cleanup partially locking methods (#23723) 2024-05-08 06:34:42 +01:00
David Sherret
5379bb0289
fix(jsr): panic when importing jsr package with deps via https (#23728)
Closes #23644
2024-05-07 21:53:17 +00:00
Nayeem Rahman
cbb78e138f
refactor(lsp): reland move resolver fields to LspResolver (#23685) 2024-05-07 03:20:15 +01:00
Nathan Whitaker
672216d65a
fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)
Fixes the `Debug Failure` errors described in
https://github.com/denoland/deno/issues/23643#issuecomment-2094552765 .

The issue here was that we were passing diagnostic codes as strings but
TSC expects the codes to be numbers. This resulted in some quick fixes
not working (as illustrated by the test added here which fails before
this PR).

The first commit is the actual fix. The rest are just test related.
2024-05-06 23:54:52 +00:00
David Sherret
2dcbef2abb
fix(compile): relative permissions should be retained as relative (#23719)
Closes #23715
2024-05-06 19:21:58 -04:00
Bartek Iwańczuk
f698bc70e2
fix(ext/node): napi_get_element and napi_set_element work with objects (#23713)
This change makes DuckDB example work:
https://github.com/denoland/deno/issues/23656.
2024-05-06 21:22:50 +02:00
David Sherret
4ab68df33e
fix(fmt/js): else was moved to wrong if sometimes when formatting minified code (#23706)
* https://github.com/dprint/dprint-plugin-typescript/pull/633
2024-05-05 18:58:56 -07:00
Jo Franchetti
a69b4646a0
docs: update categories to match new planned sitemap (#23677)
Updating categories for new sitemap as documented here:

https://lucid.app/lucidspark/744b0498-a133-494d-981c-76059dd18885/edit?view_items=jpvBwFdYlNdB&invitationId=inv_50c83415-2aa5-423f-b438-ea156695c08b
2024-05-05 18:56:55 -07:00
Leo Kettmeir
cd12d41627
chore: update wgpu (#23684) 2024-05-05 07:22:18 -07:00
Satya Rohith
b2628e4a06
fix(ext/node): don't rely on Deno.env to read NODE_DEBUG (#23694)
This patch allows implementors to use ext/node without
the need to implement Deno.env API.

Closes https://github.com/denoland/deno/issues/23687
2024-05-05 16:16:02 +02:00
David Sherret
e36de7e959
fix(publish): public api - trace parent classes & interfaces when following a method (#23661)
* https://github.com/denoland/deno_graph/pull/465

Closes https://github.com/denoland/deno/issues/23658
2024-05-04 23:19:00 +02:00
Nayeem Rahman
973743b751
fix(lsp): handle multiline semantic tokens (#23691) 2024-05-04 21:48:06 +01:00
David Sherret
121769844d
fix(lsp): always cache all npm packages (#23679)
Closes #23659
2024-05-03 16:44:41 -04:00
Nayeem Rahman
1fce59281c
refactor(lsp): cleanup cache and module registry update (#23620) 2024-05-03 20:52:58 +01:00
Leo Kettmeir
1b27b58396
fix(test): proper type checking for files with doc tests (#23654)
Closes https://github.com/denoland/deno/issues/23430

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-05-02 18:13:51 +00:00
Nathan Whitaker
66b66de96a
fix(lsp): Catch cancellation exceptions thrown by TSC, stop waiting for TS result upon cancellation (#23645)
Fixes #23643.

We weren't catching the cancellation exception thrown by TSC on the JS
side, so the rust side was catching this exception and then attempting
to print out the exception via `toString`. That last bit resulted in a
cryptic `[object Object]` showing up in the logs like so:

```
Error during TS request "getCompletionEntryDetails":
  [object Object]
```

I'm not 100% sure how we weren't seeing this in the past. My guess is
that #23409 and the subsequent PR to improve the exception catching and
logging surfaced this, but I'm still not quite clear on it.

My initial fix here returned `null` to rust when a server request was
cancelled, but this resulted in a deserialization error when we
attempted to deserialize that into the expected response type. So now,
as soon as the request's cancellation token signals we'll stop waiting
for a response and return an error (which will get swallowed as the LSP
request is being cancelled).

I was a bit surprised to find that [this
branch](0c671c9792/cli/lsp/tsc.rs (L1093))
actually executes sometimes, I believe due to the fact that aborting a
future may not [immediately stop its
execution](https://docs.rs/futures/latest/futures/stream/struct.AbortHandle.html#method.abort).
2024-05-01 20:31:11 -07:00
Mathias Lafeldt
ee122c5af6
feat(runtime): allow adding custom extensions to snapshot (#23569)
This makes `create_runtime_snapshot` more useful for embedders who add
their own extension(s) to the runtime in build scripts.

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-05-01 22:00:32 +00:00
denobot
5ff881a073
1.43.0 (#23629)
Bumped versions for 1.43.0

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-05-01 12:16:39 +05:30
Divy Srivastava
7f80d90f1c
Revert "refactor(lsp): move fields from Documents to LspResolver" (#23626)
This reverts commit 5cae343991.


![image](https://github.com/denoland/deno/assets/34997667/e68e40a1-7baf-453b-80d9-f8b6aae186c7)

Caused a +3.3s regression in one of the LSP benchmarks at
deno.land/benchmarks.
2024-05-01 05:54:25 +00:00
David Sherret
486437fee1
refactor(jupyter): move communication methods out of data structs (#23622)
Moves the communication methods out of the data structs and onto the
`Connection` struct.
2024-05-01 02:30:40 +00:00
Nayeem Rahman
ac9e07bdfa
chore(lsp): revert import map pre-resolution for jsxImportSource (#23619) 2024-05-01 01:44:20 +01:00
Leo Kettmeir
544d248c16
chore: update deno_doc (#23621) 2024-05-01 00:43:24 +00:00
David Sherret
641356bb16
fix(publish): handle variable declarations with a declare keyword (#23616) 2024-04-30 13:02:39 -07:00
Luca Casonato
6cdf81db7c
feat(cli): add support for jsxImportSourceTypes (#23419)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-04-30 18:12:35 +00:00
findmyhappy
ce4a7773cc
docs: fix some typos in comments (#23520) 2024-04-30 17:59:56 +10:00
Nayeem Rahman
5cae343991
refactor(lsp): move fields from Documents to LspResolver (#23585) 2024-04-30 02:41:19 +01:00
Kenta Moriuchi
783533d2e3
FUTURE: remove import assertions support for JavaScript (#23541)
Ref #17944, https://github.com/swc-project/swc/issues/8893

TypeScript removes the `assert` keywords in the transpile, so this PR
only works for JavaScript files
2024-04-29 22:43:05 +02:00
David Sherret
4384a126bb
fix: handle specifying an import map in an ancestor dir of deno.json (#23602)
* https://github.com/denoland/deno_config/pull/51

Closes https://github.com/denoland/deno/issues/21440
2024-04-29 14:32:27 -04:00
David Sherret
e6f4c8f531
fix(fmt/md): better handling of lists in block quotes (#23604)
* https://github.com/dprint/dprint-plugin-markdown/pull/94
2024-04-29 20:29:00 +02:00
David Sherret
48daf2dc88
chore: add tests for moduleGraph2 (#23603)
Also did some renames from underscores to hyphens
2024-04-29 14:09:58 -04:00
Leo Kettmeir
67d00fb1e3
fix: reenable syntax highlighting for doc html generator (#23570)
This was forgotten to be renabled a while back when we made it optional
2024-04-29 11:03:51 -07:00
David Sherret
7d93704591
refactor: remove conditional color code in bench reporter (#23593)
There is no need for this conditional code because it's handled by the
`colors` module.
2024-04-29 09:27:55 -04:00
David Sherret
651e3e9e6d
fix(compile): certain jsr specifiers sometimes can't load (#23567)
When returning a jsr specifier for resolve it seems like deno core does
not work properly and hangs.

Closes https://github.com/denoland/deno/issues/23551
Closes https://github.com/denoland/deno/issues/23139
2024-04-27 21:11:57 +00:00
Nayeem Rahman
e0f849289f
chore(lsp): remove ConfigSnapshot (#23579) 2024-04-27 21:35:41 +01:00
Nayeem Rahman
f8ddcc4f78
refactor(lsp): unify resolver types into LspResolver (#23514) 2024-04-26 21:39:33 +01:00
Leo Kettmeir
c519355624
feat(ci): category & unstable tags checker (#23568) 2024-04-26 09:04:29 -07:00
David Sherret
bc4aa5f901
fix(npm): do not panic hitting root dir while resolving npm package (#23556)
Closes https://github.com/denoland/deno/issues/23029
2024-04-25 14:13:55 +00:00
Divy Srivastava
1a5b6296c5
chore: fix cargo publish CI (#23550)
The `cargo-publish` CI is failing
https://github.com/denoland/deno/actions/runs/8830423538/job/24243524040#step:7:5180
2024-04-25 17:16:36 +05:30
denobot
8321106b78
1.43.0 (#23549)
Bumped versions for 1.43.0

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-04-25 15:14:26 +05:30
chirsz
1de162f1c1
feat(ext/webgpu): support UnsafeWindowSurface on wayland (#23423) 2024-04-25 09:58:16 +05:30
David Sherret
f3284529f1
feat(jsr): support importing from jsr via HTTPS specifiers (except for type checking) (#23513)
Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24 21:43:34 +00:00
Leo Kettmeir
5a7414e163
chore: update deno_doc (#23544) 2024-04-24 20:34:21 +00:00
Nayeem Rahman
ac71d876d7
fix(lsp): inherit missing fmt and lint config from parent scopes (#23547) 2024-04-24 22:14:01 +02:00
David Sherret
63e0f3647f
fix(config): move json schema unstable examples to item (#23506) 2024-04-24 16:13:33 -04:00
Nathan Whitaker
764f390163
chore(cli): Add workspaces property to config schema (#23546) 2024-04-24 12:56:23 -07:00
Nathan Whitaker
a6c2472949
chore(lsp): Print out stack trace if exception occurs in TS request (#23543)
Before this PR, there would just be an uninformative "Error occurred"
message, after this PR you'll get a stack trace in the LSP output window
like this:

```text
Error during TS request "$getSupportedCodeFixes":
  Error: i threw an exception
    at serverRequest (ext:deno_tsc/99_main_compiler.js:1089:11)
```
2024-04-24 19:46:08 +00:00
Matt Mastracci
2f8825a935
feat: Add deno serve subcommand (#23511)
By default, `deno serve` will assign port 8000 (like `Deno.serve`).
Users may choose a different port using `--port`.

`deno serve /tmp/file.ts`

`server.ts`:
```ts
export default {
  fetch(req) {
    return new Response("hello world!\n");
  },
};
```
2024-04-24 19:45:49 +00:00