Skip to content

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.

3 participants