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

[React] Add status message during install #1451

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

addy-pathania
Copy link
Contributor

@addy-pathania addy-pathania commented Apr 25, 2023

While scaffolding a react app in monorepo while regenerating the yarn.lock the console waits until the dependencies are installed leaving the user confused about the status of the process.

Description / Motivation

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@addy-pathania addy-pathania requested a review from a team April 25, 2023 18:20
@@ -78,12 +80,12 @@ const initializeApps = async (noInstall: boolean) => {
watch = await import(path.resolve('watch.json'));
const initializers = watch.initializers || [];
await initRunner(initializers, { ...watch.args, templates: initializers, noInstall });
if (watch.args.restoreLockfile) {
Copy link
Contributor

@illiakovalenko illiakovalenko Apr 26, 2023

Choose a reason for hiding this comment

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

Now seems like I understand why I had an error that I logged in our inbox
On this line you have fs.unlink - so this operation is asynchronous, but it should be synchronous (currently this step can be started, but yarn.lock will not be removed).
fs.unlinkSync can be used. Otherwise for some reasons on some machines it can take more time to remove this file (like it's happened probably on my machine) and result will be unexpected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to me.

@illiakovalenko
Copy link
Contributor

@sc-addypathania Don't forget to update CHANGELOG

Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

👍

@illiakovalenko illiakovalenko merged commit 2210ad9 into dev Apr 27, 2023
@illiakovalenko illiakovalenko deleted the feature/582643-react-scaffold branch April 27, 2023 10:58
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