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

Allows requiring PnP files from the outside #1432

Merged
merged 9 commits into from
Jun 4, 2020
Merged

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Jun 3, 2020

What's the problem this PR addresses?

External files weren't able to require internal files, even when they were using absolute paths. This was because they never even entered the PnP resolution (since the hook detected that they belonged to a different "tree"), and the native resolution cannot access files within zip archives (nodejs/node#33423).

Closes (?) #1000

How did you fix it?

We now try to detect absolute and relative imports and, if they are, we add them to their own pool of resolution parents if they're covered by a PnP API.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I have verified that all automated PR checks pass.

@arcanis arcanis changed the title Allows requiring Pn Allows requiring PnP files from the outside Jun 3, 2020
@arcanis arcanis merged commit 0f02f1c into master Jun 4, 2020
@arcanis arcanis deleted the mael/external-absolute branch June 4, 2020 09:29
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.

None yet

1 participant