/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { Package } from "@fluidframework/build-tools"; import { PackageCommand } from "../BasePackageCommand.js"; import type { PackageSelectionDefault } from "../flags.js"; import { type ITypeValidationConfig, type PackageWithTypeTestSettings } from "../typeValidator/typeValidatorConfig.js"; export default class PrepareTypeTestsCommand extends PackageCommand { static readonly description = "Updates configuration for type tests in package.json files. If the previous version changes after running preparation, then npm install must be run before building.\n\n Optionally, any type tests that are marked \"broken\" in package.json can be reset using the --reset flag during configuration. This is useful when resetting the type tests to a clean state, such as after a release.\n\n To learn more about how to configure type tests, see the detailed documentation at ."; static readonly flags: { private: import("@oclif/core/interfaces").BooleanFlag; scope: import("@oclif/core/interfaces").OptionFlag; skipScope: import("@oclif/core/interfaces").OptionFlag; all: import("@oclif/core/interfaces").BooleanFlag; dir: import("@oclif/core/interfaces").OptionFlag; packages: import("@oclif/core/interfaces").BooleanFlag; releaseGroup: import("@oclif/core/interfaces").OptionFlag<("client" | "server" | "build-tools" | "all" | "gitrest" | "historian")[] | undefined, import("@oclif/core/interfaces").CustomOptions>; releaseGroupRoot: import("@oclif/core/interfaces").OptionFlag<("client" | "server" | "build-tools" | "all" | "gitrest" | "historian")[] | undefined, import("@oclif/core/interfaces").CustomOptions>; changed: import("@oclif/core/interfaces").BooleanFlag; branch: import("@oclif/core/interfaces").OptionFlag; concurrency: import("@oclif/core/interfaces").OptionFlag; reset: import("@oclif/core/interfaces").BooleanFlag; previous: import("@oclif/core/interfaces").BooleanFlag; remove: import("@oclif/core/interfaces").BooleanFlag; exact: import("@oclif/core/interfaces").OptionFlag; enable: import("@oclif/core/interfaces").BooleanFlag; disable: import("@oclif/core/interfaces").BooleanFlag; normalize: import("@oclif/core/interfaces").BooleanFlag; }; static readonly examples: { description: string; command: string; }[]; protected defaultSelection: PackageSelectionDefault; protected processPackage(pkg: Package): Promise; } /** * Generates a simplified version of the input config. * @remarks Omits some defaults, and removes other properties when the config is `disabled`. */ export declare function normalizeConfig(config: Readonly | undefined): ITypeValidationConfig; export declare enum VersionOptions { Clear = 0, Previous = 1, ClearIfDisabled = 2 } /** * Gets the version before `version`. * This is done by decrementing the least significant non-zero component (as separated by `.`). * * @remarks * This means that `1.2.3` to `1.2.2` and `1.2.0` to `1.1.0`. * * When given the current version of a package (in the source), * this typically computes the version of the release that was made closest to the current version from a branch perspective. * For example if the version on main is `1.2.3`, * the closest release history wise would be the first release of the previous minor, so `1.1.0` even if there were other point releases on the `1.1` branch. */ export declare function previousVersion(version: string): string; /** * Adds or removes the devDependency on a previous version of a package thatis used for type testing. This function only * affects the `devDependencies` nodes in package.json. * */ export declare function updateTypeTestDependency(pkgJson: PackageWithTypeTestSettings, versionOptions: string | VersionOptions): void; /** * Removes any `typeValidation.broken` entries from package.json. */ export declare function resetBrokenTests(pkgJson: { typeValidation?: ITypeValidationConfig; }): void; //# sourceMappingURL=typetests.d.ts.map