/** * Escapes special regex characters in a string to create a literal match pattern. * @param str - The string to escape (e.g., "0.0.0(-placeholder)?") * @returns The escaped string safe for use inside a RegExp constructor */ export declare function escapeForRegex(str: string): string; /** * Creates a regex to match placeholder versions (e.g., "0.0.0", "0.0.0-placeholder") * @param placeholder - The placeholder pattern (default: "0.0.0(-placeholder)?") * @returns RegExp that captures the version prefix (~, ^) in $1 */ export declare function createPlaceholderRegex(placeholder: string): RegExp; /** * Regex to match workspace protocol versions (e.g., "workspace:*", "workspace:~1.0.0") * Captures: $1 = prefix (~, ^, or *), $2 = trailing comma if present */ export declare const workspaceProtocolRegex: RegExp; /** * Regex to match wildcard versions (e.g., "*1.2.3", "*1.0.0-rc.1") * Captures: $1 = version (semver format), $2 = trailing comma if present * Note: Only matches versions starting with digits to avoid matching glob patterns like "*.js" or "**.metadata.json" */ export declare const wildcardVersionRegex: RegExp; /** * Regex to match and remove "private": true field from package.json */ export declare const privateFieldRegex: RegExp; //# sourceMappingURL=set-version-regexes.d.ts.map