chore: remove unnecessary Range types (#20582)

This commit is contained in:
Rhys Arkins 2023-02-23 10:13:27 +01:00 committed by GitHub
parent 18bdac9d35
commit 9f96c1e224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -1,5 +1,4 @@
import type { LogLevel } from 'bunyan'; import type { LogLevel } from 'bunyan';
import type { Range } from 'semver';
import type { PlatformId } from '../constants'; import type { PlatformId } from '../constants';
import type { HostRule } from '../types'; import type { HostRule } from '../types';
import type { GitNoVerifyOption } from '../util/git/types'; import type { GitNoVerifyOption } from '../util/git/types';
@ -317,7 +316,7 @@ export interface PackageRule
excludePackagePatterns?: string[]; excludePackagePatterns?: string[];
excludePackagePrefixes?: string[]; excludePackagePrefixes?: string[];
matchCurrentValue?: string; matchCurrentValue?: string;
matchCurrentVersion?: string | Range; matchCurrentVersion?: string;
matchSourceUrlPrefixes?: string[]; matchSourceUrlPrefixes?: string[];
matchSourceUrls?: string[]; matchSourceUrls?: string[];
matchUpdateTypes?: UpdateType[]; matchUpdateTypes?: UpdateType[];

View file

@ -1,4 +1,4 @@
import type { Range, SemVer } from 'semver'; import type { SemVer } from 'semver';
import type { RangeStrategy } from '../../types'; import type { RangeStrategy } from '../../types';
export interface NewValueConfig { export interface NewValueConfig {
@ -94,7 +94,7 @@ export interface VersioningApi {
/** /**
* Check whether the `version` satisfies the `range` constraint. * Check whether the `version` satisfies the `range` constraint.
*/ */
matches(version: string, range: string | Range): boolean; matches(version: string, range: string): boolean;
valueToVersion?(version: string): string; valueToVersion?(version: string): string;
} }