feat(fvm): update to use flutter version datasource (#15765)

This commit is contained in:
Joshua Tang 2022-05-28 15:41:35 +10:00 committed by GitHub
parent 298ca9988c
commit 99c4d1b020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ describe('modules/manager/fvm/extract', () => {
expect(res.deps).toEqual([
{
currentValue: '2.10.1',
datasource: 'github-tags',
datasource: 'flutter-version',
depName: 'flutter',
packageName: 'flutter/flutter',
},
@ -46,7 +46,7 @@ describe('modules/manager/fvm/extract', () => {
expect(res.deps).toEqual([
{
currentValue: 'stable',
datasource: 'github-tags',
datasource: 'flutter-version',
depName: 'flutter',
packageName: 'flutter/flutter',
},

View file

@ -1,6 +1,6 @@
import is from '@sindresorhus/is';
import { logger } from '../../../logger';
import { GithubTagsDatasource } from '../../datasource/github-tags';
import { FlutterVersionDatasource } from '../../datasource/flutter-version';
import type { PackageDependency, PackageFile } from '../types';
interface FvmConfig {
@ -33,7 +33,7 @@ export function extractPackageFile(
const dep: PackageDependency = {
depName: 'flutter',
currentValue: fvmConfig.flutterSdkVersion,
datasource: GithubTagsDatasource.id,
datasource: FlutterVersionDatasource.id,
packageName: 'flutter/flutter',
};
return { deps: [dep] };

View file

@ -1,9 +1,9 @@
import { GithubTagsDatasource } from '../../datasource/github-tags';
import { FlutterVersionDatasource } from '../../datasource/flutter-version';
import * as semverVersioning from '../../versioning/semver';
export { extractPackageFile } from './extract';
export const supportedDatasources = [GithubTagsDatasource.id];
export const supportedDatasources = [FlutterVersionDatasource.id];
export const defaultConfig = {
fileMatch: ['(^|\\/)\\.fvm\\/fvm_config\\.json$'],