/** * Isomorphic core package.json manipulation functionality * Works with provided package.json data without Node.js filesystem dependencies */ import Version from './version.js'; /** * Package data interface */ export interface PackageData { [key: string]: any; } /** * Options for creating a new PkgCore instance */ export interface PkgCoreOptions { data?: PackageData; } /** * Isomorphic package manipulation class * Works with provided package.json data without filesystem dependencies */ export declare class PkgCore { version: Version; private _data; constructor(data?: PackageData | PkgCoreOptions, options?: PkgCoreOptions); /** * Get the current package data */ get data(): PackageData; /** * Set a property value using dot notation * @param prop - Property path (e.g., 'author.name') * @param value - Value to set * @returns This instance for chaining */ set(prop: string, value: unknown): this; /** * Get a property value using dot notation * @param prop - Property path (e.g., 'author.name') * @param defaultValue - Default value if property doesn't exist * @returns Property value */ get(prop: string, defaultValue?: unknown): unknown; /** * Update a property using a function * @param prop - Property path * @param fn - Function to transform current value * @returns This instance for chaining */ update(prop: string, fn: (currentValue: unknown) => unknown): this; /** * Append value to an array property * @param prop - Property path * @param value - Value to append * @returns This instance for chaining */ append(prop: string, value: unknown): this; /** * Prepend value to an array property * @param prop - Property path * @param value - Value to prepend * @returns This instance for chaining */ prepend(prop: string, value: unknown): this; /** * Delete a property * @param prop - Property path to delete * @returns This instance for chaining */ del(prop: string): this; /** * Check if a property exists * @param prop - Property path to check * @returns True if property exists */ has(prop: string): boolean; /** * Get the package.json content as a formatted string * @param space - Number of spaces for indentation (default: 2) * @returns Formatted JSON string */ stringify(space?: number): string; } export default PkgCore; //# sourceMappingURL=core.d.ts.map