Open jlarmstrongiv opened 1 year ago
PRs welcome!
@keithamus would the PR include these changes?
exports
key to something like { key: 'exports', over: sortObjectBy(['types']) }
Let me know if I missed anything in the outline 😄 if not, it should be a straightforward fix
That’s correct. We use semantic versioning so prefixing your commit fix:
will automatically apply and release the patch version.
If we are doing this, should we also enforce the default
to be the last one?
Failing Example:
More specifically,
Should be the first in the object as required by TypeScript.
according to publint.dev:EXPORTS_TYPES_SHOULD_BE_FIRST
Ensure types condition to be the first. The TypeScript docs recommends so, but it's also because the exports field is order-based.
For example, a scenario where both the types and import condition could be active, types should be first so that it matches and returns a .d.ts file, rather than a .js file from the import condition.