diff --git a/lib/modules/datasource/artifactory/index.spec.ts b/lib/modules/datasource/artifactory/index.spec.ts index e0d6c1b9499e43..d84c402ef52403 100644 --- a/lib/modules/datasource/artifactory/index.spec.ts +++ b/lib/modules/datasource/artifactory/index.spec.ts @@ -12,7 +12,7 @@ const testRegistryUrl = 'https://jfrog.company.com/artifactory'; const testLookupName = 'project'; const testConfig = { registryUrls: [testRegistryUrl], - depName: testLookupName, + packageName: testLookupName, }; const fixtureReleasesAsFolders = Fixtures.get('releases-as-folders.html'); const fixtureReleasesAsFiles = Fixtures.get('releases-as-files.html'); @@ -70,7 +70,6 @@ describe('modules/datasource/artifactory/index', () => { .reply(200, '\n

Header

\n1.3.0\n'); const res = await getPkgReleases({ registryUrls: [testRegistryUrl, secondRegistryUrl], - depName: testLookupName, datasource, packageName: testLookupName, }); @@ -81,7 +80,6 @@ describe('modules/datasource/artifactory/index', () => { it('returns null without registryUrl + warning', async () => { const res = await getPkgReleases({ datasource, - depName: testLookupName, packageName: testLookupName, }); expect(logger.warn).toHaveBeenCalledTimes(1); diff --git a/lib/modules/datasource/artifactory/readme.md b/lib/modules/datasource/artifactory/readme.md index 87b5342d66e82e..bebfc586c407bb 100644 --- a/lib/modules/datasource/artifactory/readme.md +++ b/lib/modules/datasource/artifactory/readme.md @@ -2,6 +2,6 @@ Artifactory is the recommended registry for Conan packages. This datasource returns releases from given custom `registryUrl`(s). -The target URL is composed by the `registryUrl` and the `packageName`, which defaults to `depName` when `packageName` is not defined. +The target URL is composed by the `registryUrl` and the `packageName`. The release timestamp is taken from the date in the directory listing, and is assumed to be in UTC time. diff --git a/lib/modules/datasource/aws-machine-image/index.spec.ts b/lib/modules/datasource/aws-machine-image/index.spec.ts index d3bca1ce1417f2..ff8f7aef304409 100644 --- a/lib/modules/datasource/aws-machine-image/index.spec.ts +++ b/lib/modules/datasource/aws-machine-image/index.spec.ts @@ -276,7 +276,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mockEmpty); const res = await getDigest({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["without newValue, without returned images to be null"]}]', }); expect(res).toBeNull(); @@ -286,7 +286,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mock1Image); const res = await getDigest({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["without newValue, with one matching image to return that image"]}]', }); expect(res).toStrictEqual(image3.Name); @@ -296,7 +296,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mock3Images); const res = await getDigest({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["without newValue, with 3 matching image to return the newest image"]}]', }); expect(res).toStrictEqual(image3.Name); @@ -307,7 +307,7 @@ describe('modules/datasource/aws-machine-image/index', () => { const res = await getDigest( { datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["with matching newValue, with 3 matching image to return the matching image"]}]', }, image1.ImageId @@ -320,7 +320,7 @@ describe('modules/datasource/aws-machine-image/index', () => { const res = await getDigest( { datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["with not matching newValue, with 3 matching images to return the matching image"]}]', }, 'will never match' @@ -334,7 +334,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mockEmpty); const res = await getPkgReleases({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["without returned images to be null"]}]', }); expect(res).toBeNull(); @@ -344,7 +344,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mock1Image); const res = await getPkgReleases({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["with one matching image to return that image"]}]', }); expect(res).toStrictEqual({ @@ -363,7 +363,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand({ Images: [image2] }); const res = await getPkgReleases({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["with one deprecated matching image to return that image"]}]', }); expect(res).toStrictEqual({ @@ -382,7 +382,7 @@ describe('modules/datasource/aws-machine-image/index', () => { mockDescribeImagesCommand(mock3Images); const res = await getPkgReleases({ datasource, - depName: + packageName: '[{"Name":"owner-id","Values":["602401143452"]},{"Name":"name","Values":["with 3 matching image to return the newest image"]}]', }); expect(res).toStrictEqual({ diff --git a/lib/modules/datasource/aws-rds/index.spec.ts b/lib/modules/datasource/aws-rds/index.spec.ts index fa94db92adcfe6..d0eda95cfac8ff 100644 --- a/lib/modules/datasource/aws-rds/index.spec.ts +++ b/lib/modules/datasource/aws-rds/index.spec.ts @@ -105,7 +105,7 @@ describe('modules/datasource/aws-rds/index', () => { }); const res = await getPkgReleases({ datasource: AwsRdsDataSource.id, - depName: '[{"Name":"engine","Values":["mysql"]}]', + packageName: '[{"Name":"engine","Values":["mysql"]}]', }); expect(res).toBeNull(); }); @@ -117,7 +117,7 @@ describe('modules/datasource/aws-rds/index', () => { }); const res = await getPkgReleases({ datasource: AwsRdsDataSource.id, - depName: '[{"Name":"engine","Values":["mysql"]}]', + packageName: '[{"Name":"engine","Values":["mysql"]}]', }); expect(res).toStrictEqual({ releases: [ @@ -136,7 +136,7 @@ describe('modules/datasource/aws-rds/index', () => { }); const res = await getPkgReleases({ datasource: AwsRdsDataSource.id, - depName: '[{"Name":"engine","Values":["mysql"]}]', + packageName: '[{"Name":"engine","Values":["mysql"]}]', }); expect(res).toStrictEqual({ releases: [ diff --git a/lib/modules/datasource/azure-pipelines-tasks/index.spec.ts b/lib/modules/datasource/azure-pipelines-tasks/index.spec.ts index 4b009a5ae85bfc..75d3b009e7932c 100644 --- a/lib/modules/datasource/azure-pipelines-tasks/index.spec.ts +++ b/lib/modules/datasource/azure-pipelines-tasks/index.spec.ts @@ -6,7 +6,7 @@ describe('modules/datasource/azure-pipelines-tasks/index', () => { expect( await getPkgReleases({ datasource: AzurePipelinesTasksDatasource.id, - depName: 'unknown', + packageName: 'unknown', }) ).toBeNull(); }); @@ -15,7 +15,7 @@ describe('modules/datasource/azure-pipelines-tasks/index', () => { expect( await getPkgReleases({ datasource: AzurePipelinesTasksDatasource.id, - depName: 'AutomatedAnalysis', + packageName: 'AutomatedAnalysis', }) ).toEqual({ releases: [{ version: '0.171.0' }, { version: '0.198.0' }] }); }); @@ -24,7 +24,7 @@ describe('modules/datasource/azure-pipelines-tasks/index', () => { expect( await getPkgReleases({ datasource: AzurePipelinesTasksDatasource.id, - depName: 'AutomatedAnalysis-Marketplace', + packageName: 'AutomatedAnalysis-Marketplace', }) ).toEqual({ releases: [{ version: '0.171.0' }, { version: '0.198.0' }] }); }); @@ -33,7 +33,7 @@ describe('modules/datasource/azure-pipelines-tasks/index', () => { expect( await getPkgReleases({ datasource: AzurePipelinesTasksDatasource.id, - depName: 'automatedanalysis', + packageName: 'automatedanalysis', }) ).toEqual({ releases: [{ version: '0.171.0' }, { version: '0.198.0' }] }); }); diff --git a/lib/modules/datasource/bitbucket-tags/index.spec.ts b/lib/modules/datasource/bitbucket-tags/index.spec.ts index 369f646c3cb170..79ac0913e9f30b 100644 --- a/lib/modules/datasource/bitbucket-tags/index.spec.ts +++ b/lib/modules/datasource/bitbucket-tags/index.spec.ts @@ -32,7 +32,7 @@ describe('modules/datasource/bitbucket-tags/index', () => { .reply(200, body); const res = await getPkgReleases({ datasource, - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(3); @@ -69,7 +69,7 @@ describe('modules/datasource/bitbucket-tags/index', () => { .reply(200, body); const res = await getDigest({ datasource, - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res).toBeString(); @@ -94,7 +94,7 @@ describe('modules/datasource/bitbucket-tags/index', () => { .reply(200, body); const res = await getDigest({ datasource, - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toBeNull(); }); @@ -116,7 +116,7 @@ describe('modules/datasource/bitbucket-tags/index', () => { const res = await getDigest( { datasource, - depName: 'some/dep2', + packageName: 'some/dep2', }, 'v1.0.0' ); diff --git a/lib/modules/datasource/cdnjs/index.spec.ts b/lib/modules/datasource/cdnjs/index.spec.ts index 922777da2e90a2..67b1945a07bfb1 100644 --- a/lib/modules/datasource/cdnjs/index.spec.ts +++ b/lib/modules/datasource/cdnjs/index.spec.ts @@ -18,7 +18,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -28,7 +28,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -38,7 +38,7 @@ describe('modules/datasource/cdnjs/index', () => { expect( await getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).toBeNull(); }); @@ -51,7 +51,7 @@ describe('modules/datasource/cdnjs/index', () => { expect( await getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'doesnotexist/doesnotexist', + packageName: 'doesnotexist/doesnotexist', }) ).toBeNull(); }); @@ -61,7 +61,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -71,7 +71,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -81,7 +81,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -91,7 +91,7 @@ describe('modules/datasource/cdnjs/index', () => { await expect( getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'foo/bar', + packageName: 'foo/bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -103,7 +103,7 @@ describe('modules/datasource/cdnjs/index', () => { .reply(200, Fixtures.get('d3-force.json')); const res = await getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'd3-force/d3-force.js', + packageName: 'd3-force/d3-force.js', }); expect(res).toMatchSnapshot(); }); @@ -115,7 +115,7 @@ describe('modules/datasource/cdnjs/index', () => { .reply(200, Fixtures.get('bulma.json')); const res = await getPkgReleases({ datasource: CdnJsDatasource.id, - depName: 'bulma/only/0.7.5/style.css', + packageName: 'bulma/only/0.7.5/style.css', }); expect(res).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/clojure/index.spec.ts b/lib/modules/datasource/clojure/index.spec.ts index 87b876cb4ef4d7..6e6fef32ebf9e2 100644 --- a/lib/modules/datasource/clojure/index.spec.ts +++ b/lib/modules/datasource/clojure/index.spec.ts @@ -144,10 +144,10 @@ function mockGenericPackage(opts: MockOpts = {}) { } } function get( - depName = 'org.example:package', + packageName = 'org.example:package', ...registryUrls: string[] ): Promise { - const conf = { versioning, datasource: ClojureDatasource.id, depName }; + const conf = { versioning, datasource: ClojureDatasource.id, packageName }; return getPkgReleases(registryUrls ? { ...conf, registryUrls } : conf); } diff --git a/lib/modules/datasource/common.ts b/lib/modules/datasource/common.ts index 69c68360b25a45..e02c77e620af85 100644 --- a/lib/modules/datasource/common.ts +++ b/lib/modules/datasource/common.ts @@ -5,6 +5,6 @@ export function isGetPkgReleasesConfig( ): input is GetPkgReleasesConfig { return ( (input as GetPkgReleasesConfig).datasource !== undefined && - (input as GetPkgReleasesConfig).depName !== undefined + (input as GetPkgReleasesConfig).packageName !== undefined ); } diff --git a/lib/modules/datasource/conan/common.ts b/lib/modules/datasource/conan/common.ts index 505aadb2c9669e..4758658f67b437 100644 --- a/lib/modules/datasource/conan/common.ts +++ b/lib/modules/datasource/conan/common.ts @@ -11,7 +11,7 @@ export const conanDatasourceRegex = regEx( ); export function getConanPackage(packageName: string): ConanPackage { - const depName = packageName.split('/')[0]; + const conanName = packageName.split('/')[0]; const userAndChannel = packageName.split('@')[1]; - return { depName, userAndChannel }; + return { conanName, userAndChannel }; } diff --git a/lib/modules/datasource/conan/index.spec.ts b/lib/modules/datasource/conan/index.spec.ts index 68fc393a514315..84c1a98c2fb56b 100644 --- a/lib/modules/datasource/conan/index.spec.ts +++ b/lib/modules/datasource/conan/index.spec.ts @@ -16,14 +16,14 @@ const datasource = ConanDatasource.id; const nonDefaultRegistryUrl = 'https://not.conan.io/'; const config: GetPkgReleasesConfig = { - depName: '', + packageName: '', datasource, versioning: conan.id, registryUrls: [nonDefaultRegistryUrl], }; const digestConfig: GetDigestInputConfig = { - depName: 'fake', + packageName: 'fake', datasource, registryUrls: [nonDefaultRegistryUrl], }; @@ -59,7 +59,6 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=fakepackage') .reply(200); - config.depName = 'fakepackage'; expect( await getPkgReleases({ ...config, @@ -73,7 +72,6 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=fakepackage') .reply(200, {}); - config.depName = 'fakepackage'; expect( await getPkgReleases({ ...config, @@ -88,7 +86,6 @@ describe('modules/datasource/conan/index', () => { .get('/v2/conans/search?q=poco') .reply(404); config.registryUrls = ['https://fake.bintray.com/']; - config.depName = 'poco'; expect( await getPkgReleases({ ...config, @@ -102,7 +99,6 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=fakepackage') .reply(200, fakeJson); - config.depName = 'fakepackage'; expect( await getPkgReleases({ ...config, @@ -116,7 +112,6 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=poco') .reply(200, pocoJson); - config.depName = 'poco'; expect( await getPkgReleases({ ...config, @@ -155,7 +150,6 @@ describe('modules/datasource/conan/index', () => { await getPkgReleases({ ...config, registryUrls: [defaultRegistryUrl], - depName: 'poco', packageName: 'poco/1.2@_/_', }) ).toEqual({ @@ -191,7 +185,6 @@ describe('modules/datasource/conan/index', () => { await getPkgReleases({ ...config, registryUrls: [defaultRegistryUrl], - depName: 'poco', packageName: 'poco/1.2@foo/bar', }) ).toBeNull(); @@ -202,7 +195,7 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=poco') .reply(200, pocoJson); - config.depName = 'poco'; + config.packageName = 'poco'; expect( await getPkgReleases({ ...config, @@ -216,7 +209,7 @@ describe('modules/datasource/conan/index', () => { .scope(nonDefaultRegistryUrl) .get('/v2/conans/search?q=bad') .reply(200, malformedJson); - config.depName = 'bad'; + config.packageName = 'bad'; expect( await getPkgReleases({ ...config, @@ -238,7 +231,7 @@ describe('modules/datasource/conan/index', () => { .get('/v2/conans/search?q=poco') .replyWithError('error'); config.registryUrls = ['https://fake.bintray.com/']; - config.depName = 'poco'; + config.packageName = 'poco'; expect( await getPkgReleases({ ...config, @@ -253,7 +246,7 @@ describe('modules/datasource/conan/index', () => { .get('/v2/conans/search?q=poco') .reply(200, fakeJson); config.registryUrls = ['https://fake.bintray.com']; - config.depName = 'poco'; + config.packageName = 'poco'; expect( await getPkgReleases({ ...config, diff --git a/lib/modules/datasource/conan/index.ts b/lib/modules/datasource/conan/index.ts index 037062c1276140..c77dc6e8126049 100644 --- a/lib/modules/datasource/conan/index.ts +++ b/lib/modules/datasource/conan/index.ts @@ -36,17 +36,17 @@ export class ConanDatasource extends Datasource { } async getConanCenterReleases( - depName: string, + conanName: string, userAndChannel: string ): Promise { if (userAndChannel && userAndChannel !== '@_/_') { logger.debug( - { depName, userAndChannel }, + { conanName, userAndChannel }, 'User/channel not supported for Conan Center lookups' ); return null; } - const url = `https://api.github.com/repos/conan-io/conan-center-index/contents/recipes/${depName}/config.yml`; + const url = `https://api.github.com/repos/conan-io/conan-center-index/contents/recipes/${conanName}/config.yml`; const res = await this.githubHttp.get(url, { headers: { accept: 'application/vnd.github.v3.raw' }, }); @@ -78,7 +78,7 @@ export class ConanDatasource extends Datasource { const revisionLookUp = joinUrlParts( url, 'v2/conans/', - conanPackage.depName, + conanPackage.conanName, newValue, conanPackage.userAndChannel, '/revisions' @@ -102,19 +102,27 @@ export class ConanDatasource extends Datasource { packageName, }: GetReleasesConfig): Promise { const conanPackage = getConanPackage(packageName); - const depName = conanPackage.depName; const userAndChannel = '@' + conanPackage.userAndChannel; if ( is.string(registryUrl) && ensureTrailingSlash(registryUrl) === defaultRegistryUrl ) { - return this.getConanCenterReleases(depName, userAndChannel); + return this.getConanCenterReleases( + conanPackage.conanName, + userAndChannel + ); } - logger.trace({ depName, registryUrl }, 'Looking up conan api dependency'); + logger.trace( + { packageName, registryUrl }, + 'Looking up conan api dependency' + ); if (registryUrl) { const url = ensureTrailingSlash(registryUrl); - const lookupUrl = joinUrlParts(url, `v2/conans/search?q=${depName}`); + const lookupUrl = joinUrlParts( + url, + `v2/conans/search?q=${conanPackage.conanName}` + ); try { const rep = await this.http.getJson(lookupUrl); diff --git a/lib/modules/datasource/conan/types.ts b/lib/modules/datasource/conan/types.ts index 543ff3d6876386..854935c11c2d7b 100644 --- a/lib/modules/datasource/conan/types.ts +++ b/lib/modules/datasource/conan/types.ts @@ -16,6 +16,6 @@ export interface ConanYAML { } export interface ConanPackage { - depName: string; + conanName: string; userAndChannel: string; } diff --git a/lib/modules/datasource/conda/index.spec.ts b/lib/modules/datasource/conda/index.spec.ts index 44235fd2bea0c8..0085c36c69122e 100644 --- a/lib/modules/datasource/conda/index.spec.ts +++ b/lib/modules/datasource/conda/index.spec.ts @@ -5,8 +5,8 @@ import { EXTERNAL_HOST_ERROR } from '../../../constants/error-messages'; import { datasource, defaultRegistryUrl } from './common'; import { CondaDatasource } from './index'; -const depName = 'main/pytest'; -const depUrl = `/${depName}`; +const packageName = 'main/pytest'; +const depUrl = `/${packageName}`; describe('modules/datasource/conda/index', () => { describe('getReleases', () => { @@ -15,7 +15,7 @@ describe('modules/datasource/conda/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -25,7 +25,7 @@ describe('modules/datasource/conda/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -35,7 +35,7 @@ describe('modules/datasource/conda/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -45,7 +45,7 @@ describe('modules/datasource/conda/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -57,7 +57,7 @@ describe('modules/datasource/conda/index', () => { .reply(200, Fixtures.get('pytest.json')); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(94); @@ -67,20 +67,20 @@ describe('modules/datasource/conda/index', () => { const condaDatasource = new CondaDatasource(); const res = await condaDatasource.getReleases({ registryUrl: '', - packageName: depName, + packageName, }); expect(res).toBeNull(); }); it('supports multiple custom datasource urls', async () => { - const depName = 'pytest'; + const packageName = 'pytest'; httpMock .scope('https://api.anaconda.org/package/rapids') - .get(`/${depName}`) + .get(`/${packageName}`) .reply(404); httpMock .scope('https://api.anaconda.org/package/conda-forge') - .get(`/${depName}`) + .get(`/${packageName}`) .reply(200, { html_url: 'http://anaconda.org/anaconda/pytest', dev_url: 'https://github.com/pytest-dev/pytest/', @@ -96,7 +96,7 @@ describe('modules/datasource/conda/index', () => { const res = await getPkgReleases({ ...config, datasource, - depName, + packageName, }); expect(res).toMatchObject({ homepage: 'http://anaconda.org/anaconda/pytest', diff --git a/lib/modules/datasource/cpan/index.spec.ts b/lib/modules/datasource/cpan/index.spec.ts index 1f5f31882c5df3..291da75a49e7e6 100644 --- a/lib/modules/datasource/cpan/index.spec.ts +++ b/lib/modules/datasource/cpan/index.spec.ts @@ -20,7 +20,7 @@ describe('modules/datasource/cpan/index', () => { expect( await getPkgReleases({ datasource: CpanDatasource.id, - depName: 'FooBar', + packageName: 'FooBar', }) ).toBeNull(); }); @@ -30,7 +30,7 @@ describe('modules/datasource/cpan/index', () => { expect( await getPkgReleases({ datasource: CpanDatasource.id, - depName: 'Plack', + packageName: 'Plack', }) ).toBeNull(); }); @@ -40,7 +40,7 @@ describe('modules/datasource/cpan/index', () => { await expect( getPkgReleases({ datasource: CpanDatasource.id, - depName: 'Plack', + packageName: 'Plack', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -50,7 +50,7 @@ describe('modules/datasource/cpan/index', () => { expect( await getPkgReleases({ datasource: CpanDatasource.id, - depName: 'Plack', + packageName: 'Plack', }) ).toBeNull(); }); @@ -66,7 +66,7 @@ describe('modules/datasource/cpan/index', () => { .reply(200, Fixtures.get('Plack.json')); const res = await getPkgReleases({ datasource: CpanDatasource.id, - depName: 'Plack', + packageName: 'Plack', }); expect(res).toMatchObject({ changelogUrl: 'https://metacpan.org/dist/Plack/changes', diff --git a/lib/modules/datasource/crate/index.spec.ts b/lib/modules/datasource/crate/index.spec.ts index c8d0637391734f..4e4e76afbb3d55 100644 --- a/lib/modules/datasource/crate/index.spec.ts +++ b/lib/modules/datasource/crate/index.spec.ts @@ -126,7 +126,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', registryUrls: [], }) ).toBeNull(); @@ -136,7 +136,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', registryUrls: ['3'], }) ).toBeNull(); @@ -148,7 +148,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', registryUrls: ['https://crates.io'], }) ).toBeNull(); @@ -163,7 +163,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', registryUrls: ['https://crates.io'], }) ).toBeNull(); @@ -175,7 +175,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', registryUrls: ['https://crates.io'], }) ).toBeNull(); @@ -186,7 +186,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'some_crate', + packageName: 'some_crate', registryUrls: ['https://crates.io'], }) ).toBeNull(); @@ -197,7 +197,7 @@ describe('modules/datasource/crate/index', () => { await expect( getPkgReleases({ datasource, - depName: 'some_crate', + packageName: 'some_crate', registryUrls: ['https://crates.io'], }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); @@ -208,7 +208,7 @@ describe('modules/datasource/crate/index', () => { expect( await getPkgReleases({ datasource, - depName: 'some_crate', + packageName: 'some_crate', registryUrls: ['https://crates.io'], }) ).toBeNull(); @@ -223,7 +223,7 @@ describe('modules/datasource/crate/index', () => { .reply(200, Fixtures.get('libc')); const res = await getPkgReleases({ datasource, - depName: 'libc', + packageName: 'libc', registryUrls: ['https://crates.io'], }); expect(res).toMatchSnapshot(); @@ -240,7 +240,7 @@ describe('modules/datasource/crate/index', () => { .reply(200, Fixtures.get('amethyst')); const res = await getPkgReleases({ datasource, - depName: 'amethyst', + packageName: 'amethyst', registryUrls: ['https://crates.io'], }); expect(res).toMatchSnapshot(); @@ -254,7 +254,7 @@ describe('modules/datasource/crate/index', () => { const url = 'https://dl.cloudsmith.io/basic/myorg/myrepo/cargo/index.git'; const res = await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); expect(mockClone).toHaveBeenCalledTimes(0); @@ -267,7 +267,7 @@ describe('modules/datasource/crate/index', () => { const url = 'https://dl.cloudsmith.io/basic/myorg/myrepo/cargo/index.git'; const res = await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); expect(mockClone).toHaveBeenCalled(); @@ -282,7 +282,7 @@ describe('modules/datasource/crate/index', () => { const url = 'https://github.com/mcorbin/testregistry'; const res = await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); expect(mockClone).toHaveBeenCalled(); @@ -297,12 +297,12 @@ describe('modules/datasource/crate/index', () => { const url = 'https://github.com/mcorbin/othertestregistry'; await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); expect(mockClone).toHaveBeenCalledTimes(1); @@ -316,19 +316,19 @@ describe('modules/datasource/crate/index', () => { await Promise.all([ getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }), getPkgReleases({ datasource, - depName: 'mypkg-2', + packageName: 'mypkg-2', registryUrls: [url], }), ]); await getPkgReleases({ datasource, - depName: 'mypkg-3', + packageName: 'mypkg-3', registryUrls: [url], }); @@ -342,12 +342,12 @@ describe('modules/datasource/crate/index', () => { const result = await getPkgReleases({ datasource, - depName: 'mypkg', + packageName: 'mypkg', registryUrls: [url], }); const result2 = await getPkgReleases({ datasource, - depName: 'mypkg-2', + packageName: 'mypkg-2', registryUrls: [url], }); diff --git a/lib/modules/datasource/dart-version/index.spec.ts b/lib/modules/datasource/dart-version/index.spec.ts index 798bab2496f07d..ae41cd725dfa84 100644 --- a/lib/modules/datasource/dart-version/index.spec.ts +++ b/lib/modules/datasource/dart-version/index.spec.ts @@ -8,7 +8,7 @@ const baseUrl = 'https://storage.googleapis.com'; const urlPath = '/storage/v1/b/dart-archive/o?delimiter=%2F&prefix=channels%2Fstable%2Frelease%2F&alt=json'; const datasource = DartVersionDatasource.id; -const depName = 'dart'; +const packageName = 'dart'; const channels = ['stable', 'beta', 'dev']; describe('modules/datasource/dart-version/index', () => { @@ -18,7 +18,7 @@ describe('modules/datasource/dart-version/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -28,7 +28,7 @@ describe('modules/datasource/dart-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -38,7 +38,7 @@ describe('modules/datasource/dart-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -55,7 +55,7 @@ describe('modules/datasource/dart-version/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toBeDefined(); diff --git a/lib/modules/datasource/dart/index.spec.ts b/lib/modules/datasource/dart/index.spec.ts index b3472322c6b6a1..06bad8e6f21dc4 100644 --- a/lib/modules/datasource/dart/index.spec.ts +++ b/lib/modules/datasource/dart/index.spec.ts @@ -15,7 +15,7 @@ describe('modules/datasource/dart/index', () => { expect( await getPkgReleases({ datasource: DartDatasource.id, - depName: 'non_sense', + packageName: 'non_sense', }) ).toBeNull(); }); @@ -32,7 +32,7 @@ describe('modules/datasource/dart/index', () => { expect( await getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }) ).toBeNull(); @@ -47,7 +47,7 @@ describe('modules/datasource/dart/index', () => { expect( await getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }) ).toBeNull(); }); @@ -57,7 +57,7 @@ describe('modules/datasource/dart/index', () => { expect( await getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }) ).toBeNull(); }); @@ -67,7 +67,7 @@ describe('modules/datasource/dart/index', () => { await expect( getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -77,7 +77,7 @@ describe('modules/datasource/dart/index', () => { expect( await getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }) ).toBeNull(); }); @@ -86,7 +86,7 @@ describe('modules/datasource/dart/index', () => { httpMock.scope(baseUrl).get('/shared_preferences').reply(200, body); const res = await getPkgReleases({ datasource: DartDatasource.id, - depName: 'shared_preferences', + packageName: 'shared_preferences', }); expect(res).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/docker/index.spec.ts b/lib/modules/datasource/docker/index.spec.ts index 30b17f3afe7d20..9fd3052b56f6b2 100644 --- a/lib/modules/datasource/docker/index.spec.ts +++ b/lib/modules/datasource/docker/index.spec.ts @@ -221,7 +221,7 @@ describe('modules/datasource/docker/index', () => { }) .reply(401); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-new-value' ); expect(res).toBeNull(); @@ -237,7 +237,7 @@ describe('modules/datasource/docker/index', () => { }) .replyWithError('error'); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-new-value' ); expect(res).toBeNull(); @@ -251,7 +251,7 @@ describe('modules/datasource/docker/index', () => { .head('/library/some-dep/manifests/some-new-value') .reply(200, undefined, { 'docker-content-digest': '' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-new-value' ); expect(res).toBeNull(); @@ -277,7 +277,7 @@ describe('modules/datasource/docker/index', () => { hostRules.find.mockReturnValue({}); const res = await getDigest({ datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', }); expect(res).toBe('some-digest'); }); @@ -326,7 +326,7 @@ describe('modules/datasource/docker/index', () => { .twice() .reply(200, { token: 'some-token' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-new-value' ); expect(res).toBe( @@ -344,7 +344,7 @@ describe('modules/datasource/docker/index', () => { hostRules.find.mockReturnValue({ insecureRegistry: true }); const res = await getDigest({ datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', }); expect(res).toBe('some-digest'); }); @@ -364,7 +364,7 @@ describe('modules/datasource/docker/index', () => { ) .reply(200, '', { 'docker-content-digest': 'some-digest' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-tag' ); expect(res).toBe('some-digest'); @@ -380,7 +380,7 @@ describe('modules/datasource/docker/index', () => { .head('/library/some-dep/manifests/some-tag') .reply(403); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-tag' ); expect(res).toBeNull(); @@ -405,7 +405,7 @@ describe('modules/datasource/docker/index', () => { await getDigest( { datasource: 'docker', - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }, 'some-tag' ) @@ -444,7 +444,7 @@ describe('modules/datasource/docker/index', () => { await getDigest( { datasource: 'docker', - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }, 'some-tag' ) @@ -477,7 +477,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }, 'some-tag' ); @@ -494,7 +494,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }, 'some-tag' ); @@ -510,7 +510,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }, 'some-tag' ); @@ -527,7 +527,7 @@ describe('modules/datasource/docker/index', () => { .head('/library/some-dep/manifests/some-new-value') .reply(200, {}, { 'docker-content-digest': 'some-digest' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-dep' }, + { datasource: 'docker', packageName: 'some-dep' }, 'some-new-value' ); expect(res).toBe('some-digest'); @@ -548,7 +548,7 @@ describe('modules/datasource/docker/index', () => { .get('/token?service=&scope=repository:library/some-other-dep:pull') .reply(200, { access_token: 'test' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-other-dep' }, + { datasource: 'docker', packageName: 'some-other-dep' }, '8.0.0-alpine' ); expect(res).toBe('some-digest'); @@ -571,7 +571,7 @@ describe('modules/datasource/docker/index', () => { ) .reply(200, { access_token: 'test' }); const res = await getDigest( - { datasource: 'docker', depName: 'some-other-dep' }, + { datasource: 'docker', packageName: 'some-other-dep' }, '8.0.0-alpine' ); expect(res).toBe('some-digest'); @@ -580,14 +580,14 @@ describe('modules/datasource/docker/index', () => { it('should throw error for 429', async () => { httpMock.scope(baseUrl).get('/').replyWithError({ statusCode: 429 }); await expect( - getDigest({ datasource: 'docker', depName: 'some-dep' }, 'latest') + getDigest({ datasource: 'docker', packageName: 'some-dep' }, 'latest') ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); it('should throw error for 5xx', async () => { httpMock.scope(baseUrl).get('/').replyWithError({ statusCode: 504 }); await expect( - getDigest({ datasource: 'docker', depName: 'some-dep' }, 'latest') + getDigest({ datasource: 'docker', packageName: 'some-dep' }, 'latest') ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -669,7 +669,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -762,7 +762,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -839,7 +839,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -906,7 +906,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -991,7 +991,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -1044,7 +1044,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest, }, 'some-new-value' @@ -1077,7 +1077,7 @@ describe('modules/datasource/docker/index', () => { const res = await getDigest( { datasource: 'docker', - depName: 'some-dep', + packageName: 'some-dep', currentDigest: 'sha256:0101010101010101010101010101010101010101010101010101010101010101', }, @@ -1097,7 +1097,7 @@ describe('modules/datasource/docker/index', () => { .reply(403); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'node', + packageName: 'node', registryUrls: ['https://docker.io'], }); expect(res).toBeNull(); @@ -1127,14 +1127,14 @@ describe('modules/datasource/docker/index', () => { .reply(200, { tags: ['latest'] }, {}); const config = { datasource: DockerDatasource.id, - depName: 'node', + packageName: 'node', registryUrls: ['https://registry.company.com'], }; const res = await getPkgReleases(config); expect(res?.releases).toHaveLength(1); }); - it('uses custom registry in depName', async () => { + it('uses custom registry in packageName', async () => { const tags = ['1.0.0']; httpMock .scope('https://registry.company.com/v2') @@ -1148,7 +1148,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, '', {}); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res?.releases).toHaveLength(1); }); @@ -1171,7 +1171,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, '', {}); const config = { datasource: DockerDatasource.id, - depName: 'bitnami/redis', + packageName: 'bitnami/redis', registryUrls: ['https://quay.io'], }; const res = await getPkgReleases(config); @@ -1187,7 +1187,7 @@ describe('modules/datasource/docker/index', () => { .reply(500); const config = { datasource: DockerDatasource.id, - depName: 'bitnami/redis', + packageName: 'bitnami/redis', registryUrls: ['https://quay.io'], }; await expect(getPkgReleases(config)).rejects.toThrow(EXTERNAL_HOST_ERROR); @@ -1211,7 +1211,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, '', {}); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'org.jfrog.io/virtual-mirror/node', + packageName: 'org.jfrog.io/virtual-mirror/node', }); expect(res?.releases).toHaveLength(1); }); @@ -1232,7 +1232,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', + packageName: '123456789.dkr.ecr.us-east-1.amazonaws.com/node', }) ).toEqual({ registryUrl: 'https://123456789.dkr.ecr.us-east-1.amazonaws.com', @@ -1284,7 +1284,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'public.ecr.aws/amazonlinux/amazonlinux', + packageName: 'public.ecr.aws/amazonlinux/amazonlinux', }) ).toEqual({ registryUrl: 'https://public.ecr.aws', @@ -1338,7 +1338,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toEqual({ registryUrl: 'https://ecr-proxy.company.com', @@ -1373,7 +1373,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1404,7 +1404,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1427,7 +1427,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1456,7 +1456,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1477,7 +1477,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1500,7 +1500,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1527,7 +1527,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1555,7 +1555,7 @@ describe('modules/datasource/docker/index', () => { expect( await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ecr-proxy.company.com/node', + packageName: 'ecr-proxy.company.com/node', }) ).toBeNull(); }); @@ -1584,7 +1584,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, { token: 'test' }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'node', + packageName: 'node', }); expect(res?.releases).toHaveLength(1); }); @@ -1612,7 +1612,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, { token: 'test' }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'docker.io/node', + packageName: 'docker.io/node', }); expect(res?.releases).toHaveLength(1); }); @@ -1638,7 +1638,7 @@ describe('modules/datasource/docker/index', () => { .reply(200); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'k8s.gcr.io/kubernetes-dashboard-amd64', + packageName: 'k8s.gcr.io/kubernetes-dashboard-amd64', }); expect(res?.releases).toHaveLength(1); }); @@ -1652,7 +1652,7 @@ describe('modules/datasource/docker/index', () => { .replyWithError('error'); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'my/node', + packageName: 'my/node', }); expect(res).toBeNull(); }); @@ -1677,7 +1677,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, { token: 'some-token ' }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'my/node', + packageName: 'my/node', registryUrls: ['https://index.docker.io/'], }); expect(res?.releases).toHaveLength(1); @@ -1693,7 +1693,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'node', + packageName: 'node', }); expect(res).toBeNull(); }); @@ -1737,7 +1737,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1788,7 +1788,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, {}); // DockerDatasource.getLabels() inner response const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1842,7 +1842,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1869,7 +1869,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1893,7 +1893,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1914,7 +1914,7 @@ describe('modules/datasource/docker/index', () => { .reply(200, {}); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -1955,7 +1955,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -2000,7 +2000,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -2030,7 +2030,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -2080,7 +2080,7 @@ describe('modules/datasource/docker/index', () => { }); const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'registry.company.com/node', + packageName: 'registry.company.com/node', }); expect(res).toStrictEqual({ registryUrl: 'https://registry.company.com', @@ -2136,7 +2136,7 @@ describe('modules/datasource/docker/index', () => { const res = await getPkgReleases({ datasource: DockerDatasource.id, - depName: 'ghcr.io/visualon/drone-git', + packageName: 'ghcr.io/visualon/drone-git', }); expect(res).toStrictEqual({ registryUrl: 'https://ghcr.io', diff --git a/lib/modules/datasource/dotnet-version/index.spec.ts b/lib/modules/datasource/dotnet-version/index.spec.ts index a0e3e0e18891be..d6bc44a8790aec 100644 --- a/lib/modules/datasource/dotnet-version/index.spec.ts +++ b/lib/modules/datasource/dotnet-version/index.spec.ts @@ -19,7 +19,7 @@ describe('modules/datasource/dotnet-version/index', () => { expect( await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'non-dotnet', + packageName: 'non-dotnet', }) ).toBeNull(); }); @@ -30,7 +30,7 @@ describe('modules/datasource/dotnet-version/index', () => { expect( await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).toBeNull(); }); @@ -46,7 +46,7 @@ describe('modules/datasource/dotnet-version/index', () => { expect( await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).toBeNull(); }); @@ -57,7 +57,7 @@ describe('modules/datasource/dotnet-version/index', () => { await expect( getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -73,7 +73,7 @@ describe('modules/datasource/dotnet-version/index', () => { await expect( getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -84,7 +84,7 @@ describe('modules/datasource/dotnet-version/index', () => { expect( await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).toBeNull(); }); @@ -100,7 +100,7 @@ describe('modules/datasource/dotnet-version/index', () => { expect( await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }) ).toBeNull(); }); @@ -121,7 +121,7 @@ describe('modules/datasource/dotnet-version/index', () => { const res = await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', }); expect(res).toBeDefined(); @@ -155,7 +155,7 @@ describe('modules/datasource/dotnet-version/index', () => { const res = await getPkgReleases({ datasource: DotnetVersionDatasource.id, - depName: 'dotnet-runtime', + packageName: 'dotnet-runtime', }); expect(res).toBeDefined(); diff --git a/lib/modules/datasource/flutter-version/index.spec.ts b/lib/modules/datasource/flutter-version/index.spec.ts index bd217e16e04361..8e333b66583e43 100644 --- a/lib/modules/datasource/flutter-version/index.spec.ts +++ b/lib/modules/datasource/flutter-version/index.spec.ts @@ -7,7 +7,7 @@ import { FlutterVersionDatasource } from '.'; const baseUrl = 'https://storage.googleapis.com'; const urlPath = '/flutter_infra_release/releases/releases_linux.json'; const datasource = FlutterVersionDatasource.id; -const depName = 'flutter'; +const packageName = 'flutter'; describe('modules/datasource/flutter-version/index', () => { describe('getReleases', () => { @@ -16,7 +16,7 @@ describe('modules/datasource/flutter-version/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -26,7 +26,7 @@ describe('modules/datasource/flutter-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -36,7 +36,7 @@ describe('modules/datasource/flutter-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -48,7 +48,7 @@ describe('modules/datasource/flutter-version/index', () => { .reply(200, Fixtures.get('index.json')); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(31); diff --git a/lib/modules/datasource/galaxy-collection/index.spec.ts b/lib/modules/datasource/galaxy-collection/index.spec.ts index 019ccaa90e54b8..5c9979779e1ca8 100644 --- a/lib/modules/datasource/galaxy-collection/index.spec.ts +++ b/lib/modules/datasource/galaxy-collection/index.spec.ts @@ -29,7 +29,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: 'foo.bar', + packageName: 'foo.bar', }) ).toBeNull(); }); @@ -39,7 +39,7 @@ describe('modules/datasource/galaxy-collection/index', () => { await expect( getPkgReleases({ datasource, - depName: 'foo.bar', + packageName: 'foo.bar', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -52,7 +52,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: 'community.kubernetes', + packageName: 'community.kubernetes', }) ).toBeNull(); }); @@ -67,7 +67,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: 'community.kubernetes', + packageName: 'community.kubernetes', }) ).toBeNull(); }); @@ -82,7 +82,7 @@ describe('modules/datasource/galaxy-collection/index', () => { await expect( getPkgReleases({ datasource, - depName: 'community.kubernetes', + packageName: 'community.kubernetes', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -103,7 +103,7 @@ describe('modules/datasource/galaxy-collection/index', () => { const res = await getPkgReleases({ datasource, - depName: 'community.kubernetes', + packageName: 'community.kubernetes', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -115,7 +115,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: '', + packageName: '', }) ).toBeNull(); }); @@ -124,7 +124,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: '', + packageName: '', }) ).toBeNull(); }); @@ -137,7 +137,7 @@ describe('modules/datasource/galaxy-collection/index', () => { expect( await getPkgReleases({ datasource, - depName: 'foo.bar', + packageName: 'foo.bar', }) ).toBeNull(); }); @@ -157,7 +157,7 @@ describe('modules/datasource/galaxy-collection/index', () => { .reply(200, communityKubernetesDetails0111); const res = await getPkgReleases({ datasource, - depName: 'community.kubernetes', + packageName: 'community.kubernetes', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); diff --git a/lib/modules/datasource/galaxy/index.spec.ts b/lib/modules/datasource/galaxy/index.spec.ts index 80ca4b8ca298a4..7654329befef6c 100644 --- a/lib/modules/datasource/galaxy/index.spec.ts +++ b/lib/modules/datasource/galaxy/index.spec.ts @@ -16,7 +16,7 @@ describe('modules/datasource/galaxy/index', () => { expect( await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', }) ).toBeNull(); }); @@ -29,7 +29,7 @@ describe('modules/datasource/galaxy/index', () => { expect( await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', }) ).toBeNull(); }); @@ -42,7 +42,7 @@ describe('modules/datasource/galaxy/index', () => { expect( await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'non_existent_crate', + packageName: 'non_existent_crate', }) ).toBeNull(); }); @@ -55,7 +55,7 @@ describe('modules/datasource/galaxy/index', () => { expect( await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'some_crate', + packageName: 'some_crate', }) ).toBeNull(); }); @@ -68,7 +68,7 @@ describe('modules/datasource/galaxy/index', () => { expect( await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'some_crate', + packageName: 'some_crate', }) ).toBeNull(); }); @@ -80,7 +80,7 @@ describe('modules/datasource/galaxy/index', () => { .reply(200, Fixtures.get('timezone')); const res = await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'yatesr.timezone', + packageName: 'yatesr.timezone', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -94,7 +94,7 @@ describe('modules/datasource/galaxy/index', () => { .reply(200, Fixtures.get('empty')); const res = await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'foo.bar', + packageName: 'foo.bar', }); expect(res).toBeNull(); }); @@ -107,7 +107,7 @@ describe('modules/datasource/galaxy/index', () => { await expect( getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'some_crate', + packageName: 'some_crate', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -119,7 +119,7 @@ describe('modules/datasource/galaxy/index', () => { .reply(404); const res = await getPkgReleases({ datasource: GalaxyDatasource.id, - depName: 'foo.bar', + packageName: 'foo.bar', }); expect(res).toBeNull(); }); diff --git a/lib/modules/datasource/git-refs/index.spec.ts b/lib/modules/datasource/git-refs/index.spec.ts index 5c1f47ae5913f3..75405d464710de 100644 --- a/lib/modules/datasource/git-refs/index.spec.ts +++ b/lib/modules/datasource/git-refs/index.spec.ts @@ -6,7 +6,7 @@ import { GitRefsDatasource } from '.'; jest.mock('simple-git'); const simpleGit: jest.Mock> = _simpleGit as never; -const depName = 'https://github.com/example/example.git'; +const packageName = 'https://github.com/example/example.git'; const lsRemote1 = Fixtures.get('ls-remote-1.txt'); @@ -22,7 +22,7 @@ describe('modules/datasource/git-refs/index', () => { }); const versions = await getPkgReleases({ datasource, - depName, + packageName, }); expect(versions).toBeNull(); }); @@ -35,7 +35,7 @@ describe('modules/datasource/git-refs/index', () => { }); const { releases } = (await getPkgReleases({ datasource, - depName, + packageName, }))!; expect(releases).toBeEmpty(); }); @@ -48,7 +48,7 @@ describe('modules/datasource/git-refs/index', () => { }); const versions = await getPkgReleases({ datasource, - depName, + packageName, }); expect(versions).toBeNull(); }); @@ -62,7 +62,7 @@ describe('modules/datasource/git-refs/index', () => { const versions = await getPkgReleases({ datasource, - depName, + packageName, }); expect(versions).toMatchSnapshot(); const result = versions?.releases.map((x) => x.version).sort(); diff --git a/lib/modules/datasource/git-refs/readme.md b/lib/modules/datasource/git-refs/readme.md index b0a9b2d27a8402..86d27e39bb9e8d 100644 --- a/lib/modules/datasource/git-refs/readme.md +++ b/lib/modules/datasource/git-refs/readme.md @@ -1,7 +1,7 @@ This datasource can be used in combination with [regex managers](https://docs.renovatebot.com/modules/manager/regex/) to keep dependencies up-to-date which are not specifically supported by Renovate. This datasource returns a reference from a Git repository. -The `depName` (or `packageName` if in use) must be a fully qualified domain name. +The `packageName` must be a fully qualified domain name. To fetch the latest digest of a reference instead of the named reference, specify the reference as the `currentValue` and match on the `currentDigest`. **Usage example** diff --git a/lib/modules/datasource/git-tags/index.spec.ts b/lib/modules/datasource/git-tags/index.spec.ts index d47c6b12e9ed5a..a14744c6f7d6af 100644 --- a/lib/modules/datasource/git-tags/index.spec.ts +++ b/lib/modules/datasource/git-tags/index.spec.ts @@ -6,7 +6,7 @@ import { GitTagsDatasource } from '.'; jest.mock('simple-git'); const simpleGit: jest.Mock> = _simpleGit as never; -const depName = 'https://github.com/example/example.git'; +const packageName = 'https://github.com/example/example.git'; const lsRemote1 = Fixtures.get('ls-remote-1.txt', '../git-refs'); @@ -21,7 +21,7 @@ describe('modules/datasource/git-tags/index', () => { return Promise.resolve('') as Response; }, }); - const versions = await getPkgReleases({ datasource, depName }); + const versions = await getPkgReleases({ datasource, packageName }); expect(versions).toBeNull(); }); @@ -31,7 +31,7 @@ describe('modules/datasource/git-tags/index', () => { throw new Error(); }, }); - const versions = await getPkgReleases({ datasource, depName }); + const versions = await getPkgReleases({ datasource, packageName }); expect(versions).toBeNull(); }); @@ -44,7 +44,7 @@ describe('modules/datasource/git-tags/index', () => { const versions = await getPkgReleases({ datasource, - depName, + packageName, }); expect(versions).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/github-releases/index.spec.ts b/lib/modules/datasource/github-releases/index.spec.ts index 2491c1a71f64c1..f90efc018f4bfa 100644 --- a/lib/modules/datasource/github-releases/index.spec.ts +++ b/lib/modules/datasource/github-releases/index.spec.ts @@ -66,7 +66,7 @@ describe('modules/datasource/github-releases/index', () => { const res = await getPkgReleases({ datasource: GithubReleasesDatasource.id, - depName: 'some/dep', + packageName: 'some/dep', }); expect(res).toMatchObject({ @@ -86,15 +86,15 @@ describe('modules/datasource/github-releases/index', () => { }); describe('getDigest', () => { - const depName = 'some/dep'; + const packageName = 'some/dep'; const currentValue = 'v1.0.0'; const currentDigest = 'v1.0.0-digest'; - const releaseMock = new GitHubReleaseMocker(githubApiHost, depName); + const releaseMock = new GitHubReleaseMocker(githubApiHost, packageName); it('requires currentDigest', async () => { const digest = await getDigest( - { datasource: GithubReleasesDatasource.id, depName }, + { datasource: GithubReleasesDatasource.id, packageName }, currentValue ); expect(digest).toBeNull(); @@ -104,7 +104,7 @@ describe('modules/datasource/github-releases/index', () => { const digest = await getDigest( { datasource: GithubReleasesDatasource.id, - depName, + packageName, currentDigest, }, currentValue @@ -123,7 +123,7 @@ describe('modules/datasource/github-releases/index', () => { const digest = await getDigest( { datasource: GithubReleasesDatasource.id, - depName, + packageName, currentValue, currentDigest, }, @@ -139,7 +139,7 @@ describe('modules/datasource/github-releases/index', () => { const digest = await getDigest( { datasource: GithubReleasesDatasource.id, - depName, + packageName, currentValue, currentDigest, }, diff --git a/lib/modules/datasource/github-tags/index.spec.ts b/lib/modules/datasource/github-tags/index.spec.ts index 948a81857263aa..72ae3f11f2421b 100644 --- a/lib/modules/datasource/github-tags/index.spec.ts +++ b/lib/modules/datasource/github-tags/index.spec.ts @@ -114,7 +114,7 @@ describe('modules/datasource/github-tags/index', () => { }); describe('getReleases', () => { - const depName = 'some/dep2'; + const packageName = 'some/dep2'; it('returns tags', async () => { jest.spyOn(githubGraphql, 'queryTags').mockResolvedValueOnce([ @@ -152,7 +152,7 @@ describe('modules/datasource/github-tags/index', () => { }, ]); - const res = await getPkgReleases({ datasource: github.id, depName }); + const res = await getPkgReleases({ datasource: github.id, packageName }); expect(res).toEqual({ registryUrl: 'https://github.com', diff --git a/lib/modules/datasource/gitlab-packages/index.spec.ts b/lib/modules/datasource/gitlab-packages/index.spec.ts index 697c2123c74ee3..366fd9a7cc51c7 100644 --- a/lib/modules/datasource/gitlab-packages/index.spec.ts +++ b/lib/modules/datasource/gitlab-packages/index.spec.ts @@ -39,7 +39,7 @@ describe('modules/datasource/gitlab-packages/index', () => { const res = await getPkgReleases({ datasource, registryUrls: ['https://gitlab.com'], - depName: 'user/project1:mypkg', + packageName: 'user/project1:mypkg', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(3); @@ -58,7 +58,7 @@ describe('modules/datasource/gitlab-packages/index', () => { await getPkgReleases({ datasource, registryUrls: ['https://gitlab.com'], - depName: 'user/project1:mypkg', + packageName: 'user/project1:mypkg', }) ).toBeNull(); }); @@ -76,7 +76,7 @@ describe('modules/datasource/gitlab-packages/index', () => { await getPkgReleases({ datasource, registryUrls: ['https://gitlab.com'], - depName: 'user/project1:mypkg', + packageName: 'user/project1:mypkg', }) ).toBeNull(); }); @@ -94,7 +94,7 @@ describe('modules/datasource/gitlab-packages/index', () => { getPkgReleases({ datasource, registryUrls: ['https://gitlab.com'], - depName: 'user/project1:mypkg', + packageName: 'user/project1:mypkg', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); diff --git a/lib/modules/datasource/gitlab-packages/readme.md b/lib/modules/datasource/gitlab-packages/readme.md index e5fc0636d09a5e..54388f498c83ce 100644 --- a/lib/modules/datasource/gitlab-packages/readme.md +++ b/lib/modules/datasource/gitlab-packages/readme.md @@ -1,6 +1,6 @@ [GitLab Packages API](https://docs.gitlab.com/ee/api/packages.html) supports looking up package versions from [all types of packages registry supported by GitLab](https://docs.gitlab.com/ee/user/packages/package_registry/index.html) and can be used in combination with [regex managers](https://docs.renovatebot.com/modules/manager/regex/) to keep dependencies up-to-date which are not specifically supported by Renovate. -To specify which specific repository should be queried when looking up a package, the `depName` should be formed with the project path first, then a `:` and finally the package name. +To specify which specific repository should be queried when looking up a package, the `packageName` should be formed with the project path first, then a `:` and finally the package name. As an example, `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list:@gitlab-org/nk-js` would look for the`@gitlab-org/nk-js` packages in the generic packages repository of the `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list` project. diff --git a/lib/modules/datasource/gitlab-releases/index.spec.ts b/lib/modules/datasource/gitlab-releases/index.spec.ts index e0480cd0c7f5d2..2a1d498aa9c3b9 100644 --- a/lib/modules/datasource/gitlab-releases/index.spec.ts +++ b/lib/modules/datasource/gitlab-releases/index.spec.ts @@ -23,7 +23,7 @@ describe('modules/datasource/gitlab-releases/index', () => { const res = await getPkgReleases({ datasource: GitlabReleasesDatasource.id, registryUrls: ['https://gitlab.company.com'], - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(2); @@ -36,7 +36,7 @@ describe('modules/datasource/gitlab-releases/index', () => { .reply(200, body); const res = await getPkgReleases({ datasource: GitlabReleasesDatasource.id, - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(2); @@ -50,7 +50,7 @@ describe('modules/datasource/gitlab-releases/index', () => { expect( await getPkgReleases({ datasource: GitlabReleasesDatasource.id, - depName: 'some/dep2', + packageName: 'some/dep2', }) ).toBeNull(); }); diff --git a/lib/modules/datasource/gitlab-releases/readme.md b/lib/modules/datasource/gitlab-releases/readme.md index ae31ae31a00776..6b5ffbaa77cebb 100644 --- a/lib/modules/datasource/gitlab-releases/readme.md +++ b/lib/modules/datasource/gitlab-releases/readme.md @@ -1,6 +1,6 @@ [GitLab Releases API](https://docs.gitlab.com/ee/api/releases/) supports looking up [releases supported by GitLab](https://docs.gitlab.com/ee/user/project/releases/) and can be used in combination with [regex managers](https://docs.renovatebot.com/modules/manager/regex/) to keep dependencies up-to-date which are not specifically supported by Renovate. -To specify which specific repository should be queried when looking up a package, the `depName` should be set to the project path. +To specify which specific repository should be queried when looking up a package, the `packageName` should be set to the project path. As an example, `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list` would look for releases in the `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list` project. diff --git a/lib/modules/datasource/gitlab-tags/index.spec.ts b/lib/modules/datasource/gitlab-tags/index.spec.ts index 49467bd9b4263c..f9b333fe7e4587 100644 --- a/lib/modules/datasource/gitlab-tags/index.spec.ts +++ b/lib/modules/datasource/gitlab-tags/index.spec.ts @@ -29,7 +29,7 @@ describe('modules/datasource/gitlab-tags/index', () => { const res = await getPkgReleases({ datasource, registryUrls: ['https://gitlab.company.com/api/v4/'], - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(3); @@ -58,7 +58,7 @@ describe('modules/datasource/gitlab-tags/index', () => { const res = await getPkgReleases({ datasource, registryUrls: ['https://my.company.com/gitlab'], - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(3); @@ -72,7 +72,7 @@ describe('modules/datasource/gitlab-tags/index', () => { .reply(200, body); const res = await getPkgReleases({ datasource, - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(2); @@ -94,7 +94,7 @@ describe('modules/datasource/gitlab-tags/index', () => { const res = await getDigest({ datasource, registryUrls: ['https://gitlab.company.com/api/v4/'], - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toBe(digest); }); @@ -112,7 +112,7 @@ describe('modules/datasource/gitlab-tags/index', () => { { datasource, registryUrls: ['https://gitlab.company.com/api/v4/'], - depName: 'some/dep2', + packageName: 'some/dep2', }, 'branch' ); @@ -127,7 +127,7 @@ describe('modules/datasource/gitlab-tags/index', () => { const res = await getDigest({ datasource, registryUrls: ['https://gitlab.company.com/api/v4/'], - depName: 'some/dep2', + packageName: 'some/dep2', }); expect(res).toBeNull(); }); @@ -141,7 +141,7 @@ describe('modules/datasource/gitlab-tags/index', () => { { datasource, registryUrls: ['https://gitlab.company.com/api/v4/'], - depName: 'some/dep2', + packageName: 'some/dep2', }, 'unknown-branch' ); diff --git a/lib/modules/datasource/gitlab-tags/readme.md b/lib/modules/datasource/gitlab-tags/readme.md index 881a9ebda937a3..5f153fddcf46c0 100644 --- a/lib/modules/datasource/gitlab-tags/readme.md +++ b/lib/modules/datasource/gitlab-tags/readme.md @@ -1,6 +1,6 @@ [GitLab Tags API](https://docs.gitlab.com/ee/api/tags.html) supports looking up [Git tags](https://docs.gitlab.com/ee/topics/git/tags.html#tags) and can be used in combination with [regex managers](https://docs.renovatebot.com/modules/manager/regex/) to keep dependencies up-to-date which are not specifically supported by Renovate. -To specify which specific repository should be queried when looking up a package, the `depName` should be set to the project path. +To specify which specific repository should be queried when looking up a package, the `packageName` should be set to the project path. As an example, `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list` would look for releases in the `gitlab-org/ci-cd/package-stage/feature-testing/new-packages-list` project. diff --git a/lib/modules/datasource/golang-version/index.spec.ts b/lib/modules/datasource/golang-version/index.spec.ts index 03e876758e0f7a..092600d22f5719 100644 --- a/lib/modules/datasource/golang-version/index.spec.ts +++ b/lib/modules/datasource/golang-version/index.spec.ts @@ -23,7 +23,7 @@ describe('modules/datasource/golang-version/index', () => { .reply(200, golangReleasesContent); const res = await getPkgReleases({ datasource, - depName: 'golang', + packageName: 'golang', }); expect(res?.releases).toHaveLength(132); expect(res?.releases[0]).toEqual({ @@ -44,7 +44,7 @@ describe('modules/datasource/golang-version/index', () => { const res = await getPkgReleases({ ...config, datasource, - depName: 'golang', + packageName: 'golang', }); expect(res?.releases).toHaveLength(132); expect(res?.releases[0]).toEqual({ @@ -61,7 +61,7 @@ describe('modules/datasource/golang-version/index', () => { await expect( getPkgReleases({ datasource, - depName: 'golang', + packageName: 'golang', }) ).rejects.toThrow(ExternalHostError); }); @@ -74,7 +74,7 @@ describe('modules/datasource/golang-version/index', () => { await expect( getPkgReleases({ datasource, - depName: 'golang', + packageName: 'golang', }) ).rejects.toThrow(ExternalHostError); }); @@ -85,7 +85,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(200, {}); await expect( - getPkgReleases({ datasource, depName: 'golang' }) + getPkgReleases({ datasource, packageName: 'golang' }) ).rejects.toThrow(ExternalHostError); }); @@ -95,7 +95,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(200, golangReleasesInvalidContent3); await expect( - getPkgReleases({ datasource, depName: 'golang' }) + getPkgReleases({ datasource, packageName: 'golang' }) ).rejects.toThrow(ExternalHostError); }); @@ -105,7 +105,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(200, golangReleasesInvalidContent4); await expect( - getPkgReleases({ datasource, depName: 'golang' }) + getPkgReleases({ datasource, packageName: 'golang' }) ).rejects.toThrow(ExternalHostError); }); @@ -115,7 +115,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(404); expect( - await getPkgReleases({ datasource, depName: 'golang' }) + await getPkgReleases({ datasource, packageName: 'golang' }) ).toBeNull(); }); @@ -125,7 +125,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(200, golangReleasesInvalidContent5); await expect( - getPkgReleases({ datasource, depName: 'golang' }) + getPkgReleases({ datasource, packageName: 'golang' }) ).rejects.toThrow(ExternalHostError); }); @@ -135,7 +135,7 @@ describe('modules/datasource/golang-version/index', () => { .get('/golang/website/HEAD/internal/history/release.go') .reply(200, golangReleasesInvalidContent6); await expect( - getPkgReleases({ datasource, depName: 'golang' }) + getPkgReleases({ datasource, packageName: 'golang' }) ).rejects.toThrow(ExternalHostError); }); }); diff --git a/lib/modules/datasource/gradle-version/index.spec.ts b/lib/modules/datasource/gradle-version/index.spec.ts index 37afff51b6317b..6bcd65dec8ad99 100644 --- a/lib/modules/datasource/gradle-version/index.spec.ts +++ b/lib/modules/datasource/gradle-version/index.spec.ts @@ -18,7 +18,7 @@ describe('modules/datasource/gradle-version/index', () => { config = { datasource, versioning, - depName: 'abc', + packageName: 'abc', }; }); diff --git a/lib/modules/datasource/helm/index.spec.ts b/lib/modules/datasource/helm/index.spec.ts index 3b75c57e6b82aa..c4dc79ae968b82 100644 --- a/lib/modules/datasource/helm/index.spec.ts +++ b/lib/modules/datasource/helm/index.spec.ts @@ -17,7 +17,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: undefined as never, // #7154 + packageName: undefined as never, // #7154 registryUrls: ['https://example-repository.com'], }) ).toBeNull(); @@ -32,7 +32,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'some_chart', + packageName: 'some_chart', registryUrls: [], }) ).toBeNull(); @@ -46,7 +46,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'non_existent_chart', + packageName: 'non_existent_chart', registryUrls: ['https://example-repository.com'], }) ).toBeNull(); @@ -60,7 +60,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'non_existent_chart', + packageName: 'non_existent_chart', registryUrls: ['https://example-repository.com'], }) ).toBeNull(); @@ -74,7 +74,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'some_chart', + packageName: 'some_chart', registryUrls: ['https://example-repository.com'], }) ).toBeNull(); @@ -88,7 +88,7 @@ describe('modules/datasource/helm/index', () => { await expect( getPkgReleases({ datasource: HelmDatasource.id, - depName: 'some_chart', + packageName: 'some_chart', registryUrls: ['https://example-repository.com'], }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); @@ -102,7 +102,7 @@ describe('modules/datasource/helm/index', () => { expect( await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'some_chart', + packageName: 'some_chart', registryUrls: ['https://example-repository.com'], }) ).toBeNull(); @@ -115,7 +115,7 @@ describe('modules/datasource/helm/index', () => { .reply(200, '# A comment'); const releases = await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'non_existent_chart', + packageName: 'non_existent_chart', registryUrls: ['https://example-repository.com'], }); expect(releases).toBeNull(); @@ -134,7 +134,7 @@ describe('modules/datasource/helm/index', () => { .reply(200, res); const releases = await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'non_existent_chart', + packageName: 'non_existent_chart', registryUrls: ['https://example-repository.com'], }); expect(releases).toBeNull(); @@ -147,7 +147,7 @@ describe('modules/datasource/helm/index', () => { .reply(200, indexYaml); const releases = await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'non_existent_chart', + packageName: 'non_existent_chart', registryUrls: ['https://example-repository.com'], }); expect(releases).toBeNull(); @@ -160,7 +160,7 @@ describe('modules/datasource/helm/index', () => { .reply(200, indexYaml); const releases = await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'ambassador', + packageName: 'ambassador', registryUrls: ['https://example-repository.com'], }); expect(releases).not.toBeNull(); @@ -174,7 +174,7 @@ describe('modules/datasource/helm/index', () => { .reply(200, indexYaml); const res = await getPkgReleases({ datasource: HelmDatasource.id, - depName: 'ambassador', + packageName: 'ambassador', registryUrls: ['https://example-repository.com/subdir'], }); diff --git a/lib/modules/datasource/hex/index.spec.ts b/lib/modules/datasource/hex/index.spec.ts index 1e8401d8cfa0c7..609220fc7a5055 100644 --- a/lib/modules/datasource/hex/index.spec.ts +++ b/lib/modules/datasource/hex/index.spec.ts @@ -29,7 +29,7 @@ describe('modules/datasource/hex/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_package', + packageName: 'non_existent_package', }) ).toBeNull(); }); @@ -42,7 +42,7 @@ describe('modules/datasource/hex/index', () => { expect( await getPkgReleases({ datasource, - depName: 'non_existent_package', + packageName: 'non_existent_package', }) ).toBeNull(); }); @@ -50,35 +50,35 @@ describe('modules/datasource/hex/index', () => { it('returns null for 404', async () => { httpMock.scope(baseUrl).get('/packages/some_package').reply(404); expect( - await getPkgReleases({ datasource, depName: 'some_package' }) + await getPkgReleases({ datasource, packageName: 'some_package' }) ).toBeNull(); }); it('returns null for 401', async () => { httpMock.scope(baseUrl).get('/packages/some_package').reply(401); expect( - await getPkgReleases({ datasource, depName: 'some_package' }) + await getPkgReleases({ datasource, packageName: 'some_package' }) ).toBeNull(); }); it('throws for 429', async () => { httpMock.scope(baseUrl).get('/packages/some_crate').reply(429); await expect( - getPkgReleases({ datasource, depName: 'some_crate' }) + getPkgReleases({ datasource, packageName: 'some_crate' }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); it('throws for 5xx', async () => { httpMock.scope(baseUrl).get('/packages/some_crate').reply(502); await expect( - getPkgReleases({ datasource, depName: 'some_crate' }) + getPkgReleases({ datasource, packageName: 'some_crate' }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); it('returns null for unknown error', async () => { httpMock.scope(baseUrl).get('/packages/some_package').replyWithError(''); expect( - await getPkgReleases({ datasource, depName: 'some_package' }) + await getPkgReleases({ datasource, packageName: 'some_package' }) ).toBeNull(); }); @@ -99,7 +99,7 @@ describe('modules/datasource/hex/index', () => { const res = await getPkgReleases({ datasource, - depName: 'certifi', + packageName: 'certifi', }); expect(res).toBeNull(); @@ -112,7 +112,7 @@ describe('modules/datasource/hex/index', () => { .reply(200, certifiResponse); const res = await getPkgReleases({ datasource, - depName: 'certifi', + packageName: 'certifi', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -127,7 +127,7 @@ describe('modules/datasource/hex/index', () => { hostRules.find.mockReturnValueOnce({}); const res = await getPkgReleases({ datasource, - depName: 'certifi', + packageName: 'certifi', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -151,7 +151,7 @@ describe('modules/datasource/hex/index', () => { const result = await getPkgReleases({ datasource, - depName: 'private_package:renovate_test', + packageName: 'private_package:renovate_test', }); expect(result).toMatchSnapshot(); diff --git a/lib/modules/datasource/hexpm-bob/index.spec.ts b/lib/modules/datasource/hexpm-bob/index.spec.ts index 79b8e6f922e655..25969936b410fa 100644 --- a/lib/modules/datasource/hexpm-bob/index.spec.ts +++ b/lib/modules/datasource/hexpm-bob/index.spec.ts @@ -14,7 +14,7 @@ describe('modules/datasource/hexpm-bob/index', () => { await expect( getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -27,7 +27,7 @@ describe('modules/datasource/hexpm-bob/index', () => { expect( await getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }) ).toBeNull(); }); @@ -40,7 +40,7 @@ describe('modules/datasource/hexpm-bob/index', () => { expect( await getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }) ).toBeNull(); }); @@ -53,7 +53,7 @@ describe('modules/datasource/hexpm-bob/index', () => { expect( await getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }) ).toBeNull(); }); @@ -66,7 +66,7 @@ describe('modules/datasource/hexpm-bob/index', () => { await expect( getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -78,7 +78,7 @@ describe('modules/datasource/hexpm-bob/index', () => { .reply(200, Fixtures.get('elixir/builds.txt')); const res = await getPkgReleases({ datasource, - depName: 'elixir', + packageName: 'elixir', }); expect(res).toEqual({ homepage: 'https://elixir-lang.org/', @@ -126,7 +126,7 @@ describe('modules/datasource/hexpm-bob/index', () => { .reply(200, Fixtures.get('otp/ubuntu-20.04/builds.txt')); const res = await getPkgReleases({ datasource, - depName: 'otp/ubuntu-20.04', + packageName: 'otp/ubuntu-20.04', versioning: 'regex:^(?\\d+?)\\.(?\\d+?)(\\.(?\\d+))?$', }); @@ -162,7 +162,7 @@ describe('modules/datasource/hexpm-bob/index', () => { const res = await getPkgReleases({ datasource, - depName: 'otp/ubuntu-20.04', + packageName: 'otp/ubuntu-20.04', registryUrls: [registryUrl], }); @@ -173,7 +173,7 @@ describe('modules/datasource/hexpm-bob/index', () => { expect( await getPkgReleases({ datasource, - depName: 'invalid', + packageName: 'invalid', }) ).toBeNull(); }); diff --git a/lib/modules/datasource/index.spec.ts b/lib/modules/datasource/index.spec.ts index 06fb982bada3ad..cb2bd428db396b 100644 --- a/lib/modules/datasource/index.spec.ts +++ b/lib/modules/datasource/index.spec.ts @@ -24,7 +24,7 @@ import { } from '.'; const datasource = 'dummy'; -const depName = 'package'; +const packageName = 'package'; type RegistriesMock = Record< string, @@ -171,17 +171,17 @@ describe('modules/datasource/index', () => { expect( await getPkgReleases({ datasource: null as never, // #7154 - depName: 'some/dep', + packageName: 'some/dep', }) ).toBeNull(); }); - it('returns null for no depName', async () => { + it('returns null for no packageName', async () => { datasources.set(datasource, new DummyDatasource()); expect( await getPkgReleases({ datasource, - depName: null as never, // #7154 + packageName: null as never, // #7154 }) ).toBeNull(); }); @@ -190,7 +190,7 @@ describe('modules/datasource/index', () => { expect( await getPkgReleases({ datasource: 'some-unknown-datasource', - depName: 'some/dep', + packageName: 'some/dep', }) ).toBeNull(); }); @@ -202,7 +202,11 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new TestDatasource()); const registryUrls = ['https://foo.bar']; - const res = await getPkgReleases({ datasource, depName, registryUrls }); + const res = await getPkgReleases({ + datasource, + packageName, + registryUrls, + }); expect(logger.logger.warn).toHaveBeenCalledWith( { datasource: 'dummy', registryUrls, defaultRegistryUrls: undefined }, @@ -227,7 +231,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new TestDatasource()); expect(supportsDigests(datasource)).toBeTrue(); - expect(await getDigest({ datasource, depName })).toBe('123'); + expect(await getDigest({ datasource, packageName })).toBe('123'); }); it('returns replacementName if defined', async () => { @@ -245,7 +249,6 @@ describe('modules/datasource/index', () => { await getDigest({ datasource, packageName: 'pkgName', - depName, replacementName: 'replacement', }) ).toBe('replacement'); @@ -258,13 +261,13 @@ describe('modules/datasource/index', () => { }); it('adds changelogUrl', async () => { - expect(await getPkgReleases({ datasource, depName })).toMatchObject({ + expect(await getPkgReleases({ datasource, packageName })).toMatchObject({ changelogUrl: 'https://foo.bar/package/CHANGELOG.md', }); }); it('adds sourceUrl', async () => { - expect(await getPkgReleases({ datasource, depName })).toMatchObject({ + expect(await getPkgReleases({ datasource, packageName })).toMatchObject({ sourceUrl: 'https://foo.bar/package', }); }); @@ -279,7 +282,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, defaultRegistryUrls: ['https://foo.bar'], }); expect(res).toMatchObject({ releases: [{ version: '0.0.1' }] }); @@ -289,7 +292,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource2()); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchObject({ releases: [{ version: '1.2.3' }], @@ -301,7 +304,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource3()); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchObject({ releases: [{ version: '1.2.3' }], @@ -319,7 +322,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, extractVersion: '^(?v\\d+\\.\\d+)', versioning: 'loose', }); @@ -338,7 +341,7 @@ describe('modules/datasource/index', () => { ); const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', }); expect(res).toMatchObject({ sourceUrl: 'https://abc.com' }); }); @@ -355,7 +358,7 @@ describe('modules/datasource/index', () => { ); const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', }); expect(res).toMatchObject({ sourceUrl: 'https://github.com/Jasig/cas' }); }); @@ -364,7 +367,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource()); const res = await getPkgReleases({ datasource, - depName, + packageName, replacementName: 'def', replacementVersion: '2.0.0', }); @@ -385,7 +388,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls: ['https://reg1.com'], }); @@ -407,7 +410,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls, }); @@ -418,7 +421,7 @@ describe('modules/datasource/index', () => { expect(logger.logger.warn).toHaveBeenCalledWith( { datasource: 'dummy', - depName: 'package', + packageName: 'package', registryUrls, }, 'Excess registryUrls found for datasource lookup - using first configured only' @@ -435,13 +438,13 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls, }); expect(res).toBeNull(); expect(logger.logger.warn).toHaveBeenCalledWith( - { datasource, depName, registryUrls }, + { datasource, packageName, registryUrls }, 'Excess registryUrls found for datasource lookup - using first configured only' ); }); @@ -478,7 +481,7 @@ describe('modules/datasource/index', () => { }); it('merges custom defaultRegistryUrls and returns success', async () => { - const res = await getPkgReleases({ datasource, depName }); + const res = await getPkgReleases({ datasource, packageName }); expect(res).toMatchObject({ releases: [ @@ -491,7 +494,7 @@ describe('modules/datasource/index', () => { it('ignores custom defaultRegistryUrls if registrUrls are set', async () => { const res = await getPkgReleases({ datasource, - depName, + packageName, defaultRegistryUrls: ['https://reg3.com'], registryUrls: ['https://reg1.com', 'https://reg2.com'], }); @@ -507,7 +510,7 @@ describe('modules/datasource/index', () => { it('merges registries and returns success', async () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls: ['https://reg1.com', 'https://reg2.com'], }); expect(res).toMatchObject({ @@ -522,7 +525,7 @@ describe('modules/datasource/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, registryUrls: [ 'https://reg1.com', 'https://reg2.com', @@ -536,7 +539,7 @@ describe('modules/datasource/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, registryUrls: ['https://reg4.com', 'https://reg5.com'], }) ).toBeNull(); @@ -563,7 +566,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls, }); @@ -585,7 +588,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls, }); @@ -603,7 +606,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new HuntRegistriyDatasource(registries)); await expect( - getPkgReleases({ datasource, depName, registryUrls }) + getPkgReleases({ datasource, packageName, registryUrls }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -621,7 +624,7 @@ describe('modules/datasource/index', () => { const res = await getPkgReleases({ datasource, - depName, + packageName, registryUrls, }); @@ -649,7 +652,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource(registries)); const res = await getPkgReleases({ datasource, - depName, + packageName, defaultRegistryUrls: ['https://foo.bar'], }); expect(res).toMatchObject({ @@ -676,7 +679,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource(registries)); const res = await getPkgReleases({ datasource, - depName, + packageName, defaultRegistryUrls: ['https://foo.bar'], constraints: { python: '2.7.0', @@ -709,7 +712,7 @@ describe('modules/datasource/index', () => { datasources.set(datasource, new DummyDatasource(registries)); const res = await getPkgReleases({ datasource, - depName, + packageName, defaultRegistryUrls: ['https://foo.bar'], constraints: { python: '2.7.0' }, constraintsFiltering: 'strict', diff --git a/lib/modules/datasource/index.ts b/lib/modules/datasource/index.ts index 21caf1a79444c6..0452ae6c54838f 100644 --- a/lib/modules/datasource/index.ts +++ b/lib/modules/datasource/index.ts @@ -90,7 +90,11 @@ function firstRegistry( ): Promise { if (registryUrls.length > 1) { logger.warn( - { datasource: datasource.id, depName: config.depName, registryUrls }, + { + datasource: datasource.id, + packageName: config.packageName, + registryUrls, + }, 'Excess registryUrls found for datasource lookup - using first configured only' ); } @@ -342,7 +346,7 @@ export async function getPkgReleases( logger.warn('No datasource found'); return null; } - const packageName = config.packageName ?? config.depName; + const packageName = config.packageName; if (!packageName) { logger.error({ config }, 'Datasource getReleases without packageName'); return null; @@ -436,8 +440,7 @@ function getDigestConfig( config: GetDigestInputConfig ): DigestConfig { const { currentValue, currentDigest } = config; - const packageName = - config.replacementName ?? config.packageName ?? config.depName; + const packageName = config.replacementName ?? config.packageName; const [registryUrl] = resolveRegistryUrls( datasource, config.defaultRegistryUrls, diff --git a/lib/modules/datasource/java-version/index.spec.ts b/lib/modules/datasource/java-version/index.spec.ts index d660e43a8fb297..a383933bde5187 100644 --- a/lib/modules/datasource/java-version/index.spec.ts +++ b/lib/modules/datasource/java-version/index.spec.ts @@ -9,7 +9,7 @@ function getPath(page: number, imageType = 'jdk'): string { return `/v3/info/release_versions?page_size=${pageSize}&image_type=${imageType}&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&page=${page}`; } -const depName = 'java'; +const packageName = 'java'; describe('modules/datasource/java-version/index', () => { describe('getReleases', () => { @@ -21,7 +21,7 @@ describe('modules/datasource/java-version/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -31,7 +31,7 @@ describe('modules/datasource/java-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -41,7 +41,7 @@ describe('modules/datasource/java-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -54,7 +54,7 @@ describe('modules/datasource/java-version/index', () => { expect( await getPkgReleases({ datasource, - depName, + packageName, }) ).toBeNull(); }); @@ -64,7 +64,7 @@ describe('modules/datasource/java-version/index', () => { await expect( getPkgReleases({ datasource, - depName, + packageName, }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -76,7 +76,7 @@ describe('modules/datasource/java-version/index', () => { .reply(200, Fixtures.get('page.json')); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(3); @@ -89,7 +89,7 @@ describe('modules/datasource/java-version/index', () => { .reply(200, Fixtures.get('jre.json')); const res = await getPkgReleases({ datasource, - depName: 'java-jre', + packageName: 'java-jre', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(2); @@ -107,7 +107,7 @@ describe('modules/datasource/java-version/index', () => { .reply(404); const res = await getPkgReleases({ datasource, - depName, + packageName, }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(50); diff --git a/lib/modules/datasource/jenkins-plugins/index.spec.ts b/lib/modules/datasource/jenkins-plugins/index.spec.ts index 00a0681a19eaca..19b5af60ceeef7 100644 --- a/lib/modules/datasource/jenkins-plugins/index.spec.ts +++ b/lib/modules/datasource/jenkins-plugins/index.spec.ts @@ -12,7 +12,7 @@ describe('modules/datasource/jenkins-plugins/index', () => { const params = { versioning: versioning.id, datasource: JenkinsPluginsDatasource.id, - depName: 'email-ext', + packageName: 'email-ext', registryUrls: ['https://updates.jenkins.io/'], }; @@ -24,7 +24,7 @@ describe('modules/datasource/jenkins-plugins/index', () => { it('returns null for a package miss', async () => { const newparams = { ...params }; - newparams.depName = 'non-existing'; + newparams.packageName = 'non-existing'; httpMock .scope('https://updates.jenkins.io') diff --git a/lib/modules/datasource/kubernetes-api/index.spec.ts b/lib/modules/datasource/kubernetes-api/index.spec.ts index 73542d86e26d4b..d4b2a954e4ca93 100644 --- a/lib/modules/datasource/kubernetes-api/index.spec.ts +++ b/lib/modules/datasource/kubernetes-api/index.spec.ts @@ -6,14 +6,14 @@ const datasource = KubernetesApiDatasource.id; describe('modules/datasource/kubernetes-api/index', () => { describe('getReleases', () => { it('returns null for an unknown Kubernetes API type', async () => { - const res = await getPkgReleases({ datasource, depName: 'Unknown' }); + const res = await getPkgReleases({ datasource, packageName: 'Unknown' }); expect(res).toBeNull(); }); it('returns for a known Kubernetes API type', async () => { const res = await getPkgReleases({ datasource, - depName: 'CSIStorageCapacity', + packageName: 'CSIStorageCapacity', }); expect(res).not.toBeNull(); expect(res).toStrictEqual({ @@ -27,7 +27,7 @@ describe('modules/datasource/kubernetes-api/index', () => { it('is case sensitive', async () => { const res = await getPkgReleases({ datasource, - depName: 'csistoragecapacity', + packageName: 'csistoragecapacity', }); expect(res).toBeNull(); }); diff --git a/lib/modules/datasource/maven/index.spec.ts b/lib/modules/datasource/maven/index.spec.ts index 78cb193587e1d6..0366e8b408d331 100644 --- a/lib/modules/datasource/maven/index.spec.ts +++ b/lib/modules/datasource/maven/index.spec.ts @@ -162,10 +162,10 @@ function mockGenericPackage(opts: MockOpts = {}) { } function get( - depName = 'org.example:package', + packageName = 'org.example:package', ...registryUrls: string[] ): Promise { - const conf = { versioning, datasource, depName }; + const conf = { versioning, datasource, packageName }; return getPkgReleases(registryUrls ? { ...conf, registryUrls } : conf); } diff --git a/lib/modules/datasource/maven/s3.spec.ts b/lib/modules/datasource/maven/s3.spec.ts index 6fa44058decc22..0952dad7488645 100644 --- a/lib/modules/datasource/maven/s3.spec.ts +++ b/lib/modules/datasource/maven/s3.spec.ts @@ -18,10 +18,10 @@ const datasource = MavenDatasource.id; const baseUrlS3 = 's3://repobucket'; function get( - depName = 'org.example:package', + packageName = 'org.example:package', ...registryUrls: string[] ): Promise { - const conf = { versioning, datasource, depName }; + const conf = { versioning, datasource, packageName }; return getPkgReleases(registryUrls ? { ...conf, registryUrls } : conf); } diff --git a/lib/modules/datasource/node/index.spec.ts b/lib/modules/datasource/node/index.spec.ts index 234b60e39a8db0..1a68ce8a7506e4 100644 --- a/lib/modules/datasource/node/index.spec.ts +++ b/lib/modules/datasource/node/index.spec.ts @@ -11,7 +11,7 @@ describe('modules/datasource/node/index', () => { await expect( getPkgReleases({ datasource, - depName: 'node', + packageName: 'node', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -24,7 +24,7 @@ describe('modules/datasource/node/index', () => { expect( await getPkgReleases({ datasource, - depName: 'node', + packageName: 'node', }) ).toBeNull(); }); @@ -34,7 +34,7 @@ describe('modules/datasource/node/index', () => { expect( await getPkgReleases({ datasource, - depName: 'node', + packageName: 'node', }) ).toBeNull(); }); @@ -46,7 +46,7 @@ describe('modules/datasource/node/index', () => { .reply(200, Fixtures.get('index.json')); const res = await getPkgReleases({ datasource, - depName: 'node', + packageName: 'node', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(64); diff --git a/lib/modules/datasource/npm/index.spec.ts b/lib/modules/datasource/npm/index.spec.ts index c40aff8a397f05..51727b1f4b58e5 100644 --- a/lib/modules/datasource/npm/index.spec.ts +++ b/lib/modules/datasource/npm/index.spec.ts @@ -56,7 +56,7 @@ describe('modules/datasource/npm/index', () => { .scope('https://registry.npmjs.org') .get('/foobar') .reply(200, missingVersions); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toBeNull(); }); @@ -65,7 +65,7 @@ describe('modules/datasource/npm/index', () => { .scope('https://registry.npmjs.org') .get('/foobar') .reply(200, npmResponse); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); }); @@ -89,7 +89,7 @@ describe('modules/datasource/npm/index', () => { }, }; httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(200, pkg); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); expect(res?.sourceUrl).toBeDefined(); }); @@ -110,7 +110,7 @@ describe('modules/datasource/npm/index', () => { }, }; httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(200, pkg); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); expect(res?.sourceUrl).toBeDefined(); }); @@ -143,7 +143,7 @@ describe('modules/datasource/npm/index', () => { .scope('https://registry.npmjs.org') .get('/foobar') .reply(200, deprecatedPackage); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); expect(res?.deprecationMessage).toMatchSnapshot(); }); @@ -153,7 +153,7 @@ describe('modules/datasource/npm/index', () => { .scope('https://registry.npmjs.org') .get('/foobar') .reply(200, npmResponse); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); }); @@ -163,19 +163,19 @@ describe('modules/datasource/npm/index', () => { .scope('https://registry.npmjs.org') .get('/foobar') .reply(200, npmResponse); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); }); it('should return null if lookup fails 401', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(401); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toBeNull(); }); it('should return null if lookup fails', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(404); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toBeNull(); }); @@ -185,35 +185,35 @@ describe('modules/datasource/npm/index', () => { .get('/foobar') .reply(200, 'oops'); await expect( - getPkgReleases({ datasource, depName: 'foobar' }) + getPkgReleases({ datasource, packageName: 'foobar' }) ).rejects.toThrow(); }); it('should throw error for 429', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(429); await expect( - getPkgReleases({ datasource, depName: 'foobar' }) + getPkgReleases({ datasource, packageName: 'foobar' }) ).rejects.toThrow(); }); it('should throw error for 5xx', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(503); await expect( - getPkgReleases({ datasource, depName: 'foobar' }) + getPkgReleases({ datasource, packageName: 'foobar' }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); it('should throw error for 408', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(408); await expect( - getPkgReleases({ datasource, depName: 'foobar' }) + getPkgReleases({ datasource, packageName: 'foobar' }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); it('should throw error for others', async () => { httpMock.scope('https://registry.npmjs.org').get('/foobar').reply(451); await expect( - getPkgReleases({ datasource, depName: 'foobar' }) + getPkgReleases({ datasource, packageName: 'foobar' }) ).rejects.toThrow(); }); @@ -224,7 +224,7 @@ describe('modules/datasource/npm/index', () => { }) .get('/foobar') .reply(200, npmResponse); - const res = await getPkgReleases({ datasource, depName: 'foobar' }); + const res = await getPkgReleases({ datasource, packageName: 'foobar' }); expect(res).toMatchSnapshot(); }); @@ -237,7 +237,7 @@ describe('modules/datasource/npm/index', () => { .reply(200, { ...npmResponse, name: '@foobar/core' }); const res = await getPkgReleases({ datasource, - depName: '@foobar/core', + packageName: '@foobar/core', npmrc: '_auth = 1234', }); expect(res).toMatchSnapshot(); @@ -256,7 +256,11 @@ describe('modules/datasource/npm/index', () => { .get('/foobar') .reply(200, npmResponse); const npmrc = 'registry=https://npm.mycustomregistry.com/'; - const res = await getPkgReleases({ datasource, depName: 'foobar', npmrc }); + const res = await getPkgReleases({ + datasource, + packageName: 'foobar', + npmrc, + }); expect(res).toMatchSnapshot(); }); @@ -278,7 +282,11 @@ describe('modules/datasource/npm/index', () => { .reply(200, npmResponse); const npmrc = 'registry=https://npm.mycustomregistry.com/_packaging/mycustomregistry/npm/registry/'; - const res = await getPkgReleases({ datasource, depName: 'foobar', npmrc }); + const res = await getPkgReleases({ + datasource, + packageName: 'foobar', + npmrc, + }); expect(res).toMatchSnapshot(); }); @@ -295,7 +303,11 @@ describe('modules/datasource/npm/index', () => { .get('/foobar') .reply(200, npmResponse); const npmrc = 'foo=bar'; - const res = await getPkgReleases({ datasource, depName: 'foobar', npmrc }); + const res = await getPkgReleases({ + datasource, + packageName: 'foobar', + npmrc, + }); expect(res).toMatchSnapshot(); }); @@ -305,7 +317,11 @@ describe('modules/datasource/npm/index', () => { .get('/foobar') .reply(200, npmResponse); const npmrc = `registry=https://npm.mycustomregistry.com/`; - const res = await getPkgReleases({ datasource, depName: 'foobar', npmrc }); + const res = await getPkgReleases({ + datasource, + packageName: 'foobar', + npmrc, + }); expect(res).toMatchSnapshot(); }); @@ -319,7 +335,11 @@ describe('modules/datasource/npm/index', () => { GlobalConfig.set({ exposeAllEnv: true }); const npmrc = 'registry=${REGISTRY}'; - const res = await getPkgReleases({ datasource, depName: 'foobar', npmrc }); + const res = await getPkgReleases({ + datasource, + packageName: 'foobar', + npmrc, + }); expect(res).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/nuget/index.spec.ts b/lib/modules/datasource/nuget/index.spec.ts index bdc2c914a72734..43e38f25ee56a8 100644 --- a/lib/modules/datasource/nuget/index.spec.ts +++ b/lib/modules/datasource/nuget/index.spec.ts @@ -55,7 +55,7 @@ const nlogMocks = [ const configV3V2 = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: [ 'https://api.nuget.org/v3/index.json', 'https://www.nuget.org/api/v2/', @@ -65,28 +65,28 @@ const configV3V2 = { const configV2 = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: ['https://www.nuget.org/api/v2/'], }; const configV3 = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: ['https://api.nuget.org/v3/index.json'], }; const configV3NotNugetOrg = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: ['https://myprivatefeed/index.json'], }; const configV3Multiple = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: [ 'https://api.nuget.org/v3/index.json', 'https://myprivatefeed/index.json', @@ -139,7 +139,7 @@ describe('modules/datasource/nuget/index', () => { const config = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: ['#$#api.nuget.org/v3/index.xml'], }; @@ -155,7 +155,7 @@ describe('modules/datasource/nuget/index', () => { const config = { datasource, versioning, - depName: 'nunit', + packageName: 'nunit', registryUrls: ['https://my-registry#protocolVersion=3'], }; expect( @@ -389,7 +389,7 @@ describe('modules/datasource/nuget/index', () => { }); const res = await getPkgReleases({ ...configV3, - depName: 'nlog', + packageName: 'nlog', }); expect(res).not.toBeNull(); expect(res).toMatchSnapshot(); diff --git a/lib/modules/datasource/orb/index.spec.ts b/lib/modules/datasource/orb/index.spec.ts index be25548915af2c..2e66d028740b4c 100644 --- a/lib/modules/datasource/orb/index.spec.ts +++ b/lib/modules/datasource/orb/index.spec.ts @@ -34,7 +34,7 @@ describe('modules/datasource/orb/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-workflows', + packageName: 'hyper-expanse/library-release-workflows', }) ).toBeNull(); }); @@ -47,7 +47,7 @@ describe('modules/datasource/orb/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-wonkflows', + packageName: 'hyper-expanse/library-release-wonkflows', }) ).toBeNull(); }); @@ -57,7 +57,7 @@ describe('modules/datasource/orb/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-workflows', + packageName: 'hyper-expanse/library-release-workflows', }) ).toBeNull(); }); @@ -67,7 +67,7 @@ describe('modules/datasource/orb/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-workflows', + packageName: 'hyper-expanse/library-release-workflows', }) ).toBeNull(); }); @@ -76,7 +76,7 @@ describe('modules/datasource/orb/index', () => { httpMock.scope(baseUrl).post('/graphql-unstable').reply(200, orbData); const res = await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-workflows', + packageName: 'hyper-expanse/library-release-workflows', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -87,7 +87,7 @@ describe('modules/datasource/orb/index', () => { httpMock.scope(baseUrl).post('/graphql-unstable').reply(200, orbData); const res = await getPkgReleases({ datasource, - depName: 'hyper-expanse/library-release-workflows', + packageName: 'hyper-expanse/library-release-workflows', }); expect(res).toMatchSnapshot(); expect(res?.homepage).toBe('https://google.com'); diff --git a/lib/modules/datasource/packagist/index.spec.ts b/lib/modules/datasource/packagist/index.spec.ts index 88d6775fe1c46d..e9f0984404ce77 100644 --- a/lib/modules/datasource/packagist/index.spec.ts +++ b/lib/modules/datasource/packagist/index.spec.ts @@ -48,7 +48,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'something/one', + packageName: 'something/one', }); expect(res).toBeNull(); }); @@ -72,7 +72,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'vendor/package-name', + packageName: 'vendor/package-name', }); expect(res).toMatchSnapshot(); }); @@ -92,7 +92,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'vendor/package-name2', + packageName: 'vendor/package-name2', }); expect(res).toBeNull(); }); @@ -112,7 +112,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'vendor/package-name', + packageName: 'vendor/package-name', }); expect(res).toBeNull(); }); @@ -132,7 +132,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'drewm/mailchimp-api', + packageName: 'drewm/mailchimp-api', }); expect(res).toBeNull(); }); @@ -160,7 +160,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'guzzlehttp/guzzle', + packageName: 'guzzlehttp/guzzle', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -199,7 +199,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'guzzlehttp/guzzle', + packageName: 'guzzlehttp/guzzle', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -244,7 +244,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'wpackagist-plugin/1beyt', + packageName: 'wpackagist-plugin/1beyt', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -291,7 +291,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'some/other', + packageName: 'some/other', }); expect(res).toBeNull(); }); @@ -323,7 +323,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'wpackagist-plugin/1beyt', + packageName: 'wpackagist-plugin/1beyt', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -352,7 +352,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'wpackagist-plugin/1beyt', + packageName: 'wpackagist-plugin/1beyt', }); expect(res).toMatchSnapshot(); expect(res).not.toBeNull(); @@ -387,7 +387,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'some/other', + packageName: 'some/other', }); expect(res).toBeNull(); }); @@ -407,7 +407,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'drewm/mailchimp-api', + packageName: 'drewm/mailchimp-api', }) ).toMatchSnapshot(); }); @@ -427,7 +427,7 @@ describe('modules/datasource/packagist/index', () => { ...config, datasource, versioning, - depName: 'drewm/mailchimp-api', + packageName: 'drewm/mailchimp-api', }) ).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/pod/index.spec.ts b/lib/modules/datasource/pod/index.spec.ts index 96d71bdf59871e..3f90ac87f0dd11 100644 --- a/lib/modules/datasource/pod/index.spec.ts +++ b/lib/modules/datasource/pod/index.spec.ts @@ -7,7 +7,7 @@ import { PodDatasource } from '.'; const config = { versioning: rubyVersioning.id, datasource: PodDatasource.id, - depName: 'foo', + packageName: 'foo', registryUrls: [], }; @@ -31,7 +31,7 @@ describe('modules/datasource/pod/index', () => { expect( await getPkgReleases({ datasource: PodDatasource.id, - depName: 'foobar', + packageName: 'foobar', registryUrls: [], }) ).toBeNull(); diff --git a/lib/modules/datasource/puppet-forge/index.spec.ts b/lib/modules/datasource/puppet-forge/index.spec.ts index c9bf5bdb481e4f..d4430baeb972d0 100644 --- a/lib/modules/datasource/puppet-forge/index.spec.ts +++ b/lib/modules/datasource/puppet-forge/index.spec.ts @@ -18,7 +18,6 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'puppetlabs/apache', packageName: 'puppetlabs/apache', }); expect(res).toMatchObject({ @@ -41,7 +40,6 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'puppetlabs/apache', packageName: 'puppetlabs/apache', registryUrls: ['https://forgeapi.puppet.com'], }); @@ -87,7 +85,6 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'puppetlabs/apache', packageName: 'puppetlabs/apache', }); expect(res).toEqual({ @@ -116,7 +113,7 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', registryUrls: ['https://forgeapi.puppet.com'], }); expect(res).toBeNull(); @@ -131,7 +128,7 @@ describe('modules/datasource/puppet-forge/index', () => { .reply(404); const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', registryUrls: ['https://forgeapi.puppet.com'], }); expect(res).toBeNull(); @@ -146,7 +143,7 @@ describe('modules/datasource/puppet-forge/index', () => { const registryUrls = ['https://puppet.mycustomregistry.com']; const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', registryUrls, }); @@ -191,7 +188,7 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', }); expect(res).toEqual({ @@ -217,7 +214,7 @@ describe('modules/datasource/puppet-forge/index', () => { const res = await getPkgReleases({ datasource, - depName: 'foobar', + packageName: 'foobar', }); expect(res).toBeNull(); diff --git a/lib/modules/datasource/pypi/index.spec.ts b/lib/modules/datasource/pypi/index.spec.ts index 6f7123a3d53d74..7e2df584b795c9 100644 --- a/lib/modules/datasource/pypi/index.spec.ts +++ b/lib/modules/datasource/pypi/index.spec.ts @@ -38,7 +38,7 @@ describe('modules/datasource/pypi/index', () => { expect( await getPkgReleases({ datasource, - depName: 'something', + packageName: 'something', }) ).toBeNull(); }); @@ -49,7 +49,7 @@ describe('modules/datasource/pypi/index', () => { expect( await getPkgReleases({ datasource, - depName: 'something', + packageName: 'something', }) ).toBeNull(); }); @@ -59,7 +59,7 @@ describe('modules/datasource/pypi/index', () => { expect( await getPkgReleases({ datasource, - depName: 'azure-cli-monitor', + packageName: 'azure-cli-monitor', }) ).toMatchSnapshot(); }); @@ -76,7 +76,7 @@ describe('modules/datasource/pypi/index', () => { await getPkgReleases({ ...config, datasource, - depName: 'azure-cli-monitor', + packageName: 'azure-cli-monitor', }) ).toMatchObject({ registryUrl: 'https://custom.pypi.net/foo', @@ -97,7 +97,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ ...config, datasource, - depName: 'azure-cli-monitor', + packageName: 'azure-cli-monitor', }); expect(res?.isPrivate).toBeTrue(); }); @@ -125,7 +125,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ ...config, datasource, - depName: 'azure-cli-monitor', + packageName: 'azure-cli-monitor', }); expect(res?.releases.pop()).toMatchObject({ version: '0.2.15', @@ -148,7 +148,7 @@ describe('modules/datasource/pypi/index', () => { ( await getPkgReleases({ datasource, - depName: 'something', + packageName: 'something', }) )?.homepage ).toBe('https://microsoft.com'); @@ -172,7 +172,7 @@ describe('modules/datasource/pypi/index', () => { .reply(200, { ...JSON.parse(res1), info }); const result = await getPkgReleases({ datasource, - depName: 'flexget', + packageName: 'flexget', }); expect(result?.sourceUrl).toBe(info.project_urls.Repository); expect(result?.changelogUrl).toBe(info.project_urls.changelog); @@ -192,7 +192,7 @@ describe('modules/datasource/pypi/index', () => { .reply(200, { ...JSON.parse(res1), info }); const result = await getPkgReleases({ datasource, - depName: 'flexget', + packageName: 'flexget', }); expect(result?.sourceUrl).toBeUndefined(); }); @@ -206,7 +206,7 @@ describe('modules/datasource/pypi/index', () => { await getPkgReleases({ datasource, registryUrls: [baseUrl], - depName: 'not_normalized.Package', + packageName: 'not_normalized.Package', }); expect(expectedHttpCall.isDone()).toBeTrue(); @@ -225,7 +225,7 @@ describe('modules/datasource/pypi/index', () => { await getPkgReleases({ datasource, registryUrls: [baseUrl], - depName: 'not_normalized.Package', + packageName: 'not_normalized.Package', }); expect(expectedFallbackHttpCall.isDone()).toBeTrue(); @@ -241,7 +241,7 @@ describe('modules/datasource/pypi/index', () => { await getPkgReleases({ datasource, registryUrls: [simpleRegistryUrl], - depName: 'not_normalized.Package', + packageName: 'not_normalized.Package', }); expect(expectedHttpCall.isDone()).toBeTrue(); @@ -270,7 +270,7 @@ describe('modules/datasource/pypi/index', () => { await getPkgReleases({ datasource, constraints: { python: '2.7' }, - depName: 'doit', + packageName: 'doit', constraintsFiltering: 'strict', }) ).toMatchSnapshot(); @@ -289,7 +289,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }) ).toMatchSnapshot(); }); @@ -307,7 +307,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }) ).toMatchSnapshot(); }); @@ -328,7 +328,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }); expect(res?.isPrivate).toBeTrue(); }); @@ -344,7 +344,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ datasource, ...config, - depName: 'package--with-hyphens', + packageName: 'package--with-hyphens', }); expect(res?.releases).toMatchObject([ { version: '2.0.0' }, @@ -366,7 +366,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'image-collector', + packageName: 'image-collector', }) ).toMatchSnapshot(); }); @@ -382,7 +382,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ datasource, ...config, - depName: 'PackageWithMixedCase', + packageName: 'PackageWithMixedCase', }); expect(res?.releases).toMatchObject([ { version: '2.0.0' }, @@ -402,7 +402,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ datasource, ...config, - depName: 'packagewithmixedcase', + packageName: 'packagewithmixedcase', }); expect(res?.releases).toMatchObject([ { version: '2.0.0' }, @@ -422,7 +422,7 @@ describe('modules/datasource/pypi/index', () => { const res = await getPkgReleases({ datasource, ...config, - depName: 'package.with.periods', + packageName: 'package.with.periods', }); expect(res?.releases).toMatchObject([ { version: '2.0.0' }, @@ -444,7 +444,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }) ).toBeNull(); }); @@ -462,7 +462,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }) ).toBeNull(); }); @@ -480,7 +480,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'dj-database-url', + packageName: 'dj-database-url', }) ).toBeNull(); }); @@ -500,7 +500,7 @@ describe('modules/datasource/pypi/index', () => { const result = await getPkgReleases({ datasource, ...config, - depName: 'dj-database-url', + packageName: 'dj-database-url', }); expect(result).toMatchSnapshot(); }); @@ -518,7 +518,7 @@ describe('modules/datasource/pypi/index', () => { datasource, constraints: { python: '2.7' }, ...config, - depName: 'dj-database-url', + packageName: 'dj-database-url', constraintsFiltering: 'strict', }) ).toMatchSnapshot(); @@ -535,7 +535,7 @@ describe('modules/datasource/pypi/index', () => { datasource, ...config, constraints: { python: '2.7' }, - depName: 'azure-cli-monitor', + packageName: 'azure-cli-monitor', }) ).toMatchSnapshot(); }); diff --git a/lib/modules/datasource/repology/index.spec.ts b/lib/modules/datasource/repology/index.spec.ts index aabb1b9e800be1..7e7df992af3e08 100644 --- a/lib/modules/datasource/repology/index.spec.ts +++ b/lib/modules/datasource/repology/index.spec.ts @@ -71,7 +71,7 @@ describe('modules/datasource/repology/index', () => { await getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).toBeNull(); }); @@ -88,7 +88,7 @@ describe('modules/datasource/repology/index', () => { await getPkgReleases({ datasource, versioning, - depName: 'this_should/never-exist', + packageName: 'this_should/never-exist', }) ).toBeNull(); }); @@ -107,7 +107,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -121,7 +121,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -139,7 +139,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -158,7 +158,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -172,7 +172,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -187,7 +187,7 @@ describe('modules/datasource/repology/index', () => { await getPkgReleases({ datasource, versioning, - depName: 'ubuntu_20_04/git', + packageName: 'ubuntu_20_04/git', }) ).toBeNull(); }); @@ -197,7 +197,7 @@ describe('modules/datasource/repology/index', () => { getPkgReleases({ datasource, versioning, - depName: 'invalid-lookup-name', + packageName: 'invalid-lookup-name', }) ).rejects.toThrow(EXTERNAL_HOST_ERROR); }); @@ -211,7 +211,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'debian_stable/nginx', + packageName: 'debian_stable/nginx', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(1); @@ -230,7 +230,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'debian_stable/gcc-defaults', + packageName: 'debian_stable/gcc-defaults', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(1); @@ -246,7 +246,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'debian_stable/gcc-defaults', + packageName: 'debian_stable/gcc-defaults', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(1); @@ -262,7 +262,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'alpine_3_12/gcc', + packageName: 'alpine_3_12/gcc', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(1); @@ -278,7 +278,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'debian_stable/pulseaudio-utils', + packageName: 'debian_stable/pulseaudio-utils', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(1); @@ -297,7 +297,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'centos_8/java-11-openjdk', + packageName: 'centos_8/java-11-openjdk', }); expect(res).toMatchSnapshot(); expect(res?.releases).toHaveLength(6); @@ -325,7 +325,7 @@ describe('modules/datasource/repology/index', () => { const release = await getPkgReleases({ datasource, versioning, - depName: 'dummy/example', + packageName: 'dummy/example', }); expect(release).toBeNull(); @@ -407,7 +407,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'some_repo/some-package', + packageName: 'some_repo/some-package', }); expect(res).toEqual({ registryUrl: 'https://repology.org', @@ -434,7 +434,7 @@ describe('modules/datasource/repology/index', () => { const res = await getPkgReleases({ datasource, versioning, - depName: 'ubuntu_20_04/python3.8', + packageName: 'ubuntu_20_04/python3.8', }); expect(res).toEqual({ registryUrl: 'https://repology.org', diff --git a/lib/modules/datasource/ruby-version/index.spec.ts b/lib/modules/datasource/ruby-version/index.spec.ts index 25f55333144bd9..5b082be7e54a45 100644 --- a/lib/modules/datasource/ruby-version/index.spec.ts +++ b/lib/modules/datasource/ruby-version/index.spec.ts @@ -14,7 +14,7 @@ describe('modules/datasource/ruby-version/index', () => { .reply(200, Fixtures.get('releases.html')); const res = await getPkgReleases({ datasource, - depName: 'ruby', + packageName: 'ruby', }); expect(res).toMatchSnapshot(); }); @@ -25,7 +25,7 @@ describe('modules/datasource/ruby-version/index', () => { .get('/en/downloads/releases/') .reply(200, {}); await expect( - getPkgReleases({ datasource, depName: 'ruby' }) + getPkgReleases({ datasource, packageName: 'ruby' }) ).rejects.toThrow(); }); @@ -35,7 +35,7 @@ describe('modules/datasource/ruby-version/index', () => { .get('/en/downloads/releases/') .reply(404); await expect( - getPkgReleases({ datasource, depName: 'ruby' }) + getPkgReleases({ datasource, packageName: 'ruby' }) ).rejects.toThrow(); }); }); diff --git a/lib/modules/datasource/rubygems/index.spec.ts b/lib/modules/datasource/rubygems/index.spec.ts index 77839741bfccd7..aeb874b5af0028 100644 --- a/lib/modules/datasource/rubygems/index.spec.ts +++ b/lib/modules/datasource/rubygems/index.spec.ts @@ -18,7 +18,7 @@ describe('modules/datasource/rubygems/index', () => { const params = { versioning: rubyVersioning.id, datasource: RubyGemsDatasource.id, - depName: 'rails', + packageName: 'rails', registryUrls: [ 'https://thirdparty.com', 'https://firstparty.com/basepath/', diff --git a/lib/modules/datasource/sbt-package/index.spec.ts b/lib/modules/datasource/sbt-package/index.spec.ts index 55f65dae6960a3..b1335ced6e2565 100644 --- a/lib/modules/datasource/sbt-package/index.spec.ts +++ b/lib/modules/datasource/sbt-package/index.spec.ts @@ -39,7 +39,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.scalatest:scalatest', + packageName: 'org.scalatest:scalatest', registryUrls: ['https://failed_repo/maven'], }); @@ -63,7 +63,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'com.example:empty', + packageName: 'com.example:empty', registryUrls: [], }); @@ -98,7 +98,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.example:example', + packageName: 'org.example:example', registryUrls: [MAVEN_REPO], }); @@ -127,7 +127,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.example:example_2.12', + packageName: 'org.example:example_2.12', registryUrls: [], }); @@ -168,7 +168,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'io.confluent:kafka-avro-serializer', + packageName: 'io.confluent:kafka-avro-serializer', registryUrls: ['https://packages.confluent.io/maven'], }); expect(res).toEqual({ @@ -201,7 +201,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.example:example', + packageName: 'org.example:example', registryUrls: [MAVEN_REPO], }); @@ -245,7 +245,7 @@ describe('modules/datasource/sbt-package/index', () => { const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.example:example_2.13', + packageName: 'org.example:example_2.13', registryUrls: [ 'https://gitlab.com/api/v4/projects/123/packages/maven/', ], diff --git a/lib/modules/datasource/sbt-plugin/index.spec.ts b/lib/modules/datasource/sbt-plugin/index.spec.ts index 99a0eda1c59b89..4a8c99d76bfa30 100644 --- a/lib/modules/datasource/sbt-plugin/index.spec.ts +++ b/lib/modules/datasource/sbt-plugin/index.spec.ts @@ -145,7 +145,7 @@ describe('modules/datasource/sbt-plugin/index', () => { await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPluginDatasource.id, - depName: 'org.scalatest:scalatest', + packageName: 'org.scalatest:scalatest', registryUrls: ['https://failed_repo/maven'], }) ).toBeNull(); @@ -153,7 +153,7 @@ describe('modules/datasource/sbt-plugin/index', () => { await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPluginDatasource.id, - depName: 'org.scalatest:scalaz', + packageName: 'org.scalatest:scalaz', registryUrls: [], }) ).toBeNull(); @@ -164,7 +164,7 @@ describe('modules/datasource/sbt-plugin/index', () => { await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPluginDatasource.id, - depName: 'org.foundweekends:sbt-bintray', + packageName: 'org.foundweekends:sbt-bintray', registryUrls: [], }) ).toEqual({ @@ -180,7 +180,7 @@ describe('modules/datasource/sbt-plugin/index', () => { await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPluginDatasource.id, - depName: 'org.foundweekends:sbt-bintray_2.12', + packageName: 'org.foundweekends:sbt-bintray_2.12', registryUrls: [], }) ).toEqual({ @@ -196,7 +196,7 @@ describe('modules/datasource/sbt-plugin/index', () => { await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPluginDatasource.id, - depName: 'io.get-coursier:sbt-coursier', + packageName: 'io.get-coursier:sbt-coursier', registryUrls: [MAVEN_REPO], }) ).toEqual({ diff --git a/lib/modules/datasource/terraform-module/index.spec.ts b/lib/modules/datasource/terraform-module/index.spec.ts index 04c0e6a9ed7219..de102a2324b298 100644 --- a/lib/modules/datasource/terraform-module/index.spec.ts +++ b/lib/modules/datasource/terraform-module/index.spec.ts @@ -26,7 +26,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', }) ).toBeNull(); }); @@ -41,7 +41,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', }) ).toBeNull(); }); @@ -56,7 +56,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', }) ).toBeNull(); }); @@ -70,7 +70,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', }); expect(res).toEqual({ homepage: 'https://registry.terraform.io/modules/hashicorp/consul/aws', @@ -104,7 +104,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', registryUrls: ['https://terraform.company.com'], }) ).toBeNull(); @@ -120,7 +120,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', registryUrls: ['https://terraform.company.com'], }) ).toBeNull(); @@ -136,7 +136,7 @@ describe('modules/datasource/terraform-module/index', () => { expect( await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', registryUrls: ['https://terraform.company.com'], }) ).toBeNull(); @@ -151,7 +151,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource, - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', registryUrls: ['https://terraform.company.com'], }); expect(res).toEqual({ @@ -185,7 +185,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource, - depName: 'registry.terraform.io/hashicorp/consul/aws', + packageName: 'registry.terraform.io/hashicorp/consul/aws', }); expect(res).toEqual({ homepage: 'https://registry.terraform.io/modules/hashicorp/consul/aws', @@ -220,7 +220,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource, - depName: 'consul/foo', + packageName: 'consul/foo', registryUrls: ['https://terraform.company.com'], }); expect(res).toBeNull(); @@ -237,7 +237,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource, - depName: 'consul/foo', + packageName: 'consul/foo', registryUrls: ['https://terraform.company.com'], }); expect(res).toBeNull(); @@ -250,7 +250,7 @@ describe('modules/datasource/terraform-module/index', () => { .reply(404); const res = await getPkgReleases({ datasource, - depName: 'consul/foo', + packageName: 'consul/foo', registryUrls: ['https://terraform.company.com'], }); expect(res).toBeNull(); @@ -266,7 +266,7 @@ describe('modules/datasource/terraform-module/index', () => { const res = await getPkgReleases({ datasource, registryUrls: ['https://terraform.foo.bar'], - depName: 'hashicorp/consul/aws', + packageName: 'hashicorp/consul/aws', }); expect(res).toEqual({ diff --git a/lib/modules/datasource/terraform-provider/index.spec.ts b/lib/modules/datasource/terraform-provider/index.spec.ts index 7fa3d732643f2a..1869bb9041046e 100644 --- a/lib/modules/datasource/terraform-provider/index.spec.ts +++ b/lib/modules/datasource/terraform-provider/index.spec.ts @@ -33,7 +33,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', }) ).toBeNull(); }); @@ -52,7 +52,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', }) ).toBeNull(); }); @@ -71,7 +71,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', }) ).toBeNull(); }); @@ -85,7 +85,7 @@ describe('modules/datasource/terraform-provider/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', }); expect(res).toEqual({ homepage: 'https://registry.terraform.io/providers/hashicorp/azurerm', @@ -114,7 +114,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', registryUrls: ['https://registry.company.com'], }) ).toBeNull(); @@ -130,7 +130,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', registryUrls: ['https://registry.company.com'], }) ).toBeNull(); @@ -146,7 +146,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', registryUrls: ['https://registry.company.com'], }) ).toBeNull(); @@ -161,7 +161,6 @@ describe('modules/datasource/terraform-provider/index', () => { .reply(200, serviceDiscoveryResult); const res = await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azure', packageName: 'hashicorp/azurerm', registryUrls: ['https://registry.company.com'], }); @@ -197,7 +196,7 @@ describe('modules/datasource/terraform-provider/index', () => { const res = await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'google-beta', + packageName: 'google-beta', }); expect(res).toEqual({ registryUrl: 'https://releases.hashicorp.com', @@ -233,7 +232,7 @@ describe('modules/datasource/terraform-provider/index', () => { const res = await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'datadog', + packageName: 'datadog', }); expect(res).toBeNull(); }); @@ -247,7 +246,7 @@ describe('modules/datasource/terraform-provider/index', () => { expect( await getPkgReleases({ datasource: TerraformProviderDatasource.id, - depName: 'azurerm', + packageName: 'azurerm', }) ).toBeNull(); }); diff --git a/lib/modules/datasource/types.ts b/lib/modules/datasource/types.ts index b95f1395529026..a112d5fd5eec5a 100644 --- a/lib/modules/datasource/types.ts +++ b/lib/modules/datasource/types.ts @@ -3,8 +3,7 @@ import type { ModuleApi } from '../../types'; export interface GetDigestInputConfig { datasource: string; - packageName?: string; - depName: string; + packageName: string; defaultRegistryUrls?: string[]; registryUrls?: string[] | null; additionalRegistryUrls?: string[]; @@ -31,8 +30,7 @@ export interface GetPkgReleasesConfig { registryUrls?: string[] | null; additionalRegistryUrls?: string[]; datasource: string; - depName: string; - packageName?: string; + packageName: string; versioning?: string; extractVersion?: string; constraints?: Record; diff --git a/lib/modules/manager/npm/update/locked-dependency/common/parent-version.ts b/lib/modules/manager/npm/update/locked-dependency/common/parent-version.ts index 3aab1c2583470e..5c0a95316fce20 100644 --- a/lib/modules/manager/npm/update/locked-dependency/common/parent-version.ts +++ b/lib/modules/manager/npm/update/locked-dependency/common/parent-version.ts @@ -8,15 +8,17 @@ import { api as semver } from '../../../../../versioning/npm'; const pkgCache = new Map>(); -function getPkgReleasesCached(depName: string): Promise { - let cachedResult = pkgCache.get(depName); +function getPkgReleasesCached( + packageName: string +): Promise { + let cachedResult = pkgCache.get(packageName); if (!cachedResult) { const lookupConfig: GetPkgReleasesConfig = { datasource: 'npm', - depName, + packageName, }; cachedResult = getPkgReleases(lookupConfig); - pkgCache.set(depName, cachedResult); + pkgCache.set(packageName, cachedResult); } return cachedResult; } diff --git a/lib/modules/manager/terraform/lockfile/index.ts b/lib/modules/manager/terraform/lockfile/index.ts index 69d7968d1ac5e6..d4421c3d41310a 100644 --- a/lib/modules/manager/terraform/lockfile/index.ts +++ b/lib/modules/manager/terraform/lockfile/index.ts @@ -25,7 +25,7 @@ async function updateAllLocks( const updateConfig: GetPkgReleasesConfig = { versioning: 'hashicorp', datasource: 'terraform-provider', - depName: lock.packageName, + packageName: lock.packageName, }; const { releases } = (await getPkgReleases(updateConfig)) ?? {}; // istanbul ignore if: needs test diff --git a/lib/util/exec/containerbase.ts b/lib/util/exec/containerbase.ts index 3d7571f160da16..3c3f5c1909e306 100644 --- a/lib/util/exec/containerbase.ts +++ b/lib/util/exec/containerbase.ts @@ -17,138 +17,138 @@ import type { Opt, ToolConfig, ToolConstraint } from './types'; const allToolConfig: Record = { bundler: { datasource: 'rubygems', - depName: 'bundler', + packageName: 'bundler', versioning: rubyVersioningId, }, cocoapods: { datasource: 'rubygems', - depName: 'cocoapods', + packageName: 'cocoapods', versioning: rubyVersioningId, }, composer: { datasource: 'github-releases', - depName: 'composer/composer', + packageName: 'composer/composer', versioning: composerVersioningId, }, corepack: { datasource: 'npm', - depName: 'corepack', + packageName: 'corepack', versioning: npmVersioningId, }, dotnet: { datasource: 'dotnet-version', - depName: 'dotnet-sdk', + packageName: 'dotnet-sdk', versioning: semverVersioningId, }, erlang: { datasource: 'github-releases', - depName: 'containerbase/erlang-prebuild', + packageName: 'containerbase/erlang-prebuild', versioning: semverCoercedVersioningId, }, elixir: { datasource: 'github-releases', - depName: 'elixir-lang/elixir', + packageName: 'elixir-lang/elixir', versioning: semverVersioningId, }, flux: { datasource: 'github-releases', - depName: 'fluxcd/flux2', + packageName: 'fluxcd/flux2', versioning: semverVersioningId, }, golang: { datasource: 'golang-version', - depName: 'golang', + packageName: 'golang', versioning: npmVersioningId, }, helm: { datasource: 'github-releases', - depName: 'helm/helm', + packageName: 'helm/helm', versioning: semverVersioningId, }, helmfile: { datasource: 'github-releases', - depName: 'helmfile/helmfile', + packageName: 'helmfile/helmfile', versioning: semverVersioningId, }, java: { datasource: 'java-version', - depName: 'java', + packageName: 'java', versioning: npmVersioningId, }, jb: { datasource: 'github-releases', - depName: 'jsonnet-bundler/jsonnet-bundler', + packageName: 'jsonnet-bundler/jsonnet-bundler', versioning: semverVersioningId, }, lerna: { datasource: 'npm', - depName: 'lerna', + packageName: 'lerna', versioning: npmVersioningId, }, nix: { datasource: 'github-tags', - depName: 'NixOS/nix', + packageName: 'NixOS/nix', versioning: semverVersioningId, }, node: { datasource: 'node', - depName: 'node', + packageName: 'node', versioning: nodeVersioningId, }, npm: { datasource: 'npm', - depName: 'npm', + packageName: 'npm', hash: true, versioning: npmVersioningId, }, php: { datasource: 'github-releases', - depName: 'containerbase/php-prebuild', + packageName: 'containerbase/php-prebuild', versioning: composerVersioningId, }, pnpm: { datasource: 'npm', - depName: 'pnpm', + packageName: 'pnpm', versioning: npmVersioningId, }, poetry: { datasource: 'pypi', - depName: 'poetry', + packageName: 'poetry', versioning: pep440VersioningId, }, python: { datasource: 'github-releases', - depName: 'containerbase/python-prebuild', + packageName: 'containerbase/python-prebuild', versioning: pythonVersioningId, }, ruby: { datasource: 'github-releases', - depName: 'containerbase/ruby-prebuild', + packageName: 'containerbase/ruby-prebuild', versioning: rubyVersioningId, }, rust: { datasource: 'docker', - depName: 'rust', + packageName: 'rust', versioning: semverVersioningId, }, yarn: { datasource: 'npm', - depName: 'yarn', + packageName: 'yarn', versioning: npmVersioningId, }, 'yarn-slim': { datasource: 'npm', - depName: 'yarn', + packageName: 'yarn', versioning: npmVersioningId, }, dart: { datasource: 'dart-version', - depName: 'dart', + packageName: 'dart', versioning: semverVersioningId, }, flutter: { datasource: 'flutter-version', - depName: 'flutter', + packageName: 'flutter', versioning: semverVersioningId, }, }; diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 291a97523a9a90..9d192db5908359 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -81,7 +81,7 @@ function prepareCommands(commands: Opt[]): string[] { } export async function getDockerTag( - depName: string, + packageName: string, constraint: string, scheme: string ): Promise { @@ -96,12 +96,12 @@ export async function getDockerTag( } logger.debug( - { depName, scheme, constraint }, + { packageName, scheme, constraint }, `Found version constraint - checking for a compatible image to use` ); const imageReleases = await getPkgReleases({ datasource: 'docker', - depName, + packageName, versioning: scheme, }); if (imageReleases?.releases) { @@ -117,17 +117,17 @@ export async function getDockerTag( const version = versions.sort(ver.sortVersions.bind(ver)).pop(); if (version) { logger.debug( - { depName, scheme, constraint, version }, + { packageName, scheme, constraint, version }, `Found compatible image version` ); return version; } } else { - logger.error(`No ${depName} releases found`); + logger.error(`No ${packageName} releases found`); return 'latest'; } logger.warn( - { depName, constraint, scheme }, + { packageName, constraint, scheme }, 'Failed to find a tag satisfying constraint, using "latest" tag instead' ); return 'latest'; diff --git a/lib/util/exec/types.ts b/lib/util/exec/types.ts index 14f7d78d5c678f..ffe794991044b2 100644 --- a/lib/util/exec/types.ts +++ b/lib/util/exec/types.ts @@ -7,7 +7,7 @@ export interface ToolConstraint { export interface ToolConfig { datasource: string; - depName: string; + packageName: string; hash?: boolean; versioning: string; } diff --git a/lib/workers/repository/process/__snapshots__/fetch.spec.ts.snap b/lib/workers/repository/process/__snapshots__/fetch.spec.ts.snap index 0342ca9a090742..50e2e373af26d3 100644 --- a/lib/workers/repository/process/__snapshots__/fetch.spec.ts.snap +++ b/lib/workers/repository/process/__snapshots__/fetch.spec.ts.snap @@ -11,6 +11,7 @@ exports[`workers/repository/process/fetch fetchUpdates() fetches updates 1`] = ` { "datasource": "maven", "depName": "bbb", + "packageName": "bbb", "updates": [ "a", "b", @@ -30,16 +31,19 @@ exports[`workers/repository/process/fetch fetchUpdates() handles ignored, skippe "deps": [ { "depName": "abcd", + "packageName": "abcd", "skipReason": "ignored", "updates": [], }, { "depName": "foo", + "packageName": "foo", "skipReason": "disabled", "updates": [], }, { "depName": "skipped", + "packageName": "skipped", "skipReason": "some-reason", "updates": [], }, diff --git a/lib/workers/repository/process/fetch.ts b/lib/workers/repository/process/fetch.ts index 8aedd3832a3c18..d599f82ef70a06 100644 --- a/lib/workers/repository/process/fetch.ts +++ b/lib/workers/repository/process/fetch.ts @@ -28,7 +28,8 @@ async function fetchDepUpdates( if (is.string(dep.depName)) { dep.depName = dep.depName.trim(); } - if (!is.nonEmptyString(dep.depName)) { + dep.packageName ??= dep.depName; + if (!is.nonEmptyString(dep.packageName)) { dep.skipReason = 'invalid-name'; } if (dep.isInternal && !packageFileConfig.updateInternalDeps) { diff --git a/lib/workers/repository/process/lookup/index.spec.ts b/lib/workers/repository/process/lookup/index.spec.ts index a9ed162fc30eee..555954cd670580 100644 --- a/lib/workers/repository/process/lookup/index.spec.ts +++ b/lib/workers/repository/process/lookup/index.spec.ts @@ -66,14 +66,14 @@ describe('workers/repository/process/lookup/index', () => { describe('.lookupUpdates()', () => { it('returns null if unknown datasource', async () => { - config.depName = 'some-dep'; + config.packageName = 'some-dep'; config.datasource = 'does not exist'; expect((await lookup.lookupUpdates(config)).updates).toEqual([]); }); it('returns rollback for pinned version', async () => { config.currentValue = '0.9.99'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.rollbackPrs = true; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -85,7 +85,7 @@ describe('workers/repository/process/lookup/index', () => { it('returns rollback for ranged version', async () => { config.currentValue = '^0.9.99'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.rollbackPrs = true; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -97,7 +97,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports minor and major upgrades for tilde ranges', async () => { config.currentValue = '^0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -110,7 +110,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports lock file updates mixed with regular updates', async () => { config.currentValue = '^0.4.0'; config.rangeStrategy = 'update-lockfile'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.separateMinorPatch = true; config.lockedVersion = '0.4.0'; @@ -126,7 +126,7 @@ describe('workers/repository/process/lookup/index', () => { config.groupName = 'somegroup'; config.currentValue = '0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -138,7 +138,7 @@ describe('workers/repository/process/lookup/index', () => { config.groupName = 'somegroup'; config.currentValue = '0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.separateMinorPatch = true; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -152,7 +152,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '0.4.0'; config.rangeStrategy = 'pin'; config.separateMajorMinor = false; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -164,7 +164,7 @@ describe('workers/repository/process/lookup/index', () => { config.minor = { automerge: true }; config.currentValue = '^0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -177,7 +177,7 @@ describe('workers/repository/process/lookup/index', () => { it('enforces allowedVersions', async () => { config.currentValue = '0.4.0'; config.allowedVersions = '<1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(1); @@ -186,7 +186,7 @@ describe('workers/repository/process/lookup/index', () => { it('enforces allowedVersions with regex', async () => { config.currentValue = '0.4.0'; config.allowedVersions = '/^0/'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(1); @@ -195,7 +195,7 @@ describe('workers/repository/process/lookup/index', () => { it('enforces allowedVersions with negative regex', async () => { config.currentValue = '0.4.0'; config.allowedVersions = '!/^1/'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(1); @@ -204,7 +204,7 @@ describe('workers/repository/process/lookup/index', () => { it('falls back to semver syntax allowedVersions', async () => { config.currentValue = '0.4.0'; config.allowedVersions = '<1'; - config.depName = 'q'; + config.packageName = 'q'; config.versioning = dockerVersioningId; // this doesn't make sense but works for this test config.datasource = NpmDatasource.id; // this doesn't make sense but works for this test httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -214,7 +214,7 @@ describe('workers/repository/process/lookup/index', () => { it('falls back to pep440 syntax allowedVersions', async () => { config.currentValue = '0.4.0'; config.allowedVersions = '==0.9.4'; - config.depName = 'q'; + config.packageName = 'q'; config.versioning = poetryVersioningId; // this doesn't make sense but works for this test config.datasource = NpmDatasource.id; // this doesn't make sense but works for this test httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -224,7 +224,7 @@ describe('workers/repository/process/lookup/index', () => { it('skips invalid allowedVersions', async () => { config.currentValue = '0.4.0'; config.allowedVersions = 'less than 1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); await expect(lookup.lookupUpdates(config)).rejects.toThrow( @@ -235,7 +235,7 @@ describe('workers/repository/process/lookup/index', () => { it('returns patch update even if separate patches not configured', async () => { config.currentValue = '0.9.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -254,7 +254,7 @@ describe('workers/repository/process/lookup/index', () => { }; config.currentValue = '0.9.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -266,7 +266,7 @@ describe('workers/repository/process/lookup/index', () => { config.separateMinorPatch = true; config.currentValue = '0.9.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -279,7 +279,7 @@ describe('workers/repository/process/lookup/index', () => { config.separateMinorPatch = true; config.currentValue = '0.8.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -291,7 +291,7 @@ describe('workers/repository/process/lookup/index', () => { config.separateMajorMinor = false; config.currentValue = '^0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -304,7 +304,7 @@ describe('workers/repository/process/lookup/index', () => { config.separateMajorMinor = false; config.currentValue = '1.0.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -315,7 +315,7 @@ describe('workers/repository/process/lookup/index', () => { it('uses minimum version for vulnerabilityAlerts', async () => { config.currentValue = '1.0.0'; config.isVulnerabilityAlert = true; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = (await lookup.lookupUpdates(config)).updates; @@ -326,7 +326,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports minor and major upgrades for ranged versions', async () => { config.currentValue = '~0.4.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -345,7 +345,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '*'; config.rangeStrategy = strategy; config.lockedVersion = '0.4.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -366,7 +366,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = 'x'; config.rangeStrategy = strategy; config.lockedVersion = '0.4.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -379,7 +379,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports pinning for x-range-all (no lockfile)', async () => { config.currentValue = '*'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect(await lookup.lookupUpdates(config)).toMatchObject({ @@ -390,7 +390,7 @@ describe('workers/repository/process/lookup/index', () => { it('covers pinning an unsupported x-range-all value', async () => { config.currentValue = ''; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toEqual([]); @@ -407,7 +407,7 @@ describe('workers/repository/process/lookup/index', () => { async ({ strategy }) => { config.currentValue = 'X'; config.rangeStrategy = strategy; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -420,7 +420,7 @@ describe('workers/repository/process/lookup/index', () => { it('ignores pinning for ranges when other upgrade exists', async () => { config.currentValue = '~0.9.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -432,7 +432,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades minor ranged versions', async () => { config.currentValue = '~1.0.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -445,7 +445,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '^1.2.1'; config.lockedVersion = '1.2.1'; config.rangeStrategy = 'update-lockfile'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -457,7 +457,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '^1.2.1'; config.lockedVersion = '1.2.1'; config.rangeStrategy = 'in-range-only'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -469,7 +469,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '~1.2.0'; config.lockedVersion = '1.2.0'; config.rangeStrategy = 'in-range-only'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -491,7 +491,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles unconstrainedValue values', async () => { config.lockedVersion = '1.2.1'; config.rangeStrategy = 'update-lockfile'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -517,7 +517,7 @@ describe('workers/repository/process/lookup/index', () => { it('widens minor ranged versions if configured', async () => { config.currentValue = '~1.3.0'; config.rangeStrategy = 'widen'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -528,7 +528,7 @@ describe('workers/repository/process/lookup/index', () => { it('replaces minor complex ranged versions if configured', async () => { config.currentValue = '~1.2.0 || ~1.3.0'; config.rangeStrategy = 'replace'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -539,7 +539,7 @@ describe('workers/repository/process/lookup/index', () => { it('widens major ranged versions if configured', async () => { config.currentValue = '^2.0.0'; config.rangeStrategy = 'widen'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -553,7 +553,7 @@ describe('workers/repository/process/lookup/index', () => { it('replaces major complex ranged versions if configured', async () => { config.currentValue = '^1.0.0 || ^2.0.0'; config.rangeStrategy = 'replace'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -567,7 +567,7 @@ describe('workers/repository/process/lookup/index', () => { it('pins minor ranged versions', async () => { config.currentValue = '^1.0.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -579,7 +579,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '^1.0.0'; config.lockedVersion = '1.0.0'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -590,7 +590,7 @@ describe('workers/repository/process/lookup/index', () => { it('ignores minor ranged versions when not pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '^1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(0); @@ -600,7 +600,7 @@ describe('workers/repository/process/lookup/index', () => { config.rangeStrategy = 'replace'; config.currentValue = '^1.0.0'; config.lockedVersion = '1.1.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(0); @@ -609,7 +609,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades tilde ranges', async () => { config.rangeStrategy = 'pin'; config.currentValue = '~1.3.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -621,7 +621,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades .x minor ranges', async () => { config.currentValue = '1.3.x'; config.rangeStrategy = 'pin'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -633,7 +633,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades tilde ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '~1.3.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -644,7 +644,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades .x major ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '0.x'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -655,7 +655,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades .x minor ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '1.3.x'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -666,7 +666,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades .x complex minor ranges without pinning', async () => { config.rangeStrategy = 'widen'; config.currentValue = '1.2.x - 1.3.x'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -677,7 +677,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades shorthand major ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -688,7 +688,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades shorthand minor ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '1.3'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -699,7 +699,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades multiple tilde ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '~0.7.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -711,7 +711,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades multiple caret ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '^0.7.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -723,7 +723,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports complex ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '^0.7.0 || ^0.8.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -737,7 +737,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports complex major ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '^1.0.0 || ^2.0.0'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -754,7 +754,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports complex major hyphen ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '1.x - 2.x'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -768,7 +768,7 @@ describe('workers/repository/process/lookup/index', () => { it('widens .x OR ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '1.x || 2.x'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -782,7 +782,7 @@ describe('workers/repository/process/lookup/index', () => { it('widens stanndalone major OR ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '1 || 2'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -796,7 +796,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports complex tilde ranges', async () => { config.rangeStrategy = 'widen'; config.currentValue = '~1.2.0 || ~1.3.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -807,7 +807,7 @@ describe('workers/repository/process/lookup/index', () => { it('returns nothing for greater than ranges', async () => { config.rangeStrategy = 'replace'; config.currentValue = '>= 0.7.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toHaveLength(0); @@ -816,7 +816,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades less than equal ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '<= 0.7.2'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -828,7 +828,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades less than ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '< 0.7.2'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -840,7 +840,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades less than major ranges', async () => { config.rangeStrategy = 'replace'; config.currentValue = '< 1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -851,7 +851,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades less than equal minor ranges', async () => { config.rangeStrategy = 'replace'; config.currentValue = '<= 1.3'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -862,7 +862,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades equal minor ranges', async () => { config.rangeStrategy = 'replace'; config.currentValue = '=1.3.1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -874,7 +874,7 @@ describe('workers/repository/process/lookup/index', () => { config.rangeStrategy = 'replace'; config.respectLatest = false; config.currentValue = '<= 1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -885,7 +885,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades major less than equal ranges', async () => { config.rangeStrategy = 'replace'; config.currentValue = '<= 1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -896,7 +896,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades major less than ranges without pinning', async () => { config.rangeStrategy = 'replace'; config.currentValue = '< 1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -907,7 +907,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades major greater than less than ranges without pinning', async () => { config.rangeStrategy = 'widen'; config.currentValue = '>= 0.5.0 < 1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -918,7 +918,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades minor greater than less than ranges without pinning', async () => { config.rangeStrategy = 'widen'; config.currentValue = '>= 0.5.0 <0.8'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -930,7 +930,7 @@ describe('workers/repository/process/lookup/index', () => { it('upgrades minor greater than less than equals ranges without pinning', async () => { config.rangeStrategy = 'widen'; config.currentValue = '>= 0.5.0 <= 0.8.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -942,7 +942,7 @@ describe('workers/repository/process/lookup/index', () => { it('rejects reverse ordered less than greater than', async () => { config.rangeStrategy = 'widen'; config.currentValue = '<= 0.8.0 >= 0.5.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -952,7 +952,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports > latest versions if configured', async () => { config.respectLatest = false; config.currentValue = '1.4.1'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -962,7 +962,7 @@ describe('workers/repository/process/lookup/index', () => { it('should ignore unstable versions if the current version is stable', async () => { config.currentValue = '2.5.16'; - config.depName = 'vue'; + config.packageName = 'vue'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -973,7 +973,7 @@ describe('workers/repository/process/lookup/index', () => { it('should ignore unstable versions from datasource', async () => { config.currentValue = '1.4.4'; - config.depName = 'some/action'; + config.packageName = 'some/action'; config.datasource = GithubReleasesDatasource.id; getGithubReleases.mockResolvedValueOnce({ releases: [ @@ -989,7 +989,7 @@ describe('workers/repository/process/lookup/index', () => { it('should return pendingChecks', async () => { config.currentValue = '1.4.4'; - config.depName = 'some/action'; + config.packageName = 'some/action'; config.datasource = GithubReleasesDatasource.id; config.stabilityDays = 14; config.internalChecksFilter = 'strict'; @@ -1012,7 +1012,7 @@ describe('workers/repository/process/lookup/index', () => { it('should return pendingVersions', async () => { config.currentValue = '1.4.4'; - config.depName = 'some/action'; + config.packageName = 'some/action'; config.datasource = GithubReleasesDatasource.id; config.stabilityDays = 3; config.internalChecksFilter = 'strict'; @@ -1037,7 +1037,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = '2.5.16'; config.ignoreUnstable = false; config.respectLatest = false; - config.depName = 'vue'; + config.packageName = 'vue'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1051,7 +1051,7 @@ describe('workers/repository/process/lookup/index', () => { it('should allow unstable versions if the current version is unstable', async () => { config.currentValue = '3.1.0-dev.20180731'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1065,7 +1065,7 @@ describe('workers/repository/process/lookup/index', () => { it('should not jump unstable versions', async () => { config.currentValue = '3.0.1-insiders.20180726'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1080,7 +1080,7 @@ describe('workers/repository/process/lookup/index', () => { it('should update pinned versions if updatePinnedDependencies=true', async () => { config.currentValue = '0.0.34'; config.updatePinnedDependencies = true; - config.depName = '@types/helmet'; + config.packageName = '@types/helmet'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1095,7 +1095,7 @@ describe('workers/repository/process/lookup/index', () => { it('should not update pinned versions if updatePinnedDependencies=false', async () => { config.currentValue = '0.0.34'; config.updatePinnedDependencies = false; - config.depName = '@types/helmet'; + config.packageName = '@types/helmet'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1107,7 +1107,7 @@ describe('workers/repository/process/lookup/index', () => { it('should follow dist-tag even if newer version exists', async () => { config.currentValue = '3.0.1-insiders.20180713'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; config.followTag = 'insiders'; httpMock @@ -1122,7 +1122,7 @@ describe('workers/repository/process/lookup/index', () => { it('should roll back to dist-tag if current version is higher', async () => { config.currentValue = '3.1.0-dev.20180813'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; config.followTag = 'insiders'; config.rollbackPrs = true; @@ -1138,7 +1138,7 @@ describe('workers/repository/process/lookup/index', () => { it('should jump unstable versions if followTag', async () => { config.currentValue = '3.0.0-insiders.20180706'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; config.followTag = 'insiders'; httpMock @@ -1153,7 +1153,7 @@ describe('workers/repository/process/lookup/index', () => { it('should update nothing if current version is dist-tag', async () => { config.currentValue = '3.0.1-insiders.20180726'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; config.followTag = 'insiders'; httpMock @@ -1166,7 +1166,7 @@ describe('workers/repository/process/lookup/index', () => { it('should warn if no version matches dist-tag', async () => { config.currentValue = '3.0.1-dev.20180726'; - config.depName = 'typescript'; + config.packageName = 'typescript'; config.datasource = NpmDatasource.id; config.followTag = 'foo'; httpMock @@ -1186,7 +1186,7 @@ describe('workers/repository/process/lookup/index', () => { config.currentValue = 'v1.0.0'; config.currentDigest = 'bla'; config.digestOneAndOnly = true; - config.depName = 'angular/angular'; + config.packageName = 'angular/angular'; config.datasource = GithubTagsDatasource.id; // Only mock calls once so that the second invocation results in @@ -1215,7 +1215,7 @@ describe('workers/repository/process/lookup/index', () => { it('should not warn if no new digest could be found', async () => { config.currentValue = 'v1.0.0'; config.digestOneAndOnly = true; - config.depName = 'angular/angular'; + config.packageName = 'angular/angular'; config.pinDigests = true; config.datasource = GithubTagsDatasource.id; @@ -1240,7 +1240,7 @@ describe('workers/repository/process/lookup/index', () => { it('should treat zero zero tilde ranges as 0.0.x', async () => { config.rangeStrategy = 'replace'; config.currentValue = '~0.0.34'; - config.depName = '@types/helmet'; + config.packageName = '@types/helmet'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1252,7 +1252,7 @@ describe('workers/repository/process/lookup/index', () => { it('should treat zero zero caret ranges as pinned', async () => { config.rangeStrategy = 'replace'; config.currentValue = '^0.0.34'; - config.depName = '@types/helmet'; + config.packageName = '@types/helmet'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1265,7 +1265,7 @@ describe('workers/repository/process/lookup/index', () => { it('should downgrade from missing versions', async () => { config.currentValue = '1.16.1'; - config.depName = 'coffeelint'; + config.packageName = 'coffeelint'; config.datasource = NpmDatasource.id; config.rollbackPrs = true; httpMock @@ -1279,7 +1279,7 @@ describe('workers/repository/process/lookup/index', () => { it('should upgrade to only one major', async () => { config.currentValue = '1.0.0'; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1292,7 +1292,7 @@ describe('workers/repository/process/lookup/index', () => { it('should upgrade to two majors', async () => { config.currentValue = '1.0.0'; config.separateMultipleMajor = true; - config.depName = 'webpack'; + config.packageName = 'webpack'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1305,7 +1305,7 @@ describe('workers/repository/process/lookup/index', () => { it('does not jump major unstable', async () => { config.currentValue = '^4.4.0-canary.3'; config.rangeStrategy = 'replace'; - config.depName = 'next'; + config.packageName = 'next'; config.datasource = NpmDatasource.id; httpMock .scope('https://registry.npmjs.org') @@ -1318,7 +1318,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports in-range caret updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '^1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -1329,7 +1329,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports in-range tilde updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '~1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.separateMinorPatch = true; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -1342,7 +1342,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports in-range tilde patch updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '~1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.separateMinorPatch = true; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -1355,7 +1355,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports in-range gte updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '>=1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([ @@ -1366,7 +1366,7 @@ describe('workers/repository/process/lookup/index', () => { it('supports majorgte updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '>=0.9.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.separateMajorMinor = false; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -1378,7 +1378,7 @@ describe('workers/repository/process/lookup/index', () => { it('rejects in-range unsupported operator', async () => { config.rangeStrategy = 'bump'; config.currentValue = '>1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([]); @@ -1387,7 +1387,7 @@ describe('workers/repository/process/lookup/index', () => { it('rejects non-fully specified in-range updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '1.x'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([]); @@ -1396,14 +1396,14 @@ describe('workers/repository/process/lookup/index', () => { it('rejects complex range in-range updates', async () => { config.rangeStrategy = 'bump'; config.currentValue = '^0.9.0 || ^1.0.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); expect((await lookup.lookupUpdates(config)).updates).toMatchObject([]); }); it('replaces non-range in-range updates', async () => { - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.packageFile = 'package.json'; config.rangeStrategy = 'bump'; @@ -1415,7 +1415,7 @@ describe('workers/repository/process/lookup/index', () => { }); it('handles github 404', async () => { - config.depName = 'foo'; + config.packageName = 'foo'; config.datasource = GithubTagsDatasource.id; config.packageFile = 'package.json'; config.currentValue = '1.0.0'; @@ -1424,7 +1424,7 @@ describe('workers/repository/process/lookup/index', () => { }); it('handles pypi 404', async () => { - config.depName = 'foo'; + config.packageName = 'foo'; config.datasource = PypiDatasource.id; config.packageFile = 'requirements.txt'; config.currentValue = '1.0.0'; @@ -1436,7 +1436,7 @@ describe('workers/repository/process/lookup/index', () => { }); it('handles packagist', async () => { - config.depName = 'foo/bar'; + config.packageName = 'foo/bar'; config.datasource = PackagistDatasource.id; config.packageFile = 'composer.json'; config.currentValue = '1.0.0'; @@ -1449,7 +1449,7 @@ describe('workers/repository/process/lookup/index', () => { }); it('handles unknown datasource', async () => { - config.depName = 'foo'; + config.packageName = 'foo'; config.datasource = 'typo'; config.packageFile = 'package.json'; config.currentValue = '1.0.0'; @@ -1464,7 +1464,7 @@ describe('workers/repository/process/lookup/index', () => { config.rangeStrategy = 'pin'; config.lockedVersion = '0.9.4'; config.currentValue = '~=0.9'; - config.depName = 'q'; + config.packageName = 'q'; // TODO: we are using npm as source to test pep440 (#9721) config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); @@ -1477,7 +1477,7 @@ describe('workers/repository/process/lookup/index', () => { it('returns complex object', async () => { config.currentValue = '1.3.0'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; httpMock.scope('https://registry.npmjs.org').get('/q').reply(200, qJson); const res = await lookup.lookupUpdates(config); @@ -1487,7 +1487,7 @@ describe('workers/repository/process/lookup/index', () => { it('ignores deprecated', async () => { config.currentValue = '1.3.0'; - config.depName = 'q2'; + config.packageName = 'q2'; config.datasource = NpmDatasource.id; const returnJson = JSON.parse(JSON.stringify(qJson)); returnJson.name = 'q2'; @@ -1503,7 +1503,7 @@ describe('workers/repository/process/lookup/index', () => { it('is deprecated', async () => { config.currentValue = '1.3.0'; - config.depName = 'q3'; + config.packageName = 'q3'; config.datasource = NpmDatasource.id; const returnJson = { ...JSON.parse(JSON.stringify(qJson)), @@ -1523,14 +1523,14 @@ describe('workers/repository/process/lookup/index', () => { it('skips unsupported values', async () => { config.currentValue = 'alpine'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; const res = await lookup.lookupUpdates(config); expect(res).toMatchSnapshot({ skipReason: 'invalid-value' }); }); it('skips undefined values', async () => { - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; const res = await lookup.lookupUpdates(config); expect(res).toMatchSnapshot({ skipReason: 'invalid-value' }); @@ -1538,7 +1538,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest pin', async () => { config.currentValue = '8.0.0'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.pinDigests = true; docker.getReleases.mockResolvedValueOnce({ @@ -1575,7 +1575,7 @@ describe('workers/repository/process/lookup/index', () => { it('skips uncompatible versions for 8.1.0', async () => { config.currentValue = '8.1.0'; - config.depName = 'node'; + config.packageName = 'node'; config.versioning = dockerVersioningId; config.datasource = DockerDatasource.id; docker.getReleases.mockResolvedValueOnce({ @@ -1599,7 +1599,7 @@ describe('workers/repository/process/lookup/index', () => { it('skips uncompatible versions for 8.1', async () => { config.currentValue = '8.1'; - config.depName = 'node'; + config.packageName = 'node'; config.versioning = dockerVersioningId; config.datasource = DockerDatasource.id; docker.getReleases.mockResolvedValueOnce({ @@ -1632,7 +1632,7 @@ describe('workers/repository/process/lookup/index', () => { it('skips uncompatible versions for 8', async () => { config.currentValue = '8'; - config.depName = 'node'; + config.packageName = 'node'; config.versioning = dockerVersioningId; config.datasource = DockerDatasource.id; docker.getReleases.mockResolvedValueOnce({ @@ -1656,7 +1656,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest pin for up to date version', async () => { config.currentValue = '8.1.0'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.pinDigests = true; docker.getReleases.mockResolvedValueOnce({ @@ -1685,7 +1685,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest pin for non-version', async () => { config.currentValue = 'alpine'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.pinDigests = true; docker.getReleases.mockResolvedValueOnce({ @@ -1717,7 +1717,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest lookup failure', async () => { config.currentValue = 'alpine'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.pinDigests = true; docker.getReleases.mockResolvedValueOnce({ @@ -1740,7 +1740,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest update', async () => { config.currentValue = '8.0.0'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.currentDigest = 'sha256:zzzzzzzzzzzzzzz'; config.pinDigests = true; @@ -1775,7 +1775,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles digest update for non-version', async () => { config.currentValue = 'alpine'; - config.depName = 'node'; + config.packageName = 'node'; config.datasource = DockerDatasource.id; config.currentDigest = 'sha256:zzzzzzzzzzzzzzz'; config.pinDigests = true; @@ -1806,7 +1806,7 @@ describe('workers/repository/process/lookup/index', () => { }); it('handles git submodule update', async () => { - config.depName = 'some-path'; + config.packageName = 'some-path'; config.versioning = gitVersioningId; config.datasource = GitRefsDatasource.id; config.currentDigest = 'some-digest'; @@ -1825,7 +1825,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles sourceUrl packageRules with version restrictions', async () => { config.currentValue = '0.9.99'; - config.depName = 'q'; + config.packageName = 'q'; config.datasource = NpmDatasource.id; config.packageRules = [ { @@ -1843,7 +1843,7 @@ describe('workers/repository/process/lookup/index', () => { it('handles replacements', async () => { config.currentValue = '1.4.1'; - config.depName = 'q'; + config.packageName = 'q'; // This config is normally set when packageRules are applied config.replacementName = 'r'; config.replacementVersion = '2.0.0'; @@ -1855,7 +1855,7 @@ describe('workers/repository/process/lookup/index', () => { it('rollback for invalid version to last stable version', async () => { config.currentValue = '2.5.17'; - config.depName = 'vue'; + config.packageName = 'vue'; config.datasource = NpmDatasource.id; config.rollbackPrs = true; config.ignoreUnstable = true; diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index 72039cbd938cd9..57c8ed1ccf5d99 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -35,11 +35,11 @@ export async function lookupUpdates( currentDigest, currentValue, datasource, - depName, digestOneAndOnly, followTag, lockedVersion, packageFile, + packageName, pinDigests, rollbackPrs, isVulnerabilityAlert, @@ -52,7 +52,7 @@ export async function lookupUpdates( warnings: [], } as any; try { - logger.trace({ dependency: depName, currentValue }, 'lookupUpdates'); + logger.trace({ dependency: packageName, currentValue }, 'lookupUpdates'); // Use the datasource's default versioning if none is configured config.versioning ??= getDefaultVersioning(datasource); const versioning = allVersioning.get(config.versioning); @@ -80,16 +80,16 @@ export async function lookupUpdates( if (!dependency) { // If dependency lookup fails then warn and return const warning: ValidationMessage = { - topic: depName, - message: `Failed to look up ${datasource} dependency ${depName}`, + topic: packageName, + message: `Failed to look up ${datasource} dependency ${packageName}`, }; - logger.debug({ dependency: depName, packageFile }, warning.message); + logger.debug({ dependency: packageName, packageFile }, warning.message); // TODO: return warnings in own field res.warnings.push(warning); return res; } if (dependency.deprecationMessage) { - logger.debug(`Found deprecationMessage for dependency ${depName}`); + logger.debug(`Found deprecationMessage for dependency ${packageName}`); res.deprecationMessage = dependency.deprecationMessage; } @@ -111,7 +111,7 @@ export async function lookupUpdates( // istanbul ignore if if (allVersions.length === 0) { const message = `Found no results from datasource that look like a version`; - logger.debug({ dependency: depName, result: dependency }, message); + logger.debug({ dependency: packageName, result: dependency }, message); if (!currentDigest) { return res; } @@ -122,8 +122,8 @@ export async function lookupUpdates( const taggedVersion = dependency.tags?.[followTag]; if (!taggedVersion) { res.warnings.push({ - topic: depName, - message: `Can't find version with tag ${followTag} for ${depName}`, + topic: packageName, + message: `Can't find version with tag ${followTag} for ${packageName}`, }); return res; } @@ -145,9 +145,9 @@ export async function lookupUpdates( // istanbul ignore if if (!rollback) { res.warnings.push({ - topic: depName, + topic: packageName, // TODO: types (#7154) - message: `Can't find version matching ${currentValue!} for ${depName}`, + message: `Can't find version matching ${currentValue!} for ${packageName}`, }); return res; } @@ -311,7 +311,7 @@ export async function lookupUpdates( // istanbul ignore if if (rangeStrategy === 'bump') { logger.trace( - { depName, currentValue, lockedVersion, newVersion }, + { packageName, currentValue, lockedVersion, newVersion }, 'Skipping bump because newValue is the same' ); continue; @@ -326,7 +326,7 @@ export async function lookupUpdates( } } else if (currentValue) { logger.debug( - `Dependency ${depName} has unsupported value ${currentValue}` + `Dependency ${packageName} has unsupported value ${currentValue}` ); if (!pinDigests && !currentDigest) { res.skipReason = 'invalid-value'; @@ -387,7 +387,7 @@ export async function lookupUpdates( if (update.newDigest === null) { logger.debug( { - depName, + packageName, currentValue, datasource, newValue: update.newValue, @@ -401,7 +401,7 @@ export async function lookupUpdates( if (currentDigest) { res.warnings.push({ message: `Could not determine new digest for update (datasource: ${datasource})`, - topic: depName, + topic: packageName, }); } } @@ -451,7 +451,7 @@ export async function lookupUpdates( currentDigest, currentValue, datasource, - depName, + packageName, digestOneAndOnly, followTag, lockedVersion, diff --git a/lib/workers/repository/process/lookup/types.ts b/lib/workers/repository/process/lookup/types.ts index 5d0a85f5971ef8..92e489c6dc790e 100644 --- a/lib/workers/repository/process/lookup/types.ts +++ b/lib/workers/repository/process/lookup/types.ts @@ -42,7 +42,7 @@ export interface LookupUpdateConfig separateMajorMinor?: boolean; separateMultipleMajor?: boolean; datasource: string; - depName: string; + packageName: string; minimumConfidence?: string; replacementName?: string; replacementVersion?: string; diff --git a/lib/workers/repository/update/pr/changelog/releases.spec.ts b/lib/workers/repository/update/pr/changelog/releases.spec.ts index 70fbddf173969e..5e4c7958950ab4 100644 --- a/lib/workers/repository/update/pr/changelog/releases.spec.ts +++ b/lib/workers/repository/update/pr/changelog/releases.spec.ts @@ -41,7 +41,7 @@ describe('workers/repository/update/pr/changelog/releases', () => { it('should contain only stable', async () => { const config = partial({ datasource: 'some-datasource', - depName: 'some-depname', + packageName: 'some-depname', versioning: npmVersioning.id, currentVersion: '1.0.0', newVersion: '1.1.0', @@ -54,7 +54,7 @@ describe('workers/repository/update/pr/changelog/releases', () => { it('should contain currentVersion unstable', async () => { const config = partial({ datasource: 'some-datasource', - depName: 'some-depname', + packageName: 'some-depname', versioning: npmVersioning.id, currentVersion: '1.0.1-rc0', newVersion: '1.1.0', @@ -67,7 +67,7 @@ describe('workers/repository/update/pr/changelog/releases', () => { it('should contain newVersion unstable', async () => { const config = partial({ datasource: 'some-datasource', - depName: 'some-depname', + packageName: 'some-depname', versioning: npmVersioning.id, currentVersion: '1.0.1', newVersion: '1.2.0-rc1', @@ -80,7 +80,7 @@ describe('workers/repository/update/pr/changelog/releases', () => { it('should contain both currentVersion newVersion unstable', async () => { const config = partial({ datasource: 'some-datasource', - depName: 'some-depname', + packageName: 'some-depname', versioning: npmVersioning.id, currentVersion: '1.0.1-rc0', newVersion: '1.2.0-rc1', @@ -93,7 +93,7 @@ describe('workers/repository/update/pr/changelog/releases', () => { it('should valueToVersion', async () => { const config = partial({ datasource: 'some-datasource', - depName: 'some-depname', + packageName: 'some-depname', versioning: dockerVersioning.id, currentVersion: '1.0.1-rc0', newVersion: '1.2.0-rc0',