@ckeditor/ckeditor5-dev-release-tools 40.3.1 → 40.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -30,6 +30,8 @@ const executeInParallel = require( './utils/executeinparallel' );
|
|
|
30
30
|
const validateRepositoryToRelease = require( './utils/validaterepositorytorelease' );
|
|
31
31
|
const checkVersionAvailability = require( './utils/checkversionavailability' );
|
|
32
32
|
const verifyPackagesPublishedCorrectly = require( './tasks/verifypackagespublishedcorrectly' );
|
|
33
|
+
const getNpmTagFromVersion = require( './utils/getnpmtagfromversion' );
|
|
34
|
+
const isVersionPublishableForTag = require( './utils/isversionpublishablefortag' );
|
|
33
35
|
|
|
34
36
|
module.exports = {
|
|
35
37
|
generateChangelogForSinglePackage,
|
|
@@ -51,10 +53,12 @@ module.exports = {
|
|
|
51
53
|
getNextNightly,
|
|
52
54
|
getCurrent,
|
|
53
55
|
getLastTagFromGit,
|
|
56
|
+
getNpmTagFromVersion,
|
|
54
57
|
getChangesForVersion,
|
|
55
58
|
getChangelog,
|
|
56
59
|
saveChangelog,
|
|
57
60
|
validateRepositoryToRelease,
|
|
58
61
|
verifyPackagesPublishedCorrectly,
|
|
59
|
-
checkVersionAvailability
|
|
62
|
+
checkVersionAvailability,
|
|
63
|
+
isVersionPublishableForTag
|
|
60
64
|
};
|
|
@@ -26,7 +26,7 @@ module.exports = async function verifyPackagesPublishedCorrectly( options ) {
|
|
|
26
26
|
const errors = [];
|
|
27
27
|
|
|
28
28
|
if ( !packagesToVerify.length ) {
|
|
29
|
-
onSuccess( '
|
|
29
|
+
onSuccess( 'No packages found to check for upload error 409.' );
|
|
30
30
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
@@ -51,5 +51,5 @@ module.exports = async function verifyPackagesPublishedCorrectly( options ) {
|
|
|
51
51
|
throw new Error( 'Packages that were uploaded incorrectly, and need manual verification:\n' + errors.join( '\n' ) );
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
onSuccess( '
|
|
54
|
+
onSuccess( 'All packages that returned 409 were uploaded correctly.' );
|
|
55
55
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const semver = require( 'semver' );
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {String} version
|
|
12
|
+
* @returns {String}
|
|
13
|
+
*/
|
|
14
|
+
module.exports = function getNpmTagFromVersion( version ) {
|
|
15
|
+
const [ versionTag ] = semver.prerelease( version ) || [ 'latest' ];
|
|
16
|
+
|
|
17
|
+
return versionTag;
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
7
|
+
const semver = require( 'semver' );
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This util aims to verify if the given `packageName` can be published with the given `version` on the `npmTag`.
|
|
11
|
+
*
|
|
12
|
+
* @param {String} packageName
|
|
13
|
+
* @param {String} version
|
|
14
|
+
* @param {String} npmTag
|
|
15
|
+
* @return {Promise.<Boolean>}
|
|
16
|
+
*/
|
|
17
|
+
module.exports = async function isVersionPublishableForTag( packageName, version, npmTag ) {
|
|
18
|
+
const npmVersion = await tools.shExec( `npm view ${ packageName }@${ npmTag } version --silent`, { async: true, verbosity: 'silent' } )
|
|
19
|
+
.then( value => value.trim() )
|
|
20
|
+
// An `npmTag` does not exist.
|
|
21
|
+
.catch( () => null );
|
|
22
|
+
|
|
23
|
+
if ( npmVersion && semver.lte( version, npmVersion ) ) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true;
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-release-tools",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.5.0-alpha.0",
|
|
4
4
|
"description": "Tools used for releasing CKEditor 5 and related packages.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ckeditor/ckeditor5-dev-utils": "^40.
|
|
8
|
+
"@ckeditor/ckeditor5-dev-utils": "^40.5.0-alpha.0",
|
|
9
9
|
"@octokit/rest": "^19.0.0",
|
|
10
10
|
"chalk": "^4.0.0",
|
|
11
11
|
"cli-table": "^0.3.1",
|