StatTag / StatWrap

StatWrap
https://sites.northwestern.edu/statwrap/
MIT License
1 stars 10 forks source link

Refactor : Update Project Dependencies #171

Open Abhijay007 opened 8 months ago

Abhijay007 commented 8 months ago

Description:

This issue is dedicated to updating the dependencies of the StatWrap project. Regularly updating dependencies is crucial for ensuring the security, stability, and performance of our software. Outdated dependencies can expose our project to security vulnerabilities, compatibility issues, and hindered functionality. By systematically updating our dependencies, we maintain the health and sustainability of our project in the long run.

Objective:

The primary objective of this issue is to identify and update outdated dependencies within our project. Contributors will collaborate to update dependencies to their latest versions, addressing any breaking changes and ensuring compatibility with our project. Each updated dependency should be marked with a ✅ to indicate successful completion.

Steps:

  1. Identify outdated dependencies: Contributors will review our project's dependencies and list those that require updating in the list below.
  2. Update dependencies: Contributors will work on updating the identified dependencies to their latest versions, ensuring compatibility and addressing any breaking changes.
  3. Mark completed updates: Once a dependency is successfully updated, contributors will mark it with a ✅ emoji in the list below next to the associated dependency.
  4. Testing: Thorough testing will be conducted to ensure that the project functions correctly with the updated dependencies.
    1. Please ensure after doing an update that you run yarn test and confirm all unit tests still pass. And also visually inspect the program via yarn dev.
  5. Documentation: Any relevant changes resulting from dependency updates will be documented to aid future development and maintenance efforts.

Benefits:

  1. Enhanced security: Updating dependencies helps mitigate security vulnerabilities present in older versions.
  2. Improved performance: Updated dependencies often come with performance enhancements and bug fixes.
  3. Better maintainability: Keeping dependencies up to date simplifies future maintenance tasks and reduces technical debt.
  4. Collaboration: This issue provides an opportunity for multiple contributors to collaborate on improving our project's dependencies simultaneously.

List of Dependencies that need to be updated:

Please mark each dependency with a check mark ✅ once it's successfully updated.

Note for contributors: This is an open issue, and needs no assignment. Contributors can just comment below on which dependency they are working on and create a PR for the same.

lrasmus commented 8 months ago

Thank you @Abhijay007 for spearheading this! I am sorry where we don't have automated tests in place to confirm all operations (specifically with the UI). I updated the instructions with details on testing.

Abhijay007 commented 8 months ago

I am working on updating the following dependencies, and will open PR for this soon :

Gmin2 commented 8 months ago

Hey @lrasmus we can add a bot to update the dependencies automatically

Abhijay007 commented 8 months ago

Hey @lrasmus we can add a bot to update the dependencies automatically

Hi @utnim2, thank you for the suggestion. We already have an automated GitHub bot set up for this. However, these bots are not as effective. They only work to update dependencies to a minor higher version that is compatible, but they do not address the "breaking changes". That's why we opened this issue. There are some major version upgrades in the dependencies that will introduce breaking changes, and we need to address them by manually updating those dependencies.

lrasmus commented 8 months ago

@utnim2 - thank you for the suggestion! Like @Abhijay007 pointed out, the automated suggestions can't guarantee the code will continue to work. It's extra work to have to go through and do these by hand. Once we get through this push, we may be able to go back to an automated solution though!

Abhijay007 commented 8 months ago

I am working on updating the following dependencies, and will open PR for this soon :

Abhijay007 commented 8 months ago

@lrasmus please reopen this issue as there are still pending dependencies to update, I think it might got auto closed

lrasmus commented 8 months ago

It did get auto-closed, thanks for noticing!

Abhijay007 commented 8 months ago

I am working on updating the following dependencies, and will open PR for this soon :

Abhijay007 commented 8 months ago

@lrasmus please reopen this issue as it again got auto closed

Abhijay007 commented 8 months ago

I am working on updating the following dependencies, and will open PR for this soon :

AdiAkhileshSingh15 commented 7 months ago

@lrasmus I'd like to help you guys with this issue to make it happen earlier so we could move on to setting up the dependencies for automated update. Give me clearance so I can list what all dependencies I'll update with my PR.

Abhijay007 commented 7 months ago

@lrasmus I'd like to help you guys with this issue to make it happen earlier so we could move on to setting up the dependencies for automated update. Give me clearance so I can list what all dependencies I'll update with my PR.

Hi @AdiAkhileshSingh15, thanks for showing your interest in the same. I can help you with it. Here is a short guide you can follow in order to update leftover dependencies.

The goal of the issue is to update the existing dependencies to the latest LTS (Long Term Support) version so that the project will be easier to maintain and follow the latest standards. To do this, you can follow these steps:

The project utilizes yarn as its primary package manager. You can run the command yarn upgrade-interactive --latest to see which dependencies need to be updated.

Some of them are : as per the latest run of the command (note: I updated a few dependencies and will open a PR soon, so the current leftovers are):

devDependencies:

dependencies:

Once you've updated the dependencies, run different checks using commands like:

Once all of this is done, make a PR with the updated dependencies, Also, please list out on what dependencies you are working, as other contributors might be working on some. A list can help us to avoid ones that are addressed by others.

if you have any other doubts let me know, thanks! looking forward to your contributions :)

AdiAkhileshSingh15 commented 7 months ago

Thank you @Abhijay007 for you guidance. I am currently working on updating the following few dependencies with my upcoming PR:

devDependencies:

dependencies:

AdiAkhileshSingh15 commented 7 months ago

@Abhijay007 , I came across some errors while trying to update the dependencies that involve webpack, namely, webpack-cli , webpack-dev-server, stating SyntaxError: Cannot use import statement outside a module in configs folder webpack files for the import statements as follows. Screenshot from 2024-03-09 00-21-31 On reading about this error message, it said that we should specify type:module in the nearest parent package.json file to make their type mjs , though that didn't help. I'd appreciate if you can help with that, or you came across something similar earlier in this code. Or if you'd wanna take up the update process for webpack deps.

Abhijay007 commented 7 months ago

@Abhijay007 , I came across some errors while trying to update the dependencies that involve webpack, namely, webpack-cli , webpack-dev-server, stating SyntaxError: Cannot use import statement outside a module in configs folder webpack files for the import statements as follows. Screenshot from 2024-03-09 00-21-31 On reading about this error message, it said that we should specify type:module in the nearest parent package.json file to make their type mjs , though that didn't help. I'd appreciate if you can help with that, or you came across something similar earlier in this code. Or if you'd wanna take up the update process for webpack deps.

sure @AdiAkhileshSingh15 I will look into this, in the meantime, you can work on some other dependencies, I will try to resolve them and will share the update with you.

AdiAkhileshSingh15 commented 7 months ago

In my most recent commit to the PR #181, I've updated the following dependencies:

devDependencies:

dependencies:

Abhijay007 commented 7 months ago

I am working on updating the following dependencies, and will open PR for this soon :

AdiAkhileshSingh15 commented 7 months ago

Hi @Abhijay007, Quick heads up: If you skip using 'closes' or 'fixes' in your PR when linking it here, we won't have this issue auto-closing every time, i.m.o. By doing so, @lrasmus won't have to reopen it every time a PR is merged, considering that it's taking multiple PRs to fully address this issue.

Abhijay007 commented 7 months ago

Hi @Abhijay007, Quick heads up: If you skip using 'closes' or 'fixes' in your PR when linking it here, we won't have this issue auto-closing every time, i.m.o. By doing so, @lrasmus won't have to reopen it every time a PR is merged, considering that it's taking multiple PRs to fully address this issue.

Thanks for the info @AdiAkhileshSingh15 , I will avoid that in my future PRs

Abhijay007 commented 7 months ago

I am working on updating the following dependencies, and will open PR for this soon :

PS: this might take a little longer than my previous/other PRs as these dependencies have some major breaking changes

Abhijay007 commented 6 months ago

Note : Created a Different issue to address react upgrade : https://github.com/StatTag/StatWrap/issues/203