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

chore(migration): CRA to Vite, React 18 and other dependencies upgraded #98

Merged

Conversation

ajithsimons
Copy link
Contributor

@ajithsimons ajithsimons commented Apr 12, 2024

Description

  • Scaffolder: CRA to Vite
  • React: 17 to 18
  • Test: Jest to Vitest
  • Upgraded to latest catena-x shared components
  • Type updates in few places to comply with latest typescript and eslint

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@ajithsimons
Copy link
Contributor Author

ajithsimons commented Apr 12, 2024

Hey @almadigabor ,
Actual code changes is not more than 400 lines. Since many libraries added and removed the peer dependencies in package-lock.json and Dependencies file increased the number of line changes, It has become inevitable when we migrate React 18 with Vite.

@ajithsimons ajithsimons self-assigned this Apr 12, 2024
@ajithsimons
Copy link
Contributor Author

ajithsimons commented Apr 12, 2024

@almadigabor I need your help to create dependency review tickets in eclipse for the following restricted libraries in this PR:

npm/npmjs/-/i18next/23.11.1
npm/npmjs/-/jsdom/24.0.0
npm/npmjs/-/react-player/2.16.0
npm/npmjs/-/vite-node/1.5.0
npm/npmjs/-/vite-plugin-checker/0.6.4
npm/npmjs/-/vitest/1.5.0
npm/npmjs/@rollup/rollup-android-arm-eabi/4.14.1
npm/npmjs/@rollup/rollup-android-arm64/4.14.1
npm/npmjs/@rollup/rollup-darwin-arm64/4.14.1
npm/npmjs/@rollup/rollup-darwin-x64/4.14.1
npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.14.1
npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.14.1
npm/npmjs/@rollup/rollup-linux-arm64-musl/4.14.1
npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.14.1
npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.14.1
npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.14.1
npm/npmjs/@rollup/rollup-linux-x64-gnu/4.14.1
npm/npmjs/@rollup/rollup-linux-x64-musl/4.14.1
npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.14.1
npm/npmjs/@rollup/rollup-win32-ia32-msvc/4.14.1
npm/npmjs/@rollup/rollup-win32-x64-msvc/4.14.1
npm/npmjs/@testing-library/react/14.3.1
npm/npmjs/@vitest/expect/1.5.0
npm/npmjs/@vitest/runner/1.5.0
npm/npmjs/@vitest/snapshot/1.5.0
npm/npmjs/@vitest/utils/1.5.0

Copy link
Contributor

@sachinargade123 sachinargade123 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@adityagajbhiye9 adityagajbhiye9 left a comment

Choose a reason for hiding this comment

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

LGTM

@almadigabor
Copy link
Contributor

I ran the dash tool and got the following output:

[main] INFO Querying Eclipse Foundation for license data for 500 items.
[main] INFO Found 160 items.
[main] INFO Querying Eclipse Foundation for license data for 188 items.
[main] INFO Found 55 items.
[main] INFO Querying ClearlyDefined for license data for 470 items.
[main] INFO Found 442 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO npm/npmjs/-/jsdom/24.0.0
[main] INFO npm/npmjs/-/vite-plugin-checker/0.6.4
[main] INFO npm/npmjs/@rollup/rollup-android-arm-eabi/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-android-arm64/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-darwin-arm64/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm64-musl/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-x64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.14.1
[main] INFO npm/npmjs/@vitest/utils/1.5.0
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.
[main] INFO A review is required for npm/npmjs/@rollup/rollup-android-arm-eabi/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14395 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm64-musl/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14396 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14397 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14398 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-android-arm64/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14399 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-x64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14400 .
[main] INFO A review is required for npm/npmjs/-/vite-plugin-checker/0.6.4.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14401 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14402 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14403 .
[main] INFO A review is required for npm/npmjs/-/jsdom/24.0.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14404 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14405 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-darwin-arm64/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14406 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14407 .
[main] INFO A review is required for npm/npmjs/@vitest/utils/1.5.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14408 .

@ajithsimons
Copy link
Contributor Author

I ran the dash tool and got the following output:

[main] INFO Querying Eclipse Foundation for license data for 500 items.
[main] INFO Found 160 items.
[main] INFO Querying Eclipse Foundation for license data for 188 items.
[main] INFO Found 55 items.
[main] INFO Querying ClearlyDefined for license data for 470 items.
[main] INFO Found 442 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO npm/npmjs/-/jsdom/24.0.0
[main] INFO npm/npmjs/-/vite-plugin-checker/0.6.4
[main] INFO npm/npmjs/@rollup/rollup-android-arm-eabi/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-android-arm64/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-darwin-arm64/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-arm64-musl/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-linux-x64-gnu/4.14.1
[main] INFO npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.14.1
[main] INFO npm/npmjs/@vitest/utils/1.5.0
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.
[main] INFO A review is required for npm/npmjs/@rollup/rollup-android-arm-eabi/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14395 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm64-musl/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14396 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14397 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14398 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-android-arm64/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14399 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-x64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14400 .
[main] INFO A review is required for npm/npmjs/-/vite-plugin-checker/0.6.4.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14401 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14402 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14403 .
[main] INFO A review is required for npm/npmjs/-/jsdom/24.0.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14404 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14405 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-darwin-arm64/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14406 .
[main] INFO A review is required for npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.14.1.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14407 .
[main] INFO A review is required for npm/npmjs/@vitest/utils/1.5.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14408 .

I just ran it from my end, everything is approved except one dependency. "npm/npmjs/-/jsdom/24.0.0, MIT AND LGPL-2.0-or-later AND W3C-19980720 AND LicenseRef-scancode-iso-8879 AND (Apache-2.0 AND BSD-3-Clause), restricted, #14404"
Hope this one also gets approved soon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you actually need this file in your repo? I would not add this explicitly. You can always run the dependency check workflow as well.

Copy link
Contributor Author

@ajithsimons ajithsimons Apr 18, 2024

Choose a reason for hiding this comment

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

we have a pipeline to review the dependencies while building the app. For that we need this file to be present in the repo.
portal-frontend doing the same, I got the reference from there only. https://github.com/eclipse-tractusx/portal-frontend/tree/main/scripts/download

@ajithsimons
Copy link
Contributor Author

ajithsimons commented Apr 22, 2024

@almadigabor happy-dom replaced with jsdom due to license issue -> https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14404#note_2134256

Please raise a dependency review ticket for this lib - npm/npmjs/-/happy-dom/14.7.1

@ajithsimons
Copy link
Contributor Author

@almadigabor happy-dom replaced with jsdom due to license issue -> https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14404#note_2134256

Please raise a dependency review ticket for this lib - npm/npmjs/-/happy-dom/14.7.1

@almadigabor any update on this?

@ajithsimons
Copy link
Contributor Author

Hey @almadigabor ! Could you help us merge this PR soon? If you need any clarification pls let me know.

@ajithsimons ajithsimons requested a review from FaGru3n April 25, 2024 11:28
@ajithsimons
Copy link
Contributor Author

ajithsimons commented Apr 25, 2024

@almadigabor happy-dom replaced with jsdom due to license issue -> https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14404#note_2134256

Please raise a dependency review ticket for this lib - npm/npmjs/-/happy-dom/14.7.1

@FaGru3n Could you please help here?

@almadigabor
Copy link
Contributor

Hey @ajithsimons, I've ran the tool, you can see the output below. A ticket was created for happy-dom.

[main] INFO Querying Eclipse Foundation for license data for 500 items.
[main] INFO Found 175 items.
[main] INFO Querying Eclipse Foundation for license data for 160 items.
[main] INFO Found 50 items.
[main] INFO Querying ClearlyDefined for license data for 432 items.
[main] INFO Found 404 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO npm/npmjs/-/happy-dom/14.7.1
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.
[main] INFO A review is required for npm/npmjs/-/happy-dom/14.7.1.
[main] INFO A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/14578 .

@almadigabor
Copy link
Contributor

almadigabor commented Apr 25, 2024

Hey @ajithsimons, the ticket is closed and the dependency have been approved. You should update the DEPENDENCIES file and we can merge the PR.

@adityagajbhiye9 adityagajbhiye9 removed the request for review from FaGru3n April 26, 2024 04:15
@ajithsimons
Copy link
Contributor Author

Hey @ajithsimons, the ticket is closed and the dependency have been approved. You should update the DEPENDENCIES file and we can merge the PR.

Thanks @almadigabor , I have updated the DEPENDENCIES file. you can merge now!

@almadigabor almadigabor merged commit b1ee5ac into eclipse-tractusx:main Apr 26, 2024
6 checks passed
@almadigabor almadigabor deleted the migration/vite_react18_libs branch April 26, 2024 05:55
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.

4 participants