@ckeditor/ckeditor5-dev-release-tools 44.0.0-alpha.4 → 44.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.
- package/lib/tasks/cleanuppackages.js +22 -22
- package/lib/tasks/commitandtag.js +4 -4
- package/lib/tasks/creategithubrelease.js +11 -11
- package/lib/tasks/generatechangelogformonorepository.js +54 -54
- package/lib/tasks/generatechangelogforsinglepackage.js +11 -11
- package/lib/tasks/preparerepository.js +19 -19
- package/lib/tasks/publishpackages.js +10 -10
- package/lib/tasks/push.js +4 -4
- package/lib/tasks/reassignnpmtags.js +8 -8
- package/lib/tasks/updatedependencies.js +14 -14
- package/lib/tasks/updateversions.js +18 -18
- package/lib/tasks/verifypackagespublishedcorrectly.js +4 -4
- package/lib/utils/assertfilestopublish.js +6 -6
- package/lib/utils/assertnpmauthorization.js +1 -1
- package/lib/utils/assertnpmtag.js +4 -4
- package/lib/utils/assertpackages.js +4 -4
- package/lib/utils/checkversionavailability.js +2 -2
- package/lib/utils/configurereleaseoptions.js +1 -1
- package/lib/utils/confirmincludingpackage.js +1 -1
- package/lib/utils/confirmnpmtag.js +3 -3
- package/lib/utils/displaycommits.js +4 -4
- package/lib/utils/executeinparallel.js +20 -19
- package/lib/utils/generatechangelog.js +23 -23
- package/lib/utils/getchangedfilesforcommit.js +2 -2
- package/lib/utils/getchangelog.js +2 -2
- package/lib/utils/getchangesforversion.js +3 -3
- package/lib/utils/getcommits.js +7 -6
- package/lib/utils/getformatteddate.js +1 -1
- package/lib/utils/getnewversiontype.js +1 -1
- package/lib/utils/getnpmtagfromversion.js +2 -2
- package/lib/utils/getpackagejson.js +2 -2
- package/lib/utils/getpackagespaths.js +9 -9
- package/lib/utils/getwriteroptions.js +1 -1
- package/lib/utils/isversionpublishablefortag.js +4 -4
- package/lib/utils/parallelworker.js +2 -2
- package/lib/utils/providenewversionformonorepository.js +6 -6
- package/lib/utils/providetoken.js +1 -1
- package/lib/utils/provideversion.js +12 -12
- package/lib/utils/publishpackageonnpmcallback.js +3 -3
- package/lib/utils/savechangelog.js +2 -2
- package/lib/utils/transformcommitfactory.js +27 -27
- package/lib/utils/transformcommitutils.js +13 -13
- package/lib/utils/truncatechangelog.js +2 -2
- package/lib/utils/validaterepositorytorelease.js +6 -6
- package/lib/utils/versions.js +14 -14
- package/package.json +2 -2
|
@@ -10,10 +10,10 @@ import shellEscape from 'shell-escape';
|
|
|
10
10
|
/**
|
|
11
11
|
* This util aims to verify if the given `packageName` can be published with the given `version` on the `npmTag`.
|
|
12
12
|
*
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
13
|
+
* @param {string} packageName
|
|
14
|
+
* @param {string} version
|
|
15
|
+
* @param {string} npmTag
|
|
16
|
+
* @returns {Promise.<boolean>}
|
|
17
17
|
*/
|
|
18
18
|
export default async function isVersionPublishableForTag( packageName, version, npmTag ) {
|
|
19
19
|
const command = `npm view ${ shellEscape( [ packageName ] ) }@${ shellEscape( [ npmTag ] ) } version --silent`;
|
|
@@ -10,8 +10,8 @@ import { parentPort, workerData } from 'worker_threads';
|
|
|
10
10
|
// Required due to top-level await.
|
|
11
11
|
( async () => {
|
|
12
12
|
/**
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {Array.<
|
|
13
|
+
* @param {string} callbackModule
|
|
14
|
+
* @param {Array.<string>} packages
|
|
15
15
|
*/
|
|
16
16
|
const { default: callback } = await import( workerData.callbackModule );
|
|
17
17
|
|
|
@@ -11,12 +11,12 @@ import { CLI_INDENT_SIZE } from './constants.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Asks a user for providing the new version for a major release.
|
|
13
13
|
*
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {
|
|
19
|
-
* @returns {Promise.<
|
|
14
|
+
* @param {string} version
|
|
15
|
+
* @param {string} foundPackage
|
|
16
|
+
* @param {string} bumpType
|
|
17
|
+
* @param {object} [options={}]
|
|
18
|
+
* @param {number} [options.indentLevel=0] The indent level.
|
|
19
|
+
* @returns {Promise.<string>}
|
|
20
20
|
*/
|
|
21
21
|
export default async function provideNewVersionForMonoRepository( version, foundPackage, bumpType, options = {} ) {
|
|
22
22
|
const indentLevel = options.indentLevel || 0;
|
|
@@ -11,13 +11,13 @@ import { CLI_INDENT_SIZE } from './constants.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Asks a user for providing the new version.
|
|
13
13
|
*
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {
|
|
20
|
-
* @returns {Promise.<
|
|
14
|
+
* @param {string} packageVersion
|
|
15
|
+
* @param {string|null} releaseTypeOrNewVersion
|
|
16
|
+
* @param {object} [options]
|
|
17
|
+
* @param {boolean} [options.disableInternalVersion=false] Whether to "internal" version is enabled.
|
|
18
|
+
* @param {boolean} [options.disableSkipVersion=false] Whether to "skip" version is enabled.
|
|
19
|
+
* @param {number} [options.indentLevel=0] The indent level.
|
|
20
|
+
* @returns {Promise.<string>}
|
|
21
21
|
*/
|
|
22
22
|
export default function provideVersion( packageVersion, releaseTypeOrNewVersion, options = {} ) {
|
|
23
23
|
const indentLevel = options.indentLevel || 0;
|
|
@@ -66,11 +66,11 @@ export default function provideVersion( packageVersion, releaseTypeOrNewVersion,
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* @param {
|
|
70
|
-
* @param {
|
|
71
|
-
* @param {
|
|
72
|
-
* @param {
|
|
73
|
-
* @
|
|
69
|
+
* @param {object} options
|
|
70
|
+
* @param {string} options.packageVersion
|
|
71
|
+
* @param {string|null} options.releaseTypeOrNewVersion
|
|
72
|
+
* @param {boolean} options.disableInternalVersion
|
|
73
|
+
* @returns {string}
|
|
74
74
|
*/
|
|
75
75
|
function getSuggestedVersion( { packageVersion, releaseTypeOrNewVersion, disableInternalVersion } ) {
|
|
76
76
|
if ( !releaseTypeOrNewVersion || releaseTypeOrNewVersion === 'skip' ) {
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Calls the npm command to publish the package. When a package is successfully published, it is removed from the filesystem.
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
9
|
+
* @param {string} packagePath
|
|
10
|
+
* @param {object} taskOptions
|
|
11
|
+
* @param {string} taskOptions.npmTag
|
|
12
12
|
* @returns {Promise}
|
|
13
13
|
*/
|
|
14
14
|
export default async function publishPackageOnNpmCallback( packagePath, taskOptions ) {
|
|
@@ -8,8 +8,8 @@ import path from 'path';
|
|
|
8
8
|
import { CHANGELOG_FILE } from './constants.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
11
|
+
* @param {string} content
|
|
12
|
+
* @param {string} [cwd=process.cwd()] Where to look for the changelog file.
|
|
13
13
|
*/
|
|
14
14
|
export default function saveChangelog( content, cwd = process.cwd() ) {
|
|
15
15
|
const changelogFile = path.join( cwd, CHANGELOG_FILE );
|
|
@@ -20,11 +20,11 @@ const SQUASH_COMMIT_REGEXP = /^[\W\w]+ \(#\d+\)$/;
|
|
|
20
20
|
* - normalizes notes (e.g. "MAJOR BREAKING CHANGE" will be replaced with "MAJOR BREAKING CHANGES"),
|
|
21
21
|
* - the commit is always being returned. Even, if it should not be added to the changelog.
|
|
22
22
|
*
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {
|
|
23
|
+
* @param {object} [options={}]
|
|
24
|
+
* @param {boolean} [options.treatMajorAsMinorBreakingChange=false] If set on true, all "MAJOR BREAKING CHANGES" notes will be replaced
|
|
25
25
|
* with "MINOR BREAKING CHANGES". This behaviour is being disabled automatically if `options.useExplicitBreakingChangeGroups` is
|
|
26
26
|
* set on `false` because all commits will be treated as "BREAKING CHANGES".
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {boolean} [options.useExplicitBreakingChangeGroups] If set on `true`, notes from parsed commits will be grouped as
|
|
28
28
|
* "MINOR BREAKING CHANGES" and "MAJOR BREAKING CHANGES'. If set on `false` (by default), all breaking changes notes will be treated
|
|
29
29
|
* as "BREAKING CHANGES".
|
|
30
30
|
* @returns {TransformCommit}
|
|
@@ -262,8 +262,8 @@ export default function transformCommitFactory( options = {} ) {
|
|
|
262
262
|
/**
|
|
263
263
|
* Merges multiple "Closes #x" references as "Closes #x, #y.".
|
|
264
264
|
*
|
|
265
|
-
* @param {
|
|
266
|
-
* @returns {
|
|
265
|
+
* @param {string} subject
|
|
266
|
+
* @returns {string}
|
|
267
267
|
*/
|
|
268
268
|
function mergeCloseReferences( subject ) {
|
|
269
269
|
const refs = [];
|
|
@@ -353,8 +353,8 @@ export default function transformCommitFactory( options = {} ) {
|
|
|
353
353
|
*
|
|
354
354
|
* For commits with no scope, `null` will be returned instead of the array (as `scope`).
|
|
355
355
|
*
|
|
356
|
-
* @param {
|
|
357
|
-
* @returns {
|
|
356
|
+
* @param {string} type First line from the commit message.
|
|
357
|
+
* @returns {object}
|
|
358
358
|
*/
|
|
359
359
|
function extractScopeFromPrefix( type ) {
|
|
360
360
|
if ( !type ) {
|
|
@@ -387,8 +387,8 @@ export default function transformCommitFactory( options = {} ) {
|
|
|
387
387
|
*
|
|
388
388
|
* For notes with no scope, `null` will be returned instead of the array (as `scope`).
|
|
389
389
|
*
|
|
390
|
-
* @param {
|
|
391
|
-
* @returns {
|
|
390
|
+
* @param {string} text A text that describes a note.
|
|
391
|
+
* @returns {object}
|
|
392
392
|
*/
|
|
393
393
|
function extractScopeFromNote( text ) {
|
|
394
394
|
const scopeAsText = text.match( /\(([^)]+)\):/ );
|
|
@@ -471,7 +471,7 @@ export default function transformCommitFactory( options = {} ) {
|
|
|
471
471
|
|
|
472
472
|
/**
|
|
473
473
|
* @param {Array.<Commit>} commits
|
|
474
|
-
* @returns {
|
|
474
|
+
* @returns {boolean}
|
|
475
475
|
*/
|
|
476
476
|
function isSquashMergeCommit( commits ) {
|
|
477
477
|
const [ squashCommit ] = commits;
|
|
@@ -491,41 +491,41 @@ export default function transformCommitFactory( options = {} ) {
|
|
|
491
491
|
*/
|
|
492
492
|
|
|
493
493
|
/**
|
|
494
|
-
* @typedef {
|
|
494
|
+
* @typedef {object} Commit
|
|
495
495
|
*
|
|
496
|
-
* @property {
|
|
496
|
+
* @property {boolean} isPublicCommit Whether the commit should be added in the changelog.
|
|
497
497
|
*
|
|
498
|
-
* @property {
|
|
498
|
+
* @property {string} rawType Type of the commit without any modifications.
|
|
499
499
|
*
|
|
500
|
-
* @property {
|
|
500
|
+
* @property {string|null} type Type of the commit (it can be modified).
|
|
501
501
|
*
|
|
502
|
-
* @property {
|
|
502
|
+
* @property {string} header First line of the commit message.
|
|
503
503
|
*
|
|
504
|
-
* @property {
|
|
504
|
+
* @property {string} subject Subject of the commit. It's the header without the type.
|
|
505
505
|
*
|
|
506
|
-
* @property {Array.<
|
|
506
|
+
* @property {Array.<string>|null} scope Scope of the changes.
|
|
507
507
|
*
|
|
508
|
-
* @property {Array.<
|
|
508
|
+
* @property {Array.<string>} files A list of files tha the commit modified.
|
|
509
509
|
*
|
|
510
|
-
* @property {
|
|
510
|
+
* @property {string} hash The full commit SHA-1 id.
|
|
511
511
|
*
|
|
512
|
-
* @property {
|
|
512
|
+
* @property {string} repositoryUrl The URL to the repository where the parsed commit has been done.
|
|
513
513
|
**
|
|
514
|
-
* @property {
|
|
514
|
+
* @property {string|null} [body] Body of the commit message.
|
|
515
515
|
*
|
|
516
|
-
* @property {
|
|
516
|
+
* @property {string|null} [footer] Footer of the commit message.
|
|
517
517
|
*
|
|
518
518
|
* @property {Array.<CommitNote>} [notes] Notes for the commit.
|
|
519
519
|
*
|
|
520
|
-
* @property {
|
|
520
|
+
* @property {boolean} [skipCommitsLink] Whether to skip generating a URL to the commit by the generator.
|
|
521
521
|
*/
|
|
522
522
|
|
|
523
523
|
/**
|
|
524
|
-
* @typedef {
|
|
524
|
+
* @typedef {object} CommitNote
|
|
525
525
|
*
|
|
526
|
-
* @property {
|
|
526
|
+
* @property {string} title Type of the note.
|
|
527
527
|
*
|
|
528
|
-
* @property {
|
|
528
|
+
* @property {string} text Text of the note.
|
|
529
529
|
*
|
|
530
|
-
* @property {Array.<
|
|
530
|
+
* @property {Array.<string>} scope Scope of the note.
|
|
531
531
|
*/
|
|
@@ -43,8 +43,8 @@ export const typesOrder = {
|
|
|
43
43
|
/**
|
|
44
44
|
* Returns an order of a message in the changelog.
|
|
45
45
|
*
|
|
46
|
-
* @param {
|
|
47
|
-
* @returns {
|
|
46
|
+
* @param {string} title
|
|
47
|
+
* @returns {number}
|
|
48
48
|
*/
|
|
49
49
|
export function getTypeOrder( title ) {
|
|
50
50
|
for ( const typeTitle of Object.keys( typesOrder ) ) {
|
|
@@ -59,8 +59,8 @@ export function getTypeOrder( title ) {
|
|
|
59
59
|
/**
|
|
60
60
|
* Replaces reference to the user (`@name`) with a link to the user's profile.
|
|
61
61
|
*
|
|
62
|
-
* @param {
|
|
63
|
-
* @returns {
|
|
62
|
+
* @param {string} comment
|
|
63
|
+
* @returns {string}
|
|
64
64
|
*/
|
|
65
65
|
export function linkToGithubUser( comment ) {
|
|
66
66
|
return comment.replace( /(^|[\s(])@([\w-]+)(?![/\w-])/ig, ( matchedText, charBefore, nickName ) => {
|
|
@@ -72,8 +72,8 @@ export function linkToGithubUser( comment ) {
|
|
|
72
72
|
* Replaces reference to issue (#ID) with a link to the issue.
|
|
73
73
|
* If comment matches to "organization/repository#ID", link will lead to the specified repository.
|
|
74
74
|
*
|
|
75
|
-
* @param {
|
|
76
|
-
* @returns {
|
|
75
|
+
* @param {string} comment
|
|
76
|
+
* @returns {string}
|
|
77
77
|
*/
|
|
78
78
|
export function linkToGithubIssue( comment ) {
|
|
79
79
|
return comment.replace( /(\/?[\w-]+\/[\w-]+)?#([\d]+)(?=$|[\s,.)\]])/igm, ( matchedText, maybeRepository, issueId ) => {
|
|
@@ -97,8 +97,8 @@ export function linkToGithubIssue( comment ) {
|
|
|
97
97
|
*
|
|
98
98
|
* The switch cases must be synchronized with the `MULTI_ENTRIES_COMMIT_REGEXP` regexp.
|
|
99
99
|
*
|
|
100
|
-
* @param {
|
|
101
|
-
* @returns {
|
|
100
|
+
* @param {string} commitType
|
|
101
|
+
* @returns {string}
|
|
102
102
|
*/
|
|
103
103
|
export function getCommitType( commitType ) {
|
|
104
104
|
switch ( commitType ) {
|
|
@@ -117,9 +117,9 @@ export function getCommitType( commitType ) {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {
|
|
122
|
-
* @returns {
|
|
120
|
+
* @param {string} sentence
|
|
121
|
+
* @param {number} length
|
|
122
|
+
* @returns {string}
|
|
123
123
|
*/
|
|
124
124
|
export function truncate( sentence, length ) {
|
|
125
125
|
if ( sentence.length <= length ) {
|
|
@@ -132,8 +132,8 @@ export function truncate( sentence, length ) {
|
|
|
132
132
|
/**
|
|
133
133
|
* Returns a URL to the repository whether the commit is being parsed.
|
|
134
134
|
*
|
|
135
|
-
* @param {
|
|
136
|
-
* @returns {
|
|
135
|
+
* @param {string} [cwd=process.cwd()]
|
|
136
|
+
* @returns {string}
|
|
137
137
|
*/
|
|
138
138
|
export function getRepositoryUrl( cwd = process.cwd() ) {
|
|
139
139
|
const packageJson = getPackageJson( cwd );
|
|
@@ -9,8 +9,8 @@ import saveChangelog from './savechangelog.js';
|
|
|
9
9
|
import getChangelog from './getchangelog.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
12
|
+
* @param {number} length
|
|
13
|
+
* @param {string} [cwd=process.cwd()] Where to look for the changelog file.
|
|
14
14
|
*/
|
|
15
15
|
export default function truncateChangelog( length, cwd = process.cwd() ) {
|
|
16
16
|
const changelog = getChangelog( cwd );
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
import { tools } from '@ckeditor/ckeditor5-dev-utils';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
14
|
-
* @returns {Promise.<Array.<
|
|
9
|
+
* @param {object} options
|
|
10
|
+
* @param {string|null} options.version Version of the current release.
|
|
11
|
+
* @param {string} options.changes Changelog entries for the current release.
|
|
12
|
+
* @param {boolean} [options.ignoreBranchCheck=false] If set on true, branch checking will be skipped.
|
|
13
|
+
* @param {string} [options.branch='master'] A name of the branch that should be used for releasing packages.
|
|
14
|
+
* @returns {Promise.<Array.<string>>}
|
|
15
15
|
*/
|
|
16
16
|
export default async function validateRepositoryToRelease( options ) {
|
|
17
17
|
const {
|
package/lib/utils/versions.js
CHANGED
|
@@ -10,8 +10,8 @@ import getPackageJson from './getpackagejson.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns a last created version in changelog file.
|
|
12
12
|
*
|
|
13
|
-
* @param {
|
|
14
|
-
* @returns {
|
|
13
|
+
* @param {string} [cwd=process.cwd()] Where to look for the changelog file.
|
|
14
|
+
* @returns {string|null}
|
|
15
15
|
*/
|
|
16
16
|
export function getLastFromChangelog( cwd = process.cwd() ) {
|
|
17
17
|
const changelog = getChangelog( cwd );
|
|
@@ -31,8 +31,8 @@ export function getLastFromChangelog( cwd = process.cwd() ) {
|
|
|
31
31
|
* If the package does not have any pre-releases with the provided identifier yet, `null` is returned.
|
|
32
32
|
*
|
|
33
33
|
* @param {ReleaseIdentifier} releaseIdentifier
|
|
34
|
-
* @param {
|
|
35
|
-
* @returns {Promise.<
|
|
34
|
+
* @param {string} [cwd=process.cwd()]
|
|
35
|
+
* @returns {Promise.<string|null>}
|
|
36
36
|
*/
|
|
37
37
|
export function getLastPreRelease( releaseIdentifier, cwd = process.cwd() ) {
|
|
38
38
|
const packageName = getPackageJson( cwd ).name;
|
|
@@ -54,8 +54,8 @@ export function getLastPreRelease( releaseIdentifier, cwd = process.cwd() ) {
|
|
|
54
54
|
* last nightly release and the "X" is the sequential number starting from 0. If the package does not have any nightly releases yet,
|
|
55
55
|
* `null` is returned.
|
|
56
56
|
*
|
|
57
|
-
* @param {
|
|
58
|
-
* @returns {Promise.<
|
|
57
|
+
* @param {string} [cwd=process.cwd()]
|
|
58
|
+
* @returns {Promise.<string|null>}
|
|
59
59
|
*/
|
|
60
60
|
export function getLastNightly( cwd = process.cwd() ) {
|
|
61
61
|
return getLastPreRelease( '0.0.0-nightly', cwd );
|
|
@@ -66,8 +66,8 @@ export function getLastNightly( cwd = process.cwd() ) {
|
|
|
66
66
|
* next available pre-release sequential number starting from 0.
|
|
67
67
|
*
|
|
68
68
|
* @param {ReleaseIdentifier} releaseIdentifier
|
|
69
|
-
* @param {
|
|
70
|
-
* @returns {Promise<
|
|
69
|
+
* @param {string} [cwd=process.cwd()]
|
|
70
|
+
* @returns {Promise<string>}
|
|
71
71
|
*/
|
|
72
72
|
export async function getNextPreRelease( releaseIdentifier, cwd = process.cwd() ) {
|
|
73
73
|
const currentPreReleaseVersion = await getLastPreRelease( releaseIdentifier, cwd );
|
|
@@ -88,8 +88,8 @@ export async function getNextPreRelease( releaseIdentifier, cwd = process.cwd()
|
|
|
88
88
|
* Returns the next available nightly version in the format of "0.0.0-nightly-YYYYMMDD.X", where the "YYYYMMDD" is the current date for
|
|
89
89
|
* the nightly release and the "X" is the sequential number starting from 0.
|
|
90
90
|
*
|
|
91
|
-
* @param {
|
|
92
|
-
* @returns {Promise<
|
|
91
|
+
* @param {string} [cwd=process.cwd()]
|
|
92
|
+
* @returns {Promise<string>}
|
|
93
93
|
*/
|
|
94
94
|
export async function getNextNightly( cwd = process.cwd() ) {
|
|
95
95
|
const today = new Date();
|
|
@@ -105,7 +105,7 @@ export async function getNextNightly( cwd = process.cwd() ) {
|
|
|
105
105
|
/**
|
|
106
106
|
* Returns a name of the last created tag.
|
|
107
107
|
*
|
|
108
|
-
* @returns {
|
|
108
|
+
* @returns {string|null}
|
|
109
109
|
*/
|
|
110
110
|
export function getLastTagFromGit() {
|
|
111
111
|
try {
|
|
@@ -121,15 +121,15 @@ export function getLastTagFromGit() {
|
|
|
121
121
|
/**
|
|
122
122
|
* Returns version of current package from `package.json`.
|
|
123
123
|
*
|
|
124
|
-
* @param {
|
|
125
|
-
* @returns {
|
|
124
|
+
* @param {string} [cwd=process.cwd()] Current work directory.
|
|
125
|
+
* @returns {string}
|
|
126
126
|
*/
|
|
127
127
|
export function getCurrent( cwd = process.cwd() ) {
|
|
128
128
|
return getPackageJson( cwd ).version;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* @typedef {
|
|
132
|
+
* @typedef {string} ReleaseIdentifier The pre-release identifier without the last dynamic part (the pre-release sequential number).
|
|
133
133
|
* It consists of the core base version ("<major>.<minor>.<path>"), a hyphen ("-"), and a pre-release identifier name (e.g. "alpha").
|
|
134
134
|
*
|
|
135
135
|
* Examples:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-release-tools",
|
|
3
|
-
"version": "44.0.0
|
|
3
|
+
"version": "44.0.0",
|
|
4
4
|
"description": "Tools used for releasing CKEditor 5 and related packages.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lib"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ckeditor/ckeditor5-dev-utils": "^44.0.0
|
|
25
|
+
"@ckeditor/ckeditor5-dev-utils": "^44.0.0",
|
|
26
26
|
"@octokit/rest": "^21.0.0",
|
|
27
27
|
"chalk": "^5.0.0",
|
|
28
28
|
"cli-columns": "^4.0.0",
|