@ckeditor/ckeditor5-dev-release-tools 42.1.0 → 43.0.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.
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
9
9
|
const { toUnix } = require( 'upath' );
|
|
10
10
|
const { glob } = require( 'glob' );
|
|
11
|
+
const shellEscape = require( 'shell-escape' );
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Creates a commit and a tag for specified version.
|
|
@@ -34,9 +35,10 @@ module.exports = async function commitAndTag( { version, files, cwd = process.cw
|
|
|
34
35
|
|
|
35
36
|
// Run the command separately for each file to avoid exceeding the maximum command length on Windows, which is 32767 characters.
|
|
36
37
|
for ( const filePath of filePathsToAdd ) {
|
|
37
|
-
await tools.shExec( `git add ${ filePath }`, shExecOptions );
|
|
38
|
+
await tools.shExec( `git add ${ shellEscape( [ filePath ] ) }`, shExecOptions );
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
await tools.shExec( `git
|
|
41
|
+
const escapedVersion = shellEscape( [ version ] );
|
|
42
|
+
await tools.shExec( `git commit --message "Release: v${ escapedVersion }." --no-verify`, shExecOptions );
|
|
43
|
+
await tools.shExec( `git tag v${ escapedVersion }`, shExecOptions );
|
|
42
44
|
};
|
package/lib/tasks/push.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
9
|
+
const shellEscape = require( 'shell-escape' );
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Push the local changes to a remote server.
|
|
@@ -23,7 +24,7 @@ module.exports = async function push( options ) {
|
|
|
23
24
|
cwd = process.cwd()
|
|
24
25
|
} = options;
|
|
25
26
|
|
|
26
|
-
const command = `git push origin ${ releaseBranch } v${ version }`;
|
|
27
|
+
const command = `git push origin ${ shellEscape( [ releaseBranch ] ) } v${ shellEscape( [ version ] ) }`;
|
|
27
28
|
|
|
28
29
|
return tools.shExec( command, { cwd, verbosity: 'error', async: true } );
|
|
29
30
|
};
|
|
@@ -13,6 +13,7 @@ const chalk = require( 'chalk' );
|
|
|
13
13
|
const columns = require( 'cli-columns' );
|
|
14
14
|
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
15
15
|
const util = require( 'util' );
|
|
16
|
+
const shellEscape = require( 'shell-escape' );
|
|
16
17
|
const exec = util.promisify( require( 'child_process' ).exec );
|
|
17
18
|
const assertNpmAuthorization = require( '../utils/assertnpmauthorization' );
|
|
18
19
|
|
|
@@ -37,7 +38,8 @@ module.exports = async function reassignNpmTags( { npmOwner, version, packages }
|
|
|
37
38
|
counter.start();
|
|
38
39
|
|
|
39
40
|
const updateTagPromises = packages.map( async packageName => {
|
|
40
|
-
const
|
|
41
|
+
const command = `npm dist-tag add ${ shellEscape( [ packageName ] ) }@${ shellEscape( [ version ] ) } latest`;
|
|
42
|
+
const updateLatestTagRetryable = retry( () => exec( command ) );
|
|
41
43
|
await updateLatestTagRetryable()
|
|
42
44
|
.then( response => {
|
|
43
45
|
if ( response.stdout ) {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
9
|
+
const shellEscape = require( 'shell-escape' );
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Checks if the provided version for the package exists in the npm registry.
|
|
@@ -18,7 +19,9 @@ const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
|
18
19
|
* @returns {Promise}
|
|
19
20
|
*/
|
|
20
21
|
module.exports = async function checkVersionAvailability( version, packageName ) {
|
|
21
|
-
|
|
22
|
+
const command = `npm show ${ shellEscape( [ packageName ] ) }@${ shellEscape( [ version ] ) } version`;
|
|
23
|
+
|
|
24
|
+
return tools.shExec( command, { verbosity: 'silent', async: true } )
|
|
22
25
|
.then( result => {
|
|
23
26
|
// Explicit check for npm < 8.13.0, which does not return anything (an empty result) and it exits with a zero status code when
|
|
24
27
|
// the version for the provided package does not exist in the npm registry.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
|
|
7
7
|
const semver = require( 'semver' );
|
|
8
|
+
const shellEscape = require( 'shell-escape' );
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* This util aims to verify if the given `packageName` can be published with the given `version` on the `npmTag`.
|
|
@@ -15,7 +16,8 @@ const semver = require( 'semver' );
|
|
|
15
16
|
* @return {Promise.<Boolean>}
|
|
16
17
|
*/
|
|
17
18
|
module.exports = async function isVersionPublishableForTag( packageName, version, npmTag ) {
|
|
18
|
-
const
|
|
19
|
+
const command = `npm view ${ shellEscape( [ packageName ] ) }@${ shellEscape( [ npmTag ] ) } version --silent`;
|
|
20
|
+
const npmVersion = await tools.shExec( command, { async: true, verbosity: 'silent' } )
|
|
19
21
|
.then( value => value.trim() )
|
|
20
22
|
// An `npmTag` does not exist.
|
|
21
23
|
.catch( () => null );
|
package/package.json
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-release-tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "43.0.0",
|
|
4
4
|
"description": "Tools used for releasing CKEditor 5 and related packages.",
|
|
5
5
|
"keywords": [],
|
|
6
|
+
"author": "CKSource (http://cksource.com/)",
|
|
7
|
+
"license": "GPL-2.0-or-later",
|
|
8
|
+
"homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-release-tools",
|
|
9
|
+
"bugs": "https://github.com/ckeditor/ckeditor5/issues",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ckeditor/ckeditor5-dev.git",
|
|
13
|
+
"directory": "packages/ckeditor5-dev-release-tools"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18.0.0",
|
|
17
|
+
"npm": ">=5.7.1"
|
|
18
|
+
},
|
|
6
19
|
"main": "lib/index.js",
|
|
20
|
+
"files": [
|
|
21
|
+
"lib"
|
|
22
|
+
],
|
|
7
23
|
"dependencies": {
|
|
8
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
24
|
+
"@ckeditor/ckeditor5-dev-utils": "^43.0.0",
|
|
9
25
|
"@octokit/rest": "^19.0.0",
|
|
10
26
|
"chalk": "^4.0.0",
|
|
11
|
-
"cli-table": "^0.3.1",
|
|
12
27
|
"cli-columns": "^4.0.0",
|
|
13
28
|
"compare-func": "^2.0.0",
|
|
14
29
|
"concat-stream": "^2.0.0",
|
|
@@ -16,32 +31,14 @@
|
|
|
16
31
|
"conventional-commits-filter": "^3.0.0",
|
|
17
32
|
"conventional-commits-parser": "^4.0.0",
|
|
18
33
|
"date-fns": "^2.30.0",
|
|
19
|
-
"
|
|
20
|
-
"fs-extra": "^9.1.0",
|
|
34
|
+
"fs-extra": "^11.2.0",
|
|
21
35
|
"git-raw-commits": "^3.0.0",
|
|
22
36
|
"glob": "^10.2.5",
|
|
23
37
|
"inquirer": "^7.1.0",
|
|
24
38
|
"lodash": "^4.17.15",
|
|
25
39
|
"minimatch": "^3.0.4",
|
|
26
|
-
"mkdirp": "^1.0.4",
|
|
27
|
-
"parse-github-url": "^1.0.2",
|
|
28
40
|
"semver": "^7.5.3",
|
|
41
|
+
"shell-escape": "^0.2.0",
|
|
29
42
|
"upath": "^2.0.1"
|
|
30
|
-
},
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": ">=18.0.0",
|
|
33
|
-
"npm": ">=5.7.1"
|
|
34
|
-
},
|
|
35
|
-
"files": [
|
|
36
|
-
"lib"
|
|
37
|
-
],
|
|
38
|
-
"author": "CKSource (http://cksource.com/)",
|
|
39
|
-
"license": "GPL-2.0-or-later",
|
|
40
|
-
"homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-release-tools",
|
|
41
|
-
"bugs": "https://github.com/ckeditor/ckeditor5/issues",
|
|
42
|
-
"repository": {
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "https://github.com/ckeditor/ckeditor5-dev.git",
|
|
45
|
-
"directory": "packages/ckeditor5-dev-release-tools"
|
|
46
43
|
}
|
|
47
44
|
}
|