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 package exports #1

Merged
merged 3 commits into from
May 4, 2023
Merged

Fix package exports #1

merged 3 commits into from
May 4, 2023

Conversation

3mcd
Copy link
Contributor

@3mcd 3mcd commented May 3, 2023

This PR fixes the following entrypoints to Thyseus:

  • thyseus/types, which exports Thyseus types declared in the global scope
  • thyseus/descriptors, which exports built-in system parameter descriptors

These entrypoints were originally defined within the package.json's exports field, but in order for exports to work with TypeScript, the package consumer must set their tsconfig's --moduleResolution to node16 or nodenext, which is not ideal for obvious reasons. See the original issue (locked for bad behavior) and the follow-up issue that describes the moduleResolution workaround outlined above.

This PR instead adds two new sub-packages (subdirectories) each with their own package.json that point to their exports via main/module/types fields.

package.json Outdated Show resolved Hide resolved
@3mcd 3mcd marked this pull request as ready for review May 4, 2023 02:45
@JaimeGensler JaimeGensler merged commit 89205a5 into JaimeGensler:main May 4, 2023
@3mcd 3mcd deleted the pkg-exports branch May 4, 2023 02:59
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