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(metro-resolver): package exports restricted paths #1239

Closed

Conversation

jbroma
Copy link
Contributor

@jbroma jbroma commented Mar 21, 2024

Summary

This PR deals with restricting internal paths through the most specific subpath pattern edge case from #1236

  • - added test for implicit default condition to match Node.js resolution algorithm
  • - aligned implementation of reduceConditionalExport to account for implicit default condition

Changelog: [Experimental] Fix implicit default condition to be null for subpath patterns (edge case)

Test plan

  • - all tests pass

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 21, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Mar 21, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.48%. Comparing base (96c6b89) to head (1c593be).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1239   +/-   ##
=======================================
  Coverage   83.47%   83.48%           
=======================================
  Files         207      207           
  Lines       10731    10734    +3     
  Branches     2673     2675    +2     
=======================================
+ Hits         8958     8961    +3     
  Misses       1773     1773           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@huntie huntie left a comment

Choose a reason for hiding this comment

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

LGTM, importing to run on the wider Meta codebase

@facebook-github-bot
Copy link
Contributor

@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@huntie
Copy link
Member

huntie commented Mar 27, 2024

@jbroma I've updated the summary with a Changelog: entry. Helpful if you could also add a descriptive changelog line on your other open PRs. Thanks!

Landing this PR now, hopefully makes it into today's release.

@facebook-github-bot
Copy link
Contributor

@huntie merged this pull request in ccf6256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants