dependency_updater.ts

Declarations
#

6 declarations

view source

find_updates_needed
#

dependency_updater.ts view source

(repo: LocalRepo, published: Map<string, string>): Map<string, { current: string; new: string; type: "dependencies" | "devDependencies" | "peerDependencies"; }>

repo

published

type Map<string, string>

returns

Map<string, { current: string; new: string; type: "dependencies" | "devDependencies" | "peerDependencies"; }>

update_all_repos
#

dependency_updater.ts view source

(repos: LocalRepo[], published: Map<string, string>, options?: UpdateAllReposOptions): Promise<{ updated: number; failed: { repo: string; error: Error; }[]; }>

repos

type LocalRepo[]

published

type Map<string, string>

options

default {}

returns

Promise<{ updated: number; failed: { repo: string; error: Error; }[]; }>

update_package_json
#

dependency_updater.ts view source

(repo: LocalRepo, updates: Map<string, string>, options?: UpdatePackageJsonOptions): Promise<void>

Updates package.json dependencies and creates changeset if needed.

Workflow: 1. Updates all dependency types (dependencies, devDependencies, peerDependencies) 2. Writes updated package.json with tabs formatting 3. Creates auto-changeset if published_versions provided (for transitive updates) 4. Commits both package.json and changeset with standard message

Uses version strategy to determine prefix (exact, caret, tilde) while preserving existing prefixes when possible.

repo

updates

type Map<string, string>

options

default {}

returns

Promise<void>

throws

  • if - file operations or git operations fail

UpdateAllReposOptions
#

UpdatePackageJsonOptions
#

VersionStrategy
#

Depends on
#

Imported by
#