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

Replace resolve.sync() with require.resolve() #68

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

Turbo87
Copy link
Contributor

@Turbo87 Turbo87 commented Jan 18, 2019

resolve.sync() resolves starting from the current working directory, but we actually would want to resolve these dependencies from __dirname since they are our dependencies, not the ones from the host app. require.resolve() correctly resolves using __dirname as the base path.

This change will also make this project compatible with Yarn PnP, as it was previously complaining about pretender not being a declared dependency of the host app.

`resolve.sync()` resolves starting from the current working directory, but we actually would want to resolve these dependencies from `__dirname` since they are *our* dependencies, not the ones from the host app. `require.resolve()` correctly resolves using `__dirname` as the base path.

This change will also make this project compatible with Yarn PnP, as it was previously complaining about `pretender` not being a declared dependency of the host app.
Turbo87 added a commit to Turbo87/lva-camo-status that referenced this pull request Jan 18, 2019
@rwjblue rwjblue merged commit f7b2a46 into rwjblue:master Jan 18, 2019
@rwjblue rwjblue added the bug label Jan 18, 2019
@rwjblue
Copy link
Owner

rwjblue commented Jan 18, 2019

ember-cli-pretender 3.1.0 published 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants