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

Issue_#1236 : "npm run serve" now logs warning and usefull info and also show compilation progress #1289

Closed

Conversation

Tarunmeena0901
Copy link
Contributor

What kind of change does this PR introduce?

bugfix , feature

Fixes ##1236

Did you add tests for your changes?

No
Snapshots/Videos:
Screenshot 2023-12-24 161700

Screenshot 2023-12-24 161725

Screenshot 2023-12-24 161753

If relevant, did you update the documentation?

Summary
so , whenever a developer was running npm run serve , there were no usefull logs during compile time or run time also there was no indicator for progress which can tell how much project is compiled .
there was no usefull troubleshooting information shown for the development or DevOps teams

here is a link to issue: issue_#1236

Does this PR introduce a breaking change?
The integration of a state progress indicator in the webpack configuration and console output enhances the development experience by providing real-time feedback on compilation progress and runtime errors.

Other information

changes i made:

  1. integrated an custom webpack progress plugin in webpack.config.js
  2. changed the infrastructureLogging in webpack.config
    3.the bigger part of this issue :
    as our project is bootstraped using create-react-app there is very less custom configuration change one can do . so the only
    way is to make changes inside node_modules , in our case it was node_modules/react-scripts/config/webpack.config.js.
    but as we know even if u change files inside node_module you cannot commit them so u have to make your own custom
    configuration file but making our whole webpack configuration is lot of work so one solution i came up with is to make a
    separate config-override file in root directory and use react-app-rewired to change the webpack configuration during
    compile time itself.
    inside config-override folder u can see a package.json which is made so the commonJs module of react-app-rewired library
    to conflict with ES module of our project

Have you read the contributing guide?

YES

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

@palisadoes
Copy link
Contributor

  1. Is this a viable long term solution?
  2. The API users typescript and doesn't have this issue. Have you looked there to see what other options could be used?

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e9e341) 96.23% compared to head (e977ead) 96.23%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1289   +/-   ##
========================================
  Coverage    96.23%   96.23%           
========================================
  Files          137      137           
  Lines         3344     3344           
  Branches       939      939           
========================================
  Hits          3218     3218           
  Misses         120      120           
  Partials         6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tarunmeena0901
Copy link
Contributor Author

well now u have mentioned I've noticed that talawa-api uses a logger package name winston . let me try if it works for talawa-admin because talawa-admin use webpack with (very less configuration option) for compiling which is not the case in talawa-api .
let me integrate this logger in talawa-admin and let see if it works.
Thanks

@Tarunmeena0901
Copy link
Contributor Author

@palisadoes i am closing this pr as i found a better viable solution which will be future proof, will going to resubmit .

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.

2 participants