deep-object-diff icon indicating copy to clipboard operation
deep-object-diff copied to clipboard

move `types` condition to the front

Open Andarist opened this issue 2 years ago • 1 comments

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.

⚠️ this PR focuses solely on fixing "🐛 Used fallback condition" problem but the "🎭 Masquerading as CJS" remains here. You can check the reported errors [here](https://arethetypeswrong.github.io/?p=deep-object-diff%401.1.9

Andarist avatar May 01 '23 10:05 Andarist

@mattphillips friendly 🏓

Andarist avatar Jun 01 '23 08:06 Andarist