Skip to content

fix(cli): default dir to auto for create, import, and export - #35

Merged
jsahleen merged 4 commits into
mainfrom
msg-cli-33
Aug 16, 2026
Merged

fix(cli): default dir to auto for create, import, and export#35
jsahleen merged 4 commits into
mainfrom
msg-cli-33

Conversation

@jsahleen

Copy link
Copy Markdown
Collaborator

Summary

  • Bump @worldware/msg to ^0.12.0 so the CLI uses library dir defaulting and message attribute inheritance (msg #63 / #64).
  • create project loader fallbacks now use dir: 'auto' and warn without dumping the caught error.
  • XLIFF import defaults resource dir to "auto" when <file> has no trgDir.
  • XLIFF export omits srcDir when dir is "auto" (Option B), and still writes ltr / rtl.

Closes #33.

Depends on the published @worldware/msg@0.12.0 (msg #63, #64).

Test plan

  • Generated ESM and CJS project loaders contain dir: 'auto' and a message-only console.warn
  • Import without trgDir yields dir: 'auto'; explicit trgDir still wins
  • Export omits file/unit srcDir="auto" and still emits srcDir="rtl" / "ltr"
  • npm test, npx tsc --noEmit, npm run build, npm run coverage (lines/statements > 90%)

Made with Cursor

jsahleen and others added 4 commits August 15, 2026 19:55
Pick up library dir defaulting and message attribute inheritance
from msg #63 and #64 so CLI round-trips match. Refs #33

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover loader fallback attributes and warn signature, missing trgDir
import default, and omitting srcDir when dir is auto. Refs #33

Co-authored-by: Cursor <cursoragent@cursor.com>
Align create-project loaders, XLIFF import, and export with the
library auto default (Option B: skip srcDir when dir is auto). Refs #33

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep create-project loader samples, import JSON examples, and
export srcDir notes consistent with the library. Refs #33

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsahleen
jsahleen marked this pull request as ready for review August 16, 2026 01:56
@jsahleen
jsahleen merged commit e7490b5 into main Aug 16, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align dir default to "auto" for create/import/export

1 participant