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

Update install dependency script to use npm instead of yarn #184

Merged

Conversation

purplepotatodonkey
Copy link

@purplepotatodonkey purplepotatodonkey commented Feb 10, 2025

Description

Yarn is no longer supported in the PearAI project and we've migrated to NPM. For example, in the setup-environment.sh script we install our dependencies with npm (Code Ref and commit where this was changed).

This PR updates the install-dependencies.sh to use NPM as well instead of yarn.

Testing Details

Ran the script from the pearai-app root with:

./scripts/pearai/install-dependencies.sh

Before:
2025-02-09 19 28 02
After:
2025-02-09 19 28 14


Important

Update install-dependencies.sh to use npm instead of yarn for dependency installation.

  • Behavior:
    • Update install-dependencies.sh to use npm install instead of yarn for installing dependencies.
  • Scripts:
    • Modify install-dependencies.sh to reflect the change from yarn to npm.

This description was created by Ellipsis for 2b0b930. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 2b0b930 in 1 minute and 7 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. scripts/pearai/install-dependencies.sh:24
  • Draft comment:
    Consider adding a check to verify that npm is installed before running 'npm install'.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
  1. The script is already handling errors through the execute() function. 2. If npm isn't installed, the execute() function will catch the failure and exit with a clear message. 3. Adding an explicit npm check would be redundant since the script already handles command failures. 4. This is a speculative comment about a potential issue rather than a definite problem.
    The comment could be valid if this script is meant to be run in environments where npm might not be pre-installed. Also, failing early with a more specific error message could be more user-friendly.
    The execute() function already provides sufficient error handling, and npm is a basic requirement for any Node.js development environment. Adding an extra check would be redundant and violate the principle of assuming standard dev environment setup.
    Delete the comment as it suggests an unnecessary check that would add complexity without significant benefit, and the script already handles command failures appropriately.
2. scripts/pearai/install-dependencies.sh:23
  • Draft comment:
    Update header comment since it still mentions 'yarn'; it should reflect that npm is now used.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. scripts/pearai/install-dependencies.sh:24
  • Draft comment:
    Consider using 'npm ci' instead of 'npm install' if a package-lock.json is available, for a more deterministic and performant install in CI environments.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None

Workflow ID: wflow_yDK97kIgnVMNs2uZ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -21,7 +21,7 @@ execute "./scripts/install-and-build.sh" "Failed to install dependencies for the
execute "cd ../../" "Failed to change back to the root directory"

# Install dependencies using yarn
Copy link

Choose a reason for hiding this comment

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

The dependency installation command was updated to use 'npm install'. Please update the preceding comment as well to reflect that it's using npm instead of yarn.

Suggested change
# Install dependencies using yarn
# Install dependencies using npm

@purplepotatodonkey purplepotatodonkey force-pushed the update-install-dependencies-script branch from 2b0b930 to 061eae9 Compare February 10, 2025 03:46
@purplepotatodonkey
Copy link
Author

purplepotatodonkey commented Feb 10, 2025

Checks seem to be failing for any PR I raise, even if it's just a comment:
#185

@nang-dev
Copy link

Nice

@nang-dev nang-dev merged commit 8178d66 into trypear:main Feb 10, 2025
1 of 5 checks passed
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