Skip to content

Conversation

@riddhi2910
Copy link
Contributor

@riddhi2910 riddhi2910 commented Jan 15, 2026

Description

Upgraded the @adobe/aio-cli-plugin-events to @oclif/core v2 by updating the dependency to ^2.8.12, switching from CliUx to direct ux imports and refactored command arguments to the new object-based syntax in line with the v2 migration guide.

Related Issue

Motivation and Context

https://jira.corp.adobe.com/browse/ACNA-2495

How Has This Been Tested?

Yes, npm test

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

moritzraho
moritzraho previously approved these changes Jan 16, 2026
Copy link

Copilot AI left a comment

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 upgrades the @adobe/aio-cli-plugin-events plugin from @oclif/core v1 to v2 by updating dependencies, refactoring imports, and converting command arguments to the new object-based syntax required by @oclif/core v2.

Changes:

  • Updated @oclif/core dependency from ^1.5.2 to ^2.8.12
  • Replaced CliUx imports with direct ux imports across all command files
  • Converted command arguments from array-based to object-based syntax using Args.string() and Args.file()
  • Updated bin/run to use the new async execute() API pattern
  • Added comprehensive jest mocks for @oclif/core v2 in test setup
  • Updated all test assertions to reflect the new args object structure

Reviewed changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Updated @oclif/core to v2.8.12
bin/run Refactored to use async import and execute() API for v2
test/jest.setup.js Added comprehensive mocks for @oclif/core v2 ux and cli-ux modules
src/commands/event/registration/list.js Changed CliUx import to direct ux import
src/commands/event/registration/get.js Added Args import, changed to object-based args syntax
src/commands/event/registration/delete.js Added Args import, changed to object-based args syntax
src/commands/event/registration/create.js Added Args import, converted to object-based args with Args.file()
src/commands/event/provider/update.js Added Args import, changed to object-based args syntax
src/commands/event/provider/list.js Changed CliUx import to direct ux import
src/commands/event/provider/get.js Added Args import, changed to object-based args syntax
src/commands/event/provider/delete.js Added Args import, changed to object-based args syntax
src/commands/event/provider/create.js Changed CliUx import to direct ux import
src/commands/event/index.js Changed args from empty array to empty object
src/commands/event/eventmetadata/update.js Added Args import, converted multiple args to object-based syntax
src/commands/event/eventmetadata/list.js Added Args import, changed to object-based args syntax
src/commands/event/eventmetadata/index.js No code changes (only test expectations updated)
src/commands/event/eventmetadata/get.js Added Args import, converted multiple args to object-based syntax
src/commands/event/eventmetadata/delete.js Added Args import, converted multiple args to object-based syntax
src/commands/event/eventmetadata/create.js Added Args import, changed to object-based args syntax
test/commands/event/registration/list.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/registration/index.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/registration/get.test.js Updated to access args as object properties
test/commands/event/registration/delete.test.js Updated to access args as object properties
test/commands/event/registration/create.test.js Updated to access args as object properties
test/commands/event/provider/update.test.js Updated to access args as object properties
test/commands/event/provider/list.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/provider/index.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/provider/get.test.js Updated to access args as object properties
test/commands/event/provider/delete.test.js Updated to access args as object properties
test/commands/event/provider/create.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/index.test.js Updated test expectation for args from empty array to empty object
test/commands/event/eventmetadata/update.test.js Updated to access args as object properties
test/commands/event/eventmetadata/list.test.js Updated to access args as object properties
test/commands/event/eventmetadata/index.test.js Updated test expectation for args from toBeUndefined to toBeDefined
test/commands/event/eventmetadata/get.test.js Updated to access args as object properties
test/commands/event/eventmetadata/delete.test.js Updated to access args as object properties, added timer management
test/commands/event/eventmetadata/create.test.js Updated to access args as object properties

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

Copy link

@pru55e11 pru55e11 left a comment

Choose a reason for hiding this comment

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

LGTM

@riddhi2910 riddhi2910 merged commit 0e2f4fb into master Jan 20, 2026
17 checks passed
@purplecabbage purplecabbage deleted the upgrade-oclif-core-v2 branch January 21, 2026 00:57
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.

5 participants