react-gif-player icon indicating copy to clipboard operation
react-gif-player copied to clipboard

Update dependencies to work with React 18

Open taktran opened this issue 1 year ago • 7 comments

Fixes #37 (kind of, upgrade to 18 instead of 17)

Changes

  • Add React v18 peer dependency
  • Update dependencies to work with React v18 ⚠️ I didn't test any other React version, so have dropped support for them in the peer dependency, but happy to put them back in if required. My thinking is that the dependency updates would break on lower versions, but requires some testing
  • Update webpack config optimization.noEmitOnErrors -> optimization.emitOnErrors
  • Replace @babel/plugin-proposal-object-rest-spread with @babel/plugin-transform-object-rest-spread
  • Move autoprefixer browserslist from postcss.config.js to package.json
  • Updated the examples to use React 18. The v0.4.2 built files work with React 18 as is, but an update will be required with a new npm release

taktran avatar Jan 24 '24 11:01 taktran

React 18 has been out for almost 2 years so it doesn't bother me to make it the minimum supported version. However please bump to a new major version for react-gif-player, we don't want existing users with old react versions to silently update to this one.

benwiley4000 avatar Jan 24 '24 14:01 benwiley4000

Also, why did you change emitOnErrors to true? It may have been a mistake. I assume newer webpack changed it from opt-out to opt-in.

benwiley4000 avatar Jan 24 '24 15:01 benwiley4000

please bump to a new major version for react-gif-player, we don't want existing users with old react versions to silently update to this one.

Have done this now. It's now at v1.0.0 🎉

Also, why did you change emitOnErrors to true? It may have been a mistake. I assume newer webpack changed it from opt-out to opt-in.

Oops, didn't notice that. Good catch - have removed.


In terms of testing, I did

Dev testing:

npm install
npm run dev

# Check http://localhost:8080/example.html looks fine

Build testing:

npm run build
npx serve .

# Check http://localhost:3000/example.html looks fine

taktran avatar Jan 24 '24 15:01 taktran

Sorry I should have specified, 0.5.0 is ok (it's the same as a major version bump when we're still at 0). Is that ok? It's just since I haven't had time to test it I don't want to bump to 1.0 yet.

benwiley4000 avatar Jan 24 '24 15:01 benwiley4000

ah, no worries - have updated 😄

taktran avatar Jan 24 '24 15:01 taktran

Alright I will try to merge and release this soon. If I had auto publish set up it would have been easier 😄

benwiley4000 avatar Jan 24 '24 16:01 benwiley4000