@tanstack/solid-pacer 0.22.0 → 0.23.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/README.md +4 -4
- package/dist/async-batcher/createAsyncBatcher.d.ts +5 -9
- package/dist/async-batcher/createAsyncBatcher.js +2 -5
- package/dist/async-debouncer/createAsyncDebouncer.d.ts +8 -11
- package/dist/async-debouncer/createAsyncDebouncer.js +5 -7
- package/dist/async-queuer/createAsyncQueuer.d.ts +9 -11
- package/dist/async-queuer/createAsyncQueuer.js +4 -5
- package/dist/async-rate-limiter/createAsyncRateLimiter.d.ts +10 -12
- package/dist/async-rate-limiter/createAsyncRateLimiter.js +7 -8
- package/dist/async-throttler/createAsyncThrottler.d.ts +8 -13
- package/dist/async-throttler/createAsyncThrottler.js +5 -9
- package/dist/batcher/createBatcher.d.ts +11 -14
- package/dist/batcher/createBatcher.js +6 -8
- package/dist/debouncer/createDebouncedSignal.d.ts +2 -4
- package/dist/debouncer/createDebouncedSignal.js +1 -2
- package/dist/debouncer/createDebouncedValue.d.ts +2 -4
- package/dist/debouncer/createDebouncedValue.js +1 -2
- package/dist/debouncer/createDebouncer.d.ts +4 -6
- package/dist/debouncer/createDebouncer.js +1 -2
- package/dist/provider/PacerProvider.d.ts +6 -8
- package/dist/provider/PacerProvider.js +1 -2
- package/dist/queuer/createQueuedSignal.d.ts +2 -4
- package/dist/queuer/createQueuedSignal.js +1 -2
- package/dist/queuer/createQueuer.d.ts +4 -6
- package/dist/queuer/createQueuer.js +1 -2
- package/dist/rate-limiter/createRateLimitedSignal.d.ts +12 -13
- package/dist/rate-limiter/createRateLimitedSignal.js +11 -11
- package/dist/rate-limiter/createRateLimitedValue.d.ts +2 -4
- package/dist/rate-limiter/createRateLimitedValue.js +1 -2
- package/dist/rate-limiter/createRateLimiter.d.ts +8 -9
- package/dist/rate-limiter/createRateLimiter.js +5 -5
- package/dist/throttler/createThrottledSignal.d.ts +2 -6
- package/dist/throttler/createThrottledSignal.js +1 -4
- package/dist/throttler/createThrottledValue.d.ts +2 -6
- package/dist/throttler/createThrottledValue.js +1 -4
- package/dist/throttler/createThrottler.d.ts +4 -8
- package/dist/throttler/createThrottler.js +1 -4
- package/package.json +23 -67
- package/dist/async-batcher/createAsyncBatcher.cjs +0 -166
- package/dist/async-batcher/createAsyncBatcher.cjs.map +0 -1
- package/dist/async-batcher/createAsyncBatcher.d.cts +0 -177
- package/dist/async-batcher/createAsyncBatcher.js.map +0 -1
- package/dist/async-batcher/index.cjs +0 -11
- package/dist/async-batcher/index.d.cts +0 -3
- package/dist/async-debouncer/createAsyncDebouncer.cjs +0 -151
- package/dist/async-debouncer/createAsyncDebouncer.cjs.map +0 -1
- package/dist/async-debouncer/createAsyncDebouncer.d.cts +0 -163
- package/dist/async-debouncer/createAsyncDebouncer.js.map +0 -1
- package/dist/async-debouncer/index.cjs +0 -11
- package/dist/async-debouncer/index.d.cts +0 -3
- package/dist/async-queuer/createAsyncQueuer.cjs +0 -158
- package/dist/async-queuer/createAsyncQueuer.cjs.map +0 -1
- package/dist/async-queuer/createAsyncQueuer.d.cts +0 -169
- package/dist/async-queuer/createAsyncQueuer.js.map +0 -1
- package/dist/async-queuer/index.cjs +0 -11
- package/dist/async-queuer/index.d.cts +0 -3
- package/dist/async-rate-limiter/createAsyncRateLimiter.cjs +0 -193
- package/dist/async-rate-limiter/createAsyncRateLimiter.cjs.map +0 -1
- package/dist/async-rate-limiter/createAsyncRateLimiter.d.cts +0 -208
- package/dist/async-rate-limiter/createAsyncRateLimiter.js.map +0 -1
- package/dist/async-rate-limiter/index.cjs +0 -11
- package/dist/async-rate-limiter/index.d.cts +0 -3
- package/dist/async-throttler/createAsyncThrottler.cjs +0 -151
- package/dist/async-throttler/createAsyncThrottler.cjs.map +0 -1
- package/dist/async-throttler/createAsyncThrottler.d.cts +0 -163
- package/dist/async-throttler/createAsyncThrottler.js.map +0 -1
- package/dist/async-throttler/index.cjs +0 -11
- package/dist/async-throttler/index.d.cts +0 -3
- package/dist/batcher/createBatcher.cjs +0 -132
- package/dist/batcher/createBatcher.cjs.map +0 -1
- package/dist/batcher/createBatcher.d.cts +0 -146
- package/dist/batcher/createBatcher.js.map +0 -1
- package/dist/batcher/index.cjs +0 -11
- package/dist/batcher/index.d.cts +0 -3
- package/dist/debouncer/createDebouncedSignal.cjs +0 -88
- package/dist/debouncer/createDebouncedSignal.cjs.map +0 -1
- package/dist/debouncer/createDebouncedSignal.d.cts +0 -79
- package/dist/debouncer/createDebouncedSignal.js.map +0 -1
- package/dist/debouncer/createDebouncedValue.cjs +0 -77
- package/dist/debouncer/createDebouncedValue.cjs.map +0 -1
- package/dist/debouncer/createDebouncedValue.d.cts +0 -70
- package/dist/debouncer/createDebouncedValue.js.map +0 -1
- package/dist/debouncer/createDebouncer.cjs +0 -129
- package/dist/debouncer/createDebouncer.cjs.map +0 -1
- package/dist/debouncer/createDebouncer.d.cts +0 -144
- package/dist/debouncer/createDebouncer.js.map +0 -1
- package/dist/debouncer/index.cjs +0 -15
- package/dist/debouncer/index.d.cts +0 -5
- package/dist/index.cjs +0 -47
- package/dist/index.d.cts +0 -20
- package/dist/provider/PacerProvider.cjs +0 -27
- package/dist/provider/PacerProvider.cjs.map +0 -1
- package/dist/provider/PacerProvider.d.cts +0 -28
- package/dist/provider/PacerProvider.js.map +0 -1
- package/dist/provider/index.cjs +0 -6
- package/dist/provider/index.d.cts +0 -2
- package/dist/queuer/createQueuedSignal.cjs +0 -129
- package/dist/queuer/createQueuedSignal.cjs.map +0 -1
- package/dist/queuer/createQueuedSignal.d.cts +0 -121
- package/dist/queuer/createQueuedSignal.js.map +0 -1
- package/dist/queuer/createQueuer.cjs +0 -133
- package/dist/queuer/createQueuer.cjs.map +0 -1
- package/dist/queuer/createQueuer.d.cts +0 -147
- package/dist/queuer/createQueuer.js.map +0 -1
- package/dist/queuer/index.cjs +0 -13
- package/dist/queuer/index.d.cts +0 -4
- package/dist/rate-limiter/createRateLimitedSignal.cjs +0 -102
- package/dist/rate-limiter/createRateLimitedSignal.cjs.map +0 -1
- package/dist/rate-limiter/createRateLimitedSignal.d.cts +0 -93
- package/dist/rate-limiter/createRateLimitedSignal.js.map +0 -1
- package/dist/rate-limiter/createRateLimitedValue.cjs +0 -102
- package/dist/rate-limiter/createRateLimitedValue.cjs.map +0 -1
- package/dist/rate-limiter/createRateLimitedValue.d.cts +0 -95
- package/dist/rate-limiter/createRateLimitedValue.js.map +0 -1
- package/dist/rate-limiter/createRateLimiter.cjs +0 -157
- package/dist/rate-limiter/createRateLimiter.cjs.map +0 -1
- package/dist/rate-limiter/createRateLimiter.d.cts +0 -173
- package/dist/rate-limiter/createRateLimiter.js.map +0 -1
- package/dist/rate-limiter/index.cjs +0 -15
- package/dist/rate-limiter/index.d.cts +0 -5
- package/dist/throttler/createThrottledSignal.cjs +0 -79
- package/dist/throttler/createThrottledSignal.cjs.map +0 -1
- package/dist/throttler/createThrottledSignal.d.cts +0 -70
- package/dist/throttler/createThrottledSignal.js.map +0 -1
- package/dist/throttler/createThrottledValue.cjs +0 -74
- package/dist/throttler/createThrottledValue.cjs.map +0 -1
- package/dist/throttler/createThrottledValue.d.cts +0 -67
- package/dist/throttler/createThrottledValue.js.map +0 -1
- package/dist/throttler/createThrottler.cjs +0 -132
- package/dist/throttler/createThrottler.cjs.map +0 -1
- package/dist/throttler/createThrottler.d.cts +0 -147
- package/dist/throttler/createThrottler.js.map +0 -1
- package/dist/throttler/index.cjs +0 -15
- package/dist/throttler/index.d.cts +0 -5
- package/dist/types/index.cjs +0 -8
- package/dist/types/index.d.cts +0 -1
- package/dist/utils/index.cjs +0 -8
- package/dist/utils/index.d.cts +0 -1
- package/src/async-batcher/createAsyncBatcher.ts +0 -234
- package/src/async-batcher/index.ts +0 -3
- package/src/async-debouncer/createAsyncDebouncer.ts +0 -225
- package/src/async-debouncer/index.ts +0 -4
- package/src/async-queuer/createAsyncQueuer.ts +0 -226
- package/src/async-queuer/index.ts +0 -3
- package/src/async-rate-limiter/createAsyncRateLimiter.ts +0 -269
- package/src/async-rate-limiter/index.ts +0 -4
- package/src/async-throttler/createAsyncThrottler.ts +0 -225
- package/src/async-throttler/index.ts +0 -4
- package/src/batcher/createBatcher.ts +0 -199
- package/src/batcher/index.ts +0 -3
- package/src/debouncer/createDebouncedSignal.ts +0 -92
- package/src/debouncer/createDebouncedValue.ts +0 -85
- package/src/debouncer/createDebouncer.ts +0 -201
- package/src/debouncer/index.ts +0 -6
- package/src/index.ts +0 -46
- package/src/provider/PacerProvider.tsx +0 -63
- package/src/provider/index.ts +0 -1
- package/src/queuer/createQueuedSignal.ts +0 -138
- package/src/queuer/createQueuer.ts +0 -199
- package/src/queuer/index.ts +0 -4
- package/src/rate-limiter/createRateLimitedSignal.ts +0 -117
- package/src/rate-limiter/createRateLimitedValue.ts +0 -110
- package/src/rate-limiter/createRateLimiter.ts +0 -226
- package/src/rate-limiter/index.ts +0 -5
- package/src/throttler/createThrottledSignal.ts +0 -81
- package/src/throttler/createThrottledValue.ts +0 -82
- package/src/throttler/createThrottler.ts +0 -204
- package/src/throttler/index.ts +0 -6
- package/src/types/index.ts +0 -1
- package/src/utils/index.ts +0 -1
|
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
|
|
|
3
3
|
import { Debouncer, DebouncerOptions, DebouncerState } from "@tanstack/pacer/debouncer";
|
|
4
4
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
5
5
|
//#region src/debouncer/createDebouncer.d.ts
|
|
6
|
-
interface SolidDebouncerOptions<TFn extends AnyFunction, TSelected = {}> extends DebouncerOptions<TFn> {
|
|
6
|
+
export interface SolidDebouncerOptions<TFn extends AnyFunction, TSelected = {}> extends DebouncerOptions<TFn> {
|
|
7
7
|
/**
|
|
8
8
|
* Optional callback invoked when the owning component unmounts. Receives the debouncer instance.
|
|
9
9
|
* When provided, replaces the default cleanup (cancel); use it to call flush(), reset(), cancel(), add logging, etc.
|
|
10
10
|
*/
|
|
11
11
|
onUnmount?: (debouncer: SolidDebouncer<TFn, TSelected>) => void;
|
|
12
12
|
}
|
|
13
|
-
interface SolidDebouncer<TFn extends AnyFunction, TSelected = {}> extends Omit<Debouncer<TFn>, 'store'> {
|
|
13
|
+
export interface SolidDebouncer<TFn extends AnyFunction, TSelected = {}> extends Omit<Debouncer<TFn>, 'store'> {
|
|
14
14
|
/**
|
|
15
15
|
* A Solid component that allows you to subscribe to the debouncer state.
|
|
16
16
|
*
|
|
@@ -138,7 +138,5 @@ interface SolidDebouncer<TFn extends AnyFunction, TSelected = {}> extends Omit<D
|
|
|
138
138
|
* const { isPending } = debouncer.state();
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
|
-
declare function createDebouncer<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidDebouncerOptions<TFn, TSelected>, selector?: (state: DebouncerState<TFn>) => TSelected): SolidDebouncer<TFn, TSelected>;
|
|
142
|
-
//#endregion
|
|
143
|
-
export { SolidDebouncer, SolidDebouncerOptions, createDebouncer };
|
|
144
|
-
//# sourceMappingURL=createDebouncer.d.ts.map
|
|
141
|
+
export declare function createDebouncer<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidDebouncerOptions<TFn, TSelected>, selector?: (state: DebouncerState<TFn>) => TSelected): SolidDebouncer<TFn, TSelected>;
|
|
142
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyAsyncFunction, AnyFunction, AsyncBatcherOptions, AsyncDebouncerOptions, AsyncQueuerOptions, AsyncRateLimiterOptions, AsyncThrottlerOptions, BatcherOptions, DebouncerOptions, QueuerOptions, RateLimiterOptions, ThrottlerOptions } from "@tanstack/pacer";
|
|
2
2
|
import { JSX } from "solid-js";
|
|
3
3
|
//#region src/provider/PacerProvider.d.ts
|
|
4
|
-
interface PacerProviderOptions {
|
|
4
|
+
export interface PacerProviderOptions {
|
|
5
5
|
asyncBatcher?: Partial<AsyncBatcherOptions<any>>;
|
|
6
6
|
asyncDebouncer?: Partial<AsyncDebouncerOptions<AnyAsyncFunction>>;
|
|
7
7
|
asyncQueuer?: Partial<AsyncQueuerOptions<any>>;
|
|
@@ -16,13 +16,11 @@ interface PacerProviderOptions {
|
|
|
16
16
|
interface PacerContextValue {
|
|
17
17
|
defaultOptions: PacerProviderOptions;
|
|
18
18
|
}
|
|
19
|
-
interface PacerProviderProps {
|
|
19
|
+
export interface PacerProviderProps {
|
|
20
20
|
children: JSX.Element;
|
|
21
21
|
defaultOptions?: PacerProviderOptions;
|
|
22
22
|
}
|
|
23
|
-
declare function PacerProvider(props: PacerProviderProps): JSX.Element;
|
|
24
|
-
declare function usePacerContext(): PacerContextValue | null;
|
|
25
|
-
declare function useDefaultPacerOptions(): PacerProviderOptions;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { PacerProvider, PacerProviderOptions, PacerProviderProps, useDefaultPacerOptions, usePacerContext };
|
|
28
|
-
//# sourceMappingURL=PacerProvider.d.ts.map
|
|
23
|
+
export declare function PacerProvider(props: PacerProviderProps): JSX.Element;
|
|
24
|
+
export declare function usePacerContext(): PacerContextValue | null;
|
|
25
|
+
export declare function useDefaultPacerOptions(): PacerProviderOptions;
|
|
26
|
+
//#endregion
|
|
@@ -115,7 +115,5 @@ import { QueuerState } from "@tanstack/pacer/queuer";
|
|
|
115
115
|
* const { size, isRunning, executionCount } = queue.state;
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
|
-
declare function createQueuedSignal<TValue, TSelected extends Pick<QueuerState<TValue>, 'items'> = Pick<QueuerState<TValue>, 'items'>>(fn: (item: TValue) => void, options?: SolidQueuerOptions<TValue, TSelected>, selector?: (state: QueuerState<TValue>) => TSelected): [() => Array<TValue>, SolidQueuer<TValue, TSelected>['addItem'], SolidQueuer<TValue, TSelected>];
|
|
119
|
-
//#endregion
|
|
120
|
-
export { createQueuedSignal };
|
|
121
|
-
//# sourceMappingURL=createQueuedSignal.d.ts.map
|
|
118
|
+
export declare function createQueuedSignal<TValue, TSelected extends Pick<QueuerState<TValue>, 'items'> = Pick<QueuerState<TValue>, 'items'>>(fn: (item: TValue) => void, options?: SolidQueuerOptions<TValue, TSelected>, selector?: (state: QueuerState<TValue>) => TSelected): [() => Array<TValue>, SolidQueuer<TValue, TSelected>['addItem'], SolidQueuer<TValue, TSelected>];
|
|
119
|
+
//#endregion
|
|
@@ -2,14 +2,14 @@ import { Accessor, JSX } from "solid-js";
|
|
|
2
2
|
import { Store } from "@tanstack/solid-store";
|
|
3
3
|
import { Queuer, QueuerOptions, QueuerState } from "@tanstack/pacer/queuer";
|
|
4
4
|
//#region src/queuer/createQueuer.d.ts
|
|
5
|
-
interface SolidQueuerOptions<TValue, TSelected = {}> extends QueuerOptions<TValue> {
|
|
5
|
+
export interface SolidQueuerOptions<TValue, TSelected = {}> extends QueuerOptions<TValue> {
|
|
6
6
|
/**
|
|
7
7
|
* Optional callback invoked when the owning component unmounts. Receives the queuer instance.
|
|
8
8
|
* When provided, replaces the default cleanup (stop); use it to call flush(), flushAsBatch(), stop(), add logging, etc.
|
|
9
9
|
*/
|
|
10
10
|
onUnmount?: (queuer: SolidQueuer<TValue, TSelected>) => void;
|
|
11
11
|
}
|
|
12
|
-
interface SolidQueuer<TValue, TSelected = {}> extends Omit<Queuer<TValue>, 'store'> {
|
|
12
|
+
export interface SolidQueuer<TValue, TSelected = {}> extends Omit<Queuer<TValue>, 'store'> {
|
|
13
13
|
/**
|
|
14
14
|
* A Solid component that allows you to subscribe to the queuer state.
|
|
15
15
|
*
|
|
@@ -141,7 +141,5 @@ interface SolidQueuer<TValue, TSelected = {}> extends Omit<Queuer<TValue>, 'stor
|
|
|
141
141
|
* const { items, isRunning } = queue.state();
|
|
142
142
|
* ```
|
|
143
143
|
*/
|
|
144
|
-
declare function createQueuer<TValue, TSelected = {}>(fn: (item: TValue) => void, options?: SolidQueuerOptions<TValue, TSelected>, selector?: (state: QueuerState<TValue>) => TSelected): SolidQueuer<TValue, TSelected>;
|
|
145
|
-
//#endregion
|
|
146
|
-
export { SolidQueuer, SolidQueuerOptions, createQueuer };
|
|
147
|
-
//# sourceMappingURL=createQueuer.d.ts.map
|
|
144
|
+
export declare function createQueuer<TValue, TSelected = {}>(fn: (item: TValue) => void, options?: SolidQueuerOptions<TValue, TSelected>, selector?: (state: QueuerState<TValue>) => TSelected): SolidQueuer<TValue, TSelected>;
|
|
145
|
+
//#endregion
|
|
@@ -42,13 +42,14 @@ import { RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
|
42
42
|
* the reactive system track the selected state values.
|
|
43
43
|
*
|
|
44
44
|
* Available rate limiter state properties:
|
|
45
|
-
* - `
|
|
46
|
-
* - `
|
|
47
|
-
* - `
|
|
48
|
-
* - `
|
|
49
|
-
* - `
|
|
50
|
-
* - `
|
|
51
|
-
*
|
|
45
|
+
* - `executionCount`: Number of function executions
|
|
46
|
+
* - `executionTimes`: Timestamps of executions tracked for the current window
|
|
47
|
+
* - `maybeExecuteCount`: Number of calls to maybeExecute
|
|
48
|
+
* - `rejectionCount`: Number of calls rejected by the rate limit
|
|
49
|
+
* - `isExceeded`: Whether the rate limit has been reached
|
|
50
|
+
* - `status`: Current status ('disabled' | 'exceeded' | 'idle')
|
|
51
|
+
*
|
|
52
|
+
* Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
|
|
52
53
|
*
|
|
53
54
|
* @example
|
|
54
55
|
* ```tsx
|
|
@@ -63,7 +64,7 @@ import { RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
|
63
64
|
* const [value, setValue, rateLimiter] = createRateLimitedSignal(
|
|
64
65
|
* 0,
|
|
65
66
|
* { limit: 5, window: 60000 },
|
|
66
|
-
* (state) => ({
|
|
67
|
+
* (state) => ({ isExceeded: state.isExceeded })
|
|
67
68
|
* );
|
|
68
69
|
*
|
|
69
70
|
* // With rejection callback and fixed window
|
|
@@ -78,7 +79,7 @@ import { RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
|
78
79
|
*
|
|
79
80
|
* // Access rateLimiter state via signals
|
|
80
81
|
* const handleSubmit = () => {
|
|
81
|
-
* const remaining = rateLimiter.
|
|
82
|
+
* const remaining = rateLimiter.getRemainingInWindow();
|
|
82
83
|
* if (remaining > 0) {
|
|
83
84
|
* setValue(newValue);
|
|
84
85
|
* } else {
|
|
@@ -87,7 +88,5 @@ import { RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
|
87
88
|
* };
|
|
88
89
|
* ```
|
|
89
90
|
*/
|
|
90
|
-
declare function createRateLimitedSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidRateLimiterOptions<Setter<TValue>, TSelected>, selector?: (state: RateLimiterState) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidRateLimiter<Setter<TValue>, TSelected>];
|
|
91
|
-
//#endregion
|
|
92
|
-
export { createRateLimitedSignal };
|
|
93
|
-
//# sourceMappingURL=createRateLimitedSignal.d.ts.map
|
|
91
|
+
export declare function createRateLimitedSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidRateLimiterOptions<Setter<TValue>, TSelected>, selector?: (state: RateLimiterState) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidRateLimiter<Setter<TValue>, TSelected>];
|
|
92
|
+
//#endregion
|
|
@@ -42,13 +42,14 @@ import { createSignal } from "solid-js";
|
|
|
42
42
|
* the reactive system track the selected state values.
|
|
43
43
|
*
|
|
44
44
|
* Available rate limiter state properties:
|
|
45
|
-
* - `
|
|
46
|
-
* - `
|
|
47
|
-
* - `
|
|
48
|
-
* - `
|
|
49
|
-
* - `
|
|
50
|
-
* - `
|
|
51
|
-
*
|
|
45
|
+
* - `executionCount`: Number of function executions
|
|
46
|
+
* - `executionTimes`: Timestamps of executions tracked for the current window
|
|
47
|
+
* - `maybeExecuteCount`: Number of calls to maybeExecute
|
|
48
|
+
* - `rejectionCount`: Number of calls rejected by the rate limit
|
|
49
|
+
* - `isExceeded`: Whether the rate limit has been reached
|
|
50
|
+
* - `status`: Current status ('disabled' | 'exceeded' | 'idle')
|
|
51
|
+
*
|
|
52
|
+
* Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
|
|
52
53
|
*
|
|
53
54
|
* @example
|
|
54
55
|
* ```tsx
|
|
@@ -63,7 +64,7 @@ import { createSignal } from "solid-js";
|
|
|
63
64
|
* const [value, setValue, rateLimiter] = createRateLimitedSignal(
|
|
64
65
|
* 0,
|
|
65
66
|
* { limit: 5, window: 60000 },
|
|
66
|
-
* (state) => ({
|
|
67
|
+
* (state) => ({ isExceeded: state.isExceeded })
|
|
67
68
|
* );
|
|
68
69
|
*
|
|
69
70
|
* // With rejection callback and fixed window
|
|
@@ -78,7 +79,7 @@ import { createSignal } from "solid-js";
|
|
|
78
79
|
*
|
|
79
80
|
* // Access rateLimiter state via signals
|
|
80
81
|
* const handleSubmit = () => {
|
|
81
|
-
* const remaining = rateLimiter.
|
|
82
|
+
* const remaining = rateLimiter.getRemainingInWindow();
|
|
82
83
|
* if (remaining > 0) {
|
|
83
84
|
* setValue(newValue);
|
|
84
85
|
* } else {
|
|
@@ -98,5 +99,4 @@ function createRateLimitedSignal(value, initialOptions, selector) {
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
//#endregion
|
|
101
|
-
export { createRateLimitedSignal };
|
|
102
|
-
//# sourceMappingURL=createRateLimitedSignal.js.map
|
|
102
|
+
export { createRateLimitedSignal };
|
|
@@ -89,7 +89,5 @@ import { RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
|
89
89
|
* const { executionCount, rejectionCount } = rateLimiter.state;
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
|
-
declare function createRateLimitedValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidRateLimiterOptions<Setter<TValue>, TSelected>, selector?: (state: RateLimiterState) => TSelected): [Accessor<TValue>, SolidRateLimiter<Setter<TValue>, TSelected>];
|
|
93
|
-
//#endregion
|
|
94
|
-
export { createRateLimitedValue };
|
|
95
|
-
//# sourceMappingURL=createRateLimitedValue.d.ts.map
|
|
92
|
+
export declare function createRateLimitedValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidRateLimiterOptions<Setter<TValue>, TSelected>, selector?: (state: RateLimiterState) => TSelected): [Accessor<TValue>, SolidRateLimiter<Setter<TValue>, TSelected>];
|
|
93
|
+
//#endregion
|
|
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
|
|
|
3
3
|
import { RateLimiter, RateLimiterOptions, RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
4
4
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
5
5
|
//#region src/rate-limiter/createRateLimiter.d.ts
|
|
6
|
-
interface SolidRateLimiterOptions<TFn extends AnyFunction, TSelected = {}> extends RateLimiterOptions<TFn> {
|
|
6
|
+
export interface SolidRateLimiterOptions<TFn extends AnyFunction, TSelected = {}> extends RateLimiterOptions<TFn> {
|
|
7
7
|
/**
|
|
8
8
|
* Optional callback invoked when the owning component unmounts. Receives the rate limiter instance.
|
|
9
9
|
* When provided, replaces the default cleanup; use it to call reset(), add logging, etc.
|
|
10
10
|
*/
|
|
11
11
|
onUnmount?: (rateLimiter: SolidRateLimiter<TFn, TSelected>) => void;
|
|
12
12
|
}
|
|
13
|
-
interface SolidRateLimiter<TFn extends AnyFunction, TSelected = {}> extends Omit<RateLimiter<TFn>, 'store'> {
|
|
13
|
+
export interface SolidRateLimiter<TFn extends AnyFunction, TSelected = {}> extends Omit<RateLimiter<TFn>, 'store'> {
|
|
14
14
|
/**
|
|
15
15
|
* A Solid component that allows you to subscribe to the rate limiter state.
|
|
16
16
|
*
|
|
@@ -83,12 +83,13 @@ interface SolidRateLimiter<TFn extends AnyFunction, TSelected = {}> extends Omit
|
|
|
83
83
|
* tracking by providing a selector function or using the `Subscribe` component. This prevents unnecessary
|
|
84
84
|
* updates and gives you full control over when your component tracks state changes.
|
|
85
85
|
*
|
|
86
|
+
* Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
|
|
87
|
+
*
|
|
86
88
|
* Available state properties:
|
|
89
|
+
* - `executionTimes`: Timestamps of executions tracked for the current window
|
|
90
|
+
* - `isExceeded`: Whether the rate limit has been reached
|
|
87
91
|
* - `executionCount`: Number of function executions that have been completed
|
|
88
92
|
* - `rejectionCount`: Number of function calls that were rejected due to rate limiting
|
|
89
|
-
* - `remainingInWindow`: Number of executions remaining in the current window
|
|
90
|
-
* - `nextWindowTime`: Timestamp when the next window begins
|
|
91
|
-
* - `currentWindowStart`: Timestamp when the current window started
|
|
92
93
|
*
|
|
93
94
|
* @example
|
|
94
95
|
* ```tsx
|
|
@@ -167,7 +168,5 @@ interface SolidRateLimiter<TFn extends AnyFunction, TSelected = {}> extends Omit
|
|
|
167
168
|
* const { executionCount, rejectionCount } = rateLimiter.state();
|
|
168
169
|
* ```
|
|
169
170
|
*/
|
|
170
|
-
declare function createRateLimiter<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidRateLimiterOptions<TFn, TSelected>, selector?: (state: RateLimiterState) => TSelected): SolidRateLimiter<TFn, TSelected>;
|
|
171
|
-
//#endregion
|
|
172
|
-
export { SolidRateLimiter, SolidRateLimiterOptions, createRateLimiter };
|
|
173
|
-
//# sourceMappingURL=createRateLimiter.d.ts.map
|
|
171
|
+
export declare function createRateLimiter<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidRateLimiterOptions<TFn, TSelected>, selector?: (state: RateLimiterState) => TSelected): SolidRateLimiter<TFn, TSelected>;
|
|
172
|
+
//#endregion
|
|
@@ -46,12 +46,13 @@ import { RateLimiter } from "@tanstack/pacer/rate-limiter";
|
|
|
46
46
|
* tracking by providing a selector function or using the `Subscribe` component. This prevents unnecessary
|
|
47
47
|
* updates and gives you full control over when your component tracks state changes.
|
|
48
48
|
*
|
|
49
|
+
* Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
|
|
50
|
+
*
|
|
49
51
|
* Available state properties:
|
|
52
|
+
* - `executionTimes`: Timestamps of executions tracked for the current window
|
|
53
|
+
* - `isExceeded`: Whether the rate limit has been reached
|
|
50
54
|
* - `executionCount`: Number of function executions that have been completed
|
|
51
55
|
* - `rejectionCount`: Number of function calls that were rejected due to rate limiting
|
|
52
|
-
* - `remainingInWindow`: Number of executions remaining in the current window
|
|
53
|
-
* - `nextWindowTime`: Timestamp when the next window begins
|
|
54
|
-
* - `currentWindowStart`: Timestamp when the current window started
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
57
58
|
* ```tsx
|
|
@@ -153,5 +154,4 @@ function createRateLimiter(fn, options, selector = () => ({})) {
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
//#endregion
|
|
156
|
-
export { createRateLimiter };
|
|
157
|
-
//# sourceMappingURL=createRateLimiter.js.map
|
|
157
|
+
export { createRateLimiter };
|
|
@@ -29,8 +29,6 @@ import { ThrottlerState } from "@tanstack/pacer/throttler";
|
|
|
29
29
|
* the reactive system track the selected state values.
|
|
30
30
|
*
|
|
31
31
|
* Available throttler state properties:
|
|
32
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
33
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
34
32
|
* - `executionCount`: Number of function executions that have been completed
|
|
35
33
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger trailing execution
|
|
36
34
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -64,7 +62,5 @@ import { ThrottlerState } from "@tanstack/pacer/throttler";
|
|
|
64
62
|
* console.log('Next execution:', throttler.state().nextExecutionTime);
|
|
65
63
|
* ```
|
|
66
64
|
*/
|
|
67
|
-
declare function createThrottledSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidThrottlerOptions<Setter<TValue>, TSelected>, selector?: (state: ThrottlerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidThrottler<Setter<TValue>, TSelected>];
|
|
68
|
-
//#endregion
|
|
69
|
-
export { createThrottledSignal };
|
|
70
|
-
//# sourceMappingURL=createThrottledSignal.d.ts.map
|
|
65
|
+
export declare function createThrottledSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidThrottlerOptions<Setter<TValue>, TSelected>, selector?: (state: ThrottlerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidThrottler<Setter<TValue>, TSelected>];
|
|
66
|
+
//#endregion
|
|
@@ -29,8 +29,6 @@ import { createSignal } from "solid-js";
|
|
|
29
29
|
* the reactive system track the selected state values.
|
|
30
30
|
*
|
|
31
31
|
* Available throttler state properties:
|
|
32
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
33
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
34
32
|
* - `executionCount`: Number of function executions that have been completed
|
|
35
33
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger trailing execution
|
|
36
34
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -75,5 +73,4 @@ function createThrottledSignal(value, initialOptions, selector) {
|
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
//#endregion
|
|
78
|
-
export { createThrottledSignal };
|
|
79
|
-
//# sourceMappingURL=createThrottledSignal.js.map
|
|
76
|
+
export { createThrottledSignal };
|
|
@@ -30,8 +30,6 @@ import { ThrottlerState } from "@tanstack/pacer/throttler";
|
|
|
30
30
|
* the reactive system track the selected state values.
|
|
31
31
|
*
|
|
32
32
|
* Available throttler state properties:
|
|
33
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
34
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
35
33
|
* - `executionCount`: Number of function executions that have been completed
|
|
36
34
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger trailing execution
|
|
37
35
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -61,7 +59,5 @@ import { ThrottlerState } from "@tanstack/pacer/throttler";
|
|
|
61
59
|
* throttler.cancel(); // Cancel any pending updates
|
|
62
60
|
* ```
|
|
63
61
|
*/
|
|
64
|
-
declare function createThrottledValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidThrottlerOptions<Setter<TValue>, TSelected>, selector?: (state: ThrottlerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, SolidThrottler<Setter<TValue>, TSelected>];
|
|
65
|
-
//#endregion
|
|
66
|
-
export { createThrottledValue };
|
|
67
|
-
//# sourceMappingURL=createThrottledValue.d.ts.map
|
|
62
|
+
export declare function createThrottledValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidThrottlerOptions<Setter<TValue>, TSelected>, selector?: (state: ThrottlerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, SolidThrottler<Setter<TValue>, TSelected>];
|
|
63
|
+
//#endregion
|
|
@@ -30,8 +30,6 @@ import { createEffect } from "solid-js";
|
|
|
30
30
|
* the reactive system track the selected state values.
|
|
31
31
|
*
|
|
32
32
|
* Available throttler state properties:
|
|
33
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
34
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
35
33
|
* - `executionCount`: Number of function executions that have been completed
|
|
36
34
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger trailing execution
|
|
37
35
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -70,5 +68,4 @@ function createThrottledValue(value, initialOptions, selector) {
|
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
//#endregion
|
|
73
|
-
export { createThrottledValue };
|
|
74
|
-
//# sourceMappingURL=createThrottledValue.js.map
|
|
71
|
+
export { createThrottledValue };
|
|
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
|
|
|
3
3
|
import { Throttler, ThrottlerOptions, ThrottlerState } from "@tanstack/pacer/throttler";
|
|
4
4
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
5
5
|
//#region src/throttler/createThrottler.d.ts
|
|
6
|
-
interface SolidThrottlerOptions<TFn extends AnyFunction, TSelected = {}> extends ThrottlerOptions<TFn> {
|
|
6
|
+
export interface SolidThrottlerOptions<TFn extends AnyFunction, TSelected = {}> extends ThrottlerOptions<TFn> {
|
|
7
7
|
/**
|
|
8
8
|
* Optional callback invoked when the owning component unmounts. Receives the throttler instance.
|
|
9
9
|
* When provided, replaces the default cleanup (cancel); use it to call flush(), reset(), cancel(), add logging, etc.
|
|
10
10
|
*/
|
|
11
11
|
onUnmount?: (throttler: SolidThrottler<TFn, TSelected>) => void;
|
|
12
12
|
}
|
|
13
|
-
interface SolidThrottler<TFn extends AnyFunction, TSelected = {}> extends Omit<Throttler<TFn>, 'store'> {
|
|
13
|
+
export interface SolidThrottler<TFn extends AnyFunction, TSelected = {}> extends Omit<Throttler<TFn>, 'store'> {
|
|
14
14
|
/**
|
|
15
15
|
* A Solid component that allows you to subscribe to the throttler state.
|
|
16
16
|
*
|
|
@@ -74,8 +74,6 @@ interface SolidThrottler<TFn extends AnyFunction, TSelected = {}> extends Omit<T
|
|
|
74
74
|
* updates and gives you full control over when your component tracks state changes.
|
|
75
75
|
*
|
|
76
76
|
* Available state properties:
|
|
77
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
78
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
79
77
|
* - `executionCount`: Number of function executions that have been completed
|
|
80
78
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger execution
|
|
81
79
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -141,7 +139,5 @@ interface SolidThrottler<TFn extends AnyFunction, TSelected = {}> extends Omit<T
|
|
|
141
139
|
* const { isPending, executionCount } = throttler.state();
|
|
142
140
|
* ```
|
|
143
141
|
*/
|
|
144
|
-
declare function createThrottler<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidThrottlerOptions<TFn, TSelected>, selector?: (state: ThrottlerState<TFn>) => TSelected): SolidThrottler<TFn, TSelected>;
|
|
145
|
-
//#endregion
|
|
146
|
-
export { SolidThrottler, SolidThrottlerOptions, createThrottler };
|
|
147
|
-
//# sourceMappingURL=createThrottler.d.ts.map
|
|
142
|
+
export declare function createThrottler<TFn extends AnyFunction, TSelected = {}>(fn: TFn, options: SolidThrottlerOptions<TFn, TSelected>, selector?: (state: ThrottlerState<TFn>) => TSelected): SolidThrottler<TFn, TSelected>;
|
|
143
|
+
//#endregion
|
|
@@ -37,8 +37,6 @@ import { Throttler } from "@tanstack/pacer/throttler";
|
|
|
37
37
|
* updates and gives you full control over when your component tracks state changes.
|
|
38
38
|
*
|
|
39
39
|
* Available state properties:
|
|
40
|
-
* - `canLeadingExecute`: Whether the throttler can execute on the leading edge
|
|
41
|
-
* - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
|
|
42
40
|
* - `executionCount`: Number of function executions that have been completed
|
|
43
41
|
* - `isPending`: Whether the throttler is waiting for the timeout to trigger execution
|
|
44
42
|
* - `lastArgs`: The arguments from the most recent call to maybeExecute
|
|
@@ -128,5 +126,4 @@ function createThrottler(fn, options, selector = () => ({})) {
|
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
//#endregion
|
|
131
|
-
export { createThrottler };
|
|
132
|
-
//# sourceMappingURL=createThrottler.js.map
|
|
129
|
+
export { createThrottler };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-pacer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Utilities for debouncing and throttling functions in Solid.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,82 +23,37 @@
|
|
|
23
23
|
"async"
|
|
24
24
|
],
|
|
25
25
|
"type": "module",
|
|
26
|
-
"
|
|
27
|
-
"module": "./dist/index.js",
|
|
28
|
-
"types": "./dist/index.d.cts",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
29
27
|
"exports": {
|
|
30
|
-
".":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"./async-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"./
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"./
|
|
43
|
-
|
|
44
|
-
"require": "./dist/async-queuer/index.cjs"
|
|
45
|
-
},
|
|
46
|
-
"./async-rate-limiter": {
|
|
47
|
-
"import": "./dist/async-rate-limiter/index.js",
|
|
48
|
-
"require": "./dist/async-rate-limiter/index.cjs"
|
|
49
|
-
},
|
|
50
|
-
"./async-throttler": {
|
|
51
|
-
"import": "./dist/async-throttler/index.js",
|
|
52
|
-
"require": "./dist/async-throttler/index.cjs"
|
|
53
|
-
},
|
|
54
|
-
"./batcher": {
|
|
55
|
-
"import": "./dist/batcher/index.js",
|
|
56
|
-
"require": "./dist/batcher/index.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./debouncer": {
|
|
59
|
-
"import": "./dist/debouncer/index.js",
|
|
60
|
-
"require": "./dist/debouncer/index.cjs"
|
|
61
|
-
},
|
|
62
|
-
"./provider": {
|
|
63
|
-
"import": "./dist/provider/index.js",
|
|
64
|
-
"require": "./dist/provider/index.cjs"
|
|
65
|
-
},
|
|
66
|
-
"./queuer": {
|
|
67
|
-
"import": "./dist/queuer/index.js",
|
|
68
|
-
"require": "./dist/queuer/index.cjs"
|
|
69
|
-
},
|
|
70
|
-
"./rate-limiter": {
|
|
71
|
-
"import": "./dist/rate-limiter/index.js",
|
|
72
|
-
"require": "./dist/rate-limiter/index.cjs"
|
|
73
|
-
},
|
|
74
|
-
"./throttler": {
|
|
75
|
-
"import": "./dist/throttler/index.js",
|
|
76
|
-
"require": "./dist/throttler/index.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./types": {
|
|
79
|
-
"import": "./dist/types/index.js",
|
|
80
|
-
"require": "./dist/types/index.cjs"
|
|
81
|
-
},
|
|
82
|
-
"./utils": {
|
|
83
|
-
"import": "./dist/utils/index.js",
|
|
84
|
-
"require": "./dist/utils/index.cjs"
|
|
85
|
-
},
|
|
28
|
+
".": "./dist/index.js",
|
|
29
|
+
"./async-batcher": "./dist/async-batcher/index.js",
|
|
30
|
+
"./async-debouncer": "./dist/async-debouncer/index.js",
|
|
31
|
+
"./async-queuer": "./dist/async-queuer/index.js",
|
|
32
|
+
"./async-rate-limiter": "./dist/async-rate-limiter/index.js",
|
|
33
|
+
"./async-throttler": "./dist/async-throttler/index.js",
|
|
34
|
+
"./batcher": "./dist/batcher/index.js",
|
|
35
|
+
"./debouncer": "./dist/debouncer/index.js",
|
|
36
|
+
"./provider": "./dist/provider/index.js",
|
|
37
|
+
"./queuer": "./dist/queuer/index.js",
|
|
38
|
+
"./rate-limiter": "./dist/rate-limiter/index.js",
|
|
39
|
+
"./throttler": "./dist/throttler/index.js",
|
|
40
|
+
"./types": "./dist/types/index.js",
|
|
41
|
+
"./utils": "./dist/utils/index.js",
|
|
86
42
|
"./package.json": "./package.json"
|
|
87
43
|
},
|
|
88
44
|
"sideEffects": false,
|
|
89
45
|
"engines": {
|
|
90
|
-
"node": ">=
|
|
46
|
+
"node": ">=20"
|
|
91
47
|
},
|
|
92
48
|
"files": [
|
|
93
|
-
"dist"
|
|
94
|
-
"src"
|
|
49
|
+
"dist"
|
|
95
50
|
],
|
|
96
51
|
"dependencies": {
|
|
97
|
-
"@tanstack/
|
|
98
|
-
"@tanstack/
|
|
52
|
+
"@tanstack/pacer": "0.23.0",
|
|
53
|
+
"@tanstack/solid-store": "^0.11.1"
|
|
99
54
|
},
|
|
100
55
|
"devDependencies": {
|
|
101
|
-
"solid-js": "^1.9.
|
|
56
|
+
"solid-js": "^1.9.15",
|
|
102
57
|
"vite-plugin-solid": "^2.11.14"
|
|
103
58
|
},
|
|
104
59
|
"peerDependencies": {
|
|
@@ -111,6 +66,7 @@
|
|
|
111
66
|
"test:lib": "vitest --passWithNoTests",
|
|
112
67
|
"test:lib:dev": "pnpm test:lib --watch",
|
|
113
68
|
"test:types": "tsc",
|
|
114
|
-
"build": "tsdown"
|
|
69
|
+
"build": "tsdown",
|
|
70
|
+
"test:build": "publint --strict && node ../../scripts/verify-package.ts"
|
|
115
71
|
}
|
|
116
72
|
}
|