refactor(versioning): Separate generic from loose versioning (#13747)
This commit is contained in:
Родитель
b0770c65b4
Коммит
f8124bd34a
|
@ -1,5 +1,5 @@
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import { GenericVersion, GenericVersioningApi } from '../loose/generic';
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApi } from '../types';
|
import type { VersioningApi } from '../types';
|
||||||
|
|
||||||
export const id = 'aws-machine-image';
|
export const id = 'aws-machine-image';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import { GenericVersion, GenericVersioningApi } from '../loose/generic';
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApi } from '../types';
|
import type { VersioningApi } from '../types';
|
||||||
|
|
||||||
export const id = 'docker';
|
export const id = 'docker';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { GenericVersion, GenericVersioningApi } from './generic';
|
import { GenericVersion, GenericVersioningApi } from './generic';
|
||||||
|
|
||||||
describe('versioning/loose/utils', () => {
|
describe('versioning/generic', () => {
|
||||||
const optionalFunctions = [
|
const optionalFunctions = [
|
||||||
'isLessThanRange',
|
'isLessThanRange',
|
||||||
'valueToVersion',
|
'valueToVersion',
|
|
@ -1,5 +1,5 @@
|
||||||
import is from '@sindresorhus/is';
|
import is from '@sindresorhus/is';
|
||||||
import type { NewValueConfig, VersioningApi } from '../types';
|
import type { NewValueConfig, VersioningApi } from './types';
|
||||||
|
|
||||||
export interface GenericVersion {
|
export interface GenericVersion {
|
||||||
release: number[];
|
release: number[];
|
|
@ -1,5 +1,5 @@
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import { GenericVersion, GenericVersioningApi } from '../loose/generic';
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApi } from '../types';
|
import type { VersioningApi } from '../types';
|
||||||
|
|
||||||
export const id = 'git';
|
export const id = 'git';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { getOptions } from '../config/options';
|
import { getOptions } from '../config/options';
|
||||||
import { loadModules } from '../util/modules';
|
import { loadModules } from '../util/modules';
|
||||||
import { isVersioningApiConstructor } from './common';
|
import { isVersioningApiConstructor } from './common';
|
||||||
import { GenericVersion, GenericVersioningApi } from './loose/generic';
|
import { GenericVersion, GenericVersioningApi } from './generic';
|
||||||
import * as semverVersioning from './semver';
|
import * as semverVersioning from './semver';
|
||||||
import type { VersioningApi, VersioningApiConstructor } from './types';
|
import type { VersioningApi, VersioningApiConstructor } from './types';
|
||||||
import * as allVersioning from '.';
|
import * as allVersioning from '.';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApi } from '../types';
|
import type { VersioningApi } from '../types';
|
||||||
import { GenericVersion, GenericVersioningApi } from './generic';
|
|
||||||
|
|
||||||
export const id = 'loose';
|
export const id = 'loose';
|
||||||
export const displayName = 'Loose';
|
export const displayName = 'Loose';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import { GenericVersion, GenericVersioningApi } from '../loose/generic';
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApi } from '../types';
|
import type { VersioningApi } from '../types';
|
||||||
|
|
||||||
export const id = 'nuget';
|
export const id = 'nuget';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import is from '@sindresorhus/is';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import { CONFIG_VALIDATION } from '../../constants/error-messages';
|
import { CONFIG_VALIDATION } from '../../constants/error-messages';
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import { GenericVersion, GenericVersioningApi } from '../loose/generic';
|
import { GenericVersion, GenericVersioningApi } from '../generic';
|
||||||
import type { VersioningApiConstructor } from '../types';
|
import type { VersioningApiConstructor } from '../types';
|
||||||
|
|
||||||
export const id = 'regex';
|
export const id = 'regex';
|
||||||
|
|
Загрузка…
Ссылка в новой задаче