@spoosh/plugin-gc 0.3.1 → 0.4.0

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/dist/index.d.mts CHANGED
@@ -52,7 +52,7 @@ type GcPluginExports = {
52
52
  * ```
53
53
  */
54
54
  declare function gcPlugin(options?: GcPluginOptions): _spoosh_core.SpooshPlugin<{
55
- instanceApi: GcPluginExports;
55
+ api: GcPluginExports;
56
56
  }>;
57
57
 
58
58
  export { type GcPluginExports, type GcPluginOptions, gcPlugin };
package/dist/index.d.ts CHANGED
@@ -52,7 +52,7 @@ type GcPluginExports = {
52
52
  * ```
53
53
  */
54
54
  declare function gcPlugin(options?: GcPluginOptions): _spoosh_core.SpooshPlugin<{
55
- instanceApi: GcPluginExports;
55
+ api: GcPluginExports;
56
56
  }>;
57
57
 
58
58
  export { type GcPluginExports, type GcPluginOptions, gcPlugin };
package/dist/index.js CHANGED
@@ -98,7 +98,7 @@ function gcPlugin(options = {}) {
98
98
  runGcFn?.();
99
99
  }, interval);
100
100
  },
101
- instanceApi() {
101
+ api() {
102
102
  return {
103
103
  runGc: () => runGcFn?.() ?? 0
104
104
  };
package/dist/index.mjs CHANGED
@@ -74,7 +74,7 @@ function gcPlugin(options = {}) {
74
74
  runGcFn?.();
75
75
  }, interval);
76
76
  },
77
- instanceApi() {
77
+ api() {
78
78
  return {
79
79
  runGc: () => runGcFn?.() ?? 0
80
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-gc",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Garbage collection plugin for Spoosh cache with time and size-based cleanup",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -34,10 +34,10 @@
34
34
  }
35
35
  },
36
36
  "peerDependencies": {
37
- "@spoosh/core": ">=0.15.0"
37
+ "@spoosh/core": ">=0.17.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@spoosh/core": "0.15.1",
40
+ "@spoosh/core": "0.17.0",
41
41
  "@spoosh/test-utils": "0.3.0"
42
42
  },
43
43
  "scripts": {
@@ -45,6 +45,6 @@
45
45
  "build": "tsup",
46
46
  "typecheck": "tsc --noEmit",
47
47
  "lint": "eslint src --max-warnings 0",
48
- "format": "prettier --write 'src/**/*.ts'"
48
+ "format": "prettier --write 'src/**/*.ts' '*.md'"
49
49
  }
50
50
  }