Commit graph

739 commits

Author SHA1 Message Date
David Sherret 35c1652f56
fix(lsp): regression - formatting was broken on windows (#21972)
~~Waiting on: https://github.com/denoland/deno_config/pull/31~~

Closes #21971
Closes https://github.com/denoland/vscode_deno/issues/1029
2024-01-18 15:57:30 -05:00
David Sherret 4e72ca313a
refactor: use globbing from deno_config (#21925) 2024-01-15 19:15:39 -05:00
Bartek Iwańczuk 72ecfe0419
fix(publish): support deno.jsonc file (#21948) 2024-01-15 15:07:57 +00:00
Bartek Iwańczuk 0d51c1f90e
feat: remove conditional unstable type-checking (#21825)
This commit removes conditional type-checking of unstable APIs.

Before this commit `deno check` (or any other type-checking command and
the LSP) would error out if there was an unstable API in the code, but not
`--unstable` flag provided.

This situation hinders DX and makes it harder to configure Deno. Failing
during runtime unless `--unstable` flag is provided is enough in this case.
2024-01-14 18:29:17 +01:00
David Sherret d88c869917
fix(check): should not panic when all specified files excluded (#21929)
Closes #21926
2024-01-13 16:06:18 -05:00
Bartek Iwańczuk f45ceb2320
chore(publish): add --dry-run flag (#21895) 2024-01-11 21:17:03 +00:00
David Sherret 70ac06138c
feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-10 22:40:30 +00:00
Matt Mastracci a45c1e4ae4
chore: bump deno_core (#21832) 2024-01-10 09:48:40 +05:30
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 be888c068c
fix(task): do not eagerly auto-install packages in package.json when "nodeModulesDir": false (#21858)
There's no need to auto-install the package.json if the user is not
using a node_modules directory.

Closes #21850
2024-01-08 19:30:36 -05:00
David Sherret 0efb17b2cb
fix(unstable/tar): skip node_modules, .git, and config "exclude" (#21816) 2024-01-08 18:51:49 -05:00
David Sherret e212e1fc35
perf: skip expanding exclude globs (#21817)
We were calling `expand_glob` on our excludes, which is very expensive
and unnecessary because we can pattern match while traversing instead.

1. Doesn't expand "exclude" globs. Instead pattern matches while walking
the directory.
2. Splits up the "include" into base paths and applicable file patterns.
This causes less pattern matching to occur because we're only pattern
matching on patterns that might match and not ones in completely
unrelated directories.
2024-01-08 17:18:42 +00:00
Bartek Iwańczuk 43d2ecd4f0
fix(registry): wait for already pending publish (#21663)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-01-08 15:25:18 +00:00
Bartek Iwańczuk 824f4fa55f
refactor(tools/repl): reorganize code (#21810)
Some drive-by cleanup as I'm working through
https://github.com/denoland/deno_core/pull/415.
2024-01-05 16:14:58 +01:00
David Sherret 0245ac08d4
perf(coverage): faster source mapping (#21783)
I did not measure this change (O(n) to O(log n)), but mainly this should
be slightly more accurate at getting the line number.
2024-01-04 08:49:17 -05:00
David Sherret 97937a097e
fix(jupyter): error message when install fails due to jupyter command not being on PATH (#21767)
We were failing silently in this scenario.
2024-01-03 14:45:10 +00:00
林炳权 96b581bdd2
chore: update to Rust 1.75 (#21731) 2024-01-01 23:22:48 +01:00
David Sherret 7e72f3af61
chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
Leo Kettmeir 4de9ddcf21
chore: update deno_doc to 0.85.0 (#21678) 2023-12-30 00:04:50 +00:00
Bartek Iwańczuk c2414db1f6
refactor: simplify hyper, http, h2 deps (#21715)
Main change is that:
- "hyper" has been renamed to "hyper_v014" to signal that it's legacy
- "hyper1" has been renamed to "hyper" and should be the default
2023-12-27 11:59:57 -05:00
Bartek Iwańczuk 8fbac67395
refactor: change cli/ to use hyper 1.1 (#21705) 2023-12-26 14:32:21 +01:00
Bartek Iwańczuk 476f5d3deb
fix(repl): remove stray debug log (#21635)
Left behind in #21623 by mistake.
2023-12-18 18:52:43 -07:00
Bartek Iwańczuk 5b2caed7fd
fix(coverage): error if no files found (#21615)
This commit fixes a panic in `deno coverage` command if the file
to be covered doesn't produce any coverage data.

Fixes https://github.com/denoland/deno/issues/21580
2023-12-18 11:43:27 +01:00
Bartek Iwańczuk a44a5de430
refactor: factor out cdp::ExceptionThrown notification (#21623)
Just removing some duplicated code.
2023-12-18 11:43:02 +01:00
Raashid Anwar 9ede8d7b69
fix(bench): added group banner to bench output. (#21551)
Added group banner to bench output.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-17 22:57:14 +00:00
Bartek Iwańczuk 4c2c053afe
fix: urls for publishing (#21613) 2023-12-17 10:50:11 +00:00
Bartek Iwańczuk fd6044dfec
fix: prompts when publishing (#21596) 2023-12-15 13:52:51 +00:00
Bartek Iwańczuk 62e3f5060e
refactor: check if scope and package exist before publish (#21575)
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2023-12-15 10:27:10 +00:00
Bartek Iwańczuk 19d52b9a55
refactor: split registry into multiple modules (#21572)
Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-12-14 12:05:59 +01:00
David Sherret 4b6fc64646
chore(unstable/publish): ordered publish of packages in workspace (#21550)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-12-14 10:55:56 +01:00
Matt Mastracci 76a6ea5775
refactor(cli): update to new deno_core promise/call methods (#21519) 2023-12-13 08:07:26 -07:00
Bartek Iwańczuk bbf8f69cb9
test: integration tests for tarring/unfurling (#21544) 2023-12-13 11:00:45 +01:00
Bartek Iwańczuk 0ceae7a490
refactor: suggest entrypoint on missing 'exports' (#21549) 2023-12-12 19:18:02 +01:00
Bartek Iwańczuk ece78cfb8a
refactor: nicer warning display (#21547) 2023-12-12 23:45:45 +09:00
Bartek Iwańczuk 06c5f99a01
refactor: better handling for registry urls (#21545) 2023-12-12 23:45:20 +09:00
Yoshiya Hinosawa 93ea46b31d
fix(coverage): rename --pretty to --detailed (#21543) 2023-12-12 20:53:41 +09:00
Yoshiya Hinosawa 5ddf8732f0
feat(coverage): add summary reporter (#21535) 2023-12-12 12:42:57 +09:00
Yoshiya Hinosawa 073e341faf
fix(coverage): escape source code in html coverage report (#21531) 2023-12-11 19:24:20 +09:00
Yoshiya Hinosawa 67eec26308
refactor(coverage): separate reporter-related structs (#21528) 2023-12-11 13:30:38 +09:00
David Sherret ddfbe71ced
feat(lsp): provide quick fixes for specifiers that could be resolved sloppily (#21506) 2023-12-08 09:57:06 -05:00
Yoshiya Hinosawa d68d1e2022
feat(coverage): add html reporter (#21495)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-08 16:54:52 +09:00
David Sherret d192cc2640
fix: add more warnings when using sloppy imports (#21503)
One warning for when using it with `deno compile` and another when using
it with `deno run`.
2023-12-07 22:35:53 -05:00
David Sherret 78566753c8
feat: add suggestions to module not found error messages for file urls (#21498) 2023-12-07 15:59:13 -05:00
David Sherret 890780a9e9
feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464)
Adds an `--unstable-sloppy-imports` flag which supports the
following for `file:` specifiers:

* Allows writing `./mod` in a specifier to do extension probing.
- ex. `import { Example } from "./example"` instead of `import { Example
} from "./example.ts"`
* Allows writing `./routes` to do directory extension probing for files
like `./routes/index.ts`
* Allows writing `./mod.js` for *mod.ts* files.

This functionality is **NOT RECOMMENDED** for general use with Deno:

1. It's not as optimal for perf:
https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/
1. It makes tooling in the ecosystem more complex in order to have to
understand this.
1. The "Deno way" is to be explicit about what you're doing. It's better
in the long run.
1. It doesn't work if published to the Deno registry because doing stuff
like extension probing with remote specifiers would be incredibly slow.

This is instead only recommended to help with migrating existing
projects to Deno. For example, it's very useful for getting CJS projects
written with import/export declaration working in Deno without modifying
module specifiers and for supporting TS ESM projects written with
`./mod.js` specifiers.

This feature will output warnings to guide the user towards correcting
their specifiers. Additionally, quick fixes are provided in the LSP to
update these specifiers:
2023-12-07 00:03:18 +00:00
David Sherret e372fc73e8
fix(task): handle node_modules/.bin directory with byonm (#21386)
A bit hacky, but it works. Essentially, this will check for all the
scripts in the node_modules/.bin directory then force them to run with
Deno via deno_task_shell.
2023-12-06 16:36:06 -05:00
David Sherret 7fdc3c8f1f
fix(compile/npm): ignore symlinks to non-existent paths in node_modules directory (#21479)
Part of https://github.com/denoland/deno/issues/21476
2023-12-06 16:25:24 -05:00
Bartek Iwańczuk 07f78912d6
chore: update rustyline to 13.0.0 (#21481)
Prerequisite for https://github.com/denoland/deno/pull/18453.

This update also makes it possible to address
https://github.com/denoland/deno/issues/8049 by
using
https://docs.rs/rustyline/latest/rustyline/struct.Editor.html#method.create_external_printer
2023-12-06 21:56:40 +01:00
David Sherret 65993e5efa
fix(fmt): "singleQuote": true should prefer single quote—not always use one (#21470) 2023-12-05 22:06:19 -05:00
Matt Mastracci 4a9f429501
refactor(cli): refactor bench/test for future module changes (#21460)
Extracting some refactorings for the module work that will land in
https://github.com/denoland/deno_core/pull/359/
2023-12-05 09:26:06 -07:00
Luca Casonato 9eb25e3cff
fix: error code used for duplicate version publish (#21457) 2023-12-04 15:19:01 +01:00