1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/cli/tools
Nathan Whitaker 56f31628f7
feat: subcommand to view and update outdated dependencies (#26942)
Closes #20487

Currently spelled

```
deno outdated
```
and
```
deno outdated --update
```

Works across package.json and deno.json, and in workspaces.

There's a bit of duplicated code, I'll refactor to reduce this in follow
ups

## Currently supported:
### Printing outdated deps (current output below which basically mimics
pnpm, but requesting feedback / suggestions)

```
deno outdated
```
![Screenshot 2024-11-19 at 2 01
56 PM](https://github.com/user-attachments/assets/51fea83a-181a-4082-b388-163313ce15e7)

### Updating deps

semver compatible:
```
deno outdated --update
```
latest:
```
deno outdated --latest
```
current output is basic, again would love suggestions
![Screenshot 2024-11-19 at 2 13
46 PM](https://github.com/user-attachments/assets/e4c4db87-cd67-4b74-9ea7-4bd80106d5e9)

#### Filters
```
deno outdated --update "@std/*"
deno outdated --update --latest "@std/* "!@std/fmt"
```
#### Update to specific versions
```
deno outdated --update @std/fmt@1.0.2 @std/cli@^1.0.3
```

### Include all workspace members
```
deno outdated --recursive
deno outdated --update --recursive
```

## Future work
- interactive update
- update deps in js/ts files
- better support for transitive deps

Known issues (to be fixed in follow ups):
- If no top level dependencies have changed, we won't update transitive
deps (even if they could be updated)
- Can't filter transitive deps, or update them to specific versions

## TODO (in this PR):
- ~~spec tests for filters~~
- ~~spec test for mixed workspace (have tested manually)~~
- tweak output
- suggestion when you try `deno update`

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-20 15:22:15 -08:00
..
bench feat(watch): log which file changed on HMR or watch change (#25801) 2024-11-16 15:59:31 +01:00
coverage feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
doc refactor: update deno_doc, use prismjs, remove internal reference html generation logic (#26885) 2024-11-19 08:56:04 -08:00
init refactor(init): inline routing in deno init --serve template (#26595) 2024-10-29 14:37:21 +09:00
jupyter feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
lint feat(lint): Add checked files list to the JSON output(#26936) 2024-11-20 20:59:43 +01:00
registry feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
repl feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
run feat(watch): log which file changed on HMR or watch change (#25801) 2024-11-16 15:59:31 +01:00
test feat(watch): log which file changed on HMR or watch change (#25801) 2024-11-16 15:59:31 +01:00
check.rs feat: Wasm module support (#26668) 2024-11-19 18:59:23 -05:00
clean.rs feat(clean): add progress bar (#25026) 2024-08-14 13:04:07 +02:00
compile.rs feat(compile): ability to embed local data files (#26934) 2024-11-19 16:19:35 -05:00
doc.rs refactor: update deno_doc, use prismjs, remove internal reference html generation logic (#26885) 2024-11-19 08:56:04 -08:00
fmt.rs feat(fmt): support SQL (#26750) 2024-11-19 21:01:16 +00:00
info.rs feat(info): show location for Web Cache (#26205) 2024-11-20 01:04:48 +00:00
installer.rs fix(cli): show prefix hint when installing a package globally (#26629) 2024-11-16 14:57:14 +01:00
mod.rs BREAKING: remove deno vendor (#25343) 2024-09-03 17:00:57 +10:00
serve.rs feat(watch): log which file changed on HMR or watch change (#25801) 2024-11-16 15:59:31 +01:00
task.rs feat(task): add --eval flag (#26943) 2024-11-20 02:23:20 +01:00
upgrade.rs fix: otel resiliency (#26857) 2024-11-14 12:16:28 +00:00