-
-
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
Changes from all commits
eea3343
7d5f5e9
b6473b2
48ffe3f
06cf069
f9e76fd
8caf966
4611093
29d6053
8adcaf8
060165f
cf12f4a
1f22f99
b6890f4
bfd7d31
1065f3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ describe('ReactOnRails', () => { | |
|
||
document.body.innerHTML = '<div id="root"></div>'; | ||
// eslint-disable-next-line no-underscore-dangle | ||
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 commentThe 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, |
||
expect(actual).toEqual(R1); | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,45 +14,45 @@ | |
"@babel/preset-env": "^7.20.2", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/types": "^7.20.7", | ||
"@types/jest": "^28.1.3", | ||
"@types/react": "^16.14.35", | ||
"@types/react-dom": "^16.9.17", | ||
"@types/turbolinks": "^5.2.0", | ||
"@types/webpack-env": "^1.18.0", | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"@types/jest": "^29.0.0", | ||
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.0", | ||
"@types/turbolinks": "^5.2.2", | ||
"@types/webpack-env": "^1.18.4", | ||
"@typescript-eslint/eslint-plugin": "^6.18.1", | ||
"@typescript-eslint/parser": "^6.18.1", | ||
"babelify": "^10.0.0", | ||
"blue-tape": "^1.0.0", | ||
"concurrently": "^8.2.0", | ||
"concurrently": "^8.2.2", | ||
"create-react-class": "^15.7.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^7.0.0", | ||
"eslint-config-shakacode": "^16.0.1", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsx-a11y": "^6.8.0", | ||
"eslint-plugin-prettier": "^3.4.1", | ||
"eslint-plugin-react": "^7.32.1", | ||
"jest": "^28.1.3", | ||
"jest-environment-jsdom": "^28.1.3", | ||
"jsdom": "^16.4.0", | ||
"eslint-plugin-react": "^7.33.2", | ||
"jest": "^29.0.0", | ||
"jest-environment-jsdom": "^29.0.0", | ||
"jsdom": "^22.1.0", | ||
"nps": "^5.9.3", | ||
"prettier": "^2.8.3", | ||
"prettier": "^2.8.8", | ||
"prettier-eslint-cli": "^5.0.0", | ||
"prop-types": "^15.8.1", | ||
"react": "^16.14.0", | ||
"react-dom": "^16.14.0", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0", | ||
"react-transform-hmr": "^1.0.4", | ||
"redux": "^4.2.0", | ||
"ts-jest": "^28.0.8", | ||
"typescript": "^4.9.4" | ||
"redux": "^4.2.1", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime-corejs3": "^7.12.5" | ||
}, | ||
"peerDependencies": { | ||
"js-yaml": ">= 3.0.0", | ||
"react": ">= 16", | ||
"react-dom": ">= 16" | ||
"js-yaml": ">= 4.1.0", | ||
"react": ">= 17", | ||
"react-dom": ">= 17" | ||
Comment on lines
+54
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
}, | ||
"files": [ | ||
"node_package/lib", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
const { join, resolve } = require('path'); | ||
const { env } = require('process'); | ||
const { safeLoad } = require('js-yaml'); | ||
const { load } = require('js-yaml'); | ||
const { readFileSync } = require('fs'); | ||
|
||
function removeOuterSlashes(string) { | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Sure. That is because of the new changes in
They are all safe by this version. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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? |
||
|
||
// NOTE: Rails path is hard coded to `/public` | ||
const output = { | ||
|
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.