-
Notifications
You must be signed in to change notification settings - Fork 7
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
Resolver refactor #202
Resolver refactor #202
Conversation
Done a git bisect to work out why the smoke test is failing. It appears that this commit was where it started breaking: eb05bd6 I am testing with if (fs.existsSync(generatorPathOrUrl)) {
validateGenerator(generatorPathOrUrl);
return {
// path: generatorPathOrUrl // Returns as relative path - does not seem to work
path: path.resolve(generatorPathOrUrl), // Returns as absolute path - seems to work
dispose: () => {},
};
} It seems like the code using getGenerator is expecting an absolute path, because It looks like we're mocking out getGenerator in the generate unit tests. It might be worth either changing this test to mock at a lower level or add a test in the generatorResolver. |
Thanks for spotting - I've ensured that the generator resolver always returns an absolute path, which fixes the tests. |
🎉 This PR is included in version 1.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Given that we have a few issues (#198 #195 #171) relating to the resolver, I wanted to do a bit of a refactor before tackling the specific bugs. This PR doesn't address them directly, but should make it easier to fix them in future. Changes include:
dispose
function for cleanupTODO