Skip to content
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

package: upgrade to react-scripts 5.0.0 #213

Merged
merged 6 commits into from
Jan 28, 2022

Conversation

mvidalgarcia
Copy link
Member

closes #204

- upgrade semantic-ui deps to latest
- install `@semantic-ui-react/css-patch` to fix `semantic-ui-css` issue (Semantic-Org/Semantic-UI-React#4287 (comment))

closes reanahub#204
- `semantic-ui-less` is used instead for styling due to theming
- more info: https://react.semantic-ui.com/theming/
@mvidalgarcia mvidalgarcia marked this pull request as ready for review January 26, 2022 12:10
@audrium audrium self-assigned this Jan 27, 2022
Copy link
Member

@audrium audrium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works fine for me.

I noticed that now we have both yarn.lock and package-lock.json which could be confusing. Since we switched completely to yarn, perhaps we can get rid of the package-lock.json? Otherwise it would be good to update it as well..
By the way, while installing I got this warning from yarn:

Warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

run-tests.sh Outdated
@@ -20,8 +20,12 @@ check_sphinx () {
sphinx-build -qnNW docs docs/_build/html
}

check_lint () {
cd reana-ui && yarn lint && cd ..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: another option would be to use parentheses in commands. In this way we don't have to go back (cd ..). Command would look like this: (cd reana-ui && yarn lint). Same could be applied for check_prettier and check_js_tests. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, didn't know the subshell functionality 👍

@@ -55,6 +59,7 @@ do
case $arg in
--check-shellscript) check_script;;
--check-sphinx) check_sphinx;;
--check-lint) check_lint;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add check_lint to check_all() and probably add a new GA CI job as well?

Minor: year was not updated in this file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about GA CI job for linting? Don't we need it?

"fmt": "prettier --write .",
"ci": "run-p lint prettier",
"eject": "craco eject",
"postinstall": "semantic-ui-css-patch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of new commands were added, it's not completely clear for me when one has to use it? For example postinstall command is triggered automatically or one has to do it at some point? Maybe it would be worth to have a short description in the readme?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would something like this make sense?

Yarn scripts
============

- `start`: start a development server
- `build`: build a production-ready bundle in the `build` folder
- `test`: run unit tests
- `lint`: run linter
- `prettier`: check code formatting with prettier
- `fmt`: fix formatting problems with prettier
- `ci`: run both linter and format checkers, useful before committing changes

Most of them are very repetitive but it might help, not sure, let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks nice and clear in my opinion! thanks

@mvidalgarcia
Copy link
Member Author

I noticed that now we have both yarn.lock and package-lock.json which could be confusing.

Where's the package-lock.json? I can't see it.

@audrium
Copy link
Member

audrium commented Jan 28, 2022

I noticed that now we have both yarn.lock and package-lock.json which could be confusing.

Where's the package-lock.json? I can't see it.

Indeed it seems it was generated by me locally and because of .gitignore I didn't spot it was not included in the repo.. Please ignore my comment, all is good :)

@mvidalgarcia mvidalgarcia merged commit 58341cc into reanahub:master Jan 28, 2022
@mvidalgarcia mvidalgarcia deleted the cra-5 branch January 28, 2022 16:10
@audrium audrium mentioned this pull request Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

package: bump all module versions
3 participants