-
Notifications
You must be signed in to change notification settings - Fork 5
Update @adobe/aio-cli-plugin-events to @oclif/core v2 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this 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.
pru55e11
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Checklist: