summaryrefslogtreecommitdiff
path: root/cli/lsp/analysis.rs
AgeCommit message (Collapse)Author
2024-11-14refactor(resolver): move more resolution code into deno_resolver (#26873)David Sherret
Follow-up to cjs refactor. This moves most of the resolution code into the deno_resolver crate. Still pending is the npm resolution code.
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-11-12fix(lsp): skip code action edits that can't be converted (#26831)Nayeem Rahman
2024-11-06feat(lsp): auto-import completions from byonm dependencies (#26680)Nayeem Rahman
2024-11-01fix: improved support for cjs and cts modules (#26558)David Sherret
* cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-25fix(lsp): make missing import action fix infallible (#26539)Nayeem Rahman
2024-10-08refactor: remove usage of full_range (#26065)David Sherret
For https://github.com/denoland/deno_graph/pull/538/files This was removed because the deserialization was not backwards compatible.
2024-10-07fix(lsp): exclude missing import quick fixes with bad resolutions (#26025)Nayeem Rahman
2024-10-01feat(lsp): quick fix for @deno-types="npm:@types/*" (#25954)Nayeem Rahman
2024-09-28refactor: use deno_path_util (#25918)David Sherret
2024-09-18fix: do not panic running invalid file specifier (#25530)Yazan AbdAl-Rahman
Co-authored-by: Bedis Nbiba <bedisnbiba@gmail.com>
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-14fix(lsp): import map lookup for jsr subpath auto import (#25025)Nayeem Rahman
2024-07-25refactor: decouple node resolution from deno_core (#24724)David Sherret
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-23fix(lsp): rewrite import for 'infer return type' action (#24685)Nayeem Rahman
2024-06-12fix(lsp): strip .js before probing for valid import fix (#24188)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-23refactor(lsp): determine file referrer for each document (#23867)Nayeem Rahman
2024-05-21fix(lsp): apply import fix to missing declaration code action (#23924)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-26refactor(lsp): unify resolver types into LspResolver (#23514)Nayeem Rahman
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(lsp): slice strings by byte index in code actions (#23387)Nayeem Rahman
Fixes #23361.
2024-04-02feat(lsp): respect nested deno.json for fmt and lint config (#23159)Nayeem Rahman
2024-03-27fix(lsp): prefer cache over tsc quick fixes (#23093)Nayeem Rahman
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-06fix(node): improve cjs tracking (#22673)David Sherret
We were missing saying that a file is CJS when some Deno code imported from the node_modules directory at runtime.
2024-02-21feat(lsp): auto-import completions for jsr specifiers (#22462)Nayeem Rahman
2024-02-09fix: upgrade to deno_ast 0.33 (#22341)David Sherret
* Uses diagnostics from deno_ast * Real fix for https://github.com/denoland/deno/pull/22310 * Moves `deno lint --json` code here * Upgrades swc Closes #22117 Closes #22109 Closes #21927 Closes #20993
2024-01-21fix(lsp): improved npm specifier to import map entry mapping (#22016)David Sherret
Upgrades to the latest deno_semver
2024-01-09fix: update deno_lint and swc (#21718)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-01chore: update to Rust 1.75 (#21731)林炳权
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-04fix(node): use closest package.json to resolve package.json imports (#21075)David Sherret
2023-10-25feat(unstable): ability to `npm install` then `deno run main.ts` (#20967)David Sherret
This PR adds a new unstable "bring your own node_modules" (BYONM) functionality currently behind a `--unstable-byonm` flag (`"unstable": ["byonm"]` in a deno.json). This enables users to run a separate install command (ex. `npm install`, `pnpm install`) then run `deno run main.ts` and Deno will respect the layout of the node_modules directory as setup by the separate install command. It also works with npm/yarn/pnpm workspaces. For this PR, the behaviour is opted into by specifying `--unstable-byonm`/`"unstable": ["byonm"]`, but in the future we may make this the default behaviour as outlined in https://github.com/denoland/deno/issues/18967#issuecomment-1761248941 This is an extremely rough initial implementation. Errors are terrible in this and the LSP requires frequent restarts. Improvements will be done in follow up PRs.
2023-10-02refactor(npm): make `NpmCache`, `CliNpmRegistryApi`, and `NpmResolution` ↵David Sherret
internal to `npm::managed` (#20764)
2023-09-30refactor(npm): create `cli::npm::managed` module (#20740)David Sherret
Creates the `cli::npm::managed` module and starts moving more functionality into it.
2023-09-29refactor(cli): make `CliNpmResolver` a trait (#20732)David Sherret
This makes `CliNpmResolver` a trait. The terminology used is: - **managed** - Deno manages the node_modules folder and does an auto-install (ex. `ManagedCliNpmResolver`) - **byonm** - "Bring your own node_modules" (ex. `ByonmCliNpmResolver`, which is in this PR, but unimplemented at the moment) Part of #18967
2023-09-28refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)David Sherret
This is required from BYONM (bring your own node_modules). Part of #18967
2023-09-26chore: slight cleanup in npm resolvers (#20692)David Sherret
2023-09-24feat(lsp): cache all dependencies quick fix (#20665)Nayeem Rahman
2023-09-18fix(lsp): restore tsc's quick fix ordering (#20545)Nayeem Rahman
2023-09-17fix(lsp): sort quickfix actions (#17221)Bartek Iwańczuk
This commit changes ordering of quickfix actions, by sorting them in following order: - TSC fixes - Deno fixes - deno_lint fixes Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-08-21refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193)David Sherret