Skip to content
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

ExPlat: Loosen requirements on dependencies #62979

Merged
merged 8 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/explat-client-react-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog

## 0.0.5

- Loosen the requirements around dependencies

## 0.0.4

- Added ExperimentOptions and ExPlatClientReactHelpers Typescript interfaces to export
Expand Down
10 changes: 5 additions & 5 deletions packages/explat-client-react-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/explat-client-react-helpers",
"version": "0.0.4",
"version": "0.0.5",
"description": "Standalone ExPlat Client: React Helpers.",
"bugs": "https://github.com/Automattic/wp-calypso/issues",
"homepage": "https://github.com/Automattic/wp-calypso",
Expand All @@ -26,15 +26,15 @@
},
"dependencies": {
"@automattic/explat-client": "workspace:^",
"react": "^17.0.2",
"tslib": "^2.3.0"
"react": ">=16.8 <18",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@testing-library/react-hooks doesn't yet support React 18:
testing-library/react-hooks-testing-library#654

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCCom seems to use 16.14 so we should be good here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there a reason why React 18 should be excluded? The Explat bindings should work with v18 equally well as with an earlier v16 or v17, shouldn't they?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately @testing-library/react-hooks doesn't yet support React 18:
testing-library/react-hooks-testing-library#654

My unit tests are getting errors where I try to use it because the testing-library is incompatible with React 18.

"tslib": ">=2.3.0"
},
"devDependencies": {
"@automattic/calypso-polyfills": "workspace:^",
"@automattic/calypso-typescript-config": "workspace:^",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "7.0.2",
"react-dom": "^17.0.2",
"@testing-library/react-hooks": "^7.0.2",
"react-dom": ">=16.8 <18",
"typescript": "^4.5.5"
}
}
40 changes: 20 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,10 @@ __metadata:
"@automattic/calypso-typescript-config": "workspace:^"
"@automattic/explat-client": "workspace:^"
"@testing-library/react": ^12.1.3
"@testing-library/react-hooks": 7.0.2
react: ^17.0.2
react-dom: ^17.0.2
tslib: ^2.3.0
"@testing-library/react-hooks": ^7.0.2
react: ">=16.8 <18"
react-dom: ">=16.8 <18"
tslib: ">=2.3.0"
typescript: ^4.5.5
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -6641,7 +6641,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/react-hooks@npm:7.0.2":
"@testing-library/react-hooks@npm:7.0.2, @testing-library/react-hooks@npm:^7.0.2":
version: 7.0.2
resolution: "@testing-library/react-hooks@npm:7.0.2"
dependencies:
Expand Down Expand Up @@ -30430,7 +30430,7 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"react-dom@npm:17.0.2, react-dom@npm:^17.0.1, react-dom@npm:^17.0.2":
"react-dom@npm:17.0.2, react-dom@npm:>=16.8 <18, react-dom@npm:^17.0.1, react-dom@npm:^17.0.2":
version: 17.0.2
resolution: "react-dom@npm:17.0.2"
dependencies:
Expand Down Expand Up @@ -31031,7 +31031,7 @@ fsevents@~2.1.2:
languageName: node
linkType: hard

"react@npm:17.0.2, react@npm:^17.0.1, react@npm:^17.0.2":
"react@npm:17.0.2, react@npm:>=16.8 <18, react@npm:^17.0.1, react@npm:^17.0.2":
version: 17.0.2
resolution: "react@npm:17.0.2"
dependencies:
Expand Down Expand Up @@ -36236,20 +36236,20 @@ [email protected]:
languageName: node
linkType: hard

"tslib@npm:>=2.3.0, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.3.0":
version: 2.4.0
resolution: "tslib@npm:2.4.0"
checksum: eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d
languageName: node
linkType: hard

"tslib@npm:^1.10.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3":
version: 1.14.1
resolution: "tslib@npm:1.14.1"
checksum: 69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2
languageName: node
linkType: hard

"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.3.0":
version: 2.3.0
resolution: "tslib@npm:2.3.0"
checksum: a845aed84e7e7dbb4c774582da60d7030ea39d67307250442d35c4c5dd77e4b44007098c37dd079e100029c76055f2a362734b8442ba828f8cc934f15ed9be61
languageName: node
linkType: hard

"tsutils@npm:^3.21.0":
version: 3.21.0
resolution: "tsutils@npm:3.21.0"
Expand Down Expand Up @@ -36479,22 +36479,22 @@ [email protected]:
linkType: hard

"typescript@npm:^4.5.5":
version: 4.5.5
resolution: "typescript@npm:4.5.5"
version: 4.6.3
resolution: "typescript@npm:4.6.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ac15b92f3dcd9a4233cab288a913ccbd96729fc488181396fa93c0297ccef3cd3c2f9a7a63340efb0d07bff3d5026028fc81b9c1ef08076029e057081eb5884b
checksum: 53e8bcf00abde8ecb2002d1f1e15160b21cb62b2dd0ff71bad2ef55fa96141f76316fce649a415758d3f17bd8e0c5676d8f017c34ec3e38b585812d4717a712c
languageName: node
linkType: hard

"typescript@patch:typescript@^4.5.5#~builtin<compat/typescript>":
version: 4.5.5
resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53"
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=493e53"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6a8888c9fe41d0a19324125c636b1adb9ec5c984342fc7a26f2a389a432a94639c24b72e6e019ffbbb03cb614c1f008b4c31e48fb560b772e45e6581265c500b
checksum: d06fdd5852d0fe86f44b56507d37a3458812a1dff11c0fedaeedbe163e81646643669a5bc0dcc3500c72128267b384cda7567c53c568f94e7c753ac6b4cfbce3
languageName: node
linkType: hard

Expand Down