summaryrefslogtreecommitdiff
path: root/cli/tsc
AgeCommit message (Collapse)Author
2024-05-29fix: bump cache sqlite dbs to v2 for WAL journal mode change (#24030)David Sherret
In https://github.com/denoland/deno/pull/23955 we changed the sqlite db journal mode to WAL. This causes issues when someone is running an old version of Deno using TRUNCATE and a new version because the two fight against each other.
2024-05-28BREAKING(ffi/unstable): always return u64 as bigint (#23981)Divy Srivastava
The mixed `number | bigint` representation was useful optimization for pointers. Now, pointers are represented as V8 externals. As part of the FFI stabilization effort we want to make `bigint` the only representation for `u64` and `i64`. BigInt representation performance is almost on par with mixed representation with the added benefit that its less confusing and users don't need manual checks and conversions for doing operations on the value. ``` cpu: AMD Ryzen 5 7530U with Radeon Graphics runtime: deno 1.43.6+92a8d09 (x86_64-unknown-linux-gnu) file:///home/divy/gh/ffi/main.ts benchmark time (avg) iter/s (min … max) p75 p99 p995 -------------------------------------------------------------------------- ----------------------------- nop 4.01 ns/iter 249,533,690.5 (3.97 ns … 10.8 ns) 3.97 ns 4.36 ns 9.03 ns ret bigint 7.74 ns/iter 129,127,186.8 (7.72 ns … 10.46 ns) 7.72 ns 8.11 ns 8.82 ns ret i32 7.81 ns/iter 128,087,100.5 (7.77 ns … 12.72 ns) 7.78 ns 8.57 ns 9.75 ns ret bigint (add op) 15.02 ns/iter 66,588,253.2 (14.64 ns … 24.99 ns) 14.76 ns 19.13 ns 19.44 ns ret i32 (add op) 12.02 ns/iter 83,209,131.8 (11.95 ns … 18.18 ns) 11.98 ns 13.11 ns 14.5 ns ```
2024-05-26fix(ext/websocket): change default idleTimeout to 30s (#23985)Alex Gleason
Change the default server websocket `idleTimeout` to 30s to work with common Nginx setups which have a default timeout of 60 seconds
2024-05-23feat(ext/fetch): `Request.bytes()` and `Response.bytes()` (#23823)Asher Gomez
Closes #23790
2024-05-23feat(ext/fs): stabilize `Deno.FsFile.unlock[Sync]()` and ↵Asher Gomez
`Deno.FsFile.lock[Sync]()` (#23754) Related #22230 CC @dyedgreen
2024-05-22feat(ext/fs): stabilize `Deno.FsFile.syncData[Sync]()` and ↵Asher Gomez
`Deno.FsFile.sync[Sync]()` (#23733) Closes #22230
2024-05-22refactor(docs): use `@experimental` instead of `@tags unstable` (#23884)Leo Kettmeir
2024-05-19fix: add missing `URL.parse` types (#23893)Kenta Moriuchi
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-09refactor(lsp): Have JS drive TSC event loop in LSP (#23565)Nathan Whitaker
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-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-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-04-26feat(ci): category & unstable tags checker (#23568)Leo Kettmeir
2024-04-25feat(ext/webgpu): support `UnsafeWindowSurface` on wayland (#23423)chirsz
2024-04-24chore(lsp): revert respect shouldCreateNewSourceFile (#23535)David Sherret
Reverts https://github.com/denoland/deno/pull/23515 but adds a comment for why this is ignored
2024-04-24feat(ext/http): Implement request.signal for Deno.serve (#23425)Matt Mastracci
When the response has been successfully send, we abort the `Request.signal` property to indicate that all resources associated with this transaction may be torn down.
2024-04-23fix(lsp): Fix logic for coalescing pending changes + clear script names ↵Nathan Whitaker
cache when file is closed (#23517)
2024-04-23chore(lsp): respect shouldCreateNewSourceFile parameter (#23515)David Sherret
2024-04-23feat: enable Float16Array support (#23490)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/23450
2024-04-22feat: add jsx precompile skip element option (#23457)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR wires up a new `jsxPrecompileSkipElements` option in `compilerOptions` that can be used to exempt a list of elements from being precompiled with the `precompile` JSX transform.
2024-04-22perf(lsp): Batch "$projectChanged" notification in with the next JS request ↵Nathan Whitaker
(#23451) The actual handling of `$projectChanged` is quick, but JS requests are not. The cleared caches only get repopulated on the next actual request, so just batch the change notification in with the next actual request. No significant difference in benchmarks on my machine, but this speeds up `did_change` handling and reduces our total number of JS requests (in addition to coalescing multiple JS change notifs into one).
2024-04-21fix: Fix some typos in comments (#23470)welfuture
Signed-off-by: welfuture <wellfuture@qq.com>
2024-04-19feat(ext/http): Add `addr` to HttpServer (#23442)Matt Mastracci
Adds an `addr` field to `HttpServer` to simplify the pattern `Deno.serve({ onListen({ port } => listenPort = port })`. This becomes: `const server = Deno.serve({}); port = server.addr.port`. Changes: - Refactors `serve` overloads to split TLS out (in preparation for landing a place for the TLS SNI information) - Adds an `addr` field to `HttpServer` that matches the `addr` field of the corresponding `Deno.Listener`s.
2024-04-19perf(lsp): Avoid passing struct into op_resolve (#23452)Nathan Whitaker
Going through serde_v8 is slow, so just pass the args separately. `op_resolve` is especially hot, so any speedups are good.
2024-04-19perf(lsp): cleanup document dependencies (#23426)Nayeem Rahman
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-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-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(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-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-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-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 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-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-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-08perf(lsp): cache ts config in isolate until new project version (#23283)Nayeem Rahman
2024-04-09chore: update deprecation notices of APIs to be soft-removed (#23076)Asher Gomez
2024-04-08chore: update WPT (#23111)Asher Gomez
Should fix some of the current issues with the `wpt_epoch` workflow. See https://github.com/denoland/deno/actions/runs/8460701853/job/23179358486 --------- Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-08perf(lsp): don't pass remote modules as tsc roots (#23259)Nayeem Rahman
2024-04-08Revert "perf(lsp): Don't retain `SourceFileObject`s in `sourceFileCache` ↵Nayeem Rahman
longer than necessary (#23258)" (#23285)
2024-04-06perf(lsp): Don't retain `SourceFileObject`s in `sourceFileCache` longer than ↵Nathan Whitaker
necessary (#23258) The TS language service requests source files via [getSourceFile](https://github.com/nathanwhit/deno/blob/7a25fd5ef0a82c2aac76594ccd467e9210e92b80/cli/tsc/99_main_compiler.js#L560). In that function, we [unconditionally add](https://github.com/nathanwhit/deno/blob/7a25fd5ef0a82c2aac76594ccd467e9210e92b80/cli/tsc/99_main_compiler.js#L613-L614) the source file to our sourceFileCache. The issue is that we only remove things from that cache if the source file [becomes out of date](https://github.com/nathanwhit/deno/blob/7a25fd5ef0a82c2aac76594ccd467e9210e92b80/cli/tsc/99_main_compiler.js#L777-L783). For files that don't get changed, we keep them in the cache indefinitely. So sometimes we keep SourceFile objects from being GC'ed because they're retained in our cache, even though TS doesn't refer to them any more. I see this in pretty much all of the heap snapshots I've taken. --- The fix here is pretty direct - just store weak references to the sourcefiles in the cache. It doesn't really change our caching behavior, it just prevents us from being the only retainer of a `SourceFile`. I also split the `sourceFileCache` into a separate cache just for assets, as we rely on those being alive. The simpler fix is to only cache assets, but presumably that has a perf impact. --- In local testing, this PR reduced the size of the JS heap by about 1 GB when using `deno lsp` in the Typescript repo.
2024-03-31fix(check): ignore certain diagnostics in remote modules and when publishing ↵David Sherret
(#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-29fix(lsp): implement missing ts server host apis (#23131)Nayeem Rahman