Skip to content

Commit

Permalink
Add explicit dependency on tabbable. (#691)
Browse files Browse the repository at this point in the history
* Add explicit dependency on tabbable.

This project directly imports tabbable, but relies on it being available
transitively through its dependency on focus-trap. This makes this
package incompatible with yarn v2/v3, which requires that packages
explicitly state all dependencies.

It's also, more generally, best practice to explicitly declare all
dependencies. This helps ensure that package managers provide the
appropriate versions of dependencies to their requesting packages.

* Clarify why the added dependency

Co-authored-by: Stefan Cameron <stefan@stefcameron.com>
  • Loading branch information
smoores-dev and stefcameron authored Jun 13, 2022
1 parent 7615185 commit 2d6cd9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-mirrors-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'focus-trap-react': patch
---

Add explicit dependency on tabbable since the source directly requires it.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"typescript": "^4.7.3"
},
"dependencies": {
"focus-trap": "^6.9.4"
"focus-trap": "^6.9.4",
"tabbable": "^5.3.3"
},
"peerDependencies": {
"prop-types": "^15.8.1",
Expand Down

0 comments on commit 2d6cd9b

Please sign in to comment.