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

Projects
None yet
2 participants
@Turbo87
Copy link
Contributor

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.

Replace `resolve.sync()` with `require.resolve()`
`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

2 checks passed

WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rwjblue rwjblue added the bug label Jan 18, 2019

@rwjblue

This comment has been minimized.

Copy link
Owner

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
You can’t perform that action at this time.