@ckeditor/ckeditor5-dev-release-tools 49.0.0 → 49.0.2

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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-dev-release-tools",
3
- "version": "49.0.0",
3
+ "version": "49.0.2",
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": "^49.0.0",
25
+ "@ckeditor/ckeditor5-dev-utils": "^49.0.2",
26
26
  "@octokit/rest": "^21.0.0",
27
27
  "chalk": "^5.0.0",
28
28
  "cli-columns": "^4.0.0",