/** The dependency fields of an app's `package.json` the codemods read. */ export interface PackageJson { dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; optionalDependencies?: Record; } /** The app's `package.json`, or null when it is missing or not JSON. */ export declare const readPackageJson: (projectRoot: string) => Promise; /** * Every dependency group in one map. A shared package may declare Tailwind * CSS or c15t only as a peer or optional dependency. Where a package appears * in several groups, `dependencies` wins, then `devDependencies`, then * `peerDependencies`. */ export declare const dependenciesOf: (manifest: PackageJson | null) => Record; /** * The semver range a specifier names, or null when it isn't one. A catalog, * a `link:`, `file:` or git specifier, or a dist-tag can name any version, * whatever digits it holds. */ export declare const rangeOf: (specifier: string) => string | null; /** * The version of an installed package, or null when it isn't installed. * Like Node.js, it looks in `node_modules` in the project and then in each * directory above it, so a package a workspace hoists to its root counts. * It reads the package's `package.json` directly, as its `exports` may not * expose it to `require.resolve()`. */ export declare const installedVersion: (projectRoot: string, name: string) => Promise; /** * Whether a dependency is at least this major. A semver range decides when * every version it allows falls on one side, such as `^3.0.0` or `^2.3.0` * for 3. Otherwise, as for `^2 || ^3`, `workspace:*` or `catalog:`, the * installed version decides, and with nothing installed the answer is null. */ export declare const isAtLeastMajor: (projectRoot: string, name: string, specifier: string, atLeast: number) => Promise; /** * Whether the app should import c15t through the umbrella `c15t` entries: * it lists `c15t` 3, or lists neither scoped framework package. An app that * lists `@c15t/react` or `@c15t/nextjs` keeps the scoped entries unless * `c15t` is known to be 3, by its range or, for a specifier such as * `catalog:`, by the installed package. */ export declare const usesUmbrella: (projectRoot: string, dependencies: Record) => Promise; /** * Whether any dependency group declares Tailwind CSS 3, so that * `devDependencies` can't hide a peer range from `dependenciesOf`. A peer or * optional range speaks for the apps that install the package, so one that * allows 3, such as `^3 || ^4`, counts even when the package builds with 4. * A `dependencies` or `devDependencies` range counts only when 3 is the one * major it allows. */ export declare const declaresTailwind3: (manifest: PackageJson | null) => boolean; /** * The Tailwind CSS major version. A specifier without a single major, such * as `latest`, `workspace:*`, `catalog:`, a git URL or `^3 || ^4`, falls back * to the installed package. */ export declare const tailwindMajor: (projectRoot: string, specifier: string) => Promise;