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

APPS-7 : Automatically detect package manager and install dependencies on init #72

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

achaaoui-yc
Copy link
Contributor

@achaaoui-yc achaaoui-yc commented Nov 21, 2024

JIRA Ticket

APPS-7

I could not get this pr to be tested perfectly locally, so to qa it well, we need to follow some steps.

To know the package manager used by the user, I used this env var npm_config_user_agent that all package managers set. to know what each one of them puts in it, we need to:

Steps

  • Start a process with a package manager of choice npm, pnpm or yarn, (eg, pnpm init @youcan/create-app)
  • Find the pid of the process, (ps aux | grep create-app)
  • Inspect its env variables and look for npm_config_user_agent, (ps -Eww | grep <PID> | tr ' ' '\n' | grep npm_config_user_agent)
  • Make a note of it's value you might want to use the other package managers too.

QA Steps

  • Run
npm_config_user_agent={value_retrieved} {path_to_cloned_repo}/cli/packages/create-app/bin/exec.js
  • Follow the steps and see the node_module is installed.

Note

  • I am using --no-progress option for npm install , bc it messes up the out put, it might be fixed, but still to figure it out if wanted.
  • The Installing dependencies... task seems out of style, to think of a better way to handle unloadable tasks.

@achaaoui-yc achaaoui-yc added the ⏳ In progress Still in development phase label Nov 21, 2024
@achaaoui-yc achaaoui-yc self-assigned this Nov 21, 2024
@achaaoui-yc achaaoui-yc added 💻 Ready for review Requires a review from another developer. and removed ⏳ In progress Still in development phase labels Nov 21, 2024
@achaaoui-yc achaaoui-yc merged commit 7c3487a into main Nov 21, 2024
@achaaoui-yc achaaoui-yc deleted the APPS-7 branch November 21, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 Ready for review Requires a review from another developer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants