0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-09 13:49:37 -04:00
Commit graph

1315 commits

Author SHA1 Message Date
Bartek Iwańczuk
9b36c6f218
Merge branch 'main' into lint_plugins 2025-01-27 00:13:41 +01:00
Bartek Iwańczuk
0697578d3e
feat(lint): add rules for react/preact (#27162)
This commit updated to deno_lint 0.69.0, which adds a bunch
or new lint rules dedicated for react/preact users.
2025-01-24 13:08:36 +01:00
David Sherret
273ec9fbf2
refactor: add WorkspaceFactory and ResolverFactory (#27766)
Allows easily constructing a `DenoResolver` using the exact same logic
that we use in the CLI (useful for dnt and for external bundlers). This
code is then used in the CLI to ensure the logic is always up-to-date.

```rs
use std::rc::Rc;

use deno_resolver:🏭:ResolverFactory;
use deno_resolver:🏭:WorkspaceFactory;
use sys_traits::impls::RealSys;

let sys = RealSys;
let cwd = sys.env_current_dir()?;
let workspace_factory = Rc::new(WorkspaceFactory::new(sys, cwd, Default::default()));
let resolver_factory = ResolverFactory::new(workspace_factory.clone(), Default::default());
let deno_resolver = resolver_factory.deno_resolver().await?;
```
2025-01-23 18:52:55 -05:00
Luca Casonato
c38dbe500b
fix(publish): unfurl sloppy imports in d.ts files and type imports (#27793)
Fixes a bug discovered while trying to publish a package with .js +
.d.ts with sloppy imports.
2025-01-23 14:32:30 +00:00
Bartek Iwańczuk
80a6179ac4
feat(lint): change behavior of --rules flag (#27245)
This commit changes how `deno lint --rules` behaves:
1. All available rules are now printed and rules enabled are marked as
such
2. `deno lint --rules --json` doesn't include markdown documentation
for rules but rather a link to the docs. This should allow us to save
around 400kB of the final `deno` binary size
2025-01-22 23:43:00 +01:00
David Sherret
563a7c284e
refactor: use DataUrl from deno_media_type (#27783)
This was moved from deno_graph to deno_media_type.
2025-01-22 20:35:16 +00:00
David Sherret
0d3d4f5466
fix(install/global): remove importMap field from specified config file (#27744)
Closes https://github.com/denoland/deno/issues/27734
2025-01-20 16:50:34 -05:00
David Sherret
b962b87cfe
chore: fix canary version (#27723)
Broken by
57dd66ec3d

Closes https://github.com/denoland/deno/issues/27719
2025-01-19 11:19:47 +01:00
David Sherret
57dd66ec3d
refactor: move denort to separate crate (#27688)
This slightly degrades the performance of CJS export analysis on
subsequent runs because I changed it to no longer cache in the DENO_DIR
with this PR (denort now properly has no idea about the DENO_DIR). We'll
have to change it to embed this data in the binary and that will also
allow us to get rid of swc in denort (will do that in a follow-up PR).
2025-01-17 20:39:29 +00:00
Leo Kettmeir
054075730c
refactor: update deno_core and use more concrete errors (#27620)
waiting for https://github.com/denoland/deno_core/pull/1043

Fixes #27672
2025-01-17 09:41:52 -08:00
Nathan Whitaker
a5ba198b9a
fix(outdated): Use latest tag even when it's the same as the current version (#27699)
Fixes https://github.com/denoland/deno/issues/27696.

Just a `>` that should've been a `>=`. Also made sure to filter out
deprecated versions.
2025-01-16 20:03:25 +00:00
Nathan Whitaker
256950ddb6
fix(outdated): retain strict semver specifier when updating (#27701)
Fixes https://github.com/denoland/deno/issues/27697

If it's a strict bound (e.g. `1.0.0` as opposed to `^1.0.0` or other),
retain the strictness when we update
2025-01-16 19:33:38 +00:00
Nathan Whitaker
32708213d5
fix(check/lsp): correctly resolve compilerOptions.types (#27686)
Fixes https://github.com/denoland/deno/issues/27062

In the LSP we were passing `npm` specifiers to TSC as roots, but TSC
needs fully resolved specifiers (like the actual file path).

In `deno check` we were often excluding the specifiers entirely from the
roots.

In both cases, we need to resolve the specifiers fully and then pass
them to tsc
2025-01-15 18:48:10 -08:00
David Sherret
05dc69932d
refactor: create deno_lib crate (#27673)
Shifts just some code down for now. I'll do the rest of the refactor in
the next pr, but didn't want to drop a huge refactor.
2025-01-15 09:35:46 -05:00
David Sherret
0b033140c0
refactor: move CliNpmResolver to deno_resolver::npm::NpmResolver (#27659)
As title. After this PR all npm resolution will be out of the CLI crate.
2025-01-14 10:01:05 -05:00
Bartek Iwańczuk
1b7ed4d990
lint 2025-01-14 15:04:45 +01:00
Bartek Iwańczuk
a8c647e0ec
Merge branch 'main' into lint_plugins 2025-01-14 15:02:22 +01:00
Marvin Hagemeister
3fb8fc1ba7
feat(unstable): refactor js lint plugin AST (#27615)
This PR changes the underlying buffer backed AST format we use for
JavaScript-based linting plugins. It adds support for various new types,
makes traversal code a lot easier and is more polished compared to
previous iterations.

Here is a quick summary (in no particular order):

- Node prop data is separate from traversal, which makes traversal code
so much easier to reason about. Previously, it was interleaved with node
prop data
- spans are in a separate table as well, as they are rarely needed.
- schema is separate from SWC conversion logic, which makes 
- supports recursive plain objects
- supports numbers
- supports bigint
- supports regex
- adds all SWC nodes

Apologies, this is kinda a big PR, but it's worth it imo.

_Marking as draft because I need to update some tests tomorrow._
2025-01-14 13:31:02 +01:00
David Sherret
9dbb99a83c
refactor: create NpmInstaller (#27626)
This separates npm resolution code from npm installation (more work
towards moving resolution code out of the CLI and cleaning up this
code).
2025-01-13 17:35:18 -05:00
Bartek Iwańczuk
cb638dbad8
maybe cleanup 2025-01-10 23:45:01 +01:00
Bartek Iwańczuk
67f77579e8
Merge branch 'main' into lint_plugins 2025-01-10 13:51:22 +01:00
Bartek Iwańczuk
aa145fd378
log -> debug 2025-01-10 02:26:39 +01:00
Bartek Iwańczuk
ebaf18e8ef
fix printer 2025-01-10 02:00:55 +01:00
Bartek Iwańczuk
714ed55473
show errors with cause raised in JS 2025-01-10 01:28:29 +01:00
David Sherret
34beeb7703
refactor(npm): move SloppyImportsCachedFs to deno_resolver (#27610) 2025-01-09 18:30:48 -05:00
Bartek Iwańczuk
89af19da97
fix after merge 2025-01-09 15:18:03 +01:00
Bartek Iwańczuk
807cf19157
Merge branch 'main' into lint_plugins 2025-01-09 15:13:39 +01:00
Bartek Iwańczuk
0db8db2aa7
add todos 2025-01-09 15:12:05 +01:00
Bartek Iwańczuk
900ef00c94
fix print functions 2025-01-09 14:11:54 +01:00
Bartek Iwańczuk
f7b5ee2fda
run in tc_scope 2025-01-09 14:07:10 +01:00
Leo Kettmeir
ea30e188a8
refactor: update deno_core for error refactor (#26867)
Closes #26171

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2025-01-08 14:52:32 -08:00
Bartek Iwańczuk
2fddd68d41
lint 2025-01-07 01:05:48 +01:00
Bartek Iwańczuk
ec745bd2a6
Merge branch 'main' into lint_plugins 2025-01-07 01:02:52 +01:00
Bartek Iwańczuk
b6f2646c1c
refactor: make IncrementalCache accept a CacheDBHash (#27570) 2025-01-06 23:56:36 +00:00
Bartek Iwańczuk
f7051e2058
install all plugins in one go 2025-01-07 00:47:43 +01:00
Bartek Iwańczuk
1f9a5c19b0
use structs instead 2025-01-06 23:45:34 +01:00
Bartek Iwańczuk
08482b04c8
lint 2025-01-06 23:18:07 +01:00
Bartek Iwańczuk
37207e5914
Merge branch 'main' into lint_plugins 2025-01-06 23:14:19 +01:00
Bartek Iwańczuk
7b3cdf1322
wire up CancellationToken 2025-01-03 23:52:51 +01:00
Bartek Iwańczuk
ebb6b60012
lint 2025-01-03 23:25:31 +01:00
David Sherret
89c92b84fa
fix(check): move module not found errors to typescript diagnostics (#27533)
Instead of hard erroring, we now surface module not found errors as
TypeScript diagnostics (we have yet to show the source code of the
error, but something we can improve over time).
2025-01-03 21:49:56 +00:00
Marvin Hagemeister
9124e0a0df chore: support more nodes 2025-01-03 14:22:24 +01:00
Marvin Hagemeister
adc25f85a1 feat: support excluding rules from lint plugins 2025-01-03 11:03:28 +01:00
Bartek Iwańczuk
2edd30904a
update for deno_lint changes 2025-01-02 19:07:55 +01:00
Marvin Hagemeister
321e37bf2e feat: support js lint plugins fixes 2025-01-02 16:28:13 +01:00
Bartek Iwańczuk
554bce98b5
Merge branch 'main' into lint_plugins 2025-01-02 10:35:12 +01:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
David Sherret
ac7b33a340
chore: cargo fmt - turn on group_imports=StdExternalCrate (#26646) 2024-12-31 12:13:39 -05:00
David Sherret
4638caa740
refactor: do not use deno_fs::FileSystem everywhere (#27508)
This changes the cli to mostly use `std::fs` via `sys_traits` instead of
the implemention of `deno_fs::FileSystem`.
2024-12-31 11:29:07 -05:00
Marvin Hagemeister
a844d96ee9
chore(lint): remove manual AST field counter (#27449)
Addresses the review feedback in
https://github.com/denoland/deno/pull/27416 .

- Hoist the buffer max size variable to make it less confusing
- Remove manual AST field counter in favour of an explicit "commit
schema" step which writes the actual field count.
2024-12-31 08:59:41 +01:00