summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2024-05-17feat(serve): support `--port 0` to use an open port (#23846)Satya Rohith
Closes https://github.com/denoland/deno/issues/23845
2024-05-17chore: forward v1.43.4 commit to main (#23861)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-16fix(lsp): respect types dependencies for tsc roots (#23825)Nayeem Rahman
2024-05-16fix(node): seperate worker module cache (#23634)Divy Srivastava
Construct a new module graph container for workers instead of sharing it with the main worker. Fixes #17248 Fixes #23461 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-15perf(compile): Do not checksum eszip content (#23839)Arnau Orriols
Related: https://github.com/denoland/eszip/pull/181 eszip < v0.69.0 hashes all its contents to ensure data integrity. This feature is not necessary in Deno CLI as the binary integrity guarantee is deemed an external responsibility (ie it is to be assumed that, if necessary, the compiled binary will be checksumed externally prior to being executed). eszip >= v0.69.0 no longer performs this checksum by default. This reduces the cold-start time of the compiled binaries, proportionally to their size.
2024-05-16perf(jsr): download metadata files as soon as possible and in parallel (#23836)David Sherret
* https://github.com/denoland/deno_graph/pull/471 * https://github.com/denoland/deno_graph/pull/473
2024-05-15fix(doc): --lint - private ref diagnostic was displaying incorrect ↵David Sherret
information (#23834) * https://github.com/denoland/deno_doc/pull/576 Closes #23303
2024-05-15perf(lsp): Cache semantic tokens for open documents (#23799)Nathan Whitaker
VScode will typically send a `textDocument/semanticTokens/full` request followed by `textDocument/semanticTokens/range`, and occassionally request semantic tokens even when we know nothing has changed. Semantic tokens also get refreshed on each change. Computing semantic tokens is relatively heavy in TSC, so we should avoid it as much as possible. Caches the semantic tokens for open documents, to avoid making TSC do unnecessary work. Results in a noticeable improvement in local benchmarking before: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 383ms) - Big Document/Several Edits (5 runs, mean: 1079ms) - Find/Replace (10 runs, mean: 59ms) - Code Lens (10 runs, mean: 440ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 9921ms) <- End benchmarking lsp ``` after: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 395ms) - Big Document/Several Edits (5 runs, mean: 1024ms) - Find/Replace (10 runs, mean: 56ms) - Code Lens (10 runs, mean: 438ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 8927ms) <- End benchmarking lsp ```
2024-05-14fix(emit): regression - keep comments in emit (#23815)David Sherret
Closes https://github.com/denoland/deno/discussions/23814
2024-05-14fix(lsp): show reference code lens on methods (#23804)Nayeem Rahman
2024-05-14fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)David Sherret
This also fixes a bug where Deno would output to stderr with colours when piped and stdout was not piped.
2024-05-14fix(npm): make tarball extraction more reliable (#23759)David Sherret
1. Extracts to a directory beside the destination. 2. Renames to the destination with retries.
2024-05-14fix(publish): always include config file when publishing (#23797)David Sherret
Closes https://github.com/denoland/deno/issues/23796
2024-05-14fix(publish): error for missing version constraints on dry-publish instead ↵David Sherret
of just publish (#23798) Closes https://github.com/denoland/deno/issues/22835
2024-05-14fix: Add missing `"junction"` type for `SymlinkOptions.types` (#23756)futsuuu
Junction symlink support is added in #22762, but `SymlinkOptions` and its documents are not updated.
2024-05-14fix(doc/publish): support expando properties (#23795)David Sherret
* https://github.com/denoland/deno_graph/pull/428 * https://github.com/denoland/deno_doc/pull/575 Closes https://github.com/denoland/deno/issues/23276
2024-05-13chore(task): various small refactorings (#23793)David Sherret
2024-05-13chore: cleanup unused dependencies (#23787)Leo Kettmeir
2024-05-13fix(cli): panic with `deno coverage` (#23353)Evan
This PR directly addresses the issue raised in #23282 where Deno panics if `deno coverage` is called with `--include` regex that returns no matches. I've opted not to change the return value of `collect_summary` for simplicity and return an empty `HashMap` instead
2024-05-13refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764)Nayeem Rahman
2024-05-12fix(npm): handle null fields in npm registry JSON (#23785)David Sherret
* https://github.com/denoland/deno_npm/pull/52 Closes https://github.com/denoland/deno/issues/23776
2024-05-10chore: forward v1.43.3 release commit to main (#23771)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-09refactor(lsp): Have JS drive TSC event loop in LSP (#23565)Nathan Whitaker
2024-05-09refactor(lsp): unify caching into LspCache (#23746)Nayeem Rahman
2024-05-09fix(lsp): completions for using decl identifiers (#23748)David Sherret
Closes #23688
2024-05-09fix(lsp): move sloppy import resolution from loader to resolver (#23751)Nathan Whitaker
Moves sloppy import resolution from the loader to the resolver. Also adds some test helper functions to make the lsp tests less verbose --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-09fix(task): regression where `npx <command>` sometimes couldn't find command ↵David Sherret
(#23730) Closes https://github.com/denoland/deno/issues/23724
2024-05-08chore: enable clippy::print_stdout and clippy::print_stderr (#23732)David Sherret
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
2024-05-09chore: forward v1.43.2 release commit to main (#23749)denobot
**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-08FUTURE: `deno install` changes (#23498)Bartek Iwańczuk
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-08fix: upgrade TypeScript from 5.4.3 to 5.4.5 (#23740)David Sherret
https://github.com/denoland/TypeScript/pull/11
2024-05-08refactor(lsp): cleanup partially locking methods (#23723)Nayeem Rahman
2024-05-07fix(jsr): panic when importing jsr package with deps via https (#23728)David Sherret
Closes #23644
2024-05-07refactor(lsp): reland move resolver fields to LspResolver (#23685)Nayeem Rahman
2024-05-06fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)Nathan Whitaker
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-06fix(compile): relative permissions should be retained as relative (#23719)David Sherret
Closes #23715
2024-05-06fix(ext/node): napi_get_element and napi_set_element work with objects (#23713)Bartek Iwańczuk
This change makes DuckDB example work: https://github.com/denoland/deno/issues/23656.
2024-05-05fix(fmt/js): `else` was moved to wrong `if` sometimes when formatting ↵David Sherret
minified code (#23706) * https://github.com/dprint/dprint-plugin-typescript/pull/633
2024-05-05docs: update categories to match new planned sitemap (#23677)Jo Franchetti
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-05chore: update wgpu (#23684)Leo Kettmeir
2024-05-05fix(ext/node): don't rely on Deno.env to read NODE_DEBUG (#23694)Satya Rohith
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-04fix(publish): public api - trace parent classes & interfaces when following ↵David Sherret
a method (#23661) * https://github.com/denoland/deno_graph/pull/465 Closes https://github.com/denoland/deno/issues/23658
2024-05-04fix(lsp): handle multiline semantic tokens (#23691)Nayeem Rahman
2024-05-03fix(lsp): always cache all npm packages (#23679)David Sherret
Closes #23659
2024-05-03refactor(lsp): cleanup cache and module registry update (#23620)Nayeem Rahman
2024-05-02fix(test): proper type checking for files with doc tests (#23654)Leo Kettmeir
Closes https://github.com/denoland/deno/issues/23430 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-05-01fix(lsp): Catch cancellation exceptions thrown by TSC, stop waiting for TS ↵Nathan Whitaker
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](https://github.com/nathanwhit/deno/blob/0c671c9792ac706c1ecd60f88efdc5eb8e941917/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-01feat(runtime): allow adding custom extensions to snapshot (#23569)Mathias Lafeldt
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-011.43.0 (#23629)denobot
Bumped versions for 1.43.0 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-05-01Revert "refactor(lsp): move fields from Documents to LspResolver" (#23626)Divy Srivastava
This reverts commit 5cae3439912ad60eb2866f3d4372a5fe4d0de957. ![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.