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

Use find-cache-dir to determine cache directory. #122

Merged
merged 1 commit into from
Jan 2, 2016

Conversation

jamestalmage
Copy link
Member

Uses find-cache-dir for consistent cache locating with other modules (currently that list only includes AVA, but one can hope). It takes the extra step of ensuring a package.json file exists (and hunting up the directory tree for it), otherwise it returns null. If it can't find a suitable cache directory, caching is disabled.

I also dropped the cacheDirectory() method in favor of just setting a property.

Uses `find-cache-dir` for consistent cache locating with AVA, etc. It takes the extra step of ensuring a `package.json` file exists (and hunting up the directory tree for it), otherwise it returns null. If it can't find a suitable cache directory, caching is disabled.

I also dropped the `cacheDirectory()` method in favor of just setting a property.
@novemberborn
Copy link
Contributor

Nice!

@bcoe
Copy link
Member

bcoe commented Jan 2, 2016

@jamestalmage this seems like a smart change, land when you're ready -- perhaps we can get a new nyc out the door today once I test @isaacs's branch a bit more on Windows.

bcoe added a commit that referenced this pull request Jan 2, 2016
Use find-cache-dir to determine cache directory.
@bcoe bcoe merged commit 719790f into istanbuljs:master Jan 2, 2016
@bcoe bcoe deleted the use-find-cache-dir branch January 2, 2016 22:58
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.

3 participants