-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix: correct peer dependencies #272
Conversation
Hey @timdeschryver How did this resolve the dependencies issue? I refactored the Atm angular-testing-library has both a Seems like you did a revert? When building Which is weird. (unless it is used in testing-library somewhere?)
"peerDependencies": {
"@angular/common": ">= 13.0.0",
"@angular/platform-browser": ">= 13.0.0",
"@angular/animations": ">= 13.0.0", // ! this shouldn't be here either
"@angular/router": ">= 13.0.0",
"@angular/core": ">= 13.0.0"
},
"dependencies": {
"@testing-library/dom": "^8.0.0",
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": ">= 13.0.0",
"@angular/platform-browser": ">= 13.0.0",
"@angular/animations": ">= 13.0.0",
"@angular/router": ">= 13.0.0",
"@angular/core": ">= 13.0.0",
"@angular/forms": "13.0.2", // added bij NX
"rxjs": "^7.4.0",
"@testing-library/user-event": "^13.5.0" // added by NX
},
"dependencies": {
"@testing-library/dom": "^8.0.0",
"tslib": "^2.0.0"
}, angular/formsAs you can see @angular/forms is used by the tests. And somehow NX thinks FIXAdding the Question Which would mean only these are needed as "@angular/common": ">= 13.0.0",
"@angular/platform-browser": ">= 13.0.0",
"@angular/router": ">= 13.0.0",
"@angular/core": ">= 13.0.0" All other |
I could create a new PR with the new fixes. |
@the-ult I re-added the angular.json file as a quick fix. It's probably better to add them as a dev dependency, but I wasn't aware that that would be the proper fix. Another problem is that the build task in the angular file also includes some post-build scripts, which should also be added to the nx file. |
I 'll try to make a new PR next week. Not sure if adding them to the And thinking: We could ask somebody from the nx team if the above is actually needed. Might be a bug in NX. They should probably skip imports/dependencies, which are only used in tests. |
@the-ult fyi, it seems like we already got the post-build steps covered - so the only problem are the dependencies. |
Indeed. |
No rush though @the-ult |
…vDependencies @angular/forms and @testing-library/user-event are only used in tests and should not be exported in the package.json for production. @see: testing-library#272 (comment)
Closes #270