-
Notifications
You must be signed in to change notification settings - Fork 39
fix: fix the aio discover command and fix the unit tests #741
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #741 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 238 238
Branches 47 48 +1
=========================================
Hits 238 238 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shazron
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. I would also add to the command's .description, this new filter that it will only list plugins that have that prefix
purplecabbage
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.
looks great!
This was the way it used to work, adobe has just been moved from scope to name prefix. |
I read the code yes - not sure what you mean, now it is "strict" (requires the plugin to have a certain prefix, not just scope) when before it was loose (scope only). The command description should reflect this new restriction |
|
Updated the command description to clarify the new restrictive filtering behavior |
Description
The fix is to specifically look for packages that starts with
@adobe/aio-cli-pluginso that only plugin packages that are explicitly tagged as AIO CLI plugins show up for the user and thus eliminating other packages like@adobe/aio-lib-ims-oauth,@adobe/aio-lib-ims-jwtetcRelated Issue
Motivation and Context
The issue was that
aio discovercommand was returning an empty table because the npm registry API response structure changed- the package objects no longer contains ascopeproperty that our code expects and hence the filtering returned an empty array.Just adding a snippet of the first result for the
packageobject from the response returned by the npm registry API follows this structureHow Has This Been Tested?
By linking the bugfix branch and running aio discover and aio discover -i
Verifiied the commands are returning expected results
Fixed the unit tests to match the new implementation
Screenshots (if appropriate):
aio discoveraio discover -iaio discover --helpTypes of changes
Checklist: