@reduxjs/toolkit
Advanced tools
Comparing version 2.2.5 to 2.2.6
@@ -0,5 +1,6 @@ | ||
import { Draft } from 'immer'; | ||
import type { IdSelector, Update, EntityId, DraftableEntityState } from './models'; | ||
export declare function selectIdValue<T, Id extends EntityId>(entity: T, selectId: IdSelector<T, Id>): Id; | ||
export declare function ensureEntitiesArray<T, Id extends EntityId>(entities: readonly T[] | Record<Id, T>): readonly T[]; | ||
export declare function getCurrent<T>(value: T): T; | ||
export declare function getCurrent<T>(value: T | Draft<T>): T; | ||
export declare function splitAddedUpdatedEntities<T, Id extends EntityId>(newEntities: readonly T[] | Record<Id, T>, selectId: IdSelector<T, Id>, state: DraftableEntityState<T, Id>): [T[], Update<T, Id>[], Id[]]; |
@@ -103,3 +103,3 @@ import type { SerializeQueryArgs } from './defaultSerializeQueryArgs'; | ||
* } | ||
* return { error: { status: 500, statusText: 'Internal Server Error', data: "Coin landed on it's edge!" } } | ||
* return { error: { status: 500, statusText: 'Internal Server Error', data: "Coin landed on its edge!" } } | ||
* } | ||
@@ -106,0 +106,0 @@ * // highlight-end |
@@ -7,3 +7,3 @@ export type { CombinedState, QueryCacheKey, QueryKeys, QuerySubState, RootState, SubscriptionOptions, } from './core/apiState'; | ||
export { fetchBaseQuery } from './fetchBaseQuery'; | ||
export type { FetchBaseQueryError, FetchBaseQueryMeta, FetchArgs, } from './fetchBaseQuery'; | ||
export type { FetchBaseQueryArgs, FetchBaseQueryError, FetchBaseQueryMeta, FetchArgs, } from './fetchBaseQuery'; | ||
export { retry } from './retry'; | ||
@@ -10,0 +10,0 @@ export { setupListeners } from './core/setupListeners'; |
@@ -316,3 +316,3 @@ import type { Api, ApiContext, CoreModule, EndpointDefinitions, MutationActionCreatorResult, MutationDefinition, MutationResultSelectorResult, PrefetchOptions, QueryActionCreatorResult, QueryArgFrom, QueryDefinition, QueryKeys, QuerySubState, ResultTypeFrom, SerializeQueryArgs, SkipToken, SubscriptionOptions, TSHelpersId, TSHelpersNoInfer, TSHelpersOverride } from '@reduxjs/toolkit/query'; | ||
/** | ||
* Resets the hook state to it's initial `uninitialized` state. | ||
* Resets the hook state to its initial `uninitialized` state. | ||
* This will also remove the last result from the cache. | ||
@@ -319,0 +319,0 @@ */ |
@@ -133,3 +133,8 @@ var __defProp = Object.defineProperty; | ||
// src/query/react/buildHooks.ts | ||
var useIsomorphicLayoutEffect = typeof window !== "undefined" && !!window.document && !!window.document.createElement ? useLayoutEffect : useEffect3; | ||
var canUseDOM = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); | ||
var isDOM = /* @__PURE__ */ canUseDOM(); | ||
var isRunningInReactNative = () => typeof navigator !== "undefined" && navigator.product === "ReactNative"; | ||
var isReactNative = /* @__PURE__ */ isRunningInReactNative(); | ||
var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? useLayoutEffect : useEffect3; | ||
var useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect(); | ||
var noPendingQueryStateSelector = (selected) => { | ||
@@ -136,0 +141,0 @@ if (selected.isUninitialized) { |
@@ -0,0 +0,0 @@ // inlined from https://github.com/EskiMojo14/uncheckedindexed |
{ | ||
"name": "@reduxjs/toolkit", | ||
"version": "2.2.5", | ||
"version": "2.2.6", | ||
"description": "The official, opinionated, batteries-included toolset for efficient Redux development", | ||
@@ -95,3 +95,3 @@ "author": "Mark Erikson <mark@isquaredsoftware.com>", | ||
"vite-tsconfig-paths": "^4.3.1", | ||
"vitest": "^1.1.3", | ||
"vitest": "^1.6.0", | ||
"yargs": "^15.3.1" | ||
@@ -98,0 +98,0 @@ }, |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ # Redux Toolkit |
@@ -0,0 +0,0 @@ import type { Middleware } from 'redux' |
@@ -0,0 +0,0 @@ import type { UnknownAction, Reducer, StateFromReducersMapObject } from 'redux' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import { isAction } from 'redux' |
@@ -0,0 +0,0 @@ import { current, isDraft } from 'immer' |
@@ -0,0 +0,0 @@ import type { Draft } from 'immer' |
@@ -19,3 +19,3 @@ import type { Action, UnknownAction, Reducer } from 'redux' | ||
import { executeReducerBuilderCallback } from './mapBuilders' | ||
import type { Id, Tail, TypeGuard } from './tsHelpers' | ||
import type { Id, TypeGuard } from './tsHelpers' | ||
import type { InjectConfig } from './combineSlices' | ||
@@ -22,0 +22,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { Action, ActionCreator, StoreEnhancer } from 'redux' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { Action, Middleware, UnknownAction } from 'redux' |
@@ -0,0 +0,0 @@ import type { Middleware } from 'redux' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { EntityAdapter, EntityId, EntityAdapterOptions } from './models' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ export { createEntityAdapter } from './create_adapter' |
@@ -1,2 +0,1 @@ | ||
import { current, isDraft } from 'immer' | ||
import type { | ||
@@ -73,5 +72,3 @@ IdSelector, | ||
const existingKeys = new Set<Id>( | ||
existingIds ?? (current(state.ids) as Id[]), | ||
) | ||
const existingKeys = new Set<Id>(existingIds ?? getCurrent(state.ids)) | ||
@@ -180,3 +177,3 @@ const models = newEntities.filter( | ||
for (let i = 0; i < a.length && i < b.length; i++) { | ||
for (let i = 0; i < a.length; i++) { | ||
if (a[i] === b[i]) { | ||
@@ -197,3 +194,3 @@ continue | ||
const mergeInsertion: MergeFunction = ( | ||
const mergeFunction: MergeFunction = ( | ||
state, | ||
@@ -204,10 +201,10 @@ addedItems, | ||
) => { | ||
const currentEntities = getCurrent(state.entities) as Record<Id, T> | ||
const currentIds = getCurrent(state.ids) as Id[] | ||
const currentEntities = getCurrent(state.entities) | ||
const currentIds = getCurrent(state.ids) | ||
const stateEntities = state.entities as Record<Id, T> | ||
let ids = currentIds | ||
let ids: Iterable<Id> = currentIds | ||
if (replacedIds) { | ||
ids = Array.from(new Set(currentIds)) | ||
ids = new Set(currentIds) | ||
} | ||
@@ -249,4 +246,2 @@ | ||
const mergeFunction: MergeFunction = mergeInsertion | ||
return { | ||
@@ -253,0 +248,0 @@ removeOne, |
@@ -0,0 +0,0 @@ import { produce as createNextState, isDraft } from 'immer' |
@@ -0,0 +0,0 @@ import type { CreateSelectorFunction, Selector, createSelector } from 'reselect' |
@@ -0,0 +0,0 @@ import type { EntityAdapter } from '../index' |
@@ -0,0 +0,0 @@ export interface BookModel { |
@@ -811,2 +811,27 @@ import type { EntityAdapter, EntityState } from '../models' | ||
it('should not throw an Immer `current` error when the adapter is called twice', () => { | ||
const book1: BookModel = { id: 'a', title: 'First' } | ||
const book2: BookModel = { id: 'b', title: 'Second' } | ||
const initialState = adapter.getInitialState() | ||
const booksSlice = createSlice({ | ||
name: 'books', | ||
initialState, | ||
reducers: { | ||
testCurrentBehavior(state, action: PayloadAction<BookModel>) { | ||
// Will overwrite `state.ids` with a plain array | ||
adapter.removeAll(state) | ||
// will call `splitAddedUpdatedEntities` and call `current(state.ids)` | ||
adapter.addOne(state, book1) | ||
adapter.addOne(state, book2) | ||
}, | ||
}, | ||
}) | ||
booksSlice.reducer( | ||
initialState, | ||
booksSlice.actions.testCurrentBehavior(book1), | ||
) | ||
}) | ||
describe('can be used mutably when wrapped in createNextState', () => { | ||
@@ -813,0 +838,0 @@ test('removeAll', () => { |
@@ -0,0 +0,0 @@ import type { EntityAdapter } from '../index' |
@@ -0,0 +0,0 @@ import { createDraftSafeSelectorCreator } from '../../createDraftSafeSelector' |
@@ -0,0 +0,0 @@ import type { EntityAdapter, EntityState } from '../models' |
@@ -0,0 +0,0 @@ import { vi } from 'vitest' |
@@ -148,5 +148,3 @@ import type { Draft } from 'immer' | ||
changes: { | ||
...(updatesPerEntity[update.id] | ||
? updatesPerEntity[update.id].changes | ||
: null), | ||
...updatesPerEntity[update.id]?.changes, | ||
...update.changes, | ||
@@ -153,0 +151,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
import { current, isDraft } from 'immer' | ||
import { Draft, current, isDraft } from 'immer' | ||
import type { | ||
@@ -39,4 +39,4 @@ IdSelector, | ||
export function getCurrent<T>(value: T): T { | ||
return isDraft(value) ? current(value) : value | ||
export function getCurrent<T>(value: T | Draft<T>): T { | ||
return (isDraft(value) ? current(value) : value) as T | ||
} | ||
@@ -51,3 +51,3 @@ | ||
const existingIdsArray = getCurrent(state.ids) as Id[] | ||
const existingIdsArray = getCurrent(state.ids) | ||
const existingIds = new Set<Id>(existingIdsArray) | ||
@@ -54,0 +54,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import type { StoreEnhancer } from 'redux' |
@@ -0,0 +0,0 @@ import type { Middleware, UnknownAction } from 'redux' |
@@ -0,0 +0,0 @@ import type { Middleware } from 'redux' |
@@ -0,0 +0,0 @@ import type { SerializedError } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { Action, Dispatch, MiddlewareAPI, UnknownAction } from 'redux' |
@@ -0,0 +0,0 @@ import { TaskAbortError } from './exceptions' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import type { EnhancedStore } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { createListenerEntry } from '@internal/listenerMiddleware' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { Action } from 'redux' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { AbortSignalWithReason } from './types' |
@@ -0,0 +0,0 @@ import type { Action } from 'redux' |
@@ -0,0 +0,0 @@ // Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { ThunkDispatch } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { SerializedError } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { InternalHandlerBuilder, SubscriptionSelectors } from './types' |
@@ -0,0 +0,0 @@ import { isAsyncThunkAction, isFulfilled } from '../rtkImports' |
@@ -0,0 +0,0 @@ import type { InternalHandlerBuilder } from './types' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import type { QuerySubstateIdentifier, Subscribers } from '../apiState' |
@@ -0,0 +0,0 @@ import { isPending, isRejected, isFulfilled } from '../rtkImports' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import { QueryStatus } from '../apiState' |
@@ -0,0 +0,0 @@ import type { createSelector as _createSelector } from './rtkImports' |
@@ -0,0 +0,0 @@ import type { Action, PayloadAction, UnknownAction } from '@reduxjs/toolkit' |
@@ -522,3 +522,3 @@ import type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs' | ||
if (refetchVal) { | ||
// Return if its true or compare the dates because it must be a number | ||
// Return if it's true or compare the dates because it must be a number | ||
return ( | ||
@@ -525,0 +525,0 @@ refetchVal === true || |
@@ -0,0 +0,0 @@ import { buildCreateApi, CreateApi } from '../createApi' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ // This file exists to consolidate all of the imports from the `@reduxjs/toolkit` package. |
@@ -0,0 +0,0 @@ import type { |
@@ -138,3 +138,3 @@ import type { SerializeQueryArgs } from './defaultSerializeQueryArgs' | ||
* } | ||
* return { error: { status: 500, statusText: 'Internal Server Error', data: "Coin landed on it's edge!" } } | ||
* return { error: { status: 500, statusText: 'Internal Server Error', data: "Coin landed on its edge!" } } | ||
* } | ||
@@ -141,0 +141,0 @@ * // highlight-end |
@@ -0,0 +0,0 @@ import type { BaseQueryFn } from './baseQueryTypes' |
@@ -0,0 +0,0 @@ import { joinUrls } from './utils' |
@@ -0,0 +0,0 @@ export class HandledError { |
@@ -37,2 +37,3 @@ // This must remain here so that the `mangleErrors.cjs` build script | ||
export type { | ||
FetchBaseQueryArgs, | ||
FetchBaseQueryError, | ||
@@ -39,0 +40,0 @@ FetchBaseQueryMeta, |
@@ -56,8 +56,23 @@ import type { | ||
// Copy-pasted from React-Redux | ||
const canUseDOM = () => | ||
!!( | ||
typeof window !== 'undefined' && | ||
typeof window.document !== 'undefined' && | ||
typeof window.document.createElement !== 'undefined' | ||
) | ||
const isDOM = /* @__PURE__ */ canUseDOM() | ||
// Under React Native, we know that we always want to use useLayoutEffect | ||
const isRunningInReactNative = () => | ||
typeof navigator !== 'undefined' && navigator.product === 'ReactNative' | ||
const isReactNative = /* @__PURE__ */ isRunningInReactNative() | ||
const getUseIsomorphicLayoutEffect = () => | ||
isDOM || isReactNative ? useLayoutEffect : useEffect | ||
export const useIsomorphicLayoutEffect = | ||
typeof window !== 'undefined' && | ||
!!window.document && | ||
!!window.document.createElement | ||
? useLayoutEffect | ||
: useEffect | ||
/* @__PURE__ */ getUseIsomorphicLayoutEffect() | ||
@@ -526,3 +541,3 @@ export interface QueryHooks< | ||
/** | ||
* Resets the hook state to it's initial `uninitialized` state. | ||
* Resets the hook state to its initial `uninitialized` state. | ||
* This will also remove the last result from the cache. | ||
@@ -695,3 +710,6 @@ */ | ||
// isLoading = true only when loading while no data is present yet (initial load with no data in the cache) | ||
const isLoading = (!lastResult || lastResult.isLoading || lastResult.isUninitialized) && !hasData && isFetching | ||
const isLoading = | ||
(!lastResult || lastResult.isLoading || lastResult.isUninitialized) && | ||
!hasData && | ||
isFetching | ||
// isSuccess = true when data is present | ||
@@ -698,0 +716,0 @@ const isSuccess = currentState.isSuccess || (isFetching && hasData) |
export const UNINITIALIZED_VALUE = Symbol() | ||
export type UninitializedValue = typeof UNINITIALIZED_VALUE |
@@ -0,0 +0,0 @@ // This must remain here so that the `mangleErrors.cjs` build script |
@@ -0,0 +0,0 @@ import type { UseMutation, UseLazyQuery, UseQuery } from './buildHooks' |
@@ -0,0 +0,0 @@ import { useEffect, useRef, useMemo } from 'react' |
@@ -0,0 +0,0 @@ import { useEffect, useRef } from 'react' |
@@ -0,0 +0,0 @@ import { createApi, fetchBaseQuery, retry } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import { createApi } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' |
@@ -0,0 +0,0 @@ import { createSlice } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import type { FetchBaseQueryMeta } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import { copyWithStructuralSharing } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import { setupApiStore } from '@internal/tests/utils/helpers' |
@@ -0,0 +0,0 @@ import { server } from '@internal/query/tests/mocks/server' |
@@ -0,0 +0,0 @@ import { headersToObject } from 'headers-polyfill' |
@@ -0,0 +0,0 @@ import { setupServer } from 'msw/node' |
@@ -0,0 +0,0 @@ import { createApi, QueryStatus } from '@reduxjs/toolkit/query' |
@@ -0,0 +0,0 @@ import type { RetryOptions } from '@internal/query/retry' |
@@ -0,0 +0,0 @@ import type { SerializedError } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { vi } from 'vitest' |
@@ -0,0 +0,0 @@ export type Id<T> = { [K in keyof T]: T[K] } & {} |
export function capitalize(str: string) { | ||
return str.replace(str[0], str[0].toUpperCase()) | ||
} |
@@ -0,0 +0,0 @@ import { isPlainObject as _iPO } from '../core/rtkImports' |
@@ -0,0 +0,0 @@ // Fast method for counting an object's keys |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export * from './isAbsoluteUrl' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
export function isNotNullish<T>(v: T | null | undefined): v is T { | ||
return v != null | ||
} |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export function isValidUrl(string: string) { |
@@ -0,0 +0,0 @@ import { isAbsoluteUrl } from './isAbsoluteUrl' |
@@ -0,0 +0,0 @@ // This must remain here so that the `mangleErrors.cjs` build script |
@@ -0,0 +0,0 @@ import type { Middleware } from 'redux' |
@@ -0,0 +0,0 @@ import type { ActionCreatorInvariantMiddlewareOptions } from '@internal/actionCreatorInvariantMiddleware' |
@@ -0,0 +0,0 @@ import { configureStore } from '../configureStore' |
@@ -0,0 +0,0 @@ import type { PayloadAction } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { Reducer, Slice, WithSlice } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { WithSlice } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { |
@@ -42,3 +42,7 @@ import * as DevTools from '@internal/devtoolsExtension' | ||
expect(redux.applyMiddleware).toHaveBeenCalled() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledTimes(2) | ||
} | ||
}) | ||
@@ -57,3 +61,7 @@ }) | ||
expect(redux.applyMiddleware).toHaveBeenCalled() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -81,3 +89,7 @@ expect.any(Function), | ||
expect(redux.applyMiddleware).toHaveBeenCalledWith() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -111,3 +123,7 @@ reducer, | ||
) | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -149,3 +165,7 @@ reducer, | ||
expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -205,3 +225,9 @@ reducer, | ||
expect(redux.applyMiddleware).toHaveBeenCalled() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
expect(composeWithDevToolsSpy).toHaveBeenLastCalledWith(options) | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -219,3 +245,7 @@ reducer, | ||
expect(redux.applyMiddleware).toHaveBeenCalled() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -251,3 +281,7 @@ reducer, | ||
expect(redux.applyMiddleware).toHaveBeenCalled() | ||
expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line | ||
if (process.env.TEST_DIST) { | ||
expect(composeWithDevToolsSpy).not.toHaveBeenCalled() | ||
} else { | ||
expect(composeWithDevToolsSpy).toHaveBeenCalledOnce() | ||
} | ||
expect(redux.createStore).toHaveBeenCalledWith( | ||
@@ -254,0 +288,0 @@ reducer, |
@@ -0,0 +0,0 @@ import { createAction, isActionCreator } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { UnknownAction } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { createDraftSafeSelector, createSelector } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { createDraftSafeSelector } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import { vi } from 'vitest' |
@@ -0,0 +0,0 @@ import type { StoreEnhancer } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' |
@@ -0,0 +0,0 @@ import { Tuple } from '@internal/utils' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { SerializedError } from '@internal/createAsyncThunk' |
@@ -0,0 +0,0 @@ import type { UnknownAction } from 'redux' |
@@ -0,0 +0,0 @@ import { vi } from 'vitest' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import { Tuple } from '@reduxjs/toolkit' |
@@ -0,0 +0,0 @@ import type { Assertion, AsymmetricMatchersContaining } from 'vitest' |
@@ -0,0 +0,0 @@ import type { Middleware, StoreEnhancer } from 'redux' |
@@ -0,0 +0,0 @@ // inlined from https://github.com/EskiMojo14/uncheckedindexed |
import { produce as createNextState, isDraftable } from 'immer' | ||
import type { Middleware, StoreEnhancer } from 'redux' | ||
@@ -4,0 +3,0 @@ export function getTimeMeasureUtils(maxDelay: number, fnName: string) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64145
5475500