0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 07:16:56 -05:00
Commit graph

1206 commits

Author SHA1 Message Date
Nayeem Rahman
1c2fb5cde1 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-19 01:47:38 +00:00
Sean McArthur
b1c685f4b7
fix(ext/fetch): retry some http/2 errors (#27417)
This brings some of the HTTP/2 retry behavior from reqwest to
`ext/fetch`. It will retry very specific HTTP/2 errors once, if the body
is able to be used again.

Closes #27332
2024-12-18 23:04:29 +01:00
Bartek Iwańczuk
14e4064986
fix(task): properly handle task name wildcards with --recursive (#27396)
This commit fixes `deno task` by checking if the provided
task name actually has a wildcard char ("*").

Previously, if the "--recursive" flag was passed, the task name
was treated as a regex, which lead to a situation where exact task
name resulted in a regex that matched all tasks with the specific
prefix.

This commit fixes it, by checking if the provided task name, is an exact
name, or is it a wildcard match.

Closes https://github.com/denoland/deno/issues/27370
Closes https://github.com/denoland/deno/issues/27401
Closes https://github.com/denoland/deno/issues/27408
2024-12-18 03:32:37 +01:00
Nathan Whitaker
9d7174e434
fix(outdated): ensure "Latest" version is greater than "Update" version (#27390)
Fixes #27038.

Previously, for NPM packages the latest version was the version with the
"latest" tag. For JSR packages, the latest version was the greatest
version that matched a `*` version requirement. Unfortunately, that
doesn't work well with pre-release versions.

This PR changes it so that the latest version is always > the currently
requested version.
For NPM: if "latest" tag > current then "latest" tag; otherwise the
greatest version that is >= current
For JSR: greatest version >= current

This is the most reasonable behavior I could come up with. For example,

```
versions:
2.0.0-beta.2
2.0.0-beta.1
1.0.0 => "latest" tag

with a version req `^2.0.0-beta.1`

previously:
"Update" column => 2.0.0-beta.2
"Latest" column => 1.0.0

now:
"Update" column => 2.0.0-beta.2
"Latest" column => 2.0.0-beta.2
```
2024-12-17 23:56:03 +00:00
Nayeem Rahman
c7f28998d9 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-17 16:30:12 +00:00
Bartek Iwańczuk
f9add94e17
refactor(lint): renames and code flattening (#27386)
Working on loading plugin configuration for
https://github.com/denoland/deno/pull/27203
I encountered a lot of complexity, so did some drive-by cleanups to make
it easier to grok the code and have fewer duplicate names.
2024-12-17 01:35:26 +00:00
David Sherret
95928c46eb
refactor: extract out FileFetcher to deno_cache_dir (#27263) 2024-12-16 23:39:40 +00:00
Nayeem Rahman
5807b53dae reduce dependency on outer CliOptions 2024-12-16 11:57:08 +00:00
Nayeem Rahman
5d76fc9d3e remove need for outer factory 2024-12-16 11:13:23 +00:00
Nayeem Rahman
9a6263c1ce Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-16 00:30:58 +00:00
Nathan Whitaker
9d315f27ed
fix(outdated): support updating dependencies in external import maps (#27339)
Fixes #27331.

The support for it was already in `outdated`, but forgot to wire up the
updating part

Needs #27337
2024-12-13 12:25:05 -08:00
Nayeem Rahman
161468a0f5 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-13 03:34:42 +00:00
David Sherret
4cfa34052d
fix(compile): analyze modules in directory specified in --include (#27296)
I ended up changing the file system implementation to determine
its root directory as the last step of building it instead of being the
first step which makes it much more reliable.
2024-12-12 18:07:35 +00:00
Nayeem Rahman
ff1f921c1d Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-11 21:37:53 +00:00
David Sherret
c6fa62896d
fix(compile): output contents of embedded file system (#27302) 2024-12-11 09:40:50 -05:00
Nayeem Rahman
f45d39b20b move -c handling to CliOptions methods 2024-12-11 14:34:15 +00:00
Nayeem Rahman
f8be309def Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-11 09:54:01 +00:00
Nathan Whitaker
6f506208f6
feat(unstable): support caching npm dependencies only as they're needed (#27300)
Currently deno eagerly caches all npm packages in the workspace's npm
resolution. So, for instance, running a file `foo.ts` that imports
`npm:chalk` will also install all dependencies listed in `package.json`
and all `npm` dependencies listed in the lockfile.

This PR refactors things to give more control over when and what npm
packages are automatically cached while building the module graph.

After this PR, by default the current behavior is unchanged _except_ for
`deno install --entrypoint`, which will only cache npm packages used by
the given entrypoint. For the other subcommands, this behavior can be
enabled with `--unstable-npm-lazy-caching`


Fixes #25782.

---------

Signed-off-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-12-10 18:24:23 -08:00
Bartek Iwańczuk
dd42a64c43
refactor(lint): manage schema files for linter in Deno repo (#27324)
This commit provides schema files for lint rules and lint tags
in this repo instead of pulling them from `deno_lint` repository.

A unit test was added to ensure all available rules are listed
in the schema file. A unit test for tags can be done once 
https://github.com/denoland/deno/pull/27162 lands.
2024-12-11 02:06:04 +01:00
Bartek Iwańczuk
7c8b55b584
fix(outdated): error when there are no config files (#27306)
This commit changes "deno outdated" subcommand to
error out if run in a directory that has no config file 
(including parent directories). This matches
"pnpm" behavior.

Also added tests for filtering that yields no results,
to ensure that it exists cleanly, that also matches "pnpm"
behavior.

Closes https://github.com/denoland/deno/issues/27287

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-12-10 23:25:29 +00:00
Bartek Iwańczuk
7bab83d6c0
fix(outdated): respect --quiet flag for hints (#27317) 2024-12-10 18:22:42 +00:00
Nayeem Rahman
de37f41e13 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-10 17:02:02 +00:00
Bartek Iwańczuk
c3af09821a
fix(outdated): show a suggestion for updating (#27304)
Show command to update dependencies based on the output
of "deno outdated" command.

Closes https://github.com/denoland/deno/issues/27256
2024-12-10 14:41:16 +01:00
Nayeem Rahman
83ee4c9a73 lint 2024-12-10 10:10:31 +00:00
Nayeem Rahman
37d45d0e84 use WorkspaceFileContainer for bench --watch 2024-12-10 09:51:25 +00:00
Nayeem Rahman
b8b9eea548 restore checking to test --watch 2024-12-10 09:42:41 +00:00
Nayeem Rahman
0c188ebab9 restore test --watch=... support 2024-12-10 09:34:55 +00:00
Nayeem Rahman
1af0cdee0a use single workspace dir for test -c and bench -c 2024-12-10 09:31:52 +00:00
Nayeem Rahman
78de1fb248 use WorkspaceFileContainer for bench 2024-12-10 09:06:42 +00:00
Nayeem Rahman
0c44814e21 use WorkspaceFileContainer for test --watch 2024-12-10 08:42:33 +00:00
Nayeem Rahman
61aa023d92 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-10 01:24:22 +00:00
David Sherret
da3a676d1c
fix: do not error when subpath has an @ symbol (#27290)
Closes https://github.com/denoland/deno/issues/27243
2024-12-09 13:19:08 -08:00
Nayeem Rahman
dab83524b8 use WorkspaceFileContainer in deno test 2024-12-09 11:56:15 +00:00
Nayeem Rahman
4d081d2cfc dedup discovered/specified config 2024-12-07 02:31:48 +00:00
Nayeem Rahman
7ceeb0ba20 fix --doc-only 2024-12-07 02:14:20 +00:00
Nayeem Rahman
59511cba6a cleanup 2024-12-07 01:34:20 +00:00
Nayeem Rahman
f36d70d194 move remote specifier handling to deno_config 2024-12-07 01:19:38 +00:00
Nayeem Rahman
871750aaae Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-06 02:28:36 +00:00
Nathan Whitaker
ffac282805
fix(install): use locked version of jsr package when fetching exports (#27237)
Fixes #27193.
2024-12-05 18:55:35 +00:00
Marvin Hagemeister
f098dd02f7
fix(task): --recursive option not working (#27183)
We didn't handle the `--recursive` option properly in `deno task`. This
PR addresses that.

Fixes https://github.com/denoland/deno/issues/27174
2024-12-05 19:00:35 +01:00
Nayeem Rahman
b3bd581919 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-05 08:04:42 +00:00
Nayeem Rahman
de4e641360 WorkspaceFileContainer 2024-12-05 08:04:31 +00:00
Marvin Hagemeister
120b3811eb
fix(task): don't panic with filter on missing task argument (#27180)
We were panicing when running `deno task --filter foo` without a task
argument.

Fixes https://github.com/denoland/deno/issues/27177
2024-12-04 13:06:09 +01:00
Nayeem Rahman
6499ad6ae7 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-12-04 01:10:58 +00:00
Marvin Hagemeister
d5b63bb642
fix(task): only pass args to root task (#27213)
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes https://github.com/denoland/deno/issues/27206
2024-12-03 16:35:46 +01:00
Bartek Iwańczuk
53936eda11
fix(fmt): stable formatting of HTML files with JS (#27164)
Closes https://github.com/denoland/deno/issues/26407
Closes https://github.com/denoland/deno/issues/26763
Closes https://github.com/denoland/deno/issues/26560
Closes https://github.com/denoland/deno/issues/26744
Closes https://github.com/denoland/deno/issues/27030
2024-12-03 02:04:55 +01:00
Nayeem Rahman
14b3eb2789 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-11-30 01:09:30 +00:00
Bartek Iwańczuk
1d49b3cb0f
fix: support workspace:^ and workspace:~ version constraints (#27096)
This commit adds support for understanding "workpace:^"
and "workspace:~" version constraints in npm/pnpm workspaces.

This is done by upgrading various crates to their latest versions.

Closes https://github.com/denoland/deno/issues/26726

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-30 00:54:26 +01:00
David Sherret
f6248601f4
fix(task): forward signals to spawned sub-processes on unix (#27141)
Closes https://github.com/denoland/deno/issues/18445
2024-11-29 17:36:43 -05:00
Nayeem Rahman
c521bfbc44 Merge remote-tracking branch 'upstream/main' into check-workspace-member-compiler-options 2024-11-29 17:13:03 +00:00