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: add interface files to the exports map #246

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

achingbrain
Copy link
Member

Interfaces from the interface files in this module are imported in other modules, so they need to be in the exports map otherwise tsc can fail to build dependant modules.

Interfaces from the interface files in this module are
[imported](https://github.com/ipld/js-dag-cbor/blob/master/src/index.js#L9)
in other modules, so they need to be in the exports map otherwise
tsc can fail to build dependant modules.
@achingbrain achingbrain requested a review from rvagg March 7, 2023 15:39
@achingbrain
Copy link
Member Author

There's a repro of the problem this solves here: https://github.com/thehenrytsai/dag-cbor-import-repro

Just npm i && npm run build in that repo.

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

why have we got away with this until now? is this a specific combination of tsconfig options that result in errors?

@achingbrain
Copy link
Member Author

is this a specific combination of tsconfig options that result in errors?

Yeah - if skipLibCheck is true this error doesn't occur as the project doesn't check the types of it's deps - tsc has it as false by default.

@achingbrain achingbrain merged commit a58a398 into master Mar 9, 2023
@achingbrain achingbrain deleted the fix/add-interface-exports branch March 9, 2023 07:38
github-actions bot pushed a commit that referenced this pull request Mar 9, 2023
## [11.0.2](v11.0.1...v11.0.2) (2023-03-09)

### Bug Fixes

* add interface files to the exports map ([#246](#246)) ([a58a398](a58a398)), closes [/github.com/ipld/js-dag-cbor/blob/master/src/index.js#L9](https://github.com/multiformats//github.com/ipld/js-dag-cbor/blob/master/src/index.js/issues/L9)
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

🎉 This PR is included in version 11.0.2 🎉

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.

2 participants