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(examples): replace pnpm in readme #6747

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

DependerKumarSoni
Copy link

Description

This pull request introduces a JavaScript script that dynamically updates the README.md file based on the selected package manager. This enhancement aims to improve clarity and deliver additional context for users.

@DependerKumarSoni DependerKumarSoni requested a review from a team as a code owner December 8, 2023 05:40
@turbo-orchestrator turbo-orchestrator bot added owned-by: turborepo pkg: create-turbo Issues related to npx create-turbo labels Dec 8, 2023
Copy link

vercel bot commented Dec 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:09pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
rust-docs ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 11:09pm
turbo-site ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 11:09pm

Copy link

vercel bot commented Dec 8, 2023

@DependerKumarSoni is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@arlyon arlyon left a comment

Choose a reason for hiding this comment

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

Nice little QoL improvement, thanks!

Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on! Left a few comments on the approach, let me know if you have more questions and I'm happy to help.

@turbo-orchestrator turbo-orchestrator bot removed pkg: create-turbo Issues related to npx create-turbo owned-by: turborepo labels Dec 26, 2023
Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

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

Due to this age of this PR, I'd like to merge it without tests. I'd rather unblock this PR and add tests in a separate PR if we do believe it's needed.

Thanks, @DependerKumarSoni and sorry for this taking so long to get merged!

@DependerKumarSoni
Copy link
Author

Thank you, @anthonyshew, for reviewing and considering this PR. I understand the concern about its age and truly appreciate your efforts to unblock it.

I noticed the message: "Merging is blocked: Merging can be performed automatically once the requested changes are addressed." While I believe I’ve addressed the requested changes (except for the tests, which can be added later if needed), could you please clarify if there’s anything else pending on my end to move this forward? I’m happy to make any further updates required to facilitate the merge.

Thank you again for your support!

@DependerKumarSoni
Copy link
Author

Hi @tknickman and @anthonyshew
Thank you for reviewing and approving the changes. I wanted to follow up on this PR's merging status and would love to hear if I need to provide any support for it.

Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

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

Looks great - let's add some tests but otherwise looks great!

return { result: "success", ...meta };
}

function replacePackageManager(
Copy link
Member

Choose a reason for hiding this comment

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

Let's add some test cases for this function just to make sure it's working as we expect. You can use it.each to make this simple. Something like:

const testCases = [...]
  
it.each(testCases)(
    'should replace placeholders correctly for packageManager: %p and text: "%s"',
    (packageManager, text, expected) => {
      const result = replacePackageManager(packageManager, text);
      expect(result).toBe(expected);
    }
  );

@@ -245,7 +245,7 @@ describe("create-turbo", () => {
telemetry,
});

expect(mockConsole.error).toHaveBeenCalledTimes(2);
expect(mockConsole.error).toHaveBeenCalledTimes(3);
Copy link
Member

Choose a reason for hiding this comment

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

Why is this error increasing?

Copy link
Contributor

Choose a reason for hiding this comment

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

It has to do with https://github.com/vercel/turborepo/pull/6747/commits/870f012b5b67f96fa11aec0a8aafbfeaad287d3b#diff-87964d57d03186688cb5[…]bf2993f85483c259c7R31-R33. It made complete sense to me at the time that I wrote it - but now I'm struggling to remember why. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage pkg: create-turbo Issues related to npx create-turbo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace pnpm in README to selected package manager
5 participants