Skip to content

Commit

Permalink
Add React @types to Snap package (#280)
Browse files Browse the repository at this point in the history
Declare this dependency explicitly, as it's currently necessary for the
JSX components to work proplerly.

The same deps are already in the site package and get hoisted, which
unintendedly makes everything work.

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
  • Loading branch information
ziad-saab and FrederikBolding authored Oct 22, 2024
1 parent 13dc8ee commit 03b5556
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/snaps-cli": "^6.2.1",
"@metamask/snaps-jest": "^8.2.0",
"@types/react": "18.2.4",
"@types/react-dom": "18.2.4",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"eslint": "^8.45.0",
Expand Down
22 changes: 22 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5024,6 +5024,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:18.2.4":
version: 18.2.4
resolution: "@types/react-dom@npm:18.2.4"
dependencies:
"@types/react": "*"
checksum: 8301f35cf1cbfec8c723e9477aecf87774e3c168bd457d353b23c45064737213d3e8008b067c6767b7b08e4f2b3823ee239242a6c225fc91e7f8725ef8734124
languageName: node
linkType: hard

"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.0.6":
version: 18.0.6
resolution: "@types/react-dom@npm:18.0.6"
Expand All @@ -5044,6 +5053,17 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:18.2.4":
version: 18.2.4
resolution: "@types/react@npm:18.2.4"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: d920fc93832fe50d5e8175a0ba233086c97a9e238ff7327c8319b8dec57409618f491d6f71be2374c3132f40a8fc428b3e406c1e2a5f1dc32ccd6d47051786d2
languageName: node
linkType: hard

"@types/responselike@npm:*, @types/responselike@npm:^1.0.0":
version: 1.0.0
resolution: "@types/responselike@npm:1.0.0"
Expand Down Expand Up @@ -16973,6 +16993,8 @@ __metadata:
"@metamask/snaps-cli": ^6.2.1
"@metamask/snaps-jest": ^8.2.0
"@metamask/snaps-sdk": ^6.1.1
"@types/react": 18.2.4
"@types/react-dom": 18.2.4
"@typescript-eslint/eslint-plugin": ^5.42.1
"@typescript-eslint/parser": ^5.42.1
buffer: ^6.0.3
Expand Down

0 comments on commit 03b5556

Please sign in to comment.