Skip to content

fix: move type export up#547

Merged
ImCoolNowRight merged 1 commit into
developfrom
fix/package-updates
Oct 22, 2024
Merged

fix: move type export up#547
ImCoolNowRight merged 1 commit into
developfrom
fix/package-updates

Conversation

@ImCoolNowRight

Copy link
Copy Markdown
Contributor

Description

There is a warning displayed when starting Storybook indicating that the types being exported will not be used because TypeScript will resolve to using one of the JavaScript exports before it since they technically match:

▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]

    ../../@lightningjs/ui-components/package.json:16:6:
      16 │       "types": "./dist/lightning-ui-components.d.ts"
         ╵       ~~~~~~~

  The "import" condition comes earlier and will be used for all "import" statements:

    ../../@lightningjs/ui-components/package.json:14:6:
      14 │       "import": "./dist/lightning-ui-components.min.mjs",
         ╵       ~~~~~~~~

  The "require" condition comes earlier and will be used for all "require" calls:

    ../../@lightningjs/ui-components/package.json:15:6:
      15 │       "require": "./dist/lightning-ui-components.min.cjs",
         ╵       ~~~~~~~~~

This PR just moves the types to the top of the exports in relevant package.json files.

References

N/A

Testing

Start Storybook and confirm that they above error does not show in your console.

Checklist

  • all commented code has been removed
  • any new console issues have been resolved
  • code linter and formatter has been run
  • test coverage meets repo requirements
  • PR name matches the expected semantic-commit syntax

@ctoddy ctoddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🤑

@ImCoolNowRight
ImCoolNowRight merged commit 55e8d4c into develop Oct 22, 2024
@ImCoolNowRight
ImCoolNowRight deleted the fix/package-updates branch October 22, 2024 18:00
svc-lightning-ui-components pushed a commit that referenced this pull request Oct 23, 2024
# [@lightningjs/ui-components-v2.24.0](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-v2.23.3...@lightningjs/ui-components-v2.24.0) (2024-10-23)

### Bug Fixes

* move type export up ([#547](#547)) ([55e8d4c](55e8d4c))
* **ScrollWrapper:** bubble focus events and remove signals ([#546](#546)) ([ceec205](ceec205))

### Features

* add long press mixin ([#545](#545)) ([11d2368](11d2368))
@svc-lightning-ui-components

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version @lightningjs/ui-components-v2.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

svc-lightning-ui-components pushed a commit that referenced this pull request Oct 23, 2024
# [@lightningjs/ui-components-test-utils-v1.6.0](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-test-utils-v1.5.0...@lightningjs/ui-components-test-utils-v1.6.0) (2024-10-23)

### Bug Fixes

* move type export up ([#547](#547)) ([55e8d4c](55e8d4c))

### Features

* add long press mixin ([#545](#545)) ([11d2368](11d2368))
@svc-lightning-ui-components

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version @lightningjs/ui-components-test-utils-v1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants