diff --git a/packages/ckeditor5-dev-release-tools/lib/utils/checkversionavailability.js b/packages/ckeditor5-dev-release-tools/lib/utils/checkversionavailability.js index cd3e5918a..86d91b23b 100644 --- a/packages/ckeditor5-dev-release-tools/lib/utils/checkversionavailability.js +++ b/packages/ckeditor5-dev-release-tools/lib/utils/checkversionavailability.js @@ -15,7 +15,7 @@ import pacote from 'pacote'; * @returns {Promise} */ export default async function checkVersionAvailability( version, packageName ) { - return pacote.manifest( `${ packageName }@${ version }` ) + return pacote.manifest( `${ packageName }@${ version }`, { cache: null } ) .then( () => { // If `pacote.manifest` resolves, a package with the given version exists. return false; diff --git a/packages/ckeditor5-dev-release-tools/lib/utils/isversionpublishablefortag.js b/packages/ckeditor5-dev-release-tools/lib/utils/isversionpublishablefortag.js index b5dffa6e5..185e81fef 100644 --- a/packages/ckeditor5-dev-release-tools/lib/utils/isversionpublishablefortag.js +++ b/packages/ckeditor5-dev-release-tools/lib/utils/isversionpublishablefortag.js @@ -15,7 +15,7 @@ import pacote from 'pacote'; * @returns {Promise.} */ export default async function isVersionPublishableForTag( packageName, version, npmTag ) { - const npmVersion = await pacote.manifest( `${ packageName }@${ npmTag }` ) + const npmVersion = await pacote.manifest( `${ packageName }@${ npmTag }`, { cache: null } ) .then( ( { version } ) => version ) // An `npmTag` does not exist, or it's a first release of a package. .catch( () => null ); diff --git a/packages/ckeditor5-dev-release-tools/lib/utils/versions.js b/packages/ckeditor5-dev-release-tools/lib/utils/versions.js index 50ec2c066..d874b0ec8 100644 --- a/packages/ckeditor5-dev-release-tools/lib/utils/versions.js +++ b/packages/ckeditor5-dev-release-tools/lib/utils/versions.js @@ -38,7 +38,7 @@ export function getLastFromChangelog( cwd = process.cwd() ) { export function getLastPreRelease( releaseIdentifier, cwd = process.cwd() ) { const packageName = getPackageJson( cwd ).name; - return pacote.packument( packageName ) + return pacote.packument( packageName, { cache: null } ) .then( result => { const lastVersion = Object.keys( result.versions ) .filter( version => version.startsWith( releaseIdentifier ) ) diff --git a/packages/ckeditor5-dev-release-tools/tests/utils/checkversionavailability.js b/packages/ckeditor5-dev-release-tools/tests/utils/checkversionavailability.js index 1fad4a5dc..520210d47 100644 --- a/packages/ckeditor5-dev-release-tools/tests/utils/checkversionavailability.js +++ b/packages/ckeditor5-dev-release-tools/tests/utils/checkversionavailability.js @@ -15,7 +15,7 @@ describe( 'checkVersionAvailability()', () => { await expect( checkVersionAvailability( '1.0.1', 'stub-package' ) ).resolves.toBe( true ); - expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'stub-package@1.0.1' ); + expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'stub-package@1.0.1', { cache: null } ); } ); it( 'should resolve to false if version exists', async () => { pacote.manifest.mockResolvedValue( '1.0.1' ); diff --git a/packages/ckeditor5-dev-release-tools/tests/utils/isversionpublishablefortag.js b/packages/ckeditor5-dev-release-tools/tests/utils/isversionpublishablefortag.js index 81e3f9632..8a201d0dd 100644 --- a/packages/ckeditor5-dev-release-tools/tests/utils/isversionpublishablefortag.js +++ b/packages/ckeditor5-dev-release-tools/tests/utils/isversionpublishablefortag.js @@ -23,7 +23,7 @@ describe( 'isVersionPublishableForTag()', () => { expect( result ).to.equal( false ); expect( semver.lte ).toHaveBeenCalledExactlyOnceWith( '1.0.0', '1.0.0' ); - expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'package-name@latest' ); + expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'package-name@latest', { cache: null } ); } ); it( 'should return false if given version is not higher than the latest published', async () => { @@ -46,6 +46,6 @@ describe( 'isVersionPublishableForTag()', () => { expect( result ).to.equal( true ); expect( semver.lte ).not.toHaveBeenCalled(); - expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'package-name@alpha' ); + expect( pacote.manifest ).toHaveBeenCalledExactlyOnceWith( 'package-name@alpha', expect.any( Object ) ); } ); } ); diff --git a/packages/ckeditor5-dev-release-tools/tests/utils/versions.js b/packages/ckeditor5-dev-release-tools/tests/utils/versions.js index 2b1d7105e..18a853b3f 100644 --- a/packages/ckeditor5-dev-release-tools/tests/utils/versions.js +++ b/packages/ckeditor5-dev-release-tools/tests/utils/versions.js @@ -114,7 +114,7 @@ describe( 'versions', () => { return getLastPreRelease( '42.0.0-alpha' ) .then( () => { expect( vi.mocked( pacote ).packument ).toHaveBeenCalledTimes( 1 ); - expect( vi.mocked( pacote ).packument ).toHaveBeenCalledWith( 'ckeditor5' ); + expect( vi.mocked( pacote ).packument ).toHaveBeenCalledWith( 'ckeditor5', { cache: null } ); } ); } );