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(unocss): improve unocss pkg types #1484

Merged
merged 1 commit into from Aug 28, 2022
Merged

feat(unocss): improve unocss pkg types #1484

merged 1 commit into from Aug 28, 2022

Conversation

zyyv
Copy link
Member

@zyyv zyyv commented Aug 28, 2022

No description provided.

@zyyv zyyv requested a review from antfu as a code owner August 28, 2022 03:42
@netlify
Copy link

netlify bot commented Aug 28, 2022

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4e25fb8
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/630ae40962eb3d000b640efc
😎 Deploy Preview https://deploy-preview-1484--unocss.netlify.app/play
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@zyyv zyyv mentioned this pull request Aug 28, 2022
@userquin
Copy link
Member

@chris-zhu dts shouldn't be added also to the package exports entry?

@zyyv
Copy link
Member Author

zyyv commented Aug 28, 2022

@chris-zhu dts shouldn't be added also to the package exports entry?

Can you guide me on what to do next ?

@userquin
Copy link
Member

userquin commented Aug 28, 2022

@chris-zhu dts shouldn't be added also to the package exports entry?

Can you guide me on what to do next ?

"exports": {
  ".": {
    "types": "./dist/index.d.ts", // <== this entry
    "main": "./dist/index.cjs",
    "module": "./dist/index.mjs"
  }
}

You will need also add the "files" entry if missing or just add the dts entry if missing (i.e: https://github.com/antfu/vite-plugin-inspect/blob/main/package.json#L31):

"files": { // <== this one
  "dist",
  "*.d.ts" // <== or this one
}

@antfu how about "typesVersion"? some packages here haven't the exports types entry nor files including the dts files (for example, inspector missing entries while preset-icons have the exports types but not dts in files). We need to review all package.json files.

@antfu antfu merged commit 59e6c34 into unocss:main Aug 28, 2022
@zyyv zyyv deleted the types branch August 29, 2022 01:21
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.

None yet

3 participants