Skip to content

feat(create-project): add --format flag for MsgProject scaffolding - #28

Merged
jsahleen merged 7 commits into
mainfrom
msg-cli-27
Aug 9, 2026
Merged

feat(create-project): add --format flag for MsgProject scaffolding#28
jsahleen merged 7 commits into
mainfrom
msg-cli-27

Conversation

@jsahleen

@jsahleen jsahleen commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds --format / -f (MF1 | MF2 | NONE) to msg create project, defaulting to MF2, and always emitting project.format in the generated boilerplate.
  • When --extend is used without --format, inherits the base project's format; an explicit --format overrides it.
  • Docs updated in README and create-project-command.spec.md.

Test plan

  • npm test — format helper and create-project command tests pass
  • npx tsc --noEmit and npm run build clean
  • Coverage > 90% lines
  • Manual: msg create project myApp en fr emits format: "MF2"
  • Manual: msg create project myApp en fr -f MF1 emits format: "MF1"
  • Manual: extend a base with format: "NONE" inherits unless --format overrides
  • Manual: invalid --format ICU is rejected by oclif

Closes #27

jsahleen and others added 7 commits August 8, 2026 19:54
Wire Flags.option for MF1/MF2/NONE and a resolveCreateProjectFormat stub
that always returns MF2; tests assert boilerplate emission and --extend
inheritance so the implement phase has clear failing targets.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve format as flag > inherited base > MF2, and always write it into
the MsgProject.create boilerplate for both ESM and CJS output.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Use MSG_DEFAULT_FORMAT for the create-project fallback, drop the MsgFormat
cast on the typed option flag, and document format/extend usage in --help.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Add integration coverage that imports scaffolded files (default, -f MF1,
and --extend from a real MsgProject base) and checks runtime format.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Update README and create-project command spec for -f/--format values,
defaults, boilerplate emission, and --extend format inheritance.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover explicit -f/--format, --extend inheritance/override, and invalid
format validation in the happy-path and error scenarios.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep extend validation consistent with useExtend so whitespace-only
values do not attempt to import a project.

Refs #27

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsahleen
jsahleen marked this pull request as ready for review August 9, 2026 02:03
@jsahleen
jsahleen merged commit 9e278f1 into main Aug 9, 2026
1 check passed
@jsahleen
jsahleen deleted the msg-cli-27 branch August 9, 2026 02:05
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.0 🎉

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.

Add a format flag on msg create project command

1 participant