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

Fix incorrect esm paths in package.json for both React and Vue #988

Conversation

znicholasbrown
Copy link
Contributor

Hi 👋🏻 I was getting an error when installing v2.0.7 of Heroicons in an esm-compatible project.

The package.json has a few incorrect paths in both the vue and react modules, which is causing esm bundlers to struggle to use import statements.

Tested this fix with a local build + linking and it seems to be working appropriately for me.

This PR (tailwindlabs#985) was merged,
but we don't have CI running for PRs therefore no errors were shown.

Downgrading to get the old behaviour. Will setup CI and bump the version
in separate PRs.
@RobinMalfait RobinMalfait merged commit ec572ad into tailwindlabs:master Apr 27, 2023
@RobinMalfait
Copy link
Member

Hey, thanks so much for this contribution! 🙏

Made a few small adjustments to make sure that the esm is included in the build script instead of just the final package.json files. I made a bad commit because of this because the generated file overrode your changes.

Thanks!

@RobinMalfait RobinMalfait changed the title Bugfix: Include the correct import paths for esm Fix incorrect esm paths in package.json for both React and Vue Apr 27, 2023
kodiakhq bot pushed a commit to sullivanpj/open-system that referenced this pull request May 30, 2023
<h3>Snyk has created this PR to upgrade @heroicons/react from 2.0.17 to 2.0.18.</h3>

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
<hr/>

- The recommended version is **1 version** ahead of your current version.
- The recommended version was released **21 days ago**, on 2023-05-09.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@heroicons/react</b></summary>
    <ul>
      <li>
        <b>2.0.18</b> - <a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/releases/tag/v2.0.18">2023-05-09</a></br><h3>Fixed</h3>
<ul>
<li>Fix incorrect <code>esm</code> paths in package.json for both React and Vue (<a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/pull/988" data-hovercard-type="pull_request" data-hovercard-url="/tailwindlabs/heroicons/pull/988/hovercard">#988</a>)</li>
</ul>
      </li>
      <li>
        <b>2.0.17</b> - <a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/releases/tag/v2.0.17">2023-03-30</a></br><h3>Fixed</h3>
<ul>
<li>Fix React icon types (<a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/pull/966" data-hovercard-type="pull_request" data-hovercard-url="/tailwindlabs/heroicons/pull/966/hovercard">#966</a>)</li>
</ul>
      </li>
    </ul>
    from <a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/releases">@heroicons/react GitHub release notes</a>
  </details>
</details>


<details>
  <summary><b>Commit messages</b></summary>
  </br>
  <details>
    <summary>Package name: <b>@heroicons/react</b></summary>
    <ul>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/f64c10b59dcd6417732a984ce4376bed13799485">f64c10b</a> 2.0.18</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/1f7551eaa950a2fc364c84b9f855aee315fd1371">1f7551e</a> add CI workflow (#989)</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/4649df53478856ad03fc79e23879aee1a0d06000">4649df5</a> update changelog</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/ec572ada61474b2fa2c8caf536426373a126ceb0">ec572ad</a> Bugfix: Include the correct import paths for esm (#988)</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/10804358705599a53b095e07f34d6f2864c54d4e">1080435</a> Bump yaml and @ svgr/core (#985)</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/af8933a0a08d7b0c6c71bbd42e821273648b9f81">af8933a</a> Add Prettier and run it against the project</li>
      <li><a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/commit/20c6123fadc5b6ae7f993081abfadf6459e01095">20c6123</a> Add line return to end of package.json files</li>
    </ul>

   <a href="https://snyk.io/redirect/github/tailwindlabs/heroicons/compare/857ba1b04f8017a36c7c0fd6e2738fef37492f18...f64c10b59dcd6417732a984ce4376bed13799485">Compare</a>
  </details>
</details>
<hr/>

**Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.*

For more information:  <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI0MDAxYThmMC1iNTM5LTRjZjUtODQxYS01Mjc0MjQ3MDE2ZDEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjQwMDFhOGYwLWI1MzktNGNmNS04NDFhLTUyNzQyNDcwMTZkMSJ9fQ==" width="0" height="0"/>

🧐 [View latest project report](https://app.snyk.io/org/sullivanpj/project/61dfb01d-4c48-4d8b-a40c-a3939907a630?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/sullivanpj/project/61dfb01d-4c48-4d8b-a40c-a3939907a630/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/sullivanpj/project/61dfb01d-4c48-4d8b-a40c-a3939907a630/settings/integration?pkg&#x3D;@heroicons/react&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)
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