Npm provider
The NpmProvider upgrades a cli published as an npm
package. Set the full package name, or a scope plus an optional name that
defaults to the cli name.
import { NpmProvider } from "@cliffy/upgrade/provider/npm";
const provider = new NpmProvider({ package: "@my-scope/my-cli" });
For an unscoped package published under the cli name, no options are required.
import { NpmProvider } from "@cliffy/upgrade/provider/npm";
const provider = new NpmProvider();
iNOTE
When upgrading to
latest, theNpmProviderlets the runtime resolve the concrete version instead of pinning it. This way a configured minimum dependency age policy is respected (minimumDependencyAgein Deno,min-release-agein npm/pnpm/bun): the upgrade installs the newest version allowed by the policy rather than the absolute latest.