@ckeditor/ckeditor5-dev-changelog 55.6.0-alpha.0 → 55.6.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.
Files changed (38) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.js +1217 -1384
  3. package/dist/tasks/generatechangelogformonorepository.d.ts +3 -7
  4. package/dist/tasks/generatechangelogforsinglerepository.d.ts +2 -6
  5. package/dist/template.d.ts +5 -9
  6. package/dist/template.js +96 -106
  7. package/dist/types.d.ts +97 -99
  8. package/dist/utils/asyncarray.d.ts +31 -31
  9. package/dist/utils/commitchanges.d.ts +2 -6
  10. package/dist/utils/composechangelog.d.ts +16 -20
  11. package/dist/utils/composereleasesummary.d.ts +17 -17
  12. package/dist/utils/constants.d.ts +34 -38
  13. package/dist/utils/detectreleasechannel.d.ts +3 -7
  14. package/dist/utils/determinenextversion.d.ts +14 -18
  15. package/dist/utils/displaychanges.d.ts +13 -17
  16. package/dist/utils/filtervisiblesections.d.ts +7 -11
  17. package/dist/utils/findchangelogentrypaths.d.ts +8 -12
  18. package/dist/utils/findpackages.d.ts +7 -11
  19. package/dist/utils/generatechangelog.d.ts +9 -13
  20. package/dist/utils/getdateformatted.d.ts +2 -6
  21. package/dist/utils/getreleasetype.d.ts +4 -4
  22. package/dist/utils/groupentriesbysection.d.ts +7 -11
  23. package/dist/utils/internalerror.d.ts +6 -7
  24. package/dist/utils/linktogithubuser.d.ts +8 -8
  25. package/dist/utils/loginfo.d.ts +8 -8
  26. package/dist/utils/modifychangelog.d.ts +5 -9
  27. package/dist/utils/movechangelogentryfiles.d.ts +5 -9
  28. package/dist/utils/normalizeentry.d.ts +4 -4
  29. package/dist/utils/parsechangelogentries.d.ts +3 -7
  30. package/dist/utils/promptreleasetype.d.ts +3 -7
  31. package/dist/utils/providenewversion.d.ts +15 -19
  32. package/dist/utils/removechangelogentryfiles.d.ts +4 -8
  33. package/dist/utils/sortentriesbyscopeanddate.d.ts +9 -9
  34. package/dist/utils/truncatechangelog.d.ts +2 -6
  35. package/dist/utils/useraborterror.d.ts +6 -7
  36. package/dist/utils/validateentry.d.ts +13 -13
  37. package/dist/utils/validateinputversion.d.ts +6 -10
  38. package/package.json +2 -2
@@ -1,11 +1,7 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- import type { ConfigBase, GenerateChangelogEntryPoint, MonoRepoConfigBase } from '../types.js';
1
+ import type { ConfigBase, GenerateChangelogEntryPoint, MonoRepoConfigBase } from "../types.js";
6
2
  type MonoRepositoryConfig = ConfigBase & MonoRepoConfigBase & {
7
- packagesDirectory: ConfigBase['packagesDirectory'];
8
- transformScope: MonoRepoConfigBase['transformScope'];
3
+ packagesDirectory: ConfigBase["packagesDirectory"];
4
+ transformScope: MonoRepoConfigBase["transformScope"];
9
5
  };
10
6
  export declare const generateChangelogForMonoRepository: GenerateChangelogEntryPoint<MonoRepositoryConfig>;
11
7
  export {};
@@ -1,8 +1,4 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- import type { ConfigBase, GenerateChangelogEntryPoint } from '../types.js';
6
- type SingleRepositoryConfig = Omit<ConfigBase, 'packagesDirectory'>;
1
+ import type { ConfigBase, GenerateChangelogEntryPoint } from "../types.js";
2
+ type SingleRepositoryConfig = Omit<ConfigBase, "packagesDirectory">;
7
3
  export declare const generateChangelogForSingleRepository: GenerateChangelogEntryPoint<SingleRepositoryConfig>;
8
4
  export {};
@@ -1,15 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- /**
6
- * Options for the `generateTemplate` function.
7
- */
2
+ * Options for the `generateTemplate` function.
3
+ */
8
4
  interface GenerateTemplateOptions {
9
- directory: string;
5
+ directory: string;
10
6
  }
11
7
  /**
12
- * Generates a template file for the changelog in the specified directory.
13
- */
8
+ * Generates a template file for the changelog in the specified directory.
9
+ */
14
10
  export declare function generateTemplate(args?: Partial<GenerateTemplateOptions> | undefined, retries?: number): Promise<void>;
15
11
  export {};
package/dist/template.js CHANGED
@@ -1,128 +1,118 @@
1
- import { mkdir, copyFile, constants } from 'node:fs/promises';
2
- import { styleText, promisify } from 'node:util';
3
- import { exec } from 'node:child_process';
4
- import { cac } from 'cac';
5
- import path from 'upath';
6
- import { format } from 'date-fns';
7
-
1
+ import { constants, copyFile, mkdir } from "node:fs/promises";
2
+ import { promisify, styleText } from "node:util";
3
+ import { exec } from "node:child_process";
4
+ import { cac } from "cac";
5
+ import path from "upath";
6
+ import { format } from "date-fns";
7
+ //#region src/utils/constants.ts
8
8
  /**
9
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
10
- * For licensing, see LICENSE.md.
11
- */
12
- const CHANGESET_DIRECTORY = '.changelog';
13
- const TEMPLATE_FILE = path.join(import.meta.dirname, '../template/template.md');
14
-
9
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
10
+ * For licensing, see LICENSE.md.
11
+ */
12
+ const VERSIONING_POLICY_URL = "https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html";
13
+ const CHANGESET_DIRECTORY = ".changelog";
14
+ const TEMPLATE_FILE = path.join(import.meta.dirname, "../template/template.md");
15
+ `${VERSIONING_POLICY_URL}`, `${VERSIONING_POLICY_URL}`;
16
+ //#endregion
17
+ //#region src/template.ts
15
18
  /**
16
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
17
- * For licensing, see LICENSE.md.
18
- */
19
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
20
+ * For licensing, see LICENSE.md.
21
+ */
19
22
  /**
20
- * Default options for the `generateTemplate` function.
21
- */
22
- const DEFAULT_OPTIONS = {
23
- directory: CHANGESET_DIRECTORY
24
- };
23
+ * Default options for the `generateTemplate` function.
24
+ */
25
+ const DEFAULT_OPTIONS = { directory: CHANGESET_DIRECTORY };
25
26
  /**
26
- * List of branch names that are usually protected.
27
- */
27
+ * List of branch names that are usually protected.
28
+ */
28
29
  const PROTECTED_BRANCHES = [
29
- 'master',
30
- 'main',
31
- 'release',
32
- 'stable'
30
+ "master",
31
+ "main",
32
+ "release",
33
+ "stable"
33
34
  ];
34
35
  /**
35
- * Reads CLI arguments and turn the keys into camelcase.
36
- */
36
+ * Reads CLI arguments and turn the keys into camelcase.
37
+ */
37
38
  function getCliArguments() {
38
- const cli = cac('ckeditor5-dev-changelog-create-entry');
39
- cli.usage('[options]');
40
- cli.option('--directory <path>', 'Directory where the changelog entry will be created.', { default: DEFAULT_OPTIONS.directory });
41
- cli.help();
42
- const { options } = cli.parse(process.argv);
43
- if (options.help) {
44
- return;
45
- }
46
- cli.globalCommand.checkUnknownOptions();
47
- cli.globalCommand.checkOptionValue();
48
- cli.globalCommand.checkRequiredArgs();
49
- cli.globalCommand.checkUnusedArgs();
50
- return options;
39
+ const cli = cac("ckeditor5-dev-changelog-create-entry");
40
+ cli.usage("[options]");
41
+ cli.option("--directory <path>", "Directory where the changelog entry will be created.", { default: DEFAULT_OPTIONS.directory });
42
+ cli.help();
43
+ const { options } = cli.parse(process.argv);
44
+ if (options.help) return;
45
+ cli.globalCommand.checkUnknownOptions();
46
+ cli.globalCommand.checkOptionValue();
47
+ cli.globalCommand.checkRequiredArgs();
48
+ cli.globalCommand.checkUnusedArgs();
49
+ return options;
51
50
  }
52
51
  /**
53
- * Returns normalized options object for the `generateTemplate` function.
54
- */
52
+ * Returns normalized options object for the `generateTemplate` function.
53
+ */
55
54
  function normalizeOptions(options) {
56
- const normalized = Object.assign({}, DEFAULT_OPTIONS, options);
57
- // Ensure that paths are absolute and resolve to the current working directory.
58
- normalized.directory = path.resolve(process.cwd(), normalized.directory);
59
- return normalized;
55
+ const normalized = Object.assign({}, DEFAULT_OPTIONS, options);
56
+ normalized.directory = path.resolve(process.cwd(), normalized.directory);
57
+ return normalized;
60
58
  }
61
59
  /**
62
- * Returns the current git branch name formatted to be used in a filename.
63
- */
60
+ * Returns the current git branch name formatted to be used in a filename.
61
+ */
64
62
  async function getFormattedGitBranchName() {
65
- try {
66
- const asyncExec = promisify(exec);
67
- const { stdout } = await asyncExec('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' });
68
- return stdout
69
- .trim()
70
- .replace(/[^a-zA-Z0-9]/g, '_');
71
- }
72
- catch {
73
- console.error(styleText(['red', 'bold'], 'Error: Git is not installed or the current folder is not in git repository.'));
74
- process.exit(1);
75
- }
63
+ try {
64
+ const { stdout } = await promisify(exec)("git rev-parse --abbrev-ref HEAD", { encoding: "utf8" });
65
+ return stdout.trim().replace(/[^a-zA-Z0-9]/g, "_");
66
+ } catch {
67
+ console.error(styleText(["red", "bold"], "Error: Git is not installed or the current folder is not in git repository."));
68
+ process.exit(1);
69
+ }
76
70
  }
77
71
  /**
78
- * Returns a filename for the template file based on the current date and git branch name.
79
- * The filename is formatted as `YYYYMMDDHHMMSS_{GIT_BRANCH_NAME}.md`.
80
- */
72
+ * Returns a filename for the template file based on the current date and git branch name.
73
+ * The filename is formatted as `YYYYMMDDHHMMSS_{GIT_BRANCH_NAME}.md`.
74
+ */
81
75
  function getFileName(gitBranchName) {
82
- const date = format(new Date(), 'yyyyMMddHHmmss');
83
- return `${date}_${gitBranchName}.md`;
76
+ return `${format(/* @__PURE__ */ new Date(), "yyyyMMddHHmmss")}_${gitBranchName}.md`;
84
77
  }
85
78
  /**
86
- * Generates a template file for the changelog in the specified directory.
87
- */
79
+ * Generates a template file for the changelog in the specified directory.
80
+ */
88
81
  async function generateTemplate(args = getCliArguments(), retries = 5) {
89
- if (!args) {
90
- return;
91
- }
92
- const options = normalizeOptions(args);
93
- const gitBranchName = await getFormattedGitBranchName();
94
- const filename = getFileName(gitBranchName);
95
- const outputPath = path.resolve(options.directory, filename);
96
- await mkdir(options.directory, { recursive: true });
97
- try {
98
- await copyFile(TEMPLATE_FILE, outputPath, constants.COPYFILE_EXCL);
99
- const indent = ' '.repeat(2);
100
- const relativePath = path.relative(process.cwd(), outputPath);
101
- console.log(styleText('green', 'The changelog file has been successfully created.'));
102
- console.log('');
103
- console.log('◌ Please fill it with relevant information about your changes.');
104
- console.log(indent + styleText(['cyan', 'bold'], `file://${outputPath}`));
105
- console.log('');
106
- console.log('◌ Once done, commit the changelog file:');
107
- console.log(styleText('gray', indent + styleText('gray', `$ git add ${relativePath}`)));
108
- console.log(styleText('gray', indent + styleText('gray', '$ git commit -m "..."')));
109
- if (PROTECTED_BRANCHES.includes(gitBranchName)) {
110
- console.log('');
111
- console.warn(styleText(['red', 'bold'], 'You are on a protected branch!'), styleText('red', 'Consider creating a new branch for your changes.'));
112
- }
113
- }
114
- catch (error) {
115
- if (retries <= 0) {
116
- console.error(styleText(['red', 'bold'], 'Error: Generating changelog file failed with the following error:'));
117
- throw error;
118
- }
119
- console.error(styleText('gray', 'You are going to fast 🥵 Waiting 1 second to ensure unique changelog name.'));
120
- return new Promise(resolve => {
121
- setTimeout(() => {
122
- resolve(generateTemplate(options, retries - 1));
123
- }, 1000);
124
- });
125
- }
82
+ if (!args) return;
83
+ const options = normalizeOptions(args);
84
+ const gitBranchName = await getFormattedGitBranchName();
85
+ const filename = getFileName(gitBranchName);
86
+ const outputPath = path.resolve(options.directory, filename);
87
+ await mkdir(options.directory, { recursive: true });
88
+ try {
89
+ await copyFile(TEMPLATE_FILE, outputPath, constants.COPYFILE_EXCL);
90
+ const indent = " ".repeat(2);
91
+ const relativePath = path.relative(process.cwd(), outputPath);
92
+ console.log(styleText("green", "◌ The changelog file has been successfully created."));
93
+ console.log("");
94
+ console.log("Please fill it with relevant information about your changes.");
95
+ console.log(indent + styleText(["cyan", "bold"], `file://${outputPath}`));
96
+ console.log("");
97
+ console.log("◌ Once done, commit the changelog file:");
98
+ console.log(styleText("gray", indent + styleText("gray", `$ git add ${relativePath}`)));
99
+ console.log(styleText("gray", indent + styleText("gray", "$ git commit -m \"...\"")));
100
+ if (PROTECTED_BRANCHES.includes(gitBranchName)) {
101
+ console.log("");
102
+ console.warn(styleText(["red", "bold"], "You are on a protected branch!"), styleText("red", "Consider creating a new branch for your changes."));
103
+ }
104
+ } catch (error) {
105
+ if (retries <= 0) {
106
+ console.error(styleText(["red", "bold"], "Error: Generating changelog file failed with the following error:"));
107
+ throw error;
108
+ }
109
+ console.error(styleText("gray", "You are going to fast 🥵 Waiting 1 second to ensure unique changelog name."));
110
+ return new Promise((resolve) => {
111
+ setTimeout(() => {
112
+ resolve(generateTemplate(options, retries - 1));
113
+ }, 1e3);
114
+ });
115
+ }
126
116
  }
127
-
117
+ //#endregion
128
118
  export { generateTemplate };
package/dist/types.d.ts CHANGED
@@ -1,131 +1,129 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- import type { SECTIONS } from './utils/constants.js';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+ import type { SECTIONS } from "./utils/constants.js";
6
6
  export type ConfigBase = RepositoryConfig & {
7
- /**
8
- * The next version number to use. If not provided, will be calculated based on changes.
9
- * Must be a valid version in terms of the semantic versioning specification.
10
- */
11
- nextVersion?: string;
12
- /**
13
- * Array of external repository configurations to include in the changelog.
14
- */
15
- externalRepositories?: Array<RepositoryConfig>;
16
- /**
17
- * The date to use for the changelog entry. Defaults to current date in YYYY-MM-DD format.
18
- */
19
- date?: string;
7
+ /**
8
+ * The next version number to use. If not provided, will be calculated based on changes.
9
+ * Must be a valid version in terms of the semantic versioning specification.
10
+ */
11
+ nextVersion?: string;
12
+ /**
13
+ * Array of external repository configurations to include in the changelog.
14
+ */
15
+ externalRepositories?: Array<RepositoryConfig>;
16
+ /**
17
+ * The date to use for the changelog entry. Defaults to current date in YYYY-MM-DD format.
18
+ */
19
+ date?: string;
20
20
  };
21
21
  export type MonoRepoConfigBase = {
22
- /**
23
- * Function to transform package scopes in the changelog entries.
24
- */
25
- transformScope?: TransformScope;
26
- /**
27
- * Whether to include the root package name in the bumped packages versions section in the changelog.
28
- */
29
- shouldIgnoreRootPackage?: unknown;
30
- /**
31
- * The package that will be used when determining if the next version is available on npm.
32
- */
33
- npmPackageToCheck?: unknown;
22
+ /**
23
+ * Function to transform package scopes in the changelog entries.
24
+ */
25
+ transformScope?: TransformScope;
26
+ /**
27
+ * Whether to include the root package name in the bumped packages versions section in the changelog.
28
+ */
29
+ shouldIgnoreRootPackage?: unknown;
30
+ /**
31
+ * The package that will be used when determining if the next version is available on npm.
32
+ */
33
+ npmPackageToCheck?: unknown;
34
34
  } & NpmPackageRequiredWhenSkipRootPackage;
35
35
  export type RepositoryConfig = {
36
- /**
37
- * The current working directory of the repository.
38
- */
39
- cwd: string;
40
- /**
41
- * The directory containing the packages. Defaults to 'packages'.
42
- */
43
- packagesDirectory: null | string;
44
- /**
45
- * Function that decides whether to filter out a link in the changelog entry.
46
- * If `shouldSkipLinks` flag is set, the `shouldSkipLinks` flag takes precedence over the `linkFilter` function.
47
- * No links are skipped by default.
48
- */
49
- linkFilter?: LinkFilter;
50
- /**
51
- * Whether to skip links in the changelog entries. Defaults to false.
52
- */
53
- shouldSkipLinks?: boolean;
36
+ /**
37
+ * The current working directory of the repository.
38
+ */
39
+ cwd: string;
40
+ /**
41
+ * The directory containing the packages. Defaults to 'packages'.
42
+ */
43
+ packagesDirectory: null | string;
44
+ /**
45
+ * Function that decides whether to filter out a link in the changelog entry.
46
+ * If `shouldSkipLinks` flag is set, the `shouldSkipLinks` flag takes precedence over the `linkFilter` function.
47
+ * No links are skipped by default.
48
+ */
49
+ linkFilter?: LinkFilter;
50
+ /**
51
+ * Whether to skip links in the changelog entries. Defaults to false.
52
+ */
53
+ shouldSkipLinks?: boolean;
54
54
  };
55
55
  export type GenerateChangelogEntryPoint<K extends object> = <T extends boolean | undefined = undefined>(config: K & {
56
- /**
57
- * Controls whether changeset files will be deleted after generating changelog.
58
- */
59
- disableFilesystemOperations?: T;
56
+ /**
57
+ * Controls whether changeset files will be deleted after generating changelog.
58
+ */
59
+ disableFilesystemOperations?: T;
60
60
  }) => Promise<T extends true ? string : void>;
61
61
  export type SectionName = keyof typeof SECTIONS;
62
62
  export type Entry = {
63
- message: string;
64
- data: {
65
- type: string;
66
- scope: Array<string>;
67
- mainContent: string | undefined;
68
- restContent: Array<string>;
69
- communityCredits: Array<string>;
70
- validations: Array<string>;
71
- see: Array<LinkObject>;
72
- closes: Array<LinkObject>;
73
- };
74
- changesetPath: string;
63
+ message: string;
64
+ data: {
65
+ type: string;
66
+ scope: Array<string>;
67
+ mainContent: string | undefined;
68
+ restContent: Array<string>;
69
+ communityCredits: Array<string>;
70
+ validations: Array<string>;
71
+ see: Array<LinkObject>;
72
+ closes: Array<LinkObject>;
73
+ };
74
+ changesetPath: string;
75
75
  };
76
76
  export type ParsedFile<T = FileMetadata> = {
77
- content: string;
78
- data: T;
79
- changesetPath: string;
80
- createdAt: Date;
81
- gitHubUrl: string;
82
- linkFilter: LinkFilter;
77
+ content: string;
78
+ data: T;
79
+ changesetPath: string;
80
+ createdAt: Date;
81
+ gitHubUrl: string;
82
+ linkFilter: LinkFilter;
83
83
  };
84
84
  export type Section = {
85
- entries: Array<Entry>;
86
- title: string;
87
- titleInLogs?: string;
88
- excludeInChangelog?: boolean;
85
+ entries: Array<Entry>;
86
+ title: string;
87
+ titleInLogs?: string;
88
+ excludeInChangelog?: boolean;
89
89
  };
90
90
  export type SectionsWithEntries = Record<SectionName, Section>;
91
91
  export type ReleaseInfo = {
92
- title: string;
93
- version: string;
94
- packages: Array<string>;
92
+ title: string;
93
+ version: string;
94
+ packages: Array<string>;
95
95
  };
96
96
  export type TransformScope = (name: string) => {
97
- displayName: string;
98
- npmUrl: string;
97
+ displayName: string;
98
+ npmUrl: string;
99
99
  };
100
100
  export type ChangesetPathsWithGithubUrl = {
101
- filePaths: Array<string>;
102
- gitHubUrl: string;
103
- linkFilter: LinkFilter;
104
- cwd: string;
105
- isRoot: boolean;
101
+ filePaths: Array<string>;
102
+ gitHubUrl: string;
103
+ linkFilter: LinkFilter;
104
+ cwd: string;
105
+ isRoot: boolean;
106
106
  };
107
107
  type NpmPackageRequiredWhenSkipRootPackage = {
108
- shouldIgnoreRootPackage?: true;
109
- npmPackageToCheck: string;
108
+ shouldIgnoreRootPackage?: true;
109
+ npmPackageToCheck: string;
110
110
  } | {
111
- shouldIgnoreRootPackage?: false;
112
- npmPackageToCheck?: never;
111
+ shouldIgnoreRootPackage?: false;
112
+ npmPackageToCheck?: never;
113
113
  };
114
114
  export type LinkObject = {
115
- displayName: string;
116
- link: string;
115
+ displayName: string;
116
+ link: string;
117
117
  };
118
118
  export type LinkFilter = (resourceUrl: string) => boolean;
119
119
  export type FileMetadata = {
120
- type: string;
121
- scope: Array<string>;
122
- closes: Array<string>;
123
- see: Array<string>;
124
- communityCredits: Array<string>;
125
- validations: Array<string>;
120
+ type: string;
121
+ scope: Array<string>;
122
+ closes: Array<string>;
123
+ see: Array<string>;
124
+ communityCredits: Array<string>;
125
+ validations: Array<string>;
126
126
  };
127
- export type ChangelogReleaseType = 'latest' | // e.g. 1.0.0 -> 2.0.0 or 2.0.0-beta.1 -> 2.0.0.
128
- 'prerelease' | // e.g. 1.0.0 -> 2.0.0-alpha.0 or 2.0.0-alpha.0 -> 2.0.0-alpha.1.
129
- 'prerelease-promote';
130
- export type ReleaseChannel = 'alpha' | 'beta' | 'rc' | 'latest';
127
+ export type ChangelogReleaseType = "latest" | "prerelease" | "prerelease-promote";
128
+ export type ReleaseChannel = "alpha" | "beta" | "rc" | "latest";
131
129
  export {};
@@ -1,35 +1,35 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
5
  /**
6
- * A utility class that wraps a Promise of an array and provides async array-like operations.
7
- */
6
+ * A utility class that wraps a Promise of an array and provides async array-like operations.
7
+ */
8
8
  export declare class AsyncArray<T> {
9
- private readonly promise;
10
- /**
11
- * Creates a new `AsyncArray` instance.
12
- */
13
- constructor(promise: Promise<Array<T>>);
14
- /**
15
- * Creates an `AsyncArray` from a given promise.
16
- */
17
- static from<U>(promise: Promise<Array<U>>): AsyncArray<U>;
18
- /**
19
- * Asynchronously maps each item in the array using the provided callback.
20
- */
21
- map<U>(fn: (item: T, index: number, array: Array<T>) => U | Promise<U>): AsyncArray<U>;
22
- /**
23
- * Flattens one level of nesting in an array of arrays.
24
- */
25
- flat<U>(this: AsyncArray<Array<U>>): AsyncArray<U>;
26
- /**
27
- * Maps each item using a callback that returns an array (or promise of an array),
28
- * then flattens the result by one level.
29
- */
30
- flatMap<U>(fn: (item: T, index: number, array: Array<T>) => Array<U> | Promise<Array<U>>): AsyncArray<U>;
31
- /**
32
- * Allows chaining or awaiting the result of the internal promise.
33
- */
34
- then<U>(onfulfilled: (value: Array<T>) => U | Promise<U>): Promise<U>;
9
+ private readonly promise;
10
+ /**
11
+ * Creates a new `AsyncArray` instance.
12
+ */
13
+ constructor(promise: Promise<Array<T>>);
14
+ /**
15
+ * Creates an `AsyncArray` from a given promise.
16
+ */
17
+ static from<U>(promise: Promise<Array<U>>): AsyncArray<U>;
18
+ /**
19
+ * Asynchronously maps each item in the array using the provided callback.
20
+ */
21
+ map<U>(fn: (item: T, index: number, array: Array<T>) => U | Promise<U>): AsyncArray<U>;
22
+ /**
23
+ * Flattens one level of nesting in an array of arrays.
24
+ */
25
+ flat<U>(this: AsyncArray<Array<U>>): AsyncArray<U>;
26
+ /**
27
+ * Maps each item using a callback that returns an array (or promise of an array),
28
+ * then flattens the result by one level.
29
+ */
30
+ flatMap<U>(fn: (item: T, index: number, array: Array<T>) => Array<U> | Promise<Array<U>>): AsyncArray<U>;
31
+ /**
32
+ * Allows chaining or awaiting the result of the internal promise.
33
+ */
34
+ then<U>(onfulfilled: (value: Array<T>) => U | Promise<U>): Promise<U>;
35
35
  }
@@ -1,8 +1,4 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- import type { ChangesetPathsWithGithubUrl } from '../types.js';
6
- type RepositoryData = Pick<ChangesetPathsWithGithubUrl, 'cwd' | 'isRoot' | 'filePaths'>;
1
+ import type { ChangesetPathsWithGithubUrl } from "../types.js";
2
+ type RepositoryData = Pick<ChangesetPathsWithGithubUrl, "cwd" | "isRoot" | "filePaths">;
7
3
  export declare function commitChanges(version: string, repositories: Array<RepositoryData>): Promise<void>;
8
4
  export {};
@@ -1,24 +1,20 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */
5
- import type { ReleaseInfo, Section } from '../types.js';
1
+ import type { ReleaseInfo, Section } from "../types.js";
6
2
  export type ComposeChangelogOptions = {
7
- cwd: string;
8
- date: string;
9
- currentVersion: string;
10
- newVersion: string;
11
- sections: Array<Section>;
12
- releasedPackagesInfo: Array<ReleaseInfo>;
13
- isSinglePackage: boolean;
3
+ cwd: string;
4
+ date: string;
5
+ currentVersion: string;
6
+ newVersion: string;
7
+ sections: Array<Section>;
8
+ releasedPackagesInfo: Array<ReleaseInfo>;
9
+ isSinglePackage: boolean;
14
10
  };
15
11
  /**
16
- * Generates a formatted changelog string for a new version release.
17
- *
18
- * This function constructs the changelog content including
19
- * * A version header with a link to the GitHub comparison view (except for an initial version).
20
- * * Sections with grouped changelog entries and their messages.
21
- * * A collapsible summary of released packages and their version bumps for a mono-repository setup.
22
- * * Special handling for single-package repositories.
23
- */
12
+ * Generates a formatted changelog string for a new version release.
13
+ *
14
+ * This function constructs the changelog content including
15
+ * * A version header with a link to the GitHub comparison view (except for an initial version).
16
+ * * Sections with grouped changelog entries and their messages.
17
+ * * A collapsible summary of released packages and their version bumps for a mono-repository setup.
18
+ * * Special handling for single-package repositories.
19
+ */
24
20
  export declare function composeChangelog(options: ComposeChangelogOptions): Promise<string>;