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

Feat/add install packages schematic #93

Closed
wants to merge 7 commits into from

Conversation

neodmy
Copy link
Contributor

@neodmy neodmy commented Nov 22, 2023

Description

Schematic to facilitate the installation of packages regardless of the project's package manager.

Related Issue

#95

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@neodmy neodmy self-assigned this Nov 23, 2023
@neodmy neodmy marked this pull request as ready for review November 23, 2023 10:26
Copy link
Contributor

@inigomarquinez inigomarquinez left a comment

Choose a reason for hiding this comment

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

A couple of questions added.

execSync('pnpm --version', {stdio: 'pipe'});
return 'pnmp';
} catch(e) {
return 'npm';
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that by default it will use npm if it doesn't find anything. What happens if npm is not installed?

Copy link
Contributor

Choose a reason for hiding this comment

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

And one more question. What happens if several of them are installed? We're giving preference to yarn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Preference is based on the lock file. If there is no lock file, it will explore the globally installed ones. In that case, yarn takes preference indeed. We can change it.

If the package manager is not installed, it will fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mind the order. I was just wondering if it's useful to have an optional config parameter to set the preference. Or perhaps I'm suggesting nonsense! 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean to overwrite the discovered package manager?

@neodmy
Copy link
Contributor Author

neodmy commented Nov 24, 2023

After conversations with @inigomarquinez, we agreed not to have a schematic for installing packages.

@neodmy neodmy closed this Nov 24, 2023
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