Make `@testing-library/dom` a peer dependency instead
See original GitHub issue@testing-library/angular
provides queries straight from @testing-library/dom
except that it’s always a locked version. Meaning that one cannot receive any bug fixes and enhancements related to queries without also updating both @testing-library/angular
and @angular/core
itself.
People who are on Angular 8, for example cannot have these critical fixes without upgrading to Angular 9 at the very least (which isn’t always an option):
- https://github.com/testing-library/dom-testing-library/pull/580
- https://github.com/testing-library/dom-testing-library/pull/373
Making @testing-library/dom
a peer dep will give people a lot of wiggle room to what can be achieved as they see fit as opposed to being locked down.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (8 by maintainers)
Top Results From Across the Web
testing-library/dom should be a peer dependency · Issue #1103
Suggested solution: Make all packages use the same instance of @testing-library/dom by making it a peer dependency of @testing-library ...
Read more >How to make your npm package. Implement your library
import TestLib from 'react-testing-library-wrapper/dist';. The “peerDependencies” is used when your library depends on an external library.
Read more >create-react-app dependency version issues with React 18
Could not resolve dependency: npm ERR! peer react@"<18.0.0" from @testing-library/react@12.1.5 npm ERR! node_modules/@testing-library/react ...
Read more >react warning > @testing-library/user-event@13.5.0 ... - You.com
A peer dependency should be installed by yourself. Usually, the purpose is to prevent version conflicts. So, when you read a message such...
Read more >Understanding Peer Dependencies in JavaScript
Peer dependencies are almost like normal dependencies, but instead of defining a strong requirement between A and B (i.e the project you're ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No mate it doesn’t work:
The other packages use a peer dependency to the framework, so I guess we should do that.