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 types location for cjs/src/ #66

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"*": {
"*": [
"types/*"
],
"cjs/src/*": [
"types/*"
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure I understand what this change does. Do we ever import path like multiformats/cjs/src/... because that is what I think it would catch here.

If this is about fixing

import { CID } from 'multiformats'

I think suggestion above is probably adding following to package.json is a better way to go:

{
  "types": "./types/index.d.ts"
}

Copy link
Member Author

Choose a reason for hiding this comment

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

comment below #66 (comment)

this is for when we publish a "main" pointing to cjs/src/index.js, that mapping causes problems for consumers of this package

]
}
}
Expand Down