deno/cli/tools/registry
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
..
pm feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
api.rs refactor(lsp): changes for lsp_types 0.97.0 (#25169) 2024-08-24 01:21:21 +01:00
auth.rs fix(publish): permissionless dry-run in GHA (#22679) 2024-03-06 18:26:20 +05:30
diagnostics.rs feat: add --allow-import flag (#25469) 2024-09-26 01:50:54 +00:00
graph.rs fix(check): properly surface dependency errors in types file of js file (#25860) 2024-09-25 09:04:57 -04:00
mod.rs feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
paths.rs fix(publish): workspace included license file had incorrect path (#24747) 2024-07-26 15:35:29 +00:00
pm.rs feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
provenance.rs fix(publish): ensure provenance is spec compliant (#25200) 2024-08-31 15:53:46 +00:00
publish_order.rs feat: npm workspace and better Deno workspace support (#24334) 2024-07-04 00:54:33 +00:00
tar.rs fix: improved support for cjs and cts modules (#26558) 2024-11-01 12:27:00 -04:00
unfurl.rs refactor: extract out sloppy imports resolution from CLI crate (#25920) 2024-09-28 19:17:48 -04:00