Skip to content

chore(cli): remove createYargsForComponentGeneration and its unused import #1618

@lisa-assistant

Description

@lisa-assistant

Problem

In packages/cli/src/commands/generate/yargsHandlerHelpers.js, two TODOs mark code that was meant to be temporary during the CLI refactor:

Line 23:

// TODO: Remove this import. This is only temporarily to be able to split one
// command at a time into a separate async handler
import {
  createCommand,
  createDescription,
  createBuilder,
} from './yargsCommandHelpers.js'

Line 207:

// TODO: Remove this function. This is only temporarily to be able to split one
// command at a time into a separate async handler
export const createYargsForComponentGeneration = ({ ... }) => { ... }

The migration is now complete. No production command uses createYargsForComponentGeneration — every generator (cell, page, component, directive, job, function, etc.) now has its own *Handler.js file. Several of them even have comments like // This could be built using createYargsForComponentGeneration confirming they deliberately did not use it.

The only consumer of createYargsForComponentGeneration is the test file:
packages/cli/src/commands/generate/__tests__/createYargsForComponentGeneration.test.js

Fix

  1. Remove the createCommand, createDescription, createBuilder import from yargsHandlerHelpers.js (lines 23–29)
  2. Remove the createYargsForComponentGeneration export from yargsHandlerHelpers.js (lines 207–248)
  3. Delete the test file __tests__/createYargsForComponentGeneration.test.js

No other files need updating — nothing imports createYargsForComponentGeneration outside of that test.

Files to change

  • packages/cli/src/commands/generate/yargsHandlerHelpers.js — remove import (lines 23–29) and function (lines 207–248)
  • packages/cli/src/commands/generate/__tests__/createYargsForComponentGeneration.test.js — delete

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions