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.
This PR makes the public API explicit using
exports
andtypesVersions
inpackage.json
. This should enable us to reorganize internal modules, compile to adist
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 themain
field as is.This is a backward compatible change as long as our consumer doesn't import anything from
bootstrap/
orbuild/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.