Skip to content

MAI-57 + MAI-59: fix secondary version-files docs and stale code comment#19

Merged
vsmash merged 2 commits into
developfrom
bug/MAI-57_secondary-files-doc-drift
May 24, 2026
Merged

MAI-57 + MAI-59: fix secondary version-files docs and stale code comment#19
vsmash merged 2 commits into
developfrom
bug/MAI-57_secondary-files-doc-drift

Conversation

@vsmash
Copy link
Copy Markdown
Owner

@vsmash vsmash commented May 24, 2026

Ticket

https://velvary.atlassian.net/browse/MAI-57

Problem

docs/configuration.md described MAIASS_VERSION_SECONDARY_FILES as a comma-separated list and documented MAIASS_VERSION_SECONDARY_TYPES as a real variable. Both are wrong. The code is authoritative.

Facts verified in code

  • MAIASS_VERSION_SECONDARY_FILES is pipe-separated entries, each colon-delimited as file:type:pattern. Parser: lib/version-manager.js:807-830 (pattern = parts.slice(2).join(':') so colons survive in the pattern; \| escapes a literal pipe). Runtime read: lib/version-manager.js:981. Default declared: lib/maiass-variables.js:36.
  • MAIASS_VERSION_SECONDARY_TYPES is never read by any code — its only occurrence was the doc line being removed. The type is the 2nd colon field of each entry.
  • Supported type values (lib/version-manager.js:841-884):
    • pattern — regex-escaped literal text with {version} placeholder matched as semver; replaces the version in an existing matching block (does NOT prepend).
    • txt — line startsWith(pattern), replaces first semver on that line.
    • json — dot-separated key path.
  • Multi-line patterns work via the \n escape inside a double-quoted value only. The runtime loader (lib/config.js:65/77/88) uses dotenv, which expands \n → newline only for double-quoted values (node_modules/dotenv/lib/main.js:38-39).

Fix

Rewrote the Version Management section of docs/configuration.md:

  • Documents the real pipe/colon file:type:pattern format with a correct example.
  • Drops MAIASS_VERSION_SECONDARY_TYPES and explicitly marks it not implemented; also flags that the variable's built-in "comma-separated" description is stale.
  • Lists the three supported type values and what each does.
  • Adds the multi-line \n note (double-quoted, pattern type only) with the working readme.txt example and the caveat that it rewrites the version in place rather than prepending.

Scope note

Docs-only change. The stale description: 'Secondary version files (comma-separated)' string in lib/maiass-variables.js:36 is flagged in the docs as stale but left unchanged (out of scope for this docs ticket).


MAI-59 (folded in)

https://velvary.atlassian.net/browse/MAI-59

Fixes the stale code comment flagged above: changed the built-in description for MAIASS_VERSION_SECONDARY_FILES in lib/maiass-variables.js from 'Secondary version files (comma-separated)' to 'Secondary version files (pipe-separated file:type:pattern entries)', matching the real parser format documented in MAI-57. Comment/metadata only — no behaviour change.

🤖 Generated with Claude Code

Tyler Durton added 2 commits May 25, 2026 07:26
…ne \n)

  - document real pipe-separated, colon-delimited file:type:pattern format with correct example
  - drop MAIASS_VERSION_SECONDARY_TYPES (never read by code); mark not implemented
  - list the three supported type values (pattern, txt, json) and what each does
  - add multi-line \n note (double-quoted, pattern type only) with caveat it rewrites in place
@vsmash vsmash changed the title MAI-57: fix secondary version-files docs (pipe/colon format, multi-line \n) MAI-57 + MAI-59: fix secondary version-files docs and stale code comment May 24, 2026
@vsmash vsmash merged commit cb1de92 into develop May 24, 2026
8 checks passed
@vsmash vsmash deleted the bug/MAI-57_secondary-files-doc-drift branch May 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant