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

38/link command should not execute npm install if it was done before #103

Conversation

HaidarJbeily7
Copy link
Contributor

@HaidarJbeily7 HaidarJbeily7 commented Oct 13, 2024

Changes

  • Added a check if the npm install was already executed before. I implemented it by checking where the package-lock.json file exists.

PR-Codex overview

This PR focuses on enhancing the link command by preventing unnecessary reinstallation of npm packages if the package-lock.json file already exists. It also includes a new test case to verify this behavior.

Detailed summary

  • Added a check for the existence of package-lock.json before running npm install.
  • Introduced a new test to confirm that package-lock.json is not modified on subsequent runs when it exists.
  • Adjusted code structure to improve readability and maintainability.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@maxonfjvipon
Copy link
Member

@HaidarJbeily7 thanks for your contribution, but it would be nice to add a test that confirms that your changes work and don't break anything

eo2js/test/commands/link.test.js Outdated Show resolved Hide resolved
Copy link
Member

@maxonfjvipon maxonfjvipon left a comment

Choose a reason for hiding this comment

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

@HaidarJbeily7 looks good to me, just one simple comment from my side

eo2js/src/commands/link.js Outdated Show resolved Hide resolved
Copy link
Member

@maxonfjvipon maxonfjvipon left a comment

Choose a reason for hiding this comment

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

@maxonfjvipon
Copy link
Member

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Nov 6, 2024

@rultor merge

@maxonfjvipon OK, I'll try to merge now. You can check the progress of the merge here.

@rultor rultor merged commit 5ca37e4 into objectionary:master Nov 6, 2024
5 checks passed
@rultor
Copy link
Collaborator

rultor commented Nov 6, 2024

@rultor merge

@maxonfjvipon Done! FYI, the full log is here (took me 22min).

@maxonfjvipon
Copy link
Member

@HaidarJbeily7 thanks!

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.

4 participants