summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.rs
AgeCommit message (Collapse)Author
2024-11-13feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a ↵David Sherret
package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though.
2024-10-21fix(lsp): import-map-remap quickfix for type imports (#26454)Nayeem Rahman
2024-10-01feat(lsp): quick fix for @deno-types="npm:@types/*" (#25954)Nayeem Rahman
2024-09-28refactor: extract out sloppy imports resolution from CLI crate (#25920)David Sherret
This is slow progress towards creating a `deno_resolver` crate. Waiting on: * https://github.com/denoland/deno/pull/25918 * https://github.com/denoland/deno/pull/25916
2024-09-11fix(lsp): encode url parts before parsing as uri (#25509)Nayeem Rahman
2024-08-28fix(lsp): panic on url_to_uri() (#25238)Nayeem Rahman
2024-08-24refactor(lsp): changes for lsp_types 0.97.0 (#25169)Nayeem Rahman
2024-08-21chore(lsp): use 'install' terminology for jsr and npm packages (#25119)Nayeem Rahman
2024-08-12fix(lsp): directly use file referrer when loading document (#24997)Nayeem Rahman
2024-08-02docs: fix typos (#24820)Andreas Deininger
This PR fixes various typos I spotted in the project.
2024-07-25fix(unstable): move sloppy-import warnings to lint rule (#24710)David Sherret
Adds a new `no-sloppy-imports` lint rule and cleans up the lint code. Closes #22844 Closes https://github.com/denoland/deno_lint/issues/1293
2024-07-24fix: update lsp error message of 'relative import path' to 'use deno add' ↵HasanAlrimawi
for npm/jsr packages (#24524)
2024-07-19refactor: update to deno_config 0.25 (#24645)David Sherret
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and `WorkspaceDirectory` - Uses the workspace cache in the lsp * https://github.com/denoland/deno_config/pull/95 * https://github.com/denoland/deno_config/pull/96
2024-07-18fix(lsp): support npm workspaces and fix some resolution issues (#24627)David Sherret
Makes the lsp use the same code as the rest of the cli.
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
2024-06-26refactor: bump deno_graph to 0.79 (#24337)David Sherret
No fixes in this to my knowledge. Just an upgrade. The functionality here will be used in a different PR.
2024-06-17feat(lsp): multi deno.json resolver scopes (#24206)Nayeem Rahman
2024-06-13perf(lsp): store settings in Arc (#24191)Nayeem Rahman
2024-06-05fix: better handling of npm resolution occurring on workers (#24094)David Sherret
Closes https://github.com/denoland/deno/issues/24063
2024-05-30feat(lint): add `no-boolean-literal-for-arguments` rule and enable ↵Luca Casonato
`no-unused-vars` for jsx files (#24034) * https://github.com/denoland/deno_lint/pull/1271 * https://github.com/denoland/deno_lint/pull/1277 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-29perf(lsp): lock out requests until init is complete (#23998)Nayeem Rahman
2024-05-23refactor(lsp): determine file referrer for each document (#23867)Nayeem Rahman
2024-05-13refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764)Nayeem Rahman
2024-05-09refactor(lsp): unify caching into LspCache (#23746)Nayeem Rahman
2024-05-08refactor(lsp): cleanup partially locking methods (#23723)Nayeem Rahman
2024-05-07refactor(lsp): reland move resolver fields to LspResolver (#23685)Nayeem Rahman
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.
2024-04-30refactor(lsp): move fields from Documents to LspResolver (#23585)Nayeem Rahman
2024-04-27chore(lsp): remove ConfigSnapshot (#23579)Nayeem Rahman
2024-04-26refactor(lsp): unify resolver types into LspResolver (#23514)Nayeem Rahman
2024-04-24feat(jsr): support importing from jsr via HTTPS specifiers (except for type ↵David Sherret
checking) (#23513) Closes https://github.com/jsr-io/jsr/issues/322
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-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-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-04perf(lsp): don't keep remote module ast's in memory (#23230)Nayeem Rahman
2024-04-02feat(lsp): respect nested deno.json for fmt and lint config (#23159)Nayeem Rahman
2024-03-27feat(task): Task description in the form of comments (#23101)Nathan Whitaker
Closes #22786. TLDR; ```jsonc { "tasks": { // Some comment // // describing what the task does "dev": "deno run -A --watch main.ts" } } ``` ```bash deno task ``` ![Screenshot 2024-03-27 at 1 43 49 PM](https://github.com/denoland/deno/assets/17734409/7a14da8c-8e63-45ba-9bfb-590d250b56a9)
2024-03-27fix(lsp): decoding percent-encoding(non-ASCII) file path correctly (#22582)Hajime-san
2024-03-26refactor(lsp): unify config file data into ConfigTree (#23032)Nayeem Rahman
2024-03-21feat(lint): `deno lint --fix` and lsp quick fixes (#22615)David Sherret
Adds a `--fix` option to deno lint. This currently doesn't work for basically any rules, but we can add them over time to deno lint.
2024-03-04fix(lsp): do not warn about local file "redirects" from .js to .d.ts files ↵David Sherret
(#22670) The diagnostic was incorrect when importing a `.js` file with a corresponding `.d.ts` file with sloppy imports because it would say to change the `.js` extension to `.d.ts`, which is incorrect. We might as well just hide this diagnostic.
2024-03-04fix(lsp): ignore code errors when type passes for non-`@deno-types` ↵David Sherret
reolution (#22682)
2024-02-27fix(unstable): sloppy imports should resolve .d.ts files during types ↵David Sherret
resolution (#22602)
2024-02-19feat(unstable/lint): no-slow-types for JSR packages (#22430)David Sherret
1. Renames zap/fast-check to instead be a `no-slow-types` lint rule. 1. This lint rule is automatically run when doing `deno lint` for packages (deno.json files with a name, version, and exports field) 1. This lint rules still occurs on publish. It can be skipped by running with `--no-slow-types`
2024-02-12feat(lsp): jsr support first pass (#22382)Nayeem Rahman
This implementation heavily depends on there being a lockfile, meaning JSR specifiers will always diagnose as uncached unless it's there. In practice this affects cases where a `deno.json` isn't being used. Our NPM specifier support isn't subject to this. The reason for this is that the version constraint solving code is currently buried in `deno_graph` and not usable from the LSP, so the only way to reuse that logic is the solved-version map in the lockfile's `packages.specifiers`.
2024-02-06fix(lsp): disable no-cache diagnostics for jsr specifiers (#22284)Nayeem Rahman
2024-01-18fix(lsp): regression - formatting was broken on windows (#21972)David Sherret
~~Waiting on: https://github.com/denoland/deno_config/pull/31~~ Closes #21971 Closes https://github.com/denoland/vscode_deno/issues/1029
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-22feat(lsp): allow to connect V8 inspector (#21482)Bartek Iwańczuk
This commit adds a way to connect to the TS compiler host that is run as part of the "deno lsp" subcommand. This can be done by specifying "DENO_LSP_INSPECTOR" variable. --------- Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-12-08feat(lsp): provide quick fixes for specifiers that could be resolved ↵David Sherret
sloppily (#21506)