Skip to content

meta: move types condition to the front - #15978

Merged
WikiRik merged 1 commit into
sequelize:mainfrom
Andarist:fix/types-condition
Apr 29, 2023
Merged

WikiRik merged 1 commit into
sequelize:mainfrom
Andarist:fix/types-condition

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

Description Of Change

I moved types condition to the front. package.json#exports are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.

Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their exports this way so the bug can be fixed in TypeScript.

Note that some of your entrypoints were already using this more correct order (see those).

@WikiRik WikiRik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Although it still works now, it can't hurt to fix it already

@WikiRik WikiRik changed the title fix: move types condition to the front meta: move types condition to the front Apr 29, 2023
@WikiRik
WikiRik merged commit 0520a52 into sequelize:main Apr 29, 2023
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