-
Notifications
You must be signed in to change notification settings - Fork 395
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
feat(schematics): list schematics from extended collections #2096
base: master
Are you sure you want to change the base?
Conversation
Tests seem to fail for this PR for some reason |
@xdissent did you got the unit tests passing in your machine? |
Sorry, I was on vacation. Yep, they passed locally. I’ll rebase and try again soon. |
hey, guys, thanks for working on this, this pull request not only allowed us to list properly available schematics but fixed the bug that caused the I took some time to dig into why the tests failed, I don't think it was caused by the changes, it's because of the unstable test cases in so, I think we can fix the test cases simply by rebasing the master. @xdissent |
Co-authored-by: Kamil Mysliwiec <[email protected]>
Co-authored-by: Kamil Mysliwiec <[email protected]>
f9b4585
to
a063bbd
Compare
Sorry that took so long, I started a new full-time gig right after I got back from vacation 😅 |
}, | ||
const workflow = new NodeWorkflow(process.cwd(), {}); | ||
const collection = workflow.engine.createCollection(this.collection); | ||
const collectionDescs = [ |
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.
const collectionDescs = [ | |
const collectionDescriptions = [ |
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.
nit
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The CLI lists available schematics from custom collections by parsing the
collection.json
file directly. This list does not include schematics that may be available via anextends
key in thecollection.json
. It also looks forcollection.json
in a fixed location, rather than supporting theschematics
key ofpackage.json
.Issue Number: N/A
What is the new behavior?
The CLI lists all available schematics (with
extends
support) and locates thecollection.json
using theschematics
key ofpackage.json
. Additionally, schematic names and aliases are deduped and merged to better reflect the actual configuration that will be used by@angular-devkit/schematics
: Collections usingextends
can overwrite extended collection schematics and re-map aliases. An alias may also override a schematic name, causing it to be effectively excluded from the collection.Does this PR introduce a breaking change?
Other information
Has allowing multiple schematic aliases in nest-cli been considered? I think it would make it more clear what is going on with how
@angular-devkit/schematics
merges schematic names and aliases. Right now there are hidden aliases defined by the schematics that can be used but not listed by the CLI.