Skip to content

Deploy#321

Open
robherba wants to merge 84 commits into
mainfrom
develop
Open

Deploy#321
robherba wants to merge 84 commits into
mainfrom
develop

Conversation

@robherba

@robherba robherba commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

This PR does the following:

  • Promotes the 2.x line to a 2.0.0 major release (deploy of developmain).
  • Migrates the CLI to ESM ("type": "module") and raises the minimum runtime to Node 24 (.nvmrc, package.json engines, and all GitHub Actions).
  • Adds a new emulsify component create command (alias c) with an interactive workflow:
    • Choice of component format — Standard Emulsify or SDC (Single Directory Component) for Drupal.
    • Interactive parent-directory/structure chooser when --directory is not supplied.
    • Interactive overwrite prompt when a component already exists.
    • Correct multi-word name handling (e.g. featuredItemfeatured-item), generating Twig, SCSS, YAML/*.component.yml, *.stories.js, and (for SDC) *.js.
  • Adds platform starters: a no-platform starter as the default init setup and the Drupal starter as a selectable option (getAvailableStarters).
  • Improves install UX: clearer feedback when a component isn't found, and interactive overwrite handling for component install.
  • Switches log coloring from chalk → colorette and migrates prompts to the modular @inquirer/prompts.
  • Adds a styled --version output (boxen).
  • Improves the 2.x cache behavior for systems/components.
  • Adds semantic-release configuration and aligns CI (test + release) with Node 24.
  • Removes ESLint from the toolchain (formatting retained via Prettier + lint-staged on pre-commit).

Related Issue(s)

Notes:

  • Breaking change: this is ESM-only and requires Node ≥ 24. Global installs on older Node versions will no longer run.
  • WordPress is referenced in some init help text but is not yet implemented — only drupal and the no-platform starter are supported today.
  • Drupal core version detection is a placeholdergetDrupalInfo reports a fixed major version; parsing composer.lock for the exact version is a known follow-up.
  • A post-merge hardening/cleanup backlog has been identified (error-handling consistency, dedup of the shared system-loading logic across component handlers, and making the coverage gate measure all handlers). These are non-blocking and tracked for a follow-up PR.

Functional Testing:

  • Setup: nvm use (Node 24) → npm cinpm run buildnpm link so the emulsify binary is available globally.
  • Quality gates: npm run type, npm test, and npm run build all pass on a clean checkout.
  • Version output: emulsify --version renders the styled (boxen) product name + version box.
  • Init (no-platform default): in an empty dir run emulsify init (interactive) and confirm a project is created with project.emulsify.json and dependencies installed.
  • Init (Drupal): emulsify init myTheme ./web/themes/custom -p drupal clones the Drupal starter into the target and writes valid config.
  • System install: inside a project run emulsify system install compound and confirm the system is cached, validated, and required components are installed.
  • Component list: emulsify component list prints structure -> name for the installed system/variant.
  • Component create (Default): emulsify component create card, choose Default and a directory; verify card.twig, card.scss, card.yml, card.stories.js are generated.
  • Component create (SDC): emulsify component create hero, choose SDC; verify hero.twig, hero.scss, hero.component.yml, hero.js, hero.stories.js are generated.
  • Component create (multi-word + flag): emulsify component create featuredItem -d components; verify it lands in a featured-item folder with correctly cased filenames/identifiers.
  • Overwrite prompt: re-run a component create for an existing name and confirm the overwrite prompt appears and that declining cancels cleanly.
  • Component install: emulsify component install <name> (single + dependencies), emulsify component install --all, and --force overwrite all behave as expected; the overwrite confirm appears when a component already exists without --force.
  • Error paths: running component/system commands outside an Emulsify project produces the helpful "No Emulsify project detected" message and a non-zero exit code.

robherba and others added 30 commits October 3, 2023 09:37
feat: Add no-platform starter as default init setup
@callinmullaney callinmullaney requested review from cienvaras and robert-arias and removed request for cienvaras and robert-arias June 5, 2026 21:30
@callinmullaney callinmullaney added 🎉 Passes Functional Review Functionality is approved by the reviewer. 🎉 Passes Code Review Code is approved by the reviewer. 🎉 Ready to Merge Functionality is approved by the reviewer. and removed released labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 Passes Code Review Code is approved by the reviewer. 🎉 Passes Functional Review Functionality is approved by the reviewer. 🎉 Ready to Merge Functionality is approved by the reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants