@ckeditor/ckeditor5-dev-release-tools 48.0.0 → 49.0.1

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.
@@ -9,6 +9,8 @@ import { simpleGit } from 'simple-git';
9
9
 
10
10
  const { toUnix } = upath;
11
11
 
12
+ const CHUNK_LENGTH_LIMIT = 4000;
13
+
12
14
  /**
13
15
  * Creates a commit and a tag for specified version.
14
16
  *
@@ -42,8 +44,12 @@ export default async function commitAndTag( {
42
44
  const { all: availableTags } = await git.tags();
43
45
  const tagForVersion = availableTags.find( tag => tag.endsWith( version ) );
44
46
 
45
- const makeCommit = () => {
46
- return git.commit( `Release: v${ version }.${ skipCi ? ' [skip ci]' : '' }`, filePathsToAdd );
47
+ const makeCommit = async () => {
48
+ for ( const chunk of splitPathsIntoChunks( filePathsToAdd ) ) {
49
+ await git.add( chunk );
50
+ }
51
+
52
+ return git.commit( `Release: v${ version }.${ skipCi ? ' [skip ci]' : '' }` );
47
53
  };
48
54
 
49
55
  if ( dryRun ) {
@@ -57,3 +63,18 @@ export default async function commitAndTag( {
57
63
  await git.addAnnotatedTag( `v${ version }`, `Release: v${ version }.` );
58
64
  }
59
65
  }
66
+
67
+ function splitPathsIntoChunks( filePathsToAdd ) {
68
+ return filePathsToAdd.reduce( ( chunks, path ) => {
69
+ const lastChunk = chunks.at( -1 );
70
+ const newLength = [ ...lastChunk, path ].join( ' ' ).length;
71
+
72
+ if ( newLength < CHUNK_LENGTH_LIMIT ) {
73
+ lastChunk.push( path );
74
+ } else {
75
+ chunks.push( [ path ] );
76
+ }
77
+
78
+ return chunks;
79
+ }, [ [] ] );
80
+ }
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md.
4
4
  */
5
5
 
6
- import { cloneDeepWith } from 'lodash-es';
6
+ import { cloneDeepWith } from 'es-toolkit/compat';
7
7
  import * as utils from './transformcommitutils.js';
8
8
  import getChangedFilesForCommit from './getchangedfilesforcommit.js';
9
9
 
@@ -462,9 +462,9 @@ export default function transformCommitFactory( options = {} ) {
462
462
  return [ scope ];
463
463
  }
464
464
 
465
- // Do not copy breaking changes notes. It's enough to keep them in the first commit.
466
- if ( index && key === 'notes' ) {
467
- return [];
465
+ // Copy the the breaking changes notes only in the first commit.
466
+ if ( key === 'notes' ) {
467
+ return index ? [] : value;
468
468
  }
469
469
  } ) );
470
470
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-dev-release-tools",
3
- "version": "48.0.0",
3
+ "version": "49.0.1",
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": "^48.0.0",
25
+ "@ckeditor/ckeditor5-dev-utils": "^49.0.1",
26
26
  "@octokit/rest": "^21.0.0",
27
27
  "chalk": "^5.0.0",
28
28
  "cli-columns": "^4.0.0",
@@ -32,13 +32,13 @@
32
32
  "conventional-commits-filter": "^5.0.0",
33
33
  "conventional-commits-parser": "^6.0.0",
34
34
  "date-fns": "^4.0.0",
35
+ "es-toolkit": "^1.35.0",
35
36
  "fs-extra": "^11.0.0",
36
37
  "git-raw-commits": "^5.0.0",
37
- "glob": "^10.0.0",
38
- "inquirer": "^11.0.0",
39
- "lodash-es": "^4.17.21",
40
- "minimatch": "^9.0.0",
41
- "pacote": "^19.0.0",
38
+ "glob": "^11.0.1",
39
+ "inquirer": "^12.5.2",
40
+ "minimatch": "^10.0.1",
41
+ "pacote": "^20.0.0",
42
42
  "semver": "^7.6.3",
43
43
  "shell-escape": "^0.2.0",
44
44
  "simple-git": "^3.27.0",