Skip to content

chore: remove deprecated commands and clean up dead code for v1.0.0#40

Open
revanth0212 wants to merge 4 commits intomainfrom
chore/remove-app-init
Open

chore: remove deprecated commands and clean up dead code for v1.0.0#40
revanth0212 wants to merge 4 commits intomainfrom
chore/remove-app-init

Conversation

@revanth0212
Copy link
Collaborator

@revanth0212 revanth0212 commented Mar 12, 2026

Summary

  • Removed the deprecated commerce init command and all init-only utilities (initialization.js, github.js, content.js, preview.js, openBrowser.js, mesh.js, configs.js, importer.js, mdast/, fetchWithRetry.js, sleep.js)
  • Removed the commerce dev command and placeholder commerce test command
  • Removed unused exports: selectOrganization from devConsole.js, readEnvFile/writeEnvFile from envFile.js
  • Removed jsdom dependency (only used by deleted init utilities)
  • Cleaned up README: removed init/dev command docs, Mesh Prerequisites, gh CLI prerequisite, init-specific troubleshooting, API Mesh references, and Templates section
  • Updated CHANGELOG with a new 1.0.0 entry documenting all removals

21 files changed — 20,113 lines removed

After this PR, the plugin's commands are:

  • aio commerce extensibility app-setup
  • aio commerce extensibility tools-setup

Test plan

  • Verify aio commerce extensibility app-setup still works correctly
  • Verify aio commerce extensibility tools-setup still works correctly
  • Confirm aio commerce init, aio commerce dev, and aio commerce test are no longer available
  • Run npm test to ensure no broken imports or references

@revanth0212 revanth0212 changed the title chore: remove deprecated commerce init command chore: remove deprecated commands and clean up dead code for v1.0.0 Mar 12, 2026
@rojoangel
Copy link
Contributor

rojoangel commented Mar 13, 2026

The tests are broken:
test/commands/commerce/hello.test.js imports ../../../src/commands/commerce/hello

import { HelloCommand } from '../../../src/commands/commerce/hello'

but the hello command no longer exists (it was part of the removed boilerplate). The test suite fails with "Cannot find module '../../../src/commands/commerce/hello'".

Please either remove this test file as part of the dead-code cleanup, or restore a minimal hello command if it’s still desired.

❯ npm test

> @adobe/aio-cli-plugin-commerce@1.0.0 test
> node --experimental-vm-modules node_modules/jest/bin/jest.js --testRegex '.+\.test\.js' --ci

(node:20594) ExperimentalWarning: VM Modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 PASS  test/commands/commerce/index.test.js
 FAIL  test/commands/commerce/hello.test.js
  ● Test suite failed to run

    Cannot find module '../../../src/commands/commerce/hello' from 'test/commands/commerce/hello.test.js'

      at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)

-|---------|----------|---------|---------|-------------------
 | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-|---------|----------|---------|---------|-------------------
 |     100 |      100 |     100 |     100 |                   
  |     100 |      100 |     100 |     100 |                   
-|---------|----------|---------|---------|-------------------
Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.266 s, estimated 1 s

@rojoangel
Copy link
Contributor

rojoangel commented Mar 13, 2026

Update index command description

IndexCommand.description = 'Spin up an Adobe Commerce Storefront on EDS using this CLI tool'

The description "Spin up an Adobe Commerce Storefront on EDS using this CLI tool" is from the old init-based workflow. Now that the plugin only exposes extensibility app-setup and extensibility tools-setup, consider updating to something like: "Commerce Extensibility commands for the Adobe I/O CLI" (or similar) so it matches the current scope.

Copy link
Contributor

@rojoangel rojoangel left a comment

Choose a reason for hiding this comment

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

Looks good to me, with some comments

Comment on lines +145 to +146
[Unreleased]: https://github.com/adobe-commerce/aio-cli-plugin-commerce/compare/1.0.0...HEAD
[1.0.0]: https://github.com/adobe-commerce/aio-cli-plugin-commerce/compare/0.7.0...1.0.0
Copy link
Contributor

@rojoangel rojoangel Mar 13, 2026

Choose a reason for hiding this comment

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

Minor: The compare link for 1.0.0 points to .../compare/1.0.0...HEAD. Once this PR is merged, that’s correct. If you version from a tag (e.g. v1.0.0), you might use v1.0.0 in the link for consistency with other entries. Only if your release process uses a v prefix.

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