Commit Graph

6119 Commits

Author SHA1 Message Date
Luca Casonato
6cdf81db7c
feat(cli): add support for jsxImportSourceTypes (#23419)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-04-30 18:12:35 +00:00
findmyhappy
ce4a7773cc
docs: fix some typos in comments (#23520) 2024-04-30 17:59:56 +10:00
Nayeem Rahman
5cae343991
refactor(lsp): move fields from Documents to LspResolver (#23585) 2024-04-30 02:41:19 +01:00
Kenta Moriuchi
783533d2e3
FUTURE: remove import assertions support for JavaScript (#23541)
Ref #17944, https://github.com/swc-project/swc/issues/8893

TypeScript removes the `assert` keywords in the transpile, so this PR
only works for JavaScript files
2024-04-29 22:43:05 +02:00
David Sherret
4384a126bb
fix: handle specifying an import map in an ancestor dir of deno.json (#23602)
* https://github.com/denoland/deno_config/pull/51

Closes https://github.com/denoland/deno/issues/21440
2024-04-29 14:32:27 -04:00
David Sherret
e6f4c8f531
fix(fmt/md): better handling of lists in block quotes (#23604)
* https://github.com/dprint/dprint-plugin-markdown/pull/94
2024-04-29 20:29:00 +02:00
David Sherret
48daf2dc88
chore: add tests for moduleGraph2 (#23603)
Also did some renames from underscores to hyphens
2024-04-29 14:09:58 -04:00
Leo Kettmeir
67d00fb1e3
fix: reenable syntax highlighting for doc html generator (#23570)
This was forgotten to be renabled a while back when we made it optional
2024-04-29 11:03:51 -07:00
David Sherret
7d93704591
refactor: remove conditional color code in bench reporter (#23593)
There is no need for this conditional code because it's handled by the
`colors` module.
2024-04-29 09:27:55 -04:00
David Sherret
651e3e9e6d
fix(compile): certain jsr specifiers sometimes can't load (#23567)
When returning a jsr specifier for resolve it seems like deno core does
not work properly and hangs.

Closes https://github.com/denoland/deno/issues/23551
Closes https://github.com/denoland/deno/issues/23139
2024-04-27 21:11:57 +00:00
Nayeem Rahman
e0f849289f
chore(lsp): remove ConfigSnapshot (#23579) 2024-04-27 21:35:41 +01:00
Nayeem Rahman
f8ddcc4f78
refactor(lsp): unify resolver types into LspResolver (#23514) 2024-04-26 21:39:33 +01:00
Leo Kettmeir
c519355624
feat(ci): category & unstable tags checker (#23568) 2024-04-26 09:04:29 -07:00
David Sherret
bc4aa5f901
fix(npm): do not panic hitting root dir while resolving npm package (#23556)
Closes https://github.com/denoland/deno/issues/23029
2024-04-25 14:13:55 +00:00
Divy Srivastava
1a5b6296c5
chore: fix cargo publish CI (#23550)
The `cargo-publish` CI is failing
https://github.com/denoland/deno/actions/runs/8830423538/job/24243524040#step:7:5180
2024-04-25 17:16:36 +05:30
denobot
8321106b78
1.43.0 (#23549)
Bumped versions for 1.43.0

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-04-25 15:14:26 +05:30
chirsz
1de162f1c1
feat(ext/webgpu): support UnsafeWindowSurface on wayland (#23423) 2024-04-25 09:58:16 +05:30
David Sherret
f3284529f1
feat(jsr): support importing from jsr via HTTPS specifiers (except for type checking) (#23513)
Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24 21:43:34 +00:00
Leo Kettmeir
5a7414e163
chore: update deno_doc (#23544) 2024-04-24 20:34:21 +00:00
Nayeem Rahman
ac71d876d7
fix(lsp): inherit missing fmt and lint config from parent scopes (#23547) 2024-04-24 22:14:01 +02:00
David Sherret
63e0f3647f
fix(config): move json schema unstable examples to item (#23506) 2024-04-24 16:13:33 -04:00
Nathan Whitaker
764f390163
chore(cli): Add workspaces property to config schema (#23546) 2024-04-24 12:56:23 -07:00
Nathan Whitaker
a6c2472949
chore(lsp): Print out stack trace if exception occurs in TS request (#23543)
Before this PR, there would just be an uninformative "Error occurred"
message, after this PR you'll get a stack trace in the LSP output window
like this:

```text
Error during TS request "$getSupportedCodeFixes":
  Error: i threw an exception
    at serverRequest (ext:deno_tsc/99_main_compiler.js:1089:11)
```
2024-04-24 19:46:08 +00:00
Matt Mastracci
2f8825a935
feat: Add deno serve subcommand (#23511)
By default, `deno serve` will assign port 8000 (like `Deno.serve`).
Users may choose a different port using `--port`.

`deno serve /tmp/file.ts`

`server.ts`:
```ts
export default {
  fetch(req) {
    return new Response("hello world!\n");
  },
};
```
2024-04-24 19:45:49 +00:00
David Sherret
c1bd9503dd
chore(lsp): revert respect shouldCreateNewSourceFile (#23535)
Reverts https://github.com/denoland/deno/pull/23515 but adds a comment
for why this is ignored
2024-04-24 15:39:26 -04:00
David Sherret
ded6afccf2
fix(publish): --dry-publish should error for gitignored excluded files (#23540)
Files that were gitignored only were not included in the diagnostic.
2024-04-24 18:52:05 +00:00
Matt Mastracci
eed2598e6c
feat(ext/http): Implement request.signal for Deno.serve (#23425)
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-24 14:03:37 -04:00
Nathan Whitaker
5294885a5a
fix(lsp): Fix logic for coalescing pending changes + clear script names cache when file is closed (#23517) 2024-04-23 15:29:29 -07:00
David Sherret
cfa0fcd8c8
chore(lsp): respect shouldCreateNewSourceFile parameter (#23515) 2024-04-23 22:16:26 +00:00
Kenta Moriuchi
aff7a64544
fix: Float16Array support (#23512)
Ref #23490, #23277

* remove `--js-float16array` flag (This flag has already added to
deno_core)
* add some `Float16Array` support
2024-04-23 22:54:19 +02:00
Nathan Whitaker
8a367d3cc3
fix(cli): Don't panic on invalid emit options (#23463)
Fixes #23456.
2024-04-23 08:50:50 -07:00
Nathan Whitaker
804b97c636
perf(lsp): Call serverRequest via V8 instead of via executeScript (#23409)
Doesn't have a noticeable perf impact from my benchmarking, but
theoretically should be better.
2024-04-23 08:50:30 -07:00
Bartek Iwańczuk
35220f0069
fix(workspace): provide workspace members as 'imports' in import map (#23492)
This commit changes the workspace support to provide all workspace
members to be available as imports based on their names and versions.

Closes https://github.com/denoland/deno/issues/23343
2024-04-23 17:21:06 +02:00
Bartek Iwańczuk
b0d3b20f23
feat: enable Float16Array support (#23490)
Closes https://github.com/denoland/deno/issues/23450
2024-04-23 15:18:27 +00:00
Nayeem Rahman
c67c87b2ae
refactor(lsp): use CliGraphResolver in documents params (#23499) 2024-04-22 23:55:20 +01:00
Nayeem Rahman
5990f05360
fix(lsp): remove Document::open_data on close (#23483) 2024-04-22 19:24:00 +01:00
Marvin Hagemeister
9686a8803e
feat: add jsx precompile skip element option (#23457)
<!--
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-22 17:07:36 +02:00
Nathan Whitaker
aac7a8cb7c
perf(lsp): Batch "$projectChanged" notification in with the next JS request (#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-22 08:03:16 -07:00
Bartek Iwańczuk
a2bd1a724b
chore: update deno_config to 0.16.1 (#23480)
Closes https://github.com/denoland/deno/issues/23343
2024-04-21 03:04:30 +02:00
David Sherret
695f314a91
feat(task): support running npm binary commands in deno.json (#23478)
npm binary commands like `vite` from a `node_modules/.bin` folder will
now execute when defined in a deno.json

Closes https://github.com/denoland/deno/issues/23477
2024-04-20 20:13:46 -04:00
welfuture
e55087f57a
fix: Fix some typos in comments (#23470)
Signed-off-by: welfuture <wellfuture@qq.com>
2024-04-21 01:54:07 +02:00
Nathan Whitaker
f62018e80f
perf(lsp): Pass code action trigger kind to TSC (#23466) 2024-04-20 13:18:43 -07:00
Nayeem Rahman
79e6751cf7
perf(lsp): only store parsed sources for open documents (#23454) 2024-04-20 02:00:03 +01:00
Matt Mastracci
472a370640
feat(runtime): Allow embedders to perform additional access checks on file open (#23208)
Embedders may have special requirements around file opening, so we add a
new `check_open` permission check that is called as part of the file
open process.
2024-04-19 18:12:03 -06:00
Matt Mastracci
365e1f48f7
feat(ext/http): Add addr to HttpServer (#23442)
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-19 18:09:50 -06:00
Nathan Whitaker
b5ce9cda0d
perf(lsp): Avoid passing struct into op_resolve (#23452)
Going through serde_v8 is slow, so just pass the args separately.
`op_resolve` is especially hot, so any speedups are good.
2024-04-19 10:11:17 -07:00
David Sherret
c497e766f1
refactor: move redirect handling into deno_graph (#23444) 2024-04-19 01:43:28 +00:00
Nayeem Rahman
8e77f091ad
perf(lsp): cleanup document dependencies (#23426) 2024-04-19 00:51:16 +00:00
David Sherret
90688edcc2
fix(fmt): error for more unterminated nodes (#23449)
https://github.com/dprint/dprint-plugin-typescript/pull/628

Closes https://github.com/denoland/deno/issues/23438
2024-04-18 20:37:16 -04:00
Bartek Iwańczuk
6c90d2401b
fix(ext/node): remove unwraps from fallible conversions (#23447)
Removes `.unwrap()` calls from fallible conversion and replaces
with graceful error returns.
2024-04-18 23:53:03 +00:00