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

Fix package.json exports order #12148

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Fix package.json exports order #12148

merged 1 commit into from
Aug 23, 2024

Conversation

jjspace
Copy link
Contributor

@jjspace jjspace commented Aug 23, 2024

Description

Apparently the order of keys in the exports object matters:

Within the "exports" object, key order is significant. During condition matching, earlier entries have higher priority and take precedence over later entries. The general rule is that conditions should be from most specific to least specific in object order.

It's very bizarre to me that key order matters in an object not an array but apparently it does. esbuild now seems to warn about it which is why I noticed:

2024-08-22_13-12

This PR just fixes that order and the warnings are gone. I don't think this changes our build and if I understand it correctly I don't think it should change downstream users but would appreciate someone double checking me on that.

Issue number and link

No issue

Testing plan

  1. git clean -dxf
  2. npm install
  3. npm run build
  4. Make sure there are no warnings

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@jjspace jjspace requested a review from ggetz August 23, 2024 15:23
Copy link

Thank you for the pull request, @jjspace!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Aug 23, 2024

Thanks for the fix @jjspace!

@ggetz ggetz merged commit 89d15af into main Aug 23, 2024
10 checks passed
@ggetz ggetz deleted the fix-package-json branch August 23, 2024 16:43
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