Skip to content

feat(DX-10057): remove deprecated aliases, hidden flags, and deprecated seed repo - #325

Open
cs-raj wants to merge 6 commits into
v2-devfrom
feat/DX-10057-cleanup-deprecated-flags-aliases
Open

feat(DX-10057): remove deprecated aliases, hidden flags, and deprecated seed repo#325
cs-raj wants to merge 6 commits into
v2-devfrom
feat/DX-10057-cleanup-deprecated-flags-aliases

Conversation

@cs-raj

@cs-raj cs-raj commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cm:stacks:migration: Remove cm:migration command alias; remove 5 hidden deprecated flags (--api-key, --authtoken, --management-token-alias, --filePath, --multi) and all their run() references; update examples to use full command name
  • cm:bootstrap: Remove hidden --app-type flag and unused inquireAppType import; hardcode appType = 'starterapp'
  • cm:stacks:seed: Remove hidden --fetch-limit and --locale flags; remove stack-starter-app from curated repo list (deprecated per DX-9839); make fetchLimit optional in ContentModelSeederOptions

Jira

DX-10057

Test plan

  • csdx cm:migration returns "command not found"
  • csdx cm:stacks:migration --file-path ./script.js -k <key> works correctly
  • Passing --api-key, --authtoken, --management-token-alias, --filePath, or --multi to cm:stacks:migration returns ERROR: Nonexistent flag
  • csdx cm:stacks:seed interactive list shows 3 repos (no Starter app)
  • csdx cm:stacks:seed --repo contentstack/stack-starter-app still works (direct repo path still accepted)
  • csdx cm:bootstrap runs without --app-type flag

🤖 Generated with Claude Code

…ed seed repo

cm:stacks:migration:
- Remove cm:migration command alias
- Remove hidden deprecated flags: --api-key, --authtoken,
  --management-token-alias, --filePath, --multi
- Clean up run() to remove all references to removed flags
- Update examples to use cm:stacks:migration

cm:bootstrap:
- Remove hidden --app-type flag and inquireAppType import
- Simplify appType to hardcoded 'starterapp' default

cm:stacks:seed:
- Remove hidden --fetch-limit and --locale flags
- Remove stack-starter-app from curated repo list (deprecated per DX-9839)
- Make fetchLimit optional in ContentModelSeederOptions interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cs-raj
cs-raj requested a review from a team as a code owner July 31, 2026 10:56
cs-raj and others added 5 commits July 31, 2026 16:38
appType is hardcoded to 'starterapp' and config.sampleApps is empty —
the sampleapp branch was never reachable in V2. Removing it also fixes
the TS2367 literal type overlap error in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d fix failing tests

- Remove --reference-only (hidden, never consumed) from cm:stacks:audit and cm:stacks:audit:fix
- Fix bootstrap-integration.test.js: remove assertion for removed --app-type flag
- Fix bootstrap.test.js: remove invalid-app-type test, update appType expectation to
  'starterapp', update inquireApp assertion to use starterApps
- Fix seed.test.ts: update static usage string, remove locale flag assertion, remove
  fetchLimit/master_locale from ContentModelSeeder call expectations, clean stale flag keys

Note: --yes flag on audit:fix is intentionally kept (actively consumed in 8+ audit modules)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- migration.test.ts: update alias assertion to expect empty array (cm:migration alias was removed)
- seed.test.ts: mock @contentstack/cli-cm-import to cut the seed→import→audit chain
  which conflicted with the existing @contentstack/cli-utilities mock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…removal

Catalog is now 3 repos. Updated count assertions, repo list, and
stable display names snapshot to remove stack-starter-app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily removes deprecated CLI aliases/hidden flags across several cm:* plugin commands and updates seed catalog behavior, with accompanying test adjustments. It also includes a dependency override/lockfile refresh and removes a hidden audit flag.

Changes:

  • Removed deprecated/hidden flags and the cm:migration alias; updated migration command examples and tests.
  • Simplified cm:bootstrap by removing the hidden --app-type flow and hardcoding appType = 'starterapp'.
  • Updated cm:stacks:seed by removing hidden flags and dropping the deprecated starter repo from the curated seed list (with tests updated accordingly).

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updates workspace overrides versions (dependency policy change).
pnpm-lock.yaml Lockfile refresh reflecting updated overrides and dependency bumps.
packages/contentstack-seed/test/seed/seed-stacks.test.ts Updates curated seed stack catalog expectations (4 → 3).
packages/contentstack-seed/test/commands/cm/stacks/seed.test.ts Removes assertions/inputs for removed hidden seed flags; adds a missing mock.
packages/contentstack-seed/src/seed/seed-stacks.ts Removes stack-starter-app from the official curated repo list.
packages/contentstack-seed/src/seed/index.ts Makes fetchLimit optional in seeder options typing.
packages/contentstack-seed/src/commands/cm/stacks/seed.ts Removes hidden --fetch-limit/--locale flags and corresponding option wiring.
packages/contentstack-migration/test/unit/commands/cm/stacks/migration.test.ts Updates alias-related assertions for cm:stacks:migration.
packages/contentstack-migration/src/commands/cm/stacks/migration.ts Removes deprecated aliases/hidden flags and cleans up flag parsing logic.
packages/contentstack-bootstrap/test/bootstrap.test.js Updates bootstrap tests for removal of --app-type and hardcoded starter app behavior.
packages/contentstack-bootstrap/test/bootstrap-integration.test.js Updates integration assertions to reflect removed app-type flag.
packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts Removes hidden --app-type flag and hardcodes starter-app selection path.
packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts Removes hidden --reference-only flag from audit command flags.
packages/contentstack-audit/src/commands/cm/stacks/audit/fix.ts Removes hidden --reference-only flag from audit fix command flags.
.talismanrc Updates talisman ignore checksums and adds ignores for additional files.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pnpm-lock.yaml
Comment on lines +6440 to 6442
lint-staged@17.3.0:
resolution: {integrity: sha512-woZS3vNe3UKqBaLPvbLOtKRY4tLANpWQhom12MGWqC8Mh1lCOO+WgSwmX2amjJAqTY9BkXYW87fCUH5H9Ph6xw==}
engines: {node: '>=22.22.1'}
Comment thread .talismanrc
Comment on lines +12 to +17
- filename: packages/contentstack-migration/src/commands/cm/stacks/migration.ts
checksum: 529431473623cf6bbefb35bc898be2a60dcb453e0c9273ecb97923de658769b3
- filename: packages/contentstack-seed/src/commands/cm/stacks/seed.ts
checksum: 9a3fd45a57c6ebf63d6c154657f2ebf799befbbacb9a255944c2d89ae89b22ed
- filename: packages/contentstack-seed/test/commands/cm/stacks/seed.test.ts
checksum: b54f572a614e5d80f7fa27a51e679147cb537fd76ac922eed981d1156a261e50
Comment thread pnpm-workspace.yaml
Comment on lines 3 to +10
overrides:
tmp: 0.2.7
follow-redirects: 1.16.0
uuid: 14.0.1
lodash: 4.18.1
brace-expansion: 5.0.7
js-yaml: 4.3.0
fast-uri: 3.1.4
brace-expansion: 5.0.9
js-yaml: 5.2.2
fast-uri: 4.1.2
Comment on lines 19 to 24
static flags: FlagInput = {
'report-path': Flags.string({
description: auditMsg.REPORT_PATH,
}),
'reference-only': Flags.boolean({
hidden: true,
description: auditMsg.REFERENCE_ONLY,
}),
modules: Flags.string({
multiple: true,
Comment on lines 23 to 28
static flags: FlagInput = {
'report-path': Flags.string({
description: auditMsg.REPORT_PATH,
}),
'reference-only': Flags.boolean({
hidden: true,
description: auditMsg.REFERENCE_ONLY,
}),
modules: Flags.string({
multiple: true,
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.

2 participants