diff --git a/.changeset/escape-yaml-carriage-return.md b/.changeset/escape-yaml-carriage-return.md deleted file mode 100644 index 23594df89..000000000 --- a/.changeset/escape-yaml-carriage-return.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@fission-ai/openspec": patch ---- - -fix(adapters): escape carriage returns in generated YAML frontmatter - -`escapeYamlValue` flagged `\r` as a character requiring quoting but never escaped it, leaving a literal carriage return inside the double-quoted scalar where YAML line folding/normalization could silently corrupt the value (realistic with CRLF-authored command descriptions). Carriage returns are now escaped as `\r`. The helper — previously duplicated verbatim across five adapters (bob, claude, cursor, pi, windsurf) — is extracted into a shared `command-generation/yaml.ts` module so the behavior stays consistent and is fixed in one place. diff --git a/CHANGELOG.md b/CHANGELOG.md index e4d858446..0446c1ab3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # @fission-ai/openspec +## 1.4.2 + +### Patch Changes + +- [#1240](https://github.com/Fission-AI/OpenSpec/pull/1240) [`cbf386b`](https://github.com/Fission-AI/OpenSpec/commit/cbf386bd6888f103f8ff7d59b3eab98ce5b57998) Thanks [@zied-jlassi](https://github.com/zied-jlassi)! - fix(adapters): escape carriage returns in generated YAML frontmatter + + `escapeYamlValue` flagged `\r` as a character requiring quoting but never escaped it, leaving a literal carriage return inside the double-quoted scalar where YAML line folding/normalization could silently corrupt the value (realistic with CRLF-authored command descriptions). Carriage returns are now escaped as `\r`. The helper — previously duplicated verbatim across five adapters (bob, claude, cursor, pi, windsurf) — is extracted into a shared `command-generation/yaml.ts` module so the behavior stays consistent and is fixed in one place. + ## 1.4.1 ### Patch Changes diff --git a/package.json b/package.json index f1b61ebb8..8213eb711 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fission-ai/openspec", - "version": "1.4.1", + "version": "1.4.2", "description": "AI-native system for spec-driven development", "keywords": [ "openspec",