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

feat: Require rxjs 7.5, update all deps #47

Merged
merged 2 commits into from
Nov 21, 2022
Merged

Conversation

yuqiora
Copy link
Contributor

@yuqiora yuqiora commented Oct 27, 2022

Updated basically all the dependencies so that we are on the latest version. Except maybe chalk which remains on v4 because v5 went full ESM. Just a few extra adjustments were necessary. Given that most of it are dev deps it should hopefully be alright.

When all of this is merged I might enable dependabot here. To keep it more automated.

@yuqiora yuqiora requested a review from goce-cz October 27, 2022 13:04
@@ -18,10 +18,10 @@
"tslib": "^2.4.0"
},
"peerDependencies": {
"react": ">=16.9.0"
"react": ">=18.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this to be >= 18?

The spicy hooks are used also on few other projects, so if there's no strong reason to upgrade the minimum peer version, I wouldn't do it. Can't we just ensure compatibility with at least both 17 and 18?

18 seems to have some nasty side-effects, so the adoption might be slow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we don't. I will revert it back for now.

Comment on lines 22 to 23
"react": ">=18.0.0",
"rxjs": ">=7.5.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above, do we need to bump the majors here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For react, I will revert it just as above. There is relatively minimal reliance on it besides the hooks the only important v18 change, the children prop, is easy to make backwards compatible.

On the other hand, rxjs is used quite heavily. Especially in package about observables. I need to look at v6 vs v7 changes. But in general it just made sense to me to require matching version. But if we know it will not introduce any issues if people still use it with v6 we could keep it as it was.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just looking at the list at https://rxjs.dev/deprecations/breaking-changes I would rather keep the requirement for rxjs v7.

Comment on lines +58 to +60
complete: () => {
pending$.toPromise().finally(() => subscriber.complete()).catch(noop)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, what happens if you return the promise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not match the types and @typescript-eslint/no-misused-promises complains. Same with all the other changes. Alternatively I could disable the rule and revert all of it how it was before. Or just selectively the affected ones. To make sure all the functionality is the same.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the explanation. No need to take any action. Please let's just revert the minimum version for React and land this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Peer dependencies already reverted to >=16.9.0. Though devDependencies use types for v18 and root requires v18 as well.

@yuqiora yuqiora force-pushed the lerna-lite-and-preset branch from 6c0feed to 27b9e0c Compare November 10, 2022 08:17
Base automatically changed from lerna-lite-and-preset to next November 10, 2022 08:21
@yuqiora yuqiora force-pushed the update-deps-20221027 branch from 89e1a48 to b2cfa91 Compare November 10, 2022 08:53
@yuqiora yuqiora force-pushed the update-deps-20221027 branch from b2cfa91 to ef7bb8b Compare November 10, 2022 08:55
@yuqiora yuqiora changed the title feat!: Require react 18 and rxjs 7.5, update all deps feat: Require rxjs 7.5, update all deps Nov 21, 2022
@yuqiora yuqiora merged commit 1d35a9a into next Nov 21, 2022
@yuqiora yuqiora deleted the update-deps-20221027 branch November 21, 2022 16:15
yuqiora added a commit that referenced this pull request Nov 22, 2022
* feat!: Require react 18 and rxjs 7.5, update all deps

* feat: Update various deps, lower react requirement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants