Skip to content

Commit 9117989

Browse files
committed
fix(deps): use turborepo + fix ms arg type
1 parent 495ae76 commit 9117989

File tree

4 files changed

+83
-7
lines changed

4 files changed

+83
-7
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"@types/node": "^22.10.2",
2020
"micro-docgen": "^0.3.5",
2121
"prettier": "^3.0.3",
22-
"tsx": "^4.7.0"
22+
"tsx": "^4.7.0",
23+
"turbo": "^2.5.3"
2324
},
2425
"overrides": {
2526
"katex@>=0.11.0 <0.16.10": ">=0.16.10",

packages/cache/src/use-cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AsyncLocalStorage } from 'node:async_hooks';
22
import { AsyncFunction, GenericFunction } from 'commandkit';
33
import { randomUUID } from 'node:crypto';
4-
import ms from 'ms';
4+
import ms, { type StringValue } from 'ms';
55
import { createObjectHash } from './utils';
66
import { getCacheProvider } from './cache-plugin';
77

@@ -76,7 +76,7 @@ function useCache<R extends any[], F extends AsyncFunction<R>>(
7676
const resolvedTTL =
7777
isLocal && params?.ttl != null
7878
? typeof params.ttl === 'string'
79-
? ms(params.ttl)
79+
? ms(params.ttl as StringValue)
8080
: params.ttl
8181
: null;
8282

@@ -213,7 +213,7 @@ export function cacheLife(ttl: number | string): void {
213213
throw new Error('cacheLife() must be called with a ttl value.');
214214
}
215215

216-
context.params.ttl = typeof ttl === 'string' ? ms(ttl) : ttl;
216+
context.params.ttl = typeof ttl === 'string' ? ms(ttl as StringValue) : ttl;
217217
}
218218

219219
/**

pnpm-lock.yaml

Lines changed: 67 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://turborepo.com/schema.json",
3+
"tasks": {
4+
"build": {
5+
"dependsOn": ["^build"]
6+
},
7+
"lint": {
8+
"dependsOn": ["^build", "^lint"]
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)