-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Update node dependencies #1596
Update node dependencies #1596
Conversation
7223023
to
326033c
Compare
please rebase and update |
@justin808
|
This commit causes failing tests. This is made to check the failures.
c9958f1
to
f9e76fd
Compare
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part needs to be improved. I couldn't find a way other than ignoring the linter rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some times there's no better way to do things than to ignore linter rules.
That's because some linter rules are just for identifying possible code smells.
const actual = ReactOnRails.render('R1', {}, 'root')._reactInternalFiber.type; | ||
const actual = ReactOnRails.render('R1', {}, 'root')._reactInternals.type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is internal logic in React, and there is no documentation about it. But in React 17, ReactOnRails.render('R1', {}, 'root')
only has ._reactInternals
In React 18, this is changed again.
0da8f1c
to
29d6053
Compare
248abdf
to
060165f
Compare
js-dom version 23 requires Node 18
This reverts commit b6890f4.
@@ -51,7 +51,7 @@ const configLoader = (configPath) => { | |||
// Some test environments might not have the NODE_ENV set, so we'll have fallbacks. | |||
const configEnv = env.NODE_ENV || env.RAILS_ENV || 'development'; | |||
const ymlConfigPath = join(configPath, 'webpacker.yml'); | |||
const settings = safeLoad(readFileSync(ymlConfigPath, 'utf8'))[configEnv]; | |||
const settings = load(readFileSync(ymlConfigPath, 'utf8'))[configEnv]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahangarha can you explain why we had to stop using safeLoad?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. That is because of the new changes in js-yaml
v4.0.0.
Breaking: removed
safe*
functions. Useload
,loadAll
,dump
instead which are all now safe by default.
They are all safe by this version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figure out why we still have this file and if we can delete this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use this file anymore, but I am not sure if no other project uses this as config loader. It is very unlikely but still...
It is included in out npm package and removing it is a breaking change.
What about putting this file in the queue for removal in the next major release and for now, we show a deprecation message for using it?
"react": ">= 17", | ||
"react-dom": ">= 17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Judahmeek @ahangarha can we under the bump of React?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, no logic has changed in the codebase regarding React API (except in tests, which is not our concern here).
I think we can keep the minimum version of React to 16.
We drop support for Node v14 and v17 because of bumping
@typescript-eslint/parser
version to 6+ and js-dom to v22Remaining upgrades:
eslint-config-shakacode
Can we do these upgrades in another PR?
This change is