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

chore(packages/ui turbo gen config.ts): Preventing the format of pack… #8033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moeyashi
Copy link

@moeyashi moeyashi commented Apr 24, 2024

…age.json from being corrupted

Description

Prevent the format of package.json from getting corrupted when creating a component with turbo gen.

Here's what the exports section looks like before and after the fix:

before

  "exports": {
"./foo": "./src/foo.tsx",
    "./button": "./src/button.tsx",
    "./card": "./src/card.tsx",
    "./code": "./src/code.tsx"
  },

after

  "exports": {
    "./foo": "./src/foo.tsx",
    "./button": "./src/button.tsx",
    "./card": "./src/card.tsx",
    "./code": "./src/code.tsx"
  },

Testing Instructions

  1. Create a component with turbo gen.
  2. Check package.json.

@moeyashi moeyashi requested review from anthonyshew and a team as code owners April 24, 2024 08:00
@moeyashi moeyashi requested a review from gsoltis April 24, 2024 08:00
@turbo-orchestrator turbo-orchestrator bot added area: examples Improvements or additions to examples owned-by: turborepo labels Apr 24, 2024
Copy link

vercel bot commented Apr 24, 2024

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 Apr 24, 2024 8:01am
6 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 8:01am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 8:01am
examples-native-web ⬜️ Ignored (Inspect) Apr 24, 2024 8:01am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 8:01am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 8:01am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Apr 24, 2024 8:01am

Copy link

vercel bot commented Apr 24, 2024

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

A member of the Team first needs to authorize it.

@anthonyshew
Copy link
Contributor

Hi, thanks for the contribution!

Can you explain a little more about the nature of the "corruption" this PR is meant to solve?

@moeyashi
Copy link
Author

Thank you for your review.

I edited this issue to explain what this PR is trying to solve.

"corrupted" may not be a good expression. "broken", "incorrect" and "wrong" are candidates.

@anthonyshew
Copy link
Contributor

Just so I'm clear on what I'm seeing here: There's a missing tab character when the generator is run?

@moeyashi
Copy link
Author

moeyashi commented May 7, 2024

Yes, there's a missing tab character.

But my fix is ​​to indent with 4 spaces instead of a tab character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants