BigRoomStudios / strangeluv

How I Learned to Stop Worrying and Love React
MIT License
35 stars 7 forks source link

Maintenance/jan 2021 #264

Closed wswoodruff closed 3 years ago

wswoodruff commented 3 years ago

Most of these packages either had minor or patch upgrades awaiting — only 1 or 2 had major upgrades.

Major version upgrades:

Question: I thought caret syntax ^5.0.1 was the same as 5.x.x but seems not? Lots of versions in this PR are changing to the x.x.x syntax — which gives good output after installing and running ncu

Here's the before and after:

Screen Shot 2021-01-29 at 2 09 50 PM Screen Shot 2021-01-29 at 2 29 01 PM

Summary of what's left:

Paths forward that we're holding back on

devinivy commented 3 years ago

eslint-config-standard-react was able to go up to 11.x.x but that major version results in strange linting output like telling us that React is an unused variable when it's clear we need it to be in scope when using JSX

I think this can be explained by this: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html. So perhaps we could move to v11 taking this into account.

Question: I thought caret syntax ^5.0.1 was the same as 5.x.x but seems not?

These are identical except ^5.0.1 doesn't match 5.0.0 and 5.x.x does 👍

wswoodruff commented 3 years ago

I thought the caret and x syntax were similar and that's what I read too

The head-scratching part comes when I have it back at caret syntax, rm node_modules, do a fresh install, then run ncu to find the large list of updates to do. When the deps are in x.x.x syntax it seems to install the latest pkg versions — confusing, not sure why that's happening

I'm on npm -v 6.14.10

wswoodruff commented 3 years ago

I looked into updating eslint-config-standard-react to 11.x.x and noticed from the link you sent that they mention using @babel/preset-react but we use babel-preset-react-app which also makes its way into our webpack config — I haven't been able to get it to compile yet after attempting to set

[
    '@babel/preset-react',
    { 'runtime': 'automatic' }
]

But was unable to get things to compile — also here are some other weird results from the new eslint settings — it doesn't see that we're using elements imported from internals??

Screen Shot 2021-02-03 at 9 45 37 AM