1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/tests/util/server/src
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
..
servers feat(node): stabilize detecting if CJS via "type": "commonjs" in a package.json (#26439) 2024-11-13 15:10:09 +00:00
testdata chore: move test_util to tests/util/server (#22444) 2024-02-19 06:34:24 -07:00
assertions.rs fix(lsp): Pass diagnostic codes to TSC as numbers (#23720) 2024-05-06 23:54:52 +00:00
builders.rs chore: serve node headers from a test server to fix flaky node-gyp test (#26749) 2024-11-06 19:52:46 -08:00
factory.rs chore: move test_util to tests/util/server (#22444) 2024-02-19 06:34:24 -07:00
fs.rs chore: remove print debugging from test server (#26529) 2024-10-24 22:06:17 +00:00
https.rs chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24388) 2024-07-02 02:09:47 +02:00
lib.rs feat: Wasm module support (#26668) 2024-11-19 18:59:23 -05:00
lsp.rs chore: remove print debugging from test server (#26529) 2024-10-24 22:06:17 +00:00
macros.rs fix: otel resiliency (#26857) 2024-11-14 12:16:28 +00:00
npm.rs feat: subcommand to view and update outdated dependencies (#26942) 2024-11-20 15:22:15 -08:00
pty.rs chore: remove print debugging from test server (#26529) 2024-10-24 22:06:17 +00:00
spawn.rs chore: move test_util to tests/util/server (#22444) 2024-02-19 06:34:24 -07:00
test_server.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00