Skip to content

Commit 1cbbca1

Browse files
committed
Update all dependencies to latest compatible versions
Major upgrades: - axios: ^0.21.1 → ^1.13.5 (fixes known CVEs) - lru-cache: ^5.1.1 → ^11.2.6 (maxAge→ttl, LRUCache named export) - typescript: ^4.6.3 → ^5.9.3 (target es5→es2015) - tslib: ^1.10.0 → ^2.8.1 - prettier: ^1.18.2 → ^3.8.1 - @typescript-eslint/*: ^2.6.1 → ^8.56.0 - eslint: ^6.5.1 → ^8.57.0 - jest: ^24.9.0 → ^29.7.0, ts-jest: ^24.1.0 → ^29.4.6 Held back ESM-only packages (is-ip, url-join) and eslint 9+ (flat config migration out of scope). Updated CacheConfig interface (maxAge→ttl), eslint config (removed deprecated prettier/@typescript-eslint), tsconfig (es2015 target, explicit moduleResolution), and README. https://claude.ai/code/session_01UabaLo3R3sXovyxaZo2yCF
1 parent 850d75d commit 1cbbca1

File tree

7 files changed

+5671
-7239
lines changed

7 files changed

+5671
-7239
lines changed

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ module.exports = {
99
extends: [
1010
'airbnb-base',
1111
'plugin:@typescript-eslint/recommended',
12-
'prettier/@typescript-eslint',
13-
'plugin:prettier/recommended',
1412
'plugin:import/recommended',
15-
'plugin:import/typescript'
13+
'plugin:import/typescript',
14+
'plugin:prettier/recommended'
1615
],
1716
parser: '@typescript-eslint/parser',
1817
parserOptions: {

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ The library will cache 4096 ip addresses responses for 24 hours using a LRU cach
5050
```js
5151
const cacheConfig = {
5252
max: 1000, // max size
53-
maxAge: 10 * 60 * 1000, // max age in ms (i.e. 10 minutes)
53+
ttl: 10 * 60 * 1000, // time-to-live in ms (i.e. 10 minutes)
5454
};
5555
const ipdata = new IPData('<apiKey>', cacheConfig);
5656
```
5757

58-
**Note:** To disable the cache pass `-1` as the `maxAge`.
58+
**Note:** To disable the cache pass `1` as the `ttl` (1ms effectively disables caching).
5959

6060
```js
6161
const cacheConfig = {
62-
maxAge: -1, // disable the cache
62+
ttl: 1, // disable the cache
6363
};
6464
const ipdata = new IPData('<apiKey>', cacheConfig);
6565
```

0 commit comments

Comments
 (0)