Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/scripts/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  changelog-add-unreleased.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import { readFileSync, writeFileSync } from "node:fs";
import { resolve } from "node:path";
import { appendUnreleasedChangelogEntry } from "../src/infra/changelog-unreleased.js";

type SectionArg = "breaking" | "changes" | "fixes";

function parseArgs(argv: string[]): {
  changelogPath: string;
  section: "Breaking" | "Changes" | "Fixes";
  entry: string;
} {
  let changelogPath = resolve("CHANGELOG.md");
  let section: SectionArg | undefined;
  const entryParts: string[] = [];

  for (let index = 0; index < argv.length; index += 1) {
    const arg = argv[index];
    if (arg === "--file") {
      const next = argv[index + 1];
      if (!next) {
        throw new Error("Missing value for --file.");
      }
      changelogPath = resolve(next);
      index += 1;
      continue;
    }
    if (arg === "--section") {
      const next = argv[index + 1] as SectionArg | undefined;
      if (!next || !["breaking", "changes", "fixes"].includes(next)) {
        throw new Error("Missing or invalid value for --section.");
      }
      section = next;
      index += 1;
      continue;
    }
    entryParts.push(arg);
  }

  if (!section) {
    throw new Error("Missing required --section <breaking|changes|fixes>.");
  }
  const entry = entryParts.join(" ").trim();
  if (!entry) {
    throw new Error("Missing changelog entry text.");
  }

  return {
    changelogPath,
    section: section === "breaking" ? "Breaking" : section === "changes" ? "Changes" : "Fixes",
    entry,
  };
}

if (import.meta.main) {
  const { changelogPath, section, entry } = parseArgs(process.argv.slice(2));
  const content = readFileSync(changelogPath, "utf8");
  const next = appendUnreleasedChangelogEntry(content, {
    section,
    entry,
  });
  if (next !== content) {
    writeFileSync(changelogPath, next);
  }
  console.log(`Updated ${changelogPath} (${section}).`);
}

¤ Dauer der Verarbeitung: 0.20 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.