keyv-dir-store 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.5](https://github.com/snomiao/keyv-dir-store/compare/v0.0.4...v0.0.5) (2024-06-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **main:** sanitize ([ae7b162](https://github.com/snomiao/keyv-dir-store/commit/ae7b162cb8835bccda3c81769009ac0a78c7fac0))
11
+ * **main:** stage ([86d9193](https://github.com/snomiao/keyv-dir-store/commit/86d9193f5aa095ac77d006f081a3b0e801c1327e))
12
+
5
13
  ### [0.0.4](https://github.com/snomiao/keyv-dir-store/compare/v0.0.3...v0.0.4) (2024-06-26)
6
14
 
7
15
  ### [0.0.3](https://github.com/snomiao/keyv-dir-store/compare/v0.0.2...v0.0.3) (2024-06-12)
package/dist/index.js CHANGED
@@ -349,7 +349,7 @@ class KeyvDirStore {
349
349
  return name;
350
350
  }
351
351
  #path(key) {
352
- return path.join(this.#dir, this.#filename(key) + this.ext);
352
+ return path.join(this.#dir, import_sanitize_filename.default(this.#filename(key) + this.ext));
353
353
  }
354
354
  async get(key) {
355
355
  const cached = this.#cache.get(key);
package/index.ts CHANGED
@@ -50,7 +50,10 @@ export class KeyvDirStore implements Keyv.Store<string> {
50
50
  return name;
51
51
  }
52
52
  #path(key: string) {
53
- return path.join(this.#dir, this.#filename(key) + this.ext);
53
+ return path.join(
54
+ this.#dir,
55
+ sanitizeFilename(this.#filename(key) + this.ext)
56
+ );
54
57
  }
55
58
  async get(key: string) {
56
59
  // read memory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keyv-dir-store",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "author": "snomiao <snomiao@gmail.com>",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,6 +8,7 @@
8
8
  "types": "./index.ts"
9
9
  },
10
10
  "module": "index.ts",
11
+ "types": "./index.ts",
11
12
  "files": [
12
13
  "*.ts",
13
14
  "dist"