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

Add types to exports field in package.json #138

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Add types to exports field in package.json #138

merged 1 commit into from
Apr 11, 2023

Conversation

msonnberger
Copy link
Contributor

Description

When using TypeScript's new moduleResolution: bundler option, TS can't find the declaration file (Could not find a declaration file for module 'class-variance-authority'). By adding the types path to the exports field inside package.json, this works again.

Additional context

Similar PR with additional info: ikenfin/vite-plugin-sentry#252

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the Style Guide.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).

@vercel
Copy link

vercel bot commented Apr 8, 2023

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am
example-astro-with-tailwindcss ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am
example-react-with-css-modules ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am
example-react-with-tailwindcss ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am
example-svelte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am
example-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2023 9:50am

@joe-bell
Copy link
Owner

Seems reasonable to me, thank you!

@joe-bell joe-bell changed the title add types to exports field in order to support moduleResolution: bundler Add types to exports field in package.json Apr 11, 2023
@joe-bell joe-bell self-requested a review April 11, 2023 10:56
@joe-bell joe-bell merged commit 586c988 into joe-bell:main Apr 11, 2023
sebald referenced this pull request in sebald/pattern-analyzer Apr 30, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [class-variance-authority](https://togithub.com/joe-bell/cva) |
[`0.5.1` ->
`0.5.2`](https://renovatebot.com/diffs/npm/class-variance-authority/0.5.1/0.5.2)
|
[![age](https://badges.renovateapi.com/packages/npm/class-variance-authority/0.5.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/class-variance-authority/0.5.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/class-variance-authority/0.5.2/compatibility-slim/0.5.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/class-variance-authority/0.5.2/confidence-slim/0.5.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>joe-bell/cva</summary>

### [`v0.5.2`](https://togithub.com/joe-bell/cva/releases/tag/v0.5.2)

[Compare
Source](https://togithub.com/joe-bell/cva/compare/v0.5.1...v0.5.2)

#### What's Changed

- Support for `moduleResolution: bundler` (add `types` to `exports`
field in `package.json`) by
[@&#8203;msonnberger](https://togithub.com/msonnberger) in
[https://github.com/joe-bell/cva/pull/138](https://togithub.com/joe-bell/cva/pull/138)

#### New Contributors

- [@&#8203;msonnberger](https://togithub.com/msonnberger) made their
first contribution in
[https://github.com/joe-bell/cva/pull/138](https://togithub.com/joe-bell/cva/pull/138)

**Full Changelog**:
joe-bell/cva@v0.5.1...v0.5.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/sebald/pattern-analyzer).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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