buddy-bot
Version:
Automated & optimized dependency updates for JavaScript & TypeScript projects. Like Renovate & Dependabot.
62 lines • 1.98 kB
TypeScript
import type { PackageFile } from '../types';
/**
* Check if a file is a Composer file
*/
export declare function isComposerFile(filePath: string): boolean;
/**
* Parse a composer.json file and extract dependencies
*/
export declare function parseComposerJson(filePath: string, content: string): Promise<PackageFile | null>;
/**
* Parse a composer.lock file and extract dependencies
*/
export declare function parseComposerLock(filePath: string, content: string): Promise<PackageFile | null>;
/**
* Parse a Composer file (composer.json or composer.lock)
*/
export declare function parseComposerFile(filePath: string, content: string): Promise<PackageFile | null>;
/**
* Generate updated composer.json content with new dependency versions
*/
export declare function generateComposerUpdates(updates: Array<{ name: string, newVersion: string, file: string }>): Promise<Array<{ path: string, content: string, type: 'update' }>>;
/**
* Interface for Composer package data structure
*/
export declare interface ComposerPackage {
'name'?: string
'description'?: string
'require'?: Record<string, string>
'require-dev'?: Record<string, string>
'suggest'?: Record<string, string>
'conflict'?: Record<string, string>
'replace'?: Record<string, string>
'provide'?: Record<string, string>
'autoload'?: any
'autoload-dev'?: any
'scripts'?: Record<string, string | string[]>
'config'?: any
'extra'?: any
'repositories'?: any[]
'minimum_stability'?: string
'prefer-stable'?: boolean
'version'?: string
}
/**
* Interface for Composer lock file structure
*/
export declare interface ComposerLock {
'packages'?: Array<{
'name': string
'version': string
'type'?: string
'require'?: Record<string, string>
'require-dev'?: Record<string, string>
}>
'packages-dev'?: Array<{
'name': string
'version': string
'type'?: string
'require'?: Record<string, string>
'require-dev'?: Record<string, string>
}>
}