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: type export via typesVersions #892

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

filoozom
Copy link
Contributor

@filoozom filoozom commented Aug 17, 2022

Problem

Importing anything from TypeScript in js-waku/lib/ (v0.25.0-rc.0) does not work. It can't find the types despite the exports.*.types in package.json.

Solution

This solution was inspired by libp2p (example in @libp2p/interfaces), and just adds typesVersions to package.json.

Documentation: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#folder-redirects-using-

Notes

Copy link
Collaborator

@fryorcraken fryorcraken left a comment

Choose a reason for hiding this comment

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

Looks good and verified locally. Thanks for that.

@fryorcraken
Copy link
Collaborator

bors merge

status-bors-ng bot added a commit that referenced this pull request Aug 17, 2022
892: fix: type export via `typesVersions` r=fryorcraken a=filoozom

## Problem

Importing anything from TypeScript in `js-waku/lib/` (`v0.25.0-rc.0`) does not work. It can't find the types despite the `exports.*.types` in `package.json`.

## Solution

This solution was inspired by `libp2p` ([example in ``@libp2p/interfaces`](https://github.com/libp2p/js-libp2p-interfaces/blob/master/packages/interfaces/package.json#L24-L39)),` and just adds `typesVersions` to `package.json`.

Documentation: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#folder-redirects-using-

## Notes

- See #891 (comment)


893: fix: do not throw on lack of response r=fryorcraken a=fryorcraken

Expected proto3 behaviour, just no message returned.

Co-authored-by: Philippe Schommers <philippe@schommers.be>
Co-authored-by: fryorcraken.eth <git@fryorcraken.xyz>
@fryorcraken
Copy link
Collaborator

@status-bors-ng
Copy link
Contributor

This PR was included in a batch that timed out, it will be automatically retried

status-bors-ng bot added a commit that referenced this pull request Aug 17, 2022
892: fix: type export via `typesVersions` r=fryorcraken a=filoozom

## Problem

Importing anything from TypeScript in `js-waku/lib/` (`v0.25.0-rc.0`) does not work. It can't find the types despite the `exports.*.types` in `package.json`.

## Solution

This solution was inspired by `libp2p` ([example in ``@libp2p/interfaces`](https://github.com/libp2p/js-libp2p-interfaces/blob/master/packages/interfaces/package.json#L24-L39)),` and just adds `typesVersions` to `package.json`.

Documentation: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#folder-redirects-using-

## Notes

- See #891 (comment)


Co-authored-by: Philippe Schommers <philippe@schommers.be>
@status-bors-ng
Copy link
Contributor

This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried.

Additional information:

{"message":"Required status check \"size\" is expected.","documentation_url":"https://docs.github.com/articles/about-protected-branches"}

@fryorcraken
Copy link
Collaborator

bors merge

@status-bors-ng
Copy link
Contributor

Canceled.

@fryorcraken
Copy link
Collaborator

bors merge

@status-bors-ng status-bors-ng bot merged commit d7181da into waku-org:master Aug 19, 2022
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