パッケージの詳細

cache-path

bluelovers171ISC4.0.2

return a cache directory, like find-cache-dir do

cache, caching, dir, directory

readme

README

return a cache directory, like `find-cache-dir` do

install

npm install cache-path

desc

like find-cache-dir

what diff

  1. return path at any env
    find-cache-dir will fail return when not runing at a module/package folder
  2. allow change to ur fav order for find cache path

demo

API

there also has async version for getCachePath => getCachePathAsync

import { normalizeName, getCachePath } from 'cache-path';

console.log(normalizeName('@node-novel/sort'));
// => _node_novel_sort
console.log(normalizeName('@node-novel/sort', true));
// => 7bc015f2

// when cwd in a module/package
console.log(getCachePath());
// => D:\Users\Documents\The Project\nodejs-yarn\ws-segment\packages\cache-path\node_modules\.cache
console.log(getCachePath('@node-novel/sort'));
// => D:\Users\Documents\The Project\nodejs-yarn\ws-segment\packages\cache-path\node_modules\.cache\_node_novel_sort

// when other
console.log(getCachePath());
// => T:\cache\npm-cache\.cache
console.log(getCachePath('@node-novel/sort'));
// => T:\cache\npm-cache\.cache\_node_novel_sort

更新履歴

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.0.2 (2024-05-03)

🛠 Build System

📌 Dependencies

4.0.1 (2024-02-28)

🚨 Tests

📌 Dependencies

4.0.0 (2023-10-10)

📌 Dependencies

🔖 Miscellaneous

4.0.0 (2023-10-10)

📌 Dependencies

3.0.14 (2022-12-09)

📌 Dependencies

3.0.13 (2022-11-14)

📌 Dependencies

3.0.12 (2022-10-28)

📌 Dependencies

3.0.11 (2022-10-01)

🔖 Miscellaneous

3.0.10 (2022-09-29)

🔖 Miscellaneous

3.0.9 (2022-09-28)

📌 Dependencies

3.0.8 (2022-09-27)

🔖 Miscellaneous

3.0.7 (2022-09-27)

📌 Dependencies

3.0.6 (2022-09-06)

📚 Documentation

🔖 Miscellaneous

3.0.5 (2022-08-26)

🔖 Miscellaneous

3.0.4 (2022-08-13)

Note: Version bump only for package cache-path

3.0.3 (2022-08-13)

🚨 Tests

  • update jest.config.js and deps (d1d501b)

🛠 Build System

3.0.2 (2022-07-31)

🚨 Tests

  • preset: use @bluelovers/jest-config (e239ecf)

3.0.1 (2022-07-29)

Note: Version bump only for package cache-path

3.0.0 (2022-07-07)

Note: Version bump only for package cache-path

2.0.39 (2022-06-28)

🔖 Miscellaneous

2.0.38 (2022-06-28)

🔖 Miscellaneous

2.0.37 (2022-06-28)

🔖 Miscellaneous

2.0.36 (2022-06-28)

Note: Version bump only for package cache-path

2.0.35 (2022-05-11)

♻️ Chores

2.0.34 (2022-03-29)

Note: Version bump only for package cache-path

2.0.33 (2022-03-14)

Note: Version bump only for package cache-path

2.0.32 (2022-02-27)

♻️ Chores

2.0.31 (2022-02-27)

♻️ Chores

2.0.30 (2022-01-13)

Note: Version bump only for package cache-path

2.0.29 (2021-12-31)

📦 Code Refactoring

2.0.28 (2021-12-29)

✨ Features

2.0.27 (2021-12-26)

Note: Version bump only for package cache-path

2.0.26 (2021-12-16)

🔖 Miscellaneous

2.0.25 (2021-12-06)

Note: Version bump only for package cache-path

2.0.24 (2021-11-28)

📦 Code Refactoring

  • update import remove /index (8324cd8)

♻️ Chores

2.0.23 (2021-11-23)

Note: Version bump only for package cache-path

2.0.22 (2021-10-13)

Note: Version bump only for package cache-path

2.0.21 (2021-09-15)

Note: Version bump only for package cache-path

2.0.20 (2021-08-13)

♻️ Chores

2.0.19 (2021-07-24)

Note: Version bump only for package cache-path

2.0.18 (2021-07-23)

Note: Version bump only for package cache-path

2.0.17 (2021-07-23)

Note: Version bump only for package cache-path

2.0.16 (2021-07-16)

🔖 Miscellaneous

2.0.15 (2021-07-16)

Note: Version bump only for package cache-path

2.0.14 (2021-07-11)

✨ Features

  • not allow name => _ only (88a31b1)

2.0.13 (2021-07-11)

🛠 Build System

♻️ Chores

🔖 Miscellaneous

2.0.12 (2021-07-11)

🛠 Build System

♻️ Chores

2.0.11 (2021-06-21)

♻️ Chores

2.0.10 (2021-06-02)

♻️ Chores

2.0.9 (2021-05-17)

♻️ Chores

2.0.8 (2021-02-12)

♻️ Chores

2.0.7 (2021-02-08)

♻️ Chores

2.0.6 (2020-12-10)

Note: Version bump only for package cache-path

2.0.5 (2020-09-04)

Note: Version bump only for package cache-path

2.0.4 (2020-08-09)

✨ Features

  • @yarn-tool/pkg-version-query (c655fd3)

2.0.3 (2020-08-09)

🔖 Miscellaneous

2.0.2 (2020-08-09)

✨ Features

2.0.1 (2020-08-09)

📦 Code Refactoring

🔖 Miscellaneous

  • Add 'packages/cache-path/' from commit '1a7ee1aeec5749c9487b38ff7b21aabe6afc49fa' (3eaf2c5)

BREAKING CHANGES

  • 不相容於舊版