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 to exports field to be compatible with nodenext module resolution #4228

Merged
merged 1 commit into from Dec 28, 2021

Conversation

otakustay
Copy link
Contributor

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

Using typescript@4.6.0-dev.20211225 and "moduleResolution": "nodenext" we are unable to resolve types of socket.io

New behaviour

Make TypeScript successfully resolve types

Other information (e.g. related issues)

See microsoft/TypeScript#46770 (comment) for detail, in nodenext module resolution it requires a types field in exports with full filename including extension

See microsoft/TypeScript#46770 (comment) for detail, in `nodenext` module resolution we need to specify `types` inside `exports` field.
@otakustay otakustay mentioned this pull request Dec 26, 2021
11 tasks
@darrachequesne darrachequesne merged commit 51784d0 into socketio:master Dec 28, 2021
@darrachequesne darrachequesne added this to the 4.4.1 milestone Jan 6, 2022
dzad pushed a commit to dzad/socket.io that referenced this pull request May 29, 2023
…le resolution (socketio#4228)

See [1] for detail, in `nodenext` module resolution it requires a
`types` field in `exports` with full filename including extension.

[1]: microsoft/TypeScript#46770 (comment)
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.

None yet

2 participants