0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-09 21:57:40 -04:00
Commit graph

6181 commits

Author SHA1 Message Date
Nayeem Rahman
d81043686e
fix(cli): use CliNodeResolver::resolve() for managed node_modules (#23902) 2024-05-21 23:50:45 +02:00
David Sherret
74f8484590
perf: resolver - skip cwd lookup if able (#23851)
The cwd lookup was taking 2% of a flamegraph I was looking at.
2024-05-21 23:50:45 +02:00
Simon Lecoq
2e7ffc48b6
fix(cli/coverage): invalid line id in html reporter (#23908) 2024-05-21 23:50:44 +02:00
Bartek Iwańczuk
e5733685e5
chore: force import assertion support (#23855)
https://github.com/denoland/deno/pull/23838 might accidentally disable
import assertions support because of V8 12.6 unshipping it, but we want
import assertions to be supported until Deno 2.
2024-05-21 23:50:44 +02:00
David Sherret
a454585520
perf(cache): compile ts to js in parallel for deno cache (#23892)
Closes https://github.com/denoland/deno/issues/23860
2024-05-21 23:50:44 +02:00
Kenta Moriuchi
55c8c855b1
fix: add missing URL.parse types (#23893) 2024-05-21 23:50:43 +02:00
David Sherret
6cc8b7c3db
perf: analyze cjs exports and emit typescript in parallel (#23856) 2024-05-21 23:50:43 +02:00
denobot
a13c4531fd
1.43.5 (#23876)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-17 20:22:18 -04:00
David Sherret
c1c2f856b4 fix(npm): regression deserializing JSON for some npm packages (#23868)
* https://github.com/denoland/deno_npm/pull/53

Closes https://github.com/denoland/deno/issues/23862
2024-05-17 20:01:49 -04:00
denobot
d64921c190
1.43.4 (#23853)
Bumped versions for 1.43.4

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-17 01:28:38 +02:00
Nayeem Rahman
f15ad5d993
fix(lsp): respect types dependencies for tsc roots (#23825) 2024-05-17 00:41:23 +02:00
Divy Srivastava
4137a083e8
fix(node): seperate worker module cache (#23634)
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-17 00:41:23 +02:00
Arnau Orriols
042376f6eb
perf(compile): Do not checksum eszip content (#23839)
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-17 00:41:23 +02:00
David Sherret
b84eacf375
perf(jsr): download metadata files as soon as possible and in parallel (#23836)
* https://github.com/denoland/deno_graph/pull/471
* https://github.com/denoland/deno_graph/pull/473
2024-05-17 00:41:22 +02:00
David Sherret
125b420f7f
fix(doc): --lint - private ref diagnostic was displaying incorrect information (#23834)
* https://github.com/denoland/deno_doc/pull/576

Closes #23303
2024-05-17 00:41:22 +02:00
Nathan Whitaker
17ed6007d8
perf(lsp): Cache semantic tokens for open documents (#23799)
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-17 00:41:21 +02:00
David Sherret
fd484c37f8
fix(emit): regression - keep comments in emit (#23815)
Closes https://github.com/denoland/deno/discussions/23814
2024-05-17 00:41:21 +02:00
Nayeem Rahman
8ce9aa53fe
fix(lsp): show reference code lens on methods (#23804) 2024-05-17 00:41:21 +02:00
David Sherret
0684ab3a2e
fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)
This also fixes a bug where Deno would output to stderr with colours
when piped and stdout was not piped.
2024-05-17 00:41:21 +02:00
David Sherret
bce69074b7
fix(npm): make tarball extraction more reliable (#23759)
1. Extracts to a directory beside the destination.
2. Renames to the destination with retries.
2024-05-17 00:41:20 +02:00
David Sherret
470dd8be12
fix(publish): always include config file when publishing (#23797)
Closes https://github.com/denoland/deno/issues/23796
2024-05-17 00:41:20 +02:00
David Sherret
5a766b10ec
fix(publish): error for missing version constraints on dry-publish instead of just publish (#23798)
Closes https://github.com/denoland/deno/issues/22835
2024-05-17 00:41:20 +02:00
futsuuu
798fd09c37
fix: Add missing "junction" type for SymlinkOptions.types (#23756)
Junction symlink support is added in #22762, but `SymlinkOptions` and
its documents are not updated.
2024-05-17 00:41:20 +02:00
David Sherret
ad01a39f1d
fix(doc/publish): support expando properties (#23795)
* 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-17 00:41:19 +02:00
David Sherret
420023cd0e
chore(task): various small refactorings (#23793) 2024-05-17 00:41:19 +02:00
Leo Kettmeir
faf08969f9
chore: cleanup unused dependencies (#23787) 2024-05-17 00:41:19 +02:00
Evan
ac32c0bc64
fix(cli): panic with deno coverage (#23353)
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-17 00:41:19 +02:00
Nayeem Rahman
9e25512e48
refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764) 2024-05-17 00:41:19 +02:00
David Sherret
99babe580f
fix(npm): handle null fields in npm registry JSON (#23785)
* https://github.com/denoland/deno_npm/pull/52

Closes https://github.com/denoland/deno/issues/23776
2024-05-17 00:41:18 +02:00
denobot
855adf2146
1.43.3 (#23770)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-05-10 15:53:21 -04:00
Nathan Whitaker
e30790517d refactor(lsp): Have JS drive TSC event loop in LSP (#23565) 2024-05-10 15:00:09 -04:00
Nayeem Rahman
f7f9383157 refactor(lsp): unify caching into LspCache (#23746) 2024-05-10 15:00:09 -04:00
David Sherret
cc7ae841e4 fix(lsp): completions for using decl identifiers (#23748)
Closes #23688
2024-05-10 15:00:08 -04:00
Nathan Whitaker
c2c15a28e2 fix(lsp): move sloppy import resolution from loader to resolver (#23751)
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-10 15:00:08 -04:00
David Sherret
19284faa5b fix(task): regression where npx <command> sometimes couldn't find command (#23730)
Closes https://github.com/denoland/deno/issues/23724
2024-05-10 15:00:08 -04:00
David Sherret
1dffb7017c chore: enable clippy::print_stdout and clippy::print_stderr (#23732)
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-10 15:00:08 -04:00
denobot
acd75bbd75
1.43.2 (#23747)
Bumped versions for 1.43.2

Please ensure:
- [ ] Target branch is correct (`vX.XX` if a patch release, `main` if
minor)
- [ ] Crate versions are bumped correctly
- [ ] Releases.md is updated correctly (think relevancy and remove
reverts)

To make edits to this PR:
```shell
git fetch upstream release_1_43.2 && git checkout -b release_1_43.2 upstream/release_1_43.2
```

cc @nathanwhit

---------

Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-08 15:21:14 -07:00
Bartek Iwańczuk
4e23a5b1fc
FUTURE: deno install changes (#23498)
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-08 12:34:46 -07:00
David Sherret
525b3c8d74
fix: upgrade TypeScript from 5.4.3 to 5.4.5 (#23740)
https://github.com/denoland/TypeScript/pull/11
2024-05-08 13:54:56 -04:00
Nayeem Rahman
5e6c72d39f
refactor(lsp): cleanup partially locking methods (#23723) 2024-05-08 06:34:42 +01:00
David Sherret
5379bb0289
fix(jsr): panic when importing jsr package with deps via https (#23728)
Closes #23644
2024-05-07 21:53:17 +00:00
Nayeem Rahman
cbb78e138f
refactor(lsp): reland move resolver fields to LspResolver (#23685) 2024-05-07 03:20:15 +01:00
Nathan Whitaker
672216d65a
fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)
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-06 23:54:52 +00:00
David Sherret
2dcbef2abb
fix(compile): relative permissions should be retained as relative (#23719)
Closes #23715
2024-05-06 19:21:58 -04:00
Bartek Iwańczuk
f698bc70e2
fix(ext/node): napi_get_element and napi_set_element work with objects (#23713)
This change makes DuckDB example work:
https://github.com/denoland/deno/issues/23656.
2024-05-06 21:22:50 +02:00
David Sherret
4ab68df33e
fix(fmt/js): else was moved to wrong if sometimes when formatting minified code (#23706)
* https://github.com/dprint/dprint-plugin-typescript/pull/633
2024-05-05 18:58:56 -07:00
Jo Franchetti
a69b4646a0
docs: update categories to match new planned sitemap (#23677)
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-05 18:56:55 -07:00
Leo Kettmeir
cd12d41627
chore: update wgpu (#23684) 2024-05-05 07:22:18 -07:00
Satya Rohith
b2628e4a06
fix(ext/node): don't rely on Deno.env to read NODE_DEBUG (#23694)
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-05 16:16:02 +02:00
David Sherret
e36de7e959
fix(publish): public api - trace parent classes & interfaces when following a method (#23661)
* https://github.com/denoland/deno_graph/pull/465

Closes https://github.com/denoland/deno/issues/23658
2024-05-04 23:19:00 +02:00