summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2024-04-19refactor: move redirect handling into deno_graph (#23444)David Sherret
2024-04-19perf(lsp): cleanup document dependencies (#23426)Nayeem Rahman
2024-04-18fix(fmt): error for more unterminated nodes (#23449)David Sherret
https://github.com/dprint/dprint-plugin-typescript/pull/628 Closes https://github.com/denoland/deno/issues/23438
2024-04-18fix(ext/node): remove unwraps from fallible conversions (#23447)Bartek Iwańczuk
Removes `.unwrap()` calls from fallible conversion and replaces with graceful error returns.
2024-04-18fix(cli): avoid `deno add` and `deno vendor` errors when deno.json is empty ↵nokazn
(#23439)
2024-04-18feat(ext/net): extract TLS key and certificate from interfaces (#23327)Bartek Iwańczuk
Relands #23325
2024-04-17perf(lsp): release unused documents (#23398)Nayeem Rahman
2024-04-17chore(lsp): Include new benchmark in the collected benchmark data (#23420)Nathan Whitaker
So it will actually show up on the [deno benchmarks site](http://deno.com/benchmarks)
2024-04-17fix(publish): support import equals (#23421)Luca Casonato
2024-04-17perf: v8 code cache (#23081)Igor Zinkovsky
This PR enables V8 code cache for ES modules and for `require` scripts through `op_eval_context`. Code cache artifacts are transparently stored and fetched using sqlite db and are passed to V8. `--no-code-cache` can be used to disable. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-16fix(cli): Identify and fix a test deadlock (#23411)Matt Mastracci
If a worker tried to flush large amounts of data right as the test was ending, it could cause the flush sync marker to get lost.
2024-04-16feat(check): allow using side effect imports with unknown module kinds (ex. ↵David Sherret
css modules) (#23392) This allows people to use imports like: ```ts import "./app.css"; ``` ...with `deno check` in systems where there's a bundle step (ex. Vite). This will still error when using it with `deno run` or if the referenced file does not exist. See test cases for behaviour.
2024-04-16chore(lsp): Add benchmark for performance on a large real-world repo (#23395)Nathan Whitaker
This PR adds a benchmark intended to measure how the LSP handles larger repos, as well as its performance on a more realistic workload. The repo being benchmarked is [deco-cx/apps](https://github.com/deco-cx/apps) which has been vendored along with its dependencies. It's included as a git submodule as its fairly large. The LSP requests used in the benchmark are the actual requests sent by VSCode as I opened, modified, and navigated around a file (to simulate an actual user interaction). The main motivation is to have a more realistic benchmark that measures how we do with a large number of files and dependencies. The improvements made from 1.42 to 1.42.3 mostly improved performance with larger repos, so none of our existing benchmarks showed an improvement. Here are the results for the changes made from 1.42 to 1.42.3 (the new benchmark is the last one listed): **1.42.0** ```test Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 379ms) - Big Document/Several Edits (5 runs, mean: 1142ms) - Find/Replace (10 runs, mean: 51ms) - Code Lens (10 runs, mean: 443ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 25121ms) <- End benchmarking lsp ``` **1.42.3** ```text Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 383ms) - Big Document/Several Edits (5 runs, mean: 1135ms) - Find/Replace (10 runs, mean: 55ms) - Code Lens (10 runs, mean: 440ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 11675ms) <- End benchmarking lsp ```
2024-04-16fix(cli): TestEventSender should be !Clone (#23405)Matt Mastracci
`TestEventSender` should not be Clone so we don't end up with multiple copies of the same writer FD. This is probably not the cause of the test channel lockups, but it's a lot easier to reason about.
2024-04-17fix: add `DENO_FUTURE` to `deno --help` (#23368)Asher Gomez
2024-04-16fix(ext/node): dispatch beforeExit/exit events irrespective of listeners ↵Satya Rohith
(#23382) Closes https://github.com/denoland/deno/issues/23342 Closes https://github.com/denoland/deno/issues/21757
2024-04-16chore: forward v1.42.4 commit to `main` (#23394)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-04-16fix(lsp): slice strings by byte index in code actions (#23387)Nayeem Rahman
Fixes #23361.
2024-04-15fix(check): cache bust when changing nodeModulesDir setting (#23355)David Sherret
2024-04-15fix(lsp): improved cjs tracking (#23374)David Sherret
Our cjs tracking was a bit broken. It was marking stuff as esm that was actually cjs leading to type checking errors.
2024-04-15fix(ext/io): Fix NUL termination error in windows named pipes (#23379)Matt Mastracci
Due to a terminating NUL that was placed in a `r#` string, we were not actually NUL-terminating pipe names on Windows. While this has no security implications due to the random nature of the prefix, it would occasionally cause random failures when the trailing garbage would make the pipe name invalid.
2024-04-15refactor: move lifecycle events dispatch to Rust (#23358)Bartek Iwańczuk
This commit moves logic of dispatching lifecycle events ( "load", "beforeunload", "unload") to be triggered from Rust. Before that we were executing scripts from Rust, but now we are storing references to functions from "99_main.js" and calling them directly. Prerequisite for https://github.com/denoland/deno/issues/23342
2024-04-15fix(lsp): ensure project version is incremented when config changes (#23366)David Sherret
I'm running into a node resolution bug in the lsp only and while tracking it down I noticed this one. Fixed by moving the project version out of `Documents`.
2024-04-14refactor(lsp): use fallback resolution in op_resolve() (#23329)Nayeem Rahman
2024-04-14perf: do not clone swc `Program` when transpiling (#23365)David Sherret
2024-04-13fix(publish): do not error for param with initializer before required ↵David Sherret
parameter (#23356) * https://github.com/denoland/deno_graph/pull/440 Closes https://github.com/denoland/deno/issues/23331
2024-04-12fix(publish): handle definite assignment on ts private properties (#23345)David Sherret
2024-04-12perf(lsp): Only deserialize response from `op_respond` once (#23349)Nathan Whitaker
Previously we were deserializing it twice - once to `serde_json::Value`, and then again from the `serde_json::Value` to a concrete type
2024-04-12chore: upgrade deno_core to 0.274.0 (#23344)Divy Srivastava
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-12chore: remove repetitive words (#23341)youngwendy
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-12chore: update deno_graph (#23340)Luca Casonato
2024-04-12chore: forward v1.42.3 release commit to main (#23335)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-04-11fix(publish): do not warn about excluded external modules in node_modules ↵David Sherret
directory (#23173)
2024-04-12fix(inspector): don't panic if port is not free (#22745)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22113 Closes https://github.com/denoland/deno/issues/23177 Closes https://github.com/denoland/deno/issues/22883 Closes https://github.com/denoland/deno/issues/22377
2024-04-11fix: upgrade deno_ast related crates (#23187)David Sherret
Had to revert back swc due to https://github.com/swc-project/swc/issues/8840 Fixes: - https://github.com/denoland/deno_lint/pull/1262 - https://github.com/denoland/deno_doc/pull/538 - https://github.com/denoland/deno_doc/pull/537 - https://github.com/denoland/deno_graph/pull/430 - https://github.com/denoland/deno_graph/pull/425 - https://github.com/denoland/deno_graph/pull/432
2024-04-11perf(lsp): use a stub module in tsc for failed resolutions (#23313)Nayeem Rahman
2024-04-11Revert "refactor(ext/net): extract TLS key and certificate from inter… ↵Bartek Iwańczuk
(#23325) …faces (#23296)" This reverts commit e190acbfa8b41f92291e73c405735ba0d7b5b172. Reverting because it broke stable API type declarations. We will reland it for v1.43 with updated interfaces
2024-04-11fix(lsp): Denormalize specifiers before calling `$projectChanged` (#23322)Nathan Whitaker
Fixes the regression described in https://github.com/denoland/deno/pull/23293#issuecomment-2049819724. This affected jupyter notebooks, as the LSP was passing in already denormalized specifiers, while the jupyter kernel was not. We need to denormalize the specifiers to evict the proper keys from our caches.
2024-04-11fix(npm): local nodeModulesDir was sometimes resolving duplicates of same ↵David Sherret
package (#23320)
2024-04-11chore: forward v1.42.2 release commit to main (#23315)denobot
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-04-11perf(lsp): replace document registry source cache on update (#23311)Nayeem Rahman
2024-04-10perf(lsp): Only evict caches on JS side when things actually change (#23293)Nathan Whitaker
Currently we evict a lot of the caches on the JS side of things on every request, namely script versions, script file names, and compiler settings (as of #23283, it's not quite every request but it's still unnecessarily often). This PR reports changes to the JS side, so that it can evict exactly the caches that it needs too. We might want to do some batching in the future so as not to do 1 request per change.
2024-04-10chore: update to Rust 1.77.2 (#23262)林炳权
update to Rust 1.77.2 --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-10chore: update references to `deno_std` to use JSR (#23239)Asher Gomez
There are more uses of `deno.land/std` in the codebase, but for URL parsing purposes rather than network calls or documentation.
2024-04-10refactor(lsp): cleanup documents dependents calculation (#23295)Nayeem Rahman
2024-04-10fix(ext/fs): account for all ops in leak checks (#23300)Asher Gomez
This is PR a smaller retry of #23066 that simply ensures all async `ext/fs` ops are accounted for if left hanging in tests. This also sorts the `OP_DETAILS` in alphabetical order for easy future reading. When reviewing, it might be best to look at the commits in order for better understanding.
2024-04-09refactor(ext/net): extract TLS key and certificate from interfaces (#23296)Matt Mastracci
Removes the certificate options from all the interfaces and replaces them with a new `TlsCertifiedKeyOptions`. This allows us to centralize the documentation for TLS key management for both client and server, and will allow us to add key object support in the future. Also adds an option `keyFormat` field to the cert/key that must be omitted or set to `pem`. This will allow us to load other format keys in the future `der`, `pfx`, etc. In a future PR, we will add a way to load a certified key object, and we will add another option to `TlsCertifiedKeyOptions` like so: ```ts export interface TlsCertifiedKeyOptions = | TlsCertifiedKeyPem | TlsCertifiedKeyFromFile | TlsCertifiedKeyConnectTls | { key: Deno.CertifiedKey } ```
2024-04-09perf(lsp): More granular locking of `FileSystemDocuments` (#23291)Nathan Whitaker
Previously we locked the entire `FileSystemDocuments` even for lookups, causing contention. This was particularly bad because some of the hot ops (namely `op_resolve`) can end up hitting that lock under contention. This PR replaces the mutex with synchronization internal to `FileSystemDocuments` (an `AtomicBool` for the dirty flag, and then a `DashMap` for the actual documents). I need to think a bit more about whether or not this introduces any problematic race conditions.
2024-04-09docs: Fix typo "discreet" to "discrete" (#23290)Carlos Precioso
Changes `discreet` in the documentation for `discrete` "Discreet" means careful to avoid being noticed, "discrete" means separate parts, and is what the documentation refers to.
2024-04-08refactor: use `chrono::DateTime::from_timestamp` (#23273)Asher Gomez
`chrono::NaiveDateTime::from_timestamp_opt()` was deprecated in https://github.com/chronotope/chrono/pull/1473. Prerequisite for #23272.