Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leodog896/deno-outdated
Find outdated dependencies in your deno project
https://github.com/leodog896/deno-outdated
deno dependencies typescript
Last synced: 3 months ago
JSON representation
Find outdated dependencies in your deno project
- Host: GitHub
- URL: https://github.com/leodog896/deno-outdated
- Owner: LeoDog896
- License: mit
- Created: 2022-07-15T19:14:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-28T19:43:03.000Z (7 months ago)
- Last Synced: 2024-10-16T23:49:17.449Z (4 months ago)
- Topics: deno, dependencies, typescript
- Language: TypeScript
- Homepage:
- Size: 62.5 KB
- Stars: 19
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: change.ts
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# deno-outdated
Pins your dependencies to the latest version & updates existing ones.
```bash
deno install --allow-read=./ --allow-net --allow-write=./ -f -n=deno-outdated https://deno.land/x/deno_outdated/cli.ts
```Or, add it to your deno.json's (or deno.jsonc) tasks:
```json
"update": "deno run --allow-read=./ --allow-net --allow-write=./ https://deno.land/x/deno_outdated/cli.ts",
```You can even add a github action:
https://github.com/LeoDog896/deno-outdated/blob/main/.github/workflows/update.ymlDo note that if you're running an application, remove the run action that
removes deno.lock `rm deno.lock`, as that is only for libraries## Flags
- `-q, --quiet`: Silence CLI output
- `-d, --debug`: Add extra information to see scanning
- `-i, --ignore [files...]`: Ignore certain files for formatting
- `-c, --check`: Check files for outdated dependencies without updating them## Ignore
You can ignore updating for a line with `i-deno-outdated`, for example:
```ts
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts" // i-deno-outdatedconst source = `
const x = 'https://deno.land/[email protected]/testing/asserts.ts'; ${"i-deno-outdated" && ""}
const x = 'https://deno.land/[email protected]/testing/asserts.ts' // i-deno-outdated ";
`;
```Currently works with:
- https://deno.land/
- https://esm.sh/
- https://cdn.jsdelivr.net
- https://unpkg.com(Want to add more? Contribute to `regex.ts`)
## What's the difference between this and [UDD](https://github.com/hayd/deno-udd)?
This tool aims to be similar to deno native tools such as `deno fmt` and
`deno lint`, or aka shellable## Internal layout
Updating works by finding URLs in a source file, removing their version
specifier, and redirecting it to the latest one.This is split into different stacking modules:
### Layer 1:
- Redirect (`redirect.ts`) finds any simple redirects in that URL.
- Removal (`removal.ts`) removes the version part of a URL. This is dependent on
the vendor (deno.land/x, esm.sh).### Layer 2: (`update.ts`)
This updates a URL to its latest known version, if any.
### Layer 3 (`change.ts`)
This is the API for the CLI app, and it allows you to scan files for outdated
dependencies and update them.### Layer 4 (`cli.ts`)
This wraps everything around with cliffy for a nice CLI app.