Nudd
Run this script to update your Deno dependencies to their latest published
versions. This package is a fork of the original
deno-udd package created from
Andy Hayden with significant changes and renamed to
nudd (New Udd).
The biggest differences from the original package are:
- Updated dependencies and Deno API. Most code has been refactored.
- Speed improved by updating dependencies concurrently.
- Nudd only updates to stable versions.
- Nudd only updates to the latest version (removed fragment feature).
- Removed
--testfeature. - Added support for
.jsonfiles (import maps). - Added support for jsr.io modules.
- Added more commands:
update,add,duplicates.
Install
deno install --allow-run --allow-read --allow-write --allow-net --name nudd --force --global https://deno.land/x/nudd/cli.tsTo update:
nudd --upgradeAPI
import { Npm } from "nudd/registry/npm.ts";
const ventojs = Npm.parse("npm:ventojs@0.12.8");
ventojs.name; // ventojs
ventojs.version; // 0.12.8
ventojs.type; // npm
ventojs.url; // npm:ventojs@0.12.8
await ventojs.versions(); // Array with all available versions
await ventojs.latestVersion(); // Returns the latest stable version of the package
ventojs.at("0.12.7"); // npm:ventojs@0.12.7
ventojs.packageUrl; // https://www.npmjs.com/package/ventojsUpdate dependencies
Update the imports of the current import map file:
nudd updateUpdate the imports of the deps.ts file:
nudd update deps.tsUpdate all TS files in your directory:
nudd update *.tsUpdate the imports of your scripts installed globally with Deno:
nudd update --globalUse the --dry-run argument to only show outdated dependencies without update
them:
nudd update --dry-runDetect duplicated dependencies
Detect and fix multiple versions of the same package:
nudd duplicates main.tsUse the --dry-run argument to only show duplicated dependencies without fix
them:
nudd duplicates main.ts --dry-runAdd new dependencies
Search and add a new dependency to your import map file:
nudd add reactSearch and add several dependencies at the same time:
nudd add react @std/path lume lumeland/cms- Single name dependencies, (like
reactorlume) are searched indeno.land/xandnpm. - Scoped dependencies starting with
@(like@std/path) are searched injsrandnpm. - Scoped dependencies without
@(likelumeland/cms) are searched in GitHub and imported fromjsdelivr.