1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
Commit graph

121 commits

Author SHA1 Message Date
Leo Kettmeir
628816448e
refactor: update deno_doc, use prismjs, remove internal reference html generation logic (#26885) 2024-11-19 08:56:04 -08:00
Mohammad Sulaiman
89f0b796bd
chore: deprecate run itests (#26444) 2024-11-05 06:39:05 +00:00
David Sherret
bb3ca84e6d
fix(fmt): do not panic for jsx ignore container followed by jsx text (#26723) 2024-11-04 21:40:05 +01:00
Pig Fang
56f25af2c7
fix(fmt): fix several HTML and components issues (#26654)
Fix #26245 
Close #26324 
Fix #26508 
Fix #26540 
Fix #26562

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-31 14:50:58 +01:00
David Sherret
39fb55096e
fix(install): better json editing (#26450)
1. Respects the formatting of the file (ex. keeps four space indents or
tabs).
2. Handles editing of comments.
3. Handles trailing commas.
4. Code is easier to maintain.
2024-10-21 14:17:08 -04:00
David Sherret
69ab720025
refactor: move ByonmNpmResolver to deno_resolver (#25937)
Some more slow progress on moving all the resolution code into
deno_resolver.
2024-09-30 13:33:32 +00:00
Leo Kettmeir
a1d0a427e8
feat: default to TS for file extension and support ext flag in more scenarios (#25472)
Closes #11220
Currently does lint, fmt, and repl
2024-09-18 21:15:13 +02:00
David Sherret
3dd83fdbdb
Revert "feat(fmt): sort type-only named import/exports last" (#25705)
Reverts #25690

This was not an issue with the ts compiler anymore. Discussion here:
https://github.com/dprint/dprint-plugin-typescript/pull/664#issuecomment-2357000053
2024-09-18 13:54:52 +00:00
David Sherret
a14e9f55b4
feat(fmt): sort type-only named import/exports last (#25690)
Closes #22583
2024-09-17 18:26:23 +01:00
HasanAlrimawi
e0b9c745c1
chore: deprecate test itests (#25512)
This PR is part of #22907

---------

Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-16 19:38:40 +00:00
David Sherret
4a5642779e
fix: upgrade deno_ast 0.42 (#25313) 2024-08-30 17:12:13 -04:00
David Sherret
631d931973
fix(fmt/markdown): fix regression with multi-line footnotes and inline math (#25222)
What happened in this specific case was the parser used to actually
treat these as code block. Now it treats it as a multi-paragraph
footnote and that caused the issue

- https://github.com/dprint/dprint-plugin-markdown/pull/121/files
2024-08-26 18:36:24 +00:00
David Sherret
32a579d418
fix(fmt/markdown): metadata header sometimes missing trailing blank line (#25141)
* https://github.com/dprint/dprint-plugin-markdown/pull/119
2024-08-22 02:16:00 +02:00
David Sherret
a20418e2e8
fix(fmt): regression with pipe in code blocks in tables (#25098) 2024-08-19 16:35:51 +00:00
David Sherret
35a17f38f6
fix(fmt): upgrade to dprint-plugin-markdown 0.17.4 (#25075)
Closes https://github.com/denoland/deno/issues/20917
Closes https://github.com/denoland/deno/issues/21285
2024-08-17 12:51:36 +02:00
David Sherret
bcdf600ae4
fix(fmt): handle using stmt in for of stmt (#24834)
Closes #24406
2024-08-02 06:29:29 -04:00
David Sherret
d3419f7d14
perf: update deno_ast to 0.41 (#24819)
Some perf gains in swc (I measured formatting and it was slightly
faster).

Includes:

* https://github.com/denoland/deno_graph/pull/508
* https://github.com/denoland/eszip/pull/193
2024-07-31 18:31:03 -04:00
HasanAlrimawi
f0df54fc70
fix: enable the reporting of parsing related problems when running deno lint (#24332) 2024-07-23 21:17:17 +00:00
David Sherret
f6c7c13764
fix(fmt): was sometimes putting comments in front of commas in parameter lists (#24650)
* https://github.com/dprint/dprint-plugin-typescript/pull/651
2024-07-19 15:58:21 +00:00
David Sherret
ecd4f900c6
fix(publish): surface syntax errors when using --no-check (#24620) 2024-07-17 23:06:30 -04:00
David Sherret
a5f8bfdbfb
chore: format yaml internally (#24520)
Uses https://github.com/g-plane/pretty_yaml
2024-07-10 23:59:57 -04:00
David Sherret
147411e64b
feat: npm workspace and better Deno workspace support (#24334)
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-07-04 00:54:33 +00:00
David Sherret
7ed90a20d0
fix: better handling of npm resolution occurring on workers (#24094)
Closes https://github.com/denoland/deno/issues/24063
2024-06-05 17:04:16 +02:00
David Sherret
1587387bcc
chore(test): move npm registries to separate servers and to the tests/registry folder (#23717)
1. Moves the npm registries to their own dedicated ports.
2. Moves the data files out of `tests/testdata/npm/registry` to
`tests/registry/npm`.
2024-05-07 01:06:01 +00: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
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
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
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
Nathan Whitaker
422cff1f24
chore(lsp): Add benchmark for performance on a large real-world repo (#23395)
This PR adds a benchmark intended to measure how the LSP handles larger
repos, as well as its performance on a more realistic workload.

The repo being benchmarked is
[deco-cx/apps](https://github.com/deco-cx/apps) which has been vendored
along with its dependencies. It's included as a git submodule as its
fairly large. The LSP requests used in the benchmark are the actual
requests sent by VSCode as I opened, modified, and navigated around a
file (to simulate an actual user interaction).

The main motivation is to have a more realistic benchmark that measures
how we do with a large number of files and dependencies. The
improvements made from 1.42 to 1.42.3 mostly improved performance with
larger repos, so none of our existing benchmarks showed an improvement.

Here are the results for the changes made from 1.42 to 1.42.3 (the new
benchmark is the last one listed):

**1.42.0**

```test
Starting Deno benchmark
-> Start benchmarking lsp
   - Simple Startup/Shutdown 
      (10 runs, mean: 379ms)
   - Big Document/Several Edits 
      (5 runs, mean: 1142ms)
   - Find/Replace
      (10 runs, mean: 51ms)
   - Code Lens
      (10 runs, mean: 443ms)
   - deco-cx/apps Multiple Edits + Navigation
      (5 runs, mean: 25121ms)
<- End benchmarking lsp
```

**1.42.3**

```text
Starting Deno benchmark
-> Start benchmarking lsp
   - Simple Startup/Shutdown 
      (10 runs, mean: 383ms)
   - Big Document/Several Edits 
      (5 runs, mean: 1135ms)
   - Find/Replace
      (10 runs, mean: 55ms)
   - Code Lens
      (10 runs, mean: 440ms)
   - deco-cx/apps Multiple Edits + Navigation
      (5 runs, mean: 11675ms)
<- End benchmarking lsp
```
2024-04-16 12:26:51 -07:00
David Sherret
ade0cd5e97
fix: upgrade deno_ast related crates (#23187)
Had to revert back swc due to
https://github.com/swc-project/swc/issues/8840

Fixes:

- https://github.com/denoland/deno_lint/pull/1262
- https://github.com/denoland/deno_doc/pull/538
- https://github.com/denoland/deno_doc/pull/537
- https://github.com/denoland/deno_graph/pull/430
- https://github.com/denoland/deno_graph/pull/425
- https://github.com/denoland/deno_graph/pull/432
2024-04-11 23:00:17 +00:00
Asher Gomez
29085895c9
chore: move tools/node_compat to tests/node_compat/runner (#23025)
The `tools/node_compat/node` submodule has been moved to
`tests/node_compat/runner/suite` and the remaining files within
`tools/node_compat` to `tests/node_compat/runner`.

Most of the changes are of the header within `tests/node_compat/test`
files. The `setup` and `test` tasks within `tests/node_comapt` execute
successfully.

Towards #22525
CC @mmastrac
2024-04-03 09:24:55 +11:00
Aapo Alasuutari
3333d67335
chore(tests): Remove vestiges of cli/tests folder (#22712) 2024-03-05 13:49:21 -07:00
Asher Gomez
0022c35a23
chore: move tools/wpt to tests/wpt/runner (#22545)
Towards #22525

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-05 00:41:16 +00:00
David Sherret
22cd8ebf1f
perf(fmt): reduce memory usage and improve performance (#22570)
Reduces memory usage of the fmt command and fixes a memory leak.

Also improves slightly improves performance.
2024-02-23 16:11:45 -05:00
David Sherret
190776f30d
perf: linter lsp memory leak fix and deno_graph executor (#22519)
Updates dependent crates which includes an investigation fix by @irbull
in Deno's LSP when linting code. Huge thanks to Ian for tracking down
this issue.

Also includes Divy's deno_graph executor change, which reduces memory
usage when loading jsr specifiers and makes them faster.

Co-authored-by: irbull <irbull@users.noreply.github.com>
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-02-21 21:58:37 +00:00
David Sherret
e06934fe77
fix(fmt): remove debug output when formatting dynamic imports (#22433)
deno fmt sometimes had stuff like:

```
NODE: Evaluation
```

...in the output.
2024-02-16 14:19:24 +00:00
Asher Gomez
5596de8081
chore: move test_util/wpt to tests/wpt/suite (#22412)
As discussed with @mmastrac. I'll move `tools/wpt` to `tests/wpt` in a
follow-up PR.

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-16 03:32:28 +00:00
Asher Gomez
6be389ce29
chore: move test_util/std to tests/util/std (#22402)
Note: tests are not the only part of the codebase that uses `std`. Other
parts, like `tools/`, do too. So, it could be argued that this is a
little misleading. Either way, I'm doing this as discussed with
@mmastrac.
2024-02-13 09:22:49 -07:00
Matt Mastracci
f60720090c
chore: move test_ffi and test_nap to tests/ [WIP] (#22394)
Moving some additional NAPI and. FFI tests out of the tree root.
2024-02-12 13:46:50 -07:00
Matt Mastracci
f5e46c9bf2
chore: move cli/tests/ -> tests/ (#22369)
This looks like a massive PR, but it's only a move from cli/tests ->
tests, and updates of relative paths for files.

This is the first step towards aggregate all of the integration test
files under tests/, which will lead to a set of integration tests that
can run without the CLI binary being built.

While we could leave these tests under `cli`, it would require us to
keep a more complex directory structure for the various test runners. In
addition, we have a lot of complexity to ignore various test files in
the `cli` project itself (cargo publish exclusion rules, autotests =
false, etc).

And finally, the `tests/` folder will eventually house the `test_ffi`,
`test_napi` and other testing code, reducing the size of the root repo
directory.

For easier review, the extremely large and noisy "move" is in the first
commit (with no changes -- just a move), while the remainder of the
changes to actual files is in the second commit.
2024-02-10 20:22:13 +00:00
David Sherret
e5e2c45998
fix: upgrade to deno_ast 0.33 (#22341)
* 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-02-09 01:40:26 +00:00
David Sherret
4d8cf02500
chore: upgrade dprint-plugin-toml to 0.6.0 (#22108) 2024-01-25 12:31:21 -05:00
Bartek Iwańczuk
69959aa01f
fix: update deno_lint and swc (#21718)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-09 23:20:52 +00:00
David Sherret
d8e8497eb3
fix(fmt): remove trailing comma for single type param in default export in jsx (#21425) 2023-12-01 14:50:38 -05:00
David Sherret
e52033f0f7
fix(fmt/jupyter): handle "source" property that's a string (#21361)
It was corrupting the file.
2023-11-27 23:15:50 +00:00
scarf
2b7e145e56
feat(fmt): support formatting code blocks in Jupyter notebooks (#21310) 2023-11-27 10:32:12 -05:00
David Sherret
c99de0493a
chore: bump jsonc-parser and dprint-core dependencies (#21330)
This is to reduce duplicate dependencies for
https://github.com/denoland/deno/pull/21310
2023-11-24 12:54:58 -05:00
David Sherret
0f2cbcf6a9
fix(fmt): maintain parens for jsx in member expr (#21280)
Fix in
0b44991bb9

Closes https://github.com/denoland/deno/issues/21279
2023-11-20 23:38:06 +00:00
David Sherret
59a5fe530f
refactor: upgrade to deno_ast 0.31 and deno_graph 0.59 (#20965) 2023-10-24 21:43:19 +00:00
David Sherret
8f065a60e7
fix: improved using declaration support (#20959)
Upgrades to deno_ast 0.30.
2023-10-24 09:37:02 -04:00