aerogear / offix

GraphQL Offline Client and Server
https://offix.dev
Apache License 2.0
758 stars 45 forks source link

npm package seems out of date for react-offix-hooks #1073

Closed sc0ttdav3y closed 3 years ago

sc0ttdav3y commented 3 years ago

Bug Report

When building a new project, following these two steps on a blank repo will break due to a dependency conflict.

mkdir testproj
cd testproj
npm i react@latest
npm i react-offix-hooks@latest

When the last command runs, I get the following dependency issue:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.13.1" from react-offix-hooks@0.15.5
npm ERR! node_modules/react-offix-hooks
npm ERR!   react-offix-hooks@"0.15.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

When I look into the Git repo for Offix, I see you're updating dependencies for react-offix-hooks, and the peer dependency as per GitHub should support react@17.0.1. However, NPM doesn't see it that way, and still thinks your library has a peer dependency on react@16.13.1.

I've tried clearing NPM's local cache via npm cache clean --force. It looks like NPM is not being updated for some reason.

I'm wondering whether NPM isn't being updated because you are not updating the versions of your packages when updating the dependency versions via dependabot? It's been 0.15.5 for quite a while. Perhaps NPM is ignoring your updates? Or perhaps your own CI processes aren't pushing them to NPM for some reason.

In any event, it would be better to increment your own versions when you chance dependency versions, as it would give us easier debugging.

kingsleyzissou commented 3 years ago

Hi @sc0ttdav3y, I think this is because we have been mainly doing dev work on our datastore and have been manually releasing the changes for quick prototyping to get us to our beta release. There have been some minor changes since the last relelease, so I will create a new release and check that for you.

kingsleyzissou commented 3 years ago

Hi @sc0ttdav3y, we have made the decision to move away from the Apollo client and we have decided to deprecate our Offix packages and release our Datastore. I will be closing this issue, but if you have any questions, please feel free to let us know.

You can see the docs for the updated datastore here: https://offix.dev/docs/getting-started