Skip to content

Commit

Permalink
feature: @putout/cli-cache: places -> places.json
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Dec 13, 2024
1 parent be6caa8 commit cf6ecc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cli-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/cli-cache.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/cli-cache "npm"

Create `cache` of places found by 🐊[Putout](https://github.com/coderaiser/putout).
Create `cache` of places found by 🐊[Putout](https://github.com/coderaiser/putout) to `places.json`.

## Install

Expand Down
4 changes: 2 additions & 2 deletions packages/cli-cache/lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const nodeVersion = process.version;

const {assign} = Object;
const returns = (a) => () => a;
const CACHE_FILE = '.putoutcache';
const CACHE_FILE = '.putoutcache.json';

const defaultCache = {
getPlaces: returns([]),
Expand Down Expand Up @@ -128,7 +128,7 @@ async function findCachePath() {
});

if (cacheDir)
return `${cacheDir}/places`;
return `${cacheDir}/places.json`;

return CACHE_FILE;
}
2 changes: 1 addition & 1 deletion packages/cli-cache/lib/cache.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test('putout: cli: cache: fileCache: fresh', async (t) => {
});

stopAll();
const expected = 'node_modules/.cache/places';
const expected = 'node_modules/.cache/places.json';

t.calledWith(unlink, [expected]);
t.end();
Expand Down
1 change: 1 addition & 0 deletions packages/cli-cache/lib/is-changed.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async function isEslintChanged(fileCache, {findUp}) {
'.eslintrc.cjs',
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslint.config.js',
]);

if (!name)
Expand Down

0 comments on commit cf6ecc3

Please sign in to comment.