global-cache-dir
Advanced tools
Comparing version 4.4.0 to 5.0.0
@@ -7,15 +7,16 @@ import{mkdir}from"node:fs/promises"; | ||
export default async function globalCacheDir(name){ | ||
const globalCacheDir=async(name)=>{ | ||
const cacheDir=getCacheDir(name); | ||
await createCacheDir(cacheDir); | ||
return cacheDir; | ||
} | ||
return cacheDir | ||
}; | ||
const createCacheDir=async function(cacheDir){ | ||
export default globalCacheDir; | ||
const createCacheDir=async(cacheDir)=>{ | ||
if(await pathExists(cacheDir)){ | ||
return; | ||
return | ||
} | ||
await mkdir(cacheDir,{recursive:true}); | ||
}; | ||
//# sourceMappingURL=main.js.map | ||
await mkdir(cacheDir,{recursive:true}) | ||
}; |
{ | ||
"name": "global-cache-dir", | ||
"version": "4.4.0", | ||
"version": "5.0.0", | ||
"type": "module", | ||
"exports": { | ||
"types": "./build/types/main.d.ts", | ||
"types": "./build/src/main.d.ts", | ||
"default": "./build/src/main.js" | ||
}, | ||
"main": "./build/src/main.js", | ||
"types": "./build/types/main.d.ts", | ||
"types": "./build/src/main.d.ts", | ||
"files": [ | ||
"build/src/**/*.{js,json}", | ||
"build/types/**/*.d.ts" | ||
"build/src/**/*.{js,json,d.ts}", | ||
"!build/src/**/*.test.js", | ||
"!build/src/{helpers,fixtures}" | ||
], | ||
@@ -50,4 +51,3 @@ "sideEffects": false, | ||
"directories": { | ||
"lib": "src", | ||
"test": "test" | ||
"lib": "src" | ||
}, | ||
@@ -59,8 +59,8 @@ "dependencies": { | ||
"devDependencies": { | ||
"@ehmicky/dev-tasks": "^1.0.102", | ||
"test-each": "^5.5.0" | ||
"@ehmicky/dev-tasks": "^2.0.80", | ||
"test-each": "^5.7.1" | ||
}, | ||
"engines": { | ||
"node": ">=14.18.0" | ||
"node": ">=16.17.0" | ||
} | ||
} |
[![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js&colorA=404040&logoColor=66cc33)](https://www.npmjs.com/package/global-cache-dir) | ||
[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/types/main.d.ts) | ||
[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/src/main.d.ts) | ||
[![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov&colorA=404040)](https://codecov.io/gh/ehmicky/global-cache-dir) | ||
[![Twitter](https://img.shields.io/badge/-Twitter-808080.svg?logo=twitter&colorA=404040)](https://twitter.com/intent/follow?screen_name=ehmicky) | ||
[![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon&colorA=404040&logoColor=9590F9)](https://fosstodon.org/@ehmicky) | ||
[![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium&colorA=404040)](https://medium.com/@ehmicky) | ||
@@ -31,6 +31,9 @@ | ||
This package works in Node.js >=14.18.0. It is an ES module and must be loaded | ||
using | ||
This package works in Node.js >=16.17.0. | ||
This is an ES module. It must be loaded using | ||
[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c), | ||
not `require()`. | ||
not `require()`. If TypeScript is used, it must be configured to | ||
[output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html), | ||
not CommonJS. | ||
@@ -76,4 +79,5 @@ # Usage | ||
<!-- prettier-ignore --> | ||
<table><tr><td align="center"><a href="https://twitter.com/ehmicky"><img src="https://avatars2.githubusercontent.com/u/8136211?v=4" width="100px;" alt="ehmicky"/><br /><sub><b>ehmicky</b></sub></a><br /><a href="https://github.com/ehmicky/global-cache-dir/commits?author=ehmicky" title="Code">💻</a> <a href="#design-ehmicky" title="Design">🎨</a> <a href="#ideas-ehmicky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ehmicky/global-cache-dir/commits?author=ehmicky" title="Documentation">📖</a></td></tr></table> | ||
<!-- | ||
<table><tr><td align="center"><a href="https://fosstodon.org/@ehmicky"><img src="https://avatars2.githubusercontent.com/u/8136211?v=4" width="100px;" alt="ehmicky"/><br /><sub><b>ehmicky</b></sub></a><br /><a href="https://github.com/ehmicky/global-cache-dir/commits?author=ehmicky" title="Code">💻</a> <a href="#design-ehmicky" title="Design">🎨</a> <a href="#ideas-ehmicky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ehmicky/global-cache-dir/commits?author=ehmicky" title="Documentation">📖</a></td></tr></table> | ||
--> | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6382
82