-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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): use schematicCollections instead of defaultCollection #3441
feat(schematics): use schematicCollections instead of defaultCollection #3441
Conversation
✅ Deploy Preview for ngrx-io ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
...value, | ||
}; | ||
if (!(workspace['cli'] && workspace['cli']['schematicCollections'])) { | ||
throw new Error( |
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.
Why are we throwing an error here? If the schematicCollections property doesn't exist, we should create it and add @ngrx/schematics to it.
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.
That would be on me 😅
#3383 (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.
Since it's 2vs1, I'm fine with creating the property.
I don't know what Angular's schematic will do with it though (in the case that NgRx is updated before Angular)
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.
Ahh ok. I was thinking of cases like Nx where it may not be present, but I think they account for that anyway. Throwing the error should be ok for now
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 good to me!
After this, we should also update the docs.
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?
Closes #3383
What is the new behavior?
Throw an exception if schematicCollections is not defined because the user may not have upgraded Angular to v14.
Does this PR introduce a breaking change?
Other information