Skip to content

Commit 6ea791e

Browse files
simllllclaude
andauthored
Replace Hokify namespace with custom package namespace (#4)
* refactor: replace @hokify namespace with @node-ts-cache - Rename @hokify/node-ts-cache to @node-ts-cache/core - Rename storage packages to @node-ts-cache/<storage>-storage - @hokify/node-ts-cache-redis-storage → @node-ts-cache/redis-storage - @hokify/node-ts-cache-redisio-storage → @node-ts-cache/ioredis-storage - @hokify/node-ts-cache-node-cache-storage → @node-ts-cache/node-cache-storage - @hokify/node-ts-cache-lru-storage → @node-ts-cache/lru-storage - @hokify/node-ts-cache-lru-redis-storage → @node-ts-cache/lru-redis-storage - Replace @hokify/eslint-config with standard @typescript-eslint config - Update all import statements, documentation, and changelog references - Update author email references * fix: update lru-cache to v10 and fix build errors - Update lru-cache from v6 to v10.0.0 - Migrate LRUStorage to use new LRUCache API - Migrate LRUWithRedisStorage to use new LRUCache API - Change maxAge option to ttl (in seconds) for consistency - Export new LRUStorageOptions and LRUWithRedisStorageOptions interfaces - Update README documentation for new API * style: fix Prettier formatting * chore: regenerate package-lock.json * fix: update tests and docs to use required max option for LRUStorage * ci: fix npm ci for Node 24 optional dependencies --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent de2bab4 commit 6ea791e

33 files changed

Lines changed: 4888 additions & 11293 deletions

.eslintrc.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
module.exports = {
22
root: true,
3-
extends: ['@hokify'],
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint'],
5+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
46
parserOptions: {
7+
ecmaVersion: 2020,
8+
sourceType: 'module',
59
project: ['./ts-cache/tsconfig.json', './storages/*/tsconfig.json']
10+
},
11+
env: {
12+
node: true,
13+
es2020: true
14+
},
15+
rules: {
16+
'@typescript-eslint/no-explicit-any': 'off',
17+
'@typescript-eslint/explicit-module-boundary-types': 'off',
18+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
619
}
720
};

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
echo "### Installation" >> release_notes.md
168168
echo "" >> release_notes.md
169169
echo '```bash' >> release_notes.md
170-
echo 'npm install @hokify/node-ts-cache' >> release_notes.md
170+
echo 'npm install @node-ts-cache/core' >> release_notes.md
171171
echo '```' >> release_notes.md
172172
173173
cat release_notes.md

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cache: 'npm'
2828

2929
- name: Install dependencies
30-
run: npm ci
30+
run: npm ci --include=optional || npm install
3131

3232
- name: Build
3333
run: npm run build
@@ -52,7 +52,7 @@ jobs:
5252
cache: 'npm'
5353

5454
- name: Install dependencies
55-
run: npm ci
55+
run: npm ci --include=optional || npm install
5656

5757
- name: Build (required for type-aware linting)
5858
run: npm run build

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# node-ts-cache
22

3-
[![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache.svg)](https://www.npmjs.org/package/@hokify/node-ts-cache)
3+
[![npm](https://img.shields.io/npm/v/@node-ts-cache/core.svg)](https://www.npmjs.org/package/@node-ts-cache/core)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5-
[![Node.js Version](https://img.shields.io/node/v/@hokify/node-ts-cache.svg)](https://nodejs.org)
5+
[![Node.js Version](https://img.shields.io/node/v/@node-ts-cache/core.svg)](https://nodejs.org)
66
[![TypeScript](https://img.shields.io/badge/TypeScript-5.1-blue.svg)](https://www.typescriptlang.org/)
77

88
Simple and extensible caching module for TypeScript/Node.js with decorator support.
@@ -19,11 +19,11 @@ Simple and extensible caching module for TypeScript/Node.js with decorator suppo
1919
## Quick Start
2020

2121
```bash
22-
npm install @hokify/node-ts-cache
22+
npm install @node-ts-cache/core
2323
```
2424

2525
```typescript
26-
import { Cache, ExpirationStrategy, MemoryStorage } from '@hokify/node-ts-cache';
26+
import { Cache, ExpirationStrategy, MemoryStorage } from '@node-ts-cache/core';
2727

2828
const cacheStrategy = new ExpirationStrategy(new MemoryStorage());
2929

@@ -42,19 +42,19 @@ This is a monorepo containing the following packages:
4242

4343
### Core Package
4444

45-
| Package | Version | Description |
46-
| ----------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------- |
47-
| [@hokify/node-ts-cache](./ts-cache) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache.svg) | Core caching module with decorators, strategies, and built-in storages |
45+
| Package | Version | Description |
46+
| --------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------- |
47+
| [@node-ts-cache/core](./ts-cache) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/core.svg) | Core caching module with decorators, strategies, and built-in storages |
4848

4949
### Storage Adapters
5050

51-
| Package | Version | Description |
52-
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------ |
53-
| [@hokify/node-ts-cache-redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-redis-storage.svg) | Redis storage using `redis` package (v3.x) |
54-
| [@hokify/node-ts-cache-redisio-storage](./storages/redisio) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-redisio-storage.svg) | Redis storage using `ioredis` with compression support |
55-
| [@hokify/node-ts-cache-node-cache-storage](./storages/node-cache) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-node-cache-storage.svg) | In-memory cache using `node-cache` |
56-
| [@hokify/node-ts-cache-lru-storage](./storages/lru) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-lru-storage.svg) | LRU cache with automatic eviction |
57-
| [@hokify/node-ts-cache-lru-redis-storage](./storages/lru-redis) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-lru-redis-storage.svg) | Two-tier caching (local LRU + remote Redis) |
51+
| Package | Version | Description |
52+
| ---------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------ |
53+
| [@node-ts-cache/redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/redis-storage.svg) | Redis storage using `redis` package (v3.x) |
54+
| [@node-ts-cache/ioredis-storage](./storages/redisio) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/ioredis-storage.svg) | Redis storage using `ioredis` with compression support |
55+
| [@node-ts-cache/node-cache-storage](./storages/node-cache) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/node-cache-storage.svg) | In-memory cache using `node-cache` |
56+
| [@node-ts-cache/lru-storage](./storages/lru) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/lru-storage.svg) | LRU cache with automatic eviction |
57+
| [@node-ts-cache/lru-redis-storage](./storages/lru-redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/lru-redis-storage.svg) | Two-tier caching (local LRU + remote Redis) |
5858

5959
## Documentation
6060

0 commit comments

Comments
 (0)