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

chore: "hide" ./defaultWorker entrypoint with types: null #9485

Merged
merged 7 commits into from
May 5, 2023

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented May 1, 2023

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 how such an error is reported here

This is basically the same kind of a PR that was already merged in here: discordjs/discord-api-types#763

@vercel
Copy link

vercel bot commented May 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2023 8:11pm
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2023 8:11pm

@Andarist Andarist changed the title fix: move types condition to the front chore: "hide" ./defaultWorker entrypoint with types: null May 5, 2023
@Andarist
Copy link
Contributor Author

Andarist commented May 5, 2023

@didinele adjusted the content and the PR's title, would you mind taking another look?

@github-actions
Copy link

github-actions bot commented May 5, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🟠 PWA 70

Lighthouse ran on https://discord-js-git-fork-andarist-fix-types-condition-discordjs.vercel.app/

@Jiralite Jiralite self-assigned this May 5, 2023
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Merging #9485 (2719b97) into main (3e80f0b) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head 2719b97 differs from pull request most recent head 49ab527. Consider uploading reports for the commit 49ab527 to get more accurate results

@@            Coverage Diff             @@
##             main    #9485      +/-   ##
==========================================
- Coverage   58.56%   58.53%   -0.03%     
==========================================
  Files         226      227       +1     
  Lines       14762    14769       +7     
  Branches     1266     1267       +1     
==========================================
  Hits         8645     8645              
- Misses       6077     6084       +7     
  Partials       40       40              
Flag Coverage Δ
next ∅ <ø> (∅)
ws 54.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kodiakhq kodiakhq bot merged commit ab39683 into discordjs:main May 5, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants