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

fix: Stream output during installation and don't skip installation of npm packages when no lockfile is detected #73

Merged
merged 1 commit into from
May 4, 2021

Conversation

ElMassimo
Copy link
Owner

Description 📖

This pull request addresses a minor UX issue mentioned in #72, where running vite install on a project without a JS lockfile will fail to install dependencies.

As a result of this change, when no lockfile is present it will now default to npm (or the user's preferred package manager) and proceed to install the dependencies.

Streamed Output 📜

Prior to this change, the output of running npm install or yarn install was being captured—in cases where the installation takes a long time, it was reasonable for a user to think the command had hung.

After this change, the output will be streamed line by line, which is a nicer experience.

Note ✏️

Although ni supports an interactive prompt when lockfile detection fails, piping the input correctly through stdin requires more logic than I'm willing to support for this very niche use case. Hence the decision to pass "\n" and let it pick npm instead.

@ElMassimo ElMassimo changed the title fix: Stream output during installation and avoid skipping npm packages fix: Stream output during installation and don't skip installation of npm packages when no lockfile is detected May 4, 2021
@ElMassimo ElMassimo merged commit 028a5ba into main May 4, 2021
@ElMassimo ElMassimo deleted the extract-io branch May 4, 2021 02:19
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.

1 participant