Skip to content

Exposes findPnpApi to non-PnP dependency trees #696

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

Merged
merged 4 commits into from
Jan 15, 2020

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Jan 15, 2020

What's the problem this PR addresses?

Scripts that were running within the PnP runtime but outside the dependency tree had no way to access the PnP API from other dependency trees, since require('pnpapi') would fail for them.

How did you fix it?

I didn't want to expose pnpapi to modules outside of PnP dependency trees (mainly because I want to keep the expectation that the return of require('pnpapi') will always be the instance for the current dependency tree, which isn't possible for those special modules), so I instead exposed it within the module builtin.

@arcanis arcanis merged commit 4ee0464 into master Jan 15, 2020
@arcanis arcanis deleted the mael/find-pnp-api-from-path branch January 15, 2020 14:24
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.

1 participant