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

refactor: Declare exports in package.json #105

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

SimonAlling
Copy link
Owner

@SimonAlling SimonAlling commented Jul 17, 2024

This PR makes the public API explicit using exports and typesVersions in package.json. This should enable us to reorganize internal modules, compile to a dist directory etc without having to release (or consider releasing) a new major version.

I haven't been able to figure out any way to make TypeScript find the index module (when our consumer does import … from "userscripter"), except keeping the main field as is.

This is a backward compatible change as long as our consumer doesn't import anything from bootstrap/ or build/internal/. That has never been intended to work, and it seems unlikely to me that anyone will have done that and expected it to be stable.

@SimonAlling SimonAlling marked this pull request as ready for review July 18, 2024 09:08
@SimonAlling SimonAlling merged commit ecf6a32 into master Jul 18, 2024
7 checks passed
@SimonAlling SimonAlling deleted the declare-exports branch July 18, 2024 09:18
This was referenced Jul 18, 2024
SimonAlling added a commit that referenced this pull request Jul 18, 2024
This release makes imports from `bootstrap/` and/or `build/internal/`
(which have never been intended to work) TypeScript compilation errors
(#105).
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.

1 participant