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

bundling for non monorepo #932

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

HughParry
Copy link
Contributor

No description provided.

Copy link

Pull Request Report

Hey there! 👋 Here's the report for the pull request:

Changes

  1. Major changes:
    • Updated getPackageDir function in dependencies.ts to handle an empty packageDir by returning the resolved path.

Suggestions

  1. Line 25 in dependencies.ts:
    • Consider adding a comment explaining the purpose of the if (stderr) condition for better code understanding.

Bugs

  1. No potential bugs found. Great job! 🐛

Improvements

  1. Refactoring suggestion in dependencies.ts:
    • Consider using a more descriptive variable name instead of packageDir to improve code readability. For example, trimmedPackageDir would be more meaningful.
async function getPackageDir(packageName: string): Promise<string> {
    const { stdout, stderr } = await exec(`npm root -g ${packageName}`);
    if (stderr) {
        throw new ProsopoEnvError(new Error(stderr));
    }
    const trimmedPackageDir = stdout.trim() || path.resolve();
    return trimmedPackageDir;
}

Rating

I would rate the code as follows:

  • Readability: 8/10
  • Performance: 9/10
  • Security: 9/10

Overall, the code looks good with minor suggestions for improvement. Keep up the great work! 😄

Copy link
Member

@forgetso forgetso left a comment

Choose a reason for hiding this comment

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

❤️ 1 line PRs

@forgetso forgetso enabled auto-merge (squash) January 10, 2024 12:26
@forgetso forgetso merged commit 28f3c17 into main Jan 10, 2024
7 checks passed
@forgetso forgetso deleted the bunding-for-non-monorepo-structure branch January 10, 2024 12:32
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