@ckeditor/ckeditor5-dev-changelog 56.3.0 → 56.5.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -15
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { styleText } from "node:util";
2
2
  import { format, isValid, parse } from "date-fns";
3
3
  import { npm, tools, workspaces } from "@ckeditor/ckeditor5-dev-utils";
4
- import upath from "upath";
4
+ import path from "upath";
5
5
  import fs from "node:fs/promises";
6
6
  import fs$1 from "node:fs";
7
7
  import semver from "semver";
8
8
  import inquirer from "inquirer";
9
9
  import { glob } from "glob";
10
- import matter from "gray-matter";
10
+ import matter from "@11ty/gray-matter";
11
11
  //#region src/utils/constants.ts
12
12
  /**
13
13
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
@@ -19,7 +19,7 @@ const NPM_URL = "https://www.npmjs.com/package";
19
19
  const VERSIONING_POLICY_URL = "https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html";
20
20
  const CHANGESET_DIRECTORY = ".changelog";
21
21
  const PRE_RELEASE_DIRECTORY = "pre-release";
22
- upath.join(import.meta.dirname, "../template/template.md");
22
+ path.join(import.meta.dirname, "../template/template.md");
23
23
  const SECTIONS = {
24
24
  major: {
25
25
  title: `MAJOR BREAKING CHANGES [ℹ️](${VERSIONING_POLICY_URL}#major-and-minor-breaking-changes)`,
@@ -396,12 +396,12 @@ function truncateChangelog(length, cwd) {
396
396
  saveChangelog("Changelog\n=========\n\n" + truncatedEntries.join("\n").trim() + changelogFooter, cwd);
397
397
  }
398
398
  function getChangelog(cwd) {
399
- const changelogFile = upath.join(cwd, CHANGELOG_FILE);
399
+ const changelogFile = path.join(cwd, CHANGELOG_FILE);
400
400
  if (!fs$1.existsSync(changelogFile)) return null;
401
401
  return fs$1.readFileSync(changelogFile, "utf-8");
402
402
  }
403
403
  function saveChangelog(content, cwd) {
404
- const changelogFile = upath.join(cwd, CHANGELOG_FILE);
404
+ const changelogFile = path.join(cwd, CHANGELOG_FILE);
405
405
  fs$1.writeFileSync(changelogFile, content, "utf-8");
406
406
  }
407
407
  //#endregion
@@ -417,7 +417,7 @@ function saveChangelog(content, cwd) {
417
417
  * writes the updated content back to the changelog file, and truncates the changelog to keep a manageable length.
418
418
  */
419
419
  async function modifyChangelog(newChangelog, cwd) {
420
- const changelogPath = upath.join(cwd, CHANGELOG_FILE);
420
+ const changelogPath = path.join(cwd, CHANGELOG_FILE);
421
421
  const updatedChangelog = prepareChangelogContent(await readExistingChangelog(changelogPath), newChangelog);
422
422
  logInfo(`○ ${styleText("cyan", "Appending changes to the existing changelog...")}`);
423
423
  await fs.writeFile(changelogPath, updatedChangelog, "utf-8");
@@ -838,9 +838,9 @@ async function findChangelogEntryPaths(options) {
838
838
  return AsyncArray.from(Promise.resolve(externalRepositories)).map(async (repo) => {
839
839
  return {
840
840
  filePaths: (await glob(globPattern, {
841
- cwd: upath.join(repo.cwd, CHANGESET_DIRECTORY),
841
+ cwd: path.join(repo.cwd, CHANGESET_DIRECTORY),
842
842
  absolute: true
843
- })).map((p) => upath.normalize(p)),
843
+ })).map((p) => path.normalize(p)),
844
844
  gitHubUrl: await workspaces.getRepositoryUrl(repo.cwd, { async: true }),
845
845
  linkFilter: getLinkFilter(repo),
846
846
  cwd: repo.cwd,
@@ -849,9 +849,9 @@ async function findChangelogEntryPaths(options) {
849
849
  }).then(async (externalResults) => {
850
850
  return [{
851
851
  filePaths: (await glob(globPattern, {
852
- cwd: upath.join(cwd, CHANGESET_DIRECTORY),
852
+ cwd: path.join(cwd, CHANGESET_DIRECTORY),
853
853
  absolute: true
854
- })).map((p) => upath.normalize(p)),
854
+ })).map((p) => path.normalize(p)),
855
855
  gitHubUrl: await workspaces.getRepositoryUrl(cwd, { async: true }),
856
856
  linkFilter: getLinkFilter(options),
857
857
  cwd,
@@ -1074,13 +1074,13 @@ async function moveChangelogEntryFiles(entryPaths) {
1074
1074
  logInfo(`○ ${styleText("cyan", `Moving changelog entries to ${targetDir}/ directory...`)}`);
1075
1075
  for (const repo of entryPaths) {
1076
1076
  const { cwd, filePaths } = repo;
1077
- const changelogDir = upath.join(cwd, CHANGESET_DIRECTORY);
1078
- const targetPath = upath.join(changelogDir, targetDir);
1077
+ const changelogDir = path.join(cwd, CHANGESET_DIRECTORY);
1078
+ const targetPath = path.join(changelogDir, targetDir);
1079
1079
  await fs.mkdir(targetPath, { recursive: true });
1080
1080
  const modifiedFilePaths = [];
1081
1081
  for (const filePath of filePaths) {
1082
- const fileName = upath.basename(filePath);
1083
- const targetFilePath = upath.join(targetPath, fileName);
1082
+ const fileName = path.basename(filePath);
1083
+ const targetFilePath = path.join(targetPath, fileName);
1084
1084
  await fs.rename(filePath, targetFilePath);
1085
1085
  modifiedFilePaths.push(targetFilePath);
1086
1086
  modifiedFilePaths.push(filePath);
@@ -1103,7 +1103,7 @@ async function commitChanges(version, repositories) {
1103
1103
  logInfo(`○ ${styleText("cyan", "Committing changes...")}`);
1104
1104
  for (const { cwd, isRoot, filePaths } of repositories) {
1105
1105
  const files = filePaths.slice(0);
1106
- if (isRoot) files.unshift(upath.join(cwd, CHANGELOG_FILE));
1106
+ if (isRoot) files.unshift(path.join(cwd, CHANGELOG_FILE));
1107
1107
  logInfo(`◌ Processing "${cwd}".`, { indent: 1 });
1108
1108
  await tools.commit({
1109
1109
  cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-dev-changelog",
3
- "version": "56.3.0",
3
+ "version": "56.5.0",
4
4
  "description": "A CKEditor 5 development tool for handling changelogs.",
5
5
  "keywords": [],
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -28,11 +28,11 @@
28
28
  "ckeditor5-dev-changelog-create-entry": "bin/generate-template.js"
29
29
  },
30
30
  "dependencies": {
31
- "@ckeditor/ckeditor5-dev-utils": "^56.3.0",
31
+ "@11ty/gray-matter": "^2.1.0",
32
+ "@ckeditor/ckeditor5-dev-utils": "^56.5.0",
32
33
  "cac": "^7.0.0",
33
34
  "date-fns": "^4.1.0",
34
35
  "glob": "^13.0.6",
35
- "gray-matter": "^4.0.3",
36
36
  "inquirer": "^12.11.1",
37
37
  "semver": "^7.7.4",
38
38
  "upath": "^2.0.1"