From eee558c0f8f2e1f46c2bc95b504eaf8bbaeac0d5 Mon Sep 17 00:00:00 2001 From: Alphonso Tran Date: Mon, 27 Mar 2023 17:57:09 +0200 Subject: [PATCH 001/368] remove unused import value from doc --- docs/api/createAsyncThunk.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/createAsyncThunk.mdx b/docs/api/createAsyncThunk.mdx index d0a641df99..5d12c84c68 100644 --- a/docs/api/createAsyncThunk.mdx +++ b/docs/api/createAsyncThunk.mdx @@ -521,7 +521,7 @@ If a thunk was cancelled, the result of the promise will be a `rejected` action So if you wanted to test that a thunk was cancelled before executing, you can do the following: ```ts no-transpile -import { createAsyncThunk, isRejected } from '@reduxjs/toolkit' +import { createAsyncThunk } from '@reduxjs/toolkit' test('this thunk should always be skipped', async () => { const thunk = createAsyncThunk( From fe418ee2dc800d8c8c9363a88be604acc6467d7c Mon Sep 17 00:00:00 2001 From: shrijan Date: Sat, 8 Jul 2023 18:20:21 -0400 Subject: [PATCH 002/368] fix/kitchen-sink-isAuthenticated: fixed isAuthenticated state change on login fullfilled --- examples/query/react/kitchen-sink/src/features/auth/authSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/query/react/kitchen-sink/src/features/auth/authSlice.ts b/examples/query/react/kitchen-sink/src/features/auth/authSlice.ts index 392d8bcd94..07596a6f20 100644 --- a/examples/query/react/kitchen-sink/src/features/auth/authSlice.ts +++ b/examples/query/react/kitchen-sink/src/features/auth/authSlice.ts @@ -24,6 +24,7 @@ const slice = createSlice({ console.log('fulfilled', action) state.user = action.payload.user state.token = action.payload.token + state.isAuthenticated = true }) .addMatcher(postsApi.endpoints.login.matchRejected, (state, action) => { console.log('rejected', action) From 7d1d7a58df4acdd1fdf7fe9fd0222b0249c752d4 Mon Sep 17 00:00:00 2001 From: suspiciousRaccoon Date: Sat, 22 Jul 2023 11:38:44 -0300 Subject: [PATCH 003/368] Fix store path --- docs/tutorials/rtk-query.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/rtk-query.mdx b/docs/tutorials/rtk-query.mdx index ea91b0d8ef..8f2c97962e 100644 --- a/docs/tutorials/rtk-query.mdx +++ b/docs/tutorials/rtk-query.mdx @@ -141,7 +141,7 @@ export default function App() { return
...
} -// file: app/store.ts noEmit +// file: store.ts noEmit import { configureStore } from '@reduxjs/toolkit' export const store = configureStore({ @@ -154,7 +154,7 @@ import { render } from 'react-dom' import { Provider } from 'react-redux' import App from './App' -import { store } from './app/store' +import { store } from './store' const rootElement = document.getElementById('root') render( From 7b688055ceb332a68df060c54ca8cc39f6b65625 Mon Sep 17 00:00:00 2001 From: bever1337 Date: Tue, 17 Oct 2023 17:17:07 -0400 Subject: [PATCH 004/368] Listener awaits with all --- packages/toolkit/src/listenerMiddleware/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/listenerMiddleware/index.ts b/packages/toolkit/src/listenerMiddleware/index.ts index f502fa99bc..df8191ff4d 100644 --- a/packages/toolkit/src/listenerMiddleware/index.ts +++ b/packages/toolkit/src/listenerMiddleware/index.ts @@ -30,6 +30,7 @@ import { addAbortSignalListener, assertFunction, catchRejection, + noop, } from './utils' import { listenerCancelled, @@ -113,7 +114,7 @@ const createFork = ( ) if (opts?.autoJoin) { - parentBlockingPromises.push(result) + parentBlockingPromises.push(result.catch(noop)) } return { @@ -439,7 +440,7 @@ export function createListenerMiddleware< }) } } finally { - await Promise.allSettled(autoJoinPromises) + await Promise.all(autoJoinPromises) abortControllerWithReason(internalTaskController, listenerCompleted) // Notify that the task has completed entry.pending.delete(internalTaskController) From aa3c1d33f96f539865b3fcc725d1e913427abea5 Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Wed, 6 Dec 2023 14:12:38 +0100 Subject: [PATCH 005/368] Copy "Migrating to Modern Redux" and "RTK is Redux" docs from core site --- docs/components/DetailedExplanation.jsx | 15 + docs/introduction/why-rtk-is-redux-today.md | 248 ++++ docs/usage/migrating-to-modern-redux.mdx | 1166 +++++++++++++++++++ website/sidebars.json | 7 +- 4 files changed, 1434 insertions(+), 2 deletions(-) create mode 100644 docs/components/DetailedExplanation.jsx create mode 100644 docs/introduction/why-rtk-is-redux-today.md create mode 100644 docs/usage/migrating-to-modern-redux.mdx diff --git a/docs/components/DetailedExplanation.jsx b/docs/components/DetailedExplanation.jsx new file mode 100644 index 0000000000..b3701555ee --- /dev/null +++ b/docs/components/DetailedExplanation.jsx @@ -0,0 +1,15 @@ +import React from 'react' + +export const DetailedExplanation = ({ + children, + title = 'Detailed Explanation' +}) => { + return ( +
+ +

{title}

+
+ {children} +
+ ) +} diff --git a/docs/introduction/why-rtk-is-redux-today.md b/docs/introduction/why-rtk-is-redux-today.md new file mode 100644 index 0000000000..8f4e918032 --- /dev/null +++ b/docs/introduction/why-rtk-is-redux-today.md @@ -0,0 +1,248 @@ +--- +id: why-rtk-is-redux-today +title: Why Redux Toolkit is How To Use Redux Today +# Yes, we are serious with the title. It's okay as it is. Please don't open more Pull Requests to change it. +description: 'Introduction > Why RTK is Redux Today: details on how RTK replaces the Redux core' +--- + +## What is Redux Toolkit? + +[**Redux Toolkit**](https://redux-toolkit.js.org) (also known as **"RTK"** for short) is our official recommended approach for writing Redux logic. The `@reduxjs/toolkit` package wraps around the core `redux` package, and contains API methods and common dependencies that we think are essential for building a Redux app. Redux Toolkit builds in our suggested best practices, simplifies most Redux tasks, prevents common mistakes, and makes it easier to write Redux applications. + +**If you are writing _any_ Redux logic today, you _should_ be using Redux Toolkit to write that code!** + +RTK includes utilities that help simplify many common use cases, including [store setup](https://redux-toolkit.js.org/api/configureStore), +[creating reducers and writing immutable update logic](https://redux-toolkit.js.org/api/createreducer), +and even [creating entire "slices" of state at once](https://redux-toolkit.js.org/api/createslice). + +Whether you're a brand new Redux user setting up your first project, or an experienced user who wants to +simplify an existing application, **[Redux Toolkit](https://redux-toolkit.js.org/)** can help you +make your Redux code better. + +:::tip + +See these pages to learn how to use "modern Redux" with Redux Toolkit: + +- [**The "Redux Essentials" tutorial**](https://redux.js.org/tutorials/essentials/part-1-overview-concepts), which teaches "how to use Redux, the right way" with Redux Toolkit for real-world apps, +- [**Redux Fundamentals, Part 8: Modern Redux with Redux Toolkit**](https://redux.js.org/tutorials/fundamentals/part-8-modern-redux), which shows how to convert the low-level examples from earlier sections of the tutorial into modern Redux Toolkit equivalents +- [**Using Redux: Migrating to Modern Redux**](../usage/migrating-to-modern-redux.mdx), which covers how to migrate different kinds of legacy Redux logic into modern Redux equivalents + +::: + +## How Redux Toolkit Is Different Than the Redux Core + +### What Is "Redux"? + +The first thing to ask is, "what is Redux?" + +Redux is really: + +- A single store containing "global" state +- Dispatching plain object actions to the store when something happens in the app +- Pure reducer functions looking at those actions and returning immutably updated state + +While it's not required, [your Redux code also normally includes](https://redux.js.org/tutorials/fundamentals/part-7-standard-patterns): + +- Action creators that generate those action objects +- Middleware to enable side effects +- Thunk functions that contain sync or async logic with side effects +- Normalized state to enable looking up items by ID +- Memoized selector functions with the Reselect library for optimizing derived data +- The Redux DevTools Extension to view your action history and state changes +- TypeScript types for actions, state, and other functions + +Additionally, Redux is normally used with the React-Redux library to let your React components talk to a Redux store. + +### What Does the Redux Core Do? + +The Redux core is a very small and deliberately unopinionated library. It provides a few small API primitives: + +- `createStore` to actually create a Redux store +- `combineReducers` to combine multiple slice reducers into a single larger reducer +- `applyMiddleware` to combine multiple middleware into a store enhancer +- `compose` to combine multiple store enhancers into a single store enhancer + +Other than that, all the other Redux-related logic in your app has to be written entirely by you. + +The good news is that this means Redux _can_ be used in many different ways. The bad news is that there are no helpers to make any of your code easier to write. + +For example, a reducer function is _just_ a function. Prior to Redux Toolkit, you'd typically write that reducer with a `switch` statement and manual updates. You'd also probably have hand-written action creators and action type constants along with it: + +```js title="Legacy hand-written Redux usage" +const ADD_TODO = 'ADD_TODO' +const TODO_TOGGLED = 'TODO_TOGGLED' + +export const addTodo = (text) => ({ + type: ADD_TODO, + payload: { text, id: nanoid() }, +}) + +export const todoToggled = (id) => ({ + type: TODO_TOGGLED, + payload: { id }, +}) + +export const todosReducer = (state = [], action) => { + switch (action.type) { + case ADD_TODO: + return state.concat({ + id: action.payload.id, + text: action.payload.text, + completed: false, + }) + case TODO_TOGGLED: + return state.map((todo) => { + if (todo.id !== action.payload.id) return todo + + return { + ...todo, + completed: !todo.completed, + } + }) + default: + return state + } +} +``` + +None of this code specifically depends on any API from the `redux` core library. But, this is a lot of code to write. Immutable updates required a lot of hand-written object spreads and array operations, and it was very easy to make mistakes and accidentally mutate state in the process (always the #1 cause of Redux bugs!). It was also common, though not strictly required, to spread the code for one feature across multiple files like `actions/todos.js`, `constants/todos.js`, and `reducers/todos.js`. + +Additionally, store setup usually required a series of steps to add commonly used middleware like thunks and enable Redux DevTools Extension support, even though these are standard tools used in almost every Redux app. + +### What Does Redux Toolkit Do? + +While these _were_ the patterns originally shown in the Redux docs, they unfortunately require a lot of very verbose and repetitive code. Most of this boilerplate isn't _necessary_ to use Redux. On top of that, the boilerplate-y code lead to more opportunities to make mistakes. + +**We specifically created Redux Toolkit to eliminate the "boilerplate" from hand-written Redux logic, prevent common mistakes, and provide APIs that simplify standard Redux tasks**. + +Redux Toolkit starts with two key APIs that simplify the most common things you do in every Redux app: + +- `configureStore` sets up a well-configured Redux store with a single function call, including combining reducers, adding the thunk middleware, and setting up the Redux DevTools integration. It also is easier to configure than `createStore`, because it takes named options parameters. +- `createSlice` lets you write reducers that use [the Immer library](https://immerjs.github.io/immer/) to enable writing immutable updates using "mutating" JS syntax like `state.value = 123`, with no spreads needed. It also automatically generates action creator functions for each reducer, and generates action type strings internally based on your reducer's names. Finally, it works great with TypeScript. + +That means that the code _you_ write can be drastically simpler. For example, that same todos reducer could just be: + +```js title="features/todos/todosSlice.js" +import { createSlice } from '@reduxjs/toolkit' + +const todosSlice = createSlice({ + name: 'todos', + initialState: [], + reducers: { + todoAdded(state, action) { + state.push({ + id: action.payload.id, + text: action.payload.text, + completed: false, + }) + }, + todoToggled(state, action) { + const todo = state.find((todo) => todo.id === action.payload) + todo.completed = !todo.completed + }, + }, +}) + +export const { todoAdded, todoToggled } = todosSlice.actions +export default todosSlice.reducer +``` + +All of the action creators and action types are generated automatically, and the reducer code is shorter and easier to understand. It's also much more clear what's actually being updated in each case. + +With `configureStore`, the store setup can be simplified down to: + +```js title="app/store.js" +import { configureStore } from '@reduxjs/toolkit' +import todosReducer from '../features/todos/todosSlice' +import filtersReducer from '../features/filters/filtersSlice' + +export const store = configureStore({ + reducer: { + todos: todosReducer, + filters: filtersReducer, + }, +}) +``` + +Note that **this one `configureStore` call automatically does all the usual setup work you'd have done manually**: + +- The slice reducers were automatically passed to `combineReducers()` +- The `redux-thunk` middleware was automatically added +- Dev-mode middleware was added to catch accidental mutations +- The Redux DevTools Extension was automatically set up +- The middleware and DevTools enhancers were composed together and added to the store + +At the same time, **`configureStore` provides the options to let users modify any of those default behaviors** (like turning off thunks and adding sagas, or disabling the DevTools in production), + +From there, Redux Toolkit includes other APIs for common Redux tasks: + +- `createAsyncThunk`: abstracts the standard "dispatch actions before/after an async request" pattern +- `createEntityAdapter`: prebuilt reducers and selectors for CRUD operations on normalized state +- `createSelector`: a re-export of the standard Reselect API for memoized selectors +- `createListenerMiddleware`: a side effects middleware for running logic in response to dispatched actions + +Finally, the RTK package also includes "RTK Query", a full data fetching and caching solution for Redux apps, as a separate optional `@reduxjs/toolkit/query` entry point. It lets you define endpoints (REST, GraphQL, or any async function), and generates a reducer and middleware that fully manage fetching data, updating loading state, and caching results. It also automatically generates React hooks that can be used in components to fetch data, like `const { data, isFetching} = useGetPokemonQuery('pikachu')` + +Each of these APIs is completely optional and designed for specific use cases, and **you can pick and choose which APIs you actually use in your app**. But, all of them are highly recommended to help with those tasks. + +Note that **Redux Toolkit is still "Redux"!** There's still a single store, with dispatched action objects for updates, and reducers that immutably update state, plus the ability to write thunks for async logic, manage normalized state, type your code with TypeScript, and use the DevTools. **There's just way less code _you_ have to write for the same results!** + +## Why We Want You To Use Redux Toolkit + +As Redux maintainers, our opinion is: + +:::tip + +**We want _all_ Redux users to write their Redux code with Redux Toolkit, because it simplifies your code _and_ eliminates many common Redux mistakes and bugs!** + +::: + +The "boilerplate" and complexity of the early Redux patterns was never a _necessary_ part of Redux. Those patterns only existed because: + +- The original "Flux Architecture" used some of those same approaches +- The early Redux docs showed things like action type constants to enable separating code into different files by type +- JavaScript is a mutable language by default, and writing immutable updates required manual object spreads and array updates +- Redux was originally built in just a few weeks and intentionally designed to be just a few API primitives + +Additionally, the Redux community has adopted some specific approaches that add additional boilerplate: + +- Emphasizing use of the `redux-saga` middleware as a common approach for writing side effects +- Insisting on hand-writing TS types for Redux action objects and creating union types to limit what actions can be dispatched at the type level + +Over the years, we've seen how people actually used Redux in practice. We've seen how the community wrote hundreds of add-on libraries for tasks like generating action types and creators, async logic and side effects, and data fetching. We've also seen the problems that have consistently caused pain for our users, like accidentally mutating state, writing dozens of lines of code just to make one simple state update, and having trouble tracing how a codebase fits together. We've helped thousands of users who were trying to learn and use Redux and struggling to understand how all the pieces fit together, and were confused by the number of concepts and amount of extra code they had to write. We _know_ what problems our users are facing. + +**We specifically designed Redux Toolkit to solve those problems!** + +- Redux Toolkit simplifies store setup down to a single clear function call, while retaining the ability to fully configure the store's options if you need to +- Redux Toolkit eliminates accidental mutations, which have always been the #1 cause of Redux bugs +- Redux Toolkit eliminates the need to write any action creators or action types by hand +- Redux Toolkit eliminates the need to write manual and error-prone immutable update logic +- Redux Toolkit makes it easy to write a Redux feature's code in one file, instead of spreading it across multiple separate files +- Redux Toolkit offers excellent TS support, with APIs that are designed to give you excellent type safety and minimize the number of types you have to define in your code +- RTK Query can eliminate the need to write _any_ thunks, reducers, action creators, or effect hooks to manage fetching data and tracking loading state + +Because of this: + +:::tip + +**We specifically recommend that our users _should_ use Redux Toolkit (the `@reduxjs/toolkit` package), and should _not_ use the legacy `redux` core package for any new Redux code today!** + +::: + +Even for existing applications, we recommend at least switching out `createStore` for `configureStore` as the dev-mode middleware will also help you catch accidental mutation and serializability errors in existing code bases. We also want to encourage you to switch the reducers you are using most (and any ones you write in the future) over to `createSlice` - the code will be shorter and easier to understand, and the safety improvements will save you time and effort going forward. + +**The `redux` core package still works, but today we consider it to be obsolete**. All of its APIs are also re-exported from `@reduxjs/toolkit`, and `configureStore` does everything `createStore` does but with better default behavior and configurability. + +It _is_ useful to understand the lower-level concepts, so that you have a better understanding of what Redux Toolkit is doing for you. That's why [the "Redux Fundamentals" tutorial shows how Redux works, with no abstractions](https://redux.js.org/tutorials/fundamentals/part-1-overview). _But_, it shows those examples solely as a learning tool, and finishes by showing you how Redux Toolkit simplifies the older hand-written Redux code. + +If you are using the `redux` core package by itself, your code will continue to work. **But, we strongly encourage you to switch over to `@reduxjs/toolkit`, and update your code to use the Redux Toolkit APIs instead!** + +## Further Information + +See these docs pages and blog posts for more details + +- [Redux Essentials: Redux Toolkit App Structure](https://redux.js.org/tutorials/essentials/part-2-app-structure) +- [Redux Fundamentals: Modern Redux with Redux Toolkit](https://redux.js.org/tutorials/fundamentals/part-8-modern-redux) +- [Redux Style Guide: Best Practices and Recommendations](https://redux.js.org/style-guide/) +- [Presentation: Modern Redux with Redux Toolkit](https://blog.isquaredsoftware.com/2022/06/presentations-modern-redux-rtk/) +- [Mark Erikson: Redux Toolkit 1.0 Announcement and development history](https://blog.isquaredsoftware.com/2019/10/redux-toolkit-1.0/) diff --git a/docs/usage/migrating-to-modern-redux.mdx b/docs/usage/migrating-to-modern-redux.mdx new file mode 100644 index 0000000000..57c4758b31 --- /dev/null +++ b/docs/usage/migrating-to-modern-redux.mdx @@ -0,0 +1,1166 @@ +--- +id: migrating-to-modern-redux +title: Migrating to Modern Redux +description: 'Usage > Setup > Migrating to Modern Redux: how to modernize legacy Redux code' +--- + +import { DetailedExplanation } from '../components/DetailedExplanation' + +:::tip What You'll Learn + +- How to modernize legacy "hand-written" Redux logic to use Redux Toolkit +- How to modernize legacy React-Redux `connect` components to use the hooks API +- How to modernize Redux logic and React-Redux components that use TypeScript + +::: + +## Overview + +Redux has been around since 2015, and our recommended patterns for writing Redux code have changed significantly over the years. In the same way that React has evolved from `createClass` to `React.Component` to function components with hooks, Redux has evolved from manual store setup + hand-written reducers with object spreads + React-Redux's `connect`, to Redux Toolkit's `configureStore` + `createSlice` + React-Redux's hooks API. + +Many users are working on older Redux codebases that have been around since before these "modern Redux" patterns existed. Migrating those codebases to today's recommended modern Redux patterns will result in codebases that are much smaller and easier to maintain. + +The good news is that **you can migrate your code to modern Redux incrementally, piece by piece, with old and new Redux code coexisting and working together!** + +This page covers the general approaches and techniques you can use to modernize an existing legacy Redux codebase. + +:::info + +For more details on how "modern Redux" with Redux Toolkit + React-Redux hooks simplifies using Redux, see these additional resources: + +- [Why Redux Toolkit is How to use Redux Today](../introduction/why-rtk-is-redux-today.md) +- [Redux Essentials: Redux Toolkit App Structure](https://redux.js.org/tutorials/essentials/part-2-app-structure) +- [Redux Fundamentals: Modern Redux with Redux Toolkit](https://redux.js.org/tutorials/fundamentals/part-8-modern-redux) +- [Presentation: Modern Redux with Redux Toolkit](https://blog.isquaredsoftware.com/2022/06/presentations-modern-redux-rtk/) + +::: + +## Modernizing Redux Logic with Redux Toolkit + +The general approach to migrating Redux logic is: + +- Replace the existing manual Redux store setup with Redux Toolkit's `configureStore` +- Pick an existing slice reducer and its associated actions. Replace those with RTK's `createSlice`. Repeat for one reducer at a time. +- As needed, replace existing data fetching logic with RTK Query or `createAsyncThunk` +- Use RTK's other APIs like `createListenerMiddleware` or `createEntityAdapter` as needed + +**You should always start by replacing the legacy `createStore` call with `configureStore`**. This is a one-time step, and all of the existing reducers and middleware will continue to work as-is. `configureStore` includes development-mode checks for common mistakes like accidental mutations and non-serializable values, so having those in place will help identify any areas of the codebase where those mistakes are happening. + +:::info + +You can see this general approach in action in [**Redux Fundamentals, Part 8: Modern Redux with Redux Toolkit**](https://redux.js.org/tutorials/fundamentals/part-8-modern-redux). + +::: + +### Store Setup with `configureStore` + +A typical legacy Redux store setup file does several different steps: + +- Combining the slice reducers into the root reducer +- Creating the middleware enhancer, usually with the thunk middleware, and possibly other middleware in development mode such as `redux-logger` +- Adding the Redux DevTools enhancer, and composing the enhancers together +- Calling `createStore` + +Here's what those steps might look like in an existing application: + +```js title="src/app/store.js" +import { createStore, applyMiddleware, combineReducers, compose } from 'redux' +import thunk from 'redux-thunk' + +import postsReducer from '../reducers/postsReducer' +import usersReducer from '../reducers/usersReducer' + +const rootReducer = combineReducers({ + posts: postsReducer, + users: usersReducer, +}) + +const middlewareEnhancer = applyMiddleware(thunk) + +const composeWithDevTools = + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose + +const composedEnhancers = composeWithDevTools(middlewareEnhancer) + +const store = createStore(rootReducer, composedEnhancers) +``` + +**_All_ of those steps can be replaced with a single call to Redux Toolkit's `configureStore` API**. + +RTK's `configureStore` wraps around the original `createStore` method, and handles most of the store setup for us automatically. In fact, we can cut it down to effectively one step: + +```js title="Basic Store Setup: src/app/store.js" +import { configureStore } from '@reduxjs/toolkit' + +import postsReducer from '../reducers/postsReducer' +import usersReducer from '../reducers/usersReducer' + +// highlight-start +// Automatically adds the thunk middleware and the Redux DevTools extension +const store = configureStore({ + // Automatically calls `combineReducers` + reducer: { + posts: postsReducer, + users: usersReducer, + }, +}) +// highlight-end +``` + +That one call to `configureStore` did all the work for us: + +- It called `combineReducers` to combine `postsReducer` and `usersReducer` into the root reducer function, which will handle a root state that looks like `{posts, users}` +- It called `createStore` to create a Redux store using that root reducer +- It automatically added the thunk middleware and called `applyMiddleware` +- It automatically added more middleware to check for common mistakes like accidentally mutating the state +- It automatically set up the Redux DevTools Extension connection + +If your store setup requires additional steps, such as adding additional middleware, passing in an `extra` argument to the thunk middleware, or creating a persisted root reducer, you can do that as well. Here's a larger example that shows customizing the built-in middleware and turning on Redux-Persist, which demonstrates some of the options for working with `configureStore`: + + + +This example shows several possible common tasks when setting up a Redux store: + +- Combining the reducers separately (sometimes needed due to other architectural constraints) +- Adding additional middleware, both conditionally and unconditionally +- Passing an "extra argument" into the thunk middleware, such as an API service layer +- Using the Redux-Persist library, which requires special handling for its non-serializable action types +- Turning the devtools off in prod, and setting additional devtools options in development + +None of these are _required_, but they do show up frequently in real-world codebases. + +```js title="Custom Store Setup: src/app/store.js" +import { configureStore, combineReducers } from '@reduxjs/toolkit' +import { + persistStore, + persistReducer, + FLUSH, + REHYDRATE, + PAUSE, + PERSIST, + PURGE, + REGISTER, +} from 'redux-persist' +import storage from 'redux-persist/lib/storage' +import { PersistGate } from 'redux-persist/integration/react' +import logger from 'redux-logger' + +import postsReducer from '../features/posts/postsSlice' +import usersReducer from '../features/users/usersSlice' +import { api } from '../features/api/apiSlice' +import { serviceLayer } from '../features/api/serviceLayer' + +import stateSanitizerForDevtools from './devtools' +import customMiddleware from './someCustomMiddleware' + +// Can call `combineReducers` yourself if needed +const rootReducer = combineReducers({ + posts: postsReducer, + users: usersReducer, + [api.reducerPath]: api.reducer, +}) + +const persistConfig = { + key: 'root', + version: 1, + storage, +} + +const persistedReducer = persistReducer(persistConfig, rootReducer) + +const store = configureStore({ + // Can create a root reducer separately and pass that in + reducer: rootReducer, + middleware: (getDefaultMiddleware) => { + const middleware = getDefaultMiddleware({ + // Pass in a custom `extra` argument to the thunk middleware + thunk: { + extraArgument: { serviceLayer }, + }, + // Customize the built-in serializability dev check + serializableCheck: { + ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], + }, + }).concat(customMiddleware, api.middleware) + + // Conditionally add another middleware in dev + if (process.env.NODE_ENV !== 'production') { + middleware.push(logger) + } + + return middleware + }, + // Turn off devtools in prod, or pass options in dev + devTools: + process.env.NODE_ENV === 'production' + ? false + : { + stateSanitizer: stateSanitizerForDevtools, + }, +}) +``` + + + +### Reducers and Actions with `createSlice` + +A typical legacy Redux codebase has its reducer logic, action creators, and action types spread across separate files, and those files are often in separate folders by type. The reducer logic is written using `switch` statements and hand-written immutable update logic with object spreads and array mapping: + +```js title="src/constants/todos.js" +export const ADD_TODO = 'ADD_TODO' +export const TOGGLE_TODO = 'TOGGLE_TODO' +``` + +```js title="src/actions/todos.js" +import { ADD_TODO, TOGGLE_TODO } from '../constants/todos' + +export const addTodo = (id, text) => ({ + type: ADD_TODO, + text, + id, +}) + +export const toggleTodo = (id) => ({ + type: TOGGLE_TODO, + id, +}) +``` + +```js title="src/reducers/todos.js" +import { ADD_TODO, TOGGLE_TODO } from '../constants/todos' + +const initialState = [] + +export default function todosReducer(state = initialState, action) { + switch (action.type) { + case ADD_TODO: { + return state.concat({ + id: action.id, + text: action.text, + completed: false, + }) + } + case TOGGLE_TODO: { + return state.map((todo) => { + if (todo.id !== action.id) { + return todo + } + + return { + ...todo, + completed: !todo.completed, + } + }) + } + default: + return state + } +} +``` + +**Redux Toolkit's `createSlice` API was designed to eliminate all the "boilerplate" with writing reducers, actions, and immutable updates!** + +With Redux Toolkit, there's multiple changes to that legacy code: + +- `createSlice` will eliminate the hand-written action creators and action types entirely +- All of the uniquely-named fields like `action.text` and `action.id` get replaced by `action.payload`, either as an individual value or an object containing those fields +- The hand-written immutable updates are replaced by "mutating" logic in reducers thanks to Immer +- There's no need for separate files for each type of code +- We teach having _all_ logic for a given reducer in a single "slice" file +- Instead of having separate folders by "type of code", we recommend organizing files by "features", with related code living in the same folder +- Ideally, the naming of the reducers and actions should use the past tense and describe "a thing that happened", rather than an imperative "do this thing now", such as `todoAdded` instead of `ADD_TODO` + +Those separate files for constants, actions, and reducers, would all be replaced by a single "slice" file. The modernized slice file would look like this: + +```js title="src/features/todos/todosSlice.js" +import { createSlice } from '@reduxjs/toolkit' + +const initialState = [] + +const todosSlice = createSlice({ + name: 'todos', + initialState, + reducers: { + // highlight-start + // Give case reducers meaningful past-tense "event"-style names + todoAdded(state, action) { + const { id, text } = action.payload + // "Mutating" update syntax thanks to Immer, and no `return` needed + state.todos.push({ + id, + text, + completed: false, + }) + }, + // highlight-end + todoToggled(state, action) { + // Look for the specific nested object to update. + // In this case, `action.payload` is the default field in the action, + // and can hold the `id` value - no need for `action.id` separately + const matchingTodo = state.todos.find( + (todo) => todo.id === action.payload + ) + + if (matchingTodo) { + // Can directly "mutate" the nested object + matchingTodo.completed = !matchingTodo.completed + } + }, + }, +}) + +// highlight-start +// `createSlice` automatically generated action creators with these names. +// export them as named exports from this "slice" file +export const { todoAdded, todoToggled } = todosSlice.actions +//highlight-end + +// Export the slice reducer as the default export +export default todosSlice.reducer +``` + +When you call `dispatch(todoAdded('Buy milk'))`, whatever single value you pass to the `todoAdded` action creator will automatically get used as the `action.payload` field. If you need to pass in multiple values, do so as an object, like `dispatch(todoAdded({id, text}))`. Alternately, you can use [the "prepare" notation inside of a `createSlice` reducer](https://redux.js.org/tutorials/essentials/part-4-using-data#preparing-action-payloads) to accept multiple separate arguments and create the `payload` field. The `prepare` notation is also useful for cases where the action creators were doing additional work, such as generating unique IDs for each item. + +While Redux Toolkit does not specifically care about your folder and file structures or action naming, [these are the best practices we recommend](https://redux.js.org/style-guide/) because we've found they lead to more maintainable and understandable code. + +### Data Fetching with RTK Query + +Typical legacy data fetching in a React+Redux app requires many moving pieces and types of code: + +- Action creators and action types that represent "request starting", "request succeeded", and "request failed" actions +- Thunks to dispatch the actions and make the async request +- Reducers that track loading status and store the cached data +- Selectors to read those values from the store +- Dispatching the thunk in a component after mounting, either via `componentDidMount` in a class component or `useEffect` in a function component + +These typically would be split across many different files: + +```js title="src/constants/todos.js" +export const FETCH_TODOS_STARTED = 'FETCH_TODOS_STARTED' +export const FETCH_TODOS_SUCCEEDED = 'FETCH_TODOS_SUCCEEDED' +export const FETCH_TODOS_FAILED = 'FETCH_TODOS_FAILED' +``` + +```js title="src/actions/todos.js" +import axios from 'axios' +import { + FETCH_TODOS_STARTED, + FETCH_TODOS_SUCCEEDED, + FETCH_TODOS_FAILED, +} from '../constants/todos' + +export const fetchTodosStarted = () => ({ + type: FETCH_TODOS_STARTED, +}) + +export const fetchTodosSucceeded = (todos) => ({ + type: FETCH_TODOS_SUCCEEDED, + todos, +}) + +export const fetchTodosFailed = (error) => ({ + type: FETCH_TODOS_FAILED, + error, +}) + +export const fetchTodos = () => { + return async (dispatch) => { + dispatch(fetchTodosStarted()) + + try { + // Axios is common, but also `fetch`, or your own "API service" layer + const res = await axios.get('/todos') + dispatch(fetchTodosSucceeded(res.data)) + } catch (err) { + dispatch(fetchTodosFailed(err)) + } + } +} +``` + +```js title="src/reducers/todos.js" +import { + FETCH_TODOS_STARTED, + FETCH_TODOS_SUCCEEDED, + FETCH_TODOS_FAILED, +} from '../constants/todos' + +const initialState = { + status: 'uninitialized', + todos: [], + error: null, +} + +export default function todosReducer(state = initialState, action) { + switch (action.type) { + case FETCH_TODOS_STARTED: { + return { + ...state, + status: 'loading', + } + } + case FETCH_TODOS_SUCCEEDED: { + return { + ...state, + status: 'succeeded', + todos: action.todos, + } + } + case FETCH_TODOS_FAILED: { + return { + ...state, + status: 'failed', + todos: [], + error: action.error, + } + } + default: + return state + } +} +``` + +```js title="src/selectors/todos.js" +export const selectTodosStatus = (state) => state.todos.status +export const selectTodos = (state) => state.todos.todos +``` + +```js title="src/components/TodosList.js" +import { useEffect } from 'react' +import { useSelector, useDispatch } from 'react-redux' +import { fetchTodos } from '../actions/todos' +import { selectTodosStatus, selectTodos } from '../selectors/todos' + +export function TodosList() { + const dispatch = useDispatch() + const status = useSelector(selectTodosStatus) + const todos = useSelector(selectTodos) + + useEffect(() => { + dispatch(fetchTodos()) + }, [dispatch]) + + // omit rendering logic here +} +``` + +Many users may be using the `redux-saga` library to manage data fetching, in which case they might have _additional_ "signal" action types used to trigger the sagas, and this saga file instead of thunks: + +```js title="src/sagas/todos.js" +import { put, takeEvery, call } from 'redux-saga/effects' +import { + FETCH_TODOS_BEGIN, + fetchTodosStarted, + fetchTodosSucceeded, + fetchTodosFailed, +} from '../actions/todos' + +// Saga to actually fetch data +export function* fetchTodos() { + yield put(fetchTodosStarted()) + + try { + const res = yield call(axios.get, '/todos') + yield put(fetchTodosSucceeded(res.data)) + } catch (err) { + yield put(fetchTodosFailed(err)) + } +} + +// "Watcher" saga that waits for a "signal" action, which is +// dispatched only to kick off logic, not to update state +export function* fetchTodosSaga() { + yield takeEvery(FETCH_TODOS_BEGIN, fetchTodos) +} +``` + +**_All_ of that code can be replaced with [Redux Toolkit's "RTK Query" data fetching and caching layer](https://redux-toolkit.js.org/rtk-query/overview)!** + +RTK Query replaces the need to write _any_ actions, thunks, reducers, selectors, or effects to manage data fetching. (In fact, it actually _uses_ all those same tools internally.) Additionally, RTK Query takes care of tracking loading state, deduplicating requests, and managing cache data lifecycles (including removing expired data that is no longer needed). + +To migrate, [set up a single RTK Query "API slice" definition and add the generated reducer + middleware to your store](https://redux.js.org/tutorials/essentials/part-7-rtk-query-basics): + +```js title="src/features/api/apiSlice.js" +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' + +export const api = createApi({ + baseQuery: fetchBaseQuery({ + // Fill in your own server starting URL here + baseUrl: '/', + }), + endpoints: (build) => ({}), +}) +``` + +```js title="src/app/store.js" +import { configureStore } from '@reduxjs/toolkit' + +// Import the API object +// highlight-next-line +import { api } from '../features/api/apiSlice' +// Import any other slice reducers as usual here +import usersReducer from '../features/users/usersSlice' + +export const store = configureStore({ + reducer: { + // Add the generated RTK Query "API slice" caching reducer + // highlight-next-line + [api.reducerPath]: api.reducer, + // Add any other reducers + users: usersReducer, + }, + // Add the RTK Query API middleware + // highlight-start + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().concat(api.middleware), + // highlight-end +}) +``` + +Then, add "endpoints" that represents the specific data you want to fetch and cache, and export the auto-generated React hooks for each endpoint: + +```js title="src/features/api/apiSlice.js" +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' + +export const api = createApi({ + baseQuery: fetchBaseQuery({ + // Fill in your own server starting URL here + baseUrl: '/', + }), + endpoints: (build) => ({ + // highlight-start + // A query endpoint with no arguments + getTodos: build.query({ + query: () => '/todos', + }), + // A query endpoint with an argument + userById: build.query({ + query: (userId) => `/users/${userId}`, + }), + // highlight-end + // A mutation endpoint + updateTodo: build.mutation({ + query: (updatedTodo) => ({ + url: `/todos/${updatedTodo.id}`, + method: 'POST', + body: updatedTodo, + }), + }), + }), +}) + +// highlight-next-line +export const { useGetTodosQuery, useUserByIdQuery, useUpdateTodoMutation } = api +``` + +Finally, use the hooks in your components: + +```js title="src/features/todos/TodoList.js" +// highlight-next-line +import { useGetTodosQuery } from '../api/apiSlice' + +export function TodoList() { + // highlight-next-line + const { data: todos, isFetching, isSuccess } = useGetTodosQuery() + + // omit rendering logic here +} +``` + +### Data Fetching with `createAsyncThunk` + +**We _specifically_ recommend using RTK Query for data fetching.** However, some users have told us they aren't ready to make that step yet. In that case, you can at least cut down on some of the boilerplate of hand-written thunks and reducers using RTK's `createAsyncThunk`. It automatically generates the action creators and action types for you, calls the async function you provide to make the request, and dispatches those actions based on the promise lifecycle. The same example with `createAsyncThunk` might look like this: + +```js title="src/features/todos/todosSlice" +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit' +import axios from 'axios' + +const initialState = { + status: 'uninitialized', + todos: [], + error: null, +} + +const fetchTodos = createAsyncThunk('todos/fetchTodos', async () => { + // Just make the async request here, and return the response. + // This will automatically dispatch a `pending` action first, + // and then `fulfilled` or `rejected` actions based on the promise. + // as needed based on the + const res = await axios.get('/todos') + return res.data +}) + +export const todosSlice = createSlice({ + name: 'todos', + initialState, + reducers: { + // any additional "normal" case reducers here. + // these will generate new action creators + }, + extraReducers: (builder) => { + // Use `extraReducers` to handle actions that were generated + // _outside_ of the slice, such as thunks or in other slices + builder + .addCase(fetchTodos.pending, (state, action) => { + state.status = 'loading' + }) + // Pass the generated action creators to `.addCase()` + .addCase(fetchTodos.fulfilled, (state, action) => { + // Same "mutating" update syntax thanks to Immer + state.status = 'succeeded' + state.todos = action.payload + }) + .addCase(fetchTodos.rejected, (state, action) => { + state.status = 'failed' + state.todos = [] + state.error = action.error + }) + }, +}) + +export default todosSlice.reducer +``` + +You'd also still need to write any selectors, and dispatch the `fetchTodos` thunk yourself in a `useEffect` hook. + +### Reactive Logic with `createListenerMiddleware` + +Many Redux apps have "reactive"-style logic that listens for specific actions or state changes, and runs additional logic in response. These behaviors are often implemented using the `redux-saga` or `redux-observable` libraries. + +These libraries are used for a wide variety of tasks. As a basic example, a saga and an epic that listen for an action, wait one second, and then dispatch an additional action might look like this: + +```js title="src/sagas/ping.js" +import { delay, put, takeEvery } from 'redux-saga/effects' + +export function* ping() { + yield delay(1000) + yield put({ type: 'PONG' }) +} + +// "Watcher" saga that waits for a "signal" action, which is +// dispatched only to kick off logic, not to update state +export function* pingSaga() { + yield takeEvery('PING', ping) +} +``` + +```js title="src/epics/ping.js" +import { filter, mapTo } from 'rxjs/operators' +import { ofType } from 'redux-observable' + +const pingEpic = (action$) => + action$.pipe(ofType('PING'), delay(1000), mapTo({ type: 'PONG' })) +``` + +```js title="src/app/store.js" +import { createStore, applyMiddleware } from 'redux' +import createSagaMiddleware from 'redux-saga' +import { combineEpics, createEpicMiddleware } from 'redux-observable'; + +// skip reducers + +import { pingEpic } from '../sagas/ping' +import { pingSaga } from '../epics/ping + +function* rootSaga() { + yield pingSaga() +} + +const rootEpic = combineEpics( + pingEpic +); + +const sagaMiddleware = createSagaMiddleware() +const epicMiddleware = createEpicMiddleware() + +const middlewareEnhancer = applyMiddleware(sagaMiddleware, epicMiddleware) + +const store = createStore(rootReducer, middlewareEnhancer) + +sagaMiddleware.run(rootSaga) +epicMiddleware.run(rootEpic) +``` + +**The RTK "listener" middleware is designed to replace sagas and observables, with a simpler API, smaller bundle size, and better TS support.** + +The saga and epic examples could be replaced with the listener middleware, like this: + +```js title="src/app/listenerMiddleware.js" +import { createListenerMiddleware } from '@reduxjs/toolkit' + +// Best to define this in a separate file, to avoid importing +// from the store file into the rest of the codebase +export const listenerMiddleware = createListenerMiddleware() + +export const { startListening, stopListening } = listenerMiddleware +``` + +```js title="src/features/ping/pingSlice.js" +import { createSlice } from '@reduxjs/toolkit' +import { startListening } from '../../app/listenerMiddleware' + +const pingSlice = createSlice({ + name: 'ping', + initialState, + reducers: { + pong(state, action) { + // state update here + }, + }, +}) + +export const { pong } = pingSlice.actions +export default pingSlice.reducer + +// highlight-start +// The `startListening()` call could go in different files, +// depending on your preferred app setup. Here, we just add +// it directly in a slice file. +startListening({ + // Match this exact action type based on the action creator + actionCreator: pong, + // Run this effect callback whenever that action is dispatched + effect: async (action, listenerApi) => { + // Listener effect functions get a `listenerApi` object + // with many useful methods built in, including `delay`: + await listenerApi.delay(1000) + listenerApi.dispatch(pong()) + }, +}) +// highlight-end +``` + +```js title="src/app/store.js" +import { configureStore } from '@reduxjs/toolkit' + +import { listenerMiddleware } from './listenerMiddleware' + +// omit reducers + +export const store = configureStore({ + reducer: rootReducer, + // Add the listener middleware _before_ the thunk or dev checks + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().prepend(listenerMiddleware.middleware), +}) +``` + +### Migrating TypeScript for Redux Logic + +Legacy Redux code that uses TypeScript typically follows _very_ verbose patterns for defining types. In particular, many users in the community have decided to manually define TS types for each individual action, and then created "action type unions" that try to limit what specific actions can actually be passed to `dispatch`. + +**We specifically and strongly recommend _against_ these patterns!** + +```ts no-transpile title="src/actions/todos.ts" +import { ADD_TODO, TOGGLE_TODO } from '../constants/todos' + +// ❌ Common pattern: manually defining types for each action object +interface AddTodoAction { + type: typeof ADD_TODO + text: string + id: string +} + +interface ToggleTodoAction { + type: typeof TOGGLE_TODO + id: string +} + +// ❌ Common pattern: an "action type union" of all possible actions +export type TodoActions = AddTodoAction | ToggleTodoAction + +export const addTodo = (id: string, text: string): AddTodoAction => ({ + type: ADD_TODO, + text, + id, +}) + +export const toggleTodo = (id: string): ToggleTodoAction => ({ + type: TOGGLE_TODO, + id, +}) +``` + +```ts no-transpile title="src/reducers/todos.ts" +import { ADD_TODO, TOGGLE_TODO, TodoActions } from '../constants/todos' + +interface Todo { + id: string + text: string + completed: boolean +} + +export type TodosState = Todo[] + +const initialState: TodosState = [] + +export default function todosReducer( + state = initialState, + action: TodoActions +) { + switch (action.type) { + // omit reducer logic + default: + return state + } +} +``` + +```ts no-transpile title="src/app/store.ts" +import { createStore, Dispatch } from 'redux' + +import { TodoActions } from '../actions/todos' +import { CounterActions } from '../actions/counter' +import { TodosState } from '../reducers/todos' +import { CounterState } from '../reducers/counter' + +// omit reducer setup + +export const store = createStore(rootReducer) + +// ❌ Common pattern: an "action type union" of all possible actions +export type RootAction = TodoActions | CounterActions +// ❌ Common pattern: manually defining the root state type with each field +export interface RootState { + todos: TodosState + counter: CounterState +} + +// ❌ Common pattern: limiting what can be dispatched at the types level +export type AppDispatch = Dispatch +``` + +**Redux Toolkit is designed to drastically simplify TS usage, and our recommendations include _inferring_ types as much as possible!** + +Per [our standard TypeScript setup and usage guidelines](../tutorials/typescript.md), start with setting up the store file to infer `AppDispatch` and `RootState` types directly from the store itself. That will correctly include any modifications to `dispatch` that were added by middleware, such as the ability to dispatch thunks, and update the `RootState` type any time you modify a slice's state definition or add more slices. + +```ts no-transpile title="app/store.ts" +import { configureStore } from '@reduxjs/toolkit' +// omit any other imports + +const store = configureStore({ + reducer: { + todos: todosReducer, + counter: counterReducer, + }, +}) + +// highlight-start +// Infer the `RootState` and `AppDispatch` types from the store itself + +// Inferred state type: {todos: TodosState, counter: CounterState} +export type RootState = ReturnType + +// Inferred dispatch type: Dispatch & ThunkDispatch +export type AppDispatch = typeof store.dispatch +// highlight-end +``` + +Each slice file should declare and export a type for its own slice state. Then, use the `PayloadAction` type to declare the type of any `action` argument inside of `createSlice.reducers`. The generated action creators will then _also_ have the correct type for the argument they accept, and the type of `action.payload` that they return. + +```ts no-transpile title="src/features/todos/todosSlice.ts" +import { createSlice, PayloadAction } from '@reduxjs/toolkit' + +interface Todo { + id: string + text: string + completed: boolean +} + +// highlight-start +// Declare and export a type for the slice's state +export type TodosState = Todo[] + +const initialState: TodosState = [] +// highlight-end + +const todosSlice = createSlice({ + name: 'todos', + // The `state` argument type will be inferred for all case reducers + // from the type of `initialState` + initialState, + reducers: { + // highlight-start + // Use `PayloadAction` for each `action` argument + todoAdded(state, action: PayloadAction<{ id: string; text: string }>) { + // omit logic + }, + todoToggled(state, action: PayloadAction) { + // omit logic + }, + // highlight-end + }, +}) +``` + +## Modernizing React Components with React-Redux + +The general approach to migrating React-Redux usage in components is: + +- Migrate an existing React class component to be a function component +- Replace the `connect` wrapper with uses of the `useSelector` and `useDispatch` hooks _inside_ the component + +You can do this on an individual per-component basis. Components with `connect` and with hooks can coexist at the same time. + +This page won't cover the process of migrating class components to function components, but will focus on the changes specific to React-Redux. + +### Migrating `connect` to Hooks + +A typical legacy component using React-Redux's `connect` API might look like this: + +```js title="src/features/todos/TodoListItem.js" +import { connect } from 'react-redux' +import { bindActionCreators } from 'redux' +import { + todoToggled, + todoDeleted, + selectTodoById, + selectActiveTodoId, +} from './todosSlice' + +// A `mapState` function, possibly using values from `ownProps`, +// and returning an object with multiple separate fields inside +const mapStateToProps = (state, ownProps) => { + return { + todo: selectTodoById(state, ownProps.todoId), + activeTodoId: selectActiveTodoId(state), + } +} + +// Several possible variations on how you might see `mapDispatch` written: + +// 1) a separate function, manual wrapping of `dispatch` +const mapDispatchToProps = (dispatch) => { + return { + todoDeleted: (id) => dispatch(todoDeleted(id)), + todoToggled: (id) => dispatch(todoToggled(id)), + } +} + +// 2) A separate function, wrapping with `bindActionCreators` +const mapDispatchToProps2 = (dispatch) => { + return bindActionCreators( + { + todoDeleted, + todoToggled, + }, + dispatch + ) +} + +// 3) An object full of action creators +const mapDispatchToProps3 = { + todoDeleted, + todoToggled, +} + +// The component, which gets all these fields as props +function TodoListItem({ todo, activeTodoId, todoDeleted, todoToggled }) { + // rendering logic here +} + +// Finished with the call to `connect` +export default connect(mapStateToProps, mapDispatchToProps)(TodoListItem) +``` + +**With the React-Redux hooks API, the `connect` call and `mapState/mapDispatch` arguments are replaced by hooks!** + +- Each individual field returned in `mapState` becomes a separate `useSelector` call +- Each function passed in via `mapDispatch` becomes a separate callback function defined inside the component + +```js title="src/features/todos/TodoListItem.js" +import { useState } from 'react' +import { useSelector, useDispatch } from 'react-redux' +import { + todoAdded, + todoToggled, + selectTodoById, + selectActiveTodoId, +} from './todosSlice' + +export function TodoListItem({ todoId }) { + // highlight-start + // Get the actual `dispatch` function with `useDispatch` + const dispatch = useDispatch() + + // Select values from the state with `useSelector` + const activeTodoId = useSelector(selectActiveTodoId) + // Use prop in scope to select a specific value + const todo = useSelector((state) => selectTodoById(state, todoId)) + // highlight-end + + // Create callback functions that dispatch as needed, with arguments + const handleToggleClick = () => { + dispatch(todoToggled(todoId)) + } + + const handleDeleteClick = () => { + dispatch(todoDeleted(todoId)) + } + + // omit rendering logic +} +``` + +One thing that's different is that `connect` optimized rendering performance by preventing the wrapped component from rendering unless its incoming `stateProps+dispatchProps+ownProps` had changed. The hooks cannot do that, since they're _inside_ the component. If you need to prevent [React's normal recursive rendering behavior](https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/#standard-render-behavior), wrap the component in `React.memo(MyComponent)` yourself. + +### Migrating TypeScript for Components + +One of the major downsides with `connect` is that it is _very_ hard to type correctly, and the type declarations end up being extremely verbose. This is due to it being a Higher-Order Component, and also the amount of flexibility in its API (four arguments, all optional, each with multiple possible overloads and variations). + +The community came up with multiple variations on how to handle this, with varying levels of complexity. On the low end, some usages required typing `state` in `mapState()`, and then calculating the types of all the props for the component: + +```ts no-transpile title="Simple connect TS example" +import { connect } from 'react-redux' +import { RootState } from '../../app/store' +import { + todoToggled, + todoDeleted, + selectTodoById, + selectActiveTodoId, +} from './todosSlice' + +interface TodoListItemOwnProps { + todoId: string +} + +const mapStateToProps = (state: RootState, ownProps) => { + return { + todo: selectTodoById(state, ownProps.todoId), + activeTodoId: selectActiveTodoId(state), + } +} + +const mapDispatchToProps = { + todoDeleted, + todoToggled, +} + +type TodoListItemProps = TodoListItemOwnProps & + ReturnType & + typeof mapDispatchToProps + +function TodoListItem({ + todo, + activeTodoId, + todoDeleted, + todoToggled, +}: TodoListItemProps) {} + +export default connect(mapStateToProps, mapDispatchToProps)(TodoListItem) +``` + +The use of `typeof mapDispatch` as an object in particular was dangerous, because it would fail if thunks were included. + +Other community-created patterns required significantly more overhead, including declaring `mapDispatch` as a function and calling `bindActionCreators` in order to pass through a `dispatch: Dispatch` type, or manually calculating the types of _all_ the props received by the wrapped component and passing those as generics to `connect`. + +One slightly-better alternative was the `ConnectedProps` type that was added to `@types/react-redux` in v7.x, which enabled inferring the type of _all_ the props that would be passed to the component from `connect`. This did require splitting up the call to `connect` into two parts for the inference to work right: + +```ts no-transpile title="ConnectedProps TS example" +import { connect, ConnectedProps } from 'react-redux' +import { RootState } from '../../app/store' +import { + todoToggled, + todoDeleted, + selectTodoById, + selectActiveTodoId, +} from './todosSlice' + +interface TodoListItemOwnProps { + todoId: string +} + +const mapStateToProps = (state: RootState, ownProps) => { + return { + todo: selectTodoById(state, ownProps.todoId), + activeTodoId: selectActiveTodoId(state), + } +} + +const mapDispatchToProps = { + todoDeleted, + todoToggled, +} + +// Call the first part of `connect` to get the function that accepts the component. +// This knows the types of the props returned by `mapState/mapDispatch` +const connector = connect(mapStateToProps, mapDispatchToProps) +// The `ConnectedProps util type can extract "the type of all props from Redux" +type PropsFromRedux = ConnectedProps + +// The final component props are "the props from Redux" + "props from the parent" +type TodoListItemProps = PropsFromRedux & TodoListItemOwnProps + +// That type can then be used in the component +function TodoListItem({ + todo, + activeTodoId, + todoDeleted, + todoToggled, +}: TodoListItemProps) {} + +// And the final wrapped component is generated and exported +export default connector(TodoListItem) +``` + +**The React-Redux hooks API is _much_ simpler to use with TypeScript!** Instead of dealing with layers of component wrapping, type inference, and generics, the hooks are simple functions that take arguments and return a result. All that you need to pass around are the types for `RootState` and `AppDispatch`. + +Per [our standard TypeScript setup and usage guidelines](../tutorials/typescript.md), we specifically teach setting up "pre-typed" aliases for the hooks, so that those have the correct types baked in, and only use those pre-typed hooks in the app. + +First, set up the hooks: + +```ts no-transpile title="src/app/hooks.ts" +import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' +import type { RootState, AppDispatch } from './store' + +// highlight-start +// Use throughout your app instead of plain `useDispatch` and `useSelector` +export const useAppDispatch: () => AppDispatch = useDispatch +export const useAppSelector: TypedUseSelectorHook = useSelector +// highlight-end +``` + +Then, use them in your components: + +```ts no-transpile title="src/features/todos/TodoListItem.tsx" +import { useAppSelector, useAppDispatch } from '../../app/hooks' +import { + todoToggled, + todoDeleted, + selectTodoById, + selectActiveTodoId, +} from './todosSlice' + +interface TodoListItemProps { + todoId: string +} + +function TodoListItem({ todoId }: TodoListItemProps) { + // highlight-start + // Use the pre-typed hooks in the component + const dispatch = useAppDispatch() + const activeTodoId = useAppSelector(selectActiveTodoId) + const todo = useAppSelector((state) => selectTodoById(state, todoId)) + // highlight-end + + // omit event handlers and rendering logic +} +``` + +## Further Information + +See these docs pages and blog posts for more details: + +- **Tutorials** + - [Redux Essentials: Redux Toolkit App Structure](https://redux.js.org/tutorials/essentials/part-2-app-structure) + - [Redux Fundamentals: Modern Redux with Redux Toolkit](https://redux.js.org/tutorials/fundamentals/part-8-modern-redux) + - [Redux TypeScript Quick Start](../tutorials/typescript.md) +- **Additional Documentation** + - [Why Redux Toolkit is How to use Redux Today](../introduction/why-rtk-is-redux-today.md) + - [Redux Style Guide: Best Practices and Recommendations](https://redux.js.org/style-guide/) + - [Redux core: Usage with TypeScript](https://redux.js.org/usage/usage-with-typescript) + - [Redux Toolkit: Usage with TypeScript](./usage-with-typescript.md) +- **Articles** + - [Presentation: Modern Redux with Redux Toolkit](https://blog.isquaredsoftware.com/2022/06/presentations-modern-redux-rtk/) + - [Mark Erikson: Redux Toolkit 1.0 Announcement and development history](https://blog.isquaredsoftware.com/2019/10/redux-toolkit-1.0/) + - [Lenz Weber: Do Not Create Action Type Unions](https://phryneas.de/redux-typescript-no-discriminating-union) diff --git a/website/sidebars.json b/website/sidebars.json index 81f2b18305..b3f2c944f8 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -4,7 +4,10 @@ "type": "category", "label": "Introduction", "collapsed": false, - "items": ["introduction/getting-started"] + "items": [ + "introduction/getting-started", + "introduction/why-rtk-is-redux-today" + ] }, { @@ -26,7 +29,7 @@ { "type": "category", "label": "Migrations", - "items": ["usage/migrating-rtk-2"] + "items": ["usage/migrating-to-modern-redux", "usage/migrating-rtk-2"] }, "usage/usage-guide", "usage/usage-with-typescript", From 7d8115b534ef5476251beab4131ef1596251adfc Mon Sep 17 00:00:00 2001 From: Fonger <5862369+Fonger@users.noreply.github.com> Date: Wed, 6 Dec 2023 03:29:20 +0800 Subject: [PATCH 006/368] Remove abort event listner for AbortController --- packages/toolkit/src/createAsyncThunk.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/createAsyncThunk.ts b/packages/toolkit/src/createAsyncThunk.ts index f75653bda9..842e17cc87 100644 --- a/packages/toolkit/src/createAsyncThunk.ts +++ b/packages/toolkit/src/createAsyncThunk.ts @@ -577,6 +577,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { : nanoid() const abortController = new AbortController() + let abortHandler: (() => void) | undefined let abortReason: string | undefined function abort(reason?: string) { @@ -600,14 +601,14 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { } } - const abortedPromise = new Promise((_, reject) => - abortController.signal.addEventListener('abort', () => + const abortedPromise = new Promise((_, reject) => { + abortHandler = () => { reject({ name: 'AbortError', message: abortReason || 'Aborted', }) - ) - ) + } + }) dispatch( pending( requestId, @@ -653,6 +654,10 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err as any, requestId, arg) + } finally { + if (abortHandler) { + abortController.signal.removeEventListener('abort', abortHandler) + } } // We dispatch the result action _after_ the catch, to avoid having any errors // here get swallowed by the try/catch block, From 2e6833f7b165462beb156ed7959a981413e8a85a Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 8 Dec 2023 11:16:34 +0000 Subject: [PATCH 007/368] tweak RTKQ without hooks section, and add note regarding memoization --- .../usage/usage-without-react-hooks.mdx | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/rtk-query/usage/usage-without-react-hooks.mdx b/docs/rtk-query/usage/usage-without-react-hooks.mdx index 70b642c36c..15c5fc27dd 100644 --- a/docs/rtk-query/usage/usage-without-react-hooks.mdx +++ b/docs/rtk-query/usage/usage-without-react-hooks.mdx @@ -24,23 +24,25 @@ With React hooks, this behavior is instead handled within [`useQuery`](../api/cr ```ts title="Subscribing to cached data" no-transpile // interact with the cache in the same way as you would with a useFetch...() hook -const {data, refetch, isLoading, isSuccess, /*...*/} = dispatch(api.endpoints.getPosts.initiate()) +const { data, refetch, isLoading, isSuccess /*...*/ } = await dispatch( + api.endpoints.getPosts.initiate() +) ``` ## Removing a subscription Removing a cache subscription is necessary for RTK Query to identify that cached data is no longer required. This allows RTK Query to clean up and remove old cache data. -The result of dispatching the [`initiate`](../api/created-api/endpoints.mdx#initiate) thunk action creator of a query endpoint is an object with an `unsubscribe` property. This property is a function that when called, will remove the corresponding cache subscription. +The result of dispatching the [`initiate`](../api/created-api/endpoints.mdx#initiate) thunk action creator of a query endpoint is a Promise with an `unsubscribe` property. This property is a function that when called, will remove the corresponding cache subscription. With React hooks, this behavior is instead handled within [`useQuery`](../api/created-api/hooks.mdx#usequery), [`useQuerySubscription`](../api/created-api/hooks.mdx#usequerysubscription), [`useLazyQuery`](../api/created-api/hooks.mdx#uselazyquery), and [`useLazyQuerySubscription`](../api/created-api/hooks.mdx#uselazyquerysubscription). ```ts title="Unsubscribing from cached data" no-transpile // Adding a cache subscription -const result = dispatch(api.endpoints.getPosts.initiate()) +const promise = dispatch(api.endpoints.getPosts.initiate()) // Removing the corresponding cache subscription -result.unsubscribe() +promise.unsubscribe() ``` ## Accessing cached data & request status @@ -49,7 +51,7 @@ Accessing cache data and request status information can be performed using the ` :::caution -The `endpoint.select()` function creates a _new_ selector instance - it isn't the actual selector function itself! +The `endpoint.select(arg)` function creates a _new_ selector instance - it isn't the actual selector function itself! ::: @@ -62,6 +64,23 @@ const { data, status, error } = result Note that unlike the auto-generated query hooks, derived booleans such as `isLoading`, `isFetching`, `isSuccess` are not available here. The raw `status` enum is provided instead. +### Memoization + +Because the `endpoint.select(arg)` function returns a new selector each time it's called, and because this instance itself is memoized, it can be desirable to memoize the creation of a selector (for example, to then use that memoized instance in another selector). This can be done with `createSelector`: + +```ts title="Creating a memoized selector creator" no-transpile +const createGetPostSelector = createSelector( + (id: string) => id, + (id) => api.endpoints.getPost.select(id) +) + +const selectGetPostError = createSelector( + (state: RootState) => state, + (state: RootState, id: string) => createGetPostSelector(id), + (state, selectGetPost) => selectGetPost(state).error +) +``` + ## Performing mutations [Mutations](./mutations.mdx) are used in order to update data on the server. Mutations can be performed by dispatching the result of the [`initiate`](../api/created-api/endpoints.mdx#initiate) thunk action creator attached to a mutation endpoint. From c3ce98d2e28aa1a40a53aaafde3142fe18e5207c Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 8 Dec 2023 11:20:08 +0000 Subject: [PATCH 008/368] refetch is on the promise not the result --- docs/rtk-query/usage/usage-without-react-hooks.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rtk-query/usage/usage-without-react-hooks.mdx b/docs/rtk-query/usage/usage-without-react-hooks.mdx index 15c5fc27dd..4b7964561c 100644 --- a/docs/rtk-query/usage/usage-without-react-hooks.mdx +++ b/docs/rtk-query/usage/usage-without-react-hooks.mdx @@ -23,10 +23,10 @@ Cache subscriptions are used to tell RTK Query that it needs to fetch data for a With React hooks, this behavior is instead handled within [`useQuery`](../api/created-api/hooks.mdx#usequery), [`useQuerySubscription`](../api/created-api/hooks.mdx#usequerysubscription), [`useLazyQuery`](../api/created-api/hooks.mdx#uselazyquery), and [`useLazyQuerySubscription`](../api/created-api/hooks.mdx#uselazyquerysubscription). ```ts title="Subscribing to cached data" no-transpile +const promise = dispatch(api.endpoints.getPosts.initiate()) +const { refetch } = promise // interact with the cache in the same way as you would with a useFetch...() hook -const { data, refetch, isLoading, isSuccess /*...*/ } = await dispatch( - api.endpoints.getPosts.initiate() -) +const { data, isLoading, isSuccess /*...*/ } = await promise ``` ## Removing a subscription From 61c54b299cbf18cbaf7cf6331bf9b454d6465de8 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 8 Dec 2023 12:09:55 +0000 Subject: [PATCH 009/368] tweak note about status flags --- docs/rtk-query/usage/usage-without-react-hooks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rtk-query/usage/usage-without-react-hooks.mdx b/docs/rtk-query/usage/usage-without-react-hooks.mdx index 4b7964561c..319e4a0f95 100644 --- a/docs/rtk-query/usage/usage-without-react-hooks.mdx +++ b/docs/rtk-query/usage/usage-without-react-hooks.mdx @@ -59,10 +59,10 @@ With React hooks, this behaviour is instead handled within [`useQuery`](../api/c ```ts title="Accessing cached data & request status" no-transpile const result = api.endpoints.getPosts.select()(state) -const { data, status, error } = result +const { data, isSuccess, isError, error } = result ``` -Note that unlike the auto-generated query hooks, derived booleans such as `isLoading`, `isFetching`, `isSuccess` are not available here. The raw `status` enum is provided instead. +Note that unlike with the auto-generated hooks, there is no `isFetching` flag, and the `isLoading` flag will be true if the status is pending, regardless of if there is already data. ### Memoization From 04df604d45f75378ba5dce9e0705718e9d171399 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 9 Dec 2023 23:31:06 +0000 Subject: [PATCH 010/368] Add section regarding overriding deps --- docs/usage/migrating-rtk-2.md | 52 ++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/usage/migrating-rtk-2.md b/docs/usage/migrating-rtk-2.md index 5b492d7bc1..626b70d27f 100644 --- a/docs/usage/migrating-rtk-2.md +++ b/docs/usage/migrating-rtk-2.md @@ -134,7 +134,7 @@ We've changed `next` to be `(action: unknown) => unknown` (which is accurate, we In order to safely interact with values or access fields inside of the `action` argument, you must first do a type guard check to narrow the type, such as `isAction(action)` or `someActionCreator.match(action)`. -This new type is incompatible with the v4 `Middleware` type, so if a package's middleware is saying it's incompatible, check which version of Redux it's getting its types from! +This new type is incompatible with the v4 `Middleware` type, so if a package's middleware is saying it's incompatible, check which version of Redux it's getting its types from! (See [overriding dependencies](#overriding-dependencies) later in this page.) #### `PreloadedState` type removed in favour of `Reducer` generic @@ -723,6 +723,56 @@ We now have a docs page that covers [how to set up Redux properly with Next.js]( (At this time, the Next.js `with-redux` example is still showing outdated patterns - we're going to file a PR shortly to update that to match our docs guide.) +## Overriding dependencies + +It will take a while for packages to update their peer dependencies to allow for Redux core 5.0, and in the meantime changes like the [Middleware type](#middleware-type-changed---middleware-action-and-next-are-typed-as-unknown) will result in perceived incompatibilities. + +It's likely that most libraries will not actually have any practices that are incompatible with 5.0, but due to the peer dependency on 4.0 they end up pulling in old type declarations. + +This can be solved by manually overriding the dependency resolution, which is supported by both `npm` and `yarn`. + +### `npm` - `overrides` + +NPM supports this through an [`overrides`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides) field in your `package.json`. You can override the dependency for a specific package, or make sure that every package that pulls in Redux receives the same version. + +```json title="Individual override - redux-persist" +{ + "overrides": { + "redux-persist": { + "redux": "^5.0.0" + } + } +} +``` + +```json title="Blanket override" +{ + "overrides": { + "redux": "^5.0.0" + } +} +``` + +### `yarn` - `resolutions` + +Yarn supports this through a [`resolutions`](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/) field in your `package.json`. Just like with NPM, you can override the dependency for a specific package, or make sure that every package that pulls in Redux receives the same version. + +```json title="Individual override - redux-persist" +{ + "resolutions": { + "redux-persist/redux": "^5.0.0" + } +} +``` + +```json title="Blanket override" +{ + "resolutions": { + "redux": "^5.0.0" + } +} +``` + ## Recommendations Based on changes in 2.0 and previous versions, there have been some shifts in thinking that are good to know about, if non-essential. From f502b0f2fb2a31565579da810a412abb59ed5496 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 16:41:50 -0600 Subject: [PATCH 011/368] Add 'react-native' to examples in `tests.yml` --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9407755fc2..d93ad371ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -149,7 +149,7 @@ jobs: fail-fast: false matrix: node: ['18.x'] - example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm'] + example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm', 'react-native'] defaults: run: working-directory: ./examples/publish-ci/${{ matrix.example }} From 2f268368c6c46f3970fe128da9f4ea9917fe34fd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 16:45:45 -0600 Subject: [PATCH 012/368] Add react-native example app --- .../publish-ci/react-native/.bundle/config | 2 + .../publish-ci/react-native/.eslintrc.json | 32 + examples/publish-ci/react-native/.gitignore | 67 + .../publish-ci/react-native/.prettierrc.json | 6 + .../publish-ci/react-native/.watchmanconfig | 1 + examples/publish-ci/react-native/App.tsx | 81 + examples/publish-ci/react-native/Gemfile | 7 + examples/publish-ci/react-native/README.md | 79 + .../react-native/__tests__/App.test.tsx | 9 + .../__tests__/counterSlice.test.ts | 37 + .../react-native/android/app/build.gradle | 119 + .../react-native/android/app/debug.keystore | Bin 0 -> 2257 bytes .../android/app/proguard-rules.pro | 10 + .../android/app/src/debug/AndroidManifest.xml | 9 + .../android/app/src/main/AndroidManifest.xml | 25 + .../app/src/main/java/com/rr/MainActivity.kt | 22 + .../src/main/java/com/rr/MainApplication.kt | 45 + .../res/drawable/rn_edit_text_material.xml | 36 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 9 + .../react-native/android/build.gradle | 21 + .../react-native/android/gradle.properties | 41 + .../android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 63721 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + .../publish-ci/react-native/android/gradlew | 249 + .../react-native/android/gradlew.bat | 92 + .../react-native/android/settings.gradle | 4 + examples/publish-ci/react-native/app.json | 4 + .../publish-ci/react-native/babel.config.js | 4 + examples/publish-ci/react-native/globals.d.ts | 13 + examples/publish-ci/react-native/index.js | 5 + .../publish-ci/react-native/ios/.xcode.env | 11 + examples/publish-ci/react-native/ios/Podfile | 55 + .../project.pbxproj | 686 ++ .../ios/reactnativetemplate/AppDelegate.mm | 31 + .../ios/reactnativetemplate/Info.plist | 52 + .../LaunchScreen.storyboard | 47 + .../reduxTemplate.xcodeproj/project.pbxproj | 686 ++ .../xcschemes/reduxTemplate.xcscheme | 88 + .../ios/reduxTemplate/AppDelegate.h | 6 + .../ios/reduxTemplate/AppDelegate.mm | 31 + .../AppIcon.appiconset/Contents.json | 53 + .../Images.xcassets/Contents.json | 6 + .../react-native/ios/reduxTemplate/Info.plist | 52 + .../ios/reduxTemplate/LaunchScreen.storyboard | 47 + .../react-native/ios/reduxTemplate/main.m | 10 + .../ios/reduxTemplateTests/Info.plist | 24 + .../reduxTemplateTests/reduxTemplateTests.m | 66 + .../publish-ci/react-native/jest-setup.ts | 1 + .../publish-ci/react-native/jest.config.ts | 10 + .../publish-ci/react-native/metro.config.js | 12 + examples/publish-ci/react-native/package.json | 48 + .../react-native/react-native.config.js | 8 + .../publish-ci/react-native/src/app/hooks.ts | 46 + .../publish-ci/react-native/src/app/store.ts | 20 + .../src/components/AsyncButton.tsx | 74 + .../react-native/src/components/Header.tsx | 32 + .../src/components/LearnReduxLinks.tsx | 110 + .../react-native/src/components/Section.tsx | 46 + .../react-native/src/components/logo.gif | Bin 0 -> 5961 bytes .../react-native/src/constants/TypedColors.ts | 13 + .../src/features/counter/Counter.tsx | 112 + .../src/features/counter/counterAPI.ts | 8 + .../src/features/counter/counterSlice.ts | 88 + .../publish-ci/react-native/tsconfig.json | 3 + examples/publish-ci/react-native/yarn.lock | 10178 ++++++++++++++++ 76 files changed, 13799 insertions(+) create mode 100644 examples/publish-ci/react-native/.bundle/config create mode 100644 examples/publish-ci/react-native/.eslintrc.json create mode 100644 examples/publish-ci/react-native/.gitignore create mode 100644 examples/publish-ci/react-native/.prettierrc.json create mode 100644 examples/publish-ci/react-native/.watchmanconfig create mode 100644 examples/publish-ci/react-native/App.tsx create mode 100644 examples/publish-ci/react-native/Gemfile create mode 100644 examples/publish-ci/react-native/README.md create mode 100644 examples/publish-ci/react-native/__tests__/App.test.tsx create mode 100644 examples/publish-ci/react-native/__tests__/counterSlice.test.ts create mode 100644 examples/publish-ci/react-native/android/app/build.gradle create mode 100644 examples/publish-ci/react-native/android/app/debug.keystore create mode 100644 examples/publish-ci/react-native/android/app/proguard-rules.pro create mode 100644 examples/publish-ci/react-native/android/app/src/debug/AndroidManifest.xml create mode 100644 examples/publish-ci/react-native/android/app/src/main/AndroidManifest.xml create mode 100644 examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainActivity.kt create mode 100644 examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainApplication.kt create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/values/strings.xml create mode 100644 examples/publish-ci/react-native/android/app/src/main/res/values/styles.xml create mode 100644 examples/publish-ci/react-native/android/build.gradle create mode 100644 examples/publish-ci/react-native/android/gradle.properties create mode 100644 examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.jar create mode 100644 examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 examples/publish-ci/react-native/android/gradlew create mode 100644 examples/publish-ci/react-native/android/gradlew.bat create mode 100644 examples/publish-ci/react-native/android/settings.gradle create mode 100644 examples/publish-ci/react-native/app.json create mode 100644 examples/publish-ci/react-native/babel.config.js create mode 100644 examples/publish-ci/react-native/globals.d.ts create mode 100644 examples/publish-ci/react-native/index.js create mode 100644 examples/publish-ci/react-native/ios/.xcode.env create mode 100644 examples/publish-ci/react-native/ios/Podfile create mode 100644 examples/publish-ci/react-native/ios/reactnativetemplate.xcodeproj/project.pbxproj create mode 100644 examples/publish-ci/react-native/ios/reactnativetemplate/AppDelegate.mm create mode 100644 examples/publish-ci/react-native/ios/reactnativetemplate/Info.plist create mode 100644 examples/publish-ci/react-native/ios/reactnativetemplate/LaunchScreen.storyboard create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/project.pbxproj create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/xcshareddata/xcschemes/reduxTemplate.xcscheme create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.h create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.mm create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/Info.plist create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/LaunchScreen.storyboard create mode 100644 examples/publish-ci/react-native/ios/reduxTemplate/main.m create mode 100644 examples/publish-ci/react-native/ios/reduxTemplateTests/Info.plist create mode 100644 examples/publish-ci/react-native/ios/reduxTemplateTests/reduxTemplateTests.m create mode 100644 examples/publish-ci/react-native/jest-setup.ts create mode 100644 examples/publish-ci/react-native/jest.config.ts create mode 100644 examples/publish-ci/react-native/metro.config.js create mode 100644 examples/publish-ci/react-native/package.json create mode 100644 examples/publish-ci/react-native/react-native.config.js create mode 100644 examples/publish-ci/react-native/src/app/hooks.ts create mode 100644 examples/publish-ci/react-native/src/app/store.ts create mode 100644 examples/publish-ci/react-native/src/components/AsyncButton.tsx create mode 100644 examples/publish-ci/react-native/src/components/Header.tsx create mode 100644 examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx create mode 100644 examples/publish-ci/react-native/src/components/Section.tsx create mode 100644 examples/publish-ci/react-native/src/components/logo.gif create mode 100644 examples/publish-ci/react-native/src/constants/TypedColors.ts create mode 100644 examples/publish-ci/react-native/src/features/counter/Counter.tsx create mode 100644 examples/publish-ci/react-native/src/features/counter/counterAPI.ts create mode 100644 examples/publish-ci/react-native/src/features/counter/counterSlice.ts create mode 100644 examples/publish-ci/react-native/tsconfig.json create mode 100644 examples/publish-ci/react-native/yarn.lock diff --git a/examples/publish-ci/react-native/.bundle/config b/examples/publish-ci/react-native/.bundle/config new file mode 100644 index 0000000000..848943bb52 --- /dev/null +++ b/examples/publish-ci/react-native/.bundle/config @@ -0,0 +1,2 @@ +BUNDLE_PATH: "vendor/bundle" +BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/examples/publish-ci/react-native/.eslintrc.json b/examples/publish-ci/react-native/.eslintrc.json new file mode 100644 index 0000000000..b44d5dd6e8 --- /dev/null +++ b/examples/publish-ci/react-native/.eslintrc.json @@ -0,0 +1,32 @@ +{ + "extends": [ + "eslint:recommended", + "@react-native", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/strict-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked", + "plugin:react/jsx-runtime" + ], + "ignorePatterns": ["node_modules", ".vscode", "dist", "metro.config.js"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": true, + "tsconfigRootDir": "./" + }, + "plugins": ["@typescript-eslint"], + "root": true, + "rules": { + "@typescript-eslint/consistent-type-imports": [ + 2, + { + "fixStyle": "separate-type-imports" + } + ] + }, + "overrides": [ + { + "files": ["./__tests__/**/*.ts", "./__tests__/**/*.tsx"], + "env": { "jest": true } + } + ] +} diff --git a/examples/publish-ci/react-native/.gitignore b/examples/publish-ci/react-native/.gitignore new file mode 100644 index 0000000000..922b340f0a --- /dev/null +++ b/examples/publish-ci/react-native/.gitignore @@ -0,0 +1,67 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +ios/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log +.yarn/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +/ios/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage diff --git a/examples/publish-ci/react-native/.prettierrc.json b/examples/publish-ci/react-native/.prettierrc.json new file mode 100644 index 0000000000..358db5d90f --- /dev/null +++ b/examples/publish-ci/react-native/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "arrowParens": "avoid", + "bracketSameLine": true, + "singleQuote": true, + "trailingComma": "all" +} diff --git a/examples/publish-ci/react-native/.watchmanconfig b/examples/publish-ci/react-native/.watchmanconfig new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/publish-ci/react-native/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/examples/publish-ci/react-native/App.tsx b/examples/publish-ci/react-native/App.tsx new file mode 100644 index 0000000000..bfddc53c54 --- /dev/null +++ b/examples/publish-ci/react-native/App.tsx @@ -0,0 +1,81 @@ +import type { FC } from 'react'; +import { + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + View, + useColorScheme, +} from 'react-native'; +import { Provider } from 'react-redux'; +import { store } from './src/app/store'; +import { Counter } from './src/features/counter/Counter'; + +import { + DebugInstructions, + HermesBadge, + LearnMoreLinks, + ReloadInstructions, +} from 'react-native/Libraries/NewAppScreen'; +import { Header } from './src/components/Header'; +import { LearnReduxLinks } from './src/components/LearnReduxLinks'; +import { Section } from './src/components/Section'; +import { TypedColors } from './src/constants/TypedColors'; + +export const App: FC = () => { + const isDarkMode = useColorScheme() === 'dark'; + + const backgroundStyle = { + backgroundColor: isDarkMode ? TypedColors.darker : TypedColors.lighter, + }; + + return ( + + + + +
+ + + +
+ Edit App.tsx to change this + screen and then come back to see your edits. +
+
+ +
+
+ +
+
+ Discover what to do next with Redux: +
+ +
+ Read the docs to discover what to do next: +
+ +
+ + + + ); +}; + +const styles = StyleSheet.create({ + highlight: { + fontWeight: '700', + }, +}); diff --git a/examples/publish-ci/react-native/Gemfile b/examples/publish-ci/react-native/Gemfile new file mode 100644 index 0000000000..6a7d5c7a49 --- /dev/null +++ b/examples/publish-ci/react-native/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby ">= 2.6.10" + +gem 'cocoapods', '~> 1.13' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/examples/publish-ci/react-native/README.md b/examples/publish-ci/react-native/README.md new file mode 100644 index 0000000000..12470c30ec --- /dev/null +++ b/examples/publish-ci/react-native/README.md @@ -0,0 +1,79 @@ +This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). + +# Getting Started + +>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. + +## Step 1: Start the Metro Server + +First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. + +To start Metro, run the following command from the _root_ of your React Native project: + +```bash +# using npm +npm start + +# OR using Yarn +yarn start +``` + +## Step 2: Start your Application + +Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: + +### For Android + +```bash +# using npm +npm run android + +# OR using Yarn +yarn android +``` + +### For iOS + +```bash +# using npm +npm run ios + +# OR using Yarn +yarn ios +``` + +If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. + +This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. + +## Step 3: Modifying your App + +Now that you have successfully run the app, let's modify it. + +1. Open `App.tsx` in your text editor of choice and edit some lines. +2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! + + For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! + +## Congratulations! :tada: + +You've successfully run and modified your React Native App. :partying_face: + +### Now what? + +- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). +- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). + +# Troubleshooting + +If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. + +# Learn More + +To learn more about React Native, take a look at the following resources: + +- [React Native Website](https://reactnative.dev) - learn more about React Native. +- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. +- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. +- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. +- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. diff --git a/examples/publish-ci/react-native/__tests__/App.test.tsx b/examples/publish-ci/react-native/__tests__/App.test.tsx new file mode 100644 index 0000000000..452785a21d --- /dev/null +++ b/examples/publish-ci/react-native/__tests__/App.test.tsx @@ -0,0 +1,9 @@ +import { render } from '@testing-library/react-native'; +import renderer from 'react-test-renderer'; +import { App } from '../App'; + +test('renders correctly', () => { + renderer.create(); + const element = render(); + expect(element).toBeDefined(); +}); diff --git a/examples/publish-ci/react-native/__tests__/counterSlice.test.ts b/examples/publish-ci/react-native/__tests__/counterSlice.test.ts new file mode 100644 index 0000000000..107f3549bb --- /dev/null +++ b/examples/publish-ci/react-native/__tests__/counterSlice.test.ts @@ -0,0 +1,37 @@ +import type { CounterState } from '../src/features/counter/counterSlice'; +import { + counterSlice, + decrement, + increment, + incrementByAmount, +} from '../src/features/counter/counterSlice'; + +describe('counter reducer', () => { + const { reducer: counterReducer } = counterSlice; + const initialState: CounterState = { + value: 3, + status: 'idle', + }; + + test('should handle initial state', () => { + expect(counterReducer(undefined, { type: 'unknown' })).toStrictEqual({ + value: 0, + status: 'idle', + }); + }); + + test('should handle increment', () => { + const actual = counterReducer(initialState, increment()); + expect(actual.value).toBe(4); + }); + + test('should handle decrement', () => { + const actual = counterReducer(initialState, decrement()); + expect(actual.value).toBe(2); + }); + + test('should handle incrementByAmount', () => { + const actual = counterReducer(initialState, incrementByAmount(2)); + expect(actual.value).toBe(5); + }); +}); diff --git a/examples/publish-ci/react-native/android/app/build.gradle b/examples/publish-ci/react-native/android/app/build.gradle new file mode 100644 index 0000000000..0899b674ad --- /dev/null +++ b/examples/publish-ci/react-native/android/app/build.gradle @@ -0,0 +1,119 @@ +apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" + +/** + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. + */ +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '..' + // root = file("../") + // The folder where the react-native NPM package is. Default is ../node_modules/react-native + // reactNativeDir = file("../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen + // codegenDir = file("../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js + // cliFile = file("../node_modules/react-native/cli.js") + + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. By default is just 'debug'. + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "prodDebug"] + + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] +} + +/** + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. + */ +def enableProguardInReleaseBuilds = false + +/** + * The preferred build flavor of JavaScriptCore (JSC) + * + * For example, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'org.webkit:android-jsc:+' + +android { + ndkVersion rootProject.ext.ndkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion + + namespace "com.reduxTemplate" + defaultConfig { + applicationId "com.reduxTemplate" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 1 + versionName "1.0" + } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // Caution! In production, you need to generate your own keystore file. + // see https://reactnative.dev/docs/signed-apk-android. + signingConfig signingConfigs.debug + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } +} + +dependencies { + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") + implementation("com.facebook.react:flipper-integration") + + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") + } else { + implementation jscFlavor + } +} + +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/examples/publish-ci/react-native/android/app/debug.keystore b/examples/publish-ci/react-native/android/app/debug.keystore new file mode 100644 index 0000000000000000000000000000000000000000..364e105ed39fbfd62001429a68140672b06ec0de GIT binary patch literal 2257 zcmchYXEfYt8;7T1^dLH$VOTZ%2NOdOH5j5LYLtZ0q7x-V8_6gU5)#7dkq{HTmsfNq zB3ZqcAxeY^G10@?efK?Q&)M(qInVv!xjx+IKEL}p*K@LYvIzo#AZG>st5|P)KF1_Z;y){W{<7K{nl!CPuE z_^(!C(Ol0n8 zK13*rzAtW>(wULKPRYLd7G18F8#1P`V*9`(Poj26eOXYyBVZPno~Cvvhx7vPjAuZo zF?VD!zB~QG(!zbw#qsxT8%BSpqMZ4f70ZPn-3y$L8{EVbbN9$H`B&Z1quk9tgp5FM zuxp3pJ0b8u|3+#5bkJ4SRnCF2l7#DyLYXYY8*?OuAwK4E6J{0N=O3QNVzQ$L#FKkR zi-c@&!nDvezOV$i$Lr}iF$XEcwnybQ6WZrMKuw8gCL^U#D;q3t&HpTbqyD%vG=TeDlzCT~MXUPC|Leb-Uk+ z=vnMd(|>ld?Fh>V8poP;q;;nc@en$|rnP0ytzD&fFkCeUE^kG9Kx4wUh!!rpjwKDP zyw_e|a^x_w3E zP}}@$g>*LLJ4i0`Gx)qltL}@;mDv}D*xR^oeWcWdPkW@Uu)B^X&4W1$p6}ze!zudJ zyiLg@uggoMIArBr*27EZV7djDg@W1MaL+rcZ-lrANJQ%%>u8)ZMWU@R2qtnmG(acP z0d_^!t>}5W zpT`*2NR+0+SpTHb+6Js4b;%LJB;B_-ChhnU5py}iJtku*hm5F0!iql8Hrpcy1aYbT z1*dKC5ua6pMX@@iONI?Hpr%h;&YaXp9n!ND7-=a%BD7v&g zOO41M6EbE24mJ#S$Ui0-brR5ML%@|ndz^)YLMMV1atna{Fw<;TF@>d&F|!Z>8eg>>hkFrV)W+uv=`^F9^e zzzM2*oOjT9%gLoub%(R57p-`TXFe#oh1_{&N-YN z<}artH|m=d8TQuKSWE)Z%puU|g|^^NFwC#N=@dPhasyYjoy(fdEVfKR@cXKHZV-`06HsP`|Ftx;8(YD$fFXumLWbGnu$GMqRncXYY9mwz9$ap zQtfZB^_BeNYITh^hA7+(XNFox5WMeG_LtJ%*Q}$8VKDI_p8^pqX)}NMb`0e|wgF7D zuQACY_Ua<1ri{;Jwt@_1sW9zzdgnyh_O#8y+C;LcZq6=4e^cs6KvmK@$vVpKFGbQ= z$)Eux5C|Fx;Gtmv9^#Y-g@7Rt7*eLp5n!gJmn7&B_L$G?NCN`AP>cXQEz}%F%K;vUs{+l4Q{}eWW;ATe2 zqvXzxoIDy(u;F2q1JH7Sf;{jy_j})F+cKlIOmNfjBGHoG^CN zM|Ho&&X|L-36f}Q-obEACz`sI%2f&k>z5c$2TyTSj~vmO)BW~+N^kt`Jt@R|s!){H ze1_eCrlNaPkJQhL$WG&iRvF*YG=gXd1IyYQ9ew|iYn7r~g!wOnw;@n42>enAxBv*A zEmV*N#sxdicyNM=A4|yaOC5MByts}s_Hpfj|y<6G=o=!3S@eIFKDdpR7|FY>L&Wat&oW&cm&X~ z5Bt>Fcq(fgnvlvLSYg&o6>&fY`ODg4`V^lWWD=%oJ#Kbad2u~! zLECFS*??>|vDsNR&pH=Ze0Eo`sC_G`OjoEKVHY|wmwlX&(XBE<@sx3Hd^gtd-fNwUHsylg06p`U2y_={u}Bc + + + + diff --git a/examples/publish-ci/react-native/android/app/src/main/AndroidManifest.xml b/examples/publish-ci/react-native/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..4122f36a59 --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + diff --git a/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainActivity.kt b/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainActivity.kt new file mode 100644 index 0000000000..69d5655a0f --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainActivity.kt @@ -0,0 +1,22 @@ +package com.reduxTemplate + +import com.facebook.react.ReactActivity +import com.facebook.react.ReactActivityDelegate +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled +import com.facebook.react.defaults.DefaultReactActivityDelegate + +class MainActivity : ReactActivity() { + + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "reduxTemplate" + + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = + DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) +} diff --git a/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainApplication.kt b/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainApplication.kt new file mode 100644 index 0000000000..cbb688f4fe --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/java/com/rr/MainApplication.kt @@ -0,0 +1,45 @@ +package com.reduxTemplate + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.defaults.DefaultReactNativeHost +import com.facebook.react.flipper.ReactNativeFlipper +import com.facebook.soloader.SoLoader + +class MainApplication : Application(), ReactApplication { + + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List { + // Packages that cannot be autolinked yet can be added manually here, for example: + // packages.add(new MyReactNativePackage()); + return PackageList(this).packages + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(this.applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, false) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } + ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) + } +} diff --git a/examples/publish-ci/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml b/examples/publish-ci/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml new file mode 100644 index 0000000000..73b37e4d99 --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + diff --git a/examples/publish-ci/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/publish-ci/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a2f5908281d070150700378b64a84c7db1f97aa1 GIT binary patch literal 3056 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 axPAxe%7rDusX+w*00006jj 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⁣ zwiG+x#%j}{0gU~J8;<|!B1@-XaB@{KORFwrYg_8rOv({b0EO#DbeQRm;B6_9=mXGf z-x|VL{zd`)#@yN}HkCSJbjbNlE|zL3Wm9Q8HY`sV)}3%pgN>cL^67{Z;PPL(*wT8N zUjXU{@|*hvm}({wsAC=x0^ok0%UAz0;sogW{B!nDqk|JJ5x~4NfTDgP49^zeu`csl?5mY@JdQdISc zFs!E{^grmkLnUk9 zny~m)1vws@5BFI<-0Tuo2JWX(0v`W|t(wg;s--L47WTvTMz-8l#TL^=OJNRS2?_Qj z3AKT+gvbyBi#H*-tJ%tWD|>EV3wy|8qxfzS!5RW;Jpl5*zo&^UBU=fG#2}UvRyNkK zA06Dy9;K1ca@r2T>yThYgI!ont$(G{6q#2QT+00r_x0(b)gsE`lBB?2gr55gq^D3Fi&p%E(p9>U%bv zkg1Jco(RbyTX7FDHOnl7-O@ zI$AaIl?9NJKPm(WiBP`1-#CB1QzU>&hKm)fpa5DKE{2$X0hGz-0uZ?cyTk(YC!Y&| zL=1VrNERSA5NA2jq7FACfX4JfPyj5XXl1yv0>~s;eF7L2$>&oMqeTFT2m$y7FlkON z_yurD1yIOvA;5C6016pyxBznGUt0kJ&k5r#;&>Jow`r)sp9R~PmK~lz$3xH%LT*1U zJdOyABZ3!FvNoR*vN$5ykHS8f`jA4zV+|L}i1C4`B2c{R0;UdYxaU|H)2avz@ z=mEYc|2S<+(B2Tj+FkX+2D+yFI!k9lWMA61DJ{)e;lum$(;O87?vGJJe!KtK04+N_ zI*P~t@dUb>9Xh{dbyl{-ZQ(UMgz7$|QfL5XSPkskt^NgctYC#;4WcZB1@%@wy@2t3 z2z0DI7&%b$*Aw~abe?GxE`ez@+6hOh-6*8fHRV{1os$EL@}uUZeG4h1&Be`98q*7j z=3-v+lhIjfWVo12!<>%V^a6lTgW3+_#W6n|p*~==zOH7z$0{LSZk(Tpd7EaD04hnA zL;#fxS0aD{`5^&D`}>0Uq?byDD-l2=!wm_bLcUl4gc(% za1p|itVANvFF>hghAS07Im1;IK;|b*W)}VDyI;BIp2=K*yu2a)j?B|f<44NI$NbmJ z#dE0>jI$fMr&@>4kN8MLFb4&2O9fEKaQg%(QO$4_1rVQywG^CmBLh#}_7gKW3vd?| z2?1^&KWq8}8I^_S0|)MowU_pw$q@nl@Nkn$z>BQq_KA^9yaR`(R3u{{Ig;cwt z@AJ^{ODQCm^neroM9nKNUAXi9RCK`OsP_LuR0PUR(YZCCX5dNF6VzcoK&=b^r`W?ltt|*F zpkoae%ZT{C1h~EcFui~b7fF`vb<<~j_VquuUA$}QqIKYELPp#;{u?q8Dz}WAG-(3; zjrm$i%7UbyZMM(Y{>!uJ#vNB?R~B{6Htp=>e*<{fQQ5W7V(1coCWlOON!MzZxhum| ztZBQpGR z;~#ur^&PockKdV{Q6R>o`Pl{0x!DEbpZ7y9Y;*ZvE!*gU`V1W3znva{f=?WO5I&>B z&hw6}tjECtaghm5z|C#%M;Yf_*pI^};h}Vl=^r9EN=tVDj86D;C$jIJ?K7VP+00000NkvXXu0mjf D5i!M* literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..459ca609d3ae0d3943ab44cdc27feef9256dc6d7 GIT binary patch literal 7098 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 literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..8ca12fe024be86e868d14e91120a6902f8e88ac6 GIT binary patch literal 6464 zcma)BcR1WZxBl%e)~?{d=GL+&^aKnR?F5^S)H60AiZ4#Zw z<{%@_?XtN*4^Ysr4x}4T^65=zoh0oG>c$Zd1_pX6`i0v}uO|-eB%Q>N^ZQB&#m?tGlYwAcTcjWKhWpN*8Y^z}bpUe!vvcHEUBJgNGK%eQ7S zhw2AoGgwo(_hfBFVRxjN`6%=xzloqs)mKWPrm-faQ&#&tk^eX$WPcm-MNC>-{;_L% z0Jg#L7aw?C*LB0?_s+&330gN5n#G}+dQKW6E7x7oah`krn8p`}BEYImc@?)2KR>sX{@J2`9_`;EMqVM;E7 zM^Nq2M2@Ar`m389gX&t}L90)~SGI8us3tMfYX5};G>SN0A%5fOQLG#PPFJYkJHb1AEB+-$fL!Bd}q*2UB9O6tebS&4I)AHoUFS6a0* zc!_!c#7&?E>%TorPH_y|o9nwb*llir-x$3!^g6R>>Q>K7ACvf%;U5oX>e#-@UpPw1ttpskGPCiy-8# z9;&H8tgeknVpz>p*#TzNZQ1iL9rQenM3(5?rr(4U^UU z#ZlsmgBM9j5@V-B83P3|EhsyhgQ77EsG%NO5A6iB2H; zZ1qN35-DS^?&>n1IF?bU|LVIJ-)a3%TDI*m*gMi7SbayJG$BfYU*G+{~waS#I(h-%@?Js8EohlFK)L6r2&g ztcc$v%L)dK+Xr=`-?FuvAc@{QvVYC$Y>1$RA%NKFcE$38WkS6#MRtHdCdDG)L5@99 zmOB8Tk&uN4!2SZ@A&K>I#Y$pW5tKSmDDM|=;^itso2AsMUGb8M-UB;=iAQLVffx9~ z>9>|ibz#eT>CNXD*NxH55}uwlew*<*!HbMj&m@)MJpB3+`0S~CS*}j%xv0#&!t?KV zvzMowAuAt0aiRnsJX@ELz=6evG5`vT22QVgQ8`R8ZRMFz4b*L1Iea$C{}L-`I@ADV z>6E7u@2*aes?Tbya7q(2B@(_EQ`i{|e`sX<`|EStW0J4wXXu{=AL)Yc~qrWr;0$Pv5 zv>|&Z)9;X%pA)*;27gocc66voVg~qDgTjj+(U9|$GL0^^aT_|nB9A30Cit)kb|vD4 zf)DnEpLD$vFe;2q6HeCdJHy;zdy!J*G$c>?H)mhj)nUnqVZgsd$B3_otq0SLKK#6~ zYesV8{6fs%g73iiThOV6vBCG|%N@T5`sPyJC=Khz2BFm;>TDQsy`9-F*ndRcrY(oR zi`Yl&RS)~S{(6bu*x$_R`!T^Rb*kz$y74i|w!v9dWZch7*u=!*tHWu{H)+?o_5R?j zC3fh6nh%xP1o2@)nCKrOt45=`RDWzlx4E4Vyt~xJp=x(& z&nexdTA1T z8wlsklpvKX6UmIAoqD2{y!U7sJ1pb*!$$7-$WqT`P85GQnY<9f-V#A{D0qB4s( zM}v7W^xaEsAKOKHwfqZjhp--BnCdoIWKR-`Fzd|6nA|kgToLF%fZtoODEB96Wo9H1 z0Sdw%@}akuaT$>wLSecayqMj-91_>92B%+(=`^b?eO-^^iU_rUI1HudU9|kEC)+4kO$7RH+ld1twCmYZY9TvW^5l;Z}B8= z896yWiZZB`qqS&OG0XwC_$cobL16lrJ*2c3&fKbrp9 z%tlJvW_MO`=d4M{%mK#3Z4&l;9YJ1vr(ouTCy`gN^l^_A9NgpWRb8LrAX%Q#*Cmp5 zIwyGcPL%eUjz^{sVkq*vzFy#ta>EToiootr5A5XFi*hI$n2k0Y^t86pm2&3+F0p%mt`GZnV`T}#q!8*EbdK85^V zKmz&wU&?nse8nxapPCARIu14E@L92H30#omJIM-srk(t?deU6h*}Dy7Er~G6)^t#c>Md`*iRFxBLNTD%xZ?*ZX(Eyk@A7-?9%^6Mz+0mZ94+f?$Bjyu# z13t~Gc4k*z$MR-EkcUxB z&qf)13zOI)&aC{oO!Rc0f=E+Fz%3Dh2 zV#s?W#u7wIkKwpC1JpsDx>w@|$yx6)8IuolPXc&F`pg23fo3ut{Vi&9S5ax7tA`Jt zwy+x6 zmAjv170vr2Nqvw^f>!9m2c`;ERAPyYv%geDGY^+1Hu9_Ds%%_dgo`-0nQe|jj?3cV zBs&>A3u~RhH@@aaaJYOi^)d;Q9|^Bvl4*H#aNHs#`I7&5osKp$o#b8(AHEYaGGd5R zbl*pMVCA?^kz#h)fPX{it?;>NPXZ%jYUL7&`7ct>ud@Fafg?^dudINo z(V}0Pzk*<5wlI*`V}S9|VcGUJ>E(Z~SJK!qm!rRVg_iEo}kx(ZP@xbA^ zv5C}~Frbyc79Gf|LEN9bkut~oE_ts|A0;FoQd}xjkal?FrynlE$0~+WvV3FqT7hl& zCex`(-&TN>>hn=Z-GiZcT6`@s4Q={XbGonu=`?IO(DL;a7q4GJT*LFu=i-0%HoxX6 zcE6uWDcb4U{c-Lv)sS5Laat=&7<4^Nx-dI0yhCBphb{EUIOPF!x-K*8?4mhe)ql&=>t&BpmQ+Cro zU}jKu9ZVtI-zmH~&_GitE94R}uPo|TH7Avb>6`bfsw(H5#6i@1eAjnbJ6Jp2`sUyA zT6=~iK`oPTyOJ@B7;4>Mu_)Y5CU8VBR&hfdao**flRo6k_^jd9DVW1T%H662;=ha4 z|GqT_1efxomD2pViCVn>W{AJnZU z@(<&n5>30Xt6qP&C^{bC7HPAF@InDSS1jw5!M7p#vbz_0rOjeBFXm4vp#JW99$+91 zK~k`ZV)&&?=i!OIUJn61H*6??S4i2(>@e9c&~OD1RmDDRjY>mIh*T2~R)d#BYSQSV z<518JITbPK5V-O@m<{jeB0FU^j)M2SbBZhP~{vU%3pN+$M zPFjBIaP?dZdrsD*W5MU`i(Z*;vz&KFc$t|S+`C4<^rOY}L-{km@JPgFI%(Qv?H70{ zP9(GR?QE@2xF!jYE#Jrg{OFtw-!-QSAzzixxGASD;*4GzC9BVbY?)PI#oTH5pQvQJ z4(F%a)-AZ0-&-nz;u$aI*h?4q{mtLHo|Jr5*Lkb{dq_w7;*k-zS^tB-&6zy)_}3%5 z#YH742K~EFB(D`Owc*G|eAtF8K$%DHPrG6svzwbQ@<*;KKD^7`bN~5l%&9~Cbi+P| zQXpl;B@D$-in1g8#<%8;7>E4^pKZ8HRr5AdFu%WEWS)2{ojl|(sLh*GTQywaP()C+ zROOx}G2gr+d;pnbYrt(o>mKCgTM;v)c&`#B0IRr8zUJ*L*P}3@{DzfGART_iQo86R zHn{{%AN^=k;uXF7W4>PgVJM5fpitM`f*h9HOPKY2bTw;d_LcTZZU`(pS?h-dbYI%) zn5N|ig{SC0=wK-w(;;O~Bvz+ik;qp}m8&Qd3L?DdCPqZjy*Dme{|~nQ@oE+@SHf-` zDitu;{#0o+xpG%1N-X}T*Bu)Qg_#35Qtg69;bL(Rfw*LuJ7D5YzR7+LKM(f02I`7C zf?egH(4|Ze+r{VKB|xI%+fGVO?Lj(9psR4H0+jOcad-z!HvLVn2`Hu~b(*nIL+m9I zyUu|_)!0IKHTa4$J7h7LOV!SAp~5}f5M;S@2NAbfSnnITK3_mZ*(^b(;k-_z9a0&^ zD9wz~H~yQr==~xFtiM8@xM$))wCt^b{h%59^VMn|7>SqD3FSPPD;X>Z*TpI-)>p}4 zl9J3_o=A{D4@0OSL{z}-3t}KIP9aZAfIKBMxM9@w>5I+pAQ-f%v=?5 z&Xyg1ftNTz9SDl#6_T1x4b)vosG(9 ze*G{-J=_M#B!k3^sHOas?)yh=l79yE>hAtVo}h~T)f&PmUwfHd^GIgA$#c{9M_K@c zWbZ@sJ{%JeF!chy?#Y6l_884Q)}?y|vx&R~qZDlG#Q$pU2W+U4AQ+gt-ViZ@8*)W| zN}wXeW~TTA#eqe)(vdbZm(Pm3j;>#thsjkQ;WH#a1e>C?-z7B%5go0khC;qQfrA-~ z$^9-bBZi+WMhAW0%y*4FlNC%SvM%a(`BE ze-4>w7)wg(sKN@T-nTl^G~+e{lyeTG(dfoz3U!LKf{rmR=<}+ih`q1*(OB8oS#B&> z;Mf*_o&W5*=YXfgFP}B@p)|WJA7X^OhD8)dnP)jzA@E=&=Ci7QzO`+_Vzsr zPWpZ3Z1>W?dNv6)H}>_%l*Di^aMXFax2)v1ZCxi4OJKTI<)yK_R>n#>Sv$LTRI8cB ziL<^H!Q&(ny#h19ximj|=3WygbFQ9j_4d8yE5}Rvb>DpH^e#I;g6}sM7nZnLmyB3# z!UenLG)cb%%--*pozd3}aX#-Nmu5ptKcp>-zcwRx9se(_2ZQsmWHU!Rgj3QRPn3UF z_sqgJ&Eb=kv+m0$9uW~j-aZ0Hq#b_2f^rS*bL}stW91HXNt0JDK~q-%62AW}++%IT zk!ZO&)BjYf)_bpTye9UB=w_-2M{YgE#ii%`l+(PHe_QjW@$o^e)A&KoW2)+!I9Ohw zDB1e=ELr`L3zwGjsfma_2>Th#A0!7;_??{~*jzt2*T6O%e3V)-7*TMGh!k050cAi2C?f}r2CHy&b8kPa2#6aI1wtOBBfiCCj?OjhctJT zF|t;&c+_-i=lhK}pNiu>8*ZFrt0rJp={`H182b$`Zb>SI(z!@Hq@<+#JSpVAzA3oc z@yEcV|MbQ+i)`%|)klTCzCj&qoC0c7g6FFgsUhcaDowSG{A=DV19LHK*M7TK?HV;a zAAvOV<(8UlC>jP4XE>(OS{6DfL B0*L?s literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..8e19b410a1b15ff180f3dacac19395fe3046cdec GIT binary patch literal 10676 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 literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/publish-ci/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..4c19a13c239cb67b8a2134ddd5f325db1d2d5bee GIT binary patch literal 15523 zcmZu&byQSev_3Py&@gnDfPjP`DLFJqiULXtibx~fLnvK>bPOP+(%nO&(%r2fA>H-( zz4z~1>*iYL?tRWZ_k8=?-?=ADTT_`3j}{LAK&YyspmTRd|F`47?v6Thw%7njTB|C^ zKKGc}$-p)u@1g1$=G5ziQhGf`pecnFHQK@{)H)R`NQF;K%92o17K-93yUfN21$b29 zQwz1oFs@r6GO|&!sP_4*_5J}y@1EmX38MLHp9O5Oe0Nc6{^^wzO4l(d z;mtZ_YZu`gPyE@_DZic*_^gGkxh<(}XliiFNpj1&`$dYO3scX$PHr^OPt}D-`w9aR z4}a$o1nmaz>bV)|i2j5($CXJ<=V0%{^_5JXJ2~-Q=5u(R41}kRaj^33P50Hg*ot1f z?w;RDqu}t{QQ%88FhO3t>0-Sy@ck7!K1c53XC+HJeY@B0BH+W}BTA1!ueRG49Clr? z+R!2Jlc`n)zZ?XWaZO0BnqvRN#k{$*;dYA4UO&o_-b>h3>@8fgSjOUsv0wVwlxy0h z{E1|}P_3K!kMbGZt_qQIF~jd+Km4P8D0dwO{+jQ1;}@_Weti;`V}a_?BkaNJA?PXD zNGH$uRwng<4o9{nk4gW z3E-`-*MB=(J%0*&SA1UclA>pLfP4H?eSsQV$G$t!uXTEio7TY9E35&?0M-ERfX4he z{_Hb&AE`T%j8hIZEp@yBVycpvW2!bHrfxbuu6>_i<^9@?ak)9gHU*#bS~}$sGY*Fi z=%P&i3aH%N`b;I~s8{&6uGo$>-`ukQ<8ri(6aH6p_F`Fhdi6HuacwfQn10HVL7Om1 z4aZpjatkbgjp$L5Mceab#G#C)Hr{^W|TJX~?B3@2buj0;kfuNTf4c3*Au~O^aj=W2$j^4okeCxh#lwexN@eam-u4dNz zN2NIuIM4566{T&^k%4ftShcPk#=im-zXm>QWqH^0>A@?MqlDZCZ@8Wi*@tvhn5p<} zRwFm@gz|WZp91S5Z{}tB^e9|FBg(~Ik+?&_53J6ye_QQOSJ*846~H%s#LD}|O9v9H z1fLrrgoPo_&bs}eqEr}2en3iqAcP^>YsKiez$5-6m6(#3ZZ$@M5Ck=_Vv`QA>1A*v z3w-nJ_;5Nc(0_%`kG91#sotIlhO!*5#|yg+Gx{V;0ty`*=Y9=jCh$l*=fE(~t}%R# zc}iNpO)OZX`P=leQY^?^DF1w%FJh>Dkp}-o5Ig|2!6^E>|W|zc~W7gF;MtxX7 zV~UjQNsUC$EYXpN?~o{83D2c*0~7;Tm~%FRTAnnt3ln{?DcLZ=NsBY|JxwUA-6K3V zP&#|9t#a}Q4{Sg{6v-OmjJBkCh>m)8vLNm4lStMUT$)FZeJG05A)px&o3H)5oAl9= z31@?HyCriHcCDnt628BFN+T;U69Wl#itfvqIDBydMvOJO0Zl?go$cfG5>TK75CMj3 zakLaH3=&J0e}Xmqlav$S0>E@_Yo_V~3SiiXrw)$&!XhrHCDQ%P1BHPusuKr0LthAB zg)mDrLy>2*yevMMOQe6fZ|)%PEb!lC^*9yaX9UMy7-v!fSICssTR|wML0Ic2BhKAq z3I1X~ z7^_!M&;6Z9?br3#HU_&kfJ~%botXQkC1v<}ZZxN5q-T)|Sb2cW3WYUBbDZ`TH{!*^ zrmAeRM+(QI>D+?}guZ+dH*X)@^!O|oL69&Avbtw2^M3HP(+2kV{O$^3BN1RLfrC8nwz7=VhBR%>!;7WR<~;34B_j3A{>^@e@H+Q! zL=UNr1(JvKAQLKT0b}EMn|QUWtY>!>8-t@fVj_&`~gGd{_aPy5W>0u5L$zrsU^rBO=i$`#Xd*>kh)lPf}A znNXSEl`+HlhXtylgS9(#N02A=zVV?#OF?)Gr>(HszVa+1*2VG@qYttJuXaBlzP`Pb zX)ueu?s&}R>xI#^*r4gR?tMFi!_eeKlIM5g)Nk)Y^h=ZCR**xY>$E5knctRrq!zw? zX{2|hwR9LXTY1)pTlKg7U4_ej{dcj2{!+1sZ6<@9^?mn)=37V)DIAvS(}S`IgFO!6 zn({?nYw`Z-@jvt@!q|5z?TI3(dx^1szSn%azAwp>N#fk^kt|=MejKtacAs@Rdku#zT>9$s z=m7ek)`=O7hO2n+2Uj$QUs&2EIqycF{(L9Y#^IyxXA%R@ z&j`VAprIV~d!pH-7~zA+bjwVn3kOB3;rlg{nr&wHV12N}g^i>Upls~=z`VX>9HQ#= zTu&luVb@_Lkz63&&^_M!6(-2^0?GCAX9XKp{O={pd|AlIMGriX6s_Jy8_q9|{5jLc zxd1aj_ucE7Vcti#$r!s~w~W=XpaLQ}#mX`apR7^n9-d3?O+adJYr*L;{c)x@REewM@vZN0njS3iE$88KHPWAkWt((OUMherUnPm?i&8@!9E@ zUW^$%CpdruZR0ohzUq-XQ$KEIB8Sjgs1+wKSUH&Y;=ee%E&O$X18{&979d~K2uJW` zd*8awHCXb;Q>4z$B|sPNv+Zd__f6&@KmS+L`z3H1x+x|Xs7-N-iw|1C=QiJdU)f~z z{vO4hpP`0MyqmwIHN=l?jSq>OKG6CEC#O`*blP`?>)CUWj5j1cB>%6N7;`kfZ1iQV zam~SDB?{uyp^=vF_u|=8xn3S)L;wF8ZRZV{bezM-EH;MC91JQZ{KcZZ$IWJUy?SJGeGUWm6PeuO8-K2|hD~p;Ls~9Y-4lE+?|bF)XaNKUNX(K7 zBQk0Z{n>hrH-CA`bTr$6z0n@Cn9EL$XZ3=X7NopjcI=;z<(X7-oEmK}BId=PxX*!b7Q6oL@ufd%eEPc`_la(}WkT zKe?-YJWn^6b$^{dhdJZ)I!Kn6c}iw%o5mLDyvM7qJZbkGG?zLU;M|W;Wis|A;SuY3{_X53`+>9g^B%O4b{;^t$^;{oKHbo*CY%u91 zp#2d8Pg=I0&UX{qwr=y=o_^BLdk=KYH$=Z8+k|p8V5`ph~3b^{^NnL4m_+4zx( zeoTt@f<$DmsB1}o%R1Hx`ToPuBl+P6cb-?uF{1!z-2WvdR4+vJ*SYTic5@gwnzu%e zD!HF^X=$ha^#1hi*@~^nDL!HQ;MC&e+6=onaJgm-J-+|>PpmU=SIe?EQE5vJiqziw z*K=Z%bWZz_we!qiFqE`I?#$yozNxIE7Ei;csv>++r*?)0bozFpF&oLh94u z-2c2L`5BarP7l>87|f)vxaT*9(!Q`2xBMZ&^JVj-|1)Tg!6OW=lk=w zLwVlr!*<(l*L$a?ox3+%!~UIj3Ej@KD;W>1E_c)1szDi93BC;0K?drOQ>@$yi|DtT zSir}!Yx>znf&b0KS;Lk7VKPDF@e>(qQr0%SNcGQd(p9StjqJ`QSW&c{ggF?5{d22w zlkX%JTUq`;(3WSH+)WHl%qlF)iNG_?}K?ZM3cS7#u5v zZ!apx4Apv=PWsn}eD%MI#=KA)OlNy0)l@~D^1;NC5k@|OPW3wt>WNYDN+8~+gM%E! z$ z`Olr0;eytiK&~O*ps%KV?2vq+DhuRh*!6Ilzu>A;iMe9 zI?zug9nT9CI_o)O}KF_I_U z_Cswu{)3pCYgw{eOt#E?UCqBwkAugSl>5 zX?G=Ci(Lo+r3suuJezyQyDvw*<1b{rx*&ZaY2HlJ>k{Qc%IZeU43pQXw4mh!4I5>l zZ@4$uxaPY#!*IhL4Hctn#!n#S+SiPcZP_PTd5fXf1exhFi5zf3kl`UcW2RUk)F2oF z_ogN`{03PiseQR;fa#{Uy;jeNlJ0Sle`~;ZYhLjkuy>a^!Z_nR~`$&F?NVuIE3HX;i zD82snwlwPb`7yE)ZA_Ndmq5zuSO1{{1}(d9u4#!Fl_|eOuxKBwOfQ*tG`VjCV$-WF zxi0c&+w}Z)rqz{%f46@`ADPdGm#x)+zpT+gyfDi;_P zR{#Ta`Mzd=putKO@5lQJO*aNy(i?}Ltwy^Z;69f|eqi#UCI1$vL!+(#mi?dK`OL$! z3jQnx$_$+Li2<__CL@Wuk4^J7-!n3j2I4N8e#=qpir+iEQcrn3`B4yNOd1BBLEni<(tdRWE>m0I^ zt(^*Td+S3}$5rOzXy=MW>%#MN_qy%5St!>HrGZ~Fq1WKw-&kv@2TrCcPCPzY%2aO- zN?7@+$4?&qA|uv{QHuV)O9haZpG7Jx2f%D)7J@oWTxJ#E_YSq_6qT1tomOD?02(1otT{Hk8{?g(944>h4f% zOJ8tzjecV{x2uWde&6oAP)*({ zFkW0Q%gdI*9@W)oKO65DgP<3F_BIKvRXLAR?Z61&0g2TR6mEZ7OZK?dP7zukdg?s_tNZeuOsh^e1Tmdlz5rIg?LcK|%aQ1FsSDv#W0EnHd z9M)p;gAL_R~Z5cojTdwy+qDsd6R01Vtxmq&FhfPz{wxmB$${zW~z@{Ro_ zK#y5^KqIp!#@or>GD`c+aZ(PV1=`Eo1?a55p6a*WepFgxvmp!^2518YEU-;{F}fLr zD~)=S0m=+px3TUN8-El}Xb}{2ET*_i3-|WlY@V7vr6#&cOr*+oS9?GF?@)K6op>>o z4af0@%KwaLr`{3P&)474<3rDMsd!IM-bepWfhfuMmJt}#0%PgDSx*q(s0m%ZFgWTj zwwvH%2!(i9{RHX~FVUB5qHvF{+ZF}+(bZVPG1)a*Ph>KV;cYNK^aB@R#dS~&`^60V zn2Z24Y{{djzK33}t@q%!v5k)u7jAXB_H{#4Ut2 z1}0j5$RXcTyfazqL9=^Qe%GL`G)=!lirv7AgVRf^=XyEM&kiOe_%JD!O?sXK&hrDo zF}m9B68im!oGshuZluy2H#T$`XPZQu@zf;(nBCZB-cjQ&w*p@Tm_$pe^MTN3EauI) zJG&G^H-4S|1OCd#@A6jO+IcAXG#5M-d9E!^YNmV7Z(=F^?8bfrYf&mLMnRd_22&Q} z2*msbLsrI!XPeOK@|V?n>`kNC`8eSFmekELLr|!-wQRltxZnuRedup<7VflowJ+gC z)F}P6lUSsh^B41?=~0*68YA6z63lKG`W$@{GV!cC2FCl0s<7yz6!3JWoBbUDTgpg% z4VNUk%xblMy7PjLF2We*3XY7K*N(*9Yx!_M zjU$&JXLiNxaTzoa&k@NSbzbLJTn$6bu6SPWYx)Zc1Li~Lqj($GuWsA#;zg85eH{yx zz3IIOea3A4QFGmJCfn7N_d$8a77j+T^W}Sr%0XdVLFf&zJ$s^D5Vrc!iV&GXyb5*A z6mG8d*6EDN7a;=dgVjYI--~4@Fe{{fcJ4B|;_Qg~&%6#?I(?X_$S4rDw{=>=8iZS=M^I#EF!m zXn%K_xXWwmm7R40LKXPo6ZzNZfN1-$S6RuVU=JlC|3#Xjo-%ebJvvC4n%IM)Q8NDh zGXd)L;ay_JMozc^mU*Uifnp=#+if>LD*O9MV#@wB1l``z|tlu(7PJqS6rm)0@ zJzP50{0Vpa`_?92oB;*i(?i225a6tZgT+9Dg?vTh)N4OKA~(c8{$8-ZKz=mb@$4IT9g8>;k11WIT+Y=%Z})`y#OJ zK-~rlEy!T%0h!Qo+jjPF2RQz2Z^B;dbvYg2JS`+@D~OWH{2-EEs^BdnuJskh>CKeT z1b;%8dU6QU%i@z?^6Q-{XESe^qRiw`ka+k!d-{c%&lXM}vCX^T=|?|;t6r?N*h-W4 z?o4Hy%BWqW+5=+md#5^8|49zjM zon_Do@rhzZ4XAb}-m|bMH$Vg<;^Bo6A8cfhUQ>|wFk~j(`>1NgD3sTg)He1pWrUj9WZ8R(Wn5Rr zhc&dXvv_m%HrwwHo9l_))NgdVUff%d&@4^$Pc=MDZdZ^xHL$KX^ z7W1{3UJ%>9v$W{Y3>vBvflE-soDj8{`>#F|8Z$EF%lN$NylORTn5JsI4mTMHWd*%- z2sD(RO(H-&i8&Ge)5i12slI5VekYCZ)s8rv&_)194;vKY2m8DIC2{4<&xTM3HHxwT zd(42n)gCJ$O4I|8sJq07#0U7Yk7PjPK&bMdy-5b)OdhSsBo^|IB_H43@&F@tpdJR0 z#~)=UJdP|=)O{0(rVZnjbTtwHV^}&kfLJQP@R6rda;K;O>9J9bnW$BgbzOZ8aO{D8 zPuJ%=Nqg~rdzk-IW0ZC5I%cc;ek5~=lDXl4?gMOQQ!KE5Aq$9qeGFM6jFP;Xy6)%N zjg{q(E6fnF02P3L*tutbHRR-gyYK3g^y9H?GMtIs;ojG zY~3*C>qD)(8jz}89w|xfb7L`^d>AG#%D-uq=qz}(o9kzzrx0LSBX90ykr*5oM+YmoTRWe+Cj6aq^xnWRymLmE>krCpoC9K%2LT0aK0Y< zt@kUUrrj1WL9rmBB8B;WXqg-BztOiUZX-!`*a&-75+!WZ!R0OPiZz?w`Of4q#+(;m z`${Ea6GnTCY3`V2R8w*}knf)*`RA@(8k{Lp4VP;<+ z9O_z0_{3=HcVi z5)&QGEB_&$)mu@)(Z8zuw#>Gc6C>^O-FUZEo;TO1@$>-xu%`v`tMS3V-8R1pb5w&zP%&rAP2*5h z$k{jqReFXCJhJ?-{x(2j5gH_zQ>;#Ec*@bUqF0u}XB09+U-K}+jQd>)k#AOkr6M8x zHyhrfJ`99@Vzr_B@*p@`DxeJ#`jimavZ9ZV%v{mO0!%9$TY(f%_}BU~3R%QxmSdD1 z2Bp45R0C=8qtx-~+oULrzCMHMof!&H<~~>BhOu9t%ti7ERzy&MfeFI`yIK^$C)AW3 zNQRoy0G}{Z0U#b~iYF^Jc^xOlG#4#C=;O>}m0(@{S^B2chkhuBA^ur)c`E;iGC9@z z7%fqif|WXh26-3;GTi8YpXUOSVWuR&C%jb}s5V4o;X~?V>XaR)8gBIQvmh3-xs)|E z8CExUnh>Ngjb^6YLgG<K?>j`V4Zp4G4%h8vUG^ouv)P!AnMkAWurg1zX2{E)hFp5ex ziBTDWLl+>ihx>1Um{+p<{v-zS?fx&Ioeu#9;aON_P4|J-J)gPF2-0?yt=+nHsn^1G z2bM#YbR1hHRbR9Or49U3T&x=1c0%dKX4HI!55MQv`3gt5ENVMAhhgEp@kG2k+qT|<5K~u`9G7x z?eB%b2B#mq)&K}m$lwDv|MU~=Y(D2jO{j*Box$GUn=$90z6O^7F?7pn=P;{r4C8qa zv1n*5N7uIvTn`8$>}(74>Oqk=E7){#pHUFd5XRJ5ObMhqODTa}=V0;+a(7JZR-4<3 zBTvsqRwLh?*ZF)JWsWOkEq7*XMQ!G3Rmkdh7ZbM#v1~?jt((e2y}u}Ky>1qa&Y7m@ zveIzH@?5Gexr79*?sbZGkVS;s1U<7D(%~7HjAmzj$aDYv_FGl5JX@LW8>w=HCDl6W z%?rsr0)bErYJ5G1v&zjr{8=lW)ZYcstgZAuL}!0~8HAcgOm@nJ9cvOOtL@)Fpl2Dr z8876Lt<|1eF88Jx#C*XyGI)C5z_o!Os!t=Xy0$Kj^4fG1pb@16%g z+<)zJ1n1QO78g#$3yHj+(Smv`HW5y_-PP{h2A1UXMG-c%hMvHLbF6t}G>KA)H# z`AWL~>8JUT(iq7;zJr!Aj)AS+n{mRbA3aM+Gj}b#PhHdTM_NkwQm330EC9waM$=slPfxR1vmr!vf~t_M?a%`@`&tdE}ipY-p#Q#zhLK zd9eFC;PjIEAKLkRkO94{rTuNFqKbNUGtaNZRRbax9;|%2WbnGu!44#64RriY5u0O} z05G^e&JB?Wb*8^g)aM`yt|}~QJkKCipFNeyex~P~SFPVEafD(73rncKmm)m~&`O*YUyY9z7tO%ec7z@wWcoOr-ebP z1k+|y?d{>1jLC=s4B2tEhiTtu->WVJno&%%6bG46KuU9D`GEN!C!9chM>zd=cl0+- z^k>4rpkq7_iWGHtBvy$Q`dja2;1ZdYmF6cANU6{v>l1=fSKRpsTRonp@alC%p{bhU z>g+(%-)&_nDQ~#bq5;xo^06RggA&uH4RMVb6wt;oQI+`m_zt>SiI5hXkfEnn6@ZNk zh9KUr1jtt6lBg$O#TAoTRvwUtWeMP3EjnGoRPQppiNF(sX%|Q4@kIjas|WZWXSENO zfF#2yOb;%XO*LeOoAwlf{u7_39$x(w3xT~)2BNJ2l5u4n3a0NkNLT4yT);7fA?1Vt zCz*`hbw-doYa09E!05zcfOT0EOORY``E@D z5{v%@F~&|UfNt@>vrj66W5f>jy+G_8&VB9D0*>N!7_Nr=-x6N?A)M8>1~q(X34sXp zpA%@w&c};L7u*G3;(Qe=LFL}NbTF$|aX#A%P(h`-N=ZRxCvlG$>Klv}jo0MS|UR8qKq-1FokBJmrbTJjQ!k#Is0tY+0c)m4Gp80YzYD zEGXd~ihaihk;?xUknXNH?rssjzaF+l6?HnDQjVP$i=q}{lp_WbOTKKg}HPKW)2sW`L#NvgmaY0^b2Ldk|t{P6{L{>ym;Xgao1PrudBgEMRFb^ zkPJ6v0h^tJ>K@;maHk_|6Z>yFzq@YvDOeO6Ob_?P4Ey>kHiJv`Wlh_MX4fBY36f%^ zV#2t;$Rg&}!Kwifm z;TVZXMxw3~$--{&A8-6vnUZ#s4`Z-zQ#+y7UI8#Hgsc|ompLUc zqlAG!Ti>t{JzYF^5pM925*PUWUvDuYDGKhC4FMx45c`L#V7%V+88@|khLj|V=J9Un zJEcP5qVCzR6p{FK!nIY~TXo)tJ!{>CG;~&u;EPlnNrwJ=5)ke@hJosN!siM$8b2mM zmc&weo-rY{n1+%c`c<{AT3i zjF{p253Ul-)s5A+!8Dp7?viXAdH1+qlY%mK5pp?{pS1t!3qmmDOq2TnoV`F3<>(XK z1=gfH39N_~8O+~({MZX~+QHyB>vtgwK0@uqGkX^eaf$UFHiO#>LB*7@=c0o6`0muj zmH00_F#p)s3E*$A-zP+p2bvXARTg3)Lxh`tf~9X>7!Z^kHV`uE%V9+BiBG=mxj*)M zr%3rn=)>GR`{#zmwD)$3ToLMx++uqsCx(+50Uk*5QJp2c6msxLD&P-y{c|XK6zZl3 z_Fgu8kp|gKVWv`GS!c56FWPO)ZrCCtYh#*yp-ssus)ot>_~UB zyGfjTjz#fXod{^KEQK1~@jN|;SZw5OgH#0wK78Oe4#vV3*|&XPQU z$r~5u8ziT0<#ICrX^<1){mvtaqT9OqlW?wiSu4X#rOC(0uL{Ownb%i1F_G&d>=l51 zx!FEO4_LK+)W^N6UF+fAccyyp{t)TE`;vF@1irbNjcXF8b?yFh zl5UEB>@;wO`~gMF!QB;h<``+f(lxAb_8B$;&vT7)(bXG(7x_5f%AZ5;h#3WjHisX{ zLTSguapAADXMwWZ&jsD0+K!+8#*6z7-(T+QUk>(~!Q|0&!d)PgEw8F6RK;LkB;!HXg79$+l*KU&-fRF|$o+kR4mJ36k9p&>*uS~RhCV+*Y$3U-k%~M)jxCFW zl9;bQ-fx4HPy)*(bhrKL!81M6*@6p5W?z*W`jb;@JKMFwmic{gQPv*) z?I{Fh)y)}(-6uh^I52xKo!LRZV0c*1X)Z(g+GVFN{2n%vD*@&IkVI{R_0;M28M z8vu?M+xVF-&<{l@1g{PA#hnyAq(gudz4WKSFL5YOr3q!|qrxa7z~F~rEJ29VQKgNe z1*L^m9&acg2p7&`u&V%oY|AKF(Xpv=)wf&j#n|;2UYEaUIHLJuTQw$SbrNn+)38PlfV^0<6s>)|hT#IAAS*T)_^_q@I} z0S%tV-HrXOjzkvW!YSbDjdH=g;=4A@whsDB zI8^aX6n=|ab(?!Ay!)CxH(wC(iX~Q@%FEx>C{Hmp98f2ku$Bsw%lk6v50(U@; zu68Z9U&za}O#-Mv^+!V=eyj6S)5oS{My`1MVs)nlnYl_$xU^QId1_jMf7&K8ij)jQ zJ|+~@l)xpV%~Y{P()$`+nBihkjE|3t3t8PoKU3wZ_Eg%0P<>%(A@oW#*8i$X!nfG& z;&&2ZIKlD~*Gff+p3A7QB!}Ei>RGhUUz^UoEpeJ{`2ov>wH!O@1$VW>A#D#{i2z9l z{d)FK9OYxRY#(6NUMO=q^5Ve7R|72%f}ZDlsm0BN&LzyaSHurXV4p5HGf7|Z)}8)g z5J#S6h{-+_U0m$k#+|N{6_8MYactWzWb+1~ea8wX3zX<@O0>pU*q($J{=R&7)P&jg z6Kb)o=HAnC_MP;cIeBq}{gG^0CZzOUJZ|7C-VjE}!?*UtKTcwwF33v^BYC&}Rq)C* zpAJ07-!{`flYX1@n;ZK-=x4)!o(%(1UqulVmes(D z^`_HNfM#umEYy~=zh$9&+?8$4!l(4rr?d#8hS4iks@9w%E4l`BKmhUtvsm1X-mKC3 z>4(u4yS45OgZIOQ;EQ6s`sjNelo!~mLe7gS69TW2WnFwEKcAwioq2mLXV<9CIa#(0`sQpl>vwW`A$D?!2%nt*HEb;Ga=o?92 zHAOICmXHEQ%Cc{m2>dLjPU1J}^w7zilFIxy9nG(OZbYPtW?3KJyv@A7|1A*NiD_v! zTLC}%E4kI*d?$lQBRL==MPsD#FyN0ZSr`;aeQ4C6a2INH9klU~_gCH;G2%8R4EuHb z44Ej^6301>?c06FP3X~xyP{77p`-3td;HKAGf4mZw1qRd6Z^^L#?qaiAKv~px)*jAV^re~beps9m{kJzb6n(oS8uCt#Lnjofg;Rl z=apY)JsV;^dVkzCW)jDrii_WTT`3iKri(xmCC1^AO}Vqt-1B*wwIlBAmE1AmdRtMc zD!fB@mtwHPHyV-^VIVU??*~*{olz-Ub)NCX941BDj_CKZ+QYQ?+``tyhy_7WFXF}_ z?~CVO#LsDYD!&}cph22{PZ*TK?$K^u`E7%{^na89Rm%!jSZs7vI-D zL1POD!1cu56G)*p1gui3-i^JZPX3tI*_Fq&JRwbz*#8LUSiMRWjuu`zD|uk;+X&d@ zuxF5C2{Zp#O?GtOB+R2~tF>MDI(}%p-W=M>1tEY}8E=b_l*WbOO zY9tCPgL3vMEqz)_eWeqmN{qobq_4)XdXJSe6Hj;Eie0??2ZZ?p;*_K8@(&v~1evu- zxQCA2YYvv@qhzamqdi`?{Z{c*7$arCdz4-4G(`O5It%y&8>d{#Y9Vax^FZ99ZK zUdIPpkNhp8uP3T+W4lhvUIYaoY##y6KtxBFoj3&5^@Q(^{677%C#3YJh$p-Ee2M6F ztJAoQv1N0L!|N8XBD(eAYcB#gRaIX7T8U5xXbx~cJSon~YnC zaJYE%zOj9y?E==_B$*9NiAm{~)2Z}t1$$l?qOYct5Ep5HvqFKvuSE7A5YF$K@2>UE zbQOdTNzjD#zS(L>wa2$K-WK!Pc%pY^8To58;^JaXZ}F30wuYl;WWs~rCoo&vrEtUh zTBLMU??yx1#;-weCPZyOJ%Yeb?14z+OXW0L_E+<)(q=;xz74U-Q~R~n*oC;MxyrJo(74r$y2t;x`D~{nhUw`N{Bbc zo`l5kb`Yy;L=&@MTQ~Ml_%V%){mCIj4WC}5q=A_ACx2^by!4w1rVX6H0ifayJsw;; z=+}5kjC?RG*q)^FA;udd?fK$7vU1x>y0w;A-)YbE%l$J%nRRjAIlrItFPgQvJ7Ytb z%HSFnjF2||X&L_g-Q>1{(mholW_-EJmSzsO%*VVVB4)#OAv<(kOIx2H!f)I9#e_Nyjdb$&*1KN^gM}yFIhi%%BWB}7Ke0M{0WY>CxJQUuL<9GW$I>S z8~;QmE{^wS?I`=DyV^l+MozMPWLoFz=uSLu99tiVHdCN>7jRs~vd13`&Gey!!7_+< z6o@25%!eN~+Eki#7iq@#{Hxl7pF0^`N;~p~#tc6HXJP0g5xvK|AuLSwNHVI2_Y-!& z4hemc%vOM5!ySDypyEGe=lAeFbIp`w8FIUcTqUwens>sTIV-jDhrcKGX7XHFXyazb z^DO8=ZgefY6R6&+)c1_i*WoenjtR5@_JU#Ph;4M8fpmznxE9R`=r@-#_y zkD?Muq|*gg7f*BQeI|Np#}Q|NXLJHM6GE{;SJn8ce`V1Gehym~{8c+M<2~=HcCRuk z-v&$8dc8YG+tK}NYVhwdm1iZ&A#r+T<>Ez88)Eq9j+G5h5D(_u{WQdUTOs+QbA(=? z{F6n6UV8D2*lvb)0vDrca$729KG$xO2aH$jWoWl0drlmefYsTswh)`GjMtmR=vEkJ zN$aTp_@@KL%KQ-VDB2ppbZK@X`6cJA5n`g>sbCTvU_xdid!{9gWA|>Mfs6rtHx6s` z_wMt*FgUTBZ@I2C62&zbs?pPvK9TpatkXzqDqe4YTr^nnQg8gWxjKt*s&eOMEp!Qc zG~PT`>xg76Xqh^dKI-Eu#K*VnvEf9qT{L0yNpVj)eVD#kQzGgVRbTB!5nWY=?t!cggiEGBAcWM2xNtW&9 zZB_6RZ}|a87CuEYRYCRJ`Sg+_gBK$_J@*zoWcJJw>eBw?G9WY(Jw~qN|A3MBR^~jm?>k5oGv7z+0jWOox(co@%nya|* zE-2peyX)#@svgwwDMPJ89dT=iO>}@wtNR@NUQ|cJZ};sX(w2uWP4AE5)@A ziJgy_TIZ+T&vG&xPh@Jmt!OJ|zA6C0ZxfF2 z7>aIZqecbmM$lyvDMwg2?Ipo9b)-WL6K_7(X_rmJgdd$-Qc^ywEw4SThChz6*_yu= z{v~a4V|RJtH-GThc2C0Z|JHPl{II-!?B~7cWnRz&dgP*UqoY!iCo&i-xeM}kl?ID* zKTX`w+;z0+MCdGcl{N?xb|tYb%Id=k++k_@(V%bTS&n09`0{S0)|>IH_F;V@_zrxS-dKDDc7+i`nHN8J z;38w69lzAS*WWa+dnVvk(0-KD3%*)TerLH zSCc}Tjc-mR5|1HAL$C1}oue|Qp&M!hmyDUcg)Cz>GXPEyeYf}+s48kIl*pL{{treP BIP(Ai literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/app/src/main/res/values/strings.xml b/examples/publish-ci/react-native/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000..4b35bb92d3 --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + reduxTemplate + diff --git a/examples/publish-ci/react-native/android/app/src/main/res/values/styles.xml b/examples/publish-ci/react-native/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..7ba83a2ad5 --- /dev/null +++ b/examples/publish-ci/react-native/android/app/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/examples/publish-ci/react-native/android/build.gradle b/examples/publish-ci/react-native/android/build.gradle new file mode 100644 index 0000000000..cb9d6232a7 --- /dev/null +++ b/examples/publish-ci/react-native/android/build.gradle @@ -0,0 +1,21 @@ +buildscript { + ext { + buildToolsVersion = "34.0.0" + minSdkVersion = 21 + compileSdkVersion = 34 + targetSdkVersion = 34 + ndkVersion = "25.1.8937393" + kotlinVersion = "1.8.0" + } + repositories { + google() + mavenCentral() + } + dependencies { + classpath("com.android.tools.build:gradle") + classpath("com.facebook.react:react-native-gradle-plugin") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") + } +} + +apply plugin: "com.facebook.react.rootproject" diff --git a/examples/publish-ci/react-native/android/gradle.properties b/examples/publish-ci/react-native/android/gradle.properties new file mode 100644 index 0000000000..a46a5b90fa --- /dev/null +++ b/examples/publish-ci/react-native/android/gradle.properties @@ -0,0 +1,41 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=false + +# Use this property to enable or disable the Hermes JS engine. +# If set to false, you will be using JSC instead. +hermesEnabled=true diff --git a/examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.jar b/examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7f93135c49b765f8051ef9d0a6055ff8e46073d8 GIT binary patch literal 63721 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鯊%1Et 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⁢ zv5o9#E7!G0XmdzfsS{efPNi`1b44~SZ4Z8fuX!I}#8g+(wxzQwUT#Xb2(tbY1+EUhGKoT@KEU9Ktl>_0 z%bjDJg;#*gtJZv!-Zs`?^}v5eKmnbjqlvnSzE@_SP|LG_PJ6CYU+6zY6>92%E+ z=j@TZf-iW4(%U{lnYxQA;7Q!b;^brF8n0D>)`q5>|WDDXLrqYU_tKN2>=#@~OE7grMnNh?UOz-O~6 z6%rHy{#h9K0AT+lDC7q4{hw^|q6*Ry;;L%Q@)Ga}$60_q%D)rv(CtS$CQbpq9|y1e zRSrN4;$Jyl{m5bZw`$8TGvb}(LpY{-cQ)fcyJv7l3S52TLXVDsphtv&aPuDk1OzCA z4A^QtC(!11`IsNx_HnSy?>EKpHJWT^wmS~hc^p^zIIh@9f6U@I2 zC=Mve{j2^)mS#U$e{@Q?SO6%LDsXz@SY+=cK_QMmXBIU)j!$ajc-zLx3V60EXJ!qC zi<%2x8Q24YN+&8U@CIlN zrZkcT9yh%LrlGS9`G)KdP(@9Eo-AQz@8GEFWcb7U=a0H^ZVbLmz{+&M7W(nXJ4sN8 zJLR7eeK(K8`2-}j(T7JsO`L!+CvbueT%izanm-^A1Dn{`1Nw`9P?cq;7no+XfC`K(GO9?O^5zNIt4M+M8LM0=7Gz8UA@Z0N+lg+cX)NfazRu z5D)~HA^(u%w^cz+@2@_#S|u>GpB+j4KzQ^&Wcl9f z&hG#bCA(Yk0D&t&aJE^xME^&E-&xGHhXn%}psEIj641H+Nl-}boj;)Zt*t(4wZ5DN z@GXF$bL=&pBq-#vkTkh>7hl%K5|3 z{`Vn9b$iR-SoGENp}bn4;fR3>9sA%X2@1L3aE9yTra;Wb#_`xWwLSLdfu+PAu+o3| zGVnpzPr=ch{uuoHjtw7+_!L_2;knQ!DuDl0R`|%jr+}jFzXtrHIKc323?JO{l&;VF z*L1+}JU7%QJOg|5|Tc|D8fN zJORAg=_vsy{ak|o);@)Yh8Lkcg@$FG3k@ep36BRa^>~UmnRPziS>Z=`Jb2x*Q#`%A zU*i3&Vg?TluO@X0O;r2Jl6LKLUOVhSqg1*qOt^|8*c7 zo(298@+r$k_wQNGHv{|$tW(T8L+4_`FQ{kEW5Jgg{yf7ey4ss_(SNKfz(N9lx&a;< je(UuV8hP?p&}TPdm1I$XmG#(RzlD&B2izSj9sl%y5~4qc literal 0 HcmV?d00001 diff --git a/examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.properties b/examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..d11cdd907d --- /dev/null +++ b/examples/publish-ci/react-native/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/examples/publish-ci/react-native/android/gradlew b/examples/publish-ci/react-native/android/gradlew new file mode 100644 index 0000000000..0adc8e1a53 --- /dev/null +++ b/examples/publish-ci/react-native/android/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/examples/publish-ci/react-native/android/gradlew.bat b/examples/publish-ci/react-native/android/gradlew.bat new file mode 100644 index 0000000000..6689b85bee --- /dev/null +++ b/examples/publish-ci/react-native/android/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/examples/publish-ci/react-native/android/settings.gradle b/examples/publish-ci/react-native/android/settings.gradle new file mode 100644 index 0000000000..3bccdf847e --- /dev/null +++ b/examples/publish-ci/react-native/android/settings.gradle @@ -0,0 +1,4 @@ +rootProject.name = 'reduxTemplate' +apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) +include ':app' +includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/examples/publish-ci/react-native/app.json b/examples/publish-ci/react-native/app.json new file mode 100644 index 0000000000..ae29bbd5ce --- /dev/null +++ b/examples/publish-ci/react-native/app.json @@ -0,0 +1,4 @@ +{ + "name": "reduxTemplate", + "displayName": "reduxTemplate" +} diff --git a/examples/publish-ci/react-native/babel.config.js b/examples/publish-ci/react-native/babel.config.js new file mode 100644 index 0000000000..ddbabad820 --- /dev/null +++ b/examples/publish-ci/react-native/babel.config.js @@ -0,0 +1,4 @@ +/** @type {import('@babel/core').TransformOptions } */ +module.exports = { + presets: ['module:@react-native/babel-preset'], +}; diff --git a/examples/publish-ci/react-native/globals.d.ts b/examples/publish-ci/react-native/globals.d.ts new file mode 100644 index 0000000000..c0ce308d48 --- /dev/null +++ b/examples/publish-ci/react-native/globals.d.ts @@ -0,0 +1,13 @@ +declare module '*.gif' { + const logo: number; + export default logo; +} + +declare module 'react-native/Libraries/NewAppScreen' { + import type { FC } from 'react'; + export const HermesBadge: FC; +} + +declare module 'react-native/Libraries/Core/Devtools/openURLInBrowser' { + export default function openURLInBrowser(url: string): void; +} diff --git a/examples/publish-ci/react-native/index.js b/examples/publish-ci/react-native/index.js new file mode 100644 index 0000000000..da8755df52 --- /dev/null +++ b/examples/publish-ci/react-native/index.js @@ -0,0 +1,5 @@ +import { AppRegistry } from 'react-native'; +import { App } from './App'; +import { name as appName } from './app.json'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/examples/publish-ci/react-native/ios/.xcode.env b/examples/publish-ci/react-native/ios/.xcode.env new file mode 100644 index 0000000000..3d5782c715 --- /dev/null +++ b/examples/publish-ci/react-native/ios/.xcode.env @@ -0,0 +1,11 @@ +# This `.xcode.env` file is versioned and is used to source the environment +# used when running script phases inside Xcode. +# To customize your local environment, you can create an `.xcode.env.local` +# file that is not versioned. + +# NODE_BINARY variable contains the PATH to the node executable. +# +# Customize the NODE_BINARY variable here. +# For example, to use nvm with brew, add the following line +# . "$(brew --prefix nvm)/nvm.sh" --no-use +export NODE_BINARY=$(command -v node) diff --git a/examples/publish-ci/react-native/ios/Podfile b/examples/publish-ci/react-native/ios/Podfile new file mode 100644 index 0000000000..c5ef878269 --- /dev/null +++ b/examples/publish-ci/react-native/ios/Podfile @@ -0,0 +1,55 @@ +# Resolve react_native_pods.rb with node to allow for hoisting +require Pod::Executable.execute_command('node', ['-p', + 'require.resolve( + "react-native/scripts/react_native_pods.rb", + {paths: [process.argv[1]]}, + )', __dir__]).strip + +platform :ios, min_ios_version_supported +prepare_react_native_project! + +# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. +# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded +# +# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` +# ```js +# module.exports = { +# dependencies: { +# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), +# ``` +flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled + +linkage = ENV['USE_FRAMEWORKS'] +if linkage != nil + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym +end + +target 'reduxTemplate' do + config = use_native_modules! + + use_react_native!( + :path => config[:reactNativePath], + # Enables Flipper. + # + # Note that if you have use_frameworks! enabled, Flipper will not work and + # you should disable the next line. + :flipper_configuration => flipper_config, + # An absolute path to your application root. + :app_path => "#{Pod::Config.instance.installation_root}/.." + ) + + target 'reduxTemplateTests' do + inherit! :complete + # Pods for testing + end + + post_install do |installer| + # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 + react_native_post_install( + installer, + config[:reactNativePath], + :mac_catalyst_enabled => false + ) + end +end diff --git a/examples/publish-ci/react-native/ios/reactnativetemplate.xcodeproj/project.pbxproj b/examples/publish-ci/react-native/ios/reactnativetemplate.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..197d5f624a --- /dev/null +++ b/examples/publish-ci/react-native/ios/reactnativetemplate.xcodeproj/project.pbxproj @@ -0,0 +1,686 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* reactnativetemplateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* reactnativetemplateTests.m */; }; + 0C80B921A6F3F58F76C31292 /* libPods-reactnativetemplate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-reactnativetemplate.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 7699B88040F8A987B510C191 /* libPods-reactnativetemplate-reactnativetemplateTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reactnativetemplate-reactnativetemplateTests.a */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = "reactnativetemplate"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00E356EE1AD99517003FC87E /* reactnativetemplateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "reactnativetemplateTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* reactnativetemplateTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "reactnativetemplateTests.m"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* reactnativetemplate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "reactnativetemplate.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "reactnativetemplate/AppDelegate.h"; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = "reactnativetemplate/AppDelegate.mm"; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "reactnativetemplate/Images.xcassets"; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "reactnativetemplate/Info.plist"; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "reactnativetemplate/main.m"; sourceTree = ""; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reactnativetemplate-reactnativetemplateTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reactnativetemplate-reactnativetemplateTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B4392A12AC88292D35C810B /* Pods-reactnativetemplate.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativetemplate.debug.xcconfig"; path = "Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-reactnativetemplate.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativetemplate.release.xcconfig"; path = "Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate.release.xcconfig"; sourceTree = ""; }; + 5B7EB9410499542E8C5724F5 /* Pods-reactnativetemplate-reactnativetemplateTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativetemplate-reactnativetemplateTests.debug.xcconfig"; path = "Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests.debug.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-reactnativetemplate.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reactnativetemplate.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = "reactnativetemplate/LaunchScreen.storyboard"; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-reactnativetemplate-reactnativetemplateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativetemplate-reactnativetemplateTests.release.xcconfig"; path = "Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests.release.xcconfig"; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7699B88040F8A987B510C191 /* libPods-reactnativetemplate-reactnativetemplateTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C80B921A6F3F58F76C31292 /* libPods-reactnativetemplate.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* reactnativetemplateTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* reactnativetemplateTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = "reactnativetemplateTests"; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* reactnativetemplate */ = { + isa = PBXGroup; + children = ( + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.mm */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = "reactnativetemplate"; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + 5DCACB8F33CDC322A6C60F78 /* libPods-reactnativetemplate.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reactnativetemplate-reactnativetemplateTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* reactnativetemplate */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* reactnativetemplateTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + BBD78D7AC51CEA395F1C20DB /* Pods */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* reactnativetemplate.app */, + 00E356EE1AD99517003FC87E /* reactnativetemplateTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BBD78D7AC51CEA395F1C20DB /* Pods */ = { + isa = PBXGroup; + children = ( + 3B4392A12AC88292D35C810B /* Pods-reactnativetemplate.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-reactnativetemplate.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-reactnativetemplate-reactnativetemplateTests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-reactnativetemplate-reactnativetemplateTests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* reactnativetemplateTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactnativetemplateTests" */; + buildPhases = ( + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = reactnativetemplateTests; + productName = reactnativetemplateTests; + productReference = 00E356EE1AD99517003FC87E /* reactnativetemplateTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* reactnativetemplate */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactnativetemplate" */; + buildPhases = ( + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "reactnativetemplate"; + productName = "reactnativetemplate"; + productReference = 13B07F961A680F5B00A75B9A /* reactnativetemplate.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactnativetemplate" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* reactnativetemplate */, + 00E356ED1AD99517003FC87E /* reactnativetemplateTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + }; + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-reactnativetemplate-reactnativetemplateTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-reactnativetemplate-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate/Pods-reactnativetemplate-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativetemplate-reactnativetemplateTests/Pods-reactnativetemplate-reactnativetemplateTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* reactnativetemplateTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* reactnativetemplate */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-reactnativetemplate-reactnativetemplateTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "reactnativetemplateTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactnativetemplate.app/reactnativetemplate"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-reactnativetemplate-reactnativetemplateTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = "reactnativetemplateTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactnativetemplate.app/reactnativetemplate"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-reactnativetemplate.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = "reactnativetemplate/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "reduxTemplate"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "reactnativetemplate"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-reactnativetemplate.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = "reactnativetemplate/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "reduxTemplate"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "reactnativetemplate"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + ); + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + ); + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactnativetemplateTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactnativetemplate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactnativetemplate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/examples/publish-ci/react-native/ios/reactnativetemplate/AppDelegate.mm b/examples/publish-ci/react-native/ios/reactnativetemplate/AppDelegate.mm new file mode 100644 index 0000000000..fabca9073a --- /dev/null +++ b/examples/publish-ci/react-native/ios/reactnativetemplate/AppDelegate.mm @@ -0,0 +1,31 @@ +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"reduxTemplate"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self getBundleURL]; +} + +- (NSURL *)getBundleURL +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/examples/publish-ci/react-native/ios/reactnativetemplate/Info.plist b/examples/publish-ci/react-native/ios/reactnativetemplate/Info.plist new file mode 100644 index 0000000000..201411477c --- /dev/null +++ b/examples/publish-ci/react-native/ios/reactnativetemplate/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + reduxTemplate + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/examples/publish-ci/react-native/ios/reactnativetemplate/LaunchScreen.storyboard b/examples/publish-ci/react-native/ios/reactnativetemplate/LaunchScreen.storyboard new file mode 100644 index 0000000000..a3202c1149 --- /dev/null +++ b/examples/publish-ci/react-native/ios/reactnativetemplate/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/project.pbxproj b/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..f379fd6523 --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/project.pbxproj @@ -0,0 +1,686 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* reduxTemplateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* reduxTemplateTests.m */; }; + 0C80B921A6F3F58F76C31292 /* libPods-reduxTemplate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-reduxTemplate.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 7699B88040F8A987B510C191 /* libPods-reduxTemplate-reduxTemplateTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reduxTemplate-reduxTemplateTests.a */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = "reduxTemplate"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00E356EE1AD99517003FC87E /* reduxTemplateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "reduxTemplateTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* reduxTemplateTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "reduxTemplateTests.m"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* reduxTemplate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "reduxTemplate.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "reduxTemplate/AppDelegate.h"; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = "reduxTemplate/AppDelegate.mm"; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "reduxTemplate/Images.xcassets"; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "reduxTemplate/Info.plist"; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "reduxTemplate/main.m"; sourceTree = ""; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reduxTemplate-reduxTemplateTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reduxTemplate-reduxTemplateTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B4392A12AC88292D35C810B /* Pods-reduxTemplate.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reduxTemplate.debug.xcconfig"; path = "Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-reduxTemplate.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reduxTemplate.release.xcconfig"; path = "Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate.release.xcconfig"; sourceTree = ""; }; + 5B7EB9410499542E8C5724F5 /* Pods-reduxTemplate-reduxTemplateTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reduxTemplate-reduxTemplateTests.debug.xcconfig"; path = "Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests.debug.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-reduxTemplate.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reduxTemplate.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = "reduxTemplate/LaunchScreen.storyboard"; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-reduxTemplate-reduxTemplateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reduxTemplate-reduxTemplateTests.release.xcconfig"; path = "Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests.release.xcconfig"; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7699B88040F8A987B510C191 /* libPods-reduxTemplate-reduxTemplateTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C80B921A6F3F58F76C31292 /* libPods-reduxTemplate.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* reduxTemplateTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* reduxTemplateTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = "reduxTemplateTests"; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* reduxTemplate */ = { + isa = PBXGroup; + children = ( + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.mm */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = "reduxTemplate"; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + 5DCACB8F33CDC322A6C60F78 /* libPods-reduxTemplate.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-reduxTemplate-reduxTemplateTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* reduxTemplate */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* reduxTemplateTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + BBD78D7AC51CEA395F1C20DB /* Pods */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* reduxTemplate.app */, + 00E356EE1AD99517003FC87E /* reduxTemplateTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BBD78D7AC51CEA395F1C20DB /* Pods */ = { + isa = PBXGroup; + children = ( + 3B4392A12AC88292D35C810B /* Pods-reduxTemplate.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-reduxTemplate.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-reduxTemplate-reduxTemplateTests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-reduxTemplate-reduxTemplateTests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* reduxTemplateTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reduxTemplateTests" */; + buildPhases = ( + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = "reduxTemplateTests"; + productname = "reduxTemplateTests"; + productReference = 00E356EE1AD99517003FC87E /* reduxTemplateTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* reduxTemplate */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reduxTemplate" */; + buildPhases = ( + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "reduxTemplate"; + productName = "reduxTemplate"; + productReference = 13B07F961A680F5B00A75B9A /* reduxTemplate.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reduxTemplate" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* reduxTemplate */, + 00E356ED1AD99517003FC87E /* reduxTemplateTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + }; + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-reduxTemplate-reduxTemplateTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-reduxTemplate-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reduxTemplate/Pods-reduxTemplate-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reduxTemplate-reduxTemplateTests/Pods-reduxTemplate-reduxTemplateTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* reduxTemplateTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* reduxTemplate */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-reduxTemplate-reduxTemplateTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "reduxTemplateTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reduxTemplate.app/reduxTemplate"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-reduxTemplate-reduxTemplateTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = "reduxTemplateTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reduxTemplate.app/reduxTemplate"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-reduxTemplate.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = "reduxTemplate/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "reduxTemplate"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "reduxTemplate"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-reduxTemplate.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = "reduxTemplate/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "reduxTemplate"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "reduxTemplate"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + ); + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + ); + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reduxTemplateTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reduxTemplate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reduxTemplate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/xcshareddata/xcschemes/reduxTemplate.xcscheme b/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/xcshareddata/xcschemes/reduxTemplate.xcscheme new file mode 100644 index 0000000000..974dd99db4 --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate.xcodeproj/xcshareddata/xcschemes/reduxTemplate.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.h b/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.h new file mode 100644 index 0000000000..5d2808256c --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : RCTAppDelegate + +@end diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.mm b/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.mm new file mode 100644 index 0000000000..fabca9073a --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/AppDelegate.mm @@ -0,0 +1,31 @@ +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"reduxTemplate"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self getBundleURL]; +} + +- (NSURL *)getBundleURL +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..81213230de --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json new file mode 100644 index 0000000000..2d92bd53fd --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/Info.plist b/examples/publish-ci/react-native/ios/reduxTemplate/Info.plist new file mode 100644 index 0000000000..201411477c --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + reduxTemplate + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/LaunchScreen.storyboard b/examples/publish-ci/react-native/ios/reduxTemplate/LaunchScreen.storyboard new file mode 100644 index 0000000000..a3202c1149 --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/main.m b/examples/publish-ci/react-native/ios/reduxTemplate/main.m new file mode 100644 index 0000000000..d645c7246c --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplate/main.m @@ -0,0 +1,10 @@ +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/examples/publish-ci/react-native/ios/reduxTemplateTests/Info.plist b/examples/publish-ci/react-native/ios/reduxTemplateTests/Info.plist new file mode 100644 index 0000000000..ba72822e87 --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplateTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/examples/publish-ci/react-native/ios/reduxTemplateTests/reduxTemplateTests.m b/examples/publish-ci/react-native/ios/reduxTemplateTests/reduxTemplateTests.m new file mode 100644 index 0000000000..e4a8819c3f --- /dev/null +++ b/examples/publish-ci/react-native/ios/reduxTemplateTests/reduxTemplateTests.m @@ -0,0 +1,66 @@ +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React" + +@interface reduxTemplateTests : XCTestCase + +@end + +@implementation reduxTemplateTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; +#ifdef DEBUG + RCTSetLogFunction( + ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); +#endif + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + +#ifdef DEBUG + RCTSetLogFunction(RCTDefaultLogFunction); +#endif + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + +@end diff --git a/examples/publish-ci/react-native/jest-setup.ts b/examples/publish-ci/react-native/jest-setup.ts new file mode 100644 index 0000000000..1d3ff30752 --- /dev/null +++ b/examples/publish-ci/react-native/jest-setup.ts @@ -0,0 +1 @@ +import '@testing-library/react-native/extend-expect'; diff --git a/examples/publish-ci/react-native/jest.config.ts b/examples/publish-ci/react-native/jest.config.ts new file mode 100644 index 0000000000..8db50d9c40 --- /dev/null +++ b/examples/publish-ci/react-native/jest.config.ts @@ -0,0 +1,10 @@ +import type { Config } from 'jest'; + +const config: Config = { + preset: 'react-native', + testEnvironment: 'node', + setupFilesAfterEnv: ['./jest-setup.ts'], + fakeTimers: { enableGlobally: true }, +}; + +export default config; diff --git a/examples/publish-ci/react-native/metro.config.js b/examples/publish-ci/react-native/metro.config.js new file mode 100644 index 0000000000..5bd4785bdb --- /dev/null +++ b/examples/publish-ci/react-native/metro.config.js @@ -0,0 +1,12 @@ +/** @type {Pick & { getDefaultConfig: import('metro-config').getDefaultConfig }} */ +const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); + +/** + * Metro configuration + * https://facebook.github.io/metro/docs/configuration + * + * @type {import('metro-config').MetroConfig} + */ +const config = {}; + +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json new file mode 100644 index 0000000000..81793461f1 --- /dev/null +++ b/examples/publish-ci/react-native/package.json @@ -0,0 +1,48 @@ +{ + "name": "react-native-template-redux-typescript", + "version": "0.0.1", + "private": true, + "scripts": { + "build": "react-native build-android && react-native build-ios", + "android": "react-native run-android", + "ios": "react-native run-ios", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "format": "prettier --write \"./**/*.{js,ts,tsx}\"", + "start": "react-native start", + "test": "jest", + "type-check": "tsc --noEmit" + }, + "dependencies": { + "@reduxjs/toolkit": "^2.0.1", + "react": "18.2.0", + "react-native": "^0.73.0", + "react-redux": "^9.0.4" + }, + "devDependencies": { + "@babel/core": "^7.20.0", + "@babel/preset-env": "^7.20.0", + "@babel/runtime": "^7.20.0", + "@react-native/babel-preset": "^0.73.18", + "@react-native/eslint-config": "^0.73.1", + "@react-native/metro-config": "^0.73.2", + "@react-native/typescript-config": "^0.73.1", + "@testing-library/react-native": "^12.4.1", + "@types/jest": "^29.5.11", + "@types/react": "^18.2.6", + "@types/react-test-renderer": "^18.0.7", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "babel-jest": "^29.6.3", + "eslint": "^8.56.0", + "eslint-plugin-prettier": "^5.0.1", + "jest": "^29.7.0", + "prettier": "^3.1.1", + "react-test-renderer": "18.2.0", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" + }, + "engines": { + "node": ">=18" + } +} diff --git a/examples/publish-ci/react-native/react-native.config.js b/examples/publish-ci/react-native/react-native.config.js new file mode 100644 index 0000000000..bdceb0b1cc --- /dev/null +++ b/examples/publish-ci/react-native/react-native.config.js @@ -0,0 +1,8 @@ +/** @type {import('@react-native-community/cli-types').UserConfig } */ +module.exports = { + project: { + ios: { + automaticPodsInstallation: true, + }, + }, +}; diff --git a/examples/publish-ci/react-native/src/app/hooks.ts b/examples/publish-ci/react-native/src/app/hooks.ts new file mode 100644 index 0000000000..fe7b5087f8 --- /dev/null +++ b/examples/publish-ci/react-native/src/app/hooks.ts @@ -0,0 +1,46 @@ +import { useEffect, useRef } from 'react'; +import { Animated, useWindowDimensions } from 'react-native'; +import type { TypedUseSelectorHook } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; +import type { AppDispatch, RootState } from './store'; + +// Use throughout your app instead of plain `useDispatch` and `useSelector` +export const useAppDispatch: () => AppDispatch = useDispatch; +export const useAppSelector: TypedUseSelectorHook = useSelector; + +export const useViewportUnits = () => { + const { width, height } = useWindowDimensions(); + + const vh = height / 100; + const vw = width / 100; + + return { vh, vw }; +}; + +export const useBounceAnimation = (value = 10) => { + const bounce = useRef(new Animated.Value(0)).current; + + bounce.interpolate({ + inputRange: [-300, -100, 0, 100, 101], + outputRange: [300, 0, 1, 0, 0], + }); + + useEffect(() => { + Animated.loop( + Animated.sequence([ + Animated.timing(bounce, { + toValue: value, + duration: 1500, + useNativeDriver: true, + }), + Animated.timing(bounce, { + toValue: 0, + duration: 1500, + useNativeDriver: true, + }), + ]), + ).start(); + }, [bounce, value]); + + return bounce; +}; diff --git a/examples/publish-ci/react-native/src/app/store.ts b/examples/publish-ci/react-native/src/app/store.ts new file mode 100644 index 0000000000..0191c5c97b --- /dev/null +++ b/examples/publish-ci/react-native/src/app/store.ts @@ -0,0 +1,20 @@ +import type { Action, ThunkAction } from '@reduxjs/toolkit'; +import { configureStore } from '@reduxjs/toolkit'; +import { counterSlice } from '../features/counter/counterSlice'; + +export const store = configureStore({ + reducer: { + [counterSlice.reducerPath]: counterSlice.reducer, + }, +}); + +// Infer the `RootState` and `AppDispatch` types from the store itself +export type RootState = ReturnType; +// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} +export type AppDispatch = typeof store.dispatch; +export type AppThunk = ThunkAction< + ReturnType, + RootState, + unknown, + Action +>; diff --git a/examples/publish-ci/react-native/src/components/AsyncButton.tsx b/examples/publish-ci/react-native/src/components/AsyncButton.tsx new file mode 100644 index 0000000000..98ae2c564e --- /dev/null +++ b/examples/publish-ci/react-native/src/components/AsyncButton.tsx @@ -0,0 +1,74 @@ +import type { FC, PropsWithChildren } from 'react'; +import { useRef } from 'react'; +import type { + GestureResponderEvent, + PressableProps, + ViewStyle, +} from 'react-native'; +import { Animated, Pressable, StyleSheet, View } from 'react-native'; + +type AsyncButtonProps = PressableProps & PropsWithChildren; + +export const AsyncButton: FC = ({ + onPress, + style, + children, + ...restProps +}) => { + const progress = useRef(new Animated.Value(0)).current; + const opacity = useRef(new Animated.Value(1)).current; + + const _onPress = (e: GestureResponderEvent) => { + progress.setValue(0); + opacity.setValue(1); + + onPress?.(e); + + // TODO: Maybe change to Animated.sequence + Animated.timing(progress, { + toValue: 1, + duration: 1000, + useNativeDriver: false, + }).start(({ finished }) => { + if (!finished) { + return; + } + + Animated.timing(opacity, { + toValue: 0, + duration: 200, + useNativeDriver: false, + }).start(); + }); + }; + + const progressInterpolate = progress.interpolate({ + inputRange: [0, 1], + outputRange: ['0%', '100%'], + extrapolate: 'clamp', + }); + + const progressStyle: Animated.WithAnimatedObject = { + width: progressInterpolate, + opacity, + }; + + return ( + + + + + {children} + + ); +}; + +const styles = StyleSheet.create({ + progress: { + position: 'absolute', + top: 0, + bottom: 0, + left: 0, + backgroundColor: 'rgba(112,76,182, 0.15)', + }, +}); diff --git a/examples/publish-ci/react-native/src/components/Header.tsx b/examples/publish-ci/react-native/src/components/Header.tsx new file mode 100644 index 0000000000..0cfd4f3f1f --- /dev/null +++ b/examples/publish-ci/react-native/src/components/Header.tsx @@ -0,0 +1,32 @@ +import { Animated, StyleSheet, View, useColorScheme } from 'react-native'; +import { useBounceAnimation, useViewportUnits } from '../app/hooks'; +import { TypedColors } from '../constants/TypedColors'; +import logo from './logo.gif'; + +export const Header = () => { + const isDarkMode = useColorScheme() === 'dark'; + const { vh } = useViewportUnits(); + const bounce = useBounceAnimation(); + const height = 40 * vh; + + return ( + + + + ); +}; + +const styles = StyleSheet.create({ + container: { + flexDirection: 'row', + justifyContent: 'center', + }, +}); diff --git a/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx b/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx new file mode 100644 index 0000000000..318aae0d1b --- /dev/null +++ b/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx @@ -0,0 +1,110 @@ +import type { FC } from 'react'; +import React from 'react'; +import { + StyleSheet, + Text, + TouchableOpacity, + View, + useColorScheme, +} from 'react-native'; +import openURLInBrowser from 'react-native/Libraries/Core/Devtools/openURLInBrowser'; +import { TypedColors } from '../constants/TypedColors'; + +interface Link { + title: string; + link: string; + description: string; +} + +const links: Link[] = [ + { + title: 'React', + link: 'https://reactjs.org/', + description: 'JavaScript library for building user interfaces', + }, + { + title: 'Redux', + link: 'https://redux.js.org/', + description: 'A Predictable State Container for JS Apps', + }, + { + title: 'Redux Toolkit', + link: 'https://redux-toolkit.js.org/', + description: + 'The official, opinionated, batteries-included toolset for efficient Redux development', + }, + { + title: 'React Redux', + link: 'https://react-redux.js.org', + description: 'Official React bindings for Redux', + }, +]; + +export const LearnReduxLinks: FC = () => { + const isDarkMode = useColorScheme() === 'dark'; + + return ( + + {links.map((item, index) => { + return ( + + + { + openURLInBrowser(item.link); + }} + style={styles.linkContainer}> + {item.title} + + {item.description} + + + + ); + })} + + ); +}; + +const styles = StyleSheet.create({ + container: { + marginTop: 32, + paddingHorizontal: 24, + }, + linkContainer: { + flexWrap: 'wrap', + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + paddingVertical: 8, + }, + link: { + flex: 2, + fontSize: 18, + fontWeight: '400', + color: TypedColors.primary, + }, + description: { + flex: 3, + paddingVertical: 16, + fontWeight: '400', + fontSize: 18, + }, + separator: { + height: 1, + }, +}); diff --git a/examples/publish-ci/react-native/src/components/Section.tsx b/examples/publish-ci/react-native/src/components/Section.tsx new file mode 100644 index 0000000000..84eb4995d8 --- /dev/null +++ b/examples/publish-ci/react-native/src/components/Section.tsx @@ -0,0 +1,46 @@ +import type { FC, PropsWithChildren } from 'react'; +import { StyleSheet, Text, View, useColorScheme } from 'react-native'; +import { TypedColors } from '../constants/TypedColors'; + +type SectionProps = PropsWithChildren<{ + title: string; +}>; + +export const Section: FC = ({ children, title }) => { + const isDarkMode = useColorScheme() === 'dark'; + + return ( + + + {title} + + + {children} + + + ); +}; + +const styles = StyleSheet.create({ + sectionContainer: { + marginTop: 32, + paddingHorizontal: 24, + }, + sectionTitle: { + fontSize: 24, + fontWeight: '600', + }, + sectionDescription: { + marginTop: 8, + fontSize: 18, + fontWeight: '400', + }, +}); diff --git a/examples/publish-ci/react-native/src/components/logo.gif b/examples/publish-ci/react-native/src/components/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..f0722c62fed6b5985b739f53a23109b588c6cab3 GIT binary patch literal 5961 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 { + const [incrementAmount, setIncrementAmount] = useState('2'); + const count = useAppSelector(selectCount); + const status = useAppSelector(state => state.counter.status); + const dispatch = useAppDispatch(); + + const incrementValue = Number(incrementAmount) || 0; + + return ( + + + dispatch(increment())}> + + + + {count} + dispatch(decrement())}> + - + + + + + + dispatch(incrementByAmount(incrementValue))}> + Add Amount + + { + dispatch(incrementAsync(incrementValue)).catch(console.log); + }}> + Add Async + + { + dispatch(incrementIfOdd(incrementValue)); + }}> + Add If Odd + + + + + ); +}; + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + flexWrap: 'wrap', + }, + value: { + fontSize: 78, + paddingHorizontal: 16, + marginTop: 2, + }, + button: { + backgroundColor: 'rgba(112, 76, 182, 0.1)', + borderRadius: 2, + paddingLeft: 12, + paddingRight: 12, + paddingBottom: 4, + margin: 2, + }, + buttonText: { + color: 'rgb(112, 76, 182)', + fontSize: 32, + textAlign: 'center', + }, + textbox: { + fontSize: 48, + padding: 2, + width: 64, + textAlign: 'center', + marginRight: 8, + borderWidth: 1, + justifyContent: 'center', + }, +}); diff --git a/examples/publish-ci/react-native/src/features/counter/counterAPI.ts b/examples/publish-ci/react-native/src/features/counter/counterAPI.ts new file mode 100644 index 0000000000..c5b686e81d --- /dev/null +++ b/examples/publish-ci/react-native/src/features/counter/counterAPI.ts @@ -0,0 +1,8 @@ +// A mock function to mimic making an async request for data +export const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>(resolve => + setTimeout(() => { + resolve({ data: amount }); + }, 500), + ); +}; diff --git a/examples/publish-ci/react-native/src/features/counter/counterSlice.ts b/examples/publish-ci/react-native/src/features/counter/counterSlice.ts new file mode 100644 index 0000000000..d3e0750f1b --- /dev/null +++ b/examples/publish-ci/react-native/src/features/counter/counterSlice.ts @@ -0,0 +1,88 @@ +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; +import type { AppThunk } from '../../app/store'; +import { fetchCount } from './counterAPI'; + +export interface CounterState { + value: number; + status: 'idle' | 'loading' | 'failed'; +} + +const initialState: CounterState = { + value: 0, + status: 'idle', +}; + +// The function below is called a thunk and allows us to perform async logic. It +// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This +// will call the thunk with the `dispatch` function as the first argument. Async +// code can then be executed and other actions can be dispatched. Thunks are +// typically used to make async requests. +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount); + // The value we return becomes the `fulfilled` action payload + return response.data; + }, +); + +export const counterSlice = createSlice({ + name: 'counter', + // `createSlice` will infer the state type from the `initialState` argument + initialState, + // The `reducers` field lets us define reducers and generate associated actions + reducers: { + increment: state => { + // Redux Toolkit allows us to write "mutating" logic in reducers. It + // doesn't actually mutate the state because it uses the Immer library, + // which detects changes to a "draft state" and produces a brand new + // immutable state based off those changes + state.value += 1; + }, + decrement: state => { + state.value -= 1; + }, + // Use the `PayloadAction` type to declare the contents of `action.payload` + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload; + }, + }, + + // The `extraReducers` field lets the slice handle actions defined elsewhere, + // including actions generated by createAsyncThunk or in other slices. + extraReducers: builder => { + builder + .addCase(incrementAsync.pending, state => { + state.status = 'loading'; + }) + .addCase(incrementAsync.fulfilled, (state, action) => { + state.status = 'idle'; + state.value += action.payload; + }) + .addCase(incrementAsync.rejected, state => { + state.status = 'failed'; + }); + }, + + selectors: { + selectCount: counter => counter.value, + }, +}); + +// Action creators are generated for each case reducer function +export const { increment, decrement, incrementByAmount } = counterSlice.actions; + +// Other code such as selectors can use the imported `RootState` type +export const { selectCount } = counterSlice.selectors; + +// We can also write thunks by hand, which may contain both sync and async logic. +// Here's an example of conditionally dispatching actions based on current state. +export const incrementIfOdd = + (amount: number): AppThunk => + (dispatch, getState) => { + const currentValue = selectCount(getState()); + if (currentValue % 2 === 1) { + dispatch(incrementByAmount(amount)); + } + }; diff --git a/examples/publish-ci/react-native/tsconfig.json b/examples/publish-ci/react-native/tsconfig.json new file mode 100644 index 0000000000..304ab4e2d8 --- /dev/null +++ b/examples/publish-ci/react-native/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@react-native/typescript-config/tsconfig.json" +} diff --git a/examples/publish-ci/react-native/yarn.lock b/examples/publish-ci/react-native/yarn.lock new file mode 100644 index 0000000000..b8195005ff --- /dev/null +++ b/examples/publish-ci/react-native/yarn.lock @@ -0,0 +1,10178 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@aashutoshrathi/word-wrap@npm:^1.2.3": + version: 1.2.6 + resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" + checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd + languageName: node + linkType: hard + +"@ampproject/remapping@npm:^2.2.0": + version: 2.2.1 + resolution: "@ampproject/remapping@npm:2.2.1" + dependencies: + "@jridgewell/gen-mapping": ^0.3.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/code-frame@npm:7.23.5" + dependencies: + "@babel/highlight": ^7.23.4 + chalk: ^2.4.2 + checksum: d90981fdf56a2824a9b14d19a4c0e8db93633fd488c772624b4e83e0ceac6039a27cd298a247c3214faa952bf803ba23696172ae7e7235f3b97f43ba278c569a + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/compat-data@npm:7.23.5" + checksum: 06ce244cda5763295a0ea924728c09bae57d35713b675175227278896946f922a63edf803c322f855a3878323d48d0255a2a3023409d2a123483c8a69ebb4744 + languageName: node + linkType: hard + +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.0": + version: 7.23.6 + resolution: "@babel/core@npm:7.23.6" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helpers": ^7.23.6 + "@babel/parser": ^7.23.6 + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.6 + "@babel/types": ^7.23.6 + convert-source-map: ^2.0.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 4bddd1b80394a64b2ee33eeb216e8a2a49ad3d74f0ca9ba678c84a37f4502b2540662d72530d78228a2a349fda837fa852eea5cd3ae28465d1188acc6055868e + languageName: node + linkType: hard + +"@babel/eslint-parser@npm:^7.20.0": + version: 7.23.3 + resolution: "@babel/eslint-parser@npm:7.23.3" + dependencies: + "@nicolo-ribaudo/eslint-scope-5-internals": 5.1.1-v1 + eslint-visitor-keys: ^2.1.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.11.0 + eslint: ^7.5.0 || ^8.0.0 + checksum: 9573daebe21af5123c302c307be80cacf1c2bf236a9497068a14726d3944ef55e1282519d0ccf51882dfc369359a3442299c98cb22a419e209924db39d4030fd + languageName: node + linkType: hard + +"@babel/generator@npm:^7.20.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2": + version: 7.23.6 + resolution: "@babel/generator@npm:7.23.6" + dependencies: + "@babel/types": ^7.23.6 + "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 + jsesc: ^2.5.1 + checksum: 1a1a1c4eac210f174cd108d479464d053930a812798e09fee069377de39a893422df5b5b146199ead7239ae6d3a04697b45fc9ac6e38e0f6b76374390f91fc6c + languageName: node + linkType: hard + +"@babel/helper-annotate-as-pure@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d + languageName: node + linkType: hard + +"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: 639c697a1c729f9fafa2dd4c9af2e18568190299b5907bd4c2d0bc818fcbd1e83ffeecc2af24327a7faa7ac4c34edd9d7940510a5e66296c19bad17001cf5c7a + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" + dependencies: + "@babel/compat-data": ^7.23.5 + "@babel/helper-validator-option": ^7.23.5 + browserslist: ^4.22.2 + lru-cache: ^5.1.1 + semver: ^6.3.1 + checksum: c630b98d4527ac8fe2c58d9a06e785dfb2b73ec71b7c4f2ddf90f814b5f75b547f3c015f110a010fd31f76e3864daaf09f3adcd2f6acdbfb18a8de3a48717590 + languageName: node + linkType: hard + +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-member-expression-to-functions": ^7.23.0 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 356b71b9f4a3a95917432bf6a452f475a292d394d9310e9c8b23c8edb564bee91e40d4290b8aa8779d2987a7c39ae717b2d76edc7c952078b8952df1a20259e3 + languageName: node + linkType: hard + +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.15, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + regexpu-core: ^5.3.1 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 0243b8d4854f1dc8861b1029a46d3f6393ad72f366a5a08e36a4648aa682044f06da4c6e87a456260e1e1b33c999f898ba591a0760842c1387bcc93fbf2151a6 + languageName: node + linkType: hard + +"@babel/helper-define-polyfill-provider@npm:^0.4.4": + version: 0.4.4 + resolution: "@babel/helper-define-polyfill-provider@npm:0.4.4" + dependencies: + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-plugin-utils": ^7.22.5 + debug: ^4.1.1 + lodash.debounce: ^4.0.8 + resolve: ^1.14.2 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 2453cdd79f18a4cb8653d8a7e06b2eb0d8e31bae0d35070fc5abadbddca246a36d82b758064b421cca49b48d0e696d331d54520ba8582c1d61fb706d6d831817 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.22.5, @babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": ^7.22.15 + "@babel/types": ^7.23.0 + checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + languageName: node + linkType: hard + +"@babel/helper-member-expression-to-functions@npm:^7.22.15, @babel/helper-member-expression-to-functions@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" + dependencies: + "@babel/types": ^7.23.0 + checksum: 494659361370c979ada711ca685e2efe9460683c36db1b283b446122596602c901e291e09f2f980ecedfe6e0f2bd5386cb59768285446530df10c14df1024e75 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-module-imports@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: ecd7e457df0a46f889228f943ef9b4a47d485d82e030676767e6a2fdcbdaa63594d8124d4b55fd160b41c201025aec01fc27580352b1c87a37c9c6f33d116702 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/helper-module-transforms@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 + languageName: node + linkType: hard + +"@babel/helper-optimise-call-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: c0fc7227076b6041acd2f0e818145d2e8c41968cc52fb5ca70eed48e21b8fe6dd88a0a91cbddf4951e33647336eb5ae184747ca706817ca3bef5e9e905151ff5 + languageName: node + linkType: hard + +"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-wrap-function": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 + languageName: node + linkType: hard + +"@babel/helper-replace-supers@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-simple-access@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: fe9686714caf7d70aedb46c3cce090f8b915b206e09225f1e4dbc416786c2fdbbee40b38b23c268b7ccef749dd2db35f255338fb4f2444429874d900dede5ad2 + languageName: node + linkType: hard + +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" + dependencies: + "@babel/types": ^7.22.5 + checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/helper-string-parser@npm:7.23.4" + checksum: c0641144cf1a7e7dc93f3d5f16d5327465b6cf5d036b48be61ecba41e1eece161b48f46b7f960951b67f8c3533ce506b16dece576baef4d8b3b49f8c65410f90 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + +"@babel/helper-wrap-function@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-wrap-function@npm:7.22.20" + dependencies: + "@babel/helper-function-name": ^7.22.5 + "@babel/template": ^7.22.15 + "@babel/types": ^7.22.19 + checksum: 221ed9b5572612aeb571e4ce6a256f2dee85b3c9536f1dd5e611b0255e5f59a3d0ec392d8d46d4152149156a8109f92f20379b1d6d36abb613176e0e33f05fca + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helpers@npm:7.23.6" + dependencies: + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.6 + "@babel/types": ^7.23.6 + checksum: c5ba62497e1d717161d107c4b3de727565c68b6b9f50f59d6298e613afeca8895799b227c256e06d362e565aec34e26fb5c675b9c3d25055c52b945a21c21e21 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/highlight@npm:7.23.4" + dependencies: + "@babel/helper-validator-identifier": ^7.22.20 + chalk: ^2.4.2 + js-tokens: ^4.0.0 + checksum: 643acecdc235f87d925979a979b539a5d7d1f31ae7db8d89047269082694122d11aa85351304c9c978ceeb6d250591ccadb06c366f358ccee08bb9c122476b89 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/parser@npm:7.23.6" + bin: + parser: ./bin/babel-parser.js + checksum: 140801c43731a6c41fd193f5c02bc71fd647a0360ca616b23d2db8be4b9739b9f951a03fc7c2db4f9b9214f4b27c1074db0f18bc3fa653783082d5af7c8860d5 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: ddbaf2c396b7780f15e80ee01d6dd790db076985f3dfeb6527d1a8d4cacf370e49250396a3aa005b2c40233cac214a106232f83703d5e8491848bde273938232 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-transform-optional-chaining": ^7.23.3 + peerDependencies: + "@babel/core": ^7.13.0 + checksum: 434b9d710ae856fa1a456678cc304fbc93915af86d581ee316e077af746a709a741ea39d7e1d4f5b98861b629cc7e87f002d3138f5e836775632466d4c74aef2 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 4690123f0ef7c11d6bf1a9579e4f463ce363563b75ec3f6ca66cf68687e39d8d747a82c833847653962f79da367eca895d9095c60d8ebb224a1d4277003acc11 + languageName: node + linkType: hard + +"@babel/plugin-proposal-async-generator-functions@npm:^7.0.0": + version: 7.20.7 + resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-remap-async-to-generator": ^7.18.9 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 111109ee118c9e69982f08d5e119eab04190b36a0f40e22e873802d941956eee66d2aa5a15f5321e51e3f9aa70a91136451b987fe15185ef8cc547ac88937723 + languageName: node + linkType: hard + +"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 49a78a2773ec0db56e915d9797e44fd079ab8a9b2e1716e0df07c92532f2c65d76aeda9543883916b8e0ff13606afeffa67c5b93d05b607bc87653ad18a91422 + languageName: node + linkType: hard + +"@babel/plugin-proposal-export-default-from@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-proposal-export-default-from@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-default-from": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f5a438413b8728cbf5a76ef65510418e5e2e1c82292ee4a031a0c941bee488f7e7dec960c1fd314a42bfadf40ffa9a4ef5c1aa1b3c906b9bc140d4530e7bc8be + languageName: node + linkType: hard + +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 949c9ddcdecdaec766ee610ef98f965f928ccc0361dd87cf9f88cf4896a6ccd62fce063d4494778e50da99dea63d270a1be574a62d6ab81cbe9d85884bf55a7d + languageName: node + linkType: hard + +"@babel/plugin-proposal-numeric-separator@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec + languageName: node + linkType: hard + +"@babel/plugin-proposal-object-rest-spread@npm:^7.0.0, @babel/plugin-proposal-object-rest-spread@npm:^7.20.0": + version: 7.20.7 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" + dependencies: + "@babel/compat-data": ^7.20.5 + "@babel/helper-compilation-targets": ^7.20.7 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.20.7 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1329db17009964bc644484c660eab717cb3ca63ac0ab0f67c651a028d1bc2ead51dc4064caea283e46994f1b7221670a35cbc0b4beb6273f55e915494b5aa0b2 + languageName: node + linkType: hard + +"@babel/plugin-proposal-optional-catch-binding@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7b5b39fb5d8d6d14faad6cb68ece5eeb2fd550fb66b5af7d7582402f974f5bc3684641f7c192a5a57e0f59acfae4aada6786be1eba030881ddc590666eff4d1e + languageName: node + linkType: hard + +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.20.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 11c5449e01b18bb8881e8e005a577fa7be2fe5688e2382c8822d51f8f7005342a301a46af7b273b1f5645f9a7b894c428eee8526342038a275ef6ba4c8d8d746 + languageName: node + linkType: hard + +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d97745d098b835d55033ff3a7fb2b895b9c5295b08a5759e4f20df325aa385a3e0bc9bd5ad8f2ec554a44d4e6525acfc257b8c5848a1345cb40f26a30e277e91 + languageName: node + linkType: hard + +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 + languageName: node + linkType: hard + +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-properties@npm:^7.0.0, @babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" + dependencies: + "@babel/helper-plugin-utils": ^7.12.13 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-static-block@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 + languageName: node + linkType: hard + +"@babel/plugin-syntax-dynamic-import@npm:^7.8.0, @babel/plugin-syntax-dynamic-import@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd + languageName: node + linkType: hard + +"@babel/plugin-syntax-export-default-from@npm:^7.0.0, @babel/plugin-syntax-export-default-from@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-export-default-from@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 415b752a4c096e1eb65328b5dddde4848178f992356ab058828dfb12267c00f0880b4a4a272edf51f6344af1cc1565ea6dc184063e9454acf3160b9b1a9ef669 + languageName: node + linkType: hard + +"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a + languageName: node + linkType: hard + +"@babel/plugin-syntax-flow@npm:^7.0.0, @babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c6e6f355d6ace5f4a9e7bb19f1fed2398aeb9b62c4c671a189d81b124f9f5bb77c4225b6e85e19339268c60a021c1e49104e450375de5e6bb70612190d9678af + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-assertions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 883e6b35b2da205138caab832d54505271a3fee3fc1e8dc0894502434fc2b5d517cbe93bbfbfef8068a0fb6ec48ebc9eef3f605200a489065ba43d8cddc1c9a7 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-attributes@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9aed7661ffb920ca75df9f494757466ca92744e43072e0848d87fa4aa61a3f2ee5a22198ac1959856c036434b5614a8f46f1fb70298835dbe28220cdd1d4c11e + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b + languageName: node + linkType: hard + +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a + languageName: node + linkType: hard + +"@babel/plugin-syntax-jsx@npm:^7.0.0, @babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.23.3 + resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 89037694314a74e7f0e7a9c8d3793af5bf6b23d80950c29b360db1c66859d67f60711ea437e70ad6b5b4b29affe17eababda841b6c01107c2b638e0493bafb4e + languageName: node + linkType: hard + +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 + languageName: node + linkType: hard + +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.0.0, @babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-object-rest-spread@npm:^7.0.0, @babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-chaining@npm:^7.0.0, @babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 + languageName: node + linkType: hard + +"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda + languageName: node + linkType: hard + +"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e + languageName: node + linkType: hard + +"@babel/plugin-syntax-typescript@npm:^7.23.3, @babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.23.3 + resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: abfad3a19290d258b028e285a1f34c9b8a0cbe46ef79eafed4ed7ffce11b5d0720b5e536c82f91cbd8442cde35a3dd8e861fa70366d87ff06fdc0d4756e30876 + languageName: node + linkType: hard + +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c + languageName: node + linkType: hard + +"@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1e99118176e5366c2636064d09477016ab5272b2a92e78b8edb571d20bc3eaa881789a905b20042942c3c2d04efc530726cf703f937226db5ebc495f5d067e66 + languageName: node + linkType: hard + +"@babel/plugin-transform-async-generator-functions@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.4" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.20 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e2fc132c9033711d55209f4781e1fc73f0f4da5e0ca80a2da73dec805166b73c92a6e83571a8994cd2c893a28302e24107e90856202b24781bab734f800102bb + languageName: node + linkType: hard + +"@babel/plugin-transform-async-to-generator@npm:^7.20.0, @babel/plugin-transform-async-to-generator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" + dependencies: + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoped-functions@npm:^7.0.0, @babel/plugin-transform-block-scoped-functions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e63b16d94ee5f4d917e669da3db5ea53d1e7e79141a2ec873c1e644678cdafe98daa556d0d359963c827863d6b3665d23d4938a94a4c5053a1619c4ebd01d020 + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoping@npm:^7.0.0, @babel/plugin-transform-block-scoping@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-block-scoping@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fc4b2100dd9f2c47d694b4b35ae8153214ccb4e24ef545c259a9db17211b18b6a430f22799b56db8f6844deaeaa201af45a03331d0c80cc28b0c4e3c814570e4 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-class-properties@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9c6f8366f667897541d360246de176dd29efc7a13d80a5b48361882f7173d9173be4646c3b7d9b003ccc0e01e25df122330308f33db921fa553aa17ad544b3fc + languageName: node + linkType: hard + +"@babel/plugin-transform-class-static-block@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-class-static-block@npm:7.23.4" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + peerDependencies: + "@babel/core": ^7.12.0 + checksum: c8bfaba19a674fc2eb54edad71e958647360474e3163e8226f1acd63e4e2dbec32a171a0af596c1dc5359aee402cc120fea7abd1fb0e0354b6527f0fc9e8aa1e + languageName: node + linkType: hard + +"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/plugin-transform-classes@npm:7.23.5" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-split-export-declaration": ^7.22.6 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6d0dd3b0828e84a139a51b368f33f315edee5688ef72c68ba25e0175c68ea7357f9c8810b3f61713e368a3063cdcec94f3a2db952e453b0b14ef428a34aa8169 + languageName: node + linkType: hard + +"@babel/plugin-transform-computed-properties@npm:^7.0.0, @babel/plugin-transform-computed-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-computed-properties@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/template": ^7.22.15 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 80452661dc25a0956f89fe98cb562e8637a9556fb6c00d312c57653ce7df8798f58d138603c7e1aad96614ee9ccd10c47e50ab9ded6b6eded5adeb230d2a982e + languageName: node + linkType: hard + +"@babel/plugin-transform-destructuring@npm:^7.0.0, @babel/plugin-transform-destructuring@npm:^7.20.0, @babel/plugin-transform-destructuring@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-destructuring@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9e015099877272501162419bfe781689aec5c462cd2aec752ee22288f209eec65969ff11b8fdadca2eaddea71d705d3bba5b9c60752fcc1be67874fcec687105 + languageName: node + linkType: hard + +"@babel/plugin-transform-dotall-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a2dbbf7f1ea16a97948c37df925cb364337668c41a3948b8d91453f140507bd8a3429030c7ce66d09c299987b27746c19a2dd18b6f17dcb474854b14fd9159a3 + languageName: node + linkType: hard + +"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c2a21c34dc0839590cd945192cbc46fde541a27e140c48fe1808315934664cdbf18db64889e23c4eeb6bad9d3e049482efdca91d29de5734ffc887c4fbabaa16 + languageName: node + linkType: hard + +"@babel/plugin-transform-dynamic-import@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 57a722604c430d9f3dacff22001a5f31250e34785d4969527a2ae9160fa86858d0892c5b9ff7a06a04076f8c76c9e6862e0541aadca9c057849961343aab0845 + languageName: node + linkType: hard + +"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.23.3" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 00d05ab14ad0f299160fcf9d8f55a1cc1b740e012ab0b5ce30207d2365f091665115557af7d989cd6260d075a252d9e4283de5f2b247dfbbe0e42ae586e6bf66 + languageName: node + linkType: hard + +"@babel/plugin-transform-export-namespace-from@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9f770a81bfd03b48d6ba155d452946fd56d6ffe5b7d871e9ec2a0b15e0f424273b632f3ed61838b90015b25bbda988896b7a46c7d964fbf8f6feb5820b309f93 + languageName: node + linkType: hard + +"@babel/plugin-transform-flow-strip-types@npm:^7.0.0, @babel/plugin-transform-flow-strip-types@npm:^7.20.0, @babel/plugin-transform-flow-strip-types@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-flow": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: de38cc5cf948bc19405ea041292181527a36f59f08d787a590415fac36e9b0c7992f0d3e2fd3b9402089bafdaa1a893291a0edf15beebfd29bdedbbe582fee9b + languageName: node + linkType: hard + +"@babel/plugin-transform-for-of@npm:^7.0.0, @babel/plugin-transform-for-of@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/plugin-transform-for-of@npm:7.23.6" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 228c060aa61f6aa89dc447170075f8214863b94f830624e74ade99c1a09316897c12d76e848460b0b506593e58dbc42739af6dc4cb0fe9b84dffe4a596050a36 + languageName: node + linkType: hard + +"@babel/plugin-transform-function-name@npm:^7.0.0, @babel/plugin-transform-function-name@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-function-name@npm:7.23.3" + dependencies: + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 355c6dbe07c919575ad42b2f7e020f320866d72f8b79181a16f8e0cd424a2c761d979f03f47d583d9471b55dcd68a8a9d829b58e1eebcd572145b934b48975a6 + languageName: node + linkType: hard + +"@babel/plugin-transform-json-strings@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-json-strings@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-json-strings": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f9019820233cf8955d8ba346df709a0683c120fe86a24ed1c9f003f2db51197b979efc88f010d558a12e1491210fc195a43cd1c7fee5e23b92da38f793a875de + languageName: node + linkType: hard + +"@babel/plugin-transform-literals@npm:^7.0.0, @babel/plugin-transform-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 519a544cd58586b9001c4c9b18da25a62f17d23c48600ff7a685d75ca9eb18d2c5e8f5476f067f0a8f1fea2a31107eff950b9864833061e6076dcc4bdc3e71ed + languageName: node + linkType: hard + +"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2ae1dc9b4ff3bf61a990ff3accdecb2afe3a0ca649b3e74c010078d1cdf29ea490f50ac0a905306a2bcf9ac177889a39ac79bdcc3a0fdf220b3b75fac18d39b5 + languageName: node + linkType: hard + +"@babel/plugin-transform-member-expression-literals@npm:^7.0.0, @babel/plugin-transform-member-expression-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 95cec13c36d447c5aa6b8e4c778b897eeba66dcb675edef01e0d2afcec9e8cb9726baf4f81b4bbae7a782595aed72e6a0d44ffb773272c3ca180fada99bf92db + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-amd@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-amd@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d163737b6a3d67ea579c9aa3b83d4df4b5c34d9dcdf25f415f027c0aa8cded7bac2750d2de5464081f67a042ad9e1c03930c2fab42acd79f9e57c00cf969ddff + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 720a231ceade4ae4d2632478db4e7fecf21987d444942b72d523487ac8d715ca97de6c8f415c71e939595e1a4776403e7dc24ed68fe9125ad4acf57753c9bff7 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-systemjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.3" + dependencies: + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0d2fdd993c785aecac9e0850cd5ed7f7d448f0fbb42992a950cc0590167144df25d82af5aac9a5c99ef913d2286782afa44e577af30c10901c5ee8984910fa1f + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-umd@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-umd@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 586a7a2241e8b4e753a37af9466a9ffa8a67b4ba9aa756ad7500712c05d8fa9a8c1ed4f7bd25fae2a8265e6cf8fe781ec85a8ee885dd34cf50d8955ee65f12dc + languageName: node + linkType: hard + +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.0.0, @babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 + languageName: node + linkType: hard + +"@babel/plugin-transform-new-target@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-new-target@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e5053389316fce73ad5201b7777437164f333e24787fbcda4ae489cd2580dbbbdfb5694a7237bad91fabb46b591d771975d69beb1c740b82cb4761625379f00b + languageName: node + linkType: hard + +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a27d73ea134d3d9560a6b2e26ab60012fba15f1db95865aa0153c18f5ec82cfef6a7b3d8df74e3c2fca81534fa5efeb6cacaf7b08bdb7d123e3dafdd079886a3 + languageName: node + linkType: hard + +"@babel/plugin-transform-numeric-separator@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6ba0e5db3c620a3ec81f9e94507c821f483c15f196868df13fa454cbac719a5449baf73840f5b6eb7d77311b24a2cf8e45db53700d41727f693d46f7caf3eec3 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-rest-spread@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.23.4" + dependencies: + "@babel/compat-data": ^7.23.3 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 73fec495e327ca3959c1c03d07a621be09df00036c69fff0455af9a008291677ee9d368eec48adacdc6feac703269a649747568b4af4c4e9f134aa71cc5b378d + languageName: node + linkType: hard + +"@babel/plugin-transform-object-super@npm:^7.0.0, @babel/plugin-transform-object-super@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-object-super@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e495497186f621fa79026e183b4f1fbb172fd9df812cbd2d7f02c05b08adbe58012b1a6eb6dd58d11a30343f6ec80d0f4074f9b501d70aa1c94df76d59164c53 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d50b5ee142cdb088d8b5de1ccf7cea85b18b85d85b52f86618f6e45226372f01ad4cdb29abd4fd35ea99a71fefb37009e0107db7a787dcc21d4d402f97470faf + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-chaining@npm:^7.23.3, @babel/plugin-transform-optional-chaining@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e7a4c08038288057b7a08d68c4d55396ada9278095509ca51ed8dfb72a7f13f26bdd7c5185de21079fe0a9d60d22c227cb32e300d266c1bda40f70eee9f4bc1e + languageName: node + linkType: hard + +"@babel/plugin-transform-parameters@npm:^7.0.0, @babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-parameters@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a735b3e85316d17ec102e3d3d1b6993b429bdb3b494651c9d754e3b7d270462ee1f1a126ccd5e3d871af5e683727e9ef98c9d34d4a42204fffaabff91052ed16 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-private-methods@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: cedc1285c49b5a6d9a3d0e5e413b756ac40b3ac2f8f68bdfc3ae268bc8d27b00abd8bb0861c72756ff5dd8bf1eb77211b7feb5baf4fdae2ebbaabe49b9adc1d0 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-property-in-object@npm:^7.22.11, @babel/plugin-transform-private-property-in-object@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.23.4" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fb7adfe94ea97542f250a70de32bddbc3e0b802381c92be947fec83ebffda57e68533c4d0697152719a3496fdd3ebf3798d451c024cd4ac848fc15ac26b70aa7 + languageName: node + linkType: hard + +"@babel/plugin-transform-property-literals@npm:^7.0.0, @babel/plugin-transform-property-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-property-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 16b048c8e87f25095f6d53634ab7912992f78e6997a6ff549edc3cf519db4fca01c7b4e0798530d7f6a05228ceee479251245cdd850a5531c6e6f404104d6cc9 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-display-name@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-display-name@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7f86964e8434d3ddbd3c81d2690c9b66dbf1cd8bd9512e2e24500e9fa8cf378bc52c0853270b3b82143aba5965aec04721df7abdb768f952b44f5c6e0b198779 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-self@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 882bf56bc932d015c2d83214133939ddcf342e5bcafa21f1a93b19f2e052145115e1e0351730897fd66e5f67cad7875b8a8d81ceb12b6e2a886ad0102cb4eb1f + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-source@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 92287fb797e522d99bdc77eaa573ce79ff0ad9f1cf4e7df374645e28e51dce0adad129f6f075430b129b5bac8dad843f65021970e12e992d6d6671f0d65bb1e0 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx@npm:^7.0.0": + version: 7.23.4 + resolution: "@babel/plugin-transform-react-jsx@npm:7.23.4" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/types": ^7.23.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d8b8c52e8e22e833bf77c8d1a53b0a57d1fd52ba9596a319d572de79446a8ed9d95521035bc1175c1589d1a6a34600d2e678fa81d81bac8fac121137097f1f0a + languageName: node + linkType: hard + +"@babel/plugin-transform-regenerator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-regenerator@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + regenerator-transform: ^0.15.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7fdacc7b40008883871b519c9e5cdea493f75495118ccc56ac104b874983569a24edd024f0f5894ba1875c54ee2b442f295d6241c3280e61c725d0dd3317c8e6 + languageName: node + linkType: hard + +"@babel/plugin-transform-reserved-words@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-reserved-words@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 298c4440ddc136784ff920127cea137168e068404e635dc946ddb5d7b2a27b66f1dd4c4acb01f7184478ff7d5c3e7177a127279479926519042948fb7fa0fa48 + languageName: node + linkType: hard + +"@babel/plugin-transform-runtime@npm:^7.0.0": + version: 7.23.6 + resolution: "@babel/plugin-transform-runtime@npm:7.23.6" + dependencies: + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + babel-plugin-polyfill-corejs2: ^0.4.6 + babel-plugin-polyfill-corejs3: ^0.8.5 + babel-plugin-polyfill-regenerator: ^0.5.3 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d87da909e40d31e984ca5487ba36fa229449b773bc0f3fbf1d3c5ccac788ad3aef7481f1d4a3384c1813ee4f958af52b449089d96c0d5625868c028dd630d683 + languageName: node + linkType: hard + +"@babel/plugin-transform-shorthand-properties@npm:^7.0.0, @babel/plugin-transform-shorthand-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5d677a03676f9fff969b0246c423d64d77502e90a832665dc872a5a5e05e5708161ce1effd56bb3c0f2c20a1112fca874be57c8a759d8b08152755519281f326 + languageName: node + linkType: hard + +"@babel/plugin-transform-spread@npm:^7.0.0, @babel/plugin-transform-spread@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-spread@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 8fd5cac201e77a0b4825745f4e07a25f923842f282f006b3a79223c00f61075c8868d12eafec86b2642cd0b32077cdd32314e27bcb75ee5e6a68c0144140dcf2 + languageName: node + linkType: hard + +"@babel/plugin-transform-sticky-regex@npm:^7.0.0, @babel/plugin-transform-sticky-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 53e55eb2575b7abfdb4af7e503a2bf7ef5faf8bf6b92d2cd2de0700bdd19e934e5517b23e6dfed94ba50ae516b62f3f916773ef7d9bc81f01503f585051e2949 + languageName: node + linkType: hard + +"@babel/plugin-transform-template-literals@npm:^7.0.0, @babel/plugin-transform-template-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-template-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b16c5cb0b8796be0118e9c144d15bdc0d20a7f3f59009c6303a6e9a8b74c146eceb3f05186f5b97afcba7cfa87e34c1585a22186e3d5b22f2fd3d27d959d92b2 + languageName: node + linkType: hard + +"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0af7184379d43afac7614fc89b1bdecce4e174d52f4efaeee8ec1a4f2c764356c6dba3525c0685231f1cbf435b6dd4ee9e738d7417f3b10ce8bbe869c32f4384 + languageName: node + linkType: hard + +"@babel/plugin-transform-typescript@npm:^7.23.3, @babel/plugin-transform-typescript@npm:^7.5.0": + version: 7.23.6 + resolution: "@babel/plugin-transform-typescript@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0462241843d14dff9f1a4c49ab182a6f01a5f7679957c786b08165dac3e8d49184011f05ca204183d164c54b9d3496d1b3005f904fa8708e394e6f15bf5548e6 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 561c429183a54b9e4751519a3dfba6014431e9cdc1484fad03bdaf96582dfc72c76a4f8661df2aeeae7c34efd0fa4d02d3b83a2f63763ecf71ecc925f9cc1f60 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2298461a194758086d17c23c26c7de37aa533af910f9ebf31ebd0893d4aa317468043d23f73edc782ec21151d3c46cf0ff8098a83b725c49a59de28a1d4d6225 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-regex@npm:^7.0.0, @babel/plugin-transform-unicode-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c5f835d17483ba899787f92e313dfa5b0055e3deab332f1d254078a2bba27ede47574b6599fcf34d3763f0c048ae0779dc21d2d8db09295edb4057478dc80a9a + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 79d0b4c951955ca68235c87b91ab2b393c96285f8aeaa34d6db416d2ddac90000c9bd6e8c4d82b60a2b484da69930507245035f28ba63c6cae341cf3ba68fdef + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.20.0": + version: 7.23.6 + resolution: "@babel/preset-env@npm:7.23.6" + dependencies: + "@babel/compat-data": ^7.23.5 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.23.5 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.23.3 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.23.3 + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": ^7.23.3 + "@babel/plugin-proposal-private-property-in-object": 7.21.0-placeholder-for-preset-env.2 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.23.3 + "@babel/plugin-syntax-import-attributes": ^7.23.3 + "@babel/plugin-syntax-import-meta": ^7.10.4 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@babel/plugin-syntax-top-level-await": ^7.14.5 + "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 + "@babel/plugin-transform-arrow-functions": ^7.23.3 + "@babel/plugin-transform-async-generator-functions": ^7.23.4 + "@babel/plugin-transform-async-to-generator": ^7.23.3 + "@babel/plugin-transform-block-scoped-functions": ^7.23.3 + "@babel/plugin-transform-block-scoping": ^7.23.4 + "@babel/plugin-transform-class-properties": ^7.23.3 + "@babel/plugin-transform-class-static-block": ^7.23.4 + "@babel/plugin-transform-classes": ^7.23.5 + "@babel/plugin-transform-computed-properties": ^7.23.3 + "@babel/plugin-transform-destructuring": ^7.23.3 + "@babel/plugin-transform-dotall-regex": ^7.23.3 + "@babel/plugin-transform-duplicate-keys": ^7.23.3 + "@babel/plugin-transform-dynamic-import": ^7.23.4 + "@babel/plugin-transform-exponentiation-operator": ^7.23.3 + "@babel/plugin-transform-export-namespace-from": ^7.23.4 + "@babel/plugin-transform-for-of": ^7.23.6 + "@babel/plugin-transform-function-name": ^7.23.3 + "@babel/plugin-transform-json-strings": ^7.23.4 + "@babel/plugin-transform-literals": ^7.23.3 + "@babel/plugin-transform-logical-assignment-operators": ^7.23.4 + "@babel/plugin-transform-member-expression-literals": ^7.23.3 + "@babel/plugin-transform-modules-amd": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-modules-systemjs": ^7.23.3 + "@babel/plugin-transform-modules-umd": ^7.23.3 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.22.5 + "@babel/plugin-transform-new-target": ^7.23.3 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.23.4 + "@babel/plugin-transform-numeric-separator": ^7.23.4 + "@babel/plugin-transform-object-rest-spread": ^7.23.4 + "@babel/plugin-transform-object-super": ^7.23.3 + "@babel/plugin-transform-optional-catch-binding": ^7.23.4 + "@babel/plugin-transform-optional-chaining": ^7.23.4 + "@babel/plugin-transform-parameters": ^7.23.3 + "@babel/plugin-transform-private-methods": ^7.23.3 + "@babel/plugin-transform-private-property-in-object": ^7.23.4 + "@babel/plugin-transform-property-literals": ^7.23.3 + "@babel/plugin-transform-regenerator": ^7.23.3 + "@babel/plugin-transform-reserved-words": ^7.23.3 + "@babel/plugin-transform-shorthand-properties": ^7.23.3 + "@babel/plugin-transform-spread": ^7.23.3 + "@babel/plugin-transform-sticky-regex": ^7.23.3 + "@babel/plugin-transform-template-literals": ^7.23.3 + "@babel/plugin-transform-typeof-symbol": ^7.23.3 + "@babel/plugin-transform-unicode-escapes": ^7.23.3 + "@babel/plugin-transform-unicode-property-regex": ^7.23.3 + "@babel/plugin-transform-unicode-regex": ^7.23.3 + "@babel/plugin-transform-unicode-sets-regex": ^7.23.3 + "@babel/preset-modules": 0.1.6-no-external-plugins + babel-plugin-polyfill-corejs2: ^0.4.6 + babel-plugin-polyfill-corejs3: ^0.8.5 + babel-plugin-polyfill-regenerator: ^0.5.3 + core-js-compat: ^3.31.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 130262f263c8a76915ff5361f78afa9e63b4ecbf3ade8e833dc7546db7b9552ab507835bdea0feb5e70861345ca128a31327fd2e187084a215fc9dd1cc0ed38e + languageName: node + linkType: hard + +"@babel/preset-flow@npm:^7.13.13": + version: 7.23.3 + resolution: "@babel/preset-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-transform-flow-strip-types": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 60b5dde79621ae89943af459c4dc5b6030795f595a20ca438c8100f8d82c9ebc986881719030521ff5925799518ac5aa7f3fe62af8c33ab96be3681a71f88d03 + languageName: node + linkType: hard + +"@babel/preset-modules@npm:0.1.6-no-external-plugins": + version: 0.1.6-no-external-plugins + resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" + dependencies: + "@babel/helper-plugin-utils": ^7.0.0 + "@babel/types": ^7.4.4 + esutils: ^2.0.2 + peerDependencies: + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 4855e799bc50f2449fb5210f78ea9e8fd46cf4f242243f1e2ed838e2bd702e25e73e822e7f8447722a5f4baa5e67a8f7a0e403f3e7ce04540ff743a9c411c375 + languageName: node + linkType: hard + +"@babel/preset-typescript@npm:^7.13.0": + version: 7.23.3 + resolution: "@babel/preset-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 105a2d39bbc464da0f7e1ad7f535c77c5f62d6b410219355b20e552e7d29933567a5c55339b5d0aec1a5c7a0a7dfdf1b54aae601a4fe15a157d54dcbfcb3e854 + languageName: node + linkType: hard + +"@babel/register@npm:^7.13.16": + version: 7.22.15 + resolution: "@babel/register@npm:7.22.15" + dependencies: + clone-deep: ^4.0.1 + find-cache-dir: ^2.0.0 + make-dir: ^2.1.0 + pirates: ^4.0.5 + source-map-support: ^0.5.16 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5497be6773608cd2d874210edd14499fce464ddbea170219da55955afe4c9173adb591164193458fd639e43b7d1314088a6186f4abf241476c59b3f0da6afd6f + languageName: node + linkType: hard + +"@babel/regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "@babel/regjsgen@npm:0.8.0" + checksum: 89c338fee774770e5a487382170711014d49a68eb281e74f2b5eac88f38300a4ad545516a7786a8dd5702e9cf009c94c2f582d200f077ac5decd74c56b973730 + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.8.4": + version: 7.23.6 + resolution: "@babel/runtime@npm:7.23.6" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 1a8eaf3d3a103ef5227b60ca7ab5c589118c36ca65ef2d64e65380b32a98a3f3b5b3ef96660fa0471b079a18b619a8317f3e7f03ab2b930c45282a8b69ed9a16 + languageName: node + linkType: hard + +"@babel/template@npm:^7.0.0, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/parser": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/traverse@npm:7.23.6" + dependencies: + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.23.6 + "@babel/types": ^7.23.6 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: 48f2eac0e86b6cb60dab13a5ea6a26ba45c450262fccdffc334c01089e75935f7546be195e260e97f6e43cea419862eda095018531a2718fef8189153d479f88 + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.23.6 + resolution: "@babel/types@npm:7.23.6" + dependencies: + "@babel/helper-string-parser": ^7.23.4 + "@babel/helper-validator-identifier": ^7.22.20 + to-fast-properties: ^2.0.0 + checksum: 68187dbec0d637f79bc96263ac95ec8b06d424396678e7e225492be866414ce28ebc918a75354d4c28659be6efe30020b4f0f6df81cc418a2d30645b690a8de0 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 850f9305536d0f2bd13e9e0881cb5f02e4f93fad1189f7b2d4bebf694e3206924eadee1068130d43c11b750efcc9405f88a8e42ef098b6d75239c0f047de1a27 + languageName: node + linkType: hard + +"@cspotcode/source-map-support@npm:^0.8.0": + version: 0.8.1 + resolution: "@cspotcode/source-map-support@npm:0.8.1" + dependencies: + "@jridgewell/trace-mapping": 0.3.9 + checksum: 5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa + languageName: node + linkType: hard + +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" + dependencies: + eslint-visitor-keys: ^3.3.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": + version: 4.10.0 + resolution: "@eslint-community/regexpp@npm:4.10.0" + checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" + dependencies: + ajv: ^6.12.4 + debug: ^4.3.2 + espree: ^9.6.0 + globals: ^13.19.0 + ignore: ^5.2.0 + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + minimatch: ^3.1.2 + strip-json-comments: ^3.1.1 + checksum: 10957c7592b20ca0089262d8c2a8accbad14b4f6507e35416c32ee6b4dbf9cad67dfb77096bbd405405e9ada2b107f3797fe94362e1c55e0b09d6e90dd149127 + languageName: node + linkType: hard + +"@eslint/js@npm:8.56.0": + version: 8.56.0 + resolution: "@eslint/js@npm:8.56.0" + checksum: 5804130574ef810207bdf321c265437814e7a26f4e6fac9b496de3206afd52f533e09ec002a3be06cd9adcc9da63e727f1883938e663c4e4751c007d5b58e539 + languageName: node + linkType: hard + +"@hapi/hoek@npm:^9.0.0": + version: 9.3.0 + resolution: "@hapi/hoek@npm:9.3.0" + checksum: 4771c7a776242c3c022b168046af4e324d116a9d2e1d60631ee64f474c6e38d1bb07092d898bf95c7bc5d334c5582798a1456321b2e53ca817d4e7c88bc25b43 + languageName: node + linkType: hard + +"@hapi/topo@npm:^5.0.0": + version: 5.1.0 + resolution: "@hapi/topo@npm:5.1.0" + dependencies: + "@hapi/hoek": ^9.0.0 + checksum: 604dfd5dde76d5c334bd03f9001fce69c7ce529883acf92da96f4fe7e51221bf5e5110e964caca287a6a616ba027c071748ab636ff178ad750547fba611d6014 + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.11.13": + version: 0.11.13 + resolution: "@humanwhocodes/config-array@npm:0.11.13" + dependencies: + "@humanwhocodes/object-schema": ^2.0.1 + debug: ^4.1.1 + minimatch: ^3.0.5 + checksum: f8ea57b0d7ed7f2d64cd3944654976829d9da91c04d9c860e18804729a33f7681f78166ef4c761850b8c324d362f7d53f14c5c44907a6b38b32c703ff85e4805 + languageName: node + linkType: hard + +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^2.0.1": + version: 2.0.1 + resolution: "@humanwhocodes/object-schema@npm:2.0.1" + checksum: 24929487b1ed48795d2f08346a0116cc5ee4634848bce64161fb947109352c562310fd159fc64dda0e8b853307f5794605191a9547f7341158559ca3c8262a45 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@isaacs/ttlcache@npm:^1.4.1": + version: 1.4.1 + resolution: "@isaacs/ttlcache@npm:1.4.1" + checksum: b99f0918faf1eba405b6bc3421584282b2edc46cca23f8d8e112a643bf6e4506c6c53a4525901118e229d19c5719bbec3028ec438d758fd71081f6c32af871ec + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: ^5.3.1 + find-up: ^4.1.0 + get-package-type: ^0.1.0 + js-yaml: ^3.13.1 + resolve-from: ^5.0.0 + checksum: d578da5e2e804d5c93228450a1380e1a3c691de4953acc162f387b717258512a3e07b83510a936d9fab03eac90817473917e24f5d16297af3867f59328d58568 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 5282759d961d61350f33d9118d16bcaed914ebf8061a52f4fa474b2cb08720c9c81d165e13b82f2e5a8a212cc5af482f0c6fc1ac27b9e067e5394c9a6ed186c9 + languageName: node + linkType: hard + +"@jest/console@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/console@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + slash: ^3.0.0 + checksum: 0e3624e32c5a8e7361e889db70b170876401b7d70f509a2538c31d5cd50deb0c1ae4b92dc63fe18a0902e0a48c590c21d53787a0df41a52b34fa7cab96c384d6 + languageName: node + linkType: hard + +"@jest/core@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/core@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/reporters": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + ci-info: ^3.2.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-changed-files: ^29.7.0 + jest-config: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-resolve-dependencies: ^29.7.0 + jest-runner: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + jest-watcher: ^29.7.0 + micromatch: ^4.0.4 + pretty-format: ^29.7.0 + slash: ^3.0.0 + strip-ansi: ^6.0.0 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: af759c9781cfc914553320446ce4e47775ae42779e73621c438feb1e4231a5d4862f84b1d8565926f2d1aab29b3ec3dcfdc84db28608bdf5f29867124ebcfc0d + languageName: node + linkType: hard + +"@jest/create-cache-key-function@npm:^29.6.3": + version: 29.7.0 + resolution: "@jest/create-cache-key-function@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + checksum: 681bc761fa1d6fa3dd77578d444f97f28296ea80755e90e46d1c8fa68661b9e67f54dd38b988742db636d26cf160450dc6011892cec98b3a7ceb58cad8ff3aae + languageName: node + linkType: hard + +"@jest/environment@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/environment@npm:29.7.0" + dependencies: + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-mock: ^29.7.0 + checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 + languageName: node + linkType: hard + +"@jest/expect-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect-utils@npm:29.7.0" + dependencies: + jest-get-type: ^29.6.3 + checksum: 75eb177f3d00b6331bcaa057e07c0ccb0733a1d0a1943e1d8db346779039cb7f103789f16e502f888a3096fb58c2300c38d1f3748b36a7fa762eb6f6d1b160ed + languageName: node + linkType: hard + +"@jest/expect@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect@npm:29.7.0" + dependencies: + expect: ^29.7.0 + jest-snapshot: ^29.7.0 + checksum: a01cb85fd9401bab3370618f4b9013b90c93536562222d920e702a0b575d239d74cecfe98010aaec7ad464f67cf534a353d92d181646a4b792acaa7e912ae55e + languageName: node + linkType: hard + +"@jest/fake-timers@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/fake-timers@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@sinonjs/fake-timers": ^10.0.2 + "@types/node": "*" + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 + languageName: node + linkType: hard + +"@jest/globals@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/globals@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 + "@jest/types": ^29.6.3 + jest-mock: ^29.7.0 + checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 + languageName: node + linkType: hard + +"@jest/reporters@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/reporters@npm:29.7.0" + dependencies: + "@bcoe/v8-coverage": ^0.2.3 + "@jest/console": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@jridgewell/trace-mapping": ^0.3.18 + "@types/node": "*" + chalk: ^4.0.0 + collect-v8-coverage: ^1.0.0 + exit: ^0.1.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + istanbul-lib-coverage: ^3.0.0 + istanbul-lib-instrument: ^6.0.0 + istanbul-lib-report: ^3.0.0 + istanbul-lib-source-maps: ^4.0.0 + istanbul-reports: ^3.1.3 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 + slash: ^3.0.0 + string-length: ^4.0.1 + strip-ansi: ^6.0.0 + v8-to-istanbul: ^9.0.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 7eadabd62cc344f629024b8a268ecc8367dba756152b761bdcb7b7e570a3864fc51b2a9810cd310d85e0a0173ef002ba4528d5ea0329fbf66ee2a3ada9c40455 + languageName: node + linkType: hard + +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": ^0.27.8 + checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + +"@jest/source-map@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/source-map@npm:29.6.3" + dependencies: + "@jridgewell/trace-mapping": ^0.3.18 + callsites: ^3.0.0 + graceful-fs: ^4.2.9 + checksum: bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb + languageName: node + linkType: hard + +"@jest/test-result@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-result@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/istanbul-lib-coverage": ^2.0.0 + collect-v8-coverage: ^1.0.0 + checksum: 67b6317d526e335212e5da0e768e3b8ab8a53df110361b80761353ad23b6aea4432b7c5665bdeb87658ea373b90fb1afe02ed3611ef6c858c7fba377505057fa + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-sequencer@npm:29.7.0" + dependencies: + "@jest/test-result": ^29.7.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + slash: ^3.0.0 + checksum: 73f43599017946be85c0b6357993b038f875b796e2f0950487a82f4ebcb115fa12131932dd9904026b4ad8be131fe6e28bd8d0aa93b1563705185f9804bff8bd + languageName: node + linkType: hard + +"@jest/transform@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/transform@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@jest/types": ^29.6.3 + "@jridgewell/trace-mapping": ^0.3.18 + babel-plugin-istanbul: ^6.1.1 + chalk: ^4.0.0 + convert-source-map: ^2.0.0 + fast-json-stable-stringify: ^2.1.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-util: ^29.7.0 + micromatch: ^4.0.4 + pirates: ^4.0.4 + slash: ^3.0.0 + write-file-atomic: ^4.0.2 + checksum: 0f8ac9f413903b3cb6d240102db848f2a354f63971ab885833799a9964999dd51c388162106a807f810071f864302cdd8e3f0c241c29ce02d85a36f18f3f40ab + languageName: node + linkType: hard + +"@jest/types@npm:^26.6.2": + version: 26.6.2 + resolution: "@jest/types@npm:26.6.2" + dependencies: + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^15.0.0 + chalk: ^4.0.0 + checksum: a0bd3d2f22f26ddb23f41fddf6e6a30bf4fab2ce79ec1cb6ce6fdfaf90a72e00f4c71da91ec61e13db3b10c41de22cf49d07c57ff2b59171d64b29f909c1d8d6 + languageName: node + linkType: hard + +"@jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" + dependencies: + "@jest/schemas": ^29.6.3 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: a0bcf15dbb0eca6bdd8ce61a3fb055349d40268622a7670a3b2eb3c3dbafe9eb26af59938366d520b86907b9505b0f9b29b85cec11579a9e580694b87cd90fcc + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" + dependencies: + "@jridgewell/set-array": ^1.0.1 + "@jridgewell/sourcemap-codec": ^1.4.10 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e + languageName: node + linkType: hard + +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.5 + resolution: "@jridgewell/source-map@npm:0.3.5" + dependencies: + "@jridgewell/gen-mapping": ^0.3.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 1ad4dec0bdafbade57920a50acec6634f88a0eb735851e0dda906fa9894e7f0549c492678aad1a10f8e144bfe87f238307bf2a914a1bc85b7781d345417e9f6f + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": ^3.0.3 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.20 + resolution: "@jridgewell/trace-mapping@npm:0.3.20" + dependencies: + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: cd1a7353135f385909468ff0cf20bdd37e59f2ee49a13a966dedf921943e222082c583ade2b579ff6cd0d8faafcb5461f253e1bf2a9f48fec439211fdbe788f5 + languageName: node + linkType: hard + +"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": + version: 5.1.1-v1 + resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" + dependencies: + eslint-scope: 5.1.1 + checksum: f2e3b2d6a6e2d9f163ca22105910c9f850dc4897af0aea3ef0a5886b63d8e1ba6505b71c99cb78a3bba24a09557d601eb21c8dede3f3213753fcfef364eb0e57 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": 2.0.5 + run-parallel: ^1.1.9 + checksum: a970d595bd23c66c880e0ef1817791432dbb7acbb8d44b7e7d0e7a22f4521260d4a83f7f9fd61d44fda4610105577f8f58a60718105fb38352baed612fd79e59 + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": 2.1.5 + fastq: ^1.6.0 + checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.0 + resolution: "@npmcli/agent@npm:2.2.0" + dependencies: + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.1 + checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@pkgr/utils@npm:^2.4.2": + version: 2.4.2 + resolution: "@pkgr/utils@npm:2.4.2" + dependencies: + cross-spawn: ^7.0.3 + fast-glob: ^3.3.0 + is-glob: ^4.0.3 + open: ^9.1.0 + picocolors: ^1.0.0 + tslib: ^2.6.0 + checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc + languageName: node + linkType: hard + +"@react-native-community/cli-clean@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-clean@npm:12.1.1" + dependencies: + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + execa: ^5.0.0 + checksum: 555394f30213d6d93142a0c6658c33fb374994ef66e0e297f96a03d1624f72c3d647824bf2a599b23cd076a46c49ddeab7c618b72dcf5f64c25d9fd844ff5d78 + languageName: node + linkType: hard + +"@react-native-community/cli-config@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-config@npm:12.1.1" + dependencies: + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + cosmiconfig: ^5.1.0 + deepmerge: ^4.3.0 + glob: ^7.1.3 + joi: ^17.2.1 + checksum: 919e2fb0950ff9fedcf3017819b71cc39c4b1d78b5fae0421c7f3e42d36b40d598b0826b5880f820cfaca3d6f12302dc7fa0a9973b5ea7699723ca2dcd650b32 + languageName: node + linkType: hard + +"@react-native-community/cli-debugger-ui@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-debugger-ui@npm:12.1.1" + dependencies: + serve-static: ^1.13.1 + checksum: 4044fe6522a24e701faea57dc0b90dc201bdd1f3e8b63917c56d01e97f5ad9628ddd90a48d0906bdd8b6874fcbf9a8d818e09164246dbdd13e20b20fb5a61f1e + languageName: node + linkType: hard + +"@react-native-community/cli-debugger-ui@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-debugger-ui@npm:12.3.0" + dependencies: + serve-static: ^1.13.1 + checksum: d1a3103667b5dd427f95e9b7148ffd86e28285af06eb66d091522ebfab4b842d3da51a8f7dc154f3bca6a4f768eacda5a53a62155bc106e52f543b58e9882842 + languageName: node + linkType: hard + +"@react-native-community/cli-doctor@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-doctor@npm:12.1.1" + dependencies: + "@react-native-community/cli-config": 12.1.1 + "@react-native-community/cli-platform-android": 12.1.1 + "@react-native-community/cli-platform-ios": 12.1.1 + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + command-exists: ^1.2.8 + deepmerge: ^4.3.0 + envinfo: ^7.10.0 + execa: ^5.0.0 + hermes-profile-transformer: ^0.0.6 + ip: ^1.1.5 + node-stream-zip: ^1.9.1 + ora: ^5.4.1 + semver: ^7.5.2 + strip-ansi: ^5.2.0 + wcwidth: ^1.0.1 + yaml: ^2.2.1 + checksum: 110b682bebcd3baec9f149a80b0c3528403f3ea23bf8fabdf7f8204f767426fde23484961273ab0fc20472b60d7f3cb057348f86e3dbb776c8ffe528134a4fd7 + languageName: node + linkType: hard + +"@react-native-community/cli-hermes@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-hermes@npm:12.1.1" + dependencies: + "@react-native-community/cli-platform-android": 12.1.1 + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + hermes-profile-transformer: ^0.0.6 + ip: ^1.1.5 + checksum: d1e7d5e85a4c4b77959656bb30600b21c45742c2fe4eebc0437ff1b2300625737ce8a5cde8626e5ab42d5bd56960fef13e3d0daacfb028003ff8e9aac7b6e194 + languageName: node + linkType: hard + +"@react-native-community/cli-platform-android@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-platform-android@npm:12.1.1" + dependencies: + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + execa: ^5.0.0 + fast-xml-parser: ^4.2.4 + glob: ^7.1.3 + logkitty: ^0.7.1 + checksum: 15db2179ec434e5aaed075951f7f4aa117a68227ba42a9773dfcc265eecc81f7c085a23ff6f8f34adc9c959ee80272f7d273b735257816c8615edae9453e892c + languageName: node + linkType: hard + +"@react-native-community/cli-platform-ios@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-platform-ios@npm:12.1.1" + dependencies: + "@react-native-community/cli-tools": 12.1.1 + chalk: ^4.1.2 + execa: ^5.0.0 + fast-xml-parser: ^4.0.12 + glob: ^7.1.3 + ora: ^5.4.1 + checksum: 5116d6ae52a3e13e989164898a8defc8d761d8a98dc7d8a5e28d2b984695adfdf0c3d06dfb2c8ed5ca66849f2aefeed43dcd80a8840e65318115260be3f6ef3d + languageName: node + linkType: hard + +"@react-native-community/cli-plugin-metro@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-plugin-metro@npm:12.1.1" + checksum: dcd0dd69c0b4086e46838f180c15fc5f5f134c22bb8199dc5b5ee210ebaffd8c170a7229f8cdfdfb50a2e35f9a5418774fe85ae0cec8df5be96ad883ac8982dc + languageName: node + linkType: hard + +"@react-native-community/cli-server-api@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-server-api@npm:12.1.1" + dependencies: + "@react-native-community/cli-debugger-ui": 12.1.1 + "@react-native-community/cli-tools": 12.1.1 + compression: ^1.7.1 + connect: ^3.6.5 + errorhandler: ^1.5.1 + nocache: ^3.0.1 + pretty-format: ^26.6.2 + serve-static: ^1.13.1 + ws: ^7.5.1 + checksum: a34ff038cbe07e61144da9ebe0dcfa8d4d3520e57199430444adf2cb8ce57087b71260d132d5c1cc487d0b5c12e4f8ecb5a49fa4430e3f66f456c38bf7522f1b + languageName: node + linkType: hard + +"@react-native-community/cli-server-api@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-server-api@npm:12.3.0" + dependencies: + "@react-native-community/cli-debugger-ui": 12.3.0 + "@react-native-community/cli-tools": 12.3.0 + compression: ^1.7.1 + connect: ^3.6.5 + errorhandler: ^1.5.1 + nocache: ^3.0.1 + pretty-format: ^26.6.2 + serve-static: ^1.13.1 + ws: ^7.5.1 + checksum: 606989b678036e6290ff613f0506d2c6b07870a62f68d6f35bf41b9ff9b60bc5e85f8275e3b7c10bad00ee2fb92b1f7764e7d8f93a9a79eb45f86ccf042ed6b4 + languageName: node + linkType: hard + +"@react-native-community/cli-tools@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-tools@npm:12.1.1" + dependencies: + appdirsjs: ^1.2.4 + chalk: ^4.1.2 + find-up: ^5.0.0 + mime: ^2.4.1 + node-fetch: ^2.6.0 + open: ^6.2.0 + ora: ^5.4.1 + semver: ^7.5.2 + shell-quote: ^1.7.3 + sudo-prompt: ^9.0.0 + checksum: 44fa3291de83e77d8f8e6e434fe739eb1c4bfd48d27ff3614d45129837028bcd94e7749fbf0f1bb67ad82c1c2feb73aabd1c86a52209c43cf49f1882fa0974dc + languageName: node + linkType: hard + +"@react-native-community/cli-tools@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-tools@npm:12.3.0" + dependencies: + appdirsjs: ^1.2.4 + chalk: ^4.1.2 + find-up: ^5.0.0 + mime: ^2.4.1 + node-fetch: ^2.6.0 + open: ^6.2.0 + ora: ^5.4.1 + semver: ^7.5.2 + shell-quote: ^1.7.3 + sudo-prompt: ^9.0.0 + checksum: df9d3e721689644749099e3217bf202143eeaf0e0ea2aa283ce9130445ba7e65c2a9aae22ae194a5c1cef2ff08cbaf7638c3f267af80f92cdff4edf8eae68e22 + languageName: node + linkType: hard + +"@react-native-community/cli-types@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli-types@npm:12.1.1" + dependencies: + joi: ^17.2.1 + checksum: 172fa8b01f06902dad0e4802fc6b4ea3b89bb453a1c04e352955986296a1c777f1026f09a91dd5b6a985f38f3fecb00066a6a100fdd3c84cd1f8c664b01c030e + languageName: node + linkType: hard + +"@react-native-community/cli@npm:12.1.1": + version: 12.1.1 + resolution: "@react-native-community/cli@npm:12.1.1" + dependencies: + "@react-native-community/cli-clean": 12.1.1 + "@react-native-community/cli-config": 12.1.1 + "@react-native-community/cli-debugger-ui": 12.1.1 + "@react-native-community/cli-doctor": 12.1.1 + "@react-native-community/cli-hermes": 12.1.1 + "@react-native-community/cli-plugin-metro": 12.1.1 + "@react-native-community/cli-server-api": 12.1.1 + "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-types": 12.1.1 + chalk: ^4.1.2 + commander: ^9.4.1 + deepmerge: ^4.3.0 + execa: ^5.0.0 + find-up: ^4.1.0 + fs-extra: ^8.1.0 + graceful-fs: ^4.1.3 + prompts: ^2.4.2 + semver: ^7.5.2 + bin: + react-native: build/bin.js + checksum: 162cdcaf2c994d8329ec60a59d6afd2c41ec317c19e346c8edaf8e6e8250c7ef00c10070d24d580104ce9c2f16d2ace6f34fa485001f82ca6ce66f74e489c032 + languageName: node + linkType: hard + +"@react-native/assets-registry@npm:^0.73.1": + version: 0.73.1 + resolution: "@react-native/assets-registry@npm:0.73.1" + checksum: d9d09774d497bae13b1fb6a1c977bf6e442858639ee66fe4e8f955cfc903a16f79de6129471114a918a4b814eb5150bd808a5a7dc9f8b12d49795d9488d4cb67 + languageName: node + linkType: hard + +"@react-native/babel-plugin-codegen@npm:*": + version: 0.74.0 + resolution: "@react-native/babel-plugin-codegen@npm:0.74.0" + dependencies: + "@react-native/codegen": "*" + checksum: 4663bd2395503ce0e14908b718107bc5d82708be709db746eba448b57193e5dfce7a404688b12b319bf6c9e37ca4db5dd9591f471daba9dfe219970eb8ed2bf7 + languageName: node + linkType: hard + +"@react-native/babel-preset@npm:*": + version: 0.74.0 + resolution: "@react-native/babel-preset@npm:0.74.0" + dependencies: + "@babel/core": ^7.20.0 + "@babel/plugin-proposal-async-generator-functions": ^7.0.0 + "@babel/plugin-proposal-class-properties": ^7.18.0 + "@babel/plugin-proposal-export-default-from": ^7.0.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.0 + "@babel/plugin-proposal-numeric-separator": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.20.0 + "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 + "@babel/plugin-proposal-optional-chaining": ^7.20.0 + "@babel/plugin-syntax-dynamic-import": ^7.8.0 + "@babel/plugin-syntax-export-default-from": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.18.0 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 + "@babel/plugin-syntax-optional-chaining": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-async-to-generator": ^7.20.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.20.0 + "@babel/plugin-transform-flow-strip-types": ^7.20.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-private-methods": ^7.22.5 + "@babel/plugin-transform-private-property-in-object": ^7.22.11 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-react-jsx-self": ^7.0.0 + "@babel/plugin-transform-react-jsx-source": ^7.0.0 + "@babel/plugin-transform-runtime": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-sticky-regex": ^7.0.0 + "@babel/plugin-transform-typescript": ^7.5.0 + "@babel/plugin-transform-unicode-regex": ^7.0.0 + "@babel/template": ^7.0.0 + "@react-native/babel-plugin-codegen": "*" + babel-plugin-transform-flow-enums: ^0.0.2 + react-refresh: ^0.14.0 + peerDependencies: + "@babel/core": "*" + checksum: d0d94e033407f24f09519f8b62ec6e384b4acf9e599cec3a630add0c1fda6ac1959fb91829af420932a418ccdcc147e2e7358908988a141b804e22d6a4093859 + languageName: node + linkType: hard + +"@react-native/babel-preset@npm:^0.73.18": + version: 0.73.18 + resolution: "@react-native/babel-preset@npm:0.73.18" + dependencies: + "@babel/core": ^7.20.0 + "@babel/plugin-proposal-async-generator-functions": ^7.0.0 + "@babel/plugin-proposal-class-properties": ^7.18.0 + "@babel/plugin-proposal-export-default-from": ^7.0.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.0 + "@babel/plugin-proposal-numeric-separator": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.20.0 + "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 + "@babel/plugin-proposal-optional-chaining": ^7.20.0 + "@babel/plugin-syntax-dynamic-import": ^7.8.0 + "@babel/plugin-syntax-export-default-from": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.18.0 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 + "@babel/plugin-syntax-optional-chaining": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-async-to-generator": ^7.20.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.20.0 + "@babel/plugin-transform-flow-strip-types": ^7.20.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-private-methods": ^7.22.5 + "@babel/plugin-transform-private-property-in-object": ^7.22.11 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-react-jsx-self": ^7.0.0 + "@babel/plugin-transform-react-jsx-source": ^7.0.0 + "@babel/plugin-transform-runtime": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-sticky-regex": ^7.0.0 + "@babel/plugin-transform-typescript": ^7.5.0 + "@babel/plugin-transform-unicode-regex": ^7.0.0 + "@babel/template": ^7.0.0 + "@react-native/babel-plugin-codegen": "*" + babel-plugin-transform-flow-enums: ^0.0.2 + react-refresh: ^0.14.0 + peerDependencies: + "@babel/core": "*" + checksum: 291e9ee5ea916a36103daea2c8209c3e36381763d661a9fd1ed237eed63f7154fa37acfb23a2fd7302bbc60e25fcadecdd319bc2e0d6ef28ac92bd1d7d4a3fbf + languageName: node + linkType: hard + +"@react-native/codegen@npm:*, @react-native/codegen@npm:^0.73.2": + version: 0.73.2 + resolution: "@react-native/codegen@npm:0.73.2" + dependencies: + "@babel/parser": ^7.20.0 + flow-parser: ^0.206.0 + glob: ^7.1.1 + invariant: ^2.2.4 + jscodeshift: ^0.14.0 + mkdirp: ^0.5.1 + nullthrows: ^1.1.1 + peerDependencies: + "@babel/preset-env": ^7.1.6 + checksum: 92a40fc695ba0c19790e9e7e73c064b4ae48f4300f5d258fdf746d4fd34ef028fc1e10ce487f9fb54ff36710c5e3b032bd496147564a0369b2d5689b12fbc6bb + languageName: node + linkType: hard + +"@react-native/community-cli-plugin@npm:^0.73.10": + version: 0.73.11 + resolution: "@react-native/community-cli-plugin@npm:0.73.11" + dependencies: + "@react-native-community/cli-server-api": 12.3.0 + "@react-native-community/cli-tools": 12.3.0 + "@react-native/dev-middleware": ^0.73.6 + "@react-native/metro-babel-transformer": ^0.73.12 + chalk: ^4.0.0 + execa: ^5.1.1 + metro: ^0.80.0 + metro-config: ^0.80.0 + metro-core: ^0.80.0 + node-fetch: ^2.2.0 + readline: ^1.3.0 + checksum: cd7d2d88c5e62500ab9392371275044ef60cdfbaea715fef5c52f9cdcd325e28412e27b2f207df34098de15f035470da3aae0ca1f0bf3df3cb1bd61b3cf0b585 + languageName: node + linkType: hard + +"@react-native/debugger-frontend@npm:^0.73.3": + version: 0.73.3 + resolution: "@react-native/debugger-frontend@npm:0.73.3" + checksum: 71ecf6fdf3ecf2cae80818e2b8717acb22e291fd19edf89f570e695a165660a749244fb03465b3b8b9b7166cbdee627577dd75321f6793649b0a255aec722d92 + languageName: node + linkType: hard + +"@react-native/dev-middleware@npm:^0.73.6": + version: 0.73.6 + resolution: "@react-native/dev-middleware@npm:0.73.6" + dependencies: + "@isaacs/ttlcache": ^1.4.1 + "@react-native/debugger-frontend": ^0.73.3 + chrome-launcher: ^0.15.2 + chromium-edge-launcher: ^1.0.0 + connect: ^3.6.5 + debug: ^2.2.0 + node-fetch: ^2.2.0 + open: ^7.0.3 + serve-static: ^1.13.1 + temp-dir: ^2.0.0 + checksum: 902c1bfd54ea27468d515877eaf7b0772c095c8ed8e7d715ae7b48deb41874d1d260a5f9af5ae05b40de7f056d8771ad8698a9f9424f55e4633ab2e97ca2cd4d + languageName: node + linkType: hard + +"@react-native/eslint-config@npm:^0.73.1": + version: 0.73.1 + resolution: "@react-native/eslint-config@npm:0.73.1" + dependencies: + "@babel/core": ^7.20.0 + "@babel/eslint-parser": ^7.20.0 + "@react-native/eslint-plugin": ^0.73.1 + "@typescript-eslint/eslint-plugin": ^5.57.1 + "@typescript-eslint/parser": ^5.57.1 + eslint-config-prettier: ^8.5.0 + eslint-plugin-eslint-comments: ^3.2.0 + eslint-plugin-ft-flow: ^2.0.1 + eslint-plugin-jest: ^26.5.3 + eslint-plugin-prettier: ^4.2.1 + eslint-plugin-react: ^7.30.1 + eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-react-native: ^4.0.0 + peerDependencies: + eslint: ">=8" + prettier: ">=2" + checksum: d2e86572b0c09be999c5033ae49b6dcf3d492b666c027304e0e1c096de20f0adcdc140af98a42ae104d16209c5610457073a92fa04aae0c3de204ea8ef922081 + languageName: node + linkType: hard + +"@react-native/eslint-plugin@npm:^0.73.1": + version: 0.73.1 + resolution: "@react-native/eslint-plugin@npm:0.73.1" + checksum: 82a9bd30ada10ec4e926021967d1ffeb7c82eaaba6f7171cc655daf3339d2e2c15897bc3cd0f529e83ef2958c3b9b0365590a6b672a1a0efe7c781bd3e854473 + languageName: node + linkType: hard + +"@react-native/gradle-plugin@npm:^0.73.4": + version: 0.73.4 + resolution: "@react-native/gradle-plugin@npm:0.73.4" + checksum: f72e2a9fc44f7a848142f09e939686b85f7f51edb0634407635b742f152f2d5162eb08579a6a03c37f2550397a64915578d185dac1b95c7cf1ba8729fa51f389 + languageName: node + linkType: hard + +"@react-native/js-polyfills@npm:^0.73.1": + version: 0.73.1 + resolution: "@react-native/js-polyfills@npm:0.73.1" + checksum: ec5899c3f2480475a6dccb252f3de6cc0b2eccc32d3d4a61a479e5f09d6458d86860fd60af472448b417d6e19f75c6b4008de245ab7fbb6d9c4300f452a37fd5 + languageName: node + linkType: hard + +"@react-native/metro-babel-transformer@npm:^0.73.12": + version: 0.73.12 + resolution: "@react-native/metro-babel-transformer@npm:0.73.12" + dependencies: + "@babel/core": ^7.20.0 + "@react-native/babel-preset": "*" + babel-preset-fbjs: ^3.4.0 + hermes-parser: 0.15.0 + nullthrows: ^1.1.1 + peerDependencies: + "@babel/core": "*" + checksum: ba9d27e71d76190bbc97633486e2eaa57a51bdaaad7fd13dc7cca3a864b31533773d38cf9c69ef092148e62cb88243e7f4a643f1b363e9a3f733b598c6f3374a + languageName: node + linkType: hard + +"@react-native/metro-config@npm:^0.73.2": + version: 0.73.2 + resolution: "@react-native/metro-config@npm:0.73.2" + dependencies: + "@react-native/js-polyfills": ^0.73.1 + "@react-native/metro-babel-transformer": ^0.73.12 + metro-config: ^0.80.0 + metro-runtime: ^0.80.0 + checksum: 91b71038c6a33b965c9b598125c78172957395e6bcede695202f846cea0f2dd4668cc3f09b5afa5dcdfce3e212007ec22b855f100473fae8b944877d68e4dbc8 + languageName: node + linkType: hard + +"@react-native/normalize-colors@npm:^0.73.0, @react-native/normalize-colors@npm:^0.73.2": + version: 0.73.2 + resolution: "@react-native/normalize-colors@npm:0.73.2" + checksum: ddf9384ad41adc4f3c8eb61ddd27113130c8060bd2f4255bee284a52aa7ddcff8a5e751f569dd416c45f8b9d4062392fa7219b221f2f7f0b229d02b8d2a5b974 + languageName: node + linkType: hard + +"@react-native/typescript-config@npm:^0.73.1": + version: 0.73.1 + resolution: "@react-native/typescript-config@npm:0.73.1" + checksum: 9b66fe369c26758764e782f876241f51b75101b627659a148b2709e3c0548a314f5e98dfb508a72d038379a9a11eef18f5cc3e20b04d4e28210b0e09edd819fe + languageName: node + linkType: hard + +"@react-native/virtualized-lists@npm:^0.73.3": + version: 0.73.4 + resolution: "@react-native/virtualized-lists@npm:0.73.4" + dependencies: + invariant: ^2.2.4 + nullthrows: ^1.1.1 + peerDependencies: + react-native: "*" + checksum: 59826b146cdcff358f27b118b9dcc6fa23534f3880b5e8546c79aedff8cb4e028af652b0371e0080610e30a250c69607f45b2066c83762788783ccf2031938e3 + languageName: node + linkType: hard + +"@reduxjs/toolkit@npm:^2.0.1": + version: 2.0.1 + resolution: "@reduxjs/toolkit@npm:2.0.1" + dependencies: + immer: ^10.0.3 + redux: ^5.0.0 + redux-thunk: ^3.1.0 + reselect: ^5.0.1 + peerDependencies: + react: ^16.9.0 || ^17.0.0 || ^18 + react-redux: ^7.2.1 || ^8.1.3 || ^9.0.0 + peerDependenciesMeta: + react: + optional: true + react-redux: + optional: true + checksum: d7e4783263dc79cb85c8d50db41209f16f0994520193ac2b378e63dc12f336cc6f58323e37d66ccf09493c49ead2f4827aac3e8d9c6ca7def21f842efb4f5f3d + languageName: node + linkType: hard + +"@sideway/address@npm:^4.1.3": + version: 4.1.4 + resolution: "@sideway/address@npm:4.1.4" + dependencies: + "@hapi/hoek": ^9.0.0 + checksum: b9fca2a93ac2c975ba12e0a6d97853832fb1f4fb02393015e012b47fa916a75ca95102d77214b2a29a2784740df2407951af8c5dde054824c65577fd293c4cdb + languageName: node + linkType: hard + +"@sideway/formula@npm:^3.0.1": + version: 3.0.1 + resolution: "@sideway/formula@npm:3.0.1" + checksum: e4beeebc9dbe2ff4ef0def15cec0165e00d1612e3d7cea0bc9ce5175c3263fc2c818b679bd558957f49400ee7be9d4e5ac90487e1625b4932e15c4aa7919c57a + languageName: node + linkType: hard + +"@sideway/pinpoint@npm:^2.0.0": + version: 2.0.0 + resolution: "@sideway/pinpoint@npm:2.0.0" + checksum: 0f4491e5897fcf5bf02c46f5c359c56a314e90ba243f42f0c100437935daa2488f20482f0f77186bd6bf43345095a95d8143ecf8b1f4d876a7bc0806aba9c3d2 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 00bd7362a3439021aa1ea51b0e0d0a0e8ca1351a3d54c606b115fdcc49b51b16db6e5f43b4fe7a28c38688523e22a94d49dd31168868b655f0d4d50f032d07a1 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.0": + version: 3.0.0 + resolution: "@sinonjs/commons@npm:3.0.0" + dependencies: + type-detect: 4.0.8 + checksum: b4b5b73d4df4560fb8c0c7b38c7ad4aeabedd362f3373859d804c988c725889cde33550e4bcc7cd316a30f5152a2d1d43db71b6d0c38f5feef71fd8d016763f8 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.3.0 + resolution: "@sinonjs/fake-timers@npm:10.3.0" + dependencies: + "@sinonjs/commons": ^3.0.0 + checksum: 614d30cb4d5201550c940945d44c9e0b6d64a888ff2cd5b357f95ad6721070d6b8839cd10e15b76bf5e14af0bcc1d8f9ec00d49a46318f1f669a4bec1d7f3148 + languageName: node + linkType: hard + +"@testing-library/react-native@npm:^12.4.1": + version: 12.4.1 + resolution: "@testing-library/react-native@npm:12.4.1" + dependencies: + jest-matcher-utils: ^29.7.0 + pretty-format: ^29.7.0 + redent: ^3.0.0 + peerDependencies: + jest: ">=28.0.0" + react: ">=16.8.0" + react-native: ">=0.59" + react-test-renderer: ">=16.8.0" + peerDependenciesMeta: + jest: + optional: true + checksum: cd73fc33e48d3eb8f4e3e4b99b88913e4fd4f91ab33285e400146730cdfdb3ee48605cc73bd18c570a56c4d364f45c3d6c8434ed7f30d3c1b53f9730ad68813e + languageName: node + linkType: hard + +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node10@npm:1.0.9" + checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + languageName: node + linkType: hard + +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a + languageName: node + linkType: hard + +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d + languageName: node + linkType: hard + +"@tsconfig/node16@npm:^1.0.2": + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff + languageName: node + linkType: hard + +"@types/babel__core@npm:^7.1.14": + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" + dependencies: + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 + "@types/babel__generator": "*" + "@types/babel__template": "*" + "@types/babel__traverse": "*" + checksum: a3226f7930b635ee7a5e72c8d51a357e799d19cbf9d445710fa39ab13804f79ab1a54b72ea7d8e504659c7dfc50675db974b526142c754398d7413aa4bc30845 + languageName: node + linkType: hard + +"@types/babel__generator@npm:*": + version: 7.6.8 + resolution: "@types/babel__generator@npm:7.6.8" + dependencies: + "@babel/types": ^7.0.0 + checksum: 5b332ea336a2efffbdeedb92b6781949b73498606ddd4205462f7d96dafd45ff3618770b41de04c4881e333dd84388bfb8afbdf6f2764cbd98be550d85c6bb48 + languageName: node + linkType: hard + +"@types/babel__template@npm:*": + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" + dependencies: + "@babel/parser": ^7.1.0 + "@babel/types": ^7.0.0 + checksum: d7a02d2a9b67e822694d8e6a7ddb8f2b71a1d6962dfd266554d2513eefbb205b33ca71a0d163b1caea3981ccf849211f9964d8bd0727124d18ace45aa6c9ae29 + languageName: node + linkType: hard + +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": + version: 7.20.4 + resolution: "@types/babel__traverse@npm:7.20.4" + dependencies: + "@babel/types": ^7.20.7 + checksum: f044ba80e00d07e46ee917c44f96cfc268fcf6d3871f7dfb8db8d3c6dab1508302f3e6bc508352a4a3ae627d2522e3fc500fa55907e0410a08e2e0902a8f3576 + languageName: node + linkType: hard + +"@types/graceful-fs@npm:^4.1.3": + version: 4.1.9 + resolution: "@types/graceful-fs@npm:4.1.9" + dependencies: + "@types/node": "*" + checksum: 79d746a8f053954bba36bd3d94a90c78de995d126289d656fb3271dd9f1229d33f678da04d10bce6be440494a5a73438e2e363e92802d16b8315b051036c5256 + languageName: node + linkType: hard + +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 3feac423fd3e5449485afac999dcfcb3d44a37c830af898b689fadc65d26526460bedb889db278e0d4d815a670331796494d073a10ee6e3a6526301fe7415778 + languageName: node + linkType: hard + +"@types/istanbul-lib-report@npm:*": + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" + dependencies: + "@types/istanbul-lib-coverage": "*" + checksum: b91e9b60f865ff08cb35667a427b70f6c2c63e88105eadd29a112582942af47ed99c60610180aa8dcc22382fa405033f141c119c69b95db78c4c709fbadfeeb4 + languageName: node + linkType: hard + +"@types/istanbul-reports@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" + dependencies: + "@types/istanbul-lib-report": "*" + checksum: 93eb18835770b3431f68ae9ac1ca91741ab85f7606f310a34b3586b5a34450ec038c3eed7ab19266635499594de52ff73723a54a72a75b9f7d6a956f01edee95 + languageName: node + linkType: hard + +"@types/jest@npm:^29.5.11": + version: 29.5.11 + resolution: "@types/jest@npm:29.5.11" + dependencies: + expect: ^29.0.0 + pretty-format: ^29.0.0 + checksum: f892a06ec9f0afa9a61cd7fa316ec614e21d4df1ad301b5a837787e046fcb40dfdf7f264a55e813ac6b9b633cb9d366bd5b8d1cea725e84102477b366df23fdd + languageName: node + linkType: hard + +"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.9": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.10.4 + resolution: "@types/node@npm:20.10.4" + dependencies: + undici-types: ~5.26.4 + checksum: 054b296417e771ab524bea63cf3289559c6bdf290d45428f7cc68e9b00030ff7a0ece47b8c99a26b4f47a443919813bcf42beadff2f0bea7d8125fa541d92eb0 + languageName: node + linkType: hard + +"@types/prop-types@npm:*": + version: 15.7.11 + resolution: "@types/prop-types@npm:15.7.11" + checksum: 7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54 + languageName: node + linkType: hard + +"@types/react-test-renderer@npm:^18.0.7": + version: 18.0.7 + resolution: "@types/react-test-renderer@npm:18.0.7" + dependencies: + "@types/react": "*" + checksum: 701d7d815fe7b921712ebdb2c4434e99b92403d37c51b33a01ce1b62fed7d1efbf9f749971d9031a5b137c6d5e194249c378106768aa69725a01f150fef0ec7f + languageName: node + linkType: hard + +"@types/react@npm:*, @types/react@npm:^18.2.6": + version: 18.2.45 + resolution: "@types/react@npm:18.2.45" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: 40b256bdce67b026348022b4f8616a693afdad88cf493b77f7b4e6c5f4b0e4ba13a6068e690b9b94572920840ff30d501ea3d8518e1f21cc8fb8204d4b140c8a + languageName: node + linkType: hard + +"@types/scheduler@npm:*": + version: 0.16.8 + resolution: "@types/scheduler@npm:0.16.8" + checksum: 6c091b096daa490093bf30dd7947cd28e5b2cd612ec93448432b33f724b162587fed9309a0acc104d97b69b1d49a0f3fc755a62282054d62975d53d7fd13472d + languageName: node + linkType: hard + +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": + version: 7.5.6 + resolution: "@types/semver@npm:7.5.6" + checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 + languageName: node + linkType: hard + +"@types/stack-utils@npm:^2.0.0": + version: 2.0.3 + resolution: "@types/stack-utils@npm:2.0.3" + checksum: 72576cc1522090fe497337c2b99d9838e320659ac57fa5560fcbdcbafcf5d0216c6b3a0a8a4ee4fdb3b1f5e3420aa4f6223ab57b82fef3578bec3206425c6cf5 + languageName: node + linkType: hard + +"@types/use-sync-external-store@npm:^0.0.3": + version: 0.0.3 + resolution: "@types/use-sync-external-store@npm:0.0.3" + checksum: 161ddb8eec5dbe7279ac971531217e9af6b99f7783213566d2b502e2e2378ea19cf5e5ea4595039d730aa79d3d35c6567d48599f69773a02ffcff1776ec2a44e + languageName: node + linkType: hard + +"@types/yargs-parser@npm:*": + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: ef236c27f9432983e91432d974243e6c4cdae227cb673740320eff32d04d853eed59c92ca6f1142a335cfdc0e17cccafa62e95886a8154ca8891cc2dec4ee6fc + languageName: node + linkType: hard + +"@types/yargs@npm:^15.0.0": + version: 15.0.19 + resolution: "@types/yargs@npm:15.0.19" + dependencies: + "@types/yargs-parser": "*" + checksum: 6a509db36304825674f4f00300323dce2b4d850e75819c3db87e9e9f213ac2c4c6ed3247a3e4eed6e8e45b3f191b133a356d3391dd694d9ea27a0507d914ef4c + languageName: node + linkType: hard + +"@types/yargs@npm:^17.0.8": + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" + dependencies: + "@types/yargs-parser": "*" + checksum: 4505bdebe8716ff383640c6e928f855b5d337cb3c68c81f7249fc6b983d0aa48de3eee26062b84f37e0d75a5797bc745e0c6e76f42f81771252a758c638f36ba + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:^5.57.1": + version: 5.62.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" + dependencies: + "@eslint-community/regexpp": ^4.4.0 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/type-utils": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.0 + natural-compare-lite: ^1.4.0 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependencies: + "@typescript-eslint/parser": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1 + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:^6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/eslint-plugin@npm:6.14.0" + dependencies: + "@eslint-community/regexpp": ^4.5.1 + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/type-utils": 6.14.0 + "@typescript-eslint/utils": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.4 + natural-compare: ^1.4.0 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependencies: + "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: ec688fd71b21576bfe0e4176889fddf3c13d8b07792461b84017d689ed11a9bffbf4d2ab61e9bdb254e43d2c1e159d5c2fc21bdfa6a6c2d64f9e1956a668fbe8 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^5.57.1": + version: 5.62.0 + resolution: "@typescript-eslint/parser@npm:5.62.0" + dependencies: + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + debug: ^4.3.4 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/parser@npm:6.14.0" + dependencies: + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/typescript-estree": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 5fbe8d7431654c14ba6c9782d3728026ad5c90e02c9c4319f45df972e653cf5c15ba320dce70cdffa9fb7ce4c4263c37585e7bc1c909d1252d0a599880963063 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + checksum: 6062d6b797fe1ce4d275bb0d17204c827494af59b5eaf09d8a78cdd39dadddb31074dded4297aaf5d0f839016d601032857698b0e4516c86a41207de606e9573 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/scope-manager@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + checksum: 0b577d42db925426a9838fe61703c226e18b697374fbe20cf9b93ba30fe58bf4a7f7f42491a4d24b7f3cc12d9a189fe3524c0e9b7708727e710d95b908250a14 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/type-utils@npm:5.62.0" + dependencies: + "@typescript-eslint/typescript-estree": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 + tsutils: ^3.21.0 + peerDependencies: + eslint: "*" + peerDependenciesMeta: + typescript: + optional: true + checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/type-utils@npm:6.14.0" + dependencies: + "@typescript-eslint/typescript-estree": 6.14.0 + "@typescript-eslint/utils": 6.14.0 + debug: ^4.3.4 + ts-api-utils: ^1.0.1 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 09988f25279598840673c41ba44b03756f2dfb31284ab72af97c170711a0f31e5c53d6b120aa83f31438565e82aae1a1ca4d1ed0de4890654dd6a6a33d88202c + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 48c87117383d1864766486f24de34086155532b070f6264e09d0e6139449270f8a9559cfef3c56d16e3bcfb52d83d42105d61b36743626399c7c2b5e0ac3b670 + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/types@npm:6.14.0" + checksum: 624e6c5227f596dcc9757348d09c5a09b846a62938b8b4409614cf8108013b64ed8b270c32e87ea8890dd09ed896b82e92872c3574dbf07dcda11a168d69dd1f + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 3624520abb5807ed8f57b1197e61c7b1ed770c56dfcaca66372d584ff50175225798bccb701f7ef129d62c5989070e1ee3a0aa2d84e56d9524dcf011a2bb1a52 + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/typescript-estree@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependenciesMeta: + typescript: + optional: true + checksum: 495d7616463685bfd8138ffa9fbc0a7f9130ff8a3f6f85775960b4f0a3fdc259ae53b104cdfe562b60310860b5a6c8387307790734555084aa087e3bb9c28a69 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.10.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + eslint-scope: ^5.1.1 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/utils@npm:6.14.0" + dependencies: + "@eslint-community/eslint-utils": ^4.4.0 + "@types/json-schema": ^7.0.12 + "@types/semver": ^7.5.0 + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/typescript-estree": 6.14.0 + semver: ^7.5.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: 36e8501cb85647947189f31017c36d6f6ac7ef0399fa0e18eb64f1b83e00f1e8ace1d9ac5015ef4d9c1b820179f1def8d61d7ea9e5d61433eb848cf5c49dc8b0 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + eslint-visitor-keys: ^3.3.0 + checksum: 976b05d103fe8335bef5c93ad3f76d781e3ce50329c0243ee0f00c0fcfb186c81df50e64bfdd34970148113f8ade90887f53e3c4938183afba830b4ba8e30a35 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/visitor-keys@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + eslint-visitor-keys: ^3.4.1 + checksum: fc593c4e94d5739be7bd88e42313a301bc9806fad758b6a0a1bafd296ff41522be602caf4976beec84e363b0f56585bb98df3c157f70de984de721798501fd8a + languageName: node + linkType: hard + +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 4f656b7b4672f2ce6e272f2427d8b0824ed11546a601d8d5412b9d7704e83db38a8d9f402ecdf2b9063fc164af842ad0ec4a55819f621ed7e7ea4d1efcc74524 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + +"abort-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "abort-controller@npm:3.0.0" + dependencies: + event-target-shim: ^5.0.0 + checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75 + languageName: node + linkType: hard + +"accepts@npm:^1.3.7, accepts@npm:~1.3.5, accepts@npm:~1.3.7": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" + dependencies: + mime-types: ~2.1.34 + negotiator: 0.6.3 + checksum: 50c43d32e7b50285ebe84b613ee4a3aa426715a7d131b65b786e2ead0fd76b6b60091b9916d3478a75f11f162628a2139991b6c03ab3f1d9ab7c86075dc8eab4 + languageName: node + linkType: hard + +"acorn-jsx@npm:^5.3.2": + version: 5.3.2 + resolution: "acorn-jsx@npm:5.3.2" + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: c3d3b2a89c9a056b205b69530a37b972b404ee46ec8e5b341666f9513d3163e2a4f214a71f4dfc7370f5a9c07472d2fd1c11c91c3f03d093e37637d95da98950 + languageName: node + linkType: hard + +"acorn-walk@npm:^8.1.1": + version: 8.3.1 + resolution: "acorn-walk@npm:8.3.1" + checksum: 5c8926ddb5400bc825b6baca782931f9df4ace603ba1a517f5243290fd9cdb089d52877840687b5d5c939591ebc314e2e63721514feaa37c6829c828f2b940ce + languageName: node + linkType: hard + +"acorn@npm:^8.4.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.11.2 + resolution: "acorn@npm:8.11.2" + bin: + acorn: bin/acorn + checksum: 818450408684da89423e3daae24e4dc9b68692db8ab49ea4569c7c5abb7a3f23669438bf129cc81dfdada95e1c9b944ee1bfca2c57a05a4dc73834a612fbf6a7 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" + dependencies: + debug: ^4.3.4 + checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: ^2.0.0 + indent-string: ^4.0.0 + checksum: 1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv@npm:^6.12.4": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: ^3.1.1 + fast-json-stable-stringify: ^2.0.0 + json-schema-traverse: ^0.4.1 + uri-js: ^4.2.2 + checksum: 874972efe5c4202ab0a68379481fbd3d1b5d0a7bd6d3cc21d40d3536ebff3352a2a1fabb632d4fd2cc7fe4cbdcd5ed6782084c9bbf7f32a1536d18f9da5007d4 + languageName: node + linkType: hard + +"anser@npm:^1.4.9": + version: 1.4.10 + resolution: "anser@npm:1.4.10" + checksum: 3823c64f8930d3d97f36e56cdf646fa6351f1227e25eee70c3a17697447cae4238fc3a309bb3bc2003cf930687fa72aed71426dbcf3c0a15565e120a7fee5507 + languageName: node + linkType: hard + +"ansi-escapes@npm:^4.2.1": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: ^0.21.3 + checksum: 93111c42189c0a6bed9cdb4d7f2829548e943827ee8479c74d6e0b22ee127b2a21d3f8b5ca57723b8ef78ce011fbfc2784350eb2bde3ccfccf2f575fa8489815 + languageName: node + linkType: hard + +"ansi-fragments@npm:^0.2.1": + version: 0.2.1 + resolution: "ansi-fragments@npm:0.2.1" + dependencies: + colorette: ^1.0.7 + slice-ansi: ^2.0.0 + strip-ansi: ^5.0.0 + checksum: 22c3eb8a0aec6bcc15f4e78d77a264ee0c92160b09c94260d1161d051eb8c77c7ecfeb3c8ec44ca180bad554fef3489528c509a644a7589635fc36bcaf08234f + languageName: node + linkType: hard + +"ansi-regex@npm:^4.1.0": + version: 4.1.1 + resolution: "ansi-regex@npm:4.1.1" + checksum: b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.0, ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: ^1.9.0 + checksum: d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: ^2.0.1 + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"ansi-styles@npm:^5.0.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 + languageName: node + linkType: hard + +"anymatch@npm:^3.0.3": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: ^3.0.0 + picomatch: ^2.0.4 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"appdirsjs@npm:^1.2.4": + version: 1.2.7 + resolution: "appdirsjs@npm:1.2.7" + checksum: 3411b4e31edf8687ad69638ef81b92b4889ad31e527b673a364990c28c99b6b8c3ea81b2b2b636d5b08e166a18706c4464fd8436b298f85384d499ba6b8dc4b7 + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: ~1.0.2 + checksum: 7ca6e45583a28de7258e39e13d81e925cfa25d7d4aacbf806a382d3c02fcb13403a07fb8aeef949f10a7cfe4a62da0e2e807b348a5980554cc28ee573ef95945 + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced + languageName: node + linkType: hard + +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + +"array-includes@npm:^3.1.6": + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-string: ^1.0.7 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc + languageName: node + linkType: hard + +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.3.1": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: 5d6b4bf102065fb3f43764bfff6feb3295d372ce89591e6005df3d0ce388527a9f03c909af6f2a973969a4d178ab232ffc9236654149173e0e187ec3a1a6b87b + languageName: node + linkType: hard + +"array.prototype.flatmap@npm:^1.3.1": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: ce09fe21dc0bcd4f30271f8144083aa8c13d4639074d6c8dc82054b847c7fc9a0c97f857491f4da19d4003e507172a78f4bcd12903098adac8b9cd374f734be3 + languageName: node + linkType: hard + +"array.prototype.tosorted@npm:^1.1.1": + version: 1.1.2 + resolution: "array.prototype.tosorted@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + get-intrinsic: ^1.2.1 + checksum: 3607a7d6b117f0ffa6f4012457b7af0d47d38cf05e01d50e09682fd2fb782a66093a5e5fbbdbad77c8c824794a9d892a51844041641f719ad41e3a974f0764de + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.2": + version: 1.0.2 + resolution: "arraybuffer.prototype.slice@npm:1.0.2" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-array-buffer: ^3.0.2 + is-shared-array-buffer: ^1.0.2 + checksum: c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 + languageName: node + linkType: hard + +"asap@npm:~2.0.6": + version: 2.0.6 + resolution: "asap@npm:2.0.6" + checksum: b296c92c4b969e973260e47523207cd5769abd27c245a68c26dc7a0fe8053c55bb04360237cb51cab1df52be939da77150ace99ad331fb7fb13b3423ed73ff3d + languageName: node + linkType: hard + +"ast-types@npm:0.15.2": + version: 0.15.2 + resolution: "ast-types@npm:0.15.2" + dependencies: + tslib: ^2.0.1 + checksum: 24f0d86bf9e4c8dae16fa24b13c1776f2c2677040bcfbd4eb4f27911db49020be4876885e45e6cfcc548ed4dfea3a0742d77e3346b84fae47379cb0b89e9daa0 + languageName: node + linkType: hard + +"astral-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "astral-regex@npm:1.0.0" + checksum: 93417fc0879531cd95ace2560a54df865c9461a3ac0714c60cbbaa5f1f85d2bee85489e78d82f70b911b71ac25c5f05fc5a36017f44c9bb33c701bee229ff848 + languageName: node + linkType: hard + +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + +"asynciterator.prototype@npm:^1.0.0": + version: 1.0.0 + resolution: "asynciterator.prototype@npm:1.0.0" + dependencies: + has-symbols: ^1.0.3 + checksum: e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 + languageName: node + linkType: hard + +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a + languageName: node + linkType: hard + +"babel-core@npm:^7.0.0-bridge.0": + version: 7.0.0-bridge.0 + resolution: "babel-core@npm:7.0.0-bridge.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2a1cb879019dffb08d17bec36e13c3a6d74c94773f41c1fd8b14de13f149cc34b705b0a1e07b42fcf35917b49d78db6ff0c5c3b00b202a5235013d517b5c6bbb + languageName: node + linkType: hard + +"babel-jest@npm:^29.6.3, babel-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "babel-jest@npm:29.7.0" + dependencies: + "@jest/transform": ^29.7.0 + "@types/babel__core": ^7.1.14 + babel-plugin-istanbul: ^6.1.1 + babel-preset-jest: ^29.6.3 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + slash: ^3.0.0 + peerDependencies: + "@babel/core": ^7.8.0 + checksum: ee6f8e0495afee07cac5e4ee167be705c711a8cc8a737e05a587a131fdae2b3c8f9aa55dfd4d9c03009ac2d27f2de63d8ba96d3e8460da4d00e8af19ef9a83f7 + languageName: node + linkType: hard + +"babel-plugin-istanbul@npm:^6.1.1": + version: 6.1.1 + resolution: "babel-plugin-istanbul@npm:6.1.1" + dependencies: + "@babel/helper-plugin-utils": ^7.0.0 + "@istanbuljs/load-nyc-config": ^1.0.0 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-instrument: ^5.0.4 + test-exclude: ^6.0.0 + checksum: cb4fd95738219f232f0aece1116628cccff16db891713c4ccb501cddbbf9272951a5df81f2f2658dfdf4b3e7b236a9d5cbcf04d5d8c07dd5077297339598061a + languageName: node + linkType: hard + +"babel-plugin-jest-hoist@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-plugin-jest-hoist@npm:29.6.3" + dependencies: + "@babel/template": ^7.3.3 + "@babel/types": ^7.3.3 + "@types/babel__core": ^7.1.14 + "@types/babel__traverse": ^7.0.6 + checksum: 51250f22815a7318f17214a9d44650ba89551e6d4f47a2dc259128428324b52f5a73979d010cefd921fd5a720d8c1d55ad74ff601cd94c7bd44d5f6292fde2d1 + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs2@npm:^0.4.6": + version: 0.4.7 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.7" + dependencies: + "@babel/compat-data": ^7.22.6 + "@babel/helper-define-polyfill-provider": ^0.4.4 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: b3c84ce44d00211c919a94f76453fb2065861612f3e44862eb7acf854e325c738a7441ad82690deba2b6fddfa2ad2cf2c46960f46fab2e3b17c6ed4fd2d73b38 + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs3@npm:^0.8.5": + version: 0.8.7 + resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.4 + core-js-compat: ^3.33.1 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 51bc215ab0c062bbb2225d912f69f8a6705d1837c8e01f9651307b5b937804287c1d73ebd8015689efcc02c3c21f37688b9ee6f5997635619b7a9cc4b7d9908d + languageName: node + linkType: hard + +"babel-plugin-polyfill-regenerator@npm:^0.5.3": + version: 0.5.4 + resolution: "babel-plugin-polyfill-regenerator@npm:0.5.4" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.4 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 461b735c6c0eca3c7b4434d14bfa98c2ab80f00e2bdc1c69eb46d1d300092a9786d76bbd3ee55e26d2d1a2380c14592d8d638e271dfd2a2b78a9eacffa3645d1 + languageName: node + linkType: hard + +"babel-plugin-syntax-trailing-function-commas@npm:^7.0.0-beta.0": + version: 7.0.0-beta.0 + resolution: "babel-plugin-syntax-trailing-function-commas@npm:7.0.0-beta.0" + checksum: e37509156ca945dd9e4b82c66dd74f2d842ad917bd280cb5aa67960942300cd065eeac476d2514bdcdedec071277a358f6d517c31d9f9244d9bbc3619a8ecf8a + languageName: node + linkType: hard + +"babel-plugin-transform-flow-enums@npm:^0.0.2": + version: 0.0.2 + resolution: "babel-plugin-transform-flow-enums@npm:0.0.2" + dependencies: + "@babel/plugin-syntax-flow": ^7.12.1 + checksum: fd52aef54448e01948a9d1cca0c8f87d064970c8682458962b7a222c372704bc2ce26ae8109e0ab2566e7ea5106856460f04c1a5ed794ab3bcd2f42cae1d9845 + languageName: node + linkType: hard + +"babel-preset-current-node-syntax@npm:^1.0.0": + version: 1.0.1 + resolution: "babel-preset-current-node-syntax@npm:1.0.1" + dependencies: + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-bigint": ^7.8.3 + "@babel/plugin-syntax-class-properties": ^7.8.3 + "@babel/plugin-syntax-import-meta": ^7.8.3 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.8.3 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.8.3 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-top-level-await": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: d118c2742498c5492c095bc8541f4076b253e705b5f1ad9a2e7d302d81a84866f0070346662355c8e25fc02caa28dc2da8d69bcd67794a0d60c4d6fab6913cc8 + languageName: node + linkType: hard + +"babel-preset-fbjs@npm:^3.4.0": + version: 3.4.0 + resolution: "babel-preset-fbjs@npm:3.4.0" + dependencies: + "@babel/plugin-proposal-class-properties": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.0.0 + "@babel/plugin-syntax-class-properties": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.0.0 + "@babel/plugin-syntax-jsx": ^7.0.0 + "@babel/plugin-syntax-object-rest-spread": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-block-scoped-functions": ^7.0.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.0.0 + "@babel/plugin-transform-flow-strip-types": ^7.0.0 + "@babel/plugin-transform-for-of": ^7.0.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-member-expression-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-object-super": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-property-literals": ^7.0.0 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-template-literals": ^7.0.0 + babel-plugin-syntax-trailing-function-commas: ^7.0.0-beta.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: b3352cf690729125997f254bc31b9c4db347f8646f1571958ced1c45f0da89439e183e1c88e35397eb0361b9e1fbb1dd8142d3f4647814deb427e53c54f44d5f + languageName: node + linkType: hard + +"babel-preset-jest@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-preset-jest@npm:29.6.3" + dependencies: + babel-plugin-jest-hoist: ^29.6.3 + babel-preset-current-node-syntax: ^1.0.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"big-integer@npm:^1.6.44": + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 6e86885787a20fed96521958ae9086960e4e4b5e74d04f3ef7513d4d0ad631a9f3bde2730fc8aaa4b00419fc865f6ec573e5320234531ef37505da7da192c40b + languageName: node + linkType: hard + +"bl@npm:^4.1.0": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 + languageName: node + linkType: hard + +"bplist-parser@npm:^0.2.0": + version: 0.2.0 + resolution: "bplist-parser@npm:0.2.0" + dependencies: + big-integer: ^1.6.44 + checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: ^1.0.0 + concat-map: 0.0.1 + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: ^1.0.0 + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:^3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: ^7.0.1 + checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + languageName: node + linkType: hard + +"browserslist@npm:^4.22.2": + version: 4.22.2 + resolution: "browserslist@npm:4.22.2" + dependencies: + caniuse-lite: ^1.0.30001565 + electron-to-chromium: ^1.4.601 + node-releases: ^2.0.14 + update-browserslist-db: ^1.0.13 + bin: + browserslist: cli.js + checksum: 33ddfcd9145220099a7a1ac533cecfe5b7548ffeb29b313e1b57be6459000a1f8fa67e781cf4abee97268ac594d44134fcc4a6b2b4750ceddc9796e3a22076d9 + languageName: node + linkType: hard + +"bser@npm:2.1.1": + version: 2.1.1 + resolution: "bser@npm:2.1.1" + dependencies: + node-int64: ^0.4.0 + checksum: 9ba4dc58ce86300c862bffc3ae91f00b2a03b01ee07f3564beeeaf82aa243b8b03ba53f123b0b842c190d4399b94697970c8e7cf7b1ea44b61aa28c3526a4449 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.1.13 + checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 + languageName: node + linkType: hard + +"bundle-name@npm:^3.0.0": + version: 3.0.0 + resolution: "bundle-name@npm:3.0.0" + dependencies: + run-applescript: ^5.0.0 + checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615 + languageName: node + linkType: hard + +"bytes@npm:3.0.0": + version: 3.0.0 + resolution: "bytes@npm:3.0.0" + checksum: a2b386dd8188849a5325f58eef69c3b73c51801c08ffc6963eddc9be244089ba32d19347caf6d145c86f315ae1b1fc7061a32b0c1aa6379e6a719090287ed101 + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.1 + resolution: "cacache@npm:18.0.1" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" + dependencies: + function-bind: ^1.1.2 + get-intrinsic: ^1.2.1 + set-function-length: ^1.1.1 + checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + languageName: node + linkType: hard + +"caller-callsite@npm:^2.0.0": + version: 2.0.0 + resolution: "caller-callsite@npm:2.0.0" + dependencies: + callsites: ^2.0.0 + checksum: b685e9d126d9247b320cfdfeb3bc8da0c4be28d8fb98c471a96bc51aab3130099898a2fe3bf0308f0fe048d64c37d6d09f563958b9afce1a1e5e63d879c128a2 + languageName: node + linkType: hard + +"caller-path@npm:^2.0.0": + version: 2.0.0 + resolution: "caller-path@npm:2.0.0" + dependencies: + caller-callsite: ^2.0.0 + checksum: 3e12ccd0c71ec10a057aac69e3ec175b721ca858c640df021ef0d25999e22f7c1d864934b596b7d47038e9b56b7ec315add042abbd15caac882998b50102fb12 + languageName: node + linkType: hard + +"callsites@npm:^2.0.0": + version: 2.0.0 + resolution: "callsites@npm:2.0.0" + checksum: be2f67b247df913732b7dec1ec0bbfcdbaea263e5a95968b19ec7965affae9496b970e3024317e6d4baa8e28dc6ba0cec03f46fdddc2fdcc51396600e53c2623 + languageName: node + linkType: hard + +"callsites@npm:^3.0.0": + version: 3.1.0 + resolution: "callsites@npm:3.1.0" + checksum: 072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.2.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001565": + version: 1.0.30001570 + resolution: "caniuse-lite@npm:1.0.30001570" + checksum: 460be2c7a9b1c8a83b6aae4226661c276d9dada6c84209dee547699cf4b28030b9d1fc29ddd7626acee77412b6401993878ea0ef3eadbf3a63ded9034896ae20 + languageName: node + linkType: hard + +"chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: ^3.2.1 + escape-string-regexp: ^1.0.5 + supports-color: ^5.3.0 + checksum: ec3661d38fe77f681200f878edbd9448821924e0f93a9cefc0e26a33b145f1027a2084bf19967160d11e1f03bfe4eaffcabf5493b89098b2782c3fe0b03d80c2 + languageName: node + linkType: hard + +"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: b563e4b6039b15213114626621e7a3d12f31008bdce20f9c741d69987f62aeaace7ec30f6018890ad77b2e9b4d95324c9f5acfca58a9441e3b1dcdd1e2525d17 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"chrome-launcher@npm:^0.15.2": + version: 0.15.2 + resolution: "chrome-launcher@npm:0.15.2" + dependencies: + "@types/node": "*" + escape-string-regexp: ^4.0.0 + is-wsl: ^2.2.0 + lighthouse-logger: ^1.0.0 + bin: + print-chrome-path: bin/print-chrome-path.js + checksum: e1f8131b9f7bd931248ea85f413c6cdb93a0d41440ff5bf0987f36afb081d2b2c7b60ba6062ee7ae2dd9b052143f6b275b38c9eb115d11b49c3ea8829bad7db0 + languageName: node + linkType: hard + +"chromium-edge-launcher@npm:^1.0.0": + version: 1.0.0 + resolution: "chromium-edge-launcher@npm:1.0.0" + dependencies: + "@types/node": "*" + escape-string-regexp: ^4.0.0 + is-wsl: ^2.2.0 + lighthouse-logger: ^1.0.0 + mkdirp: ^1.0.4 + rimraf: ^3.0.2 + checksum: 77ce4fc03e7ee6f72383cc23c9b34a18ff368fcce8d23bcdc777c603c6d48ae25d3b79be5a1256e7edeec65f6e2250245a5372175454a329bcc99df672160ee4 + languageName: node + linkType: hard + +"ci-info@npm:^2.0.0": + version: 2.0.0 + resolution: "ci-info@npm:2.0.0" + checksum: 3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 + languageName: node + linkType: hard + +"ci-info@npm:^3.2.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87 + languageName: node + linkType: hard + +"cjs-module-lexer@npm:^1.0.0": + version: 1.2.3 + resolution: "cjs-module-lexer@npm:1.2.3" + checksum: 5ea3cb867a9bb609b6d476cd86590d105f3cfd6514db38ff71f63992ab40939c2feb68967faa15a6d2b1f90daa6416b79ea2de486e9e2485a6f8b66a21b4fb0a + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: ^3.1.0 + checksum: 2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 + languageName: node + linkType: hard + +"cli-spinners@npm:^2.5.0": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 1bd588289b28432e4676cb5d40505cfe3e53f2e4e10fbe05c8a710a154d6fe0ce7836844b00d6858f740f2ffe67cdc36e0fce9c7b6a8430e80e6388d5aa4956c + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: ^2.0.4 + kind-of: ^6.0.2 + shallow-clone: ^3.0.0 + checksum: 770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 + languageName: node + linkType: hard + +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + +"co@npm:^4.6.0": + version: 4.6.0 + resolution: "co@npm:4.6.0" + checksum: 5210d9223010eb95b29df06a91116f2cf7c8e0748a9013ed853b53f362ea0e822f1e5bb054fb3cefc645239a4cf966af1f6133a3b43f40d591f3b68ed6cf0510 + languageName: node + linkType: hard + +"collect-v8-coverage@npm:^1.0.0": + version: 1.0.2 + resolution: "collect-v8-coverage@npm:1.0.2" + checksum: c10f41c39ab84629d16f9f6137bc8a63d332244383fc368caf2d2052b5e04c20cd1fd70f66fcf4e2422b84c8226598b776d39d5f2d2a51867cc1ed5d1982b4da + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: 1.1.3 + checksum: fd7a64a17cde98fb923b1dd05c5f2e6f7aefda1b60d67e8d449f9328b4e53b228a428fd38bfeaeb2db2ff6b6503a776a996150b80cdf224062af08a5c8a3a203 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: ~1.1.4 + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"colorette@npm:^1.0.7": + version: 1.4.0 + resolution: "colorette@npm:1.4.0" + checksum: 01c3c16058b182a4ab4c126a65a75faa4d38a20fa7c845090b25453acec6c371bb2c5dceb0a2338511f17902b9d1a9af0cadd8509c9403894b79311032c256c3 + languageName: node + linkType: hard + +"command-exists@npm:^1.2.8": + version: 1.2.9 + resolution: "command-exists@npm:1.2.9" + checksum: 729ae3d88a2058c93c58840f30341b7f82688a573019535d198b57a4d8cb0135ced0ad7f52b591e5b28a90feb2c675080ce916e56254a0f7c15cb2395277cac3 + languageName: node + linkType: hard + +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + +"commander@npm:^9.4.1": + version: 9.5.0 + resolution: "commander@npm:9.5.0" + checksum: c7a3e27aa59e913b54a1bafd366b88650bc41d6651f0cbe258d4ff09d43d6a7394232a4dadd0bf518b3e696fdf595db1028a0d82c785b88bd61f8a440cecfade + languageName: node + linkType: hard + +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 59715f2fc456a73f68826285718503340b9f0dd89bfffc42749906c5cf3d4277ef11ef1cca0350d0e79204f00f1f6d83851ececc9095dc88512a697ac0b9bdcb + languageName: node + linkType: hard + +"compressible@npm:~2.0.16": + version: 2.0.18 + resolution: "compressible@npm:2.0.18" + dependencies: + mime-db: ">= 1.43.0 < 2" + checksum: 58321a85b375d39230405654721353f709d0c1442129e9a17081771b816302a012471a9b8f4864c7dbe02eef7f2aaac3c614795197092262e94b409c9be108f0 + languageName: node + linkType: hard + +"compression@npm:^1.7.1": + version: 1.7.4 + resolution: "compression@npm:1.7.4" + dependencies: + accepts: ~1.3.5 + bytes: 3.0.0 + compressible: ~2.0.16 + debug: 2.6.9 + on-headers: ~1.0.2 + safe-buffer: 5.1.2 + vary: ~1.1.2 + checksum: 35c0f2eb1f28418978615dc1bc02075b34b1568f7f56c62d60f4214d4b7cc00d0f6d282b5f8a954f59872396bd770b6b15ffd8aa94c67d4bce9b8887b906999b + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"connect@npm:^3.6.5": + version: 3.7.0 + resolution: "connect@npm:3.7.0" + dependencies: + debug: 2.6.9 + finalhandler: 1.1.2 + parseurl: ~1.3.3 + utils-merge: 1.0.1 + checksum: 96e1c4effcf219b065c7823e57351c94366d2e2a6952fa95e8212bffb35c86f1d5a3f9f6c5796d4cd3a5fdda628368b1c3cc44bf19c66cfd68fe9f9cab9177e2 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 63ae9933be5a2b8d4509daca5124e20c14d023c820258e484e32dc324d34c2754e71297c94a05784064ad27615037ef677e3f0c00469fb55f409d2bb21261035 + languageName: node + linkType: hard + +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": + version: 3.34.0 + resolution: "core-js-compat@npm:3.34.0" + dependencies: + browserslist: ^4.22.2 + checksum: 6281f7f57a72f254c06611ec088445e11cf84e0b4edfb5f43dece1a1ff8b0ed0e81ed0bc291024761cd90c39d0f007d8bc46548265139808081d311c7cbc9c81 + languageName: node + linkType: hard + +"core-util-is@npm:~1.0.0": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + +"cosmiconfig@npm:^5.0.5, cosmiconfig@npm:^5.1.0": + version: 5.2.1 + resolution: "cosmiconfig@npm:5.2.1" + dependencies: + import-fresh: ^2.0.0 + is-directory: ^0.3.1 + js-yaml: ^3.13.1 + parse-json: ^4.0.0 + checksum: 8b6f1d3c8a5ffdf663a952f17af0761adf210b7a5933d0fe8988f3ca3a1f0e1e5cbbb74d5b419c15933dd2fdcaec31dbc5cc85cb8259a822342b93b529eff89c + languageName: node + linkType: hard + +"create-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "create-jest@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + prompts: ^2.0.1 + bin: + create-jest: bin/create-jest.js + checksum: 1427d49458adcd88547ef6fa39041e1fe9033a661293aa8d2c3aa1b4967cb5bf4f0c00436c7a61816558f28ba2ba81a94d5c962e8022ea9a883978fc8e1f2945 + languageName: node + linkType: hard + +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: ^3.1.0 + shebang-command: ^2.0.0 + which: ^2.0.1 + checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52 + languageName: node + linkType: hard + +"csstype@npm:^3.0.2": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 + languageName: node + linkType: hard + +"dayjs@npm:^1.8.15": + version: 1.11.10 + resolution: "dayjs@npm:1.11.10" + checksum: a6b5a3813b8884f5cd557e2e6b7fa569f4c5d0c97aca9558e38534af4f2d60daafd3ff8c2000fed3435cfcec9e805bcebd99f90130c6d1c5ef524084ced588c4 + languageName: node + linkType: hard + +"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.6.9": + version: 2.6.9 + resolution: "debug@npm:2.6.9" + dependencies: + ms: 2.0.0 + checksum: d2f51589ca66df60bf36e1fa6e4386b318c3f1e06772280eea5b1ae9fd3d05e9c2b7fd8a7d862457d00853c75b00451aa2d7459b924629ee385287a650f58fe6 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"dedent@npm:^1.0.0": + version: 1.5.1 + resolution: "dedent@npm:1.5.1" + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + checksum: c3c300a14edf1bdf5a873f9e4b22e839d62490bc5c8d6169c1f15858a1a76733d06a9a56930e963d677a2ceeca4b6b0894cc5ea2f501aa382ca5b92af3413c2a + languageName: node + linkType: hard + +"deep-is@npm:^0.1.3": + version: 0.1.4 + resolution: "deep-is@npm:0.1.4" + checksum: edb65dd0d7d1b9c40b2f50219aef30e116cedd6fc79290e740972c132c09106d2e80aa0bc8826673dd5a00222d4179c84b36a790eef63a4c4bca75a37ef90804 + languageName: node + linkType: hard + +"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.0": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 2024c6a980a1b7128084170c4cf56b0fd58a63f2da1660dcfe977415f27b17dbe5888668b59d0b063753f3220719d5e400b7f113609489c90160bb9a5518d052 + languageName: node + linkType: hard + +"default-browser-id@npm:^3.0.0": + version: 3.0.0 + resolution: "default-browser-id@npm:3.0.0" + dependencies: + bplist-parser: ^0.2.0 + untildify: ^4.0.0 + checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 + languageName: node + linkType: hard + +"default-browser@npm:^4.0.0": + version: 4.0.0 + resolution: "default-browser@npm:4.0.0" + dependencies: + bundle-name: ^3.0.0 + default-browser-id: ^3.0.0 + execa: ^7.1.1 + titleize: ^3.0.0 + checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 + languageName: node + linkType: hard + +"defaults@npm:^1.0.3": + version: 1.0.4 + resolution: "defaults@npm:1.0.4" + dependencies: + clone: ^1.0.2 + checksum: 3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" + dependencies: + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + languageName: node + linkType: hard + +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 + languageName: node + linkType: hard + +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: ^1.0.1 + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + +"denodeify@npm:^1.2.1": + version: 1.2.1 + resolution: "denodeify@npm:1.2.1" + checksum: a85c8f7fce5626e311edd897c27ad571b29393c4a739dc29baee48328e09edd82364ff697272dd612462c67e48b4766389642b5bdfaea0dc114b7c6a276c0eae + languageName: node + linkType: hard + +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: abbe19c768c97ee2eed6282d8ce3031126662252c58d711f646921c9623f9052e3e1906443066beec1095832f534e57c523b7333f8e7e0d93051ab6baef5ab3a + languageName: node + linkType: hard + +"deprecated-react-native-prop-types@npm:^5.0.0": + version: 5.0.0 + resolution: "deprecated-react-native-prop-types@npm:5.0.0" + dependencies: + "@react-native/normalize-colors": ^0.73.0 + invariant: ^2.2.4 + prop-types: ^15.8.1 + checksum: ccbd4214733a178ef51934c4e0149f5c3ab60aa318d68500b6d6b4b59be9d6c25b844f808ed7095d82e1bbef6fc4bc49e0dea14d55d3ebd1ff383011ac2a1576 + languageName: node + linkType: hard + +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + +"detect-newline@npm:^3.0.0": + version: 3.1.0 + resolution: "detect-newline@npm:3.1.0" + checksum: ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 + languageName: node + linkType: hard + +"diff-sequences@npm:^29.6.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: f4914158e1f2276343d98ff5b31fc004e7304f5470bf0f1adb2ac6955d85a531a6458d33e87667f98f6ae52ebd3891bb47d420bb48a5bd8b7a27ee25b20e33aa + languageName: node + linkType: hard + +"diff@npm:^4.0.1": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: f2c09b0ce4e6b301c221addd83bf3f454c0bc00caa3dd837cf6c127d6edf7223aa2bbe3b688feea110b7f262adbfc845b757c44c8a9f8c0c5b15d8fa9ce9d20d + languageName: node + linkType: hard + +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: ^4.0.0 + checksum: fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 + languageName: node + linkType: hard + +"doctrine@npm:^2.1.0": + version: 2.1.0 + resolution: "doctrine@npm:2.1.0" + dependencies: + esutils: ^2.0.2 + checksum: a45e277f7feaed309fe658ace1ff286c6e2002ac515af0aaf37145b8baa96e49899638c7cd47dccf84c3d32abfc113246625b3ac8f552d1046072adee13b0dc8 + languageName: node + linkType: hard + +"doctrine@npm:^3.0.0": + version: 3.0.0 + resolution: "doctrine@npm:3.0.0" + dependencies: + esutils: ^2.0.2 + checksum: fd7673ca77fe26cd5cba38d816bc72d641f500f1f9b25b83e8ce28827fe2da7ad583a8da26ab6af85f834138cf8dae9f69b0cd6ab925f52ddab1754db44d99ce + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed + languageName: node + linkType: hard + +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.4.601": + version: 1.4.614 + resolution: "electron-to-chromium@npm:1.4.614" + checksum: e99e6c8600aa76b4d385a4381b943ec2cfeebfdc36a2675fbf87b334256428b92f5d79ab287b8bab0e1875a992284a8a95a03b41b71e9d64a75b5088daf1dc5e + languageName: node + linkType: hard + +"emittery@npm:^0.13.1": + version: 0.13.1 + resolution: "emittery@npm:0.13.1" + checksum: 2b089ab6306f38feaabf4f6f02792f9ec85fc054fda79f44f6790e61bbf6bc4e1616afb9b232e0c5ec5289a8a452f79bfa6d905a6fd64e94b49981f0934001c6 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + +"encodeurl@npm:~1.0.2": + version: 1.0.2 + resolution: "encodeurl@npm:1.0.2" + checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: ^0.6.2 + checksum: bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"envinfo@npm:^7.10.0": + version: 7.11.0 + resolution: "envinfo@npm:7.11.0" + bin: + envinfo: dist/cli.js + checksum: c45a7d20409d5f4cda72483b150d3816b15b434f2944d72c1495d8838bd7c4e7b2f32c12128ffb9b92b5f66f436237b8a525eb3a9a5da2d20013bc4effa28aef + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 + languageName: node + linkType: hard + +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: ^0.2.1 + checksum: c1c2b8b65f9c91b0f9d75f0debaa7ec5b35c266c2cac5de412c1a6de86d4cbae04ae44e510378cb14d032d0645a36925d0186f8bb7367bcc629db256b743a001 + languageName: node + linkType: hard + +"error-stack-parser@npm:^2.0.6": + version: 2.1.4 + resolution: "error-stack-parser@npm:2.1.4" + dependencies: + stackframe: ^1.3.4 + checksum: 3b916d2d14c6682f287c8bfa28e14672f47eafe832701080e420e7cdbaebb2c50293868256a95706ac2330fe078cf5664713158b49bc30d7a5f2ac229ded0e18 + languageName: node + linkType: hard + +"errorhandler@npm:^1.5.1": + version: 1.5.1 + resolution: "errorhandler@npm:1.5.1" + dependencies: + accepts: ~1.3.7 + escape-html: ~1.0.3 + checksum: 73b7abb08fb751107e9bebecc33c40c0641a54be8bda8e4a045f3f5cb7b805041927fef5629ea39b1737799eb52fe2499ca531f11ac51b0294ccc4667d72cb91 + languageName: node + linkType: hard + +"es-abstract@npm:^1.22.1": + version: 1.22.3 + resolution: "es-abstract@npm:1.22.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + arraybuffer.prototype.slice: ^1.0.2 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.5 + es-set-tostringtag: ^2.0.1 + es-to-primitive: ^1.2.1 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.2 + get-symbol-description: ^1.0.0 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 + is-callable: ^1.2.7 + is-negative-zero: ^2.0.2 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + is-string: ^1.0.7 + is-typed-array: ^1.1.12 + is-weakref: ^1.0.2 + object-inspect: ^1.13.1 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + safe-array-concat: ^1.0.1 + safe-regex-test: ^1.0.0 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 + string.prototype.trimstart: ^1.0.7 + typed-array-buffer: ^1.0.0 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.13 + checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a + languageName: node + linkType: hard + +"es-iterator-helpers@npm:^1.0.12": + version: 1.0.15 + resolution: "es-iterator-helpers@npm:1.0.15" + dependencies: + asynciterator.prototype: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.1 + es-abstract: ^1.22.1 + es-set-tostringtag: ^2.0.1 + function-bind: ^1.1.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + iterator.prototype: ^1.1.2 + safe-array-concat: ^1.0.1 + checksum: 50081ae5c549efe62e5c1d244df0194b40b075f7897fc2116b7e1aa437eb3c41f946d2afda18c33f9b31266ec544765932542765af839f76fa6d7b7855d1e0e1 + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" + dependencies: + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 + languageName: node + linkType: hard + +"es-shim-unscopables@npm:^1.0.0": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" + dependencies: + hasown: ^2.0.0 + checksum: 432bd527c62065da09ed1d37a3f8e623c423683285e6188108286f4a1e8e164a5bcbfbc0051557c7d14633cd2a41ce24c7048e6bbb66a985413fd32f1be72626 + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: ^1.1.4 + is-date-object: ^1.0.1 + is-symbol: ^1.0.2 + checksum: 4ead6671a2c1402619bdd77f3503991232ca15e17e46222b0a41a5d81aebc8740a77822f5b3c965008e631153e9ef0580540007744521e72de8e33599fca2eed + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 + languageName: node + linkType: hard + +"escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"eslint-config-prettier@npm:^8.5.0": + version: 8.10.0 + resolution: "eslint-config-prettier@npm:8.10.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 153266badd477e49b0759816246b2132f1dbdb6c7f313ca60a9af5822fd1071c2bc5684a3720d78b725452bbac04bb130878b2513aea5e72b1b792de5a69fec8 + languageName: node + linkType: hard + +"eslint-plugin-eslint-comments@npm:^3.2.0": + version: 3.2.0 + resolution: "eslint-plugin-eslint-comments@npm:3.2.0" + dependencies: + escape-string-regexp: ^1.0.5 + ignore: ^5.0.5 + peerDependencies: + eslint: ">=4.19.1" + checksum: c9fe273dd56699abdf7e416cfad0344eb50aa01564a5a9133e72d982defb89310bc2e9b0b148ce19c5190d7ff641223b0ba9e667a194bc48467c3dd0d471e657 + languageName: node + linkType: hard + +"eslint-plugin-ft-flow@npm:^2.0.1": + version: 2.0.3 + resolution: "eslint-plugin-ft-flow@npm:2.0.3" + dependencies: + lodash: ^4.17.21 + string-natural-compare: ^3.0.1 + peerDependencies: + "@babel/eslint-parser": ^7.12.0 + eslint: ^8.1.0 + checksum: 6272f7c352154875dc85c7dcd7cf66f6ed926a9a6aba81c675583bcc6695147597d6b9a6db0f643a387d14eccd61dc36daf20eec1c49e91ce1c63c01ffe295f7 + languageName: node + linkType: hard + +"eslint-plugin-jest@npm:^26.5.3": + version: 26.9.0 + resolution: "eslint-plugin-jest@npm:26.9.0" + dependencies: + "@typescript-eslint/utils": ^5.10.0 + peerDependencies: + "@typescript-eslint/eslint-plugin": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 6d5fd5c95368f1ca2640389aeb7ce703d6202493c3ec6bdedb4eaca37233710508b0c75829e727765a16fd27029a466d34202bc7f2811c752038ccbbce224400 + languageName: node + linkType: hard + +"eslint-plugin-prettier@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-plugin-prettier@npm:4.2.1" + dependencies: + prettier-linter-helpers: ^1.0.0 + peerDependencies: + eslint: ">=7.28.0" + prettier: ">=2.0.0" + peerDependenciesMeta: + eslint-config-prettier: + optional: true + checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6 + languageName: node + linkType: hard + +"eslint-plugin-prettier@npm:^5.0.1": + version: 5.0.1 + resolution: "eslint-plugin-prettier@npm:5.0.1" + dependencies: + prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.5 + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: c2261033b97bafe99ccb7cc47c2fac6fa85b8bbc8b128042e52631f906b69e12afed2cdd9d7e3021cc892ee8dd4204a3574e1f32a0b718b4bb3b440944b6983b + languageName: node + linkType: hard + +"eslint-plugin-react-hooks@npm:^4.6.0": + version: 4.6.0 + resolution: "eslint-plugin-react-hooks@npm:4.6.0" + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + checksum: 23001801f14c1d16bf0a837ca7970d9dd94e7b560384b41db378b49b6e32dc43d6e2790de1bd737a652a86f81a08d6a91f402525061b47719328f586a57e86c3 + languageName: node + linkType: hard + +"eslint-plugin-react-native-globals@npm:^0.1.1": + version: 0.1.2 + resolution: "eslint-plugin-react-native-globals@npm:0.1.2" + checksum: ab91e8ecbb51718fb0763f29226b1c2d402251ab2c4730a8bf85f38b805e32d4243da46d07ccdb12cb9dcce9e7514364a1706142cf970f58dcc9a820bcf4b732 + languageName: node + linkType: hard + +"eslint-plugin-react-native@npm:^4.0.0": + version: 4.1.0 + resolution: "eslint-plugin-react-native@npm:4.1.0" + dependencies: + eslint-plugin-react-native-globals: ^0.1.1 + peerDependencies: + eslint: ^3.17.0 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: b6acc5aa91f95cb4600d6ab4c00cf22577083e72c61aabcf010f4388d97e4fc53ba075db54eeee53cba25b297e1a6ec611434f2c2d0bfb3e8dc6419400663fe9 + languageName: node + linkType: hard + +"eslint-plugin-react@npm:^7.30.1": + version: 7.33.2 + resolution: "eslint-plugin-react@npm:7.33.2" + dependencies: + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 + doctrine: ^2.1.0 + es-iterator-helpers: ^1.0.12 + estraverse: ^5.3.0 + jsx-ast-utils: ^2.4.1 || ^3.0.0 + minimatch: ^3.1.2 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 + prop-types: ^15.8.1 + resolve: ^2.0.0-next.4 + semver: ^6.3.1 + string.prototype.matchall: ^4.0.8 + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: b4c3d76390b0ae6b6f9fed78170604cc2c04b48e6778a637db339e8e3911ec9ef22510b0ae77c429698151d0f1b245f282177f384105b6830e7b29b9c9b26610 + languageName: node + linkType: hard + +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^4.1.1 + checksum: 47e4b6a3f0cc29c7feedee6c67b225a2da7e155802c6ea13bbef4ac6b9e10c66cd2dcb987867ef176292bf4e64eccc680a49e35e9e9c669f4a02bac17e86abdb + languageName: node + linkType: hard + +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^5.2.0 + checksum: ec97dbf5fb04b94e8f4c5a91a7f0a6dd3c55e46bfc7bbcd0e3138c3a76977570e02ed89a1810c778dcd72072ff0e9621ba1379b4babe53921d71e2e4486fda3e + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^2.1.0": + version: 2.1.0 + resolution: "eslint-visitor-keys@npm:2.1.0" + checksum: e3081d7dd2611a35f0388bbdc2f5da60b3a3c5b8b6e928daffff7391146b434d691577aa95064c8b7faad0b8a680266bcda0a42439c18c717b80e6718d7e267d + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 + languageName: node + linkType: hard + +"eslint@npm:^8.56.0": + version: 8.56.0 + resolution: "eslint@npm:8.56.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@eslint-community/regexpp": ^4.6.1 + "@eslint/eslintrc": ^2.1.4 + "@eslint/js": 8.56.0 + "@humanwhocodes/config-array": ^0.11.13 + "@humanwhocodes/module-importer": ^1.0.1 + "@nodelib/fs.walk": ^1.2.8 + "@ungap/structured-clone": ^1.2.0 + ajv: ^6.12.4 + chalk: ^4.0.0 + cross-spawn: ^7.0.2 + debug: ^4.3.2 + doctrine: ^3.0.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.2.2 + eslint-visitor-keys: ^3.4.3 + espree: ^9.6.1 + esquery: ^1.4.2 + esutils: ^2.0.2 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 + find-up: ^5.0.0 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 + ignore: ^5.2.0 + imurmurhash: ^0.1.4 + is-glob: ^4.0.0 + is-path-inside: ^3.0.3 + js-yaml: ^4.1.0 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.4.1 + lodash.merge: ^4.6.2 + minimatch: ^3.1.2 + natural-compare: ^1.4.0 + optionator: ^0.9.3 + strip-ansi: ^6.0.1 + text-table: ^0.2.0 + bin: + eslint: bin/eslint.js + checksum: 883436d1e809b4a25d9eb03d42f584b84c408dbac28b0019f6ea07b5177940bf3cca86208f749a6a1e0039b63e085ee47aca1236c30721e91f0deef5cc5a5136 + languageName: node + linkType: hard + +"espree@npm:^9.6.0, espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" + dependencies: + acorn: ^8.9.0 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^3.4.1 + checksum: eb8c149c7a2a77b3f33a5af80c10875c3abd65450f60b8af6db1bfcfa8f101e21c1e56a561c6dc13b848e18148d43469e7cd208506238554fb5395a9ea5a1ab9 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0, esprima@npm:~4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: b45bc805a613dbea2835278c306b91aff6173c8d034223fa81498c77dcbce3b2931bf6006db816f62eacd9fd4ea975dfd85a5b7f3c6402cfd050d4ca3c13a628 + languageName: node + linkType: hard + +"esquery@npm:^1.4.2": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" + dependencies: + estraverse: ^5.1.0 + checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 + languageName: node + linkType: hard + +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" + dependencies: + estraverse: ^5.2.0 + checksum: ebc17b1a33c51cef46fdc28b958994b1dc43cd2e86237515cbc3b4e5d2be6a811b2315d0a1a4d9d340b6d2308b15322f5c8291059521cc5f4802f65e7ec32837 + languageName: node + linkType: hard + +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 + languageName: node + linkType: hard + +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 072780882dc8416ad144f8fe199628d2b3e7bbc9989d9ed43795d2c90309a2047e6bc5979d7e2322a341163d22cfad9e21f4110597fe487519697389497e4e2b + languageName: node + linkType: hard + +"esutils@npm:^2.0.2": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 22b5b08f74737379a840b8ed2036a5fb35826c709ab000683b092d9054e5c2a82c27818f12604bfc2a9a76b90b6834ef081edbc1c7ae30d1627012e067c6ec87 + languageName: node + linkType: hard + +"etag@npm:~1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff + languageName: node + linkType: hard + +"event-target-shim@npm:^5.0.0, event-target-shim@npm:^5.0.1": + version: 5.0.1 + resolution: "event-target-shim@npm:5.0.1" + checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166 + languageName: node + linkType: hard + +"execa@npm:^5.0.0, execa@npm:^5.1.1": + version: 5.1.1 + resolution: "execa@npm:5.1.1" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^6.0.0 + human-signals: ^2.1.0 + is-stream: ^2.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^4.0.1 + onetime: ^5.1.2 + signal-exit: ^3.0.3 + strip-final-newline: ^2.0.0 + checksum: fba9022c8c8c15ed862847e94c252b3d946036d7547af310e344a527e59021fd8b6bb0723883ea87044dc4f0201f949046993124a42ccb0855cae5bf8c786343 + languageName: node + linkType: hard + +"execa@npm:^7.1.1": + version: 7.2.0 + resolution: "execa@npm:7.2.0" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^6.0.1 + human-signals: ^4.3.0 + is-stream: ^3.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^5.1.0 + onetime: ^6.0.0 + signal-exit: ^3.0.7 + strip-final-newline: ^3.0.0 + checksum: 14fd17ba0ca8c87b277584d93b1d9fc24f2a65e5152b31d5eb159a3b814854283eaae5f51efa9525e304447e2f757c691877f7adff8fde5746aae67eb1edd1cc + languageName: node + linkType: hard + +"exit@npm:^0.1.2": + version: 0.1.2 + resolution: "exit@npm:0.1.2" + checksum: abc407f07a875c3961e4781dfcb743b58d6c93de9ab263f4f8c9d23bb6da5f9b7764fc773f86b43dd88030444d5ab8abcb611cb680fba8ca075362b77114bba3 + languageName: node + linkType: hard + +"expect@npm:^29.0.0, expect@npm:^29.7.0": + version: 29.7.0 + resolution: "expect@npm:29.7.0" + dependencies: + "@jest/expect-utils": ^29.7.0 + jest-get-type: ^29.6.3 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + checksum: 9257f10288e149b81254a0fda8ffe8d54a7061cd61d7515779998b012579d2b8c22354b0eb901daf0145f347403da582f75f359f4810c007182ad3fb318b5c0c + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-diff@npm:^1.1.2": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: d22d371b994fdc8cce9ff510d7b8dc4da70ac327bcba20df607dd5b9cae9f908f4d1028f5fe467650f058d1e7270235ae0b8230809a262b4df587a3b3aa216c3 + languageName: node + linkType: hard + +"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: b191531e36c607977e5b1c47811158733c34ccb3bfde92c44798929e9b4154884378536d26ad90dfecd32e1ffc09c545d23535ad91b3161a27ddbb8ebe0cbecb + languageName: node + linkType: hard + +"fast-levenshtein@npm:^2.0.6": + version: 2.0.6 + resolution: "fast-levenshtein@npm:2.0.6" + checksum: 92cfec0a8dfafd9c7a15fba8f2cc29cd0b62b85f056d99ce448bbcd9f708e18ab2764bda4dd5158364f4145a7c72788538994f0d1787b956ef0d1062b0f7c24c + languageName: node + linkType: hard + +"fast-xml-parser@npm:^4.0.12, fast-xml-parser@npm:^4.2.4": + version: 4.3.2 + resolution: "fast-xml-parser@npm:4.3.2" + dependencies: + strnum: ^1.0.5 + bin: + fxparser: src/cli/cli.js + checksum: d507ce2efa5fd13d0a5ba28bd76dd68f2fc30ad8748357c37b70f360d19417866d79e35a688af067d5bceaaa796033fa985206aef9692f7a421e1326b6e73309 + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.15.0 + resolution: "fastq@npm:1.15.0" + dependencies: + reusify: ^1.0.4 + checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a + languageName: node + linkType: hard + +"fb-watchman@npm:^2.0.0": + version: 2.0.2 + resolution: "fb-watchman@npm:2.0.2" + dependencies: + bser: 2.1.1 + checksum: b15a124cef28916fe07b400eb87cbc73ca082c142abf7ca8e8de6af43eca79ca7bd13eb4d4d48240b3bd3136eaac40d16e42d6edf87a8e5d1dd8070626860c78 + languageName: node + linkType: hard + +"file-entry-cache@npm:^6.0.1": + version: 6.0.1 + resolution: "file-entry-cache@npm:6.0.1" + dependencies: + flat-cache: ^3.0.4 + checksum: f49701feaa6314c8127c3c2f6173cfefff17612f5ed2daaafc6da13b5c91fd43e3b2a58fd0d63f9f94478a501b167615931e7200e31485e320f74a33885a9c74 + languageName: node + linkType: hard + +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + languageName: node + linkType: hard + +"finalhandler@npm:1.1.2": + version: 1.1.2 + resolution: "finalhandler@npm:1.1.2" + dependencies: + debug: 2.6.9 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + on-finished: ~2.3.0 + parseurl: ~1.3.3 + statuses: ~1.5.0 + unpipe: ~1.0.0 + checksum: 617880460c5138dd7ccfd555cb5dde4d8f170f4b31b8bd51e4b646bb2946c30f7db716428a1f2882d730d2b72afb47d1f67cc487b874cb15426f95753a88965e + languageName: node + linkType: hard + +"find-cache-dir@npm:^2.0.0": + version: 2.1.0 + resolution: "find-cache-dir@npm:2.1.0" + dependencies: + commondir: ^1.0.1 + make-dir: ^2.0.0 + pkg-dir: ^3.0.0 + checksum: 60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 + languageName: node + linkType: hard + +"find-up@npm:^3.0.0": + version: 3.0.0 + resolution: "find-up@npm:3.0.0" + dependencies: + locate-path: ^3.0.0 + checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: ^5.0.0 + path-exists: ^4.0.0 + checksum: 4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"flat-cache@npm:^3.0.4": + version: 3.2.0 + resolution: "flat-cache@npm:3.2.0" + dependencies: + flatted: ^3.2.9 + keyv: ^4.5.3 + rimraf: ^3.0.2 + checksum: e7e0f59801e288b54bee5cb9681e9ee21ee28ef309f886b312c9d08415b79fc0f24ac842f84356ce80f47d6a53de62197ce0e6e148dc42d5db005992e2a756ec + languageName: node + linkType: hard + +"flatted@npm:^3.2.9": + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 + languageName: node + linkType: hard + +"flow-enums-runtime@npm:^0.0.6": + version: 0.0.6 + resolution: "flow-enums-runtime@npm:0.0.6" + checksum: c60412ed6d43b26bf5dfa66be8e588c3ccdb20191fd269e02ca7e8e1d350c73a327cc9a7edb626c80c31eb906981945d12a87ca37118985f33406303806dab79 + languageName: node + linkType: hard + +"flow-parser@npm:0.*": + version: 0.224.0 + resolution: "flow-parser@npm:0.224.0" + checksum: 93ddcfa8ac648b63d08aac1028dc89d26c816e11809dee0e0ee1e89adbc602b4cdf8c8b37942899bc8140337e428a587b393d2a054a3ada3e9a88a8295972df4 + languageName: node + linkType: hard + +"flow-parser@npm:^0.206.0": + version: 0.206.0 + resolution: "flow-parser@npm:0.206.0" + checksum: 1b87d87b59815b09852a6981543ad222da7f4d0e0c26702f9d5e0065174f5f64d2563db76d07a487c6b55e1979344e3845ac42929db70f77a82e8c9171a62a86 + languageName: node + linkType: hard + +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + +"fresh@npm:0.5.2": + version: 0.5.2 + resolution: "fresh@npm:0.5.2" + checksum: 13ea8b08f91e669a64e3ba3a20eb79d7ca5379a81f1ff7f4310d54e2320645503cc0c78daedc93dfb6191287295f6479544a649c64d8e41a1c0fb0c221552346 + languageName: node + linkType: hard + +"fs-extra@npm:^8.1.0": + version: 8.1.0 + resolution: "fs-extra@npm:8.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: bf44f0e6cea59d5ce071bba4c43ca76d216f89e402dc6285c128abc0902e9b8525135aa808adad72c9d5d218e9f4bcc63962815529ff2f684ad532172a284880 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: ^3.0.0 + checksum: 1b8d128dae2ac6cc94230cc5ead341ba3e0efaef82dab46a33d171c044caaa6ca001364178d42069b2809c35a1c3c35079a32107c770e9ffab3901b59af8c8b1 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"fsevents@npm:^2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@^2.3.2#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=18f3a7" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 + languageName: node + linkType: hard + +"function.prototype.name@npm:^1.1.5, function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: a7437e58c6be12aa6c90f7730eac7fa9833dc78872b4ad2963d2031b00a3367a93f98aec75f9aaac7220848e4026d67a8655e870b24f20a543d103c0d65952ec + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" + dependencies: + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad + languageName: node + linkType: hard + +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: ^4.0.1 + checksum: f4f2bfe2425296e8a47e36864e4f42be38a996db40420fe434565e4480e3322f18eb37589617a98640c5dc8fdec1a387007ee18dbb1f3f5553409c34d17f425e + languageName: node + linkType: hard + +"glob-parent@npm:^6.0.2": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: ^4.0.3 + checksum: c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + +"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 67051a45eca3db904aee189dfc7cd53c20c7d881679c93f6146ddd4c9f4ab2268e68a919df740d39c71f4445d2b38ee360fc234428baea1dbdfe68bbcb46979e + languageName: node + linkType: hard + +"globals@npm:^13.19.0": + version: 13.24.0 + resolution: "globals@npm:13.24.0" + dependencies: + type-fest: ^0.20.2 + checksum: 56066ef058f6867c04ff203b8a44c15b038346a62efbc3060052a1016be9f56f4cf0b2cd45b74b22b81e521a889fc7786c73691b0549c2f3a6e825b3d394f43c + languageName: node + linkType: hard + +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" + dependencies: + define-properties: ^1.1.3 + checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + languageName: node + linkType: hard + +"globby@npm:^11.1.0": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: ^2.1.0 + dir-glob: ^3.0.1 + fast-glob: ^3.2.9 + ignore: ^5.2.0 + merge2: ^1.4.1 + slash: ^3.0.0 + checksum: b4be8885e0cfa018fc783792942d53926c35c50b3aefd3fdcfb9d22c627639dc26bd2327a40a0b74b074100ce95bb7187bfeae2f236856aa3de183af7a02aea6 + languageName: node + linkType: hard + +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: bab8f0be9b568857c7bec9fda95a89f87b783546d02951c40c33f84d05bb7da3fd10f863a9beb901463669b6583173a8c8cc6d6b306ea2b9b9d5d3d943c3a673 + languageName: node + linkType: hard + +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"has-property-descriptors@npm:^1.0.0": + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" + dependencies: + get-intrinsic: ^1.2.2 + checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: a054c40c631c0d5741a8285010a0777ea0c068f99ed43e5d6eb12972da223f8af553a455132fdb0801bdcfa0e0f443c0c03a68d8555aa529b3144b446c3f2410 + languageName: node + linkType: hard + +"has-tostringtag@npm:^1.0.0": + version: 1.0.0 + resolution: "has-tostringtag@npm:1.0.0" + dependencies: + has-symbols: ^1.0.2 + checksum: cc12eb28cb6ae22369ebaad3a8ab0799ed61270991be88f208d508076a1e99abe4198c965935ce85ea90b60c94ddda73693b0920b58e7ead048b4a391b502c1c + languageName: node + linkType: hard + +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" + dependencies: + function-bind: ^1.1.2 + checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + languageName: node + linkType: hard + +"hermes-estree@npm:0.15.0": + version: 0.15.0 + resolution: "hermes-estree@npm:0.15.0" + checksum: 227d7ac117a00b4f02cdadf33f4ca73dd263bb05e692065f6709ef5a348b283d0fc319fc5d188438c84c688c4e1245cd990ade27f229abd4e9f94dda1abe147d + languageName: node + linkType: hard + +"hermes-estree@npm:0.17.1": + version: 0.17.1 + resolution: "hermes-estree@npm:0.17.1" + checksum: ffa6f997ad0b2a0dfe8ec782fc8cc5224a0d943b330944e62fe58c93c1f590afb67ba064d5a308c51a824b0db6e1bdc1654bfaf6bdfb4b0de4fb8f9cd8cf1050 + languageName: node + linkType: hard + +"hermes-parser@npm:0.15.0": + version: 0.15.0 + resolution: "hermes-parser@npm:0.15.0" + dependencies: + hermes-estree: 0.15.0 + checksum: 6c06a57a3998edd8c3aff05bbacdc8ec80f930360fa82ab75021b4b20edce8d76d30232babb7d6e7a0fcb758b0b36d7ee0f25936c9accf0b977542a079cb39cf + languageName: node + linkType: hard + +"hermes-parser@npm:0.17.1": + version: 0.17.1 + resolution: "hermes-parser@npm:0.17.1" + dependencies: + hermes-estree: 0.17.1 + checksum: 0a8fd611c708ec076654e9b7aed4b8c5b4302bdef87402a66e9c09ec3f925aa3c12718c80ebc52154ec5712a348ad375a69838f243c9bc2189ec6459415d6760 + languageName: node + linkType: hard + +"hermes-profile-transformer@npm:^0.0.6": + version: 0.0.6 + resolution: "hermes-profile-transformer@npm:0.0.6" + dependencies: + source-map: ^0.7.3 + checksum: b5f874eaa65b70d88df7a4ce3b20d73312bb0bc73410f1b63d708f02e1c532ae16975da84e23b977eab8592ac95d7e6fc0c4094c78604fd0a092ed886c62aa7a + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: d2df2da3ad40ca9ee3a39c5cc6475ef67c8f83c234475f24d8e9ce0dc80a2c82df8e1d6fa78ddd1e9022a586ea1bd247a615e80a5cd9273d90111ddda7d9e974 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 + languageName: node + linkType: hard + +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + checksum: 9b0a3782665c52ce9dc658a0d1560bcb0214ba5699e4ea15aefb2a496e2ca83db03ebc42e1cce4ac1f413e4e0d2d736a3fd755772c556a9a06853ba2a0b7d920 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" + dependencies: + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + languageName: node + linkType: hard + +"human-signals@npm:^2.1.0": + version: 2.1.0 + resolution: "human-signals@npm:2.1.0" + checksum: b87fd89fce72391625271454e70f67fe405277415b48bcc0117ca73d31fa23a4241787afdc8d67f5a116cf37258c052f59ea82daffa72364d61351423848e3b8 + languageName: node + linkType: hard + +"human-signals@npm:^4.3.0": + version: 4.3.1 + resolution: "human-signals@npm:4.3.1" + checksum: 6f12958df3f21b6fdaf02d90896c271df00636a31e2bbea05bddf817a35c66b38a6fdac5863e2df85bd52f34958997f1f50350ff97249e1dff8452865d5235d1 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: ">= 2.1.2 < 3.0.0" + checksum: 3f60d47a5c8fc3313317edfd29a00a692cc87a19cac0159e2ce711d0ebc9019064108323b5e493625e25594f11c6236647d8e256fbe7a58f4a3b33b89e6d30bf + languageName: node + linkType: hard + +"ieee754@npm:^1.1.13": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e + languageName: node + linkType: hard + +"ignore@npm:^5.0.5, ignore@npm:^5.2.0, ignore@npm:^5.2.4": + version: 5.3.0 + resolution: "ignore@npm:5.3.0" + checksum: 2736da6621f14ced652785cb05d86301a66d70248597537176612bd0c8630893564bd5f6421f8806b09e8472e75c591ef01672ab8059c07c6eb2c09cefe04bf9 + languageName: node + linkType: hard + +"image-size@npm:^1.0.2": + version: 1.0.2 + resolution: "image-size@npm:1.0.2" + dependencies: + queue: 6.0.2 + bin: + image-size: bin/image-size.js + checksum: 01745fdb47f87cecf538e69c63f9adc5bfab30a345345c2de91105f3afbd1bfcfba1256af02bf3323077b33b0004469a837e077bf0cbb9c907e9c1e9e7547585 + languageName: node + linkType: hard + +"immer@npm:^10.0.3": + version: 10.0.3 + resolution: "immer@npm:10.0.3" + checksum: 76acabe6f40e752028313762ba477a5d901e57b669f3b8fb406b87b9bb9b14e663a6fbbf5a6d1ab323737dd38f4b2494a4e28002045b88948da8dbf482309f28 + languageName: node + linkType: hard + +"import-fresh@npm:^2.0.0": + version: 2.0.0 + resolution: "import-fresh@npm:2.0.0" + dependencies: + caller-path: ^2.0.0 + resolve-from: ^3.0.0 + checksum: 610255f9753cc6775df00be08e9f43691aa39f7703e3636c45afe22346b8b545e600ccfe100c554607546fc8e861fa149a0d1da078c8adedeea30fff326eef79 + languageName: node + linkType: hard + +"import-fresh@npm:^3.2.1": + version: 3.3.0 + resolution: "import-fresh@npm:3.3.0" + dependencies: + parent-module: ^1.0.0 + resolve-from: ^4.0.0 + checksum: 2cacfad06e652b1edc50be650f7ec3be08c5e5a6f6d12d035c440a42a8cc028e60a5b99ca08a77ab4d6b1346da7d971915828f33cdab730d3d42f08242d09baa + languageName: node + linkType: hard + +"import-local@npm:^3.0.2": + version: 3.1.0 + resolution: "import-local@npm:3.1.0" + dependencies: + pkg-dir: ^4.2.0 + resolve-cwd: ^3.0.0 + bin: + import-local-fixture: fixtures/cli.js + checksum: bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 7cae75c8cd9a50f57dadd77482359f659eaebac0319dd9368bcd1714f55e65badd6929ca58569da2b6494ef13fdd5598cd700b1eba23f8b79c5f19d195a3ecf7 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: ^1.3.0 + wrappy: 1 + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"internal-slot@npm:^1.0.5": + version: 1.0.6 + resolution: "internal-slot@npm:1.0.6" + dependencies: + get-intrinsic: ^1.2.2 + hasown: ^2.0.0 + side-channel: ^1.0.4 + checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 + languageName: node + linkType: hard + +"invariant@npm:^2.2.4": + version: 2.2.4 + resolution: "invariant@npm:2.2.4" + dependencies: + loose-envify: ^1.0.0 + checksum: cc3182d793aad82a8d1f0af697b462939cb46066ec48bbf1707c150ad5fad6406137e91a262022c269702e01621f35ef60269f6c0d7fd178487959809acdfb14 + languageName: node + linkType: hard + +"ip@npm:^1.1.5": + version: 1.1.8 + resolution: "ip@npm:1.1.8" + checksum: a2ade53eb339fb0cbe9e69a44caab10d6e3784662285eb5d2677117ee4facc33a64679051c35e0dfdb1a3983a51ce2f5d2cb36446d52e10d01881789b76e28fb + languageName: node + linkType: hard + +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: eef4417e3c10e60e2c810b6084942b3ead455af16c4509959a27e490e7aee87cfb3f38e01bbde92220b528a0ee1a18d52b787e1458ee86174d8c7f0e58cd488f + languageName: node + linkType: hard + +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: ^1.0.0 + checksum: e3471d95e6c014bf37cad8a93f2f4b6aac962178e0a5041e8903147166964fdc1c5c1d2ef87e86d77322c370ca18f2ea004fa7420581fa747bcaf7c223069dbd + languageName: node + linkType: hard + +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" + dependencies: + has-bigints: ^1.0.1 + checksum: c56edfe09b1154f8668e53ebe8252b6f185ee852a50f9b41e8d921cb2bed425652049fbe438723f6cb48a63ca1aa051e948e7e401e093477c99c84eba244f666 + languageName: node + linkType: hard + +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: c03b23dbaacadc18940defb12c1c0e3aaece7553ef58b162a0f6bba0c2a7e1551b59f365b91e00d2dbac0522392d576ef322628cb1d036a0fe51eb466db67222 + languageName: node + linkType: hard + +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: ^2.0.0 + checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" + dependencies: + has-tostringtag: ^1.0.0 + checksum: baa9077cdf15eb7b58c79398604ca57379b2fc4cf9aa7a9b9e295278648f628c9b201400c01c5e0f7afae56507d741185730307cbe7cad3b9f90a77e5ee342fc + languageName: node + linkType: hard + +"is-directory@npm:^0.3.1": + version: 0.3.1 + resolution: "is-directory@npm:0.3.1" + checksum: dce9a9d3981e38f2ded2a80848734824c50ee8680cd09aa477bef617949715cfc987197a2ca0176c58a9fb192a1a0d69b535c397140d241996a609d5906ae524 + languageName: node + linkType: hard + +"is-docker@npm:^2.0.0": + version: 2.2.1 + resolution: "is-docker@npm:2.2.1" + bin: + is-docker: cli.js + checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 + languageName: node + linkType: hard + +"is-docker@npm:^3.0.0": + version: 3.0.0 + resolution: "is-docker@npm:3.0.0" + bin: + is-docker: cli.js + checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-finalizationregistry@npm:^1.0.2": + version: 1.0.2 + resolution: "is-finalizationregistry@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 4f243a8e06228cd45bdab8608d2cb7abfc20f6f0189c8ac21ea8d603f1f196eabd531ce0bb8e08cbab047e9845ef2c191a3761c9a17ad5cabf8b35499c4ad35d + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^2.0.0": + version: 2.0.0 + resolution: "is-fullwidth-code-point@npm:2.0.0" + checksum: eef9c6e15f68085fec19ff6a978a6f1b8f48018fd1265035552078ee945573594933b09bbd6f562553e2a241561439f1ef5339276eba68d272001343084cfab8 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-generator-fn@npm:^2.0.0": + version: 2.1.0 + resolution: "is-generator-fn@npm:2.1.0" + checksum: a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 + languageName: node + linkType: hard + +"is-generator-function@npm:^1.0.10": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d54644e7dbaccef15ceb1e5d91d680eb5068c9ee9f9eb0a9e04173eb5542c9b51b5ab52c5537f5703e48d5fddfd376817c1ca07a84a407b7115b769d4bdde72b + languageName: node + linkType: hard + +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: ^2.1.1 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 + languageName: node + linkType: hard + +"is-inside-container@npm:^1.0.0": + version: 1.0.0 + resolution: "is-inside-container@npm:1.0.0" + dependencies: + is-docker: ^3.0.0 + bin: + is-inside-container: cli.js + checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 + languageName: node + linkType: hard + +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-map@npm:^2.0.1": + version: 2.0.2 + resolution: "is-map@npm:2.0.2" + checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 + languageName: node + linkType: hard + +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a + languageName: node + linkType: hard + +"is-number-object@npm:^1.0.4": + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d1e8d01bb0a7134c74649c4e62da0c6118a0bfc6771ea3c560914d52a627873e6920dd0fd0ebc0e12ad2ff4687eac4c308f7e80320b973b2c8a2c8f97a7524f7 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + +"is-path-inside@npm:^3.0.3": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 + languageName: node + linkType: hard + +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: ^3.0.1 + checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca + languageName: node + linkType: hard + +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 362399b33535bc8f386d96c45c9feb04cf7f8b41c182f54174c1a45c9abbbe5e31290bbad09a458583ff6bf3b2048672cdb1881b13289569a7c548370856a652 + languageName: node + linkType: hard + +"is-set@npm:^2.0.1": + version: 2.0.2 + resolution: "is-set@npm:2.0.2" + checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "is-shared-array-buffer@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 9508929cf14fdc1afc9d61d723c6e8d34f5e117f0bffda4d97e7a5d88c3a8681f633a74f8e3ad1fe92d5113f9b921dc5ca44356492079612f9a247efbce7032a + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 + languageName: node + linkType: hard + +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: 323b3d04622f78d45077cf89aab783b2f49d24dc641aa89b5ad1a72114cfeff2585efc8c12ef42466dff32bde93d839ad321b26884cf75e5a7892a938b089989 + languageName: node + linkType: hard + +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" + dependencies: + has-symbols: ^1.0.2 + checksum: 92805812ef590738d9de49d677cd17dfd486794773fb6fa0032d16452af46e9b91bb43ffe82c983570f015b37136f4b53b28b8523bfb10b0ece7a66c31a54510 + languageName: node + linkType: hard + +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 1222bb7e90c32bdb949226e66d26cb7bce12e1e28e3e1b40bfa6b390ba3e08192a8664a703dff2a00a84825f4e022f9cd58c4599ff9981ab72b1d69479f4f7f6 + languageName: node + linkType: hard + +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 95bd9a57cdcb58c63b1c401c60a474b0f45b94719c30f548c891860f051bc2231575c290a6b420c6bc6e7ed99459d424c652bd5bf9a1d5259505dc35b4bf83de + languageName: node + linkType: hard + +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 5d8698d1fa599a0635d7ca85be9c26d547b317ed8fd83fc75f03efbe75d50001b5eececb1e9971de85fcde84f69ae6f8346bc92d20d55d46201d328e4c74a367 + languageName: node + linkType: hard + +"is-wsl@npm:^1.1.0": + version: 1.1.0 + resolution: "is-wsl@npm:1.1.0" + checksum: ea157d232351e68c92bd62fc541771096942fe72f69dff452dd26dcc31466258c570a3b04b8cda2e01cd2968255b02951b8670d08ea4ed76d6b1a646061ac4fe + languageName: node + linkType: hard + +"is-wsl@npm:^2.1.1, is-wsl@npm:^2.2.0": + version: 2.2.0 + resolution: "is-wsl@npm:2.2.0" + dependencies: + is-docker: ^2.0.0 + checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + +"isarray@npm:~1.0.0": + version: 1.0.0 + resolution: "isarray@npm:1.0.0" + checksum: f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isobject@npm:^3.0.1": + version: 3.0.1 + resolution: "isobject@npm:3.0.1" + checksum: db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 2367407a8d13982d8f7a859a35e7f8dd5d8f75aae4bb5484ede3a9ea1b426dc245aff28b976a2af48ee759fdd9be374ce2bd2669b644f31e76c5f46a2e29a831 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^5.0.4": + version: 5.2.1 + resolution: "istanbul-lib-instrument@npm:5.2.1" + dependencies: + "@babel/core": ^7.12.3 + "@babel/parser": ^7.14.7 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-coverage: ^3.2.0 + semver: ^6.3.0 + checksum: bf16f1803ba5e51b28bbd49ed955a736488381e09375d830e42ddeb403855b2006f850711d95ad726f2ba3f1ae8e7366de7e51d2b9ac67dc4d80191ef7ddf272 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^6.0.0": + version: 6.0.1 + resolution: "istanbul-lib-instrument@npm:6.0.1" + dependencies: + "@babel/core": ^7.12.3 + "@babel/parser": ^7.14.7 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-coverage: ^3.2.0 + semver: ^7.5.4 + checksum: fb23472e739cfc9b027cefcd7d551d5e7ca7ff2817ae5150fab99fe42786a7f7b56a29a2aa8309c37092e18297b8003f9c274f50ca4360949094d17fbac81472 + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: ^3.0.0 + make-dir: ^4.0.0 + supports-color: ^7.1.0 + checksum: fd17a1b879e7faf9bb1dc8f80b2a16e9f5b7b8498fe6ed580a618c34df0bfe53d2abd35bf8a0a00e628fb7405462576427c7df20bbe4148d19c14b431c974b21 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: ^4.1.1 + istanbul-lib-coverage: ^3.0.0 + source-map: ^0.6.1 + checksum: 21ad3df45db4b81852b662b8d4161f6446cd250c1ddc70ef96a585e2e85c26ed7cd9c2a396a71533cfb981d1a645508bc9618cae431e55d01a0628e7dec62ef2 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.3": + version: 3.1.6 + resolution: "istanbul-reports@npm:3.1.6" + dependencies: + html-escaper: ^2.0.0 + istanbul-lib-report: ^3.0.0 + checksum: 44c4c0582f287f02341e9720997f9e82c071627e1e862895745d5f52ec72c9b9f38e1d12370015d2a71dcead794f34c7732aaef3fab80a24bc617a21c3d911d6 + languageName: node + linkType: hard + +"iterator.prototype@npm:^1.1.2": + version: 1.1.2 + resolution: "iterator.prototype@npm:1.1.2" + dependencies: + define-properties: ^1.2.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + reflect.getprototypeof: ^1.0.4 + set-function-name: ^2.0.1 + checksum: d8a507e2ccdc2ce762e8a1d3f4438c5669160ac72b88b648e59a688eec6bc4e64b22338e74000518418d9e693faf2a092d2af21b9ec7dbf7763b037a54701168 + languageName: node + linkType: hard + +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + languageName: node + linkType: hard + +"jest-changed-files@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-changed-files@npm:29.7.0" + dependencies: + execa: ^5.0.0 + jest-util: ^29.7.0 + p-limit: ^3.1.0 + checksum: 963e203893c396c5dfc75e00a49426688efea7361b0f0e040035809cecd2d46b3c01c02be2d9e8d38b1138357d2de7719ea5b5be21f66c10f2e9685a5a73bb99 + languageName: node + linkType: hard + +"jest-circus@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-circus@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + co: ^4.6.0 + dedent: ^1.0.0 + is-generator-fn: ^2.0.0 + jest-each: ^29.7.0 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + p-limit: ^3.1.0 + pretty-format: ^29.7.0 + pure-rand: ^6.0.0 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: 349437148924a5a109c9b8aad6d393a9591b4dac1918fc97d81b7fc515bc905af9918495055071404af1fab4e48e4b04ac3593477b1d5dcf48c4e71b527c70a7 + languageName: node + linkType: hard + +"jest-cli@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-cli@npm:29.7.0" + dependencies: + "@jest/core": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + create-jest: ^29.7.0 + exit: ^0.1.2 + import-local: ^3.0.2 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + yargs: ^17.3.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 664901277a3f5007ea4870632ed6e7889db9da35b2434e7cb488443e6bf5513889b344b7fddf15112135495b9875892b156faeb2d7391ddb9e2a849dcb7b6c36 + languageName: node + linkType: hard + +"jest-config@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-config@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@jest/test-sequencer": ^29.7.0 + "@jest/types": ^29.6.3 + babel-jest: ^29.7.0 + chalk: ^4.0.0 + ci-info: ^3.2.0 + deepmerge: ^4.2.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + jest-circus: ^29.7.0 + jest-environment-node: ^29.7.0 + jest-get-type: ^29.6.3 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-runner: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + micromatch: ^4.0.4 + parse-json: ^5.2.0 + pretty-format: ^29.7.0 + slash: ^3.0.0 + strip-json-comments: ^3.1.1 + peerDependencies: + "@types/node": "*" + ts-node: ">=9.0.0" + peerDependenciesMeta: + "@types/node": + optional: true + ts-node: + optional: true + checksum: 4cabf8f894c180cac80b7df1038912a3fc88f96f2622de33832f4b3314f83e22b08fb751da570c0ab2b7988f21604bdabade95e3c0c041068ac578c085cf7dff + languageName: node + linkType: hard + +"jest-diff@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-diff@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + diff-sequences: ^29.6.3 + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: 08e24a9dd43bfba1ef07a6374e5af138f53137b79ec3d5cc71a2303515335898888fa5409959172e1e05de966c9e714368d15e8994b0af7441f0721ee8e1bb77 + languageName: node + linkType: hard + +"jest-docblock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-docblock@npm:29.7.0" + dependencies: + detect-newline: ^3.0.0 + checksum: 66390c3e9451f8d96c5da62f577a1dad701180cfa9b071c5025acab2f94d7a3efc2515cfa1654ebe707213241541ce9c5530232cdc8017c91ed64eea1bd3b192 + languageName: node + linkType: hard + +"jest-each@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-each@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + jest-get-type: ^29.6.3 + jest-util: ^29.7.0 + pretty-format: ^29.7.0 + checksum: e88f99f0184000fc8813f2a0aa79e29deeb63700a3b9b7928b8a418d7d93cd24933608591dbbdea732b473eb2021c72991b5cc51a17966842841c6e28e6f691c + languageName: node + linkType: hard + +"jest-environment-node@npm:^29.6.3, jest-environment-node@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-environment-node@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: 501a9966292cbe0ca3f40057a37587cb6def25e1e0c5e39ac6c650fe78d3c70a2428304341d084ac0cced5041483acef41c477abac47e9a290d5545fd2f15646 + languageName: node + linkType: hard + +"jest-get-type@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-get-type@npm:29.6.3" + checksum: 88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 + languageName: node + linkType: hard + +"jest-haste-map@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-haste-map@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/graceful-fs": ^4.1.3 + "@types/node": "*" + anymatch: ^3.0.3 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.9 + jest-regex-util: ^29.6.3 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 + micromatch: ^4.0.4 + walker: ^1.0.8 + dependenciesMeta: + fsevents: + optional: true + checksum: c2c8f2d3e792a963940fbdfa563ce14ef9e14d4d86da645b96d3cd346b8d35c5ce0b992ee08593939b5f718cf0a1f5a90011a056548a1dbf58397d4356786f01 + languageName: node + linkType: hard + +"jest-leak-detector@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-leak-detector@npm:29.7.0" + dependencies: + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 + languageName: node + linkType: hard + +"jest-matcher-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-matcher-utils@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + jest-diff: ^29.7.0 + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: d7259e5f995d915e8a37a8fd494cb7d6af24cd2a287b200f831717ba0d015190375f9f5dc35393b8ba2aae9b2ebd60984635269c7f8cff7d85b077543b7744cd + languageName: node + linkType: hard + +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" + dependencies: + "@babel/code-frame": ^7.12.13 + "@jest/types": ^29.6.3 + "@types/stack-utils": ^2.0.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 + pretty-format: ^29.7.0 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 + languageName: node + linkType: hard + +"jest-mock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-mock@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-util: ^29.7.0 + checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 + languageName: node + linkType: hard + +"jest-pnp-resolver@npm:^1.2.2": + version: 1.2.3 + resolution: "jest-pnp-resolver@npm:1.2.3" + peerDependencies: + jest-resolve: "*" + peerDependenciesMeta: + jest-resolve: + optional: true + checksum: db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 + languageName: node + linkType: hard + +"jest-regex-util@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-regex-util@npm:29.6.3" + checksum: 0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a + languageName: node + linkType: hard + +"jest-resolve-dependencies@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve-dependencies@npm:29.7.0" + dependencies: + jest-regex-util: ^29.6.3 + jest-snapshot: ^29.7.0 + checksum: aeb75d8150aaae60ca2bb345a0d198f23496494677cd6aefa26fc005faf354061f073982175daaf32b4b9d86b26ca928586344516e3e6969aa614cb13b883984 + languageName: node + linkType: hard + +"jest-resolve@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-pnp-resolver: ^1.2.2 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + resolve: ^1.20.0 + resolve.exports: ^2.0.0 + slash: ^3.0.0 + checksum: 0ca218e10731aa17920526ec39deaec59ab9b966237905ffc4545444481112cd422f01581230eceb7e82d86f44a543d520a71391ec66e1b4ef1a578bd5c73487 + languageName: node + linkType: hard + +"jest-runner@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runner@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/environment": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + emittery: ^0.13.1 + graceful-fs: ^4.2.9 + jest-docblock: ^29.7.0 + jest-environment-node: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-leak-detector: ^29.7.0 + jest-message-util: ^29.7.0 + jest-resolve: ^29.7.0 + jest-runtime: ^29.7.0 + jest-util: ^29.7.0 + jest-watcher: ^29.7.0 + jest-worker: ^29.7.0 + p-limit: ^3.1.0 + source-map-support: 0.5.13 + checksum: f0405778ea64812bf9b5c50b598850d94ccf95d7ba21f090c64827b41decd680ee19fcbb494007cdd7f5d0d8906bfc9eceddd8fa583e753e736ecd462d4682fb + languageName: node + linkType: hard + +"jest-runtime@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runtime@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/globals": ^29.7.0 + "@jest/source-map": ^29.6.3 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + cjs-module-lexer: ^1.0.0 + collect-v8-coverage: ^1.0.0 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + slash: ^3.0.0 + strip-bom: ^4.0.0 + checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e + languageName: node + linkType: hard + +"jest-snapshot@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-snapshot@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@babel/generator": ^7.7.2 + "@babel/plugin-syntax-jsx": ^7.7.2 + "@babel/plugin-syntax-typescript": ^7.7.2 + "@babel/types": ^7.3.3 + "@jest/expect-utils": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + babel-preset-current-node-syntax: ^1.0.0 + chalk: ^4.0.0 + expect: ^29.7.0 + graceful-fs: ^4.2.9 + jest-diff: ^29.7.0 + jest-get-type: ^29.6.3 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + natural-compare: ^1.4.0 + pretty-format: ^29.7.0 + semver: ^7.5.3 + checksum: 86821c3ad0b6899521ce75ee1ae7b01b17e6dfeff9166f2cf17f012e0c5d8c798f30f9e4f8f7f5bed01ea7b55a6bc159f5eda778311162cbfa48785447c237ad + languageName: node + linkType: hard + +"jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca + languageName: node + linkType: hard + +"jest-validate@npm:^29.6.3, jest-validate@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-validate@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + camelcase: ^6.2.0 + chalk: ^4.0.0 + jest-get-type: ^29.6.3 + leven: ^3.1.0 + pretty-format: ^29.7.0 + checksum: 191fcdc980f8a0de4dbdd879fa276435d00eb157a48683af7b3b1b98b0f7d9de7ffe12689b617779097ff1ed77601b9f7126b0871bba4f776e222c40f62e9dae + languageName: node + linkType: hard + +"jest-watcher@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-watcher@npm:29.7.0" + dependencies: + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + emittery: ^0.13.1 + jest-util: ^29.7.0 + string-length: ^4.0.1 + checksum: 67e6e7fe695416deff96b93a14a561a6db69389a0667e9489f24485bb85e5b54e12f3b2ba511ec0b777eca1e727235b073e3ebcdd473d68888650489f88df92f + languageName: node + linkType: hard + +"jest-worker@npm:^29.6.3, jest-worker@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" + dependencies: + "@types/node": "*" + jest-util: ^29.7.0 + merge-stream: ^2.0.0 + supports-color: ^8.0.0 + checksum: 30fff60af49675273644d408b650fc2eb4b5dcafc5a0a455f238322a8f9d8a98d847baca9d51ff197b6747f54c7901daa2287799230b856a0f48287d131f8c13 + languageName: node + linkType: hard + +"jest@npm:^29.7.0": + version: 29.7.0 + resolution: "jest@npm:29.7.0" + dependencies: + "@jest/core": ^29.7.0 + "@jest/types": ^29.6.3 + import-local: ^3.0.2 + jest-cli: ^29.7.0 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 17ca8d67504a7dbb1998cf3c3077ec9031ba3eb512da8d71cb91bcabb2b8995c4e4b292b740cb9bf1cbff5ce3e110b3f7c777b0cefb6f41ab05445f248d0ee0b + languageName: node + linkType: hard + +"joi@npm:^17.2.1": + version: 17.11.0 + resolution: "joi@npm:17.11.0" + dependencies: + "@hapi/hoek": ^9.0.0 + "@hapi/topo": ^5.0.0 + "@sideway/address": ^4.1.3 + "@sideway/formula": ^3.0.1 + "@sideway/pinpoint": ^2.0.0 + checksum: 3a4e9ecba345cdafe585e7ed8270a44b39718e11dff3749aa27e0001a63d578b75100c062be28e6f48f960b594864034e7a13833f33fbd7ad56d5ce6b617f9bf + languageName: node + linkType: hard + +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: ^1.0.7 + esprima: ^4.0.0 + bin: + js-yaml: bin/js-yaml.js + checksum: bef146085f472d44dee30ec34e5cf36bf89164f5d585435a3d3da89e52622dff0b188a580e4ad091c3341889e14cb88cac6e4deb16dc5b1e9623bb0601fc255c + languageName: node + linkType: hard + +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + languageName: node + linkType: hard + +"jsc-android@npm:^250231.0.0": + version: 250231.0.0 + resolution: "jsc-android@npm:250231.0.0" + checksum: 6c3f0f6f02fa37a19935b2fbe651e9d6ecc370eb30f2ecee76379337bbf084abb568a1ef1133fe622c5b76f43cf54bb7716f92a94dca010985da38edc48841e2 + languageName: node + linkType: hard + +"jsc-safe-url@npm:^0.2.2": + version: 0.2.4 + resolution: "jsc-safe-url@npm:0.2.4" + checksum: 53b5741ba2c0a54da1722929dc80becb2c6fcc9525124fb6c2aec1a00f48e79afffd26816c278111e7b938e37ace029e33cbb8cdaa4ac1f528a87e58022284af + languageName: node + linkType: hard + +"jscodeshift@npm:^0.14.0": + version: 0.14.0 + resolution: "jscodeshift@npm:0.14.0" + dependencies: + "@babel/core": ^7.13.16 + "@babel/parser": ^7.13.16 + "@babel/plugin-proposal-class-properties": ^7.13.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 + "@babel/plugin-transform-modules-commonjs": ^7.13.8 + "@babel/preset-flow": ^7.13.13 + "@babel/preset-typescript": ^7.13.0 + "@babel/register": ^7.13.16 + babel-core: ^7.0.0-bridge.0 + chalk: ^4.1.2 + flow-parser: 0.* + graceful-fs: ^4.2.4 + micromatch: ^4.0.4 + neo-async: ^2.5.0 + node-dir: ^0.1.17 + recast: ^0.21.0 + temp: ^0.8.4 + write-file-atomic: ^2.3.0 + peerDependencies: + "@babel/preset-env": ^7.1.6 + bin: + jscodeshift: bin/jscodeshift.js + checksum: 54ea6d639455883336f80b38a70648821c88b7942315dc0fbab01bc34a9ad0f0f78e3bd69304b5ab167e4262d6ed7e6284c6d32525ab01c89d9118df89b3e2a0 + languageName: node + linkType: hard + +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 4dc190771129e12023f729ce20e1e0bfceac84d73a85bc3119f7f938843fe25a4aeccb54b6494dce26fcf263d815f5f31acdefac7cc9329efb8422a4f4d9fa9d + languageName: node + linkType: hard + +"jsesc@npm:~0.5.0": + version: 0.5.0 + resolution: "jsesc@npm:0.5.0" + bin: + jsesc: bin/jsesc + checksum: b8b44cbfc92f198ad972fba706ee6a1dfa7485321ee8c0b25f5cedd538dcb20cde3197de16a7265430fce8277a12db066219369e3d51055038946039f6e20e17 + languageName: node + linkType: hard + +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + +"json-parse-better-errors@npm:^1.0.1": + version: 1.0.2 + resolution: "json-parse-better-errors@npm:1.0.2" + checksum: ff2b5ba2a70e88fd97a3cb28c1840144c5ce8fae9cbeeddba15afa333a5c407cf0e42300cd0a2885dbb055227fe68d405070faad941beeffbfde9cf3b2c78c5d + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: cff44156ddce9c67c44386ad5cddf91925fe06b1d217f2da9c4910d01f358c6e3989c4d5a02683c7a5667f9727ff05831f7aa8ae66c8ff691c556f0884d49215 + languageName: node + linkType: hard + +"json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 + languageName: node + linkType: hard + +"jsonfile@npm:^4.0.0": + version: 4.0.0 + resolution: "jsonfile@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e + languageName: node + linkType: hard + +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0": + version: 3.3.5 + resolution: "jsx-ast-utils@npm:3.3.5" + dependencies: + array-includes: ^3.1.6 + array.prototype.flat: ^1.3.1 + object.assign: ^4.1.4 + object.values: ^1.1.6 + checksum: f4b05fa4d7b5234230c905cfa88d36dc8a58a6666975a3891429b1a8cdc8a140bca76c297225cb7a499fad25a2c052ac93934449a2c31a44fc9edd06c773780a + languageName: node + linkType: hard + +"keyv@npm:^4.5.3": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: 3.0.1 + checksum: 74a24395b1c34bd44ad5cb2b49140d087553e170625240b86755a6604cd65aa16efdbdeae5cdb17ba1284a0fbb25ad06263755dbc71b8d8b06f74232ce3cdd72 + languageName: node + linkType: hard + +"kind-of@npm:^6.0.2": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b + languageName: node + linkType: hard + +"kleur@npm:^3.0.3": + version: 3.0.3 + resolution: "kleur@npm:3.0.3" + checksum: df82cd1e172f957bae9c536286265a5cdbd5eeca487cb0a3b2a7b41ef959fc61f8e7c0e9aeea9c114ccf2c166b6a8dd45a46fd619c1c569d210ecd2765ad5169 + languageName: node + linkType: hard + +"leven@npm:^3.1.0": + version: 3.1.0 + resolution: "leven@npm:3.1.0" + checksum: 638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 + languageName: node + linkType: hard + +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" + dependencies: + prelude-ls: ^1.2.1 + type-check: ~0.4.0 + checksum: 12c5021c859bd0f5248561bf139121f0358285ec545ebf48bb3d346820d5c61a4309535c7f387ed7d84361cf821e124ce346c6b7cef8ee09a67c1473b46d0fc4 + languageName: node + linkType: hard + +"lighthouse-logger@npm:^1.0.0": + version: 1.4.2 + resolution: "lighthouse-logger@npm:1.4.2" + dependencies: + debug: ^2.6.9 + marky: ^1.2.2 + checksum: ba6b73d93424318fab58b4e07c9ed246e3e969a3313f26b69515ed4c06457dd9a0b11bc706948398fdaef26aa4ba5e65cb848c37ce59f470d3c6c450b9b79a33 + languageName: node + linkType: hard + +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + +"locate-path@npm:^3.0.0": + version: 3.0.0 + resolution: "locate-path@npm:3.0.0" + dependencies: + p-locate: ^3.0.0 + path-exists: ^3.0.0 + checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: ^4.1.0 + checksum: 83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: ^5.0.0 + checksum: 72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.debounce@npm:^4.0.8": + version: 4.0.8 + resolution: "lodash.debounce@npm:4.0.8" + checksum: a3f527d22c548f43ae31c861ada88b2637eb48ac6aa3eb56e82d44917971b8aa96fbb37aa60efea674dc4ee8c42074f90f7b1f772e9db375435f6c83a19b3bc6 + languageName: node + linkType: hard + +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 + languageName: node + linkType: hard + +"lodash.throttle@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.throttle@npm:4.1.1" + checksum: 129c0a28cee48b348aef146f638ef8a8b197944d4e9ec26c1890c19d9bf5a5690fe11b655c77a4551268819b32d27f4206343e30c78961f60b561b8608c8c805 + languageName: node + linkType: hard + +"lodash@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 + languageName: node + linkType: hard + +"log-symbols@npm:^4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"logkitty@npm:^0.7.1": + version: 0.7.1 + resolution: "logkitty@npm:0.7.1" + dependencies: + ansi-fragments: ^0.2.1 + dayjs: ^1.8.15 + yargs: ^15.1.0 + bin: + logkitty: bin/logkitty.js + checksum: f1af990ff09564ef5122597a52bba6d233302c49865e6ddea1343d2a0e2efe3005127e58e93e25c98b6b1f192731fc5c52e3204876a15fc9a52abc8b4f1af931 + languageName: node + linkType: hard + +"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": + version: 1.4.0 + resolution: "loose-envify@npm:1.4.0" + dependencies: + js-tokens: ^3.0.0 || ^4.0.0 + bin: + loose-envify: cli.js + checksum: 6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb + languageName: node + linkType: hard + +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: ^4.0.0 + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + +"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": + version: 2.1.0 + resolution: "make-dir@npm:2.1.0" + dependencies: + pify: ^4.0.1 + semver: ^5.6.0 + checksum: 043548886bfaf1820323c6a2997e6d2fa51ccc2586ac14e6f14634f7458b4db2daf15f8c310e2a0abd3e0cddc64df1890d8fc7263033602c47bb12cbfcf86aab + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: ^7.5.3 + checksum: bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" + dependencies: + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 + is-lambda: ^1.0.1 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + promise-retry: ^2.0.1 + ssri: ^10.0.0 + checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + languageName: node + linkType: hard + +"makeerror@npm:1.0.12": + version: 1.0.12 + resolution: "makeerror@npm:1.0.12" + dependencies: + tmpl: 1.0.5 + checksum: b38a025a12c8146d6eeea5a7f2bf27d51d8ad6064da8ca9405fcf7bf9b54acd43e3b30ddd7abb9b1bfa4ddb266019133313482570ddb207de568f71ecfcf6060 + languageName: node + linkType: hard + +"marky@npm:^1.2.2": + version: 1.2.5 + resolution: "marky@npm:1.2.5" + checksum: 823b946677749551cdfc3b5221685478b5d1b9cc0dc03eff977c6f9a615fb05c67559f9556cb3c0fcb941a9ea0e195e37befd83026443396ccee8b724f54f4c5 + languageName: node + linkType: hard + +"memoize-one@npm:^5.0.0": + version: 5.2.1 + resolution: "memoize-one@npm:5.2.1" + checksum: a3cba7b824ebcf24cdfcd234aa7f86f3ad6394b8d9be4c96ff756dafb8b51c7f71320785fbc2304f1af48a0467cbbd2a409efc9333025700ed523f254cb52e3d + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 + languageName: node + linkType: hard + +"metro-babel-transformer@npm:0.80.1": + version: 0.80.1 + resolution: "metro-babel-transformer@npm:0.80.1" + dependencies: + "@babel/core": ^7.20.0 + hermes-parser: 0.17.1 + nullthrows: ^1.1.1 + checksum: e0972387b5f531c588c54ea6cca953a9e7ac504acd2e0eafc6b8e01493c9b9fda6e1adeb593cd303514726b85a280fe00b3154fa486ecd8df9f3027581a46527 + languageName: node + linkType: hard + +"metro-cache-key@npm:0.80.1": + version: 0.80.1 + resolution: "metro-cache-key@npm:0.80.1" + checksum: 22c74162e474bb8ff1a71198b8c2879b1c1d5fb7a24b6d76f9ececdd79c9ddcbe1e5d42def362baffa1c7b024443caf74c3dd0790852f6f99f31a645e7acdf79 + languageName: node + linkType: hard + +"metro-cache@npm:0.80.1": + version: 0.80.1 + resolution: "metro-cache@npm:0.80.1" + dependencies: + metro-core: 0.80.1 + rimraf: ^3.0.2 + checksum: 5f981a20cc2aa91cc9acc9d2d499c3d8d11807998263df9f2f3df00851a43655f46dab0fa5a104d5f8939e0d89ae71abd155debfee2300243c0771fbb0839fb7 + languageName: node + linkType: hard + +"metro-config@npm:0.80.1, metro-config@npm:^0.80.0": + version: 0.80.1 + resolution: "metro-config@npm:0.80.1" + dependencies: + connect: ^3.6.5 + cosmiconfig: ^5.0.5 + jest-validate: ^29.6.3 + metro: 0.80.1 + metro-cache: 0.80.1 + metro-core: 0.80.1 + metro-runtime: 0.80.1 + checksum: 5c23c8fe1d9a2599dcc0d542a21e604ce0478f2a4ccd7c96f1ad12b89c4b1a193e28ec20315a18e01b19506c54eaa491ae5651c1e5e5789a6e81863298f3bbf6 + languageName: node + linkType: hard + +"metro-core@npm:0.80.1, metro-core@npm:^0.80.0": + version: 0.80.1 + resolution: "metro-core@npm:0.80.1" + dependencies: + lodash.throttle: ^4.1.1 + metro-resolver: 0.80.1 + checksum: 1dc79082f13f11c656899be3dd2a8dd99e2c976666e6d53230e4e00d0142dc68792237953cd8b912357ffded4fadb6df9eefb67544082779844bcc2c237f9778 + languageName: node + linkType: hard + +"metro-file-map@npm:0.80.1": + version: 0.80.1 + resolution: "metro-file-map@npm:0.80.1" + dependencies: + anymatch: ^3.0.3 + debug: ^2.2.0 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.4 + invariant: ^2.2.4 + jest-worker: ^29.6.3 + micromatch: ^4.0.4 + node-abort-controller: ^3.1.1 + nullthrows: ^1.1.1 + walker: ^1.0.7 + dependenciesMeta: + fsevents: + optional: true + checksum: cb114d3daba3a247782a5d47589d4e4f8bc6549a750d49a05b5ded601f6ef6d264f4caebb377b44de288476c771f7d50269891f153f9a59c2efca827d5d7056c + languageName: node + linkType: hard + +"metro-minify-terser@npm:0.80.1": + version: 0.80.1 + resolution: "metro-minify-terser@npm:0.80.1" + dependencies: + terser: ^5.15.0 + checksum: d8bbccdb0472e48121b7bba2cf1a1aabc38cd162d2b3e6bb500b6bf20741066a406888613dd94e6e69a2862881755b156006e3edc5c5ed857dd081c4539be84c + languageName: node + linkType: hard + +"metro-resolver@npm:0.80.1": + version: 0.80.1 + resolution: "metro-resolver@npm:0.80.1" + checksum: 1cc9bb8033124bbf32efd7072b9e0e4cd9e701b461d33f146464ab5b2bee459e86a48320edd7899e46a9f4b7cacfef4878f9ca1b4c13ef057e156794fe57bc97 + languageName: node + linkType: hard + +"metro-runtime@npm:0.80.1, metro-runtime@npm:^0.80.0": + version: 0.80.1 + resolution: "metro-runtime@npm:0.80.1" + dependencies: + "@babel/runtime": ^7.0.0 + checksum: 15836913f68c849c2a5c58c025784c3caa9f8a32e0cbe5441a0498b2363a601d1c733c278de5d6bde5ce27e16da3c2aeddf5d42cd7b4af4f6a631ba264af64fb + languageName: node + linkType: hard + +"metro-source-map@npm:0.80.1, metro-source-map@npm:^0.80.0": + version: 0.80.1 + resolution: "metro-source-map@npm:0.80.1" + dependencies: + "@babel/traverse": ^7.20.0 + "@babel/types": ^7.20.0 + invariant: ^2.2.4 + metro-symbolicate: 0.80.1 + nullthrows: ^1.1.1 + ob1: 0.80.1 + source-map: ^0.5.6 + vlq: ^1.0.0 + checksum: 5de90ab199ff90d96cd14ad19c72e114f9717354e50bb257afc29b6ebd26d3dfcf067dac992ec316e6a9d2c626ac86cb25a6f8699e482484f57efad05cbf69f9 + languageName: node + linkType: hard + +"metro-symbolicate@npm:0.80.1": + version: 0.80.1 + resolution: "metro-symbolicate@npm:0.80.1" + dependencies: + invariant: ^2.2.4 + metro-source-map: 0.80.1 + nullthrows: ^1.1.1 + source-map: ^0.5.6 + through2: ^2.0.1 + vlq: ^1.0.0 + bin: + metro-symbolicate: src/index.js + checksum: 23ba3fa46edf294245fa6fdd5fb74637ab3194eb04f1420dc19f43a0d29c262bd42d70936aef0bda4f6e2160d8769e92c95f63a77f4c18aee53173121a0fb42a + languageName: node + linkType: hard + +"metro-transform-plugins@npm:0.80.1": + version: 0.80.1 + resolution: "metro-transform-plugins@npm:0.80.1" + dependencies: + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/template": ^7.0.0 + "@babel/traverse": ^7.20.0 + nullthrows: ^1.1.1 + checksum: 66e56a96beacd9fd5e28922e71c84e4e67fa87b5ab65ee4542953e17e968a791ef11521232f7792092215a95704f99e4336b9753509ca810aa710d562f031363 + languageName: node + linkType: hard + +"metro-transform-worker@npm:0.80.1": + version: 0.80.1 + resolution: "metro-transform-worker@npm:0.80.1" + dependencies: + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/parser": ^7.20.0 + "@babel/types": ^7.20.0 + metro: 0.80.1 + metro-babel-transformer: 0.80.1 + metro-cache: 0.80.1 + metro-cache-key: 0.80.1 + metro-source-map: 0.80.1 + metro-transform-plugins: 0.80.1 + nullthrows: ^1.1.1 + checksum: 9d13198e0d6d6320b27ef962c5260fdc18e6536a029826aa7300c2cb975d9aea2d18e4f83022f31891373e72c13511b11e758cea1fb831e3081655dcfb29c199 + languageName: node + linkType: hard + +"metro@npm:0.80.1, metro@npm:^0.80.0": + version: 0.80.1 + resolution: "metro@npm:0.80.1" + dependencies: + "@babel/code-frame": ^7.0.0 + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/parser": ^7.20.0 + "@babel/template": ^7.0.0 + "@babel/traverse": ^7.20.0 + "@babel/types": ^7.20.0 + accepts: ^1.3.7 + chalk: ^4.0.0 + ci-info: ^2.0.0 + connect: ^3.6.5 + debug: ^2.2.0 + denodeify: ^1.2.1 + error-stack-parser: ^2.0.6 + graceful-fs: ^4.2.4 + hermes-parser: 0.17.1 + image-size: ^1.0.2 + invariant: ^2.2.4 + jest-worker: ^29.6.3 + jsc-safe-url: ^0.2.2 + lodash.throttle: ^4.1.1 + metro-babel-transformer: 0.80.1 + metro-cache: 0.80.1 + metro-cache-key: 0.80.1 + metro-config: 0.80.1 + metro-core: 0.80.1 + metro-file-map: 0.80.1 + metro-minify-terser: 0.80.1 + metro-resolver: 0.80.1 + metro-runtime: 0.80.1 + metro-source-map: 0.80.1 + metro-symbolicate: 0.80.1 + metro-transform-plugins: 0.80.1 + metro-transform-worker: 0.80.1 + mime-types: ^2.1.27 + node-fetch: ^2.2.0 + nullthrows: ^1.1.1 + rimraf: ^3.0.2 + serialize-error: ^2.1.0 + source-map: ^0.5.6 + strip-ansi: ^6.0.0 + throat: ^5.0.0 + ws: ^7.5.1 + yargs: ^17.6.2 + bin: + metro: src/cli.js + checksum: 11ca9ad89bd085e87a143fcf9461075ae081b5db144f31cf4f575572241576a2742c996257553dd580423163de5ba03378ae0f047d52e1d8a7b0dcde2b8fffce + languageName: node + linkType: hard + +"micromatch@npm:^4.0.4": + version: 4.0.5 + resolution: "micromatch@npm:4.0.5" + dependencies: + braces: ^3.0.2 + picomatch: ^2.3.1 + checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc + languageName: node + linkType: hard + +"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.27, mime-types@npm:~2.1.34": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: 1.52.0 + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + +"mime@npm:1.6.0": + version: 1.6.0 + resolution: "mime@npm:1.6.0" + bin: + mime: cli.js + checksum: fef25e39263e6d207580bdc629f8872a3f9772c923c7f8c7e793175cee22777bbe8bba95e5d509a40aaa292d8974514ce634ae35769faa45f22d17edda5e8557 + languageName: node + linkType: hard + +"mime@npm:^2.4.1": + version: 2.6.0 + resolution: "mime@npm:2.6.0" + bin: + mime: cli.js + checksum: 1497ba7b9f6960694268a557eae24b743fd2923da46ec392b042469f4b901721ba0adcf8b0d3c2677839d0e243b209d76e5edcbd09cfdeffa2dfb6bb4df4b862 + languageName: node + linkType: hard + +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a + languageName: node + linkType: hard + +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 + languageName: node + linkType: hard + +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: ^1.1.7 + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" + dependencies: + encoding: ^0.1.13 + minipass: ^7.0.3 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: ^3.0.0 + checksum: 56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: ^3.0.0 + checksum: b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: ^3.0.0 + checksum: 79076749fcacf21b5d16dd596d32c3b6bf4d6e62abb43868fac21674078505c8b15eaca4e47ed844985a4514854f917d78f588fcd029693709417d8f98b2bd60 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: ^4.0.0 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.4 + resolution: "minipass@npm:7.0.4" + checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: ^3.0.0 + yallist: ^4.0.0 + checksum: f1fdeac0b07cf8f30fcf12f4b586795b97be856edea22b5e9072707be51fc95d41487faec3f265b42973a304fe3a64acd91a44a3826a963e37b37bafde0212c3 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.1": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: ^1.2.6 + bin: + mkdirp: bin/cmd.js + checksum: 0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + +"ms@npm:2.0.0": + version: 2.0.0 + resolution: "ms@npm:2.0.0" + checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"natural-compare-lite@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare-lite@npm:1.4.0" + checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 + languageName: node + linkType: hard + +"natural-compare@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare@npm:1.4.0" + checksum: 23ad088b08f898fc9b53011d7bb78ec48e79de7627e01ab5518e806033861bef68d5b0cd0e2205c2f36690ac9571ff6bcb05eb777ced2eeda8d4ac5b44592c3d + languageName: node + linkType: hard + +"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 + languageName: node + linkType: hard + +"neo-async@npm:^2.5.0": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: deac9f8d00eda7b2e5cd1b2549e26e10a0faa70adaa6fdadca701cc55f49ee9018e427f424bac0c790b7c7e2d3068db97f3093f1093975f2acb8f8818b936ed9 + languageName: node + linkType: hard + +"nocache@npm:^3.0.1": + version: 3.0.4 + resolution: "nocache@npm:3.0.4" + checksum: 6be9ee67eb561ecedc56d805c024c0fda55b9836ecba659c720073b067929aa4fe04bb7121480e004c9cf52989e62d8720f29a7fe0269f1a4941221a1e4be1c2 + languageName: node + linkType: hard + +"node-abort-controller@npm:^3.1.1": + version: 3.1.1 + resolution: "node-abort-controller@npm:3.1.1" + checksum: 2c340916af9710328b11c0828223fc65ba320e0d082214a211311bf64c2891028e42ef276b9799188c4ada9e6e1c54cf7a0b7c05dd9d59fcdc8cd633304c8047 + languageName: node + linkType: hard + +"node-dir@npm:^0.1.17": + version: 0.1.17 + resolution: "node-dir@npm:0.1.17" + dependencies: + minimatch: ^3.0.2 + checksum: 29de9560e52cdac8d3f794d38d782f6799e13d4d11aaf96d3da8c28458e1c5e33bb5f8edfb42dc34172ec5516c50c5b8850c9e1526542616757a969267263328 + languageName: node + linkType: hard + +"node-fetch@npm:^2.2.0, node-fetch@npm:^2.6.0": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" + dependencies: + env-paths: ^2.2.0 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 + graceful-fs: ^4.2.6 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + tar: ^6.1.2 + which: ^4.0.0 + bin: + node-gyp: bin/node-gyp.js + checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + languageName: node + linkType: hard + +"node-int64@npm:^0.4.0": + version: 0.4.0 + resolution: "node-int64@npm:0.4.0" + checksum: d0b30b1ee6d961851c60d5eaa745d30b5c95d94bc0e74b81e5292f7c42a49e3af87f1eb9e89f59456f80645d679202537de751b7d72e9e40ceea40c5e449057e + languageName: node + linkType: hard + +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 59443a2f77acac854c42d321bf1b43dea0aef55cd544c6a686e9816a697300458d4e82239e2d794ea05f7bbbc8a94500332e2d3ac3f11f52e4b16cbe638b3c41 + languageName: node + linkType: hard + +"node-stream-zip@npm:^1.9.1": + version: 1.15.0 + resolution: "node-stream-zip@npm:1.15.0" + checksum: 0b73ffbb09490e479c8f47038d7cba803e6242618fbc1b71c26782009d388742ed6fb5ce6e9d31f528b410249e7eb1c6e7534e9d3792a0cafd99813ac5a35107 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.0 + resolution: "nopt@npm:7.2.0" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"npm-run-path@npm:^4.0.1": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: ^3.0.0 + checksum: 5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 + languageName: node + linkType: hard + +"npm-run-path@npm:^5.1.0": + version: 5.1.0 + resolution: "npm-run-path@npm:5.1.0" + dependencies: + path-key: ^4.0.0 + checksum: dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 + languageName: node + linkType: hard + +"nullthrows@npm:^1.1.1": + version: 1.1.1 + resolution: "nullthrows@npm:1.1.1" + checksum: 10806b92121253eb1b08ecf707d92480f5331ba8ae5b23fa3eb0548ad24196eb797ed47606153006568a5733ea9e528a3579f21421f7828e09e7756f4bdd386f + languageName: node + linkType: hard + +"ob1@npm:0.80.1": + version: 0.80.1 + resolution: "ob1@npm:0.80.1" + checksum: 5c30ae37dea37fd2844ec28894e6592de3d12d97035139d7e3796595e839881d610450ddeb5261d7d12a3c76c4512267fe7b088b1a9d72e16c83e5062a57180a + languageName: node + linkType: hard + +"object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f + languageName: node + linkType: hard + +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a + languageName: node + linkType: hard + +"object.assign@npm:^4.1.4": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 + languageName: node + linkType: hard + +"object.entries@npm:^1.1.6": + version: 1.1.7 + resolution: "object.entries@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: da287d434e7e32989586cd734382364ba826a2527f2bc82e6acbf9f9bfafa35d51018b66ec02543ffdfa2a5ba4af2b6f1ca6e588c65030cb4fd9c67d6ced594c + languageName: node + linkType: hard + +"object.fromentries@npm:^2.0.6": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 + languageName: node + linkType: hard + +"object.hasown@npm:^1.1.2": + version: 1.1.3 + resolution: "object.hasown@npm:1.1.3" + dependencies: + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 76bc17356f6124542fb47e5d0e78d531eafa4bba3fc2d6fc4b1a8ce8b6878912366c0d99f37ce5c84ada8fd79df7aa6ea1214fddf721f43e093ad2df51f27da1 + languageName: node + linkType: hard + +"object.values@npm:^1.1.6": + version: 1.1.7 + resolution: "object.values@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 + languageName: node + linkType: hard + +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: 1.1.1 + checksum: d20929a25e7f0bb62f937a425b5edeb4e4cde0540d77ba146ec9357f00b0d497cdb3b9b05b9c8e46222407d1548d08166bff69cc56dfa55ba0e4469228920ff0 + languageName: node + linkType: hard + +"on-finished@npm:~2.3.0": + version: 2.3.0 + resolution: "on-finished@npm:2.3.0" + dependencies: + ee-first: 1.1.1 + checksum: 1db595bd963b0124d6fa261d18320422407b8f01dc65863840f3ddaaf7bcad5b28ff6847286703ca53f4ec19595bd67a2f1253db79fc4094911ec6aa8df1671b + languageName: node + linkType: hard + +"on-headers@npm:~1.0.2": + version: 1.0.2 + resolution: "on-headers@npm:1.0.2" + checksum: 2bf13467215d1e540a62a75021e8b318a6cfc5d4fc53af8e8f84ad98dbcea02d506c6d24180cd62e1d769c44721ba542f3154effc1f7579a8288c9f7873ed8e5 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: 1 + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"onetime@npm:^5.1.0, onetime@npm:^5.1.2": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: ^2.1.0 + checksum: 2478859ef817fc5d4e9c2f9e5728512ddd1dbc9fb7829ad263765bb6d3b91ce699d6e2332eef6b7dff183c2f490bd3349f1666427eaba4469fba0ac38dfd0d34 + languageName: node + linkType: hard + +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" + dependencies: + mimic-fn: ^4.0.0 + checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 + languageName: node + linkType: hard + +"open@npm:^6.2.0": + version: 6.4.0 + resolution: "open@npm:6.4.0" + dependencies: + is-wsl: ^1.1.0 + checksum: e5037facf3e03ed777537db3e2511ada37f351c4394e1dadccf9cac11d63b28447ae8b495b7b138659910fd78d918bafed546e47163673c4a4e43dbb5ac53c5d + languageName: node + linkType: hard + +"open@npm:^7.0.3": + version: 7.4.2 + resolution: "open@npm:7.4.2" + dependencies: + is-docker: ^2.0.0 + is-wsl: ^2.1.1 + checksum: 3333900ec0e420d64c23b831bc3467e57031461d843c801f569b2204a1acc3cd7b3ec3c7897afc9dde86491dfa289708eb92bba164093d8bd88fb2c231843c91 + languageName: node + linkType: hard + +"open@npm:^9.1.0": + version: 9.1.0 + resolution: "open@npm:9.1.0" + dependencies: + default-browser: ^4.0.0 + define-lazy-prop: ^3.0.0 + is-inside-container: ^1.0.0 + is-wsl: ^2.2.0 + checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 + languageName: node + linkType: hard + +"optionator@npm:^0.9.3": + version: 0.9.3 + resolution: "optionator@npm:0.9.3" + dependencies: + "@aashutoshrathi/word-wrap": ^1.2.3 + deep-is: ^0.1.3 + fast-levenshtein: ^2.0.6 + levn: ^0.4.1 + prelude-ls: ^1.2.1 + type-check: ^0.4.0 + checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a + languageName: node + linkType: hard + +"ora@npm:^5.4.1": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: ^4.1.0 + chalk: ^4.1.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.5.0 + is-interactive: ^1.0.0 + is-unicode-supported: ^0.1.0 + log-symbols: ^4.1.0 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + checksum: 28d476ee6c1049d68368c0dc922e7225e3b5600c3ede88fade8052837f9ed342625fdaa84a6209302587c8ddd9b664f71f0759833cbdb3a4cf81344057e63c63 + languageName: node + linkType: hard + +"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: ^2.0.0 + checksum: 84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: ^0.1.0 + checksum: 7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^3.0.0": + version: 3.0.0 + resolution: "p-locate@npm:3.0.0" + dependencies: + p-limit: ^2.0.0 + checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: ^2.2.0 + checksum: 513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: ^3.0.2 + checksum: 1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: ^3.0.0 + checksum: cb0ab21ec0f32ddffd31dfc250e3afa61e103ef43d957cc45497afe37513634589316de4eb88abdfd969fe6410c22c0b93ab24328833b8eb1ccc087fc0442a1c + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"parent-module@npm:^1.0.0": + version: 1.0.1 + resolution: "parent-module@npm:1.0.1" + dependencies: + callsites: ^3.0.0 + checksum: 6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff + languageName: node + linkType: hard + +"parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-json@npm:4.0.0" + dependencies: + error-ex: ^1.3.1 + json-parse-better-errors: ^1.0.1 + checksum: 0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 + languageName: node + linkType: hard + +"parse-json@npm:^5.2.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": ^7.0.0 + error-ex: ^1.3.1 + json-parse-even-better-errors: ^2.3.0 + lines-and-columns: ^1.1.6 + checksum: 62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + +"parseurl@npm:~1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 + languageName: node + linkType: hard + +"path-exists@npm:^3.0.0": + version: 3.0.0 + resolution: "path-exists@npm:3.0.0" + checksum: 96e92643aa34b4b28d0de1cd2eba52a1c5313a90c6542d03f62750d82480e20bfa62bc865d5cfc6165f5fcd5aeb0851043c40a39be5989646f223300021bae0a + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: ^9.1.1 || ^10.0.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf + languageName: node + linkType: hard + +"pify@npm:^4.0.1": + version: 4.0.1 + resolution: "pify@npm:4.0.1" + checksum: 9c4e34278cb09987685fa5ef81499c82546c033713518f6441778fbec623fc708777fe8ac633097c72d88470d5963094076c7305cafc7ad340aae27cfacd856b + languageName: node + linkType: hard + +"pirates@npm:^4.0.4, pirates@npm:^4.0.5": + version: 4.0.6 + resolution: "pirates@npm:4.0.6" + checksum: 46a65fefaf19c6f57460388a5af9ab81e3d7fd0e7bc44ca59d753cb5c4d0df97c6c6e583674869762101836d68675f027d60f841c105d72734df9dfca97cbcc6 + languageName: node + linkType: hard + +"pkg-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "pkg-dir@npm:3.0.0" + dependencies: + find-up: ^3.0.0 + checksum: 70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + languageName: node + linkType: hard + +"pkg-dir@npm:^4.2.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: ^4.0.0 + checksum: 9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: cd192ec0d0a8e4c6da3bb80e4f62afe336df3f76271ac6deb0e6a36187133b6073a19e9727a1ff108cd8b9982e4768850d413baa71214dd80c7979617dca827a + languageName: node + linkType: hard + +"prettier-linter-helpers@npm:^1.0.0": + version: 1.0.0 + resolution: "prettier-linter-helpers@npm:1.0.0" + dependencies: + fast-diff: ^1.1.2 + checksum: 00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392 + languageName: node + linkType: hard + +"prettier@npm:^3.1.1": + version: 3.1.1 + resolution: "prettier@npm:3.1.1" + bin: + prettier: bin/prettier.cjs + checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e + languageName: node + linkType: hard + +"pretty-format@npm:^26.5.2, pretty-format@npm:^26.6.2": + version: 26.6.2 + resolution: "pretty-format@npm:26.6.2" + dependencies: + "@jest/types": ^26.6.2 + ansi-regex: ^5.0.0 + ansi-styles: ^4.0.0 + react-is: ^17.0.1 + checksum: e3b808404d7e1519f0df1aa1f25cee0054ab475775c6b2b8c5568ff23194a92d54bf93274139b6f584ca70fd773be4eaa754b0e03f12bb0a8d1426b07f079976 + languageName: node + linkType: hard + +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": ^29.6.3 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: 032c1602383e71e9c0c02a01bbd25d6759d60e9c7cf21937dde8357aa753da348fcec5def5d1002c9678a8524d5fe099ad98861286550ef44de8808cc61e43b6 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"process-nextick-args@npm:~2.0.0": + version: 2.0.1 + resolution: "process-nextick-args@npm:2.0.1" + checksum: 1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: ^2.0.2 + retry: ^0.12.0 + checksum: f96a3f6d90b92b568a26f71e966cbbc0f63ab85ea6ff6c81284dc869b41510e6cdef99b6b65f9030f0db422bf7c96652a3fff9f2e8fb4a0f069d8f4430359429 + languageName: node + linkType: hard + +"promise@npm:^8.3.0": + version: 8.3.0 + resolution: "promise@npm:8.3.0" + dependencies: + asap: ~2.0.6 + checksum: a69f0ddbddf78ffc529cffee7ad950d307347615970564b17988ce43fbe767af5c738a9439660b24a9a8cbea106c0dcbb6c2b20e23b7e96a8e89e5c2679e94d5 + languageName: node + linkType: hard + +"prompts@npm:^2.0.1, prompts@npm:^2.4.2": + version: 2.4.2 + resolution: "prompts@npm:2.4.2" + dependencies: + kleur: ^3.0.3 + sisteransi: ^1.0.5 + checksum: d8fd1fe63820be2412c13bfc5d0a01909acc1f0367e32396962e737cb2fc52d004f3302475d5ce7d18a1e8a79985f93ff04ee03007d091029c3f9104bffc007d + languageName: node + linkType: hard + +"prop-types@npm:^15.8.1": + version: 15.8.1 + resolution: "prop-types@npm:15.8.1" + dependencies: + loose-envify: ^1.4.0 + object-assign: ^4.1.1 + react-is: ^16.13.1 + checksum: c056d3f1c057cb7ff8344c645450e14f088a915d078dcda795041765047fa080d38e5d626560ccaac94a4e16e3aa15f3557c1a9a8d1174530955e992c675e459 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: bb0a0ceedca4c3c57a9b981b90601579058903c62be23c5e8e843d2c2d4148a3ecf029d5133486fb0e1822b098ba8bba09e89d6b21742d02fa26bda6441a6fb2 + languageName: node + linkType: hard + +"pure-rand@npm:^6.0.0": + version: 6.0.4 + resolution: "pure-rand@npm:6.0.4" + checksum: e1c4e69f8bf7303e5252756d67c3c7551385cd34d94a1f511fe099727ccbab74c898c03a06d4c4a24a89b51858781057b83ebbfe740d984240cdc04fead36068 + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 + languageName: node + linkType: hard + +"queue@npm:6.0.2": + version: 6.0.2 + resolution: "queue@npm:6.0.2" + dependencies: + inherits: ~2.0.3 + checksum: ebc23639248e4fe40a789f713c20548e513e053b3dc4924b6cb0ad741e3f264dcff948225c8737834dd4f9ec286dbc06a1a7c13858ea382d9379f4303bcc0916 + languageName: node + linkType: hard + +"range-parser@npm:~1.2.1": + version: 1.2.1 + resolution: "range-parser@npm:1.2.1" + checksum: 0a268d4fea508661cf5743dfe3d5f47ce214fd6b7dec1de0da4d669dd4ef3d2144468ebe4179049eff253d9d27e719c88dae55be64f954e80135a0cada804ec9 + languageName: node + linkType: hard + +"react-devtools-core@npm:^4.27.7": + version: 4.28.5 + resolution: "react-devtools-core@npm:4.28.5" + dependencies: + shell-quote: ^1.6.1 + ws: ^7 + checksum: d8e4b32ffcfe1ada5c9f7decffd04afc4707a3d6261953a92b8aed1c8abe15cd57d6eb4ce711f842180a2f5c60d2947209e3c1202f7ea29303ee150c55da59e0 + languageName: node + linkType: hard + +"react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.0.0, react-is@npm:^18.2.0": + version: 18.2.0 + resolution: "react-is@npm:18.2.0" + checksum: e72d0ba81b5922759e4aff17e0252bd29988f9642ed817f56b25a3e217e13eea8a7f2322af99a06edb779da12d5d636e9fda473d620df9a3da0df2a74141d53e + languageName: node + linkType: hard + +"react-is@npm:^16.13.1": + version: 16.13.1 + resolution: "react-is@npm:16.13.1" + checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f + languageName: node + linkType: hard + +"react-is@npm:^17.0.1": + version: 17.0.2 + resolution: "react-is@npm:17.0.2" + checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 + languageName: node + linkType: hard + +"react-native-template-redux-typescript@workspace:.": + version: 0.0.0-use.local + resolution: "react-native-template-redux-typescript@workspace:." + dependencies: + "@babel/core": ^7.20.0 + "@babel/preset-env": ^7.20.0 + "@babel/runtime": ^7.20.0 + "@react-native/babel-preset": ^0.73.18 + "@react-native/eslint-config": ^0.73.1 + "@react-native/metro-config": ^0.73.2 + "@react-native/typescript-config": ^0.73.1 + "@reduxjs/toolkit": ^2.0.1 + "@testing-library/react-native": ^12.4.1 + "@types/jest": ^29.5.11 + "@types/react": ^18.2.6 + "@types/react-test-renderer": ^18.0.7 + "@typescript-eslint/eslint-plugin": ^6.14.0 + "@typescript-eslint/parser": ^6.14.0 + babel-jest: ^29.6.3 + eslint: ^8.56.0 + eslint-plugin-prettier: ^5.0.1 + jest: ^29.7.0 + prettier: ^3.1.1 + react: 18.2.0 + react-native: 0.73.0 + react-redux: ^9.0.4 + react-test-renderer: 18.2.0 + ts-node: ^10.9.2 + typescript: ^5.3.3 + languageName: unknown + linkType: soft + +"react-native@npm:0.73.0": + version: 0.73.0 + resolution: "react-native@npm:0.73.0" + dependencies: + "@jest/create-cache-key-function": ^29.6.3 + "@react-native-community/cli": 12.1.1 + "@react-native-community/cli-platform-android": 12.1.1 + "@react-native-community/cli-platform-ios": 12.1.1 + "@react-native/assets-registry": ^0.73.1 + "@react-native/codegen": ^0.73.2 + "@react-native/community-cli-plugin": ^0.73.10 + "@react-native/gradle-plugin": ^0.73.4 + "@react-native/js-polyfills": ^0.73.1 + "@react-native/normalize-colors": ^0.73.2 + "@react-native/virtualized-lists": ^0.73.3 + abort-controller: ^3.0.0 + anser: ^1.4.9 + ansi-regex: ^5.0.0 + base64-js: ^1.5.1 + deprecated-react-native-prop-types: ^5.0.0 + event-target-shim: ^5.0.1 + flow-enums-runtime: ^0.0.6 + invariant: ^2.2.4 + jest-environment-node: ^29.6.3 + jsc-android: ^250231.0.0 + memoize-one: ^5.0.0 + metro-runtime: ^0.80.0 + metro-source-map: ^0.80.0 + mkdirp: ^0.5.1 + nullthrows: ^1.1.1 + pretty-format: ^26.5.2 + promise: ^8.3.0 + react-devtools-core: ^4.27.7 + react-refresh: ^0.14.0 + react-shallow-renderer: ^16.15.0 + regenerator-runtime: ^0.13.2 + scheduler: 0.24.0-canary-efb381bbf-20230505 + stacktrace-parser: ^0.1.10 + whatwg-fetch: ^3.0.0 + ws: ^6.2.2 + yargs: ^17.6.2 + peerDependencies: + react: 18.2.0 + bin: + react-native: cli.js + checksum: d988181d09ca53379d2e67b0928bf7b012b213b6ca1bde52ecff8881bcb36f8d78a767b7e85da629c018a0e326f29d468b9cc97c9196c46aa9a878c2859081b1 + languageName: node + linkType: hard + +"react-redux@npm:^9.0.4": + version: 9.0.4 + resolution: "react-redux@npm:9.0.4" + dependencies: + "@types/use-sync-external-store": ^0.0.3 + use-sync-external-store: ^1.0.0 + peerDependencies: + "@types/react": ^18.2.25 + react: ^18.0 + react-native: ">=0.69" + redux: ^5.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + react-native: + optional: true + redux: + optional: true + checksum: acc69b85e003f4367e0fa9716ca441a2536aa513fcb1b9404e33188fa68938acf455806eba2ff639553fbba24c06b6e96982998178bb9a2669227e7e4bcd441e + languageName: node + linkType: hard + +"react-refresh@npm:^0.14.0": + version: 0.14.0 + resolution: "react-refresh@npm:0.14.0" + checksum: dc69fa8c993df512f42dd0f1b604978ae89bd747c0ed5ec595c0cc50d535fb2696619ccd98ae28775cc01d0a7c146a532f0f7fb81dc22e1977c242a4912312f4 + languageName: node + linkType: hard + +"react-shallow-renderer@npm:^16.15.0": + version: 16.15.0 + resolution: "react-shallow-renderer@npm:16.15.0" + dependencies: + object-assign: ^4.1.1 + react-is: ^16.12.0 || ^17.0.0 || ^18.0.0 + peerDependencies: + react: ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 6052c7e3e9627485120ebd8257f128aad8f56386fe8d42374b7743eac1be457c33506d153c7886b4e32923c0c352d402ab805ef9ca02dbcd8393b2bdeb6e5af8 + languageName: node + linkType: hard + +"react-test-renderer@npm:18.2.0": + version: 18.2.0 + resolution: "react-test-renderer@npm:18.2.0" + dependencies: + react-is: ^18.2.0 + react-shallow-renderer: ^16.15.0 + scheduler: ^0.23.0 + peerDependencies: + react: ^18.2.0 + checksum: 6b6980ced93fa2b72662d5e4ab3b4896833586940047ce52ca9aca801e5432adf05fcbe28289b0af3ce6a2a7c590974e25dcc8aa43d0de658bfe8bbcd686f958 + languageName: node + linkType: hard + +"react@npm:18.2.0": + version: 18.2.0 + resolution: "react@npm:18.2.0" + dependencies: + loose-envify: ^1.1.0 + checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b + languageName: node + linkType: hard + +"readable-stream@npm:^3.4.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: ^2.0.3 + string_decoder: ^1.1.1 + util-deprecate: ^1.0.1 + checksum: bdcbe6c22e846b6af075e32cf8f4751c2576238c5043169a1c221c92ee2878458a816a4ea33f4c67623c0b6827c8a400409bfb3cf0bf3381392d0b1dfb52ac8d + languageName: node + linkType: hard + +"readable-stream@npm:~2.3.6": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.3 + isarray: ~1.0.0 + process-nextick-args: ~2.0.0 + safe-buffer: ~5.1.1 + string_decoder: ~1.1.1 + util-deprecate: ~1.0.1 + checksum: 65645467038704f0c8aaf026a72fbb588a9e2ef7a75cd57a01702ee9db1c4a1e4b03aaad36861a6a0926546a74d174149c8c207527963e0c2d3eee2f37678a42 + languageName: node + linkType: hard + +"readline@npm:^1.3.0": + version: 1.3.0 + resolution: "readline@npm:1.3.0" + checksum: dfaf8e6ac20408ea00d650e95f7bb47f77c4c62dd12ed7fb51731ee84532a2f3675fcdc4cab4923dc1eef227520a2e082a093215190907758bea9f585b19438e + languageName: node + linkType: hard + +"recast@npm:^0.21.0": + version: 0.21.5 + resolution: "recast@npm:0.21.5" + dependencies: + ast-types: 0.15.2 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: 03cc7f57562238ba258d468be67bf7446ce7a707bc87a087891dad15afead46c36e9aaeedf2130e2ab5a465244a9c62bfd4127849761cf8f4085abe2f3e5f485 + languageName: node + linkType: hard + +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + +"redux-thunk@npm:^3.1.0": + version: 3.1.0 + resolution: "redux-thunk@npm:3.1.0" + peerDependencies: + redux: ^5.0.0 + checksum: bea96f8233975aad4c9f24ca1ffd08ac7ec91eaefc26e7ba9935544dc55d7f09ba2aa726676dab53dc79d0c91e8071f9729cddfea927f4c41839757d2ade0f50 + languageName: node + linkType: hard + +"redux@npm:^5.0.0": + version: 5.0.0 + resolution: "redux@npm:5.0.0" + checksum: be49160d4bd01e10108c425ade999f1b456204895c4bdd0c7825ab09efffded51955c5c242847406a7b3f273e9011a9c102848c512a099a75617b97b13d2cca8 + languageName: node + linkType: hard + +"reflect.getprototypeof@npm:^1.0.4": + version: 1.0.4 + resolution: "reflect.getprototypeof@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + which-builtin-type: ^1.1.3 + checksum: 16e2361988dbdd23274b53fb2b1b9cefeab876c3941a2543b4cadac6f989e3db3957b07a44aac46cfceb3e06e2871785ec2aac992d824f76292f3b5ee87f66f2 + languageName: node + linkType: hard + +"regenerate-unicode-properties@npm:^10.1.0": + version: 10.1.1 + resolution: "regenerate-unicode-properties@npm:10.1.1" + dependencies: + regenerate: ^1.4.2 + checksum: b80958ef40f125275824c2c47d5081dfaefebd80bff26c76761e9236767c748a4a95a69c053fe29d2df881177f2ca85df4a71fe70a82360388b31159ef19adcf + languageName: node + linkType: hard + +"regenerate@npm:^1.4.2": + version: 1.4.2 + resolution: "regenerate@npm:1.4.2" + checksum: 3317a09b2f802da8db09aa276e469b57a6c0dd818347e05b8862959c6193408242f150db5de83c12c3fa99091ad95fb42a6db2c3329bfaa12a0ea4cbbeb30cb0 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.13.2": + version: 0.13.11 + resolution: "regenerator-runtime@npm:0.13.11" + checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 9f57c93277b5585d3c83b0cf76be47b473ae8c6d9142a46ce8b0291a04bb2cf902059f0f8445dcabb3fb7378e5fe4bb4ea1e008876343d42e46d3b484534ce38 + languageName: node + linkType: hard + +"regenerator-transform@npm:^0.15.2": + version: 0.15.2 + resolution: "regenerator-transform@npm:0.15.2" + dependencies: + "@babel/runtime": ^7.8.4 + checksum: 20b6f9377d65954980fe044cfdd160de98df415b4bff38fbade67b3337efaf078308c4fed943067cd759827cc8cfeca9cb28ccda1f08333b85d6a2acbd022c27 + languageName: node + linkType: hard + +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": + version: 1.5.1 + resolution: "regexp.prototype.flags@npm:1.5.1" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + set-function-name: ^2.0.0 + checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 + languageName: node + linkType: hard + +"regexpu-core@npm:^5.3.1": + version: 5.3.2 + resolution: "regexpu-core@npm:5.3.2" + dependencies: + "@babel/regjsgen": ^0.8.0 + regenerate: ^1.4.2 + regenerate-unicode-properties: ^10.1.0 + regjsparser: ^0.9.1 + unicode-match-property-ecmascript: ^2.0.0 + unicode-match-property-value-ecmascript: ^2.1.0 + checksum: 95bb97088419f5396e07769b7de96f995f58137ad75fac5811fb5fe53737766dfff35d66a0ee66babb1eb55386ef981feaef392f9df6d671f3c124812ba24da2 + languageName: node + linkType: hard + +"regjsparser@npm:^0.9.1": + version: 0.9.1 + resolution: "regjsparser@npm:0.9.1" + dependencies: + jsesc: ~0.5.0 + bin: + regjsparser: bin/parser + checksum: 5e1b76afe8f1d03c3beaf9e0d935dd467589c3625f6d65fb8ffa14f224d783a0fed4bf49c2c1b8211043ef92b6117313419edf055a098ed8342e340586741afc + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7 + languageName: node + linkType: hard + +"reselect@npm:^5.0.1": + version: 5.0.1 + resolution: "reselect@npm:5.0.1" + checksum: 7663b4c28a0e908e74dc25262e1d813d028b9c2ee96160cb0f40a16f09c5ac632fa16af6bafede7eb0ff16ab2d5bea2cd8814d9a9488e0262b8317fef90b1dc0 + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: ^5.0.0 + checksum: 546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 + languageName: node + linkType: hard + +"resolve-from@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-from@npm:3.0.0" + checksum: fff9819254d2d62b57f74e5c2ca9c0bdd425ca47287c4d801bc15f947533148d858229ded7793b0f59e61e49e782fffd6722048add12996e1bd4333c29669062 + languageName: node + linkType: hard + +"resolve-from@npm:^4.0.0": + version: 4.0.0 + resolution: "resolve-from@npm:4.0.0" + checksum: f4ba0b8494846a5066328ad33ef8ac173801a51739eb4d63408c847da9a2e1c1de1e6cbbf72699211f3d13f8fc1325648b169bd15eb7da35688e30a5fb0e4a7f + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 4ceeb9113e1b1372d0cd969f3468fa042daa1dd9527b1b6bb88acb6ab55d8b9cd65dbf18819f9f9ddf0db804990901dcdaade80a215e7b2c23daae38e64f5bdf + languageName: node + linkType: hard + +"resolve.exports@npm:^2.0.0": + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 1c7778ca1b86a94f8ab4055d196c7d87d1874b96df4d7c3e67bbf793140f0717fd506dcafd62785b079cd6086b9264424ad634fb904409764c3509c3df1653f2 + languageName: node + linkType: hard + +"resolve@npm:^1.14.2, resolve@npm:^1.20.0": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: f8a26958aa572c9b064562750b52131a37c29d072478ea32e129063e2da7f83e31f7f11e7087a18225a8561cfe8d2f0df9dbea7c9d331a897571c0a2527dbb4c + languageName: node + linkType: hard + +"resolve@npm:^2.0.0-next.4": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: a73ac69a1c4bd34c56b213d91f5b17ce390688fdb4a1a96ed3025cc7e08e7bfb90b3a06fcce461780cb0b589c958afcb0080ab802c71c01a7ecc8c64feafc89f + languageName: node + linkType: hard + +"resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847 + languageName: node + linkType: hard + +"resolve@patch:resolve@^2.0.0-next.4#~builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#~builtin::version=2.0.0-next.5&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 064d09c1808d0c51b3d90b5d27e198e6d0c5dad0eb57065fd40803d6a20553e5398b07f76739d69cbabc12547058bec6b32106ea66622375fb0d7e8fca6a846c + languageName: node + linkType: hard + +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: ^5.1.0 + signal-exit: ^3.0.2 + checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 623bd7d2e5119467ba66202d733ec3c2e2e26568074923bc0585b6b99db14f357e79bdedb63cab56cec47491c4a0da7e6021a7465ca6dc4f481d3898fdd3158c + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: c3076ebcc22a6bc252cb0b9c77561795256c22b757f40c0d8110b1300723f15ec0fc8685e8d4ea6d7666f36c79ccc793b1939c748bf36f18f542744a4e379fcc + languageName: node + linkType: hard + +"rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: ^7.1.3 + bin: + rimraf: bin.js + checksum: 87f4164e396f0171b0a3386cc1877a817f572148ee13a7e113b238e48e8a9f2f31d009a92ec38a591ff1567d9662c6b67fd8818a2dbbaed74bc26a87a2a4a9a0 + languageName: node + linkType: hard + +"rimraf@npm:~2.6.2": + version: 2.6.3 + resolution: "rimraf@npm:2.6.3" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: 3ea587b981a19016297edb96d1ffe48af7e6af69660e3b371dbfc73722a73a0b0e9be5c88089fbeeb866c389c1098e07f64929c7414290504b855f54f901ab10 + languageName: node + linkType: hard + +"run-applescript@npm:^5.0.0": + version: 5.0.0 + resolution: "run-applescript@npm:5.0.0" + dependencies: + execa: ^5.0.0 + checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + languageName: node + linkType: hard + +"safe-array-concat@npm:^1.0.1": + version: 1.0.1 + resolution: "safe-array-concat@npm:1.0.1" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: 001ecf1d8af398251cbfabaf30ed66e3855127fbceee178179524b24160b49d15442f94ed6c0db0b2e796da76bb05b73bf3cc241490ec9c2b741b41d33058581 + languageName: node + linkType: hard + +"safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": + version: 5.1.2 + resolution: "safe-buffer@npm:5.1.2" + checksum: f2f1f7943ca44a594893a852894055cf619c1fbcb611237fc39e461ae751187e7baf4dc391a72125e0ac4fb2d8c5c0b3c71529622e6a58f46b960211e704903c + languageName: node + linkType: hard + +"safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + +"safe-regex-test@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-regex-test@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + is-regex: ^1.1.4 + checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 + languageName: node + linkType: hard + +"scheduler@npm:0.24.0-canary-efb381bbf-20230505": + version: 0.24.0-canary-efb381bbf-20230505 + resolution: "scheduler@npm:0.24.0-canary-efb381bbf-20230505" + dependencies: + loose-envify: ^1.1.0 + checksum: 232149125c10f10193b1340ec4bbf14a8e6a845152790d6fd6f58207642db801abdb5a21227561a0a93871b98ba47539a6233b4e6155aae72d6db6db9f9f09b3 + languageName: node + linkType: hard + +"scheduler@npm:^0.23.0": + version: 0.23.0 + resolution: "scheduler@npm:0.23.0" + dependencies: + loose-envify: ^1.1.0 + checksum: d79192eeaa12abef860c195ea45d37cbf2bbf5f66e3c4dcd16f54a7da53b17788a70d109ee3d3dde1a0fd50e6a8fc171f4300356c5aee4fc0171de526bf35f8a + languageName: node + linkType: hard + +"semver@npm:^5.6.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 + languageName: node + linkType: hard + +"semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + +"send@npm:0.18.0": + version: 0.18.0 + resolution: "send@npm:0.18.0" + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + etag: ~1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: ~1.2.1 + statuses: 2.0.1 + checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8 + languageName: node + linkType: hard + +"serialize-error@npm:^2.1.0": + version: 2.1.0 + resolution: "serialize-error@npm:2.1.0" + checksum: 28464a6f65e6becd6e49fb782aff06573fdbf3d19f161a20228179842fed05c75a34110e54c3ee020b00240f9e11d8bee9b9fee5d04e0bc0bef1fdbf2baa297e + languageName: node + linkType: hard + +"serve-static@npm:^1.13.1": + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" + dependencies: + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + parseurl: ~1.3.3 + send: 0.18.0 + checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 6e65a05f7cf7ebdf8b7c75b101e18c0b7e3dff4940d480efed8aad3a36a4005140b660fa1d804cb8bce911cac290441dc728084a30504d3516ac2ff7ad607b02 + languageName: node + linkType: hard + +"set-function-length@npm:^1.1.1": + version: 1.1.1 + resolution: "set-function-length@npm:1.1.1" + dependencies: + define-data-property: ^1.1.1 + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: c131d7569cd7e110cafdfbfbb0557249b538477624dfac4fc18c376d879672fa52563b74029ca01f8f4583a8acb35bb1e873d573a24edb80d978a7ee607c6e06 + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: ^1.0.1 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + languageName: node + linkType: hard + +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: be18cbbf70e7d8097c97f713a2e76edf84e87299b40d085c6bf8b65314e994cc15e2e317727342fa6996e38e1f52c59720b53fe621e2eb593a6847bf0356db89 + languageName: node + linkType: hard + +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" + dependencies: + kind-of: ^6.0.2 + checksum: 39b3dd9630a774aba288a680e7d2901f5c0eae7b8387fc5c8ea559918b29b3da144b7bdb990d7ccd9e11be05508ac9e459ce51d01fd65e583282f6ffafcba2e7 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: ^3.0.0 + checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"shell-quote@npm:^1.6.1, shell-quote@npm:^1.7.3": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 5f01201f4ef504d4c6a9d0d283fa17075f6770bfbe4c5850b074974c68062f37929ca61700d95ad2ac8822e14e8c4b990ca0e6e9272e64befd74ce5e19f0736b + languageName: node + linkType: hard + +"side-channel@npm:^1.0.4": + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" + dependencies: + call-bind: ^1.0.0 + get-intrinsic: ^1.0.2 + object-inspect: ^1.9.0 + checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + +"sisteransi@npm:^1.0.5": + version: 1.0.5 + resolution: "sisteransi@npm:1.0.5" + checksum: aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 + languageName: node + linkType: hard + +"slash@npm:^3.0.0": + version: 3.0.0 + resolution: "slash@npm:3.0.0" + checksum: 94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c + languageName: node + linkType: hard + +"slice-ansi@npm:^2.0.0": + version: 2.1.0 + resolution: "slice-ansi@npm:2.1.0" + dependencies: + ansi-styles: ^3.2.0 + astral-regex: ^1.0.0 + is-fullwidth-code-point: ^2.0.0 + checksum: 4e82995aa59cef7eb03ef232d73c2239a15efa0ace87a01f3012ebb942e963fbb05d448ce7391efcd52ab9c32724164aba2086f5143e0445c969221dde3b6b1e + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: b5167a7142c1da704c0e3af85c402002b597081dd9575031a90b4f229ca5678e9a36e8a374f1814c8156a725d17008ae3bde63b92f9cfd132526379e580bec8b + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: ^2.0.0 + smart-buffer: ^4.2.0 + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + languageName: node + linkType: hard + +"source-map-support@npm:0.5.13": + version: 0.5.13 + resolution: "source-map-support@npm:0.5.13" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 933550047b6c1a2328599a21d8b7666507427c0f5ef5eaadd56b5da0fd9505e239053c66fe181bf1df469a3b7af9d775778eee283cbb7ae16b902ddc09e93a97 + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.16, source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + +"source-map@npm:^0.5.6": + version: 0.5.7 + resolution: "source-map@npm:0.5.7" + checksum: 5dc2043b93d2f194142c7f38f74a24670cd7a0063acdaf4bf01d2964b402257ae843c2a8fa822ad5b71013b5fcafa55af7421383da919752f22ff488bc553f4d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + +"source-map@npm:^0.7.3": + version: 0.7.4 + resolution: "source-map@npm:0.7.4" + checksum: 01cc5a74b1f0e1d626a58d36ad6898ea820567e87f18dfc9d24a9843a351aaa2ec09b87422589906d6ff1deed29693e176194dc88bcae7c9a852dc74b311dbf5 + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 19d79aec211f09b99ec3099b5b2ae2f6e9cdefe50bc91ac4c69144b6d3928a640bb6ae5b3def70c2e85a2c3d9f5ec2719921e3a59d3ca3ef4b2fd1a4656a0df3 + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" + dependencies: + minipass: ^7.0.3 + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.3": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: ^2.0.0 + checksum: 052bf4d25bbf5f78e06c1d5e67de2e088b06871fa04107ca8d3f0e9d9263326e2942c8bedee3545795fc77d787d443a538345eef74db2f8e35db3558c6f91ff7 + languageName: node + linkType: hard + +"stackframe@npm:^1.3.4": + version: 1.3.4 + resolution: "stackframe@npm:1.3.4" + checksum: bae1596873595c4610993fa84f86a3387d67586401c1816ea048c0196800c0646c4d2da98c2ee80557fd9eff05877efe33b91ba6cd052658ed96ddc85d19067d + languageName: node + linkType: hard + +"stacktrace-parser@npm:^0.1.10": + version: 0.1.10 + resolution: "stacktrace-parser@npm:0.1.10" + dependencies: + type-fest: ^0.7.1 + checksum: f4fbddfc09121d91e587b60de4beb4941108e967d71ad3a171812dc839b010ca374d064ad0a296295fed13acd103609d99a4224a25b4e67de13cae131f1901ee + languageName: node + linkType: hard + +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"statuses@npm:~1.5.0": + version: 1.5.0 + resolution: "statuses@npm:1.5.0" + checksum: c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c + languageName: node + linkType: hard + +"string-length@npm:^4.0.1": + version: 4.0.2 + resolution: "string-length@npm:4.0.2" + dependencies: + char-regex: ^1.0.2 + strip-ansi: ^6.0.0 + checksum: ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 + languageName: node + linkType: hard + +"string-natural-compare@npm:^3.0.1": + version: 3.0.1 + resolution: "string-natural-compare@npm:3.0.1" + checksum: 65910d9995074086e769a68728395effbba9b7186be5b4c16a7fad4f4ef50cae95ca16e3e9086e019cbb636ae8daac9c7b8fe91b5f21865c5c0f26e3c0725406 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: ^0.2.0 + emoji-regex: ^9.2.2 + strip-ansi: ^7.0.1 + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 + side-channel: ^1.0.4 + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: ~5.2.0 + checksum: 8417646695a66e73aefc4420eb3b84cc9ffd89572861fe004e6aeb13c7bc00e2f616247505d2dbbef24247c372f70268f594af7126f43548565c68c117bdeb56 + languageName: node + linkType: hard + +"string_decoder@npm:~1.1.1": + version: 1.1.1 + resolution: "string_decoder@npm:1.1.1" + dependencies: + safe-buffer: ~5.1.0 + checksum: 9ab7e56f9d60a28f2be697419917c50cac19f3e8e6c28ef26ed5f4852289fe0de5d6997d29becf59028556f2c62983790c1d9ba1e2a3cc401768ca12d5183a5b + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-ansi@npm:^5.0.0, strip-ansi@npm:^5.2.0": + version: 5.2.0 + resolution: "strip-ansi@npm:5.2.0" + dependencies: + ansi-regex: ^4.1.0 + checksum: bdb5f76ade97062bd88e7723aa019adbfacdcba42223b19ccb528ffb9fb0b89a5be442c663c4a3fb25268eaa3f6ea19c7c3fbae830bd1562d55adccae1fcec46 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: ^6.0.1 + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 + languageName: node + linkType: hard + +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 + languageName: node + linkType: hard + +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + +"strip-json-comments@npm:^3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"strnum@npm:^1.0.5": + version: 1.0.5 + resolution: "strnum@npm:1.0.5" + checksum: 651b2031db5da1bf4a77fdd2f116a8ac8055157c5420f5569f64879133825915ad461513e7202a16d7fec63c54fd822410d0962f8ca12385c4334891b9ae6dd2 + languageName: node + linkType: hard + +"sudo-prompt@npm:^9.0.0": + version: 9.2.1 + resolution: "sudo-prompt@npm:9.2.1" + checksum: 50a29eec2f264f2b78d891452a64112d839a30bffbff4ec065dba4af691a35b23cdb8f9107d413e25c1a9f1925644a19994c00602495cab033d53f585fdfd665 + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: ^3.0.0 + checksum: 95f6f4ba5afdf92f495b5a912d4abee8dcba766ae719b975c56c084f5004845f6f5a5f7769f52d53f40e21952a6d87411bafe34af4a01e65f9926002e38e1dac + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: ^4.0.0 + checksum: 3dda818de06ebbe5b9653e07842d9479f3555ebc77e9a0280caf5a14fb877ffee9ed57007c3b78f5a6324b8dbeec648d9e97a24e2ed9fdb81ddc69ea07100f4a + languageName: node + linkType: hard + +"supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae + languageName: node + linkType: hard + +"synckit@npm:^0.8.5": + version: 0.8.6 + resolution: "synckit@npm:0.8.6" + dependencies: + "@pkgr/utils": ^2.4.2 + tslib: ^2.6.2 + checksum: 7c1f4991d0afd63c090c0537f1cf8619dd5777a40cf83bf46beadbf4eb0f9e400d92044e90a177a305df4bcb56efbaf1b689877f301f2672d865b6eecf1be75a + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.0 + resolution: "tar@npm:6.2.0" + dependencies: + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + minipass: ^5.0.0 + minizlib: ^2.1.1 + mkdirp: ^1.0.3 + yallist: ^4.0.0 + checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + languageName: node + linkType: hard + +"temp-dir@npm:^2.0.0": + version: 2.0.0 + resolution: "temp-dir@npm:2.0.0" + checksum: cc4f0404bf8d6ae1a166e0e64f3f409b423f4d1274d8c02814a59a5529f07db6cd070a749664141b992b2c1af337fa9bb451a460a43bb9bcddc49f235d3115aa + languageName: node + linkType: hard + +"temp@npm:^0.8.4": + version: 0.8.4 + resolution: "temp@npm:0.8.4" + dependencies: + rimraf: ~2.6.2 + checksum: f35bed78565355dfdf95f730b7b489728bd6b7e35071bcc6497af7c827fb6c111fbe9063afc7b8cbc19522a072c278679f9a0ee81e684aa2c8617cc0f2e9c191 + languageName: node + linkType: hard + +"terser@npm:^5.15.0": + version: 5.26.0 + resolution: "terser@npm:5.26.0" + dependencies: + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.8.2 + commander: ^2.20.0 + source-map-support: ~0.5.20 + bin: + terser: bin/terser + checksum: 02a9bb896f04df828025af8f0eced36c315d25d310b6c2418e7dad2bed19ddeb34a9cea9b34e7c24789830fa51e1b6a9be26679980987a9c817a7e6d9cd4154b + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": ^0.1.2 + glob: ^7.1.4 + minimatch: ^3.0.4 + checksum: 3b34a3d77165a2cb82b34014b3aba93b1c4637a5011807557dc2f3da826c59975a5ccad765721c4648b39817e3472789f9b0fa98fc854c5c1c7a1e632aacdc28 + languageName: node + linkType: hard + +"text-table@npm:^0.2.0": + version: 0.2.0 + resolution: "text-table@npm:0.2.0" + checksum: b6937a38c80c7f84d9c11dd75e49d5c44f71d95e810a3250bd1f1797fc7117c57698204adf676b71497acc205d769d65c16ae8fa10afad832ae1322630aef10a + languageName: node + linkType: hard + +"throat@npm:^5.0.0": + version: 5.0.0 + resolution: "throat@npm:5.0.0" + checksum: 031ff7f4431618036c1dedd99c8aa82f5c33077320a8358ed829e84b320783781d1869fe58e8f76e948306803de966f5f7573766a437562c9f5c033297ad2fe2 + languageName: node + linkType: hard + +"through2@npm:^2.0.1": + version: 2.0.5 + resolution: "through2@npm:2.0.5" + dependencies: + readable-stream: ~2.3.6 + xtend: ~4.0.1 + checksum: beb0f338aa2931e5660ec7bf3ad949e6d2e068c31f4737b9525e5201b824ac40cac6a337224856b56bd1ddd866334bbfb92a9f57cd6f66bc3f18d3d86fc0fe50 + languageName: node + linkType: hard + +"titleize@npm:^3.0.0": + version: 3.0.0 + resolution: "titleize@npm:3.0.0" + checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 + languageName: node + linkType: hard + +"tmpl@npm:1.0.5": + version: 1.0.5 + resolution: "tmpl@npm:1.0.5" + checksum: cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 + languageName: node + linkType: hard + +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: ^7.0.0 + checksum: f76fa01b3d5be85db6a2a143e24df9f60dd047d151062d0ba3df62953f2f697b16fe5dad9b0ac6191c7efc7b1d9dcaa4b768174b7b29da89d4428e64bc0a20ed + languageName: node + linkType: hard + +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + +"ts-api-utils@npm:^1.0.1": + version: 1.0.3 + resolution: "ts-api-utils@npm:1.0.3" + peerDependencies: + typescript: ">=4.2.0" + checksum: 441cc4489d65fd515ae6b0f4eb8690057add6f3b6a63a36073753547fb6ce0c9ea0e0530220a0b282b0eec535f52c4dfc315d35f8a4c9a91c0def0707a714ca6 + languageName: node + linkType: hard + +"ts-node@npm:^10.9.2": + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" + dependencies: + "@cspotcode/source-map-support": ^0.8.0 + "@tsconfig/node10": ^1.0.7 + "@tsconfig/node12": ^1.0.7 + "@tsconfig/node14": ^1.0.0 + "@tsconfig/node16": ^1.0.2 + acorn: ^8.4.1 + acorn-walk: ^8.1.1 + arg: ^4.1.0 + create-require: ^1.1.0 + diff: ^4.0.1 + make-error: ^1.1.1 + v8-compile-cache-lib: ^3.0.1 + yn: 3.1.1 + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: fde256c9073969e234526e2cfead42591b9a2aec5222bac154b0de2fa9e4ceb30efcd717ee8bc785a56f3a119bdd5aa27b333d9dbec94ed254bd26f8944c67ac + languageName: node + linkType: hard + +"tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: dbe628ef87f66691d5d2959b3e41b9ca0045c3ee3c7c7b906cc1e328b39f199bb1ad9e671c39025bd56122ac57dfbf7385a94843b1cc07c60a4db74795829acd + languageName: node + linkType: hard + +"tslib@npm:^2.0.1, tslib@npm:^2.6.0, tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + +"tsutils@npm:^3.21.0": + version: 3.21.0 + resolution: "tsutils@npm:3.21.0" + dependencies: + tslib: ^1.8.1 + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + checksum: 1843f4c1b2e0f975e08c4c21caa4af4f7f65a12ac1b81b3b8489366826259323feb3fc7a243123453d2d1a02314205a7634e048d4a8009921da19f99755cdc48 + languageName: node + linkType: hard + +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" + dependencies: + prelude-ls: ^1.2.1 + checksum: ec688ebfc9c45d0c30412e41ca9c0cdbd704580eb3a9ccf07b9b576094d7b86a012baebc95681999dd38f4f444afd28504cb3a89f2ef16b31d4ab61a0739025a + languageName: node + linkType: hard + +"type-detect@npm:4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 + languageName: node + linkType: hard + +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 4fb3272df21ad1c552486f8a2f8e115c09a521ad7a8db3d56d53718d0c907b62c6e9141ba5f584af3f6830d0872c521357e512381f24f7c44acae583ad517d73 + languageName: node + linkType: hard + +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: e6b32a3b3877f04339bae01c193b273c62ba7bfc9e325b8703c4ee1b32dc8fe4ef5dfa54bf78265e069f7667d058e360ae0f37be5af9f153b22382cd55a9afe0 + languageName: node + linkType: hard + +"type-fest@npm:^0.7.1": + version: 0.7.1 + resolution: "type-fest@npm:0.7.1" + checksum: 5b1b113529d59949d97b76977d545989ddc11b81bb0c766b6d2ccc65473cb4b4a5c7d24f5be2c2bb2de302a5d7a13c1732ea1d34c8c59b7e0ec1f890cf7fc424 + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + is-typed-array: ^1.1.10 + checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + languageName: node + linkType: hard + +"typescript@npm:^5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 + languageName: node + linkType: hard + +"typescript@patch:typescript@^5.3.3#~builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: f61375590b3162599f0f0d5b8737877ac0a7bc52761dbb585d67e7b8753a3a4c42d9a554c4cc929f591ffcf3a2b0602f65ae3ce74714fd5652623a816862b610 + languageName: node + linkType: hard + +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + has-bigints: ^1.0.2 + has-symbols: ^1.0.3 + which-boxed-primitive: ^1.0.2 + checksum: b7a1cf5862b5e4b5deb091672ffa579aa274f648410009c81cca63fed3b62b610c4f3b773f912ce545bb4e31edc3138975b5bc777fc6e4817dca51affb6380e9 + languageName: node + linkType: hard + +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + +"unicode-canonical-property-names-ecmascript@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" + checksum: 39be078afd014c14dcd957a7a46a60061bc37c4508ba146517f85f60361acf4c7539552645ece25de840e17e293baa5556268d091ca6762747fdd0c705001a45 + languageName: node + linkType: hard + +"unicode-match-property-ecmascript@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-match-property-ecmascript@npm:2.0.0" + dependencies: + unicode-canonical-property-names-ecmascript: ^2.0.0 + unicode-property-aliases-ecmascript: ^2.0.0 + checksum: 1f34a7434a23df4885b5890ac36c5b2161a809887000be560f56ad4b11126d433c0c1c39baf1016bdabed4ec54829a6190ee37aa24919aa116dc1a5a8a62965a + languageName: node + linkType: hard + +"unicode-match-property-value-ecmascript@npm:^2.1.0": + version: 2.1.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" + checksum: 8d6f5f586b9ce1ed0e84a37df6b42fdba1317a05b5df0c249962bd5da89528771e2d149837cad11aa26bcb84c35355cb9f58a10c3d41fa3b899181ece6c85220 + languageName: node + linkType: hard + +"unicode-property-aliases-ecmascript@npm:^2.0.0": + version: 2.1.0 + resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" + checksum: 243524431893649b62cc674d877bd64ef292d6071dd2fd01ab4d5ad26efbc104ffcd064f93f8a06b7e4ec54c172bf03f6417921a0d8c3a9994161fe1f88f815b + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + +"universalify@npm:^0.1.0": + version: 0.1.2 + resolution: "universalify@npm:0.1.2" + checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff + languageName: node + linkType: hard + +"unpipe@npm:~1.0.0": + version: 1.0.0 + resolution: "unpipe@npm:1.0.0" + checksum: 4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 + languageName: node + linkType: hard + +"untildify@npm:^4.0.0": + version: 4.0.0 + resolution: "untildify@npm:4.0.0" + checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.0.13": + version: 1.0.13 + resolution: "update-browserslist-db@npm:1.0.13" + dependencies: + escalade: ^3.1.1 + picocolors: ^1.0.0 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 1e47d80182ab6e4ad35396ad8b61008ae2a1330221175d0abd37689658bdb61af9b705bfc41057fd16682474d79944fb2d86767c5ed5ae34b6276b9bed353322 + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: ^2.1.0 + checksum: 7167432de6817fe8e9e0c9684f1d2de2bb688c94388f7569f7dbdb1587c9f4ca2a77962f134ec90be0cc4d004c939ff0d05acc9f34a0db39a3c797dada262633 + languageName: node + linkType: hard + +"use-sync-external-store@npm:^1.0.0": + version: 1.2.0 + resolution: "use-sync-external-store@npm:1.2.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 5c639e0f8da3521d605f59ce5be9e094ca772bd44a4ce7322b055a6f58eeed8dda3c94cabd90c7a41fb6fa852210092008afe48f7038792fd47501f33299116a + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"utils-merge@npm:1.0.1": + version: 1.0.1 + resolution: "utils-merge@npm:1.0.1" + checksum: c81095493225ecfc28add49c106ca4f09cdf56bc66731aa8dabc2edbbccb1e1bfe2de6a115e5c6a380d3ea166d1636410b62ef216bb07b3feb1cfde1d95d5080 + languageName: node + linkType: hard + +"v8-compile-cache-lib@npm:^3.0.1": + version: 3.0.1 + resolution: "v8-compile-cache-lib@npm:3.0.1" + checksum: 78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0 + languageName: node + linkType: hard + +"v8-to-istanbul@npm:^9.0.1": + version: 9.2.0 + resolution: "v8-to-istanbul@npm:9.2.0" + dependencies: + "@jridgewell/trace-mapping": ^0.3.12 + "@types/istanbul-lib-coverage": ^2.0.1 + convert-source-map: ^2.0.0 + checksum: 31ef98c6a31b1dab6be024cf914f235408cd4c0dc56a5c744a5eea1a9e019ba279e1b6f90d695b78c3186feed391ed492380ccf095009e2eb91f3d058f0b4491 + languageName: node + linkType: hard + +"vary@npm:~1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: ae0123222c6df65b437669d63dfa8c36cee20a504101b2fcd97b8bf76f91259c17f9f2b4d70a1e3c6bbcee7f51b28392833adb6b2770b23b01abec84e369660b + languageName: node + linkType: hard + +"vlq@npm:^1.0.0": + version: 1.0.1 + resolution: "vlq@npm:1.0.1" + checksum: 67ab6dd35c787eaa02c0ff1a869dd07a230db08722fb6014adaaf432634808ddb070765f70958b47997e438c331790cfcf20902411b0d6453f1a2a5923522f55 + languageName: node + linkType: hard + +"walker@npm:^1.0.7, walker@npm:^1.0.8": + version: 1.0.8 + resolution: "walker@npm:1.0.8" + dependencies: + makeerror: 1.0.12 + checksum: ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c + languageName: node + linkType: hard + +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"whatwg-fetch@npm:^3.0.0": + version: 3.6.20 + resolution: "whatwg-fetch@npm:3.6.20" + checksum: c58851ea2c4efe5c2235f13450f426824cf0253c1d45da28f45900290ae602a20aff2ab43346f16ec58917d5562e159cd691efa368354b2e82918c2146a519c5 + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + +"which-boxed-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "which-boxed-primitive@npm:1.0.2" + dependencies: + is-bigint: ^1.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + is-symbol: ^1.0.3 + checksum: 53ce774c7379071729533922adcca47220228405e1895f26673bbd71bdf7fb09bee38c1d6399395927c6289476b5ae0629863427fd151491b71c4b6cb04f3a5e + languageName: node + linkType: hard + +"which-builtin-type@npm:^1.1.3": + version: 1.1.3 + resolution: "which-builtin-type@npm:1.1.3" + dependencies: + function.prototype.name: ^1.1.5 + has-tostringtag: ^1.0.0 + is-async-function: ^2.0.0 + is-date-object: ^1.0.5 + is-finalizationregistry: ^1.0.2 + is-generator-function: ^1.0.10 + is-regex: ^1.1.4 + is-weakref: ^1.0.2 + isarray: ^2.0.5 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.9 + checksum: 43730f7d8660ff9e33d1d3f9f9451c4784265ee7bf222babc35e61674a11a08e1c2925019d6c03154fcaaca4541df43abe35d2720843b9b4cbcebdcc31408f36 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.1": + version: 1.0.1 + resolution: "which-collection@npm:1.0.1" + dependencies: + is-map: ^2.0.1 + is-set: ^2.0.1 + is-weakmap: ^2.0.1 + is-weakset: ^2.0.1 + checksum: c815bbd163107ef9cb84f135e6f34453eaf4cca994e7ba85ddb0d27cea724c623fae2a473ceccfd5549c53cc65a5d82692de418166df3f858e1e5dc60818581c + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.9": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.4 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: ^2.0.0 + bin: + node-which: ./bin/node-which + checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1 + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^2.3.0": + version: 2.4.3 + resolution: "write-file-atomic@npm:2.4.3" + dependencies: + graceful-fs: ^4.1.11 + imurmurhash: ^0.1.4 + signal-exit: ^3.0.2 + checksum: 2db81f92ae974fd87ab4a5e7932feacaca626679a7c98fcc73ad8fcea5a1950eab32fa831f79e9391ac99b562ca091ad49be37a79045bd65f595efbb8f4596ae + languageName: node + linkType: hard + +"write-file-atomic@npm:^4.0.2": + version: 4.0.2 + resolution: "write-file-atomic@npm:4.0.2" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^3.0.7 + checksum: 5da60bd4eeeb935eec97ead3df6e28e5917a6bd317478e4a85a5285e8480b8ed96032bbcc6ecd07b236142a24f3ca871c924ec4a6575e623ec1b11bf8c1c253c + languageName: node + linkType: hard + +"ws@npm:^6.2.2": + version: 6.2.2 + resolution: "ws@npm:6.2.2" + dependencies: + async-limiter: ~1.0.0 + checksum: aec3154ec51477c094ac2cb5946a156e17561a581fa27005cbf22c53ac57f8d4e5f791dd4bbba6a488602cb28778c8ab7df06251d590507c3c550fd8ebeee949 + languageName: node + linkType: hard + +"ws@npm:^7, ws@npm:^7.5.1": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + +"xtend@npm:~4.0.1": + version: 4.0.2 + resolution: "xtend@npm:4.0.2" + checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4 + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 54f0fb95621ee60898a38c572c515659e51cc9d9f787fb109cef6fde4befbe1c4602dc999d30110feee37456ad0f1660fa2edcfde6a9a740f86a290999550d30 + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5 + languageName: node + linkType: hard + +"yaml@npm:^2.2.1": + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: e6d1dae1c6383bcc8ba11796eef3b8c02d5082911c6723efeeb5ba50fc8e881df18d645e64de68e421b577296000bea9c75d6d9097c2f6699da3ae0406c030d8 + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c + languageName: node + linkType: hard + +"yargs@npm:^15.1.0": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard + +"yargs@npm:^17.3.1, yargs@npm:^17.6.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard From 388dab3060429be44453fda89be74b10e19d9c69 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 16:55:43 -0600 Subject: [PATCH 013/368] Fix `react-native` version --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 81793461f1..5959fff5af 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -16,7 +16,7 @@ "dependencies": { "@reduxjs/toolkit": "^2.0.1", "react": "18.2.0", - "react-native": "^0.73.0", + "react-native": "0.73.0", "react-redux": "^9.0.4" }, "devDependencies": { From ee0c7e67333631d9ccef8ccaef6dfbb4d882804e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 17:05:11 -0600 Subject: [PATCH 014/368] Remove ios-build from the build command --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 5959fff5af..bda301438a 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "react-native build-android && react-native build-ios", + "build": "react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 222217a002daa5548ac71fde100dd219427adb9b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 17:09:44 -0600 Subject: [PATCH 015/368] Skip build step --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index bda301438a..2bbc8e7233 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "react-native build-android", + "build": "echo Done", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 490238b3042acbede8ed89bcdc876c2afe74af67 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 19:19:39 -0600 Subject: [PATCH 016/368] Add 'expo' to examples in `tests.yml` --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9407755fc2..aa0470566c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -149,7 +149,7 @@ jobs: fail-fast: false matrix: node: ['18.x'] - example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm'] + example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm', 'expo'] defaults: run: working-directory: ./examples/publish-ci/${{ matrix.example }} From 421b65bbb13762d5289dee6040c41e6ec66ee8ea Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 19:20:40 -0600 Subject: [PATCH 017/368] Add Expo example app --- examples/publish-ci/expo/.eslintrc.json | 41 + examples/publish-ci/expo/.gitignore | 36 + examples/publish-ci/expo/.prettierrc.json | 6 + examples/publish-ci/expo/App.tsx | 83 + .../publish-ci/expo/__tests__/App.test.tsx | 9 + .../expo/__tests__/counterSlice.test.ts | 37 + examples/publish-ci/expo/app.json | 30 + .../publish-ci/expo/assets/adaptive-icon.png | Bin 0 -> 17547 bytes examples/publish-ci/expo/assets/favicon.png | Bin 0 -> 1466 bytes examples/publish-ci/expo/assets/icon.png | Bin 0 -> 22380 bytes examples/publish-ci/expo/assets/splash.png | Bin 0 -> 47346 bytes examples/publish-ci/expo/babel.config.js | 7 + examples/publish-ci/expo/globals.d.ts | 13 + examples/publish-ci/expo/jest-setup.ts | 1 + examples/publish-ci/expo/jest.config.ts | 10 + examples/publish-ci/expo/package.json | 43 + examples/publish-ci/expo/src/app/hooks.ts | 46 + examples/publish-ci/expo/src/app/store.ts | 20 + .../expo/src/components/AsyncButton.tsx | 74 + .../publish-ci/expo/src/components/Header.tsx | 32 + .../expo/src/components/LearnReduxLinks.tsx | 110 + .../expo/src/components/Section.tsx | 46 + .../publish-ci/expo/src/components/logo.gif | Bin 0 -> 5961 bytes .../expo/src/constants/TypedColors.ts | 13 + .../expo/src/features/counter/Counter.tsx | 112 + .../expo/src/features/counter/counterAPI.ts | 8 + .../expo/src/features/counter/counterSlice.ts | 88 + examples/publish-ci/expo/tsconfig.json | 6 + examples/publish-ci/expo/yarn.lock | 12970 ++++++++++++++++ 29 files changed, 13841 insertions(+) create mode 100644 examples/publish-ci/expo/.eslintrc.json create mode 100644 examples/publish-ci/expo/.gitignore create mode 100644 examples/publish-ci/expo/.prettierrc.json create mode 100644 examples/publish-ci/expo/App.tsx create mode 100644 examples/publish-ci/expo/__tests__/App.test.tsx create mode 100644 examples/publish-ci/expo/__tests__/counterSlice.test.ts create mode 100644 examples/publish-ci/expo/app.json create mode 100644 examples/publish-ci/expo/assets/adaptive-icon.png create mode 100644 examples/publish-ci/expo/assets/favicon.png create mode 100644 examples/publish-ci/expo/assets/icon.png create mode 100644 examples/publish-ci/expo/assets/splash.png create mode 100644 examples/publish-ci/expo/babel.config.js create mode 100644 examples/publish-ci/expo/globals.d.ts create mode 100644 examples/publish-ci/expo/jest-setup.ts create mode 100644 examples/publish-ci/expo/jest.config.ts create mode 100644 examples/publish-ci/expo/package.json create mode 100644 examples/publish-ci/expo/src/app/hooks.ts create mode 100644 examples/publish-ci/expo/src/app/store.ts create mode 100644 examples/publish-ci/expo/src/components/AsyncButton.tsx create mode 100644 examples/publish-ci/expo/src/components/Header.tsx create mode 100644 examples/publish-ci/expo/src/components/LearnReduxLinks.tsx create mode 100644 examples/publish-ci/expo/src/components/Section.tsx create mode 100644 examples/publish-ci/expo/src/components/logo.gif create mode 100644 examples/publish-ci/expo/src/constants/TypedColors.ts create mode 100644 examples/publish-ci/expo/src/features/counter/Counter.tsx create mode 100644 examples/publish-ci/expo/src/features/counter/counterAPI.ts create mode 100644 examples/publish-ci/expo/src/features/counter/counterSlice.ts create mode 100644 examples/publish-ci/expo/tsconfig.json create mode 100644 examples/publish-ci/expo/yarn.lock diff --git a/examples/publish-ci/expo/.eslintrc.json b/examples/publish-ci/expo/.eslintrc.json new file mode 100644 index 0000000000..ea90cb7be3 --- /dev/null +++ b/examples/publish-ci/expo/.eslintrc.json @@ -0,0 +1,41 @@ +{ + "extends": [ + "eslint:recommended", + "@react-native", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/strict-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked", + "plugin:react/jsx-runtime" + ], + "ignorePatterns": [ + "node_modules", + ".vscode", + "dist", + "metro.config.js", + "assets", + ".expo", + ".expo-shared", + "webpack.config.ts" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": true, + "tsconfigRootDir": "./" + }, + "plugins": ["@typescript-eslint"], + "root": true, + "rules": { + "@typescript-eslint/consistent-type-imports": [ + 2, + { + "fixStyle": "separate-type-imports" + } + ] + }, + "overrides": [ + { + "files": ["./__tests__/**/*.ts", "./__tests__/**/*.tsx"], + "env": { "jest": true } + } + ] +} diff --git a/examples/publish-ci/expo/.gitignore b/examples/publish-ci/expo/.gitignore new file mode 100644 index 0000000000..6265ed09f1 --- /dev/null +++ b/examples/publish-ci/expo/.gitignore @@ -0,0 +1,36 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ +.yarn/ + +# Expo +.expo/ +dist/ +web-build/ + +# Native +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo diff --git a/examples/publish-ci/expo/.prettierrc.json b/examples/publish-ci/expo/.prettierrc.json new file mode 100644 index 0000000000..358db5d90f --- /dev/null +++ b/examples/publish-ci/expo/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "arrowParens": "avoid", + "bracketSameLine": true, + "singleQuote": true, + "trailingComma": "all" +} diff --git a/examples/publish-ci/expo/App.tsx b/examples/publish-ci/expo/App.tsx new file mode 100644 index 0000000000..25f67c355f --- /dev/null +++ b/examples/publish-ci/expo/App.tsx @@ -0,0 +1,83 @@ +import type { FC } from 'react'; +import { + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + View, + useColorScheme, +} from 'react-native'; +import { Provider } from 'react-redux'; +import { store } from './src/app/store'; +import { Counter } from './src/features/counter/Counter'; + +import { + DebugInstructions, + HermesBadge, + LearnMoreLinks, + ReloadInstructions, +} from 'react-native/Libraries/NewAppScreen'; +import { Header } from './src/components/Header'; +import { LearnReduxLinks } from './src/components/LearnReduxLinks'; +import { Section } from './src/components/Section'; +import { TypedColors } from './src/constants/TypedColors'; + +export const App: FC = () => { + const isDarkMode = useColorScheme() === 'dark'; + + const backgroundStyle = { + backgroundColor: isDarkMode ? TypedColors.darker : TypedColors.lighter, + }; + + return ( + + + + +
+ + + +
+ Edit App.tsx to change this + screen and then come back to see your edits. +
+
+ +
+
+ +
+
+ Discover what to do next with Redux: +
+ +
+ Read the docs to discover what to do next: +
+ +
+ + + + ); +}; + +const styles = StyleSheet.create({ + highlight: { + fontWeight: '700', + }, +}); + +export default App; diff --git a/examples/publish-ci/expo/__tests__/App.test.tsx b/examples/publish-ci/expo/__tests__/App.test.tsx new file mode 100644 index 0000000000..452785a21d --- /dev/null +++ b/examples/publish-ci/expo/__tests__/App.test.tsx @@ -0,0 +1,9 @@ +import { render } from '@testing-library/react-native'; +import renderer from 'react-test-renderer'; +import { App } from '../App'; + +test('renders correctly', () => { + renderer.create(); + const element = render(); + expect(element).toBeDefined(); +}); diff --git a/examples/publish-ci/expo/__tests__/counterSlice.test.ts b/examples/publish-ci/expo/__tests__/counterSlice.test.ts new file mode 100644 index 0000000000..107f3549bb --- /dev/null +++ b/examples/publish-ci/expo/__tests__/counterSlice.test.ts @@ -0,0 +1,37 @@ +import type { CounterState } from '../src/features/counter/counterSlice'; +import { + counterSlice, + decrement, + increment, + incrementByAmount, +} from '../src/features/counter/counterSlice'; + +describe('counter reducer', () => { + const { reducer: counterReducer } = counterSlice; + const initialState: CounterState = { + value: 3, + status: 'idle', + }; + + test('should handle initial state', () => { + expect(counterReducer(undefined, { type: 'unknown' })).toStrictEqual({ + value: 0, + status: 'idle', + }); + }); + + test('should handle increment', () => { + const actual = counterReducer(initialState, increment()); + expect(actual.value).toBe(4); + }); + + test('should handle decrement', () => { + const actual = counterReducer(initialState, decrement()); + expect(actual.value).toBe(2); + }); + + test('should handle incrementByAmount', () => { + const actual = counterReducer(initialState, incrementByAmount(2)); + expect(actual.value).toBe(5); + }); +}); diff --git a/examples/publish-ci/expo/app.json b/examples/publish-ci/expo/app.json new file mode 100644 index 0000000000..72424b2065 --- /dev/null +++ b/examples/publish-ci/expo/app.json @@ -0,0 +1,30 @@ +{ + "expo": { + "name": "expo-template-redux-typescript", + "slug": "expo-template-redux-typescript", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "userInterfaceStyle": "light", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/adaptive-icon.png", + "backgroundColor": "#ffffff" + } + }, + "web": { + "favicon": "./assets/favicon.png" + } + } +} diff --git a/examples/publish-ci/expo/assets/adaptive-icon.png b/examples/publish-ci/expo/assets/adaptive-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..03d6f6b6c6727954aec1d8206222769afd178d8d GIT binary patch literal 17547 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 literal 0 HcmV?d00001 diff --git a/examples/publish-ci/expo/assets/icon.png b/examples/publish-ci/expo/assets/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a0b1526fc7b78680fd8d733dbc6113e1af695487 GIT binary patch literal 22380 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 literal 0 HcmV?d00001 diff --git a/examples/publish-ci/expo/assets/splash.png b/examples/publish-ci/expo/assets/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..0e89705a9436743e42954d3744a0e7ff0d3d4701 GIT binary patch literal 47346 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 literal 0 HcmV?d00001 diff --git a/examples/publish-ci/expo/babel.config.js b/examples/publish-ci/expo/babel.config.js new file mode 100644 index 0000000000..9b5c970eae --- /dev/null +++ b/examples/publish-ci/expo/babel.config.js @@ -0,0 +1,7 @@ +/** @type {import('@babel/core').ConfigFunction} */ +module.exports = api => { + api.cache.forever(); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/examples/publish-ci/expo/globals.d.ts b/examples/publish-ci/expo/globals.d.ts new file mode 100644 index 0000000000..c0ce308d48 --- /dev/null +++ b/examples/publish-ci/expo/globals.d.ts @@ -0,0 +1,13 @@ +declare module '*.gif' { + const logo: number; + export default logo; +} + +declare module 'react-native/Libraries/NewAppScreen' { + import type { FC } from 'react'; + export const HermesBadge: FC; +} + +declare module 'react-native/Libraries/Core/Devtools/openURLInBrowser' { + export default function openURLInBrowser(url: string): void; +} diff --git a/examples/publish-ci/expo/jest-setup.ts b/examples/publish-ci/expo/jest-setup.ts new file mode 100644 index 0000000000..1d3ff30752 --- /dev/null +++ b/examples/publish-ci/expo/jest-setup.ts @@ -0,0 +1 @@ +import '@testing-library/react-native/extend-expect'; diff --git a/examples/publish-ci/expo/jest.config.ts b/examples/publish-ci/expo/jest.config.ts new file mode 100644 index 0000000000..1897e3a31b --- /dev/null +++ b/examples/publish-ci/expo/jest.config.ts @@ -0,0 +1,10 @@ +import type { Config } from 'jest'; + +const config: Config = { + preset: 'jest-expo', + testEnvironment: 'node', + setupFilesAfterEnv: ['./jest-setup.ts'], + fakeTimers: { enableGlobally: true }, +}; + +export default config; diff --git a/examples/publish-ci/expo/package.json b/examples/publish-ci/expo/package.json new file mode 100644 index 0000000000..d6ee7e9374 --- /dev/null +++ b/examples/publish-ci/expo/package.json @@ -0,0 +1,43 @@ +{ + "name": "expo-template-redux-typescript", + "version": "1.0.0", + "main": "node_modules/expo/AppEntry.js", + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "web": "expo start --web", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "format": "prettier --write \"./**/*.{js,ts,tsx}\"", + "test": "jest", + "type-check": "tsc --noEmit" + }, + "dependencies": { + "@reduxjs/toolkit": "^2.0.1", + "expo": "~49.0.15", + "expo-status-bar": "~1.6.0", + "react": "18.2.0", + "react-native": "0.72.6", + "react-redux": "^9.0.4" + }, + "devDependencies": { + "@babel/core": "^7.20.0", + "@react-native/eslint-config": "^0.74.0", + "@testing-library/react-native": "^12.4.1", + "@types/babel__core": "^7.20.5", + "@types/jest": "^29.5.11", + "@types/react": "~18.2.14", + "@types/react-test-renderer": "^18.0.7", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "eslint": "^8.56.0", + "eslint-plugin-prettier": "^5.0.1", + "jest": "^29.7.0", + "jest-expo": "^49.0.0", + "prettier": "^3.1.1", + "ts-node": "^10.9.2", + "typescript": "^5.1.3" + }, + "private": true +} diff --git a/examples/publish-ci/expo/src/app/hooks.ts b/examples/publish-ci/expo/src/app/hooks.ts new file mode 100644 index 0000000000..fe7b5087f8 --- /dev/null +++ b/examples/publish-ci/expo/src/app/hooks.ts @@ -0,0 +1,46 @@ +import { useEffect, useRef } from 'react'; +import { Animated, useWindowDimensions } from 'react-native'; +import type { TypedUseSelectorHook } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; +import type { AppDispatch, RootState } from './store'; + +// Use throughout your app instead of plain `useDispatch` and `useSelector` +export const useAppDispatch: () => AppDispatch = useDispatch; +export const useAppSelector: TypedUseSelectorHook = useSelector; + +export const useViewportUnits = () => { + const { width, height } = useWindowDimensions(); + + const vh = height / 100; + const vw = width / 100; + + return { vh, vw }; +}; + +export const useBounceAnimation = (value = 10) => { + const bounce = useRef(new Animated.Value(0)).current; + + bounce.interpolate({ + inputRange: [-300, -100, 0, 100, 101], + outputRange: [300, 0, 1, 0, 0], + }); + + useEffect(() => { + Animated.loop( + Animated.sequence([ + Animated.timing(bounce, { + toValue: value, + duration: 1500, + useNativeDriver: true, + }), + Animated.timing(bounce, { + toValue: 0, + duration: 1500, + useNativeDriver: true, + }), + ]), + ).start(); + }, [bounce, value]); + + return bounce; +}; diff --git a/examples/publish-ci/expo/src/app/store.ts b/examples/publish-ci/expo/src/app/store.ts new file mode 100644 index 0000000000..0191c5c97b --- /dev/null +++ b/examples/publish-ci/expo/src/app/store.ts @@ -0,0 +1,20 @@ +import type { Action, ThunkAction } from '@reduxjs/toolkit'; +import { configureStore } from '@reduxjs/toolkit'; +import { counterSlice } from '../features/counter/counterSlice'; + +export const store = configureStore({ + reducer: { + [counterSlice.reducerPath]: counterSlice.reducer, + }, +}); + +// Infer the `RootState` and `AppDispatch` types from the store itself +export type RootState = ReturnType; +// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} +export type AppDispatch = typeof store.dispatch; +export type AppThunk = ThunkAction< + ReturnType, + RootState, + unknown, + Action +>; diff --git a/examples/publish-ci/expo/src/components/AsyncButton.tsx b/examples/publish-ci/expo/src/components/AsyncButton.tsx new file mode 100644 index 0000000000..98ae2c564e --- /dev/null +++ b/examples/publish-ci/expo/src/components/AsyncButton.tsx @@ -0,0 +1,74 @@ +import type { FC, PropsWithChildren } from 'react'; +import { useRef } from 'react'; +import type { + GestureResponderEvent, + PressableProps, + ViewStyle, +} from 'react-native'; +import { Animated, Pressable, StyleSheet, View } from 'react-native'; + +type AsyncButtonProps = PressableProps & PropsWithChildren; + +export const AsyncButton: FC = ({ + onPress, + style, + children, + ...restProps +}) => { + const progress = useRef(new Animated.Value(0)).current; + const opacity = useRef(new Animated.Value(1)).current; + + const _onPress = (e: GestureResponderEvent) => { + progress.setValue(0); + opacity.setValue(1); + + onPress?.(e); + + // TODO: Maybe change to Animated.sequence + Animated.timing(progress, { + toValue: 1, + duration: 1000, + useNativeDriver: false, + }).start(({ finished }) => { + if (!finished) { + return; + } + + Animated.timing(opacity, { + toValue: 0, + duration: 200, + useNativeDriver: false, + }).start(); + }); + }; + + const progressInterpolate = progress.interpolate({ + inputRange: [0, 1], + outputRange: ['0%', '100%'], + extrapolate: 'clamp', + }); + + const progressStyle: Animated.WithAnimatedObject = { + width: progressInterpolate, + opacity, + }; + + return ( + + + + + {children} + + ); +}; + +const styles = StyleSheet.create({ + progress: { + position: 'absolute', + top: 0, + bottom: 0, + left: 0, + backgroundColor: 'rgba(112,76,182, 0.15)', + }, +}); diff --git a/examples/publish-ci/expo/src/components/Header.tsx b/examples/publish-ci/expo/src/components/Header.tsx new file mode 100644 index 0000000000..0cfd4f3f1f --- /dev/null +++ b/examples/publish-ci/expo/src/components/Header.tsx @@ -0,0 +1,32 @@ +import { Animated, StyleSheet, View, useColorScheme } from 'react-native'; +import { useBounceAnimation, useViewportUnits } from '../app/hooks'; +import { TypedColors } from '../constants/TypedColors'; +import logo from './logo.gif'; + +export const Header = () => { + const isDarkMode = useColorScheme() === 'dark'; + const { vh } = useViewportUnits(); + const bounce = useBounceAnimation(); + const height = 40 * vh; + + return ( + + + + ); +}; + +const styles = StyleSheet.create({ + container: { + flexDirection: 'row', + justifyContent: 'center', + }, +}); diff --git a/examples/publish-ci/expo/src/components/LearnReduxLinks.tsx b/examples/publish-ci/expo/src/components/LearnReduxLinks.tsx new file mode 100644 index 0000000000..318aae0d1b --- /dev/null +++ b/examples/publish-ci/expo/src/components/LearnReduxLinks.tsx @@ -0,0 +1,110 @@ +import type { FC } from 'react'; +import React from 'react'; +import { + StyleSheet, + Text, + TouchableOpacity, + View, + useColorScheme, +} from 'react-native'; +import openURLInBrowser from 'react-native/Libraries/Core/Devtools/openURLInBrowser'; +import { TypedColors } from '../constants/TypedColors'; + +interface Link { + title: string; + link: string; + description: string; +} + +const links: Link[] = [ + { + title: 'React', + link: 'https://reactjs.org/', + description: 'JavaScript library for building user interfaces', + }, + { + title: 'Redux', + link: 'https://redux.js.org/', + description: 'A Predictable State Container for JS Apps', + }, + { + title: 'Redux Toolkit', + link: 'https://redux-toolkit.js.org/', + description: + 'The official, opinionated, batteries-included toolset for efficient Redux development', + }, + { + title: 'React Redux', + link: 'https://react-redux.js.org', + description: 'Official React bindings for Redux', + }, +]; + +export const LearnReduxLinks: FC = () => { + const isDarkMode = useColorScheme() === 'dark'; + + return ( + + {links.map((item, index) => { + return ( + + + { + openURLInBrowser(item.link); + }} + style={styles.linkContainer}> + {item.title} + + {item.description} + + + + ); + })} + + ); +}; + +const styles = StyleSheet.create({ + container: { + marginTop: 32, + paddingHorizontal: 24, + }, + linkContainer: { + flexWrap: 'wrap', + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + paddingVertical: 8, + }, + link: { + flex: 2, + fontSize: 18, + fontWeight: '400', + color: TypedColors.primary, + }, + description: { + flex: 3, + paddingVertical: 16, + fontWeight: '400', + fontSize: 18, + }, + separator: { + height: 1, + }, +}); diff --git a/examples/publish-ci/expo/src/components/Section.tsx b/examples/publish-ci/expo/src/components/Section.tsx new file mode 100644 index 0000000000..84eb4995d8 --- /dev/null +++ b/examples/publish-ci/expo/src/components/Section.tsx @@ -0,0 +1,46 @@ +import type { FC, PropsWithChildren } from 'react'; +import { StyleSheet, Text, View, useColorScheme } from 'react-native'; +import { TypedColors } from '../constants/TypedColors'; + +type SectionProps = PropsWithChildren<{ + title: string; +}>; + +export const Section: FC = ({ children, title }) => { + const isDarkMode = useColorScheme() === 'dark'; + + return ( + + + {title} + + + {children} + + + ); +}; + +const styles = StyleSheet.create({ + sectionContainer: { + marginTop: 32, + paddingHorizontal: 24, + }, + sectionTitle: { + fontSize: 24, + fontWeight: '600', + }, + sectionDescription: { + marginTop: 8, + fontSize: 18, + fontWeight: '400', + }, +}); diff --git a/examples/publish-ci/expo/src/components/logo.gif b/examples/publish-ci/expo/src/components/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..f0722c62fed6b5985b739f53a23109b588c6cab3 GIT binary patch literal 5961 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 { + const [incrementAmount, setIncrementAmount] = useState('2'); + const count = useAppSelector(selectCount); + const status = useAppSelector(state => state.counter.status); + const dispatch = useAppDispatch(); + + const incrementValue = Number(incrementAmount) || 0; + + return ( + + + dispatch(increment())}> + + + + {count} + dispatch(decrement())}> + - + + + + + + dispatch(incrementByAmount(incrementValue))}> + Add Amount + + { + dispatch(incrementAsync(incrementValue)).catch(console.log); + }}> + Add Async + + { + dispatch(incrementIfOdd(incrementValue)); + }}> + Add If Odd + + + + + ); +}; + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + flexWrap: 'wrap', + }, + value: { + fontSize: 78, + paddingHorizontal: 16, + marginTop: 2, + }, + button: { + backgroundColor: 'rgba(112, 76, 182, 0.1)', + borderRadius: 2, + paddingLeft: 12, + paddingRight: 12, + paddingBottom: 4, + margin: 2, + }, + buttonText: { + color: 'rgb(112, 76, 182)', + fontSize: 32, + textAlign: 'center', + }, + textbox: { + fontSize: 48, + padding: 2, + width: 64, + textAlign: 'center', + marginRight: 8, + borderWidth: 1, + justifyContent: 'center', + }, +}); diff --git a/examples/publish-ci/expo/src/features/counter/counterAPI.ts b/examples/publish-ci/expo/src/features/counter/counterAPI.ts new file mode 100644 index 0000000000..c5b686e81d --- /dev/null +++ b/examples/publish-ci/expo/src/features/counter/counterAPI.ts @@ -0,0 +1,8 @@ +// A mock function to mimic making an async request for data +export const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>(resolve => + setTimeout(() => { + resolve({ data: amount }); + }, 500), + ); +}; diff --git a/examples/publish-ci/expo/src/features/counter/counterSlice.ts b/examples/publish-ci/expo/src/features/counter/counterSlice.ts new file mode 100644 index 0000000000..d3e0750f1b --- /dev/null +++ b/examples/publish-ci/expo/src/features/counter/counterSlice.ts @@ -0,0 +1,88 @@ +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; +import type { AppThunk } from '../../app/store'; +import { fetchCount } from './counterAPI'; + +export interface CounterState { + value: number; + status: 'idle' | 'loading' | 'failed'; +} + +const initialState: CounterState = { + value: 0, + status: 'idle', +}; + +// The function below is called a thunk and allows us to perform async logic. It +// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This +// will call the thunk with the `dispatch` function as the first argument. Async +// code can then be executed and other actions can be dispatched. Thunks are +// typically used to make async requests. +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount); + // The value we return becomes the `fulfilled` action payload + return response.data; + }, +); + +export const counterSlice = createSlice({ + name: 'counter', + // `createSlice` will infer the state type from the `initialState` argument + initialState, + // The `reducers` field lets us define reducers and generate associated actions + reducers: { + increment: state => { + // Redux Toolkit allows us to write "mutating" logic in reducers. It + // doesn't actually mutate the state because it uses the Immer library, + // which detects changes to a "draft state" and produces a brand new + // immutable state based off those changes + state.value += 1; + }, + decrement: state => { + state.value -= 1; + }, + // Use the `PayloadAction` type to declare the contents of `action.payload` + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload; + }, + }, + + // The `extraReducers` field lets the slice handle actions defined elsewhere, + // including actions generated by createAsyncThunk or in other slices. + extraReducers: builder => { + builder + .addCase(incrementAsync.pending, state => { + state.status = 'loading'; + }) + .addCase(incrementAsync.fulfilled, (state, action) => { + state.status = 'idle'; + state.value += action.payload; + }) + .addCase(incrementAsync.rejected, state => { + state.status = 'failed'; + }); + }, + + selectors: { + selectCount: counter => counter.value, + }, +}); + +// Action creators are generated for each case reducer function +export const { increment, decrement, incrementByAmount } = counterSlice.actions; + +// Other code such as selectors can use the imported `RootState` type +export const { selectCount } = counterSlice.selectors; + +// We can also write thunks by hand, which may contain both sync and async logic. +// Here's an example of conditionally dispatching actions based on current state. +export const incrementIfOdd = + (amount: number): AppThunk => + (dispatch, getState) => { + const currentValue = selectCount(getState()); + if (currentValue % 2 === 1) { + dispatch(incrementByAmount(amount)); + } + }; diff --git a/examples/publish-ci/expo/tsconfig.json b/examples/publish-ci/expo/tsconfig.json new file mode 100644 index 0000000000..b9567f6052 --- /dev/null +++ b/examples/publish-ci/expo/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "expo/tsconfig.base", + "compilerOptions": { + "strict": true + } +} diff --git a/examples/publish-ci/expo/yarn.lock b/examples/publish-ci/expo/yarn.lock new file mode 100644 index 0000000000..d06307ddf1 --- /dev/null +++ b/examples/publish-ci/expo/yarn.lock @@ -0,0 +1,12970 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@0no-co/graphql.web@npm:^1.0.1": + version: 1.0.4 + resolution: "@0no-co/graphql.web@npm:1.0.4" + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + peerDependenciesMeta: + graphql: + optional: true + checksum: d415fb2f063a024e2d382e8dc5e66929d0d9bf94f2c22e03cde201dc2fa03e15d21274dbe5c23a26ce016a4cac3db93ad99fb454de76fd94bc1600fd7062eebe + languageName: node + linkType: hard + +"@aashutoshrathi/word-wrap@npm:^1.2.3": + version: 1.2.6 + resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" + checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd + languageName: node + linkType: hard + +"@ampproject/remapping@npm:^2.2.0": + version: 2.2.1 + resolution: "@ampproject/remapping@npm:2.2.1" + dependencies: + "@jridgewell/gen-mapping": ^0.3.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 + languageName: node + linkType: hard + +"@babel/code-frame@npm:7.10.4, @babel/code-frame@npm:~7.10.4": + version: 7.10.4 + resolution: "@babel/code-frame@npm:7.10.4" + dependencies: + "@babel/highlight": ^7.10.4 + checksum: feb4543c8a509fe30f0f6e8d7aa84f82b41148b963b826cd330e34986f649a85cb63b2f13dd4effdf434ac555d16f14940b8ea5f4433297c2f5ff85486ded019 + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/code-frame@npm:7.23.5" + dependencies: + "@babel/highlight": ^7.23.4 + chalk: ^2.4.2 + checksum: d90981fdf56a2824a9b14d19a4c0e8db93633fd488c772624b4e83e0ceac6039a27cd298a247c3214faa952bf803ba23696172ae7e7235f3b97f43ba278c569a + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/compat-data@npm:7.23.5" + checksum: 06ce244cda5763295a0ea924728c09bae57d35713b675175227278896946f922a63edf803c322f855a3878323d48d0255a2a3023409d2a123483c8a69ebb4744 + languageName: node + linkType: hard + +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.0": + version: 7.23.6 + resolution: "@babel/core@npm:7.23.6" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helpers": ^7.23.6 + "@babel/parser": ^7.23.6 + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.6 + "@babel/types": ^7.23.6 + convert-source-map: ^2.0.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 4bddd1b80394a64b2ee33eeb216e8a2a49ad3d74f0ca9ba678c84a37f4502b2540662d72530d78228a2a349fda837fa852eea5cd3ae28465d1188acc6055868e + languageName: node + linkType: hard + +"@babel/eslint-parser@npm:^7.20.0": + version: 7.23.3 + resolution: "@babel/eslint-parser@npm:7.23.3" + dependencies: + "@nicolo-ribaudo/eslint-scope-5-internals": 5.1.1-v1 + eslint-visitor-keys: ^2.1.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.11.0 + eslint: ^7.5.0 || ^8.0.0 + checksum: 9573daebe21af5123c302c307be80cacf1c2bf236a9497068a14726d3944ef55e1282519d0ccf51882dfc369359a3442299c98cb22a419e209924db39d4030fd + languageName: node + linkType: hard + +"@babel/generator@npm:^7.20.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2": + version: 7.23.6 + resolution: "@babel/generator@npm:7.23.6" + dependencies: + "@babel/types": ^7.23.6 + "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 + jsesc: ^2.5.1 + checksum: 1a1a1c4eac210f174cd108d479464d053930a812798e09fee069377de39a893422df5b5b146199ead7239ae6d3a04697b45fc9ac6e38e0f6b76374390f91fc6c + languageName: node + linkType: hard + +"@babel/helper-annotate-as-pure@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d + languageName: node + linkType: hard + +"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: 639c697a1c729f9fafa2dd4c9af2e18568190299b5907bd4c2d0bc818fcbd1e83ffeecc2af24327a7faa7ac4c34edd9d7940510a5e66296c19bad17001cf5c7a + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" + dependencies: + "@babel/compat-data": ^7.23.5 + "@babel/helper-validator-option": ^7.23.5 + browserslist: ^4.22.2 + lru-cache: ^5.1.1 + semver: ^6.3.1 + checksum: c630b98d4527ac8fe2c58d9a06e785dfb2b73ec71b7c4f2ddf90f814b5f75b547f3c015f110a010fd31f76e3864daaf09f3adcd2f6acdbfb18a8de3a48717590 + languageName: node + linkType: hard + +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-member-expression-to-functions": ^7.23.0 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 356b71b9f4a3a95917432bf6a452f475a292d394d9310e9c8b23c8edb564bee91e40d4290b8aa8779d2987a7c39ae717b2d76edc7c952078b8952df1a20259e3 + languageName: node + linkType: hard + +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.15, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + regexpu-core: ^5.3.1 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 0243b8d4854f1dc8861b1029a46d3f6393ad72f366a5a08e36a4648aa682044f06da4c6e87a456260e1e1b33c999f898ba591a0760842c1387bcc93fbf2151a6 + languageName: node + linkType: hard + +"@babel/helper-define-polyfill-provider@npm:^0.4.4": + version: 0.4.4 + resolution: "@babel/helper-define-polyfill-provider@npm:0.4.4" + dependencies: + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-plugin-utils": ^7.22.5 + debug: ^4.1.1 + lodash.debounce: ^4.0.8 + resolve: ^1.14.2 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 2453cdd79f18a4cb8653d8a7e06b2eb0d8e31bae0d35070fc5abadbddca246a36d82b758064b421cca49b48d0e696d331d54520ba8582c1d61fb706d6d831817 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.22.5, @babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": ^7.22.15 + "@babel/types": ^7.23.0 + checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + languageName: node + linkType: hard + +"@babel/helper-member-expression-to-functions@npm:^7.22.15, @babel/helper-member-expression-to-functions@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" + dependencies: + "@babel/types": ^7.23.0 + checksum: 494659361370c979ada711ca685e2efe9460683c36db1b283b446122596602c901e291e09f2f980ecedfe6e0f2bd5386cb59768285446530df10c14df1024e75 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-module-imports@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: ecd7e457df0a46f889228f943ef9b4a47d485d82e030676767e6a2fdcbdaa63594d8124d4b55fd160b41c201025aec01fc27580352b1c87a37c9c6f33d116702 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/helper-module-transforms@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 + languageName: node + linkType: hard + +"@babel/helper-optimise-call-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: c0fc7227076b6041acd2f0e818145d2e8c41968cc52fb5ca70eed48e21b8fe6dd88a0a91cbddf4951e33647336eb5ae184747ca706817ca3bef5e9e905151ff5 + languageName: node + linkType: hard + +"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-wrap-function": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 + languageName: node + linkType: hard + +"@babel/helper-replace-supers@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-simple-access@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: fe9686714caf7d70aedb46c3cce090f8b915b206e09225f1e4dbc416786c2fdbbee40b38b23c268b7ccef749dd2db35f255338fb4f2444429874d900dede5ad2 + languageName: node + linkType: hard + +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" + dependencies: + "@babel/types": ^7.22.5 + checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/helper-string-parser@npm:7.23.4" + checksum: c0641144cf1a7e7dc93f3d5f16d5327465b6cf5d036b48be61ecba41e1eece161b48f46b7f960951b67f8c3533ce506b16dece576baef4d8b3b49f8c65410f90 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + +"@babel/helper-wrap-function@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-wrap-function@npm:7.22.20" + dependencies: + "@babel/helper-function-name": ^7.22.5 + "@babel/template": ^7.22.15 + "@babel/types": ^7.22.19 + checksum: 221ed9b5572612aeb571e4ce6a256f2dee85b3c9536f1dd5e611b0255e5f59a3d0ec392d8d46d4152149156a8109f92f20379b1d6d36abb613176e0e33f05fca + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helpers@npm:7.23.6" + dependencies: + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.6 + "@babel/types": ^7.23.6 + checksum: c5ba62497e1d717161d107c4b3de727565c68b6b9f50f59d6298e613afeca8895799b227c256e06d362e565aec34e26fb5c675b9c3d25055c52b945a21c21e21 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/highlight@npm:7.23.4" + dependencies: + "@babel/helper-validator-identifier": ^7.22.20 + chalk: ^2.4.2 + js-tokens: ^4.0.0 + checksum: 643acecdc235f87d925979a979b539a5d7d1f31ae7db8d89047269082694122d11aa85351304c9c978ceeb6d250591ccadb06c366f358ccee08bb9c122476b89 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/parser@npm:7.23.6" + bin: + parser: ./bin/babel-parser.js + checksum: 140801c43731a6c41fd193f5c02bc71fd647a0360ca616b23d2db8be4b9739b9f951a03fc7c2db4f9b9214f4b27c1074db0f18bc3fa653783082d5af7c8860d5 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: ddbaf2c396b7780f15e80ee01d6dd790db076985f3dfeb6527d1a8d4cacf370e49250396a3aa005b2c40233cac214a106232f83703d5e8491848bde273938232 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-transform-optional-chaining": ^7.23.3 + peerDependencies: + "@babel/core": ^7.13.0 + checksum: 434b9d710ae856fa1a456678cc304fbc93915af86d581ee316e077af746a709a741ea39d7e1d4f5b98861b629cc7e87f002d3138f5e836775632466d4c74aef2 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 4690123f0ef7c11d6bf1a9579e4f463ce363563b75ec3f6ca66cf68687e39d8d747a82c833847653962f79da367eca895d9095c60d8ebb224a1d4277003acc11 + languageName: node + linkType: hard + +"@babel/plugin-proposal-async-generator-functions@npm:^7.0.0": + version: 7.20.7 + resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-remap-async-to-generator": ^7.18.9 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 111109ee118c9e69982f08d5e119eab04190b36a0f40e22e873802d941956eee66d2aa5a15f5321e51e3f9aa70a91136451b987fe15185ef8cc547ac88937723 + languageName: node + linkType: hard + +"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 49a78a2773ec0db56e915d9797e44fd079ab8a9b2e1716e0df07c92532f2c65d76aeda9543883916b8e0ff13606afeffa67c5b93d05b607bc87653ad18a91422 + languageName: node + linkType: hard + +"@babel/plugin-proposal-decorators@npm:^7.12.9": + version: 7.23.6 + resolution: "@babel/plugin-proposal-decorators@npm:7.23.6" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/plugin-syntax-decorators": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9d69891e0c37c73a8fd5deafbf42bd82e727f96a779cf1e5e194d97f856e04e79d2d39081c48ffcea596e6ff95024016479d728772e692999ab5af74d4106f27 + languageName: node + linkType: hard + +"@babel/plugin-proposal-export-default-from@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-proposal-export-default-from@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-default-from": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f5a438413b8728cbf5a76ef65510418e5e2e1c82292ee4a031a0c941bee488f7e7dec960c1fd314a42bfadf40ffa9a4ef5c1aa1b3c906b9bc140d4530e7bc8be + languageName: node + linkType: hard + +"@babel/plugin-proposal-export-namespace-from@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/plugin-proposal-export-namespace-from@npm:7.18.9" + dependencies: + "@babel/helper-plugin-utils": ^7.18.9 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 84ff22bacc5d30918a849bfb7e0e90ae4c5b8d8b65f2ac881803d1cf9068dffbe53bd657b0e4bc4c20b4db301b1c85f1e74183cf29a0dd31e964bd4e97c363ef + languageName: node + linkType: hard + +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 949c9ddcdecdaec766ee610ef98f965f928ccc0361dd87cf9f88cf4896a6ccd62fce063d4494778e50da99dea63d270a1be574a62d6ab81cbe9d85884bf55a7d + languageName: node + linkType: hard + +"@babel/plugin-proposal-numeric-separator@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec + languageName: node + linkType: hard + +"@babel/plugin-proposal-object-rest-spread@npm:^7.0.0, @babel/plugin-proposal-object-rest-spread@npm:^7.12.13, @babel/plugin-proposal-object-rest-spread@npm:^7.20.0": + version: 7.20.7 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" + dependencies: + "@babel/compat-data": ^7.20.5 + "@babel/helper-compilation-targets": ^7.20.7 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.20.7 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1329db17009964bc644484c660eab717cb3ca63ac0ab0f67c651a028d1bc2ead51dc4064caea283e46994f1b7221670a35cbc0b4beb6273f55e915494b5aa0b2 + languageName: node + linkType: hard + +"@babel/plugin-proposal-optional-catch-binding@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7b5b39fb5d8d6d14faad6cb68ece5eeb2fd550fb66b5af7d7582402f974f5bc3684641f7c192a5a57e0f59acfae4aada6786be1eba030881ddc590666eff4d1e + languageName: node + linkType: hard + +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.20.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 11c5449e01b18bb8881e8e005a577fa7be2fe5688e2382c8822d51f8f7005342a301a46af7b273b1f5645f9a7b894c428eee8526342038a275ef6ba4c8d8d746 + languageName: node + linkType: hard + +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d97745d098b835d55033ff3a7fb2b895b9c5295b08a5759e4f20df325aa385a3e0bc9bd5ad8f2ec554a44d4e6525acfc257b8c5848a1345cb40f26a30e277e91 + languageName: node + linkType: hard + +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 + languageName: node + linkType: hard + +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-properties@npm:^7.0.0, @babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" + dependencies: + "@babel/helper-plugin-utils": ^7.12.13 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-static-block@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 + languageName: node + linkType: hard + +"@babel/plugin-syntax-decorators@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-decorators@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 07f6e488df0a061428e02629af9a1908b2e8abdcac2e5cfaa267be66dc30897be6e29df7c7f952d33f3679f9585ac9fcf6318f9c827790ab0b0928d5514305cd + languageName: node + linkType: hard + +"@babel/plugin-syntax-dynamic-import@npm:^7.8.0, @babel/plugin-syntax-dynamic-import@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd + languageName: node + linkType: hard + +"@babel/plugin-syntax-export-default-from@npm:^7.0.0, @babel/plugin-syntax-export-default-from@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-export-default-from@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 415b752a4c096e1eb65328b5dddde4848178f992356ab058828dfb12267c00f0880b4a4a272edf51f6344af1cc1565ea6dc184063e9454acf3160b9b1a9ef669 + languageName: node + linkType: hard + +"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a + languageName: node + linkType: hard + +"@babel/plugin-syntax-flow@npm:^7.0.0, @babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c6e6f355d6ace5f4a9e7bb19f1fed2398aeb9b62c4c671a189d81b124f9f5bb77c4225b6e85e19339268c60a021c1e49104e450375de5e6bb70612190d9678af + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-assertions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 883e6b35b2da205138caab832d54505271a3fee3fc1e8dc0894502434fc2b5d517cbe93bbfbfef8068a0fb6ec48ebc9eef3f605200a489065ba43d8cddc1c9a7 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-attributes@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9aed7661ffb920ca75df9f494757466ca92744e43072e0848d87fa4aa61a3f2ee5a22198ac1959856c036434b5614a8f46f1fb70298835dbe28220cdd1d4c11e + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b + languageName: node + linkType: hard + +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a + languageName: node + linkType: hard + +"@babel/plugin-syntax-jsx@npm:^7.0.0, @babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.23.3 + resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 89037694314a74e7f0e7a9c8d3793af5bf6b23d80950c29b360db1c66859d67f60711ea437e70ad6b5b4b29affe17eababda841b6c01107c2b638e0493bafb4e + languageName: node + linkType: hard + +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 + languageName: node + linkType: hard + +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.0.0, @babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-object-rest-spread@npm:^7.0.0, @babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-chaining@npm:^7.0.0, @babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": ^7.8.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 + languageName: node + linkType: hard + +"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda + languageName: node + linkType: hard + +"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e + languageName: node + linkType: hard + +"@babel/plugin-syntax-typescript@npm:^7.23.3, @babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.23.3 + resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: abfad3a19290d258b028e285a1f34c9b8a0cbe46ef79eafed4ed7ffce11b5d0720b5e536c82f91cbd8442cde35a3dd8e861fa70366d87ff06fdc0d4756e30876 + languageName: node + linkType: hard + +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c + languageName: node + linkType: hard + +"@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1e99118176e5366c2636064d09477016ab5272b2a92e78b8edb571d20bc3eaa881789a905b20042942c3c2d04efc530726cf703f937226db5ebc495f5d067e66 + languageName: node + linkType: hard + +"@babel/plugin-transform-async-generator-functions@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.4" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.20 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e2fc132c9033711d55209f4781e1fc73f0f4da5e0ca80a2da73dec805166b73c92a6e83571a8994cd2c893a28302e24107e90856202b24781bab734f800102bb + languageName: node + linkType: hard + +"@babel/plugin-transform-async-to-generator@npm:^7.20.0, @babel/plugin-transform-async-to-generator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" + dependencies: + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoped-functions@npm:^7.0.0, @babel/plugin-transform-block-scoped-functions@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e63b16d94ee5f4d917e669da3db5ea53d1e7e79141a2ec873c1e644678cdafe98daa556d0d359963c827863d6b3665d23d4938a94a4c5053a1619c4ebd01d020 + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoping@npm:^7.0.0, @babel/plugin-transform-block-scoping@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-block-scoping@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fc4b2100dd9f2c47d694b4b35ae8153214ccb4e24ef545c259a9db17211b18b6a430f22799b56db8f6844deaeaa201af45a03331d0c80cc28b0c4e3c814570e4 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-class-properties@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9c6f8366f667897541d360246de176dd29efc7a13d80a5b48361882f7173d9173be4646c3b7d9b003ccc0e01e25df122330308f33db921fa553aa17ad544b3fc + languageName: node + linkType: hard + +"@babel/plugin-transform-class-static-block@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-class-static-block@npm:7.23.4" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + peerDependencies: + "@babel/core": ^7.12.0 + checksum: c8bfaba19a674fc2eb54edad71e958647360474e3163e8226f1acd63e4e2dbec32a171a0af596c1dc5359aee402cc120fea7abd1fb0e0354b6527f0fc9e8aa1e + languageName: node + linkType: hard + +"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/plugin-transform-classes@npm:7.23.5" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-split-export-declaration": ^7.22.6 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6d0dd3b0828e84a139a51b368f33f315edee5688ef72c68ba25e0175c68ea7357f9c8810b3f61713e368a3063cdcec94f3a2db952e453b0b14ef428a34aa8169 + languageName: node + linkType: hard + +"@babel/plugin-transform-computed-properties@npm:^7.0.0, @babel/plugin-transform-computed-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-computed-properties@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/template": ^7.22.15 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 80452661dc25a0956f89fe98cb562e8637a9556fb6c00d312c57653ce7df8798f58d138603c7e1aad96614ee9ccd10c47e50ab9ded6b6eded5adeb230d2a982e + languageName: node + linkType: hard + +"@babel/plugin-transform-destructuring@npm:^7.0.0, @babel/plugin-transform-destructuring@npm:^7.20.0, @babel/plugin-transform-destructuring@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-destructuring@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9e015099877272501162419bfe781689aec5c462cd2aec752ee22288f209eec65969ff11b8fdadca2eaddea71d705d3bba5b9c60752fcc1be67874fcec687105 + languageName: node + linkType: hard + +"@babel/plugin-transform-dotall-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a2dbbf7f1ea16a97948c37df925cb364337668c41a3948b8d91453f140507bd8a3429030c7ce66d09c299987b27746c19a2dd18b6f17dcb474854b14fd9159a3 + languageName: node + linkType: hard + +"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c2a21c34dc0839590cd945192cbc46fde541a27e140c48fe1808315934664cdbf18db64889e23c4eeb6bad9d3e049482efdca91d29de5734ffc887c4fbabaa16 + languageName: node + linkType: hard + +"@babel/plugin-transform-dynamic-import@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 57a722604c430d9f3dacff22001a5f31250e34785d4969527a2ae9160fa86858d0892c5b9ff7a06a04076f8c76c9e6862e0541aadca9c057849961343aab0845 + languageName: node + linkType: hard + +"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.23.3" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 00d05ab14ad0f299160fcf9d8f55a1cc1b740e012ab0b5ce30207d2365f091665115557af7d989cd6260d075a252d9e4283de5f2b247dfbbe0e42ae586e6bf66 + languageName: node + linkType: hard + +"@babel/plugin-transform-export-namespace-from@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9f770a81bfd03b48d6ba155d452946fd56d6ffe5b7d871e9ec2a0b15e0f424273b632f3ed61838b90015b25bbda988896b7a46c7d964fbf8f6feb5820b309f93 + languageName: node + linkType: hard + +"@babel/plugin-transform-flow-strip-types@npm:^7.0.0, @babel/plugin-transform-flow-strip-types@npm:^7.20.0, @babel/plugin-transform-flow-strip-types@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-flow": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: de38cc5cf948bc19405ea041292181527a36f59f08d787a590415fac36e9b0c7992f0d3e2fd3b9402089bafdaa1a893291a0edf15beebfd29bdedbbe582fee9b + languageName: node + linkType: hard + +"@babel/plugin-transform-for-of@npm:^7.0.0, @babel/plugin-transform-for-of@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/plugin-transform-for-of@npm:7.23.6" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 228c060aa61f6aa89dc447170075f8214863b94f830624e74ade99c1a09316897c12d76e848460b0b506593e58dbc42739af6dc4cb0fe9b84dffe4a596050a36 + languageName: node + linkType: hard + +"@babel/plugin-transform-function-name@npm:^7.0.0, @babel/plugin-transform-function-name@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-function-name@npm:7.23.3" + dependencies: + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 355c6dbe07c919575ad42b2f7e020f320866d72f8b79181a16f8e0cd424a2c761d979f03f47d583d9471b55dcd68a8a9d829b58e1eebcd572145b934b48975a6 + languageName: node + linkType: hard + +"@babel/plugin-transform-json-strings@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-json-strings@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-json-strings": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f9019820233cf8955d8ba346df709a0683c120fe86a24ed1c9f003f2db51197b979efc88f010d558a12e1491210fc195a43cd1c7fee5e23b92da38f793a875de + languageName: node + linkType: hard + +"@babel/plugin-transform-literals@npm:^7.0.0, @babel/plugin-transform-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 519a544cd58586b9001c4c9b18da25a62f17d23c48600ff7a685d75ca9eb18d2c5e8f5476f067f0a8f1fea2a31107eff950b9864833061e6076dcc4bdc3e71ed + languageName: node + linkType: hard + +"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2ae1dc9b4ff3bf61a990ff3accdecb2afe3a0ca649b3e74c010078d1cdf29ea490f50ac0a905306a2bcf9ac177889a39ac79bdcc3a0fdf220b3b75fac18d39b5 + languageName: node + linkType: hard + +"@babel/plugin-transform-member-expression-literals@npm:^7.0.0, @babel/plugin-transform-member-expression-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 95cec13c36d447c5aa6b8e4c778b897eeba66dcb675edef01e0d2afcec9e8cb9726baf4f81b4bbae7a782595aed72e6a0d44ffb773272c3ca180fada99bf92db + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-amd@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-amd@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d163737b6a3d67ea579c9aa3b83d4df4b5c34d9dcdf25f415f027c0aa8cded7bac2750d2de5464081f67a042ad9e1c03930c2fab42acd79f9e57c00cf969ddff + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 720a231ceade4ae4d2632478db4e7fecf21987d444942b72d523487ac8d715ca97de6c8f415c71e939595e1a4776403e7dc24ed68fe9125ad4acf57753c9bff7 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-systemjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.3" + dependencies: + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0d2fdd993c785aecac9e0850cd5ed7f7d448f0fbb42992a950cc0590167144df25d82af5aac9a5c99ef913d2286782afa44e577af30c10901c5ee8984910fa1f + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-umd@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-umd@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 586a7a2241e8b4e753a37af9466a9ffa8a67b4ba9aa756ad7500712c05d8fa9a8c1ed4f7bd25fae2a8265e6cf8fe781ec85a8ee885dd34cf50d8955ee65f12dc + languageName: node + linkType: hard + +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.0.0, @babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 + languageName: node + linkType: hard + +"@babel/plugin-transform-new-target@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-new-target@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e5053389316fce73ad5201b7777437164f333e24787fbcda4ae489cd2580dbbbdfb5694a7237bad91fabb46b591d771975d69beb1c740b82cb4761625379f00b + languageName: node + linkType: hard + +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a27d73ea134d3d9560a6b2e26ab60012fba15f1db95865aa0153c18f5ec82cfef6a7b3d8df74e3c2fca81534fa5efeb6cacaf7b08bdb7d123e3dafdd079886a3 + languageName: node + linkType: hard + +"@babel/plugin-transform-numeric-separator@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6ba0e5db3c620a3ec81f9e94507c821f483c15f196868df13fa454cbac719a5449baf73840f5b6eb7d77311b24a2cf8e45db53700d41727f693d46f7caf3eec3 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-rest-spread@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.23.4" + dependencies: + "@babel/compat-data": ^7.23.3 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 73fec495e327ca3959c1c03d07a621be09df00036c69fff0455af9a008291677ee9d368eec48adacdc6feac703269a649747568b4af4c4e9f134aa71cc5b378d + languageName: node + linkType: hard + +"@babel/plugin-transform-object-super@npm:^7.0.0, @babel/plugin-transform-object-super@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-object-super@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e495497186f621fa79026e183b4f1fbb172fd9df812cbd2d7f02c05b08adbe58012b1a6eb6dd58d11a30343f6ec80d0f4074f9b501d70aa1c94df76d59164c53 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d50b5ee142cdb088d8b5de1ccf7cea85b18b85d85b52f86618f6e45226372f01ad4cdb29abd4fd35ea99a71fefb37009e0107db7a787dcc21d4d402f97470faf + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-chaining@npm:^7.23.3, @babel/plugin-transform-optional-chaining@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e7a4c08038288057b7a08d68c4d55396ada9278095509ca51ed8dfb72a7f13f26bdd7c5185de21079fe0a9d60d22c227cb32e300d266c1bda40f70eee9f4bc1e + languageName: node + linkType: hard + +"@babel/plugin-transform-parameters@npm:^7.0.0, @babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-parameters@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a735b3e85316d17ec102e3d3d1b6993b429bdb3b494651c9d754e3b7d270462ee1f1a126ccd5e3d871af5e683727e9ef98c9d34d4a42204fffaabff91052ed16 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-methods@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-private-methods@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: cedc1285c49b5a6d9a3d0e5e413b756ac40b3ac2f8f68bdfc3ae268bc8d27b00abd8bb0861c72756ff5dd8bf1eb77211b7feb5baf4fdae2ebbaabe49b9adc1d0 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.23.4" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fb7adfe94ea97542f250a70de32bddbc3e0b802381c92be947fec83ebffda57e68533c4d0697152719a3496fdd3ebf3798d451c024cd4ac848fc15ac26b70aa7 + languageName: node + linkType: hard + +"@babel/plugin-transform-property-literals@npm:^7.0.0, @babel/plugin-transform-property-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-property-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 16b048c8e87f25095f6d53634ab7912992f78e6997a6ff549edc3cf519db4fca01c7b4e0798530d7f6a05228ceee479251245cdd850a5531c6e6f404104d6cc9 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-display-name@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-display-name@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7f86964e8434d3ddbd3c81d2690c9b66dbf1cd8bd9512e2e24500e9fa8cf378bc52c0853270b3b82143aba5965aec04721df7abdb768f952b44f5c6e0b198779 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-self@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 882bf56bc932d015c2d83214133939ddcf342e5bcafa21f1a93b19f2e052145115e1e0351730897fd66e5f67cad7875b8a8d81ceb12b6e2a886ad0102cb4eb1f + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-source@npm:^7.0.0": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 92287fb797e522d99bdc77eaa573ce79ff0ad9f1cf4e7df374645e28e51dce0adad129f6f075430b129b5bac8dad843f65021970e12e992d6d6671f0d65bb1e0 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx@npm:^7.0.0, @babel/plugin-transform-react-jsx@npm:^7.12.17": + version: 7.23.4 + resolution: "@babel/plugin-transform-react-jsx@npm:7.23.4" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/types": ^7.23.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d8b8c52e8e22e833bf77c8d1a53b0a57d1fd52ba9596a319d572de79446a8ed9d95521035bc1175c1589d1a6a34600d2e678fa81d81bac8fac121137097f1f0a + languageName: node + linkType: hard + +"@babel/plugin-transform-regenerator@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-regenerator@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + regenerator-transform: ^0.15.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7fdacc7b40008883871b519c9e5cdea493f75495118ccc56ac104b874983569a24edd024f0f5894ba1875c54ee2b442f295d6241c3280e61c725d0dd3317c8e6 + languageName: node + linkType: hard + +"@babel/plugin-transform-reserved-words@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-reserved-words@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 298c4440ddc136784ff920127cea137168e068404e635dc946ddb5d7b2a27b66f1dd4c4acb01f7184478ff7d5c3e7177a127279479926519042948fb7fa0fa48 + languageName: node + linkType: hard + +"@babel/plugin-transform-runtime@npm:^7.0.0": + version: 7.23.6 + resolution: "@babel/plugin-transform-runtime@npm:7.23.6" + dependencies: + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + babel-plugin-polyfill-corejs2: ^0.4.6 + babel-plugin-polyfill-corejs3: ^0.8.5 + babel-plugin-polyfill-regenerator: ^0.5.3 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d87da909e40d31e984ca5487ba36fa229449b773bc0f3fbf1d3c5ccac788ad3aef7481f1d4a3384c1813ee4f958af52b449089d96c0d5625868c028dd630d683 + languageName: node + linkType: hard + +"@babel/plugin-transform-shorthand-properties@npm:^7.0.0, @babel/plugin-transform-shorthand-properties@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5d677a03676f9fff969b0246c423d64d77502e90a832665dc872a5a5e05e5708161ce1effd56bb3c0f2c20a1112fca874be57c8a759d8b08152755519281f326 + languageName: node + linkType: hard + +"@babel/plugin-transform-spread@npm:^7.0.0, @babel/plugin-transform-spread@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-spread@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 8fd5cac201e77a0b4825745f4e07a25f923842f282f006b3a79223c00f61075c8868d12eafec86b2642cd0b32077cdd32314e27bcb75ee5e6a68c0144140dcf2 + languageName: node + linkType: hard + +"@babel/plugin-transform-sticky-regex@npm:^7.0.0, @babel/plugin-transform-sticky-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 53e55eb2575b7abfdb4af7e503a2bf7ef5faf8bf6b92d2cd2de0700bdd19e934e5517b23e6dfed94ba50ae516b62f3f916773ef7d9bc81f01503f585051e2949 + languageName: node + linkType: hard + +"@babel/plugin-transform-template-literals@npm:^7.0.0, @babel/plugin-transform-template-literals@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-template-literals@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b16c5cb0b8796be0118e9c144d15bdc0d20a7f3f59009c6303a6e9a8b74c146eceb3f05186f5b97afcba7cfa87e34c1585a22186e3d5b22f2fd3d27d959d92b2 + languageName: node + linkType: hard + +"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0af7184379d43afac7614fc89b1bdecce4e174d52f4efaeee8ec1a4f2c764356c6dba3525c0685231f1cbf435b6dd4ee9e738d7417f3b10ce8bbe869c32f4384 + languageName: node + linkType: hard + +"@babel/plugin-transform-typescript@npm:^7.23.3, @babel/plugin-transform-typescript@npm:^7.5.0": + version: 7.23.6 + resolution: "@babel/plugin-transform-typescript@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0462241843d14dff9f1a4c49ab182a6f01a5f7679957c786b08165dac3e8d49184011f05ca204183d164c54b9d3496d1b3005f904fa8708e394e6f15bf5548e6 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 561c429183a54b9e4751519a3dfba6014431e9cdc1484fad03bdaf96582dfc72c76a4f8661df2aeeae7c34efd0fa4d02d3b83a2f63763ecf71ecc925f9cc1f60 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2298461a194758086d17c23c26c7de37aa533af910f9ebf31ebd0893d4aa317468043d23f73edc782ec21151d3c46cf0ff8098a83b725c49a59de28a1d4d6225 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-regex@npm:^7.0.0, @babel/plugin-transform-unicode-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c5f835d17483ba899787f92e313dfa5b0055e3deab332f1d254078a2bba27ede47574b6599fcf34d3763f0c048ae0779dc21d2d8db09295edb4057478dc80a9a + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.23.3" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 79d0b4c951955ca68235c87b91ab2b393c96285f8aeaa34d6db416d2ddac90000c9bd6e8c4d82b60a2b484da69930507245035f28ba63c6cae341cf3ba68fdef + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.20.0": + version: 7.23.6 + resolution: "@babel/preset-env@npm:7.23.6" + dependencies: + "@babel/compat-data": ^7.23.5 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.23.5 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.23.3 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.23.3 + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": ^7.23.3 + "@babel/plugin-proposal-private-property-in-object": 7.21.0-placeholder-for-preset-env.2 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.23.3 + "@babel/plugin-syntax-import-attributes": ^7.23.3 + "@babel/plugin-syntax-import-meta": ^7.10.4 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@babel/plugin-syntax-top-level-await": ^7.14.5 + "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 + "@babel/plugin-transform-arrow-functions": ^7.23.3 + "@babel/plugin-transform-async-generator-functions": ^7.23.4 + "@babel/plugin-transform-async-to-generator": ^7.23.3 + "@babel/plugin-transform-block-scoped-functions": ^7.23.3 + "@babel/plugin-transform-block-scoping": ^7.23.4 + "@babel/plugin-transform-class-properties": ^7.23.3 + "@babel/plugin-transform-class-static-block": ^7.23.4 + "@babel/plugin-transform-classes": ^7.23.5 + "@babel/plugin-transform-computed-properties": ^7.23.3 + "@babel/plugin-transform-destructuring": ^7.23.3 + "@babel/plugin-transform-dotall-regex": ^7.23.3 + "@babel/plugin-transform-duplicate-keys": ^7.23.3 + "@babel/plugin-transform-dynamic-import": ^7.23.4 + "@babel/plugin-transform-exponentiation-operator": ^7.23.3 + "@babel/plugin-transform-export-namespace-from": ^7.23.4 + "@babel/plugin-transform-for-of": ^7.23.6 + "@babel/plugin-transform-function-name": ^7.23.3 + "@babel/plugin-transform-json-strings": ^7.23.4 + "@babel/plugin-transform-literals": ^7.23.3 + "@babel/plugin-transform-logical-assignment-operators": ^7.23.4 + "@babel/plugin-transform-member-expression-literals": ^7.23.3 + "@babel/plugin-transform-modules-amd": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-modules-systemjs": ^7.23.3 + "@babel/plugin-transform-modules-umd": ^7.23.3 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.22.5 + "@babel/plugin-transform-new-target": ^7.23.3 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.23.4 + "@babel/plugin-transform-numeric-separator": ^7.23.4 + "@babel/plugin-transform-object-rest-spread": ^7.23.4 + "@babel/plugin-transform-object-super": ^7.23.3 + "@babel/plugin-transform-optional-catch-binding": ^7.23.4 + "@babel/plugin-transform-optional-chaining": ^7.23.4 + "@babel/plugin-transform-parameters": ^7.23.3 + "@babel/plugin-transform-private-methods": ^7.23.3 + "@babel/plugin-transform-private-property-in-object": ^7.23.4 + "@babel/plugin-transform-property-literals": ^7.23.3 + "@babel/plugin-transform-regenerator": ^7.23.3 + "@babel/plugin-transform-reserved-words": ^7.23.3 + "@babel/plugin-transform-shorthand-properties": ^7.23.3 + "@babel/plugin-transform-spread": ^7.23.3 + "@babel/plugin-transform-sticky-regex": ^7.23.3 + "@babel/plugin-transform-template-literals": ^7.23.3 + "@babel/plugin-transform-typeof-symbol": ^7.23.3 + "@babel/plugin-transform-unicode-escapes": ^7.23.3 + "@babel/plugin-transform-unicode-property-regex": ^7.23.3 + "@babel/plugin-transform-unicode-regex": ^7.23.3 + "@babel/plugin-transform-unicode-sets-regex": ^7.23.3 + "@babel/preset-modules": 0.1.6-no-external-plugins + babel-plugin-polyfill-corejs2: ^0.4.6 + babel-plugin-polyfill-corejs3: ^0.8.5 + babel-plugin-polyfill-regenerator: ^0.5.3 + core-js-compat: ^3.31.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 130262f263c8a76915ff5361f78afa9e63b4ecbf3ade8e833dc7546db7b9552ab507835bdea0feb5e70861345ca128a31327fd2e187084a215fc9dd1cc0ed38e + languageName: node + linkType: hard + +"@babel/preset-flow@npm:^7.13.13": + version: 7.23.3 + resolution: "@babel/preset-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-transform-flow-strip-types": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 60b5dde79621ae89943af459c4dc5b6030795f595a20ca438c8100f8d82c9ebc986881719030521ff5925799518ac5aa7f3fe62af8c33ab96be3681a71f88d03 + languageName: node + linkType: hard + +"@babel/preset-modules@npm:0.1.6-no-external-plugins": + version: 0.1.6-no-external-plugins + resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" + dependencies: + "@babel/helper-plugin-utils": ^7.0.0 + "@babel/types": ^7.4.4 + esutils: ^2.0.2 + peerDependencies: + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 4855e799bc50f2449fb5210f78ea9e8fd46cf4f242243f1e2ed838e2bd702e25e73e822e7f8447722a5f4baa5e67a8f7a0e403f3e7ce04540ff743a9c411c375 + languageName: node + linkType: hard + +"@babel/preset-typescript@npm:^7.13.0": + version: 7.23.3 + resolution: "@babel/preset-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 105a2d39bbc464da0f7e1ad7f535c77c5f62d6b410219355b20e552e7d29933567a5c55339b5d0aec1a5c7a0a7dfdf1b54aae601a4fe15a157d54dcbfcb3e854 + languageName: node + linkType: hard + +"@babel/register@npm:^7.13.16": + version: 7.22.15 + resolution: "@babel/register@npm:7.22.15" + dependencies: + clone-deep: ^4.0.1 + find-cache-dir: ^2.0.0 + make-dir: ^2.1.0 + pirates: ^4.0.5 + source-map-support: ^0.5.16 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5497be6773608cd2d874210edd14499fce464ddbea170219da55955afe4c9173adb591164193458fd639e43b7d1314088a6186f4abf241476c59b3f0da6afd6f + languageName: node + linkType: hard + +"@babel/regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "@babel/regjsgen@npm:0.8.0" + checksum: 89c338fee774770e5a487382170711014d49a68eb281e74f2b5eac88f38300a4ad545516a7786a8dd5702e9cf009c94c2f582d200f077ac5decd74c56b973730 + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.8.4": + version: 7.23.6 + resolution: "@babel/runtime@npm:7.23.6" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 1a8eaf3d3a103ef5227b60ca7ab5c589118c36ca65ef2d64e65380b32a98a3f3b5b3ef96660fa0471b079a18b619a8317f3e7f03ab2b930c45282a8b69ed9a16 + languageName: node + linkType: hard + +"@babel/template@npm:^7.0.0, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/parser": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/traverse@npm:7.23.6" + dependencies: + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.23.6 + "@babel/types": ^7.23.6 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: 48f2eac0e86b6cb60dab13a5ea6a26ba45c450262fccdffc334c01089e75935f7546be195e260e97f6e43cea419862eda095018531a2718fef8189153d479f88 + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.23.6 + resolution: "@babel/types@npm:7.23.6" + dependencies: + "@babel/helper-string-parser": ^7.23.4 + "@babel/helper-validator-identifier": ^7.22.20 + to-fast-properties: ^2.0.0 + checksum: 68187dbec0d637f79bc96263ac95ec8b06d424396678e7e225492be866414ce28ebc918a75354d4c28659be6efe30020b4f0f6df81cc418a2d30645b690a8de0 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 850f9305536d0f2bd13e9e0881cb5f02e4f93fad1189f7b2d4bebf694e3206924eadee1068130d43c11b750efcc9405f88a8e42ef098b6d75239c0f047de1a27 + languageName: node + linkType: hard + +"@cspotcode/source-map-support@npm:^0.8.0": + version: 0.8.1 + resolution: "@cspotcode/source-map-support@npm:0.8.1" + dependencies: + "@jridgewell/trace-mapping": 0.3.9 + checksum: 5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa + languageName: node + linkType: hard + +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" + dependencies: + eslint-visitor-keys: ^3.3.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": + version: 4.10.0 + resolution: "@eslint-community/regexpp@npm:4.10.0" + checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" + dependencies: + ajv: ^6.12.4 + debug: ^4.3.2 + espree: ^9.6.0 + globals: ^13.19.0 + ignore: ^5.2.0 + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + minimatch: ^3.1.2 + strip-json-comments: ^3.1.1 + checksum: 10957c7592b20ca0089262d8c2a8accbad14b4f6507e35416c32ee6b4dbf9cad67dfb77096bbd405405e9ada2b107f3797fe94362e1c55e0b09d6e90dd149127 + languageName: node + linkType: hard + +"@eslint/js@npm:8.56.0": + version: 8.56.0 + resolution: "@eslint/js@npm:8.56.0" + checksum: 5804130574ef810207bdf321c265437814e7a26f4e6fac9b496de3206afd52f533e09ec002a3be06cd9adcc9da63e727f1883938e663c4e4751c007d5b58e539 + languageName: node + linkType: hard + +"@expo/bunyan@npm:4.0.0, @expo/bunyan@npm:^4.0.0": + version: 4.0.0 + resolution: "@expo/bunyan@npm:4.0.0" + dependencies: + mv: ~2 + safe-json-stringify: ~1 + uuid: ^8.0.0 + dependenciesMeta: + mv: + optional: true + safe-json-stringify: + optional: true + checksum: dce0b66fde1c11f987bc31b9afd9b714c4295ba750780ee8861ab8a912b37a2b9dd2ab9c9fbf3a85f3adbe66c6cd85e45bc76fa37c98ee23a7db3ad24601c296 + languageName: node + linkType: hard + +"@expo/cli@npm:0.10.16": + version: 0.10.16 + resolution: "@expo/cli@npm:0.10.16" + dependencies: + "@babel/runtime": ^7.20.0 + "@expo/code-signing-certificates": 0.0.5 + "@expo/config": ~8.1.0 + "@expo/config-plugins": ~7.2.0 + "@expo/dev-server": 0.5.5 + "@expo/devcert": ^1.0.0 + "@expo/env": 0.0.5 + "@expo/json-file": ^8.2.37 + "@expo/metro-config": ~0.10.0 + "@expo/osascript": ^2.0.31 + "@expo/package-manager": ~1.1.0 + "@expo/plist": ^0.0.20 + "@expo/prebuild-config": 6.2.6 + "@expo/rudder-sdk-node": 1.1.1 + "@expo/spawn-async": 1.5.0 + "@expo/xcpretty": ^4.2.1 + "@urql/core": 2.3.6 + "@urql/exchange-retry": 0.3.0 + accepts: ^1.3.8 + arg: 4.1.0 + better-opn: ~3.0.2 + bplist-parser: ^0.3.1 + cacache: ^15.3.0 + chalk: ^4.0.0 + ci-info: ^3.3.0 + debug: ^4.3.4 + env-editor: ^0.4.1 + form-data: ^3.0.1 + freeport-async: 2.0.0 + fs-extra: ~8.1.0 + getenv: ^1.0.0 + graphql: 15.8.0 + graphql-tag: ^2.10.1 + https-proxy-agent: ^5.0.1 + internal-ip: 4.3.0 + js-yaml: ^3.13.1 + json-schema-deref-sync: ^0.13.0 + md5-file: ^3.2.3 + md5hex: ^1.0.0 + minipass: 3.1.6 + node-fetch: ^2.6.7 + node-forge: ^1.3.1 + npm-package-arg: ^7.0.0 + ora: 3.4.0 + pretty-bytes: 5.6.0 + progress: 2.0.3 + prompts: ^2.3.2 + qrcode-terminal: 0.11.0 + require-from-string: ^2.0.2 + requireg: ^0.2.2 + resolve-from: ^5.0.0 + semver: ^7.5.3 + send: ^0.18.0 + slugify: ^1.3.4 + structured-headers: ^0.4.1 + tar: ^6.0.5 + tempy: ^0.7.1 + terminal-link: ^2.1.1 + text-table: ^0.2.0 + url-join: 4.0.0 + wrap-ansi: ^7.0.0 + ws: ^8.12.1 + bin: + expo-internal: build/bin/cli + checksum: f8a329fbd6224f707dabb935846fe1451ed027b4c414d7bdd4385affb4b9ac2281e0e4fffe3c24a4e45a4827af92454be7284b33ad92018d5e01a731f2bde52c + languageName: node + linkType: hard + +"@expo/code-signing-certificates@npm:0.0.5": + version: 0.0.5 + resolution: "@expo/code-signing-certificates@npm:0.0.5" + dependencies: + node-forge: ^1.2.1 + nullthrows: ^1.1.1 + checksum: 4a1c73a6bc74443284a45db698ede874c7d47f6ed58cf44adaa255139490c8754d81dc1556247f3782cdc5034382fb72f23b0033daa2117facad4eb13b841e37 + languageName: node + linkType: hard + +"@expo/config-plugins@npm:7.2.5, @expo/config-plugins@npm:~7.2.0": + version: 7.2.5 + resolution: "@expo/config-plugins@npm:7.2.5" + dependencies: + "@expo/config-types": ^49.0.0-alpha.1 + "@expo/json-file": ~8.2.37 + "@expo/plist": ^0.0.20 + "@expo/sdk-runtime-versions": ^1.0.0 + "@react-native/normalize-color": ^2.0.0 + chalk: ^4.1.2 + debug: ^4.3.1 + find-up: ~5.0.0 + getenv: ^1.0.0 + glob: 7.1.6 + resolve-from: ^5.0.0 + semver: ^7.5.3 + slash: ^3.0.0 + xcode: ^3.0.1 + xml2js: 0.6.0 + checksum: 7ebed343d2109cdb43d03c909845bae5e5a329ee6408acbb4ff09e3dd2a65ed7b80d7b9e09101d20e4c9609f154de8b13c21791e1fa9a30a1875acb5e4be048f + languageName: node + linkType: hard + +"@expo/config-types@npm:^49.0.0-alpha.1": + version: 49.0.0 + resolution: "@expo/config-types@npm:49.0.0" + checksum: 5ce8e678495e2e4568f6b502e7f2ef8afd6a8962b28d8e17316249be82321dc5ec5061f8fc467c90d85e330fd3565823cfdc10bab4a78e6b1765296101c8d71d + languageName: node + linkType: hard + +"@expo/config@npm:8.1.2, @expo/config@npm:~8.1.0": + version: 8.1.2 + resolution: "@expo/config@npm:8.1.2" + dependencies: + "@babel/code-frame": ~7.10.4 + "@expo/config-plugins": ~7.2.0 + "@expo/config-types": ^49.0.0-alpha.1 + "@expo/json-file": ^8.2.37 + getenv: ^1.0.0 + glob: 7.1.6 + require-from-string: ^2.0.2 + resolve-from: ^5.0.0 + semver: 7.5.3 + slugify: ^1.3.4 + sucrase: ^3.20.0 + checksum: 95e2f049482f9e20f9bf59975d8d599f5a6ae63e93e8e61e0bf9d7deb8ced121f56a39e5c2fa98570470d51b10f061da2f77c52261e4065270bb9b2629579176 + languageName: node + linkType: hard + +"@expo/dev-server@npm:0.5.5": + version: 0.5.5 + resolution: "@expo/dev-server@npm:0.5.5" + dependencies: + "@expo/bunyan": 4.0.0 + "@expo/metro-config": ~0.10.0 + "@expo/osascript": 2.0.33 + "@expo/spawn-async": ^1.5.0 + body-parser: ^1.20.1 + chalk: ^4.0.0 + connect: ^3.7.0 + fs-extra: 9.0.0 + is-docker: ^2.0.0 + is-wsl: ^2.1.1 + node-fetch: ^2.6.0 + open: ^8.3.0 + resolve-from: ^5.0.0 + serialize-error: 6.0.0 + temp-dir: ^2.0.0 + checksum: 5b13c1a757ed0c41cef20a5d45a024ad78c4086a6fea8e2031883947bc5b2b4512d9c9670f6f2ec9eeb9f83b66428e8a305f1564d0fcb090d081546e7b1fd551 + languageName: node + linkType: hard + +"@expo/devcert@npm:^1.0.0": + version: 1.1.0 + resolution: "@expo/devcert@npm:1.1.0" + dependencies: + application-config-path: ^0.1.0 + command-exists: ^1.2.4 + debug: ^3.1.0 + eol: ^0.9.1 + get-port: ^3.2.0 + glob: ^7.1.2 + lodash: ^4.17.4 + mkdirp: ^0.5.1 + password-prompt: ^1.0.4 + rimraf: ^2.6.2 + sudo-prompt: ^8.2.0 + tmp: ^0.0.33 + tslib: ^2.4.0 + checksum: bb99996d7fc31c5269afbd9ab43066090ea986006d14c8c393165f813d90c21ff9fc40f16b247778a7026714c2a743ce6e8b0df25e135711e991fa0bbfb3555b + languageName: node + linkType: hard + +"@expo/env@npm:0.0.5": + version: 0.0.5 + resolution: "@expo/env@npm:0.0.5" + dependencies: + chalk: ^4.0.0 + debug: ^4.3.4 + dotenv: ~16.0.3 + dotenv-expand: ~10.0.0 + getenv: ^1.0.0 + checksum: 1a26366178c91aff1b678dc578aafc6e2dcf1b66e7c0d1ec5faa6f6c4bad67c4f4d61d1833bc8de3d074eed3dc644065129007fe1ee777813290d8708d7ff87d + languageName: node + linkType: hard + +"@expo/image-utils@npm:0.3.22": + version: 0.3.22 + resolution: "@expo/image-utils@npm:0.3.22" + dependencies: + "@expo/spawn-async": 1.5.0 + chalk: ^4.0.0 + fs-extra: 9.0.0 + getenv: ^1.0.0 + jimp-compact: 0.16.1 + mime: ^2.4.4 + node-fetch: ^2.6.0 + parse-png: ^2.1.0 + resolve-from: ^5.0.0 + semver: 7.3.2 + tempy: 0.3.0 + checksum: 09b2db29f4b34994bb0fea480475a9947876eede1a8dcaf3cac21edf4e537179d1673bedaf47404e0634eec4b5a17be471e8c8c3c2c0ce2b84df793107d496c2 + languageName: node + linkType: hard + +"@expo/json-file@npm:^8.2.37, @expo/json-file@npm:~8.2.37": + version: 8.2.37 + resolution: "@expo/json-file@npm:8.2.37" + dependencies: + "@babel/code-frame": ~7.10.4 + json5: ^2.2.2 + write-file-atomic: ^2.3.0 + checksum: f04e71654c5b3491bbb7088a02d64acf8e7750369fd48f4d55c64ff4372b5396bdef05a8eff51955e0b098e0069e63281f3c40dc6d3b71aec62295861b1236a6 + languageName: node + linkType: hard + +"@expo/metro-config@npm:~0.10.0": + version: 0.10.7 + resolution: "@expo/metro-config@npm:0.10.7" + dependencies: + "@expo/config": ~8.1.0 + "@expo/env": 0.0.5 + "@expo/json-file": ~8.2.37 + chalk: ^4.1.0 + debug: ^4.3.2 + find-yarn-workspace-root: ~2.0.0 + getenv: ^1.0.0 + jsc-safe-url: ^0.2.4 + lightningcss: ~1.19.0 + postcss: ~8.4.21 + resolve-from: ^5.0.0 + sucrase: ^3.20.0 + checksum: 7b54e08598e2673320a1647ce0f2ab8735cf15f3ea406b2d37b2fed96c7d66f6be9ca10aa622b7a1a7530168627c568f92d2060b8d22a639aaf758a21fb6f03b + languageName: node + linkType: hard + +"@expo/osascript@npm:2.0.33, @expo/osascript@npm:^2.0.31": + version: 2.0.33 + resolution: "@expo/osascript@npm:2.0.33" + dependencies: + "@expo/spawn-async": ^1.5.0 + exec-async: ^2.2.0 + checksum: f1ae2e365ec82fcfefbdcd3ceb52da1b38c54e55a2ceb884ca06fb9259544c032b2f8133b803be152e86d79b8510fda8320811053894884819fa10b66268045d + languageName: node + linkType: hard + +"@expo/package-manager@npm:~1.1.0": + version: 1.1.2 + resolution: "@expo/package-manager@npm:1.1.2" + dependencies: + "@expo/json-file": ^8.2.37 + "@expo/spawn-async": ^1.5.0 + ansi-regex: ^5.0.0 + chalk: ^4.0.0 + find-up: ^5.0.0 + find-yarn-workspace-root: ~2.0.0 + js-yaml: ^3.13.1 + micromatch: ^4.0.2 + npm-package-arg: ^7.0.0 + split: ^1.0.1 + sudo-prompt: 9.1.1 + checksum: 61d5cec5e40029789b2e8f0487aa14999bc98d50967d022d7b55b84efdb5c26581dd568239d8f4af525c07212dfbaa0eab74bbc2fca55d22cee7d463abe03a94 + languageName: node + linkType: hard + +"@expo/plist@npm:^0.0.20": + version: 0.0.20 + resolution: "@expo/plist@npm:0.0.20" + dependencies: + "@xmldom/xmldom": ~0.7.7 + base64-js: ^1.2.3 + xmlbuilder: ^14.0.0 + checksum: 74dea791f86ca29541e94c00d7e0d044b1ccb7947a6f62b18569a85baa4572190c0cbd0973bf97eec9b5f207f45ebb55b8975bd200e5933b237e4d2d2dc12194 + languageName: node + linkType: hard + +"@expo/prebuild-config@npm:6.2.6": + version: 6.2.6 + resolution: "@expo/prebuild-config@npm:6.2.6" + dependencies: + "@expo/config": ~8.1.0 + "@expo/config-plugins": ~7.2.0 + "@expo/config-types": ^49.0.0-alpha.1 + "@expo/image-utils": 0.3.22 + "@expo/json-file": ^8.2.37 + debug: ^4.3.1 + fs-extra: ^9.0.0 + resolve-from: ^5.0.0 + semver: 7.5.3 + xml2js: 0.6.0 + peerDependencies: + expo-modules-autolinking: ">=0.8.1" + checksum: ebb83bfba2c7bf6f386f64448213415ce893af69b6a56311dc88400bee24183d934a3c515e6156aad71877def942b6ef608211fdede6a8503eadddc8022e5921 + languageName: node + linkType: hard + +"@expo/rudder-sdk-node@npm:1.1.1": + version: 1.1.1 + resolution: "@expo/rudder-sdk-node@npm:1.1.1" + dependencies: + "@expo/bunyan": ^4.0.0 + "@segment/loosely-validate-event": ^2.0.0 + fetch-retry: ^4.1.1 + md5: ^2.2.1 + node-fetch: ^2.6.1 + remove-trailing-slash: ^0.1.0 + uuid: ^8.3.2 + checksum: 5ce50c1a82f899b135600cb29cddf3fab601938700c8203f16a1394d2ffbf9e2cdd246b92ff635f8415121072d99a7b4a370f715b78f6680594b5a630e8d78c6 + languageName: node + linkType: hard + +"@expo/sdk-runtime-versions@npm:^1.0.0": + version: 1.0.0 + resolution: "@expo/sdk-runtime-versions@npm:1.0.0" + checksum: 0942d5a356f590e8dc795761456cc48b3e2d6a38ad2a02d6774efcdc5a70424e05623b4e3e5d2fec0cdc30f40dde05c14391c781607eed3971bf8676518bfd9d + languageName: node + linkType: hard + +"@expo/spawn-async@npm:1.5.0": + version: 1.5.0 + resolution: "@expo/spawn-async@npm:1.5.0" + dependencies: + cross-spawn: ^6.0.5 + checksum: 5b144726f66426d9198aa07cca6944deab328369f806c0d30836a19a014d32106e8230c41dde7857a5a3f45f9381a0858df27edc3506be2b7e863fc024290442 + languageName: node + linkType: hard + +"@expo/spawn-async@npm:^1.5.0": + version: 1.7.2 + resolution: "@expo/spawn-async@npm:1.7.2" + dependencies: + cross-spawn: ^7.0.3 + checksum: d99e5ff6d303ec9b0105f97c4fa6c65bca526c7d4d0987997c35cc745fa8224adf009942d01808192ebb9fa30619a53316641958631e85cf17b773d9eeda2597 + languageName: node + linkType: hard + +"@expo/vector-icons@npm:^13.0.0": + version: 13.0.0 + resolution: "@expo/vector-icons@npm:13.0.0" + checksum: a1df3b08e5cf0d5e662a05a66e702d18862ceabc69cf71703eb35a512939bdb8c07541bce1a380d296409e75f456de40926d0be78ee713d84709387117d63fa0 + languageName: node + linkType: hard + +"@expo/xcpretty@npm:^4.2.1": + version: 4.3.0 + resolution: "@expo/xcpretty@npm:4.3.0" + dependencies: + "@babel/code-frame": 7.10.4 + chalk: ^4.1.0 + find-up: ^5.0.0 + js-yaml: ^4.1.0 + bin: + excpretty: build/cli.js + checksum: b4f23151f5eb48dda72dc2b371d2ee6d0b8c4bb06b1498b4e88f88c7dd1068353e07d3d0c11965c274d74ed2e4b33ca34a9c6adcfae5f785fbffa0fe3b47fe82 + languageName: node + linkType: hard + +"@gar/promisify@npm:^1.0.1": + version: 1.1.3 + resolution: "@gar/promisify@npm:1.1.3" + checksum: 4059f790e2d07bf3c3ff3e0fec0daa8144fe35c1f6e0111c9921bd32106adaa97a4ab096ad7dab1e28ee6a9060083c4d1a4ada42a7f5f3f7a96b8812e2b757c1 + languageName: node + linkType: hard + +"@graphql-typed-document-node/core@npm:^3.1.0": + version: 3.2.0 + resolution: "@graphql-typed-document-node/core@npm:3.2.0" + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d + languageName: node + linkType: hard + +"@hapi/hoek@npm:^9.0.0": + version: 9.3.0 + resolution: "@hapi/hoek@npm:9.3.0" + checksum: 4771c7a776242c3c022b168046af4e324d116a9d2e1d60631ee64f474c6e38d1bb07092d898bf95c7bc5d334c5582798a1456321b2e53ca817d4e7c88bc25b43 + languageName: node + linkType: hard + +"@hapi/topo@npm:^5.0.0": + version: 5.1.0 + resolution: "@hapi/topo@npm:5.1.0" + dependencies: + "@hapi/hoek": ^9.0.0 + checksum: 604dfd5dde76d5c334bd03f9001fce69c7ce529883acf92da96f4fe7e51221bf5e5110e964caca287a6a616ba027c071748ab636ff178ad750547fba611d6014 + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.11.13": + version: 0.11.13 + resolution: "@humanwhocodes/config-array@npm:0.11.13" + dependencies: + "@humanwhocodes/object-schema": ^2.0.1 + debug: ^4.1.1 + minimatch: ^3.0.5 + checksum: f8ea57b0d7ed7f2d64cd3944654976829d9da91c04d9c860e18804729a33f7681f78166ef4c761850b8c324d362f7d53f14c5c44907a6b38b32c703ff85e4805 + languageName: node + linkType: hard + +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^2.0.1": + version: 2.0.1 + resolution: "@humanwhocodes/object-schema@npm:2.0.1" + checksum: 24929487b1ed48795d2f08346a0116cc5ee4634848bce64161fb947109352c562310fd159fc64dda0e8b853307f5794605191a9547f7341158559ca3c8262a45 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: ^5.3.1 + find-up: ^4.1.0 + get-package-type: ^0.1.0 + js-yaml: ^3.13.1 + resolve-from: ^5.0.0 + checksum: d578da5e2e804d5c93228450a1380e1a3c691de4953acc162f387b717258512a3e07b83510a936d9fab03eac90817473917e24f5d16297af3867f59328d58568 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 5282759d961d61350f33d9118d16bcaed914ebf8061a52f4fa474b2cb08720c9c81d165e13b82f2e5a8a212cc5af482f0c6fc1ac27b9e067e5394c9a6ed186c9 + languageName: node + linkType: hard + +"@jest/console@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/console@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + slash: ^3.0.0 + checksum: 0e3624e32c5a8e7361e889db70b170876401b7d70f509a2538c31d5cd50deb0c1ae4b92dc63fe18a0902e0a48c590c21d53787a0df41a52b34fa7cab96c384d6 + languageName: node + linkType: hard + +"@jest/core@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/core@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/reporters": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + ci-info: ^3.2.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-changed-files: ^29.7.0 + jest-config: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-resolve-dependencies: ^29.7.0 + jest-runner: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + jest-watcher: ^29.7.0 + micromatch: ^4.0.4 + pretty-format: ^29.7.0 + slash: ^3.0.0 + strip-ansi: ^6.0.0 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: af759c9781cfc914553320446ce4e47775ae42779e73621c438feb1e4231a5d4862f84b1d8565926f2d1aab29b3ec3dcfdc84db28608bdf5f29867124ebcfc0d + languageName: node + linkType: hard + +"@jest/create-cache-key-function@npm:^29.2.1": + version: 29.7.0 + resolution: "@jest/create-cache-key-function@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + checksum: 681bc761fa1d6fa3dd77578d444f97f28296ea80755e90e46d1c8fa68661b9e67f54dd38b988742db636d26cf160450dc6011892cec98b3a7ceb58cad8ff3aae + languageName: node + linkType: hard + +"@jest/environment@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/environment@npm:29.7.0" + dependencies: + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-mock: ^29.7.0 + checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 + languageName: node + linkType: hard + +"@jest/expect-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect-utils@npm:29.7.0" + dependencies: + jest-get-type: ^29.6.3 + checksum: 75eb177f3d00b6331bcaa057e07c0ccb0733a1d0a1943e1d8db346779039cb7f103789f16e502f888a3096fb58c2300c38d1f3748b36a7fa762eb6f6d1b160ed + languageName: node + linkType: hard + +"@jest/expect@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect@npm:29.7.0" + dependencies: + expect: ^29.7.0 + jest-snapshot: ^29.7.0 + checksum: a01cb85fd9401bab3370618f4b9013b90c93536562222d920e702a0b575d239d74cecfe98010aaec7ad464f67cf534a353d92d181646a4b792acaa7e912ae55e + languageName: node + linkType: hard + +"@jest/fake-timers@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/fake-timers@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@sinonjs/fake-timers": ^10.0.2 + "@types/node": "*" + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 + languageName: node + linkType: hard + +"@jest/globals@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/globals@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 + "@jest/types": ^29.6.3 + jest-mock: ^29.7.0 + checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 + languageName: node + linkType: hard + +"@jest/reporters@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/reporters@npm:29.7.0" + dependencies: + "@bcoe/v8-coverage": ^0.2.3 + "@jest/console": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@jridgewell/trace-mapping": ^0.3.18 + "@types/node": "*" + chalk: ^4.0.0 + collect-v8-coverage: ^1.0.0 + exit: ^0.1.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + istanbul-lib-coverage: ^3.0.0 + istanbul-lib-instrument: ^6.0.0 + istanbul-lib-report: ^3.0.0 + istanbul-lib-source-maps: ^4.0.0 + istanbul-reports: ^3.1.3 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 + slash: ^3.0.0 + string-length: ^4.0.1 + strip-ansi: ^6.0.0 + v8-to-istanbul: ^9.0.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 7eadabd62cc344f629024b8a268ecc8367dba756152b761bdcb7b7e570a3864fc51b2a9810cd310d85e0a0173ef002ba4528d5ea0329fbf66ee2a3ada9c40455 + languageName: node + linkType: hard + +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": ^0.27.8 + checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + +"@jest/source-map@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/source-map@npm:29.6.3" + dependencies: + "@jridgewell/trace-mapping": ^0.3.18 + callsites: ^3.0.0 + graceful-fs: ^4.2.9 + checksum: bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb + languageName: node + linkType: hard + +"@jest/test-result@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-result@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/istanbul-lib-coverage": ^2.0.0 + collect-v8-coverage: ^1.0.0 + checksum: 67b6317d526e335212e5da0e768e3b8ab8a53df110361b80761353ad23b6aea4432b7c5665bdeb87658ea373b90fb1afe02ed3611ef6c858c7fba377505057fa + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-sequencer@npm:29.7.0" + dependencies: + "@jest/test-result": ^29.7.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + slash: ^3.0.0 + checksum: 73f43599017946be85c0b6357993b038f875b796e2f0950487a82f4ebcb115fa12131932dd9904026b4ad8be131fe6e28bd8d0aa93b1563705185f9804bff8bd + languageName: node + linkType: hard + +"@jest/transform@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/transform@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@jest/types": ^29.6.3 + "@jridgewell/trace-mapping": ^0.3.18 + babel-plugin-istanbul: ^6.1.1 + chalk: ^4.0.0 + convert-source-map: ^2.0.0 + fast-json-stable-stringify: ^2.1.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-util: ^29.7.0 + micromatch: ^4.0.4 + pirates: ^4.0.4 + slash: ^3.0.0 + write-file-atomic: ^4.0.2 + checksum: 0f8ac9f413903b3cb6d240102db848f2a354f63971ab885833799a9964999dd51c388162106a807f810071f864302cdd8e3f0c241c29ce02d85a36f18f3f40ab + languageName: node + linkType: hard + +"@jest/types@npm:^26.6.2": + version: 26.6.2 + resolution: "@jest/types@npm:26.6.2" + dependencies: + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^15.0.0 + chalk: ^4.0.0 + checksum: a0bd3d2f22f26ddb23f41fddf6e6a30bf4fab2ce79ec1cb6ce6fdfaf90a72e00f4c71da91ec61e13db3b10c41de22cf49d07c57ff2b59171d64b29f909c1d8d6 + languageName: node + linkType: hard + +"@jest/types@npm:^27.5.1": + version: 27.5.1 + resolution: "@jest/types@npm:27.5.1" + dependencies: + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^16.0.0 + chalk: ^4.0.0 + checksum: d1f43cc946d87543ddd79d49547aab2399481d34025d5c5f2025d3d99c573e1d9832fa83cef25e9d9b07a8583500229d15bbb07b8e233d127d911d133e2f14b1 + languageName: node + linkType: hard + +"@jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" + dependencies: + "@jest/schemas": ^29.6.3 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: a0bcf15dbb0eca6bdd8ce61a3fb055349d40268622a7670a3b2eb3c3dbafe9eb26af59938366d520b86907b9505b0f9b29b85cec11579a9e580694b87cd90fcc + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" + dependencies: + "@jridgewell/set-array": ^1.0.1 + "@jridgewell/sourcemap-codec": ^1.4.10 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e + languageName: node + linkType: hard + +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.5 + resolution: "@jridgewell/source-map@npm:0.3.5" + dependencies: + "@jridgewell/gen-mapping": ^0.3.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 1ad4dec0bdafbade57920a50acec6634f88a0eb735851e0dda906fa9894e7f0549c492678aad1a10f8e144bfe87f238307bf2a914a1bc85b7781d345417e9f6f + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": ^3.0.3 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.20 + resolution: "@jridgewell/trace-mapping@npm:0.3.20" + dependencies: + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: cd1a7353135f385909468ff0cf20bdd37e59f2ee49a13a966dedf921943e222082c583ade2b579ff6cd0d8faafcb5461f253e1bf2a9f48fec439211fdbe788f5 + languageName: node + linkType: hard + +"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": + version: 5.1.1-v1 + resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" + dependencies: + eslint-scope: 5.1.1 + checksum: f2e3b2d6a6e2d9f163ca22105910c9f850dc4897af0aea3ef0a5886b63d8e1ba6505b71c99cb78a3bba24a09557d601eb21c8dede3f3213753fcfef364eb0e57 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": 2.0.5 + run-parallel: ^1.1.9 + checksum: a970d595bd23c66c880e0ef1817791432dbb7acbb8d44b7e7d0e7a22f4521260d4a83f7f9fd61d44fda4610105577f8f58a60718105fb38352baed612fd79e59 + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": 2.1.5 + fastq: ^1.6.0 + checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.0 + resolution: "@npmcli/agent@npm:2.2.0" + dependencies: + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.1 + checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^1.0.0": + version: 1.1.1 + resolution: "@npmcli/fs@npm:1.1.1" + dependencies: + "@gar/promisify": ^1.0.1 + semver: ^7.3.5 + checksum: f5ad92f157ed222e4e31c352333d0901df02c7c04311e42a81d8eb555d4ec4276ea9c635011757de20cc476755af33e91622838de573b17e52e2e7703f0a9965 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@npmcli/move-file@npm:^1.0.1": + version: 1.1.2 + resolution: "@npmcli/move-file@npm:1.1.2" + dependencies: + mkdirp: ^1.0.4 + rimraf: ^3.0.2 + checksum: c96381d4a37448ea280951e46233f7e541058cf57a57d4094dd4bdcaae43fa5872b5f2eb6bfb004591a68e29c5877abe3cdc210cb3588cbf20ab2877f31a7de7 + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@pkgr/utils@npm:^2.4.2": + version: 2.4.2 + resolution: "@pkgr/utils@npm:2.4.2" + dependencies: + cross-spawn: ^7.0.3 + fast-glob: ^3.3.0 + is-glob: ^4.0.3 + open: ^9.1.0 + picocolors: ^1.0.0 + tslib: ^2.6.0 + checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc + languageName: node + linkType: hard + +"@react-native-community/cli-clean@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-clean@npm:11.3.7" + dependencies: + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + execa: ^5.0.0 + prompts: ^2.4.0 + checksum: 242260caf3a0d2ed277a01ae9ed245311434c9a57889b8a489ec38eef60b9ad84c81062e4724e6433035d83737a2e1a3cbe022ee1ca725a865aca597b2dcbdf7 + languageName: node + linkType: hard + +"@react-native-community/cli-config@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-config@npm:11.3.7" + dependencies: + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + cosmiconfig: ^5.1.0 + deepmerge: ^4.3.0 + glob: ^7.1.3 + joi: ^17.2.1 + checksum: 16ccf4e02ef2fba67394683e9cf9619c7b0bfb568841ebaf5d0275e082e6b140eb8d84b3d01c646d466e6c1c7cc8ea474916418a45cbb61ad803423e778bcbb4 + languageName: node + linkType: hard + +"@react-native-community/cli-debugger-ui@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-debugger-ui@npm:11.3.7" + dependencies: + serve-static: ^1.13.1 + checksum: 3d6b8dbeba49b039c1b6edaa883f310478178edf282aa4a6326fbb6c4a032c71d4d2d492eac1b4b8faeb2076e2eb6d4bbda35d40733ba059abb6612a71e5a841 + languageName: node + linkType: hard + +"@react-native-community/cli-doctor@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-doctor@npm:11.3.7" + dependencies: + "@react-native-community/cli-config": 11.3.7 + "@react-native-community/cli-platform-android": 11.3.7 + "@react-native-community/cli-platform-ios": 11.3.7 + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + command-exists: ^1.2.8 + envinfo: ^7.7.2 + execa: ^5.0.0 + hermes-profile-transformer: ^0.0.6 + ip: ^1.1.5 + node-stream-zip: ^1.9.1 + ora: ^5.4.1 + prompts: ^2.4.0 + semver: ^7.5.2 + strip-ansi: ^5.2.0 + sudo-prompt: ^9.0.0 + wcwidth: ^1.0.1 + yaml: ^2.2.1 + checksum: b67990e71b0859565f8443dca21c5b0d3203ffebe13be22fbbbd38fc7d8e1a6c966b89783ecbefde16e3e3d84cfecb8277104e86a8ff08338d11df1315e0fb1a + languageName: node + linkType: hard + +"@react-native-community/cli-hermes@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-hermes@npm:11.3.7" + dependencies: + "@react-native-community/cli-platform-android": 11.3.7 + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + hermes-profile-transformer: ^0.0.6 + ip: ^1.1.5 + checksum: e739ff2f891fff7b0d5ead11db05af5cf85db54f0c29ec88df8951567e556b7ce61a0fe930e936d6afab44cbcf7905c01cf73e597dae3c2cd49ef997806754b7 + languageName: node + linkType: hard + +"@react-native-community/cli-platform-android@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-platform-android@npm:11.3.7" + dependencies: + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + execa: ^5.0.0 + glob: ^7.1.3 + logkitty: ^0.7.1 + checksum: 5f2f567af3077518d487005fa322f96461f2929762c0bbce6275af97ee00a798683835d481a42477ed3430a5aa141e8fb033d913b7ddbf4ab28aae19bedec4c3 + languageName: node + linkType: hard + +"@react-native-community/cli-platform-ios@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-platform-ios@npm:11.3.7" + dependencies: + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + execa: ^5.0.0 + fast-xml-parser: ^4.0.12 + glob: ^7.1.3 + ora: ^5.4.1 + checksum: 7c067d2e42855b70efd93396ecd6a4379660f5ff0f62472b693e52e092a19b9f39aef73d9ba58cda9eac8bd47710bbee98393438ac7936b6c9d0b5c9c60a1d23 + languageName: node + linkType: hard + +"@react-native-community/cli-plugin-metro@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-plugin-metro@npm:11.3.7" + dependencies: + "@react-native-community/cli-server-api": 11.3.7 + "@react-native-community/cli-tools": 11.3.7 + chalk: ^4.1.2 + execa: ^5.0.0 + metro: 0.76.8 + metro-config: 0.76.8 + metro-core: 0.76.8 + metro-react-native-babel-transformer: 0.76.8 + metro-resolver: 0.76.8 + metro-runtime: 0.76.8 + readline: ^1.3.0 + checksum: 3504ab8df1bf16335f10088286d71facb59b932ac00500a40fe9a39c77c74b58af0912ac6e9b4c58e5cd8d94ca893e49aecc25a3415740c60be30300b2ae0460 + languageName: node + linkType: hard + +"@react-native-community/cli-server-api@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-server-api@npm:11.3.7" + dependencies: + "@react-native-community/cli-debugger-ui": 11.3.7 + "@react-native-community/cli-tools": 11.3.7 + compression: ^1.7.1 + connect: ^3.6.5 + errorhandler: ^1.5.1 + nocache: ^3.0.1 + pretty-format: ^26.6.2 + serve-static: ^1.13.1 + ws: ^7.5.1 + checksum: 86e26df7f43915bc7f10b1ae4d7f32e42ddbf6ac50b9c72f263f51dbb5d7f4b941da464094dfa2244028467c4b04ed8d3bcac7cd4191feea499dc90fcde2965a + languageName: node + linkType: hard + +"@react-native-community/cli-tools@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-tools@npm:11.3.7" + dependencies: + appdirsjs: ^1.2.4 + chalk: ^4.1.2 + find-up: ^5.0.0 + mime: ^2.4.1 + node-fetch: ^2.6.0 + open: ^6.2.0 + ora: ^5.4.1 + semver: ^7.5.2 + shell-quote: ^1.7.3 + checksum: ae9e368119be1307b341af79d72309b06acab4afd5e38dba860569e9c8c968b33e68b9a0ba02ad152e81fa7d0aa76c44e391714781107561b5119238f27e72b2 + languageName: node + linkType: hard + +"@react-native-community/cli-types@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli-types@npm:11.3.7" + dependencies: + joi: ^17.2.1 + checksum: e9d49617c0e17d40680f9cc0b271083a83de0aaf3d53acab54cf195bfa35cae35c69ec88f1cb026c9a096f8dfd5bdc12787ee3e52cf98df68a572de1859c71ea + languageName: node + linkType: hard + +"@react-native-community/cli@npm:11.3.7": + version: 11.3.7 + resolution: "@react-native-community/cli@npm:11.3.7" + dependencies: + "@react-native-community/cli-clean": 11.3.7 + "@react-native-community/cli-config": 11.3.7 + "@react-native-community/cli-debugger-ui": 11.3.7 + "@react-native-community/cli-doctor": 11.3.7 + "@react-native-community/cli-hermes": 11.3.7 + "@react-native-community/cli-plugin-metro": 11.3.7 + "@react-native-community/cli-server-api": 11.3.7 + "@react-native-community/cli-tools": 11.3.7 + "@react-native-community/cli-types": 11.3.7 + chalk: ^4.1.2 + commander: ^9.4.1 + execa: ^5.0.0 + find-up: ^4.1.0 + fs-extra: ^8.1.0 + graceful-fs: ^4.1.3 + prompts: ^2.4.0 + semver: ^7.5.2 + bin: + react-native: build/bin.js + checksum: 704e3d5e252a42a45697384b55f140b4961cbc213a90701ef163d1d0bab4fa8481ae4bf9ffe9c965114817087068186422d96d60aed479466bab036049a32866 + languageName: node + linkType: hard + +"@react-native/assets-registry@npm:^0.72.0": + version: 0.72.0 + resolution: "@react-native/assets-registry@npm:0.72.0" + checksum: 94c2b842f9fcc6e2817463dd5f26a40b69a5ff10d8d10a2af95b677f88c6645e833f985db9d85c9c3d8e66fb882b2065921ad8890fe6ac7b5eb3f9d04f6e17fa + languageName: node + linkType: hard + +"@react-native/codegen@npm:^0.72.7": + version: 0.72.7 + resolution: "@react-native/codegen@npm:0.72.7" + dependencies: + "@babel/parser": ^7.20.0 + flow-parser: ^0.206.0 + jscodeshift: ^0.14.0 + nullthrows: ^1.1.1 + peerDependencies: + "@babel/preset-env": ^7.1.6 + checksum: 7793a9da9eec18a5c68af37ad0e25000ed7f111086223bc85b08e52c79229266d5affc9e6f9cb14348e7921f0d1b96267ff63801d95bc23c55f54b57c0a9c510 + languageName: node + linkType: hard + +"@react-native/eslint-config@npm:^0.74.0": + version: 0.74.0 + resolution: "@react-native/eslint-config@npm:0.74.0" + dependencies: + "@babel/core": ^7.20.0 + "@babel/eslint-parser": ^7.20.0 + "@react-native/eslint-plugin": ^0.74.0 + "@typescript-eslint/eslint-plugin": ^6.7.4 + "@typescript-eslint/parser": ^6.7.4 + eslint-config-prettier: ^8.5.0 + eslint-plugin-eslint-comments: ^3.2.0 + eslint-plugin-ft-flow: ^2.0.1 + eslint-plugin-jest: ^26.5.3 + eslint-plugin-prettier: ^4.2.1 + eslint-plugin-react: ^7.30.1 + eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-react-native: ^4.0.0 + peerDependencies: + eslint: ">=8" + prettier: ">=2" + checksum: c384da1f3613d5c801f6be2e9e1693ecf22834b69fbfd6ddb726ce43c504def8283ac984e9c09100935f2b42f014d2202ecdb361f9bffbb5c490bb5de82c0788 + languageName: node + linkType: hard + +"@react-native/eslint-plugin@npm:^0.74.0": + version: 0.74.0 + resolution: "@react-native/eslint-plugin@npm:0.74.0" + checksum: 2ac8713e602d2ec993f03b1f5b161f0739a71a9b36bf185de48ddcdff6c1e30c61729ad48c11a963d39a60d10d2a2ecf4c4f922ef1ea40a8f2b1e8d71626fd2f + languageName: node + linkType: hard + +"@react-native/gradle-plugin@npm:^0.72.11": + version: 0.72.11 + resolution: "@react-native/gradle-plugin@npm:0.72.11" + checksum: 1688e9b0f7571f142d9bea95339f1194c043f2230fd5018b69d69487bd4efdc4a0c7bce6e93cee2ac9ff8c7a382541186ca4d68b0e5086b5f4f2e78747978144 + languageName: node + linkType: hard + +"@react-native/js-polyfills@npm:^0.72.1": + version: 0.72.1 + resolution: "@react-native/js-polyfills@npm:0.72.1" + checksum: c81b0217cefdfda5cda34acf260a862711e0c9262c2503eb155d6e16050438b387242f7232b986890cb461d01ca61a8b6dab9a9bcc75e00f5509315006028286 + languageName: node + linkType: hard + +"@react-native/normalize-color@npm:^2.0.0": + version: 2.1.0 + resolution: "@react-native/normalize-color@npm:2.1.0" + checksum: 8ccbd40b3c7629f1dc97b3e9aadd95fd3507fcf2e37535a6299a70436ab891c34cbdc4240b07380553d6e85dd909e23d5773b5be1da2906b026312e0b0768838 + languageName: node + linkType: hard + +"@react-native/normalize-colors@npm:*": + version: 0.74.1 + resolution: "@react-native/normalize-colors@npm:0.74.1" + checksum: a8625a2ed4f2595c9e1a0b0877ca8ab02dab243ced6bf98c82c328c2c125ca31dd3afd1f2940f2c114af2c309b28ad24da98aa9519a761a2df796c6968c055ec + languageName: node + linkType: hard + +"@react-native/normalize-colors@npm:^0.72.0": + version: 0.72.0 + resolution: "@react-native/normalize-colors@npm:0.72.0" + checksum: c8ec577663394a3390eb34c3cd531350521172bcfad7de309ab111e5f9e3d27c966d4a4387f00972302107be3d8cad584c5794ccfa30939aecc56162e4ddbe25 + languageName: node + linkType: hard + +"@react-native/virtualized-lists@npm:^0.72.8": + version: 0.72.8 + resolution: "@react-native/virtualized-lists@npm:0.72.8" + dependencies: + invariant: ^2.2.4 + nullthrows: ^1.1.1 + peerDependencies: + react-native: "*" + checksum: ad9628a04e72420326fd5ef09c746ad9cd6cff745b73850c7297429e3c42927043d1310896a72aa94497dc6b7f1abc2be1081b465734f7673f0e7d36aaae5e53 + languageName: node + linkType: hard + +"@reduxjs/toolkit@npm:^2.0.1": + version: 2.0.1 + resolution: "@reduxjs/toolkit@npm:2.0.1" + dependencies: + immer: ^10.0.3 + redux: ^5.0.0 + redux-thunk: ^3.1.0 + reselect: ^5.0.1 + peerDependencies: + react: ^16.9.0 || ^17.0.0 || ^18 + react-redux: ^7.2.1 || ^8.1.3 || ^9.0.0 + peerDependenciesMeta: + react: + optional: true + react-redux: + optional: true + checksum: d7e4783263dc79cb85c8d50db41209f16f0994520193ac2b378e63dc12f336cc6f58323e37d66ccf09493c49ead2f4827aac3e8d9c6ca7def21f842efb4f5f3d + languageName: node + linkType: hard + +"@segment/loosely-validate-event@npm:^2.0.0": + version: 2.0.0 + resolution: "@segment/loosely-validate-event@npm:2.0.0" + dependencies: + component-type: ^1.2.1 + join-component: ^1.1.0 + checksum: 8c4aacc903fb717619b69ca7eecf8d4a7b928661b0e835c9cd98f1b858a85ce62c348369ad9a52cb2df8df02578c0525a73fce4c69a42ac414d9554cc6be7117 + languageName: node + linkType: hard + +"@sideway/address@npm:^4.1.3": + version: 4.1.4 + resolution: "@sideway/address@npm:4.1.4" + dependencies: + "@hapi/hoek": ^9.0.0 + checksum: b9fca2a93ac2c975ba12e0a6d97853832fb1f4fb02393015e012b47fa916a75ca95102d77214b2a29a2784740df2407951af8c5dde054824c65577fd293c4cdb + languageName: node + linkType: hard + +"@sideway/formula@npm:^3.0.1": + version: 3.0.1 + resolution: "@sideway/formula@npm:3.0.1" + checksum: e4beeebc9dbe2ff4ef0def15cec0165e00d1612e3d7cea0bc9ce5175c3263fc2c818b679bd558957f49400ee7be9d4e5ac90487e1625b4932e15c4aa7919c57a + languageName: node + linkType: hard + +"@sideway/pinpoint@npm:^2.0.0": + version: 2.0.0 + resolution: "@sideway/pinpoint@npm:2.0.0" + checksum: 0f4491e5897fcf5bf02c46f5c359c56a314e90ba243f42f0c100437935daa2488f20482f0f77186bd6bf43345095a95d8143ecf8b1f4d876a7bc0806aba9c3d2 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 00bd7362a3439021aa1ea51b0e0d0a0e8ca1351a3d54c606b115fdcc49b51b16db6e5f43b4fe7a28c38688523e22a94d49dd31168868b655f0d4d50f032d07a1 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.0": + version: 3.0.0 + resolution: "@sinonjs/commons@npm:3.0.0" + dependencies: + type-detect: 4.0.8 + checksum: b4b5b73d4df4560fb8c0c7b38c7ad4aeabedd362f3373859d804c988c725889cde33550e4bcc7cd316a30f5152a2d1d43db71b6d0c38f5feef71fd8d016763f8 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.3.0 + resolution: "@sinonjs/fake-timers@npm:10.3.0" + dependencies: + "@sinonjs/commons": ^3.0.0 + checksum: 614d30cb4d5201550c940945d44c9e0b6d64a888ff2cd5b357f95ad6721070d6b8839cd10e15b76bf5e14af0bcc1d8f9ec00d49a46318f1f669a4bec1d7f3148 + languageName: node + linkType: hard + +"@testing-library/react-native@npm:^12.4.1": + version: 12.4.1 + resolution: "@testing-library/react-native@npm:12.4.1" + dependencies: + jest-matcher-utils: ^29.7.0 + pretty-format: ^29.7.0 + redent: ^3.0.0 + peerDependencies: + jest: ">=28.0.0" + react: ">=16.8.0" + react-native: ">=0.59" + react-test-renderer: ">=16.8.0" + peerDependenciesMeta: + jest: + optional: true + checksum: cd73fc33e48d3eb8f4e3e4b99b88913e4fd4f91ab33285e400146730cdfdb3ee48605cc73bd18c570a56c4d364f45c3d6c8434ed7f30d3c1b53f9730ad68813e + languageName: node + linkType: hard + +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 + languageName: node + linkType: hard + +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node10@npm:1.0.9" + checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + languageName: node + linkType: hard + +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a + languageName: node + linkType: hard + +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d + languageName: node + linkType: hard + +"@tsconfig/node16@npm:^1.0.2": + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff + languageName: node + linkType: hard + +"@types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.20.5": + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" + dependencies: + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 + "@types/babel__generator": "*" + "@types/babel__template": "*" + "@types/babel__traverse": "*" + checksum: a3226f7930b635ee7a5e72c8d51a357e799d19cbf9d445710fa39ab13804f79ab1a54b72ea7d8e504659c7dfc50675db974b526142c754398d7413aa4bc30845 + languageName: node + linkType: hard + +"@types/babel__generator@npm:*": + version: 7.6.8 + resolution: "@types/babel__generator@npm:7.6.8" + dependencies: + "@babel/types": ^7.0.0 + checksum: 5b332ea336a2efffbdeedb92b6781949b73498606ddd4205462f7d96dafd45ff3618770b41de04c4881e333dd84388bfb8afbdf6f2764cbd98be550d85c6bb48 + languageName: node + linkType: hard + +"@types/babel__template@npm:*": + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" + dependencies: + "@babel/parser": ^7.1.0 + "@babel/types": ^7.0.0 + checksum: d7a02d2a9b67e822694d8e6a7ddb8f2b71a1d6962dfd266554d2513eefbb205b33ca71a0d163b1caea3981ccf849211f9964d8bd0727124d18ace45aa6c9ae29 + languageName: node + linkType: hard + +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": + version: 7.20.4 + resolution: "@types/babel__traverse@npm:7.20.4" + dependencies: + "@babel/types": ^7.20.7 + checksum: f044ba80e00d07e46ee917c44f96cfc268fcf6d3871f7dfb8db8d3c6dab1508302f3e6bc508352a4a3ae627d2522e3fc500fa55907e0410a08e2e0902a8f3576 + languageName: node + linkType: hard + +"@types/graceful-fs@npm:^4.1.3": + version: 4.1.9 + resolution: "@types/graceful-fs@npm:4.1.9" + dependencies: + "@types/node": "*" + checksum: 79d746a8f053954bba36bd3d94a90c78de995d126289d656fb3271dd9f1229d33f678da04d10bce6be440494a5a73438e2e363e92802d16b8315b051036c5256 + languageName: node + linkType: hard + +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 3feac423fd3e5449485afac999dcfcb3d44a37c830af898b689fadc65d26526460bedb889db278e0d4d815a670331796494d073a10ee6e3a6526301fe7415778 + languageName: node + linkType: hard + +"@types/istanbul-lib-report@npm:*": + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" + dependencies: + "@types/istanbul-lib-coverage": "*" + checksum: b91e9b60f865ff08cb35667a427b70f6c2c63e88105eadd29a112582942af47ed99c60610180aa8dcc22382fa405033f141c119c69b95db78c4c709fbadfeeb4 + languageName: node + linkType: hard + +"@types/istanbul-reports@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" + dependencies: + "@types/istanbul-lib-report": "*" + checksum: 93eb18835770b3431f68ae9ac1ca91741ab85f7606f310a34b3586b5a34450ec038c3eed7ab19266635499594de52ff73723a54a72a75b9f7d6a956f01edee95 + languageName: node + linkType: hard + +"@types/jest@npm:^29.5.11": + version: 29.5.11 + resolution: "@types/jest@npm:29.5.11" + dependencies: + expect: ^29.0.0 + pretty-format: ^29.0.0 + checksum: f892a06ec9f0afa9a61cd7fa316ec614e21d4df1ad301b5a837787e046fcb40dfdf7f264a55e813ac6b9b633cb9d366bd5b8d1cea725e84102477b366df23fdd + languageName: node + linkType: hard + +"@types/jsdom@npm:^20.0.0": + version: 20.0.1 + resolution: "@types/jsdom@npm:20.0.1" + dependencies: + "@types/node": "*" + "@types/tough-cookie": "*" + parse5: ^7.0.0 + checksum: d55402c5256ef451f93a6e3d3881f98339fe73a5ac2030588df056d6835df8367b5a857b48d27528289057e26dcdd3f502edc00cb877c79174cb3a4c7f2198c1 + languageName: node + linkType: hard + +"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.9": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.10.4 + resolution: "@types/node@npm:20.10.4" + dependencies: + undici-types: ~5.26.4 + checksum: 054b296417e771ab524bea63cf3289559c6bdf290d45428f7cc68e9b00030ff7a0ece47b8c99a26b4f47a443919813bcf42beadff2f0bea7d8125fa541d92eb0 + languageName: node + linkType: hard + +"@types/prop-types@npm:*": + version: 15.7.11 + resolution: "@types/prop-types@npm:15.7.11" + checksum: 7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54 + languageName: node + linkType: hard + +"@types/react-test-renderer@npm:^18.0.7": + version: 18.0.7 + resolution: "@types/react-test-renderer@npm:18.0.7" + dependencies: + "@types/react": "*" + checksum: 701d7d815fe7b921712ebdb2c4434e99b92403d37c51b33a01ce1b62fed7d1efbf9f749971d9031a5b137c6d5e194249c378106768aa69725a01f150fef0ec7f + languageName: node + linkType: hard + +"@types/react@npm:*, @types/react@npm:~18.2.14": + version: 18.2.45 + resolution: "@types/react@npm:18.2.45" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: 40b256bdce67b026348022b4f8616a693afdad88cf493b77f7b4e6c5f4b0e4ba13a6068e690b9b94572920840ff30d501ea3d8518e1f21cc8fb8204d4b140c8a + languageName: node + linkType: hard + +"@types/scheduler@npm:*": + version: 0.16.8 + resolution: "@types/scheduler@npm:0.16.8" + checksum: 6c091b096daa490093bf30dd7947cd28e5b2cd612ec93448432b33f724b162587fed9309a0acc104d97b69b1d49a0f3fc755a62282054d62975d53d7fd13472d + languageName: node + linkType: hard + +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": + version: 7.5.6 + resolution: "@types/semver@npm:7.5.6" + checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 + languageName: node + linkType: hard + +"@types/stack-utils@npm:^2.0.0": + version: 2.0.3 + resolution: "@types/stack-utils@npm:2.0.3" + checksum: 72576cc1522090fe497337c2b99d9838e320659ac57fa5560fcbdcbafcf5d0216c6b3a0a8a4ee4fdb3b1f5e3420aa4f6223ab57b82fef3578bec3206425c6cf5 + languageName: node + linkType: hard + +"@types/tough-cookie@npm:*": + version: 4.0.5 + resolution: "@types/tough-cookie@npm:4.0.5" + checksum: f19409d0190b179331586365912920d192733112a195e870c7f18d20ac8adb7ad0b0ff69dad430dba8bc2be09593453a719cfea92dc3bda19748fd158fe1498d + languageName: node + linkType: hard + +"@types/use-sync-external-store@npm:^0.0.3": + version: 0.0.3 + resolution: "@types/use-sync-external-store@npm:0.0.3" + checksum: 161ddb8eec5dbe7279ac971531217e9af6b99f7783213566d2b502e2e2378ea19cf5e5ea4595039d730aa79d3d35c6567d48599f69773a02ffcff1776ec2a44e + languageName: node + linkType: hard + +"@types/yargs-parser@npm:*": + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: ef236c27f9432983e91432d974243e6c4cdae227cb673740320eff32d04d853eed59c92ca6f1142a335cfdc0e17cccafa62e95886a8154ca8891cc2dec4ee6fc + languageName: node + linkType: hard + +"@types/yargs@npm:^15.0.0": + version: 15.0.19 + resolution: "@types/yargs@npm:15.0.19" + dependencies: + "@types/yargs-parser": "*" + checksum: 6a509db36304825674f4f00300323dce2b4d850e75819c3db87e9e9f213ac2c4c6ed3247a3e4eed6e8e45b3f191b133a356d3391dd694d9ea27a0507d914ef4c + languageName: node + linkType: hard + +"@types/yargs@npm:^16.0.0": + version: 16.0.9 + resolution: "@types/yargs@npm:16.0.9" + dependencies: + "@types/yargs-parser": "*" + checksum: 00d9276ed4e0f17a78c1ed57f644a8c14061959bd5bfab113d57f082ea4b663ba97f71b89371304a34a2dba5061e9ae4523e357e577ba61834d661f82c223bf8 + languageName: node + linkType: hard + +"@types/yargs@npm:^17.0.8": + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" + dependencies: + "@types/yargs-parser": "*" + checksum: 4505bdebe8716ff383640c6e928f855b5d337cb3c68c81f7249fc6b983d0aa48de3eee26062b84f37e0d75a5797bc745e0c6e76f42f81771252a758c638f36ba + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:^6.14.0, @typescript-eslint/eslint-plugin@npm:^6.7.4": + version: 6.14.0 + resolution: "@typescript-eslint/eslint-plugin@npm:6.14.0" + dependencies: + "@eslint-community/regexpp": ^4.5.1 + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/type-utils": 6.14.0 + "@typescript-eslint/utils": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.4 + natural-compare: ^1.4.0 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependencies: + "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: ec688fd71b21576bfe0e4176889fddf3c13d8b07792461b84017d689ed11a9bffbf4d2ab61e9bdb254e43d2c1e159d5c2fc21bdfa6a6c2d64f9e1956a668fbe8 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^6.14.0, @typescript-eslint/parser@npm:^6.7.4": + version: 6.14.0 + resolution: "@typescript-eslint/parser@npm:6.14.0" + dependencies: + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/typescript-estree": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 5fbe8d7431654c14ba6c9782d3728026ad5c90e02c9c4319f45df972e653cf5c15ba320dce70cdffa9fb7ce4c4263c37585e7bc1c909d1252d0a599880963063 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + checksum: 6062d6b797fe1ce4d275bb0d17204c827494af59b5eaf09d8a78cdd39dadddb31074dded4297aaf5d0f839016d601032857698b0e4516c86a41207de606e9573 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/scope-manager@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + checksum: 0b577d42db925426a9838fe61703c226e18b697374fbe20cf9b93ba30fe58bf4a7f7f42491a4d24b7f3cc12d9a189fe3524c0e9b7708727e710d95b908250a14 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/type-utils@npm:6.14.0" + dependencies: + "@typescript-eslint/typescript-estree": 6.14.0 + "@typescript-eslint/utils": 6.14.0 + debug: ^4.3.4 + ts-api-utils: ^1.0.1 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 09988f25279598840673c41ba44b03756f2dfb31284ab72af97c170711a0f31e5c53d6b120aa83f31438565e82aae1a1ca4d1ed0de4890654dd6a6a33d88202c + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 48c87117383d1864766486f24de34086155532b070f6264e09d0e6139449270f8a9559cfef3c56d16e3bcfb52d83d42105d61b36743626399c7c2b5e0ac3b670 + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/types@npm:6.14.0" + checksum: 624e6c5227f596dcc9757348d09c5a09b846a62938b8b4409614cf8108013b64ed8b270c32e87ea8890dd09ed896b82e92872c3574dbf07dcda11a168d69dd1f + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 3624520abb5807ed8f57b1197e61c7b1ed770c56dfcaca66372d584ff50175225798bccb701f7ef129d62c5989070e1ee3a0aa2d84e56d9524dcf011a2bb1a52 + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/typescript-estree@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/visitor-keys": 6.14.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependenciesMeta: + typescript: + optional: true + checksum: 495d7616463685bfd8138ffa9fbc0a7f9130ff8a3f6f85775960b4f0a3fdc259ae53b104cdfe562b60310860b5a6c8387307790734555084aa087e3bb9c28a69 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/utils@npm:6.14.0" + dependencies: + "@eslint-community/eslint-utils": ^4.4.0 + "@types/json-schema": ^7.0.12 + "@types/semver": ^7.5.0 + "@typescript-eslint/scope-manager": 6.14.0 + "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/typescript-estree": 6.14.0 + semver: ^7.5.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: 36e8501cb85647947189f31017c36d6f6ac7ef0399fa0e18eb64f1b83e00f1e8ace1d9ac5015ef4d9c1b820179f1def8d61d7ea9e5d61433eb848cf5c49dc8b0 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:^5.10.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + eslint-scope: ^5.1.1 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + eslint-visitor-keys: ^3.3.0 + checksum: 976b05d103fe8335bef5c93ad3f76d781e3ce50329c0243ee0f00c0fcfb186c81df50e64bfdd34970148113f8ade90887f53e3c4938183afba830b4ba8e30a35 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:6.14.0": + version: 6.14.0 + resolution: "@typescript-eslint/visitor-keys@npm:6.14.0" + dependencies: + "@typescript-eslint/types": 6.14.0 + eslint-visitor-keys: ^3.4.1 + checksum: fc593c4e94d5739be7bd88e42313a301bc9806fad758b6a0a1bafd296ff41522be602caf4976beec84e363b0f56585bb98df3c157f70de984de721798501fd8a + languageName: node + linkType: hard + +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 4f656b7b4672f2ce6e272f2427d8b0824ed11546a601d8d5412b9d7704e83db38a8d9f402ecdf2b9063fc164af842ad0ec4a55819f621ed7e7ea4d1efcc74524 + languageName: node + linkType: hard + +"@urql/core@npm:2.3.6": + version: 2.3.6 + resolution: "@urql/core@npm:2.3.6" + dependencies: + "@graphql-typed-document-node/core": ^3.1.0 + wonka: ^4.0.14 + peerDependencies: + graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + checksum: 39b10abc9b600cf698bc702b9b678cf8cf4851faa8041be6fe26e439a18a447f8f39049cd2a9b188076cbd272ead62286ea05294c5de14719e7799caa8c44942 + languageName: node + linkType: hard + +"@urql/core@npm:>=2.3.1": + version: 4.2.2 + resolution: "@urql/core@npm:4.2.2" + dependencies: + "@0no-co/graphql.web": ^1.0.1 + wonka: ^6.3.2 + checksum: 5ac5b1101f2db160968c945529d16d640b7761a4edbb320abe2bd31cab83cce424db6f833e368885882da75c5f9bf94f408ff0003662d6c845bbd6d6e660004d + languageName: node + linkType: hard + +"@urql/exchange-retry@npm:0.3.0": + version: 0.3.0 + resolution: "@urql/exchange-retry@npm:0.3.0" + dependencies: + "@urql/core": ">=2.3.1" + wonka: ^4.0.14 + peerDependencies: + graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 + checksum: 7638518e809da750f89bc59343b3a1f7fea2927110a2aab39701ae36c7c1bc5953f5a536a47402d4febbfc227fd0c729844b58d72efb283ed8aa73c20c26ef25 + languageName: node + linkType: hard + +"@xmldom/xmldom@npm:^0.8.8": + version: 0.8.10 + resolution: "@xmldom/xmldom@npm:0.8.10" + checksum: 4c136aec31fb3b49aaa53b6fcbfe524d02a1dc0d8e17ee35bd3bf35e9ce1344560481cd1efd086ad1a4821541482528672306d5e37cdbd187f33d7fadd3e2cf0 + languageName: node + linkType: hard + +"@xmldom/xmldom@npm:~0.7.7": + version: 0.7.13 + resolution: "@xmldom/xmldom@npm:0.7.13" + checksum: b4054078530e5fa8ede9677425deff0fce6d965f4c477ca73f8490d8a089e60b8498a15560425a1335f5ff99ecb851ed2c734b0a9a879299a5694302f212f37a + languageName: node + linkType: hard + +"abab@npm:^2.0.6": + version: 2.0.6 + resolution: "abab@npm:2.0.6" + checksum: 6ffc1af4ff315066c62600123990d87551ceb0aafa01e6539da77b0f5987ac7019466780bf480f1787576d4385e3690c81ccc37cfda12819bf510b8ab47e5a3e + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + +"abort-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "abort-controller@npm:3.0.0" + dependencies: + event-target-shim: ^5.0.0 + checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75 + languageName: node + linkType: hard + +"accepts@npm:^1.3.7, accepts@npm:^1.3.8, accepts@npm:~1.3.5, accepts@npm:~1.3.7": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" + dependencies: + mime-types: ~2.1.34 + negotiator: 0.6.3 + checksum: 50c43d32e7b50285ebe84b613ee4a3aa426715a7d131b65b786e2ead0fd76b6b60091b9916d3478a75f11f162628a2139991b6c03ab3f1d9ab7c86075dc8eab4 + languageName: node + linkType: hard + +"acorn-globals@npm:^7.0.0": + version: 7.0.1 + resolution: "acorn-globals@npm:7.0.1" + dependencies: + acorn: ^8.1.0 + acorn-walk: ^8.0.2 + checksum: 2a2998a547af6d0db5f0cdb90acaa7c3cbca6709010e02121fb8b8617c0fbd8bab0b869579903fde358ac78454356a14fadcc1a672ecb97b04b1c2ccba955ce8 + languageName: node + linkType: hard + +"acorn-jsx@npm:^5.3.2": + version: 5.3.2 + resolution: "acorn-jsx@npm:5.3.2" + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: c3d3b2a89c9a056b205b69530a37b972b404ee46ec8e5b341666f9513d3163e2a4f214a71f4dfc7370f5a9c07472d2fd1c11c91c3f03d093e37637d95da98950 + languageName: node + linkType: hard + +"acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1": + version: 8.3.1 + resolution: "acorn-walk@npm:8.3.1" + checksum: 5c8926ddb5400bc825b6baca782931f9df4ace603ba1a517f5243290fd9cdb089d52877840687b5d5c939591ebc314e2e63721514feaa37c6829c828f2b940ce + languageName: node + linkType: hard + +"acorn@npm:^8.1.0, acorn@npm:^8.4.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.11.2 + resolution: "acorn@npm:8.11.2" + bin: + acorn: bin/acorn + checksum: 818450408684da89423e3daae24e4dc9b68692db8ab49ea4569c7c5abb7a3f23669438bf129cc81dfdada95e1c9b944ee1bfca2c57a05a4dc73834a612fbf6a7 + languageName: node + linkType: hard + +"agent-base@npm:6": + version: 6.0.2 + resolution: "agent-base@npm:6.0.2" + dependencies: + debug: 4 + checksum: f52b6872cc96fd5f622071b71ef200e01c7c4c454ee68bc9accca90c98cfb39f2810e3e9aa330435835eedc8c23f4f8a15267f67c6e245d2b33757575bdac49d + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" + dependencies: + debug: ^4.3.4 + checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: ^2.0.0 + indent-string: ^4.0.0 + checksum: 1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv@npm:^6.12.4": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: ^3.1.1 + fast-json-stable-stringify: ^2.0.0 + json-schema-traverse: ^0.4.1 + uri-js: ^4.2.2 + checksum: 874972efe5c4202ab0a68379481fbd3d1b5d0a7bd6d3cc21d40d3536ebff3352a2a1fabb632d4fd2cc7fe4cbdcd5ed6782084c9bbf7f32a1536d18f9da5007d4 + languageName: node + linkType: hard + +"anser@npm:^1.4.9": + version: 1.4.10 + resolution: "anser@npm:1.4.10" + checksum: 3823c64f8930d3d97f36e56cdf646fa6351f1227e25eee70c3a17697447cae4238fc3a309bb3bc2003cf930687fa72aed71426dbcf3c0a15565e120a7fee5507 + languageName: node + linkType: hard + +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.2": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: ^0.21.3 + checksum: 93111c42189c0a6bed9cdb4d7f2829548e943827ee8479c74d6e0b22ee127b2a21d3f8b5ca57723b8ef78ce011fbfc2784350eb2bde3ccfccf2f575fa8489815 + languageName: node + linkType: hard + +"ansi-escapes@npm:^6.0.0": + version: 6.2.0 + resolution: "ansi-escapes@npm:6.2.0" + dependencies: + type-fest: ^3.0.0 + checksum: f0bc667d5f1ededc3ea89b73c34f0cba95473525b07e1290ddfd3fc868c94614e95f3549f5c4fd0c05424af7d3fd298101fb3d9a52a597d3782508b340783bd7 + languageName: node + linkType: hard + +"ansi-fragments@npm:^0.2.1": + version: 0.2.1 + resolution: "ansi-fragments@npm:0.2.1" + dependencies: + colorette: ^1.0.7 + slice-ansi: ^2.0.0 + strip-ansi: ^5.0.0 + checksum: 22c3eb8a0aec6bcc15f4e78d77a264ee0c92160b09c94260d1161d051eb8c77c7ecfeb3c8ec44ca180bad554fef3489528c509a644a7589635fc36bcaf08234f + languageName: node + linkType: hard + +"ansi-regex@npm:^4.1.0": + version: 4.1.1 + resolution: "ansi-regex@npm:4.1.1" + checksum: b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.0, ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: ^1.9.0 + checksum: d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: ^2.0.1 + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"ansi-styles@npm:^5.0.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 + languageName: node + linkType: hard + +"any-promise@npm:^1.0.0": + version: 1.3.0 + resolution: "any-promise@npm:1.3.0" + checksum: 0ee8a9bdbe882c90464d75d1f55cf027f5458650c4bd1f0467e65aec38ccccda07ca5844969ee77ed46d04e7dded3eaceb027e8d32f385688523fe305fa7e1de + languageName: node + linkType: hard + +"anymatch@npm:^3.0.3": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: ^3.0.0 + picomatch: ^2.0.4 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"appdirsjs@npm:^1.2.4": + version: 1.2.7 + resolution: "appdirsjs@npm:1.2.7" + checksum: 3411b4e31edf8687ad69638ef81b92b4889ad31e527b673a364990c28c99b6b8c3ea81b2b2b636d5b08e166a18706c4464fd8436b298f85384d499ba6b8dc4b7 + languageName: node + linkType: hard + +"application-config-path@npm:^0.1.0": + version: 0.1.1 + resolution: "application-config-path@npm:0.1.1" + checksum: e478c1e4d515108de89693165d92dab11cfdc69dd0f3ccde034f14a3f4e50007946de9e4dd51cd77d2f7ba9752e75d8e4d937ef053a53e466425d9751c961a37 + languageName: node + linkType: hard + +"arg@npm:4.1.0": + version: 4.1.0 + resolution: "arg@npm:4.1.0" + checksum: ea97513bf27aa5f2acf5dadf41501108fe786631fdd9d33f373174631800b57f85272dbf8190e937008a02b38d5c2f679514146f89a23123d8cb4ba30e8c066c + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: ~1.0.2 + checksum: 7ca6e45583a28de7258e39e13d81e925cfa25d7d4aacbf806a382d3c02fcb13403a07fb8aeef949f10a7cfe4a62da0e2e807b348a5980554cc28ee573ef95945 + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced + languageName: node + linkType: hard + +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + +"array-includes@npm:^3.1.6": + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-string: ^1.0.7 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc + languageName: node + linkType: hard + +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.3.1": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: 5d6b4bf102065fb3f43764bfff6feb3295d372ce89591e6005df3d0ce388527a9f03c909af6f2a973969a4d178ab232ffc9236654149173e0e187ec3a1a6b87b + languageName: node + linkType: hard + +"array.prototype.flatmap@npm:^1.3.1": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: ce09fe21dc0bcd4f30271f8144083aa8c13d4639074d6c8dc82054b847c7fc9a0c97f857491f4da19d4003e507172a78f4bcd12903098adac8b9cd374f734be3 + languageName: node + linkType: hard + +"array.prototype.tosorted@npm:^1.1.1": + version: 1.1.2 + resolution: "array.prototype.tosorted@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + get-intrinsic: ^1.2.1 + checksum: 3607a7d6b117f0ffa6f4012457b7af0d47d38cf05e01d50e09682fd2fb782a66093a5e5fbbdbad77c8c824794a9d892a51844041641f719ad41e3a974f0764de + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.2": + version: 1.0.2 + resolution: "arraybuffer.prototype.slice@npm:1.0.2" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-array-buffer: ^3.0.2 + is-shared-array-buffer: ^1.0.2 + checksum: c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 + languageName: node + linkType: hard + +"asap@npm:~2.0.3, asap@npm:~2.0.6": + version: 2.0.6 + resolution: "asap@npm:2.0.6" + checksum: b296c92c4b969e973260e47523207cd5769abd27c245a68c26dc7a0fe8053c55bb04360237cb51cab1df52be939da77150ace99ad331fb7fb13b3423ed73ff3d + languageName: node + linkType: hard + +"ast-types@npm:0.15.2": + version: 0.15.2 + resolution: "ast-types@npm:0.15.2" + dependencies: + tslib: ^2.0.1 + checksum: 24f0d86bf9e4c8dae16fa24b13c1776f2c2677040bcfbd4eb4f27911db49020be4876885e45e6cfcc548ed4dfea3a0742d77e3346b84fae47379cb0b89e9daa0 + languageName: node + linkType: hard + +"astral-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "astral-regex@npm:1.0.0" + checksum: 93417fc0879531cd95ace2560a54df865c9461a3ac0714c60cbbaa5f1f85d2bee85489e78d82f70b911b71ac25c5f05fc5a36017f44c9bb33c701bee229ff848 + languageName: node + linkType: hard + +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + +"async@npm:^3.2.2": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 5ec77f1312301dee02d62140a6b1f7ee0edd2a0f983b6fd2b0849b969f245225b990b47b8243e7b9ad16451a53e7f68e753700385b706198ced888beedba3af4 + languageName: node + linkType: hard + +"asynciterator.prototype@npm:^1.0.0": + version: 1.0.0 + resolution: "asynciterator.prototype@npm:1.0.0" + dependencies: + has-symbols: ^1.0.3 + checksum: e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 + languageName: node + linkType: hard + +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"at-least-node@npm:^1.0.0": + version: 1.0.0 + resolution: "at-least-node@npm:1.0.0" + checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e + languageName: node + linkType: hard + +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a + languageName: node + linkType: hard + +"babel-core@npm:^7.0.0-bridge.0": + version: 7.0.0-bridge.0 + resolution: "babel-core@npm:7.0.0-bridge.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2a1cb879019dffb08d17bec36e13c3a6d74c94773f41c1fd8b14de13f149cc34b705b0a1e07b42fcf35917b49d78db6ff0c5c3b00b202a5235013d517b5c6bbb + languageName: node + linkType: hard + +"babel-jest@npm:^29.2.1, babel-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "babel-jest@npm:29.7.0" + dependencies: + "@jest/transform": ^29.7.0 + "@types/babel__core": ^7.1.14 + babel-plugin-istanbul: ^6.1.1 + babel-preset-jest: ^29.6.3 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + slash: ^3.0.0 + peerDependencies: + "@babel/core": ^7.8.0 + checksum: ee6f8e0495afee07cac5e4ee167be705c711a8cc8a737e05a587a131fdae2b3c8f9aa55dfd4d9c03009ac2d27f2de63d8ba96d3e8460da4d00e8af19ef9a83f7 + languageName: node + linkType: hard + +"babel-plugin-istanbul@npm:^6.1.1": + version: 6.1.1 + resolution: "babel-plugin-istanbul@npm:6.1.1" + dependencies: + "@babel/helper-plugin-utils": ^7.0.0 + "@istanbuljs/load-nyc-config": ^1.0.0 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-instrument: ^5.0.4 + test-exclude: ^6.0.0 + checksum: cb4fd95738219f232f0aece1116628cccff16db891713c4ccb501cddbbf9272951a5df81f2f2658dfdf4b3e7b236a9d5cbcf04d5d8c07dd5077297339598061a + languageName: node + linkType: hard + +"babel-plugin-jest-hoist@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-plugin-jest-hoist@npm:29.6.3" + dependencies: + "@babel/template": ^7.3.3 + "@babel/types": ^7.3.3 + "@types/babel__core": ^7.1.14 + "@types/babel__traverse": ^7.0.6 + checksum: 51250f22815a7318f17214a9d44650ba89551e6d4f47a2dc259128428324b52f5a73979d010cefd921fd5a720d8c1d55ad74ff601cd94c7bd44d5f6292fde2d1 + languageName: node + linkType: hard + +"babel-plugin-module-resolver@npm:^5.0.0": + version: 5.0.0 + resolution: "babel-plugin-module-resolver@npm:5.0.0" + dependencies: + find-babel-config: ^2.0.0 + glob: ^8.0.3 + pkg-up: ^3.1.0 + reselect: ^4.1.7 + resolve: ^1.22.1 + checksum: d6880e49fc8e7bac509a2c183b4303ee054a47a80032a59a6f7844bb468ebe5e333b5dc5378443afdab5839e2da2b31a6c8d9a985a0047cd076b82bb9161cc78 + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs2@npm:^0.4.6": + version: 0.4.7 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.7" + dependencies: + "@babel/compat-data": ^7.22.6 + "@babel/helper-define-polyfill-provider": ^0.4.4 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: b3c84ce44d00211c919a94f76453fb2065861612f3e44862eb7acf854e325c738a7441ad82690deba2b6fddfa2ad2cf2c46960f46fab2e3b17c6ed4fd2d73b38 + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs3@npm:^0.8.5": + version: 0.8.7 + resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.4 + core-js-compat: ^3.33.1 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 51bc215ab0c062bbb2225d912f69f8a6705d1837c8e01f9651307b5b937804287c1d73ebd8015689efcc02c3c21f37688b9ee6f5997635619b7a9cc4b7d9908d + languageName: node + linkType: hard + +"babel-plugin-polyfill-regenerator@npm:^0.5.3": + version: 0.5.4 + resolution: "babel-plugin-polyfill-regenerator@npm:0.5.4" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.4 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 461b735c6c0eca3c7b4434d14bfa98c2ab80f00e2bdc1c69eb46d1d300092a9786d76bbd3ee55e26d2d1a2380c14592d8d638e271dfd2a2b78a9eacffa3645d1 + languageName: node + linkType: hard + +"babel-plugin-react-native-web@npm:~0.18.10": + version: 0.18.12 + resolution: "babel-plugin-react-native-web@npm:0.18.12" + checksum: 9770341df1011b0e8e9b6a24bc18c05678c7d8b8db7d64e2cf56ab66b9c2988404902543ee7c4e222ed751faa865b4907ad5fac6f6ae6a38fbe16a50aa5975bd + languageName: node + linkType: hard + +"babel-plugin-syntax-trailing-function-commas@npm:^7.0.0-beta.0": + version: 7.0.0-beta.0 + resolution: "babel-plugin-syntax-trailing-function-commas@npm:7.0.0-beta.0" + checksum: e37509156ca945dd9e4b82c66dd74f2d842ad917bd280cb5aa67960942300cd065eeac476d2514bdcdedec071277a358f6d517c31d9f9244d9bbc3619a8ecf8a + languageName: node + linkType: hard + +"babel-plugin-transform-flow-enums@npm:^0.0.2": + version: 0.0.2 + resolution: "babel-plugin-transform-flow-enums@npm:0.0.2" + dependencies: + "@babel/plugin-syntax-flow": ^7.12.1 + checksum: fd52aef54448e01948a9d1cca0c8f87d064970c8682458962b7a222c372704bc2ce26ae8109e0ab2566e7ea5106856460f04c1a5ed794ab3bcd2f42cae1d9845 + languageName: node + linkType: hard + +"babel-preset-current-node-syntax@npm:^1.0.0": + version: 1.0.1 + resolution: "babel-preset-current-node-syntax@npm:1.0.1" + dependencies: + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-bigint": ^7.8.3 + "@babel/plugin-syntax-class-properties": ^7.8.3 + "@babel/plugin-syntax-import-meta": ^7.8.3 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.8.3 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.8.3 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-top-level-await": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: d118c2742498c5492c095bc8541f4076b253e705b5f1ad9a2e7d302d81a84866f0070346662355c8e25fc02caa28dc2da8d69bcd67794a0d60c4d6fab6913cc8 + languageName: node + linkType: hard + +"babel-preset-expo@npm:~9.5.2": + version: 9.5.2 + resolution: "babel-preset-expo@npm:9.5.2" + dependencies: + "@babel/plugin-proposal-decorators": ^7.12.9 + "@babel/plugin-proposal-export-namespace-from": ^7.18.9 + "@babel/plugin-proposal-object-rest-spread": ^7.12.13 + "@babel/plugin-transform-react-jsx": ^7.12.17 + "@babel/preset-env": ^7.20.0 + babel-plugin-module-resolver: ^5.0.0 + babel-plugin-react-native-web: ~0.18.10 + metro-react-native-babel-preset: 0.76.8 + checksum: 7dc9972f81b3ddbc7504fca10198a592e5ac02323617154240f28096549da1e2ad079e615c3013443676b8e6fded25e1bf93c1468d3d5f55f678787fab3d51ad + languageName: node + linkType: hard + +"babel-preset-fbjs@npm:^3.4.0": + version: 3.4.0 + resolution: "babel-preset-fbjs@npm:3.4.0" + dependencies: + "@babel/plugin-proposal-class-properties": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.0.0 + "@babel/plugin-syntax-class-properties": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.0.0 + "@babel/plugin-syntax-jsx": ^7.0.0 + "@babel/plugin-syntax-object-rest-spread": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-block-scoped-functions": ^7.0.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.0.0 + "@babel/plugin-transform-flow-strip-types": ^7.0.0 + "@babel/plugin-transform-for-of": ^7.0.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-member-expression-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-object-super": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-property-literals": ^7.0.0 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-template-literals": ^7.0.0 + babel-plugin-syntax-trailing-function-commas: ^7.0.0-beta.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: b3352cf690729125997f254bc31b9c4db347f8646f1571958ced1c45f0da89439e183e1c88e35397eb0361b9e1fbb1dd8142d3f4647814deb427e53c54f44d5f + languageName: node + linkType: hard + +"babel-preset-jest@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-preset-jest@npm:29.6.3" + dependencies: + babel-plugin-jest-hoist: ^29.6.3 + babel-preset-current-node-syntax: ^1.0.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base64-js@npm:^1.1.2, base64-js@npm:^1.2.3, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"better-opn@npm:~3.0.2": + version: 3.0.2 + resolution: "better-opn@npm:3.0.2" + dependencies: + open: ^8.0.4 + checksum: 1471552fa7f733561e7f49e812be074b421153006ca744de985fb6d38939807959fc5fe9cb819cf09f864782e294704fd3b31711ea14c115baf3330a2f1135de + languageName: node + linkType: hard + +"big-integer@npm:1.6.x, big-integer@npm:^1.6.44": + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 6e86885787a20fed96521958ae9086960e4e4b5e74d04f3ef7513d4d0ad631a9f3bde2730fc8aaa4b00419fc865f6ec573e5320234531ef37505da7da192c40b + languageName: node + linkType: hard + +"bl@npm:^4.1.0": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 + languageName: node + linkType: hard + +"blueimp-md5@npm:^2.10.0": + version: 2.19.0 + resolution: "blueimp-md5@npm:2.19.0" + checksum: 28095dcbd2c67152a2938006e8d7c74c3406ba6556071298f872505432feb2c13241b0476644160ee0a5220383ba94cb8ccdac0053b51f68d168728f9c382530 + languageName: node + linkType: hard + +"body-parser@npm:^1.20.1": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" + dependencies: + bytes: 3.1.2 + content-type: ~1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.2 + type-is: ~1.6.18 + unpipe: 1.0.0 + checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737 + languageName: node + linkType: hard + +"bplist-creator@npm:0.1.0": + version: 0.1.0 + resolution: "bplist-creator@npm:0.1.0" + dependencies: + stream-buffers: 2.2.x + checksum: d4ccd88ea16c9d50c2e99f484a5f5bed34d172f6f704463585c0c9c993fd01ddb5b30d6ef486dd9393ffba3c686727f6296e8adf826ce01705bd3741477ce955 + languageName: node + linkType: hard + +"bplist-parser@npm:0.3.1": + version: 0.3.1 + resolution: "bplist-parser@npm:0.3.1" + dependencies: + big-integer: 1.6.x + checksum: 7cabc5beadb7530f100cfdcce2b2f1d5d1674309b20f281b9b376022b2de55e86904598f1fd67254ec7f6ac1b74d67dc92c3445eb4cef5dec21c36c58d4a1106 + languageName: node + linkType: hard + +"bplist-parser@npm:^0.2.0": + version: 0.2.0 + resolution: "bplist-parser@npm:0.2.0" + dependencies: + big-integer: ^1.6.44 + checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd + languageName: node + linkType: hard + +"bplist-parser@npm:^0.3.1": + version: 0.3.2 + resolution: "bplist-parser@npm:0.3.2" + dependencies: + big-integer: 1.6.x + checksum: fad0f6eb155a9b636b4096a1725ce972a0386490d7d38df7be11a3a5645372446b7c44aacbc6626d24d2c17d8b837765361520ebf2960aeffcaf56765811620e + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: ^1.0.0 + concat-map: 0.0.1 + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: ^1.0.0 + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:^3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: ^7.0.1 + checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + languageName: node + linkType: hard + +"browserslist@npm:^4.22.2": + version: 4.22.2 + resolution: "browserslist@npm:4.22.2" + dependencies: + caniuse-lite: ^1.0.30001565 + electron-to-chromium: ^1.4.601 + node-releases: ^2.0.14 + update-browserslist-db: ^1.0.13 + bin: + browserslist: cli.js + checksum: 33ddfcd9145220099a7a1ac533cecfe5b7548ffeb29b313e1b57be6459000a1f8fa67e781cf4abee97268ac594d44134fcc4a6b2b4750ceddc9796e3a22076d9 + languageName: node + linkType: hard + +"bser@npm:2.1.1": + version: 2.1.1 + resolution: "bser@npm:2.1.1" + dependencies: + node-int64: ^0.4.0 + checksum: 9ba4dc58ce86300c862bffc3ae91f00b2a03b01ee07f3564beeeaf82aa243b8b03ba53f123b0b842c190d4399b94697970c8e7cf7b1ea44b61aa28c3526a4449 + languageName: node + linkType: hard + +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.1.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.1.13 + checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 + languageName: node + linkType: hard + +"builtins@npm:^1.0.3": + version: 1.0.3 + resolution: "builtins@npm:1.0.3" + checksum: 47ce94f7eee0e644969da1f1a28e5f29bd2e48b25b2bbb61164c345881086e29464ccb1fb88dbc155ea26e8b1f5fc8a923b26c8c1ed0935b67b644d410674513 + languageName: node + linkType: hard + +"bundle-name@npm:^3.0.0": + version: 3.0.0 + resolution: "bundle-name@npm:3.0.0" + dependencies: + run-applescript: ^5.0.0 + checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615 + languageName: node + linkType: hard + +"bytes@npm:3.0.0": + version: 3.0.0 + resolution: "bytes@npm:3.0.0" + checksum: a2b386dd8188849a5325f58eef69c3b73c51801c08ffc6963eddc9be244089ba32d19347caf6d145c86f315ae1b1fc7061a32b0c1aa6379e6a719090287ed101 + languageName: node + linkType: hard + +"bytes@npm:3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: e4bcd3948d289c5127591fbedf10c0b639ccbf00243504e4e127374a15c3bc8eed0d28d4aaab08ff6f1cf2abc0cce6ba3085ed32f4f90e82a5683ce0014e1b6e + languageName: node + linkType: hard + +"cacache@npm:^15.3.0": + version: 15.3.0 + resolution: "cacache@npm:15.3.0" + dependencies: + "@npmcli/fs": ^1.0.0 + "@npmcli/move-file": ^1.0.1 + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + glob: ^7.1.4 + infer-owner: ^1.0.4 + lru-cache: ^6.0.0 + minipass: ^3.1.1 + minipass-collect: ^1.0.2 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.2 + mkdirp: ^1.0.3 + p-map: ^4.0.0 + promise-inflight: ^1.0.1 + rimraf: ^3.0.2 + ssri: ^8.0.1 + tar: ^6.0.2 + unique-filename: ^1.1.1 + checksum: a07327c27a4152c04eb0a831c63c00390d90f94d51bb80624a66f4e14a6b6360bbf02a84421267bd4d00ca73ac9773287d8d7169e8d2eafe378d2ce140579db8 + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.1 + resolution: "cacache@npm:18.0.1" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" + dependencies: + function-bind: ^1.1.2 + get-intrinsic: ^1.2.1 + set-function-length: ^1.1.1 + checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + languageName: node + linkType: hard + +"caller-callsite@npm:^2.0.0": + version: 2.0.0 + resolution: "caller-callsite@npm:2.0.0" + dependencies: + callsites: ^2.0.0 + checksum: b685e9d126d9247b320cfdfeb3bc8da0c4be28d8fb98c471a96bc51aab3130099898a2fe3bf0308f0fe048d64c37d6d09f563958b9afce1a1e5e63d879c128a2 + languageName: node + linkType: hard + +"caller-path@npm:^2.0.0": + version: 2.0.0 + resolution: "caller-path@npm:2.0.0" + dependencies: + caller-callsite: ^2.0.0 + checksum: 3e12ccd0c71ec10a057aac69e3ec175b721ca858c640df021ef0d25999e22f7c1d864934b596b7d47038e9b56b7ec315add042abbd15caac882998b50102fb12 + languageName: node + linkType: hard + +"callsites@npm:^2.0.0": + version: 2.0.0 + resolution: "callsites@npm:2.0.0" + checksum: be2f67b247df913732b7dec1ec0bbfcdbaea263e5a95968b19ec7965affae9496b970e3024317e6d4baa8e28dc6ba0cec03f46fdddc2fdcc51396600e53c2623 + languageName: node + linkType: hard + +"callsites@npm:^3.0.0": + version: 3.1.0 + resolution: "callsites@npm:3.1.0" + checksum: 072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.2.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001565": + version: 1.0.30001570 + resolution: "caniuse-lite@npm:1.0.30001570" + checksum: 460be2c7a9b1c8a83b6aae4226661c276d9dada6c84209dee547699cf4b28030b9d1fc29ddd7626acee77412b6401993878ea0ef3eadbf3a63ded9034896ae20 + languageName: node + linkType: hard + +"chalk@npm:^2.0.1, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: ^3.2.1 + escape-string-regexp: ^1.0.5 + supports-color: ^5.3.0 + checksum: ec3661d38fe77f681200f878edbd9448821924e0f93a9cefc0e26a33b145f1027a2084bf19967160d11e1f03bfe4eaffcabf5493b89098b2782c3fe0b03d80c2 + languageName: node + linkType: hard + +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + +"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: b563e4b6039b15213114626621e7a3d12f31008bdce20f9c741d69987f62aeaace7ec30f6018890ad77b2e9b4d95324c9f5acfca58a9441e3b1dcdd1e2525d17 + languageName: node + linkType: hard + +"char-regex@npm:^2.0.0": + version: 2.0.1 + resolution: "char-regex@npm:2.0.1" + checksum: 8524c03fd7e58381dccf33babe885fe62731ae20755528b19c39945b8203479184f35247210dc9eeeef279cdbdd6511cd3182e0e1db8e4549bf2586470b7c204 + languageName: node + linkType: hard + +"charenc@npm:0.0.2, charenc@npm:~0.0.1": + version: 0.0.2 + resolution: "charenc@npm:0.0.2" + checksum: 81dcadbe57e861d527faf6dd3855dc857395a1c4d6781f4847288ab23cffb7b3ee80d57c15bba7252ffe3e5e8019db767757ee7975663ad2ca0939bb8fcaf2e5 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"ci-info@npm:^2.0.0": + version: 2.0.0 + resolution: "ci-info@npm:2.0.0" + checksum: 3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 + languageName: node + linkType: hard + +"ci-info@npm:^3.2.0, ci-info@npm:^3.3.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87 + languageName: node + linkType: hard + +"cjs-module-lexer@npm:^1.0.0": + version: 1.2.3 + resolution: "cjs-module-lexer@npm:1.2.3" + checksum: 5ea3cb867a9bb609b6d476cd86590d105f3cfd6514db38ff71f63992ab40939c2feb68967faa15a6d2b1f90daa6416b79ea2de486e9e2485a6f8b66a21b4fb0a + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cli-cursor@npm:^2.1.0": + version: 2.1.0 + resolution: "cli-cursor@npm:2.1.0" + dependencies: + restore-cursor: ^2.0.0 + checksum: d88e97bfdac01046a3ffe7d49f06757b3126559d7e44aa2122637eb179284dc6cd49fca2fac4f67c19faaf7e6dab716b6fe1dfcd309977407d8c7578ec2d044d + languageName: node + linkType: hard + +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: ^3.1.0 + checksum: 2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 + languageName: node + linkType: hard + +"cli-spinners@npm:^2.0.0, cli-spinners@npm:^2.5.0": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 1bd588289b28432e4676cb5d40505cfe3e53f2e4e10fbe05c8a710a154d6fe0ce7836844b00d6858f740f2ffe67cdc36e0fce9c7b6a8430e80e6388d5aa4956c + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: ^2.0.4 + kind-of: ^6.0.2 + shallow-clone: ^3.0.0 + checksum: 770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 + languageName: node + linkType: hard + +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + +"clone@npm:^2.1.2": + version: 2.1.2 + resolution: "clone@npm:2.1.2" + checksum: aaf106e9bc025b21333e2f4c12da539b568db4925c0501a1bf4070836c9e848c892fa22c35548ce0d1132b08bbbfa17a00144fe58fccdab6fa900fec4250f67d + languageName: node + linkType: hard + +"co@npm:^4.6.0": + version: 4.6.0 + resolution: "co@npm:4.6.0" + checksum: 5210d9223010eb95b29df06a91116f2cf7c8e0748a9013ed853b53f362ea0e822f1e5bb054fb3cefc645239a4cf966af1f6133a3b43f40d591f3b68ed6cf0510 + languageName: node + linkType: hard + +"collect-v8-coverage@npm:^1.0.0": + version: 1.0.2 + resolution: "collect-v8-coverage@npm:1.0.2" + checksum: c10f41c39ab84629d16f9f6137bc8a63d332244383fc368caf2d2052b5e04c20cd1fd70f66fcf4e2422b84c8226598b776d39d5f2d2a51867cc1ed5d1982b4da + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: 1.1.3 + checksum: fd7a64a17cde98fb923b1dd05c5f2e6f7aefda1b60d67e8d449f9328b4e53b228a428fd38bfeaeb2db2ff6b6503a776a996150b80cdf224062af08a5c8a3a203 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: ~1.1.4 + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"colorette@npm:^1.0.7": + version: 1.4.0 + resolution: "colorette@npm:1.4.0" + checksum: 01c3c16058b182a4ab4c126a65a75faa4d38a20fa7c845090b25453acec6c371bb2c5dceb0a2338511f17902b9d1a9af0cadd8509c9403894b79311032c256c3 + languageName: node + linkType: hard + +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: ~1.0.0 + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + +"command-exists@npm:^1.2.4, command-exists@npm:^1.2.8": + version: 1.2.9 + resolution: "command-exists@npm:1.2.9" + checksum: 729ae3d88a2058c93c58840f30341b7f82688a573019535d198b57a4d8cb0135ced0ad7f52b591e5b28a90feb2c675080ce916e56254a0f7c15cb2395277cac3 + languageName: node + linkType: hard + +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + +"commander@npm:^4.0.0": + version: 4.1.1 + resolution: "commander@npm:4.1.1" + checksum: d7b9913ff92cae20cb577a4ac6fcc121bd6223319e54a40f51a14740a681ad5c574fd29a57da478a5f234a6fa6c52cbf0b7c641353e03c648b1ae85ba670b977 + languageName: node + linkType: hard + +"commander@npm:^7.2.0": + version: 7.2.0 + resolution: "commander@npm:7.2.0" + checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc + languageName: node + linkType: hard + +"commander@npm:^9.4.1": + version: 9.5.0 + resolution: "commander@npm:9.5.0" + checksum: c7a3e27aa59e913b54a1bafd366b88650bc41d6651f0cbe258d4ff09d43d6a7394232a4dadd0bf518b3e696fdf595db1028a0d82c785b88bd61f8a440cecfade + languageName: node + linkType: hard + +"commander@npm:~2.13.0": + version: 2.13.0 + resolution: "commander@npm:2.13.0" + checksum: b23e2de09428e3852e881c3e265c70438ca038c834744479b72dde0bbc570f45c7f1ea2feea27fbe26382d2cbf6fb7b1963d7dee2c08b3f4adc95dbc45d977f5 + languageName: node + linkType: hard + +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 59715f2fc456a73f68826285718503340b9f0dd89bfffc42749906c5cf3d4277ef11ef1cca0350d0e79204f00f1f6d83851ececc9095dc88512a697ac0b9bdcb + languageName: node + linkType: hard + +"compare-versions@npm:^3.4.0": + version: 3.6.0 + resolution: "compare-versions@npm:3.6.0" + checksum: 7492a50cdaa2c27f5254eee7c4b38856e1c164991bab3d98d7fd067fe4b570d47123ecb92523b78338be86aa221668fd3868bfe8caa5587dc3ebbe1a03d52b5d + languageName: node + linkType: hard + +"component-type@npm:^1.2.1": + version: 1.2.2 + resolution: "component-type@npm:1.2.2" + checksum: ca5a9886a961985b9ebcc0a5b23f2526506eced1c2c932648e5f8960db22fffcc3a77442013c6aef0b5afa8e6b9de02ae2a23ce5c967374edaf99d74fd6d6c3e + languageName: node + linkType: hard + +"compressible@npm:~2.0.16": + version: 2.0.18 + resolution: "compressible@npm:2.0.18" + dependencies: + mime-db: ">= 1.43.0 < 2" + checksum: 58321a85b375d39230405654721353f709d0c1442129e9a17081771b816302a012471a9b8f4864c7dbe02eef7f2aaac3c614795197092262e94b409c9be108f0 + languageName: node + linkType: hard + +"compression@npm:^1.7.1": + version: 1.7.4 + resolution: "compression@npm:1.7.4" + dependencies: + accepts: ~1.3.5 + bytes: 3.0.0 + compressible: ~2.0.16 + debug: 2.6.9 + on-headers: ~1.0.2 + safe-buffer: 5.1.2 + vary: ~1.1.2 + checksum: 35c0f2eb1f28418978615dc1bc02075b34b1568f7f56c62d60f4214d4b7cc00d0f6d282b5f8a954f59872396bd770b6b15ffd8aa94c67d4bce9b8887b906999b + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"connect@npm:^3.6.5, connect@npm:^3.7.0": + version: 3.7.0 + resolution: "connect@npm:3.7.0" + dependencies: + debug: 2.6.9 + finalhandler: 1.1.2 + parseurl: ~1.3.3 + utils-merge: 1.0.1 + checksum: 96e1c4effcf219b065c7823e57351c94366d2e2a6952fa95e8212bffb35c86f1d5a3f9f6c5796d4cd3a5fdda628368b1c3cc44bf19c66cfd68fe9f9cab9177e2 + languageName: node + linkType: hard + +"content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 63ae9933be5a2b8d4509daca5124e20c14d023c820258e484e32dc324d34c2754e71297c94a05784064ad27615037ef677e3f0c00469fb55f409d2bb21261035 + languageName: node + linkType: hard + +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": + version: 3.34.0 + resolution: "core-js-compat@npm:3.34.0" + dependencies: + browserslist: ^4.22.2 + checksum: 6281f7f57a72f254c06611ec088445e11cf84e0b4edfb5f43dece1a1ff8b0ed0e81ed0bc291024761cd90c39d0f007d8bc46548265139808081d311c7cbc9c81 + languageName: node + linkType: hard + +"core-util-is@npm:~1.0.0": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + +"cosmiconfig@npm:^5.0.5, cosmiconfig@npm:^5.1.0": + version: 5.2.1 + resolution: "cosmiconfig@npm:5.2.1" + dependencies: + import-fresh: ^2.0.0 + is-directory: ^0.3.1 + js-yaml: ^3.13.1 + parse-json: ^4.0.0 + checksum: 8b6f1d3c8a5ffdf663a952f17af0761adf210b7a5933d0fe8988f3ca3a1f0e1e5cbbb74d5b419c15933dd2fdcaec31dbc5cc85cb8259a822342b93b529eff89c + languageName: node + linkType: hard + +"create-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "create-jest@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + prompts: ^2.0.1 + bin: + create-jest: bin/create-jest.js + checksum: 1427d49458adcd88547ef6fa39041e1fe9033a661293aa8d2c3aa1b4967cb5bf4f0c00436c7a61816558f28ba2ba81a94d5c962e8022ea9a883978fc8e1f2945 + languageName: node + linkType: hard + +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff + languageName: node + linkType: hard + +"cross-fetch@npm:^3.1.5": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: ^2.6.12 + checksum: 78f993fa099eaaa041122ab037fe9503ecbbcb9daef234d1d2e0b9230a983f64d645d088c464e21a247b825a08dc444a6e7064adfa93536d3a9454b4745b3632 + languageName: node + linkType: hard + +"cross-spawn@npm:^6.0.0, cross-spawn@npm:^6.0.5": + version: 6.0.5 + resolution: "cross-spawn@npm:6.0.5" + dependencies: + nice-try: ^1.0.4 + path-key: ^2.0.1 + semver: ^5.5.0 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: f893bb0d96cd3d5751d04e67145bdddf25f99449531a72e82dcbbd42796bbc8268c1076c6b3ea51d4d455839902804b94bc45dfb37ecbb32ea8e54a6741c3ab9 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: ^3.1.0 + shebang-command: ^2.0.0 + which: ^2.0.1 + checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52 + languageName: node + linkType: hard + +"crypt@npm:0.0.2, crypt@npm:~0.0.1": + version: 0.0.2 + resolution: "crypt@npm:0.0.2" + checksum: baf4c7bbe05df656ec230018af8cf7dbe8c14b36b98726939cef008d473f6fe7a4fad906cfea4062c93af516f1550a3f43ceb4d6615329612c6511378ed9fe34 + languageName: node + linkType: hard + +"crypto-random-string@npm:^1.0.0": + version: 1.0.0 + resolution: "crypto-random-string@npm:1.0.0" + checksum: 6fc61a46c18547b49a93da24f4559c4a1c859f4ee730ecc9533c1ba89fa2a9e9d81f390c2789467afbbd0d1c55a6e96a71e4716b6cd3e77736ed5fced7a2df9a + languageName: node + linkType: hard + +"crypto-random-string@npm:^2.0.0": + version: 2.0.0 + resolution: "crypto-random-string@npm:2.0.0" + checksum: 0283879f55e7c16fdceacc181f87a0a65c53bc16ffe1d58b9d19a6277adcd71900d02bb2c4843dd55e78c51e30e89b0fec618a7f170ebcc95b33182c28f05fd6 + languageName: node + linkType: hard + +"cssom@npm:^0.5.0": + version: 0.5.0 + resolution: "cssom@npm:0.5.0" + checksum: 823471aa30091c59e0a305927c30e7768939b6af70405808f8d2ce1ca778cddcb24722717392438329d1691f9a87cb0183b64b8d779b56a961546d54854fde01 + languageName: node + linkType: hard + +"cssom@npm:~0.3.6": + version: 0.3.8 + resolution: "cssom@npm:0.3.8" + checksum: 24beb3087c76c0d52dd458be9ee1fbc80ac771478a9baef35dd258cdeb527c68eb43204dd439692bb2b1ae5272fa5f2946d10946edab0d04f1078f85e06bc7f6 + languageName: node + linkType: hard + +"cssstyle@npm:^2.3.0": + version: 2.3.0 + resolution: "cssstyle@npm:2.3.0" + dependencies: + cssom: ~0.3.6 + checksum: 5f05e6fd2e3df0b44695c2f08b9ef38b011862b274e320665176467c0725e44a53e341bc4959a41176e83b66064ab786262e7380fd1cabeae6efee0d255bb4e3 + languageName: node + linkType: hard + +"csstype@npm:^3.0.2": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 + languageName: node + linkType: hard + +"dag-map@npm:~1.0.0": + version: 1.0.2 + resolution: "dag-map@npm:1.0.2" + checksum: a46bee1adda1459abe778b0c3616ef8c4ec14c314d38c3daa6f6a695ceae7c4b76ea3efa78385c1f25bb4d600566b3e1edd40e9ec3e862bd8927edca828025ed + languageName: node + linkType: hard + +"data-urls@npm:^3.0.2": + version: 3.0.2 + resolution: "data-urls@npm:3.0.2" + dependencies: + abab: ^2.0.6 + whatwg-mimetype: ^3.0.0 + whatwg-url: ^11.0.0 + checksum: 033fc3dd0fba6d24bc9a024ddcf9923691dd24f90a3d26f6545d6a2f71ec6956f93462f2cdf2183cc46f10dc01ed3bcb36731a8208456eb1a08147e571fe2a76 + languageName: node + linkType: hard + +"dayjs@npm:^1.8.15": + version: 1.11.10 + resolution: "dayjs@npm:1.11.10" + checksum: a6b5a3813b8884f5cd557e2e6b7fa569f4c5d0c97aca9558e38534af4f2d60daafd3ff8c2000fed3435cfcec9e805bcebd99f90130c6d1c5ef524084ced588c4 + languageName: node + linkType: hard + +"debug@npm:2.6.9, debug@npm:^2.2.0": + version: 2.6.9 + resolution: "debug@npm:2.6.9" + dependencies: + ms: 2.0.0 + checksum: d2f51589ca66df60bf36e1fa6e4386b318c3f1e06772280eea5b1ae9fd3d05e9c2b7fd8a7d862457d00853c75b00451aa2d7459b924629ee385287a650f58fe6 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"debug@npm:^3.1.0": + version: 3.2.7 + resolution: "debug@npm:3.2.7" + dependencies: + ms: ^2.1.1 + checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"decimal.js@npm:^10.4.2": + version: 10.4.3 + resolution: "decimal.js@npm:10.4.3" + checksum: 796404dcfa9d1dbfdc48870229d57f788b48c21c603c3f6554a1c17c10195fc1024de338b0cf9e1efe0c7c167eeb18f04548979bcc5fdfabebb7cc0ae3287bae + languageName: node + linkType: hard + +"dedent@npm:^1.0.0": + version: 1.5.1 + resolution: "dedent@npm:1.5.1" + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + checksum: c3c300a14edf1bdf5a873f9e4b22e839d62490bc5c8d6169c1f15858a1a76733d06a9a56930e963d677a2ceeca4b6b0894cc5ea2f501aa382ca5b92af3413c2a + languageName: node + linkType: hard + +"deep-extend@npm:^0.6.0": + version: 0.6.0 + resolution: "deep-extend@npm:0.6.0" + checksum: 7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7 + languageName: node + linkType: hard + +"deep-is@npm:^0.1.3": + version: 0.1.4 + resolution: "deep-is@npm:0.1.4" + checksum: edb65dd0d7d1b9c40b2f50219aef30e116cedd6fc79290e740972c132c09106d2e80aa0bc8826673dd5a00222d4179c84b36a790eef63a4c4bca75a37ef90804 + languageName: node + linkType: hard + +"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.0": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 2024c6a980a1b7128084170c4cf56b0fd58a63f2da1660dcfe977415f27b17dbe5888668b59d0b063753f3220719d5e400b7f113609489c90160bb9a5518d052 + languageName: node + linkType: hard + +"default-browser-id@npm:^3.0.0": + version: 3.0.0 + resolution: "default-browser-id@npm:3.0.0" + dependencies: + bplist-parser: ^0.2.0 + untildify: ^4.0.0 + checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 + languageName: node + linkType: hard + +"default-browser@npm:^4.0.0": + version: 4.0.0 + resolution: "default-browser@npm:4.0.0" + dependencies: + bundle-name: ^3.0.0 + default-browser-id: ^3.0.0 + execa: ^7.1.1 + titleize: ^3.0.0 + checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 + languageName: node + linkType: hard + +"default-gateway@npm:^4.2.0": + version: 4.2.0 + resolution: "default-gateway@npm:4.2.0" + dependencies: + execa: ^1.0.0 + ip-regex: ^2.1.0 + checksum: 1f5be765471689c6bab33e0c8b87363c3e2485cc1ab78904d383a8a8293a79f684da2a3303744b112503f986af4ea87d917c63a468ed913e9b0c31588c02d6a4 + languageName: node + linkType: hard + +"defaults@npm:^1.0.3": + version: 1.0.4 + resolution: "defaults@npm:1.0.4" + dependencies: + clone: ^1.0.2 + checksum: 3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" + dependencies: + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + languageName: node + linkType: hard + +"define-lazy-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "define-lazy-prop@npm:2.0.0" + checksum: 0115fdb065e0490918ba271d7339c42453d209d4cb619dfe635870d906731eff3e1ade8028bb461ea27ce8264ec5e22c6980612d332895977e89c1bbc80fcee2 + languageName: node + linkType: hard + +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 + languageName: node + linkType: hard + +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: ^1.0.1 + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + +"del@npm:^6.0.0": + version: 6.1.1 + resolution: "del@npm:6.1.1" + dependencies: + globby: ^11.0.1 + graceful-fs: ^4.2.4 + is-glob: ^4.0.1 + is-path-cwd: ^2.2.0 + is-path-inside: ^3.0.2 + p-map: ^4.0.0 + rimraf: ^3.0.2 + slash: ^3.0.0 + checksum: 563288b73b8b19a7261c47fd21a330eeab6e2acd7c6208c49790dfd369127120dd7836cdf0c1eca216b77c94782a81507eac6b4734252d3bef2795cb366996b6 + languageName: node + linkType: hard + +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + +"denodeify@npm:^1.2.1": + version: 1.2.1 + resolution: "denodeify@npm:1.2.1" + checksum: a85c8f7fce5626e311edd897c27ad571b29393c4a739dc29baee48328e09edd82364ff697272dd612462c67e48b4766389642b5bdfaea0dc114b7c6a276c0eae + languageName: node + linkType: hard + +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: abbe19c768c97ee2eed6282d8ce3031126662252c58d711f646921c9623f9052e3e1906443066beec1095832f534e57c523b7333f8e7e0d93051ab6baef5ab3a + languageName: node + linkType: hard + +"deprecated-react-native-prop-types@npm:4.1.0": + version: 4.1.0 + resolution: "deprecated-react-native-prop-types@npm:4.1.0" + dependencies: + "@react-native/normalize-colors": "*" + invariant: "*" + prop-types: "*" + checksum: bba96622e196f650e782963598a2868a9c89b32e88fba1555fe1308d324eb387ab2a1f16235162b7bccc1900e8f43b7f8eae4f149a37f10cdf52e071990a7c9a + languageName: node + linkType: hard + +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + +"detect-libc@npm:^1.0.3": + version: 1.0.3 + resolution: "detect-libc@npm:1.0.3" + bin: + detect-libc: ./bin/detect-libc.js + checksum: daaaed925ffa7889bd91d56e9624e6c8033911bb60f3a50a74a87500680652969dbaab9526d1e200a4c94acf80fc862a22131841145a0a8482d60a99c24f4a3e + languageName: node + linkType: hard + +"detect-newline@npm:^3.0.0": + version: 3.1.0 + resolution: "detect-newline@npm:3.1.0" + checksum: ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 + languageName: node + linkType: hard + +"diff-sequences@npm:^29.6.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: f4914158e1f2276343d98ff5b31fc004e7304f5470bf0f1adb2ac6955d85a531a6458d33e87667f98f6ae52ebd3891bb47d420bb48a5bd8b7a27ee25b20e33aa + languageName: node + linkType: hard + +"diff@npm:^4.0.1": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: f2c09b0ce4e6b301c221addd83bf3f454c0bc00caa3dd837cf6c127d6edf7223aa2bbe3b688feea110b7f262adbfc845b757c44c8a9f8c0c5b15d8fa9ce9d20d + languageName: node + linkType: hard + +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: ^4.0.0 + checksum: fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 + languageName: node + linkType: hard + +"doctrine@npm:^2.1.0": + version: 2.1.0 + resolution: "doctrine@npm:2.1.0" + dependencies: + esutils: ^2.0.2 + checksum: a45e277f7feaed309fe658ace1ff286c6e2002ac515af0aaf37145b8baa96e49899638c7cd47dccf84c3d32abfc113246625b3ac8f552d1046072adee13b0dc8 + languageName: node + linkType: hard + +"doctrine@npm:^3.0.0": + version: 3.0.0 + resolution: "doctrine@npm:3.0.0" + dependencies: + esutils: ^2.0.2 + checksum: fd7673ca77fe26cd5cba38d816bc72d641f500f1f9b25b83e8ce28827fe2da7ad583a8da26ab6af85f834138cf8dae9f69b0cd6ab925f52ddab1754db44d99ce + languageName: node + linkType: hard + +"domexception@npm:^4.0.0": + version: 4.0.0 + resolution: "domexception@npm:4.0.0" + dependencies: + webidl-conversions: ^7.0.0 + checksum: ddbc1268edf33a8ba02ccc596735ede80375ee0cf124b30d2f05df5b464ba78ef4f49889b6391df4a04954e63d42d5631c7fcf8b1c4f12bc531252977a5f13d5 + languageName: node + linkType: hard + +"dotenv-expand@npm:~10.0.0": + version: 10.0.0 + resolution: "dotenv-expand@npm:10.0.0" + checksum: 2a38b470efe0abcb1ac8490421a55e1d764dc9440fd220942bce40965074f3fb00b585f4346020cb0f0f219966ee6b4ee5023458b3e2953fe5b3214de1b314ee + languageName: node + linkType: hard + +"dotenv@npm:~16.0.3": + version: 16.0.3 + resolution: "dotenv@npm:16.0.3" + checksum: afcf03f373d7a6d62c7e9afea6328e62851d627a4e73f2e12d0a8deae1cd375892004f3021883f8aec85932cd2834b091f568ced92b4774625b321db83b827f8 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed + languageName: node + linkType: hard + +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.4.601": + version: 1.4.614 + resolution: "electron-to-chromium@npm:1.4.614" + checksum: e99e6c8600aa76b4d385a4381b943ec2cfeebfdc36a2675fbf87b334256428b92f5d79ab287b8bab0e1875a992284a8a95a03b41b71e9d64a75b5088daf1dc5e + languageName: node + linkType: hard + +"emittery@npm:^0.13.1": + version: 0.13.1 + resolution: "emittery@npm:0.13.1" + checksum: 2b089ab6306f38feaabf4f6f02792f9ec85fc054fda79f44f6790e61bbf6bc4e1616afb9b232e0c5ec5289a8a452f79bfa6d905a6fd64e94b49981f0934001c6 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + +"encodeurl@npm:~1.0.2": + version: 1.0.2 + resolution: "encodeurl@npm:1.0.2" + checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: ^0.6.2 + checksum: bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"end-of-stream@npm:^1.1.0": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: ^1.4.0 + checksum: 530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b + languageName: node + linkType: hard + +"entities@npm:^4.4.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7 + languageName: node + linkType: hard + +"env-editor@npm:^0.4.1": + version: 0.4.2 + resolution: "env-editor@npm:0.4.2" + checksum: d162e161d9a1bddaf63f68428c587b1d823afe7d56cde039ce403cc68706c68350c92b9db44692f4ecea1d67ec80de9ba01ca70568299ed929d3fa056c40aebf + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"envinfo@npm:^7.7.2": + version: 7.11.0 + resolution: "envinfo@npm:7.11.0" + bin: + envinfo: dist/cli.js + checksum: c45a7d20409d5f4cda72483b150d3816b15b434f2944d72c1495d8838bd7c4e7b2f32c12128ffb9b92b5f66f436237b8a525eb3a9a5da2d20013bc4effa28aef + languageName: node + linkType: hard + +"eol@npm:^0.9.1": + version: 0.9.1 + resolution: "eol@npm:0.9.1" + checksum: ba9fa998bc8148b935dcf85585eacf049eeaf18d2ab6196710d4d1f59e7dfd0e87b18508dc67144ff8ba12f835a4a4989aeea64c98b13cca77b74b9d4b33bce5 + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 + languageName: node + linkType: hard + +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: ^0.2.1 + checksum: c1c2b8b65f9c91b0f9d75f0debaa7ec5b35c266c2cac5de412c1a6de86d4cbae04ae44e510378cb14d032d0645a36925d0186f8bb7367bcc629db256b743a001 + languageName: node + linkType: hard + +"error-stack-parser@npm:^2.0.6": + version: 2.1.4 + resolution: "error-stack-parser@npm:2.1.4" + dependencies: + stackframe: ^1.3.4 + checksum: 3b916d2d14c6682f287c8bfa28e14672f47eafe832701080e420e7cdbaebb2c50293868256a95706ac2330fe078cf5664713158b49bc30d7a5f2ac229ded0e18 + languageName: node + linkType: hard + +"errorhandler@npm:^1.5.1": + version: 1.5.1 + resolution: "errorhandler@npm:1.5.1" + dependencies: + accepts: ~1.3.7 + escape-html: ~1.0.3 + checksum: 73b7abb08fb751107e9bebecc33c40c0641a54be8bda8e4a045f3f5cb7b805041927fef5629ea39b1737799eb52fe2499ca531f11ac51b0294ccc4667d72cb91 + languageName: node + linkType: hard + +"es-abstract@npm:^1.22.1": + version: 1.22.3 + resolution: "es-abstract@npm:1.22.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + arraybuffer.prototype.slice: ^1.0.2 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.5 + es-set-tostringtag: ^2.0.1 + es-to-primitive: ^1.2.1 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.2 + get-symbol-description: ^1.0.0 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 + is-callable: ^1.2.7 + is-negative-zero: ^2.0.2 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + is-string: ^1.0.7 + is-typed-array: ^1.1.12 + is-weakref: ^1.0.2 + object-inspect: ^1.13.1 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + safe-array-concat: ^1.0.1 + safe-regex-test: ^1.0.0 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 + string.prototype.trimstart: ^1.0.7 + typed-array-buffer: ^1.0.0 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.13 + checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a + languageName: node + linkType: hard + +"es-iterator-helpers@npm:^1.0.12": + version: 1.0.15 + resolution: "es-iterator-helpers@npm:1.0.15" + dependencies: + asynciterator.prototype: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.1 + es-abstract: ^1.22.1 + es-set-tostringtag: ^2.0.1 + function-bind: ^1.1.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + iterator.prototype: ^1.1.2 + safe-array-concat: ^1.0.1 + checksum: 50081ae5c549efe62e5c1d244df0194b40b075f7897fc2116b7e1aa437eb3c41f946d2afda18c33f9b31266ec544765932542765af839f76fa6d7b7855d1e0e1 + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" + dependencies: + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 + languageName: node + linkType: hard + +"es-shim-unscopables@npm:^1.0.0": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" + dependencies: + hasown: ^2.0.0 + checksum: 432bd527c62065da09ed1d37a3f8e623c423683285e6188108286f4a1e8e164a5bcbfbc0051557c7d14633cd2a41ce24c7048e6bbb66a985413fd32f1be72626 + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: ^1.1.4 + is-date-object: ^1.0.1 + is-symbol: ^1.0.2 + checksum: 4ead6671a2c1402619bdd77f3503991232ca15e17e46222b0a41a5d81aebc8740a77822f5b3c965008e631153e9ef0580540007744521e72de8e33599fca2eed + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 + languageName: node + linkType: hard + +"escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"escodegen@npm:^2.0.0": + version: 2.1.0 + resolution: "escodegen@npm:2.1.0" + dependencies: + esprima: ^4.0.1 + estraverse: ^5.2.0 + esutils: ^2.0.2 + source-map: ~0.6.1 + dependenciesMeta: + source-map: + optional: true + bin: + escodegen: bin/escodegen.js + esgenerate: bin/esgenerate.js + checksum: 096696407e161305cd05aebb95134ad176708bc5cb13d0dcc89a5fcbb959b8ed757e7f2591a5f8036f8f4952d4a724de0df14cd419e29212729fa6df5ce16bf6 + languageName: node + linkType: hard + +"eslint-config-prettier@npm:^8.5.0": + version: 8.10.0 + resolution: "eslint-config-prettier@npm:8.10.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 153266badd477e49b0759816246b2132f1dbdb6c7f313ca60a9af5822fd1071c2bc5684a3720d78b725452bbac04bb130878b2513aea5e72b1b792de5a69fec8 + languageName: node + linkType: hard + +"eslint-plugin-eslint-comments@npm:^3.2.0": + version: 3.2.0 + resolution: "eslint-plugin-eslint-comments@npm:3.2.0" + dependencies: + escape-string-regexp: ^1.0.5 + ignore: ^5.0.5 + peerDependencies: + eslint: ">=4.19.1" + checksum: c9fe273dd56699abdf7e416cfad0344eb50aa01564a5a9133e72d982defb89310bc2e9b0b148ce19c5190d7ff641223b0ba9e667a194bc48467c3dd0d471e657 + languageName: node + linkType: hard + +"eslint-plugin-ft-flow@npm:^2.0.1": + version: 2.0.3 + resolution: "eslint-plugin-ft-flow@npm:2.0.3" + dependencies: + lodash: ^4.17.21 + string-natural-compare: ^3.0.1 + peerDependencies: + "@babel/eslint-parser": ^7.12.0 + eslint: ^8.1.0 + checksum: 6272f7c352154875dc85c7dcd7cf66f6ed926a9a6aba81c675583bcc6695147597d6b9a6db0f643a387d14eccd61dc36daf20eec1c49e91ce1c63c01ffe295f7 + languageName: node + linkType: hard + +"eslint-plugin-jest@npm:^26.5.3": + version: 26.9.0 + resolution: "eslint-plugin-jest@npm:26.9.0" + dependencies: + "@typescript-eslint/utils": ^5.10.0 + peerDependencies: + "@typescript-eslint/eslint-plugin": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 6d5fd5c95368f1ca2640389aeb7ce703d6202493c3ec6bdedb4eaca37233710508b0c75829e727765a16fd27029a466d34202bc7f2811c752038ccbbce224400 + languageName: node + linkType: hard + +"eslint-plugin-prettier@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-plugin-prettier@npm:4.2.1" + dependencies: + prettier-linter-helpers: ^1.0.0 + peerDependencies: + eslint: ">=7.28.0" + prettier: ">=2.0.0" + peerDependenciesMeta: + eslint-config-prettier: + optional: true + checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6 + languageName: node + linkType: hard + +"eslint-plugin-prettier@npm:^5.0.1": + version: 5.0.1 + resolution: "eslint-plugin-prettier@npm:5.0.1" + dependencies: + prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.5 + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: c2261033b97bafe99ccb7cc47c2fac6fa85b8bbc8b128042e52631f906b69e12afed2cdd9d7e3021cc892ee8dd4204a3574e1f32a0b718b4bb3b440944b6983b + languageName: node + linkType: hard + +"eslint-plugin-react-hooks@npm:^4.6.0": + version: 4.6.0 + resolution: "eslint-plugin-react-hooks@npm:4.6.0" + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + checksum: 23001801f14c1d16bf0a837ca7970d9dd94e7b560384b41db378b49b6e32dc43d6e2790de1bd737a652a86f81a08d6a91f402525061b47719328f586a57e86c3 + languageName: node + linkType: hard + +"eslint-plugin-react-native-globals@npm:^0.1.1": + version: 0.1.2 + resolution: "eslint-plugin-react-native-globals@npm:0.1.2" + checksum: ab91e8ecbb51718fb0763f29226b1c2d402251ab2c4730a8bf85f38b805e32d4243da46d07ccdb12cb9dcce9e7514364a1706142cf970f58dcc9a820bcf4b732 + languageName: node + linkType: hard + +"eslint-plugin-react-native@npm:^4.0.0": + version: 4.1.0 + resolution: "eslint-plugin-react-native@npm:4.1.0" + dependencies: + eslint-plugin-react-native-globals: ^0.1.1 + peerDependencies: + eslint: ^3.17.0 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: b6acc5aa91f95cb4600d6ab4c00cf22577083e72c61aabcf010f4388d97e4fc53ba075db54eeee53cba25b297e1a6ec611434f2c2d0bfb3e8dc6419400663fe9 + languageName: node + linkType: hard + +"eslint-plugin-react@npm:^7.30.1": + version: 7.33.2 + resolution: "eslint-plugin-react@npm:7.33.2" + dependencies: + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 + doctrine: ^2.1.0 + es-iterator-helpers: ^1.0.12 + estraverse: ^5.3.0 + jsx-ast-utils: ^2.4.1 || ^3.0.0 + minimatch: ^3.1.2 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 + prop-types: ^15.8.1 + resolve: ^2.0.0-next.4 + semver: ^6.3.1 + string.prototype.matchall: ^4.0.8 + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: b4c3d76390b0ae6b6f9fed78170604cc2c04b48e6778a637db339e8e3911ec9ef22510b0ae77c429698151d0f1b245f282177f384105b6830e7b29b9c9b26610 + languageName: node + linkType: hard + +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^4.1.1 + checksum: 47e4b6a3f0cc29c7feedee6c67b225a2da7e155802c6ea13bbef4ac6b9e10c66cd2dcb987867ef176292bf4e64eccc680a49e35e9e9c669f4a02bac17e86abdb + languageName: node + linkType: hard + +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^5.2.0 + checksum: ec97dbf5fb04b94e8f4c5a91a7f0a6dd3c55e46bfc7bbcd0e3138c3a76977570e02ed89a1810c778dcd72072ff0e9621ba1379b4babe53921d71e2e4486fda3e + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^2.1.0": + version: 2.1.0 + resolution: "eslint-visitor-keys@npm:2.1.0" + checksum: e3081d7dd2611a35f0388bbdc2f5da60b3a3c5b8b6e928daffff7391146b434d691577aa95064c8b7faad0b8a680266bcda0a42439c18c717b80e6718d7e267d + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 + languageName: node + linkType: hard + +"eslint@npm:^8.56.0": + version: 8.56.0 + resolution: "eslint@npm:8.56.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@eslint-community/regexpp": ^4.6.1 + "@eslint/eslintrc": ^2.1.4 + "@eslint/js": 8.56.0 + "@humanwhocodes/config-array": ^0.11.13 + "@humanwhocodes/module-importer": ^1.0.1 + "@nodelib/fs.walk": ^1.2.8 + "@ungap/structured-clone": ^1.2.0 + ajv: ^6.12.4 + chalk: ^4.0.0 + cross-spawn: ^7.0.2 + debug: ^4.3.2 + doctrine: ^3.0.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.2.2 + eslint-visitor-keys: ^3.4.3 + espree: ^9.6.1 + esquery: ^1.4.2 + esutils: ^2.0.2 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 + find-up: ^5.0.0 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 + ignore: ^5.2.0 + imurmurhash: ^0.1.4 + is-glob: ^4.0.0 + is-path-inside: ^3.0.3 + js-yaml: ^4.1.0 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.4.1 + lodash.merge: ^4.6.2 + minimatch: ^3.1.2 + natural-compare: ^1.4.0 + optionator: ^0.9.3 + strip-ansi: ^6.0.1 + text-table: ^0.2.0 + bin: + eslint: bin/eslint.js + checksum: 883436d1e809b4a25d9eb03d42f584b84c408dbac28b0019f6ea07b5177940bf3cca86208f749a6a1e0039b63e085ee47aca1236c30721e91f0deef5cc5a5136 + languageName: node + linkType: hard + +"espree@npm:^9.6.0, espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" + dependencies: + acorn: ^8.9.0 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^3.4.1 + checksum: eb8c149c7a2a77b3f33a5af80c10875c3abd65450f60b8af6db1bfcfa8f101e21c1e56a561c6dc13b848e18148d43469e7cd208506238554fb5395a9ea5a1ab9 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: b45bc805a613dbea2835278c306b91aff6173c8d034223fa81498c77dcbce3b2931bf6006db816f62eacd9fd4ea975dfd85a5b7f3c6402cfd050d4ca3c13a628 + languageName: node + linkType: hard + +"esquery@npm:^1.4.2": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" + dependencies: + estraverse: ^5.1.0 + checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 + languageName: node + linkType: hard + +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" + dependencies: + estraverse: ^5.2.0 + checksum: ebc17b1a33c51cef46fdc28b958994b1dc43cd2e86237515cbc3b4e5d2be6a811b2315d0a1a4d9d340b6d2308b15322f5c8291059521cc5f4802f65e7ec32837 + languageName: node + linkType: hard + +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 + languageName: node + linkType: hard + +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 072780882dc8416ad144f8fe199628d2b3e7bbc9989d9ed43795d2c90309a2047e6bc5979d7e2322a341163d22cfad9e21f4110597fe487519697389497e4e2b + languageName: node + linkType: hard + +"esutils@npm:^2.0.2": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 22b5b08f74737379a840b8ed2036a5fb35826c709ab000683b092d9054e5c2a82c27818f12604bfc2a9a76b90b6834ef081edbc1c7ae30d1627012e067c6ec87 + languageName: node + linkType: hard + +"etag@npm:~1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff + languageName: node + linkType: hard + +"event-target-shim@npm:^5.0.0, event-target-shim@npm:^5.0.1": + version: 5.0.1 + resolution: "event-target-shim@npm:5.0.1" + checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166 + languageName: node + linkType: hard + +"exec-async@npm:^2.2.0": + version: 2.2.0 + resolution: "exec-async@npm:2.2.0" + checksum: 5877d83c2d553994accb39c26f40f0a633bca10d9572696e524fd91b385060ba05d1edcc28d6e3899c451e65ed453fdc7e6b69bd5d5a27d914220a100f81bb3a + languageName: node + linkType: hard + +"execa@npm:^1.0.0": + version: 1.0.0 + resolution: "execa@npm:1.0.0" + dependencies: + cross-spawn: ^6.0.0 + get-stream: ^4.0.0 + is-stream: ^1.1.0 + npm-run-path: ^2.0.0 + p-finally: ^1.0.0 + signal-exit: ^3.0.0 + strip-eof: ^1.0.0 + checksum: ddf1342c1c7d02dd93b41364cd847640f6163350d9439071abf70bf4ceb1b9b2b2e37f54babb1d8dc1df8e0d8def32d0e81e74a2e62c3e1d70c303eb4c306bc4 + languageName: node + linkType: hard + +"execa@npm:^5.0.0": + version: 5.1.1 + resolution: "execa@npm:5.1.1" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^6.0.0 + human-signals: ^2.1.0 + is-stream: ^2.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^4.0.1 + onetime: ^5.1.2 + signal-exit: ^3.0.3 + strip-final-newline: ^2.0.0 + checksum: fba9022c8c8c15ed862847e94c252b3d946036d7547af310e344a527e59021fd8b6bb0723883ea87044dc4f0201f949046993124a42ccb0855cae5bf8c786343 + languageName: node + linkType: hard + +"execa@npm:^7.1.1": + version: 7.2.0 + resolution: "execa@npm:7.2.0" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^6.0.1 + human-signals: ^4.3.0 + is-stream: ^3.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^5.1.0 + onetime: ^6.0.0 + signal-exit: ^3.0.7 + strip-final-newline: ^3.0.0 + checksum: 14fd17ba0ca8c87b277584d93b1d9fc24f2a65e5152b31d5eb159a3b814854283eaae5f51efa9525e304447e2f757c691877f7adff8fde5746aae67eb1edd1cc + languageName: node + linkType: hard + +"exit@npm:^0.1.2": + version: 0.1.2 + resolution: "exit@npm:0.1.2" + checksum: abc407f07a875c3961e4781dfcb743b58d6c93de9ab263f4f8c9d23bb6da5f9b7764fc773f86b43dd88030444d5ab8abcb611cb680fba8ca075362b77114bba3 + languageName: node + linkType: hard + +"expect@npm:^29.0.0, expect@npm:^29.7.0": + version: 29.7.0 + resolution: "expect@npm:29.7.0" + dependencies: + "@jest/expect-utils": ^29.7.0 + jest-get-type: ^29.6.3 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + checksum: 9257f10288e149b81254a0fda8ffe8d54a7061cd61d7515779998b012579d2b8c22354b0eb901daf0145f347403da582f75f359f4810c007182ad3fb318b5c0c + languageName: node + linkType: hard + +"expo-application@npm:~5.3.0": + version: 5.3.1 + resolution: "expo-application@npm:5.3.1" + peerDependencies: + expo: "*" + checksum: a8f1311c072fd8a50a353dc1be175de57a40cb5f092c0439721ed06a60c22168e308304a4f95b06e74de332c67e4dacccfce7dddc1a48c7a2a41ef8a5d5f593a + languageName: node + linkType: hard + +"expo-asset@npm:~8.10.1": + version: 8.10.1 + resolution: "expo-asset@npm:8.10.1" + dependencies: + blueimp-md5: ^2.10.0 + expo-constants: ~14.4.2 + expo-file-system: ~15.4.0 + invariant: ^2.2.4 + md5-file: ^3.2.3 + path-browserify: ^1.0.0 + url-parse: ^1.5.9 + checksum: 02607b67b8b53e47825ded6ca52eee47ae957cdc4b1501cdc0373bbd50ccfef605ba8a05a07ee88225622c7dc6054dfe1b64f03b21f09aaea7e1b4bf132d3ad7 + languageName: node + linkType: hard + +"expo-constants@npm:~14.4.2": + version: 14.4.2 + resolution: "expo-constants@npm:14.4.2" + dependencies: + "@expo/config": ~8.1.0 + uuid: ^3.3.2 + peerDependencies: + expo: "*" + checksum: 393158c537af73a00ca612e31389d889dfa7adcf07fb1028879ff8bfd65b2f2d0b8c81c8f148fa0c43f1b1656504bb35e5a25235446418b3d99bdb3681e84d74 + languageName: node + linkType: hard + +"expo-file-system@npm:~15.4.0, expo-file-system@npm:~15.4.5": + version: 15.4.5 + resolution: "expo-file-system@npm:15.4.5" + dependencies: + uuid: ^3.4.0 + peerDependencies: + expo: "*" + checksum: 3507f872a111dc2a603632d89c8c798f87927e2ab57bcd0afae34cd34423195ea8fc38a9bdceecb647f64333c6acdd9926722a43627cf5d6cdfbb204f4a0d10b + languageName: node + linkType: hard + +"expo-font@npm:~11.4.0": + version: 11.4.0 + resolution: "expo-font@npm:11.4.0" + dependencies: + fontfaceobserver: ^2.1.0 + peerDependencies: + expo: "*" + checksum: 3eff92ba5c62de5f37cfdfd86a5daf1d448e4f3e82a9ff401b4c4da1c4e5a7241da26edf32fb049763147e442d74ae8b4575b7e5a4ae0d935750c6d3f70f4355 + languageName: node + linkType: hard + +"expo-keep-awake@npm:~12.3.0": + version: 12.3.0 + resolution: "expo-keep-awake@npm:12.3.0" + peerDependencies: + expo: "*" + checksum: 21a17de233bf0401cca64a22275f089557f99248896f29d262b22545199c7d4e816bc9be6b7d547046706db700d9ac3e648a2ca764a9ced4a0739583106fd7ea + languageName: node + linkType: hard + +"expo-modules-autolinking@npm:1.5.1": + version: 1.5.1 + resolution: "expo-modules-autolinking@npm:1.5.1" + dependencies: + "@expo/config": ~8.1.0 + chalk: ^4.1.0 + commander: ^7.2.0 + fast-glob: ^3.2.5 + find-up: ^5.0.0 + fs-extra: ^9.1.0 + bin: + expo-modules-autolinking: bin/expo-modules-autolinking.js + checksum: 4fb6e5d8be5c107bf4b9d8b23a9a783536d14f05779df25764f1de0868030da0353ec13060f4b0ba671d4e107004a87199766830f743a6cf2d1be79f807c093a + languageName: node + linkType: hard + +"expo-modules-core@npm:1.5.12": + version: 1.5.12 + resolution: "expo-modules-core@npm:1.5.12" + dependencies: + compare-versions: ^3.4.0 + invariant: ^2.2.4 + checksum: 9f41c103fb4bba2c63776d053be6c2492b21f5dd1896b711df8877c6a8385dc86a9e59f69bb57895ec4b98a11ecfd829ff2f53f91c2d473835e82c4788f8fca5 + languageName: node + linkType: hard + +"expo-status-bar@npm:~1.6.0": + version: 1.6.0 + resolution: "expo-status-bar@npm:1.6.0" + checksum: e9fe7eeac4dfb3a534d79b6fa0df2a3d2e4c69edeb3573e408ca8d3b7d192627b3f9638c8f656bea9af0a6660f27c99c5da504a508294893dbe359ad5f1d6ab3 + languageName: node + linkType: hard + +"expo-template-redux-typescript@workspace:.": + version: 0.0.0-use.local + resolution: "expo-template-redux-typescript@workspace:." + dependencies: + "@babel/core": ^7.20.0 + "@react-native/eslint-config": ^0.74.0 + "@reduxjs/toolkit": ^2.0.1 + "@testing-library/react-native": ^12.4.1 + "@types/babel__core": ^7.20.5 + "@types/jest": ^29.5.11 + "@types/react": ~18.2.14 + "@types/react-test-renderer": ^18.0.7 + "@typescript-eslint/eslint-plugin": ^6.14.0 + "@typescript-eslint/parser": ^6.14.0 + eslint: ^8.56.0 + eslint-plugin-prettier: ^5.0.1 + expo: ~49.0.15 + expo-status-bar: ~1.6.0 + jest: ^29.7.0 + jest-expo: ^49.0.0 + prettier: ^3.1.1 + react: 18.2.0 + react-native: 0.72.6 + react-redux: ^9.0.4 + ts-node: ^10.9.2 + typescript: ^5.1.3 + languageName: unknown + linkType: soft + +"expo@npm:~49.0.15": + version: 49.0.21 + resolution: "expo@npm:49.0.21" + dependencies: + "@babel/runtime": ^7.20.0 + "@expo/cli": 0.10.16 + "@expo/config": 8.1.2 + "@expo/config-plugins": 7.2.5 + "@expo/vector-icons": ^13.0.0 + babel-preset-expo: ~9.5.2 + expo-application: ~5.3.0 + expo-asset: ~8.10.1 + expo-constants: ~14.4.2 + expo-file-system: ~15.4.5 + expo-font: ~11.4.0 + expo-keep-awake: ~12.3.0 + expo-modules-autolinking: 1.5.1 + expo-modules-core: 1.5.12 + fbemitter: ^3.0.0 + invariant: ^2.2.4 + md5-file: ^3.2.3 + node-fetch: ^2.6.7 + pretty-format: ^26.5.2 + uuid: ^3.4.0 + bin: + expo: bin/cli + checksum: df05ef172935685f2b9850ad4f3e5d0aa3a8dd3720e81ad534dd9ea8c8f7d84b8ea4efa68f410a9bdfc5d31f0a1d0e3f0a146de54f81d75747953c004a717b3b + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-diff@npm:^1.1.2": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: d22d371b994fdc8cce9ff510d7b8dc4da70ac327bcba20df607dd5b9cae9f908f4d1028f5fe467650f058d1e7270235ae0b8230809a262b4df587a3b3aa216c3 + languageName: node + linkType: hard + +"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: b191531e36c607977e5b1c47811158733c34ccb3bfde92c44798929e9b4154884378536d26ad90dfecd32e1ffc09c545d23535ad91b3161a27ddbb8ebe0cbecb + languageName: node + linkType: hard + +"fast-levenshtein@npm:^2.0.6": + version: 2.0.6 + resolution: "fast-levenshtein@npm:2.0.6" + checksum: 92cfec0a8dfafd9c7a15fba8f2cc29cd0b62b85f056d99ce448bbcd9f708e18ab2764bda4dd5158364f4145a7c72788538994f0d1787b956ef0d1062b0f7c24c + languageName: node + linkType: hard + +"fast-xml-parser@npm:^4.0.12": + version: 4.3.2 + resolution: "fast-xml-parser@npm:4.3.2" + dependencies: + strnum: ^1.0.5 + bin: + fxparser: src/cli/cli.js + checksum: d507ce2efa5fd13d0a5ba28bd76dd68f2fc30ad8748357c37b70f360d19417866d79e35a688af067d5bceaaa796033fa985206aef9692f7a421e1326b6e73309 + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.15.0 + resolution: "fastq@npm:1.15.0" + dependencies: + reusify: ^1.0.4 + checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a + languageName: node + linkType: hard + +"fb-watchman@npm:^2.0.0": + version: 2.0.2 + resolution: "fb-watchman@npm:2.0.2" + dependencies: + bser: 2.1.1 + checksum: b15a124cef28916fe07b400eb87cbc73ca082c142abf7ca8e8de6af43eca79ca7bd13eb4d4d48240b3bd3136eaac40d16e42d6edf87a8e5d1dd8070626860c78 + languageName: node + linkType: hard + +"fbemitter@npm:^3.0.0": + version: 3.0.0 + resolution: "fbemitter@npm:3.0.0" + dependencies: + fbjs: ^3.0.0 + checksum: 069690b8cdff3521ade3c9beb92ba0a38d818a86ef36dff8690e66749aef58809db4ac0d6938eb1cacea2dbef5f2a508952d455669590264cdc146bbe839f605 + languageName: node + linkType: hard + +"fbjs-css-vars@npm:^1.0.0": + version: 1.0.2 + resolution: "fbjs-css-vars@npm:1.0.2" + checksum: 72baf6d22c45b75109118b4daecb6c8016d4c83c8c0f23f683f22e9d7c21f32fff6201d288df46eb561e3c7d4bb4489b8ad140b7f56444c453ba407e8bd28511 + languageName: node + linkType: hard + +"fbjs@npm:^3.0.0": + version: 3.0.5 + resolution: "fbjs@npm:3.0.5" + dependencies: + cross-fetch: ^3.1.5 + fbjs-css-vars: ^1.0.0 + loose-envify: ^1.0.0 + object-assign: ^4.1.0 + promise: ^7.1.1 + setimmediate: ^1.0.5 + ua-parser-js: ^1.0.35 + checksum: e609b5b64686bc96495a5c67728ed9b2710b9b3d695c5759c5f5e47c9483d1c323543ac777a86459e3694efc5712c6ce7212e944feb19752867d699568bb0e54 + languageName: node + linkType: hard + +"fetch-retry@npm:^4.1.1": + version: 4.1.1 + resolution: "fetch-retry@npm:4.1.1" + checksum: a06b6a0201efeb5082794713bcdc8dd2c8f1fd4ad5660de860b9c4e51738aa369be58ba7cfa67aa7aa4a3bf9d9b5a4cd2d2fdea88868856483fb81bacd70455b + languageName: node + linkType: hard + +"file-entry-cache@npm:^6.0.1": + version: 6.0.1 + resolution: "file-entry-cache@npm:6.0.1" + dependencies: + flat-cache: ^3.0.4 + checksum: f49701feaa6314c8127c3c2f6173cfefff17612f5ed2daaafc6da13b5c91fd43e3b2a58fd0d63f9f94478a501b167615931e7200e31485e320f74a33885a9c74 + languageName: node + linkType: hard + +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + languageName: node + linkType: hard + +"finalhandler@npm:1.1.2": + version: 1.1.2 + resolution: "finalhandler@npm:1.1.2" + dependencies: + debug: 2.6.9 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + on-finished: ~2.3.0 + parseurl: ~1.3.3 + statuses: ~1.5.0 + unpipe: ~1.0.0 + checksum: 617880460c5138dd7ccfd555cb5dde4d8f170f4b31b8bd51e4b646bb2946c30f7db716428a1f2882d730d2b72afb47d1f67cc487b874cb15426f95753a88965e + languageName: node + linkType: hard + +"find-babel-config@npm:^2.0.0": + version: 2.0.0 + resolution: "find-babel-config@npm:2.0.0" + dependencies: + json5: ^2.1.1 + path-exists: ^4.0.0 + checksum: d110308b02fe6a6411a0cfb7fd50af6740fbf5093eada3d6ddacf99b07fc8eea4aa3475356484710a0032433029a21ce733bb3ef88fda1d6e35c29a3e4983014 + languageName: node + linkType: hard + +"find-cache-dir@npm:^2.0.0": + version: 2.1.0 + resolution: "find-cache-dir@npm:2.1.0" + dependencies: + commondir: ^1.0.1 + make-dir: ^2.0.0 + pkg-dir: ^3.0.0 + checksum: 60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 + languageName: node + linkType: hard + +"find-up@npm:^3.0.0": + version: 3.0.0 + resolution: "find-up@npm:3.0.0" + dependencies: + locate-path: ^3.0.0 + checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: ^5.0.0 + path-exists: ^4.0.0 + checksum: 4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"find-up@npm:^5.0.0, find-up@npm:~5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-yarn-workspace-root@npm:~2.0.0": + version: 2.0.0 + resolution: "find-yarn-workspace-root@npm:2.0.0" + dependencies: + micromatch: ^4.0.2 + checksum: fa5ca8f9d08fe7a54ce7c0a5931ff9b7e36f9ee7b9475fb13752bcea80ec6b5f180fa5102d60b376d5526ce924ea3fc6b19301262efa0a5d248dd710f3644242 + languageName: node + linkType: hard + +"flat-cache@npm:^3.0.4": + version: 3.2.0 + resolution: "flat-cache@npm:3.2.0" + dependencies: + flatted: ^3.2.9 + keyv: ^4.5.3 + rimraf: ^3.0.2 + checksum: e7e0f59801e288b54bee5cb9681e9ee21ee28ef309f886b312c9d08415b79fc0f24ac842f84356ce80f47d6a53de62197ce0e6e148dc42d5db005992e2a756ec + languageName: node + linkType: hard + +"flatted@npm:^3.2.9": + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 + languageName: node + linkType: hard + +"flow-enums-runtime@npm:^0.0.5": + version: 0.0.5 + resolution: "flow-enums-runtime@npm:0.0.5" + checksum: a2cdd6a3e86a1d113d9300fd210e379da5a20d9423a1b957cd17207a4434a866ca75d5eb400c9058afb1b5fe64a653c4ddd2e30bf9fb8477291f0d5e70c20539 + languageName: node + linkType: hard + +"flow-parser@npm:0.*": + version: 0.224.0 + resolution: "flow-parser@npm:0.224.0" + checksum: 93ddcfa8ac648b63d08aac1028dc89d26c816e11809dee0e0ee1e89adbc602b4cdf8c8b37942899bc8140337e428a587b393d2a054a3ada3e9a88a8295972df4 + languageName: node + linkType: hard + +"flow-parser@npm:^0.206.0": + version: 0.206.0 + resolution: "flow-parser@npm:0.206.0" + checksum: 1b87d87b59815b09852a6981543ad222da7f4d0e0c26702f9d5e0065174f5f64d2563db76d07a487c6b55e1979344e3845ac42929db70f77a82e8c9171a62a86 + languageName: node + linkType: hard + +"fontfaceobserver@npm:^2.1.0": + version: 2.3.0 + resolution: "fontfaceobserver@npm:2.3.0" + checksum: 5f14715974203b9d68f299f93a7623afd9d5701572d683e861cdbb7514573ac556f56e9b5d07d2d534e01aed19a3b0bbe568e735e0e5494cbea913fc3f12b856 + languageName: node + linkType: hard + +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + +"form-data@npm:^3.0.1": + version: 3.0.1 + resolution: "form-data@npm:3.0.1" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: b019e8d35c8afc14a2bd8a7a92fa4f525a4726b6d5a9740e8d2623c30e308fbb58dc8469f90415a856698933c8479b01646a9dff33c87cc4e76d72aedbbf860d + languageName: node + linkType: hard + +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + +"freeport-async@npm:2.0.0": + version: 2.0.0 + resolution: "freeport-async@npm:2.0.0" + checksum: 03156ab2179fbbf5b7ff3aafc56f3e01c9d7df5cc366fbf3c29f26007773632e33ed90847fa4a979c5412ad55de8b21a7292601c531acaf8957933d96225c76d + languageName: node + linkType: hard + +"fresh@npm:0.5.2": + version: 0.5.2 + resolution: "fresh@npm:0.5.2" + checksum: 13ea8b08f91e669a64e3ba3a20eb79d7ca5379a81f1ff7f4310d54e2320645503cc0c78daedc93dfb6191287295f6479544a649c64d8e41a1c0fb0c221552346 + languageName: node + linkType: hard + +"fs-extra@npm:9.0.0": + version: 9.0.0 + resolution: "fs-extra@npm:9.0.0" + dependencies: + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^1.0.0 + checksum: c4269fbfd8d8d2a1edca4257fa28545caf7e5ad218d264f723c338a154d3624d2ef098c19915b9436d3186b7ac45d5b032371a2004008ec0cd4072512e853aa8 + languageName: node + linkType: hard + +"fs-extra@npm:^8.1.0, fs-extra@npm:~8.1.0": + version: 8.1.0 + resolution: "fs-extra@npm:8.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: bf44f0e6cea59d5ce071bba4c43ca76d216f89e402dc6285c128abc0902e9b8525135aa808adad72c9d5d218e9f4bcc63962815529ff2f684ad532172a284880 + languageName: node + linkType: hard + +"fs-extra@npm:^9.0.0, fs-extra@npm:^9.1.0": + version: 9.1.0 + resolution: "fs-extra@npm:9.1.0" + dependencies: + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: ^3.0.0 + checksum: 1b8d128dae2ac6cc94230cc5ead341ba3e0efaef82dab46a33d171c044caaa6ca001364178d42069b2809c35a1c3c35079a32107c770e9ffab3901b59af8c8b1 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"fsevents@npm:^2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@^2.3.2#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=18f3a7" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 + languageName: node + linkType: hard + +"function.prototype.name@npm:^1.1.5, function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: a7437e58c6be12aa6c90f7730eac7fa9833dc78872b4ad2963d2031b00a3367a93f98aec75f9aaac7220848e4026d67a8655e870b24f20a543d103c0d65952ec + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" + dependencies: + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-port@npm:^3.2.0": + version: 3.2.0 + resolution: "get-port@npm:3.2.0" + checksum: 31f530326569683ac4b7452eb7573c40e9dbe52aec14d80745c35475261e6389160da153d5b8ae911150b4ce99003472b30c69ba5be0cedeaa7865b95542d168 + languageName: node + linkType: hard + +"get-stream@npm:^4.0.0": + version: 4.1.0 + resolution: "get-stream@npm:4.1.0" + dependencies: + pump: ^3.0.0 + checksum: 443e1914170c15bd52ff8ea6eff6dfc6d712b031303e36302d2778e3de2506af9ee964d6124010f7818736dcfde05c04ba7ca6cc26883106e084357a17ae7d73 + languageName: node + linkType: hard + +"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad + languageName: node + linkType: hard + +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + languageName: node + linkType: hard + +"getenv@npm:^1.0.0": + version: 1.0.0 + resolution: "getenv@npm:1.0.0" + checksum: 19ae5cad603a1cf1bcb8fa3bed48e00d062eb0572a4404c02334b67f3b3499f238383082b064bb42515e9e25c2b08aef1a3e3d2b6852347721aa8b174825bd56 + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: ^4.0.1 + checksum: f4f2bfe2425296e8a47e36864e4f42be38a996db40420fe434565e4480e3322f18eb37589617a98640c5dc8fdec1a387007ee18dbb1f3f5553409c34d17f425e + languageName: node + linkType: hard + +"glob-parent@npm:^6.0.2": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: ^4.0.3 + checksum: c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + +"glob@npm:7.1.6": + version: 7.1.6 + resolution: "glob@npm:7.1.6" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 351d549dd90553b87c2d3f90ce11aed9e1093c74130440e7ae0592e11bbcd2ce7f0ebb8ba6bfe63aaf9b62166a7f4c80cb84490ae5d78408bb2572bf7d4ee0a6 + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + +"glob@npm:^6.0.1": + version: 6.0.4 + resolution: "glob@npm:6.0.4" + dependencies: + inflight: ^1.0.4 + inherits: 2 + minimatch: 2 || 3 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: c4946c3d015ac81f704d185f2b3a55eb670100693c2cf7bc833d0efd970ec727d860d4839a5178e46a7e594b34a34661bae2f4c3405727c9fd189f84954ca3c0 + languageName: node + linkType: hard + +"glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + +"glob@npm:^8.0.3": + version: 8.1.0 + resolution: "glob@npm:8.1.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^5.0.1 + once: ^1.3.0 + checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 67051a45eca3db904aee189dfc7cd53c20c7d881679c93f6146ddd4c9f4ab2268e68a919df740d39c71f4445d2b38ee360fc234428baea1dbdfe68bbcb46979e + languageName: node + linkType: hard + +"globals@npm:^13.19.0": + version: 13.24.0 + resolution: "globals@npm:13.24.0" + dependencies: + type-fest: ^0.20.2 + checksum: 56066ef058f6867c04ff203b8a44c15b038346a62efbc3060052a1016be9f56f4cf0b2cd45b74b22b81e521a889fc7786c73691b0549c2f3a6e825b3d394f43c + languageName: node + linkType: hard + +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" + dependencies: + define-properties: ^1.1.3 + checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + languageName: node + linkType: hard + +"globby@npm:^11.0.1, globby@npm:^11.1.0": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: ^2.1.0 + dir-glob: ^3.0.1 + fast-glob: ^3.2.9 + ignore: ^5.2.0 + merge2: ^1.4.1 + slash: ^3.0.0 + checksum: b4be8885e0cfa018fc783792942d53926c35c50b3aefd3fdcfb9d22c627639dc26bd2327a40a0b74b074100ce95bb7187bfeae2f236856aa3de183af7a02aea6 + languageName: node + linkType: hard + +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: bab8f0be9b568857c7bec9fda95a89f87b783546d02951c40c33f84d05bb7da3fd10f863a9beb901463669b6583173a8c8cc6d6b306ea2b9b9d5d3d943c3a673 + languageName: node + linkType: hard + +"graphql-tag@npm:^2.10.1": + version: 2.12.6 + resolution: "graphql-tag@npm:2.12.6" + dependencies: + tslib: ^2.1.0 + peerDependencies: + graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + checksum: b15162a3d62f17b9b79302445b9ee330e041582f1c7faca74b9dec5daa74272c906ec1c34e1c50592bb6215e5c3eba80a309103f6ba9e4c1cddc350c46f010df + languageName: node + linkType: hard + +"graphql@npm:15.8.0": + version: 15.8.0 + resolution: "graphql@npm:15.8.0" + checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e + languageName: node + linkType: hard + +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"has-property-descriptors@npm:^1.0.0": + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" + dependencies: + get-intrinsic: ^1.2.2 + checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: a054c40c631c0d5741a8285010a0777ea0c068f99ed43e5d6eb12972da223f8af553a455132fdb0801bdcfa0e0f443c0c03a68d8555aa529b3144b446c3f2410 + languageName: node + linkType: hard + +"has-tostringtag@npm:^1.0.0": + version: 1.0.0 + resolution: "has-tostringtag@npm:1.0.0" + dependencies: + has-symbols: ^1.0.2 + checksum: cc12eb28cb6ae22369ebaad3a8ab0799ed61270991be88f208d508076a1e99abe4198c965935ce85ea90b60c94ddda73693b0920b58e7ead048b4a391b502c1c + languageName: node + linkType: hard + +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" + dependencies: + function-bind: ^1.1.2 + checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + languageName: node + linkType: hard + +"hermes-estree@npm:0.12.0": + version: 0.12.0 + resolution: "hermes-estree@npm:0.12.0" + checksum: 368fd60bd66a30d237d8a11f0958975b18e24ec8a045217b6200818c2fab9a57880f027c4688601a5a380996be9018cb5f8c16384cb3f14647650d64a03c4030 + languageName: node + linkType: hard + +"hermes-parser@npm:0.12.0": + version: 0.12.0 + resolution: "hermes-parser@npm:0.12.0" + dependencies: + hermes-estree: 0.12.0 + checksum: 49c7bf721c9412bec7e447d625d73f79d1fb525f1e77032ae291b720bcff57ebdb5ab241a3e09e145640b4e00ae6caa0f4f2e594ad1d3fed67880fbd521ba142 + languageName: node + linkType: hard + +"hermes-profile-transformer@npm:^0.0.6": + version: 0.0.6 + resolution: "hermes-profile-transformer@npm:0.0.6" + dependencies: + source-map: ^0.7.3 + checksum: b5f874eaa65b70d88df7a4ce3b20d73312bb0bc73410f1b63d708f02e1c532ae16975da84e23b977eab8592ac95d7e6fc0c4094c78604fd0a092ed886c62aa7a + languageName: node + linkType: hard + +"hosted-git-info@npm:^3.0.2": + version: 3.0.8 + resolution: "hosted-git-info@npm:3.0.8" + dependencies: + lru-cache: ^6.0.0 + checksum: 5af7a69581acb84206a7b8e009f4680c36396814e92c8a83973dfb3b87e44e44d1f7b8eaf3e4a953686482770ecb78406a4ce4666bfdfe447762434127871d8d + languageName: node + linkType: hard + +"html-encoding-sniffer@npm:^3.0.0": + version: 3.0.0 + resolution: "html-encoding-sniffer@npm:3.0.0" + dependencies: + whatwg-encoding: ^2.0.0 + checksum: 8d806aa00487e279e5ccb573366a951a9f68f65c90298eac9c3a2b440a7ffe46615aff2995a2f61c6746c639234e6179a97e18ca5ccbbf93d3725ef2099a4502 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: d2df2da3ad40ca9ee3a39c5cc6475ef67c8f83c234475f24d8e9ce0dc80a2c82df8e1d6fa78ddd1e9022a586ea1bd247a615e80a5cd9273d90111ddda7d9e974 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 + languageName: node + linkType: hard + +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + checksum: 9b0a3782665c52ce9dc658a0d1560bcb0214ba5699e4ea15aefb2a496e2ca83db03ebc42e1cce4ac1f413e4e0d2d736a3fd755772c556a9a06853ba2a0b7d920 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" + dependencies: + "@tootallnate/once": 2 + agent-base: 6 + debug: 4 + checksum: e2ee1ff1656a131953839b2a19cd1f3a52d97c25ba87bd2559af6ae87114abf60971e498021f9b73f9fd78aea8876d1fb0d4656aac8a03c6caa9fc175f22b786 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" + dependencies: + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^5.0.1": + version: 5.0.1 + resolution: "https-proxy-agent@npm:5.0.1" + dependencies: + agent-base: 6 + debug: 4 + checksum: 571fccdf38184f05943e12d37d6ce38197becdd69e58d03f43637f7fa1269cf303a7d228aa27e5b27bbd3af8f09fd938e1c91dcfefff2df7ba77c20ed8dfc765 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + languageName: node + linkType: hard + +"human-signals@npm:^2.1.0": + version: 2.1.0 + resolution: "human-signals@npm:2.1.0" + checksum: b87fd89fce72391625271454e70f67fe405277415b48bcc0117ca73d31fa23a4241787afdc8d67f5a116cf37258c052f59ea82daffa72364d61351423848e3b8 + languageName: node + linkType: hard + +"human-signals@npm:^4.3.0": + version: 4.3.1 + resolution: "human-signals@npm:4.3.1" + checksum: 6f12958df3f21b6fdaf02d90896c271df00636a31e2bbea05bddf817a35c66b38a6fdac5863e2df85bd52f34958997f1f50350ff97249e1dff8452865d5235d1 + languageName: node + linkType: hard + +"iconv-lite@npm:0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" + dependencies: + safer-buffer: ">= 2.1.2 < 3" + checksum: bd9f120f5a5b306f0bc0b9ae1edeb1577161503f5f8252a20f1a9e56ef8775c9959fd01c55f2d3a39d9a8abaf3e30c1abeb1895f367dcbbe0a8fd1c9ca01c4f6 + languageName: node + linkType: hard + +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: ">= 2.1.2 < 3.0.0" + checksum: 3f60d47a5c8fc3313317edfd29a00a692cc87a19cac0159e2ce711d0ebc9019064108323b5e493625e25594f11c6236647d8e256fbe7a58f4a3b33b89e6d30bf + languageName: node + linkType: hard + +"ieee754@npm:^1.1.13": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e + languageName: node + linkType: hard + +"ignore@npm:^5.0.5, ignore@npm:^5.2.0, ignore@npm:^5.2.4": + version: 5.3.0 + resolution: "ignore@npm:5.3.0" + checksum: 2736da6621f14ced652785cb05d86301a66d70248597537176612bd0c8630893564bd5f6421f8806b09e8472e75c591ef01672ab8059c07c6eb2c09cefe04bf9 + languageName: node + linkType: hard + +"image-size@npm:^1.0.2": + version: 1.0.2 + resolution: "image-size@npm:1.0.2" + dependencies: + queue: 6.0.2 + bin: + image-size: bin/image-size.js + checksum: 01745fdb47f87cecf538e69c63f9adc5bfab30a345345c2de91105f3afbd1bfcfba1256af02bf3323077b33b0004469a837e077bf0cbb9c907e9c1e9e7547585 + languageName: node + linkType: hard + +"immer@npm:^10.0.3": + version: 10.0.3 + resolution: "immer@npm:10.0.3" + checksum: 76acabe6f40e752028313762ba477a5d901e57b669f3b8fb406b87b9bb9b14e663a6fbbf5a6d1ab323737dd38f4b2494a4e28002045b88948da8dbf482309f28 + languageName: node + linkType: hard + +"import-fresh@npm:^2.0.0": + version: 2.0.0 + resolution: "import-fresh@npm:2.0.0" + dependencies: + caller-path: ^2.0.0 + resolve-from: ^3.0.0 + checksum: 610255f9753cc6775df00be08e9f43691aa39f7703e3636c45afe22346b8b545e600ccfe100c554607546fc8e861fa149a0d1da078c8adedeea30fff326eef79 + languageName: node + linkType: hard + +"import-fresh@npm:^3.2.1": + version: 3.3.0 + resolution: "import-fresh@npm:3.3.0" + dependencies: + parent-module: ^1.0.0 + resolve-from: ^4.0.0 + checksum: 2cacfad06e652b1edc50be650f7ec3be08c5e5a6f6d12d035c440a42a8cc028e60a5b99ca08a77ab4d6b1346da7d971915828f33cdab730d3d42f08242d09baa + languageName: node + linkType: hard + +"import-local@npm:^3.0.2": + version: 3.1.0 + resolution: "import-local@npm:3.1.0" + dependencies: + pkg-dir: ^4.2.0 + resolve-cwd: ^3.0.0 + bin: + import-local-fixture: fixtures/cli.js + checksum: bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 7cae75c8cd9a50f57dadd77482359f659eaebac0319dd9368bcd1714f55e65badd6929ca58569da2b6494ef13fdd5598cd700b1eba23f8b79c5f19d195a3ecf7 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + +"infer-owner@npm:^1.0.4": + version: 1.0.4 + resolution: "infer-owner@npm:1.0.4" + checksum: 181e732764e4a0611576466b4b87dac338972b839920b2a8cde43642e4ed6bd54dc1fb0b40874728f2a2df9a1b097b8ff83b56d5f8f8e3927f837fdcb47d8a89 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: ^1.3.0 + wrappy: 1 + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"ini@npm:~1.3.0": + version: 1.3.8 + resolution: "ini@npm:1.3.8" + checksum: dfd98b0ca3a4fc1e323e38a6c8eb8936e31a97a918d3b377649ea15bdb15d481207a0dda1021efbd86b464cae29a0d33c1d7dcaf6c5672bee17fa849bc50a1b3 + languageName: node + linkType: hard + +"internal-ip@npm:4.3.0": + version: 4.3.0 + resolution: "internal-ip@npm:4.3.0" + dependencies: + default-gateway: ^4.2.0 + ipaddr.js: ^1.9.0 + checksum: c970433c84d9a6b46e2c9f5ab7785d3105b856d0a566891bf919241b5a884c5c1c9bf8e915aebb822a86c14b1b6867e58c1eaf5cd49eb023368083069d1a4a9a + languageName: node + linkType: hard + +"internal-slot@npm:^1.0.5": + version: 1.0.6 + resolution: "internal-slot@npm:1.0.6" + dependencies: + get-intrinsic: ^1.2.2 + hasown: ^2.0.0 + side-channel: ^1.0.4 + checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 + languageName: node + linkType: hard + +"invariant@npm:*, invariant@npm:^2.2.4": + version: 2.2.4 + resolution: "invariant@npm:2.2.4" + dependencies: + loose-envify: ^1.0.0 + checksum: cc3182d793aad82a8d1f0af697b462939cb46066ec48bbf1707c150ad5fad6406137e91a262022c269702e01621f35ef60269f6c0d7fd178487959809acdfb14 + languageName: node + linkType: hard + +"ip-regex@npm:^2.1.0": + version: 2.1.0 + resolution: "ip-regex@npm:2.1.0" + checksum: 331d95052aa53ce245745ea0fc3a6a1e2e3c8d6da65fa8ea52bf73768c1b22a9ac50629d1d2b08c04e7b3ac4c21b536693c149ce2c2615ee4796030e5b3e3cba + languageName: node + linkType: hard + +"ip@npm:^1.1.5": + version: 1.1.8 + resolution: "ip@npm:1.1.8" + checksum: a2ade53eb339fb0cbe9e69a44caab10d6e3784662285eb5d2677117ee4facc33a64679051c35e0dfdb1a3983a51ce2f5d2cb36446d52e10d01881789b76e28fb + languageName: node + linkType: hard + +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + languageName: node + linkType: hard + +"ipaddr.js@npm:^1.9.0": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: f88d3825981486f5a1942414c8d77dd6674dd71c065adcfa46f578d677edcb99fda25af42675cb59db492fdf427b34a5abfcde3982da11a8fd83a500b41cfe77 + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: eef4417e3c10e60e2c810b6084942b3ead455af16c4509959a27e490e7aee87cfb3f38e01bbde92220b528a0ee1a18d52b787e1458ee86174d8c7f0e58cd488f + languageName: node + linkType: hard + +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: ^1.0.0 + checksum: e3471d95e6c014bf37cad8a93f2f4b6aac962178e0a5041e8903147166964fdc1c5c1d2ef87e86d77322c370ca18f2ea004fa7420581fa747bcaf7c223069dbd + languageName: node + linkType: hard + +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" + dependencies: + has-bigints: ^1.0.1 + checksum: c56edfe09b1154f8668e53ebe8252b6f185ee852a50f9b41e8d921cb2bed425652049fbe438723f6cb48a63ca1aa051e948e7e401e093477c99c84eba244f666 + languageName: node + linkType: hard + +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: c03b23dbaacadc18940defb12c1c0e3aaece7553ef58b162a0f6bba0c2a7e1551b59f365b91e00d2dbac0522392d576ef322628cb1d036a0fe51eb466db67222 + languageName: node + linkType: hard + +"is-buffer@npm:~1.1.1, is-buffer@npm:~1.1.6": + version: 1.1.6 + resolution: "is-buffer@npm:1.1.6" + checksum: 4a186d995d8bbf9153b4bd9ff9fd04ae75068fe695d29025d25e592d9488911eeece84eefbd8fa41b8ddcc0711058a71d4c466dcf6f1f6e1d83830052d8ca707 + languageName: node + linkType: hard + +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: ^2.0.0 + checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" + dependencies: + has-tostringtag: ^1.0.0 + checksum: baa9077cdf15eb7b58c79398604ca57379b2fc4cf9aa7a9b9e295278648f628c9b201400c01c5e0f7afae56507d741185730307cbe7cad3b9f90a77e5ee342fc + languageName: node + linkType: hard + +"is-directory@npm:^0.3.1": + version: 0.3.1 + resolution: "is-directory@npm:0.3.1" + checksum: dce9a9d3981e38f2ded2a80848734824c50ee8680cd09aa477bef617949715cfc987197a2ca0176c58a9fb192a1a0d69b535c397140d241996a609d5906ae524 + languageName: node + linkType: hard + +"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": + version: 2.2.1 + resolution: "is-docker@npm:2.2.1" + bin: + is-docker: cli.js + checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 + languageName: node + linkType: hard + +"is-docker@npm:^3.0.0": + version: 3.0.0 + resolution: "is-docker@npm:3.0.0" + bin: + is-docker: cli.js + checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 + languageName: node + linkType: hard + +"is-extglob@npm:^1.0.0": + version: 1.0.0 + resolution: "is-extglob@npm:1.0.0" + checksum: 5eea8517feeae5206547c0fc838c1416ec763b30093c286e1965a05f46b74a59ad391f912565f3b67c9c31cab4769ab9c35420e016b608acb47309be8d0d6e94 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-finalizationregistry@npm:^1.0.2": + version: 1.0.2 + resolution: "is-finalizationregistry@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 4f243a8e06228cd45bdab8608d2cb7abfc20f6f0189c8ac21ea8d603f1f196eabd531ce0bb8e08cbab047e9845ef2c191a3761c9a17ad5cabf8b35499c4ad35d + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^2.0.0": + version: 2.0.0 + resolution: "is-fullwidth-code-point@npm:2.0.0" + checksum: eef9c6e15f68085fec19ff6a978a6f1b8f48018fd1265035552078ee945573594933b09bbd6f562553e2a241561439f1ef5339276eba68d272001343084cfab8 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-generator-fn@npm:^2.0.0": + version: 2.1.0 + resolution: "is-generator-fn@npm:2.1.0" + checksum: a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 + languageName: node + linkType: hard + +"is-generator-function@npm:^1.0.10": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d54644e7dbaccef15ceb1e5d91d680eb5068c9ee9f9eb0a9e04173eb5542c9b51b5ab52c5537f5703e48d5fddfd376817c1ca07a84a407b7115b769d4bdde72b + languageName: node + linkType: hard + +"is-glob@npm:^2.0.0": + version: 2.0.1 + resolution: "is-glob@npm:2.0.1" + dependencies: + is-extglob: ^1.0.0 + checksum: 089f5f93640072491396a5f075ce73e949a90f35832b782bc49a6b7637d58e392d53cb0b395e059ccab70fcb82ff35d183f6f9ebbcb43227a1e02e3fed5430c9 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: ^2.1.1 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 + languageName: node + linkType: hard + +"is-inside-container@npm:^1.0.0": + version: 1.0.0 + resolution: "is-inside-container@npm:1.0.0" + dependencies: + is-docker: ^3.0.0 + bin: + is-inside-container: cli.js + checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 + languageName: node + linkType: hard + +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 + languageName: node + linkType: hard + +"is-invalid-path@npm:^0.1.0": + version: 0.1.0 + resolution: "is-invalid-path@npm:0.1.0" + dependencies: + is-glob: ^2.0.0 + checksum: 184dd40d9c7a765506e4fdcd7e664f86de68a4d5d429964b160255fe40de1b4323d1b4e6ea76ff87debf788a330e4f27cb1dfe5fc2420405e1c8a16a6ed87092 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-map@npm:^2.0.1": + version: 2.0.2 + resolution: "is-map@npm:2.0.2" + checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 + languageName: node + linkType: hard + +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a + languageName: node + linkType: hard + +"is-number-object@npm:^1.0.4": + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d1e8d01bb0a7134c74649c4e62da0c6118a0bfc6771ea3c560914d52a627873e6920dd0fd0ebc0e12ad2ff4687eac4c308f7e80320b973b2c8a2c8f97a7524f7 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + +"is-path-cwd@npm:^2.2.0": + version: 2.2.0 + resolution: "is-path-cwd@npm:2.2.0" + checksum: 46a840921bb8cc0dc7b5b423a14220e7db338072a4495743a8230533ce78812dc152548c86f4b828411fe98c5451959f07cf841c6a19f611e46600bd699e8048 + languageName: node + linkType: hard + +"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 + languageName: node + linkType: hard + +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: ^3.0.1 + checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca + languageName: node + linkType: hard + +"is-potential-custom-element-name@npm:^1.0.1": + version: 1.0.1 + resolution: "is-potential-custom-element-name@npm:1.0.1" + checksum: ced7bbbb6433a5b684af581872afe0e1767e2d1146b2207ca0068a648fb5cab9d898495d1ac0583524faaf24ca98176a7d9876363097c2d14fee6dd324f3a1ab + languageName: node + linkType: hard + +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 362399b33535bc8f386d96c45c9feb04cf7f8b41c182f54174c1a45c9abbbe5e31290bbad09a458583ff6bf3b2048672cdb1881b13289569a7c548370856a652 + languageName: node + linkType: hard + +"is-set@npm:^2.0.1": + version: 2.0.2 + resolution: "is-set@npm:2.0.2" + checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "is-shared-array-buffer@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 9508929cf14fdc1afc9d61d723c6e8d34f5e117f0bffda4d97e7a5d88c3a8681f633a74f8e3ad1fe92d5113f9b921dc5ca44356492079612f9a247efbce7032a + languageName: node + linkType: hard + +"is-stream@npm:^1.1.0": + version: 1.1.0 + resolution: "is-stream@npm:1.1.0" + checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 + languageName: node + linkType: hard + +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: 323b3d04622f78d45077cf89aab783b2f49d24dc641aa89b5ad1a72114cfeff2585efc8c12ef42466dff32bde93d839ad321b26884cf75e5a7892a938b089989 + languageName: node + linkType: hard + +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" + dependencies: + has-symbols: ^1.0.2 + checksum: 92805812ef590738d9de49d677cd17dfd486794773fb6fa0032d16452af46e9b91bb43ffe82c983570f015b37136f4b53b28b8523bfb10b0ece7a66c31a54510 + languageName: node + linkType: hard + +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"is-valid-path@npm:^0.1.1": + version: 0.1.1 + resolution: "is-valid-path@npm:0.1.1" + dependencies: + is-invalid-path: ^0.1.0 + checksum: d6e716a4a999c75e32ff91ff1ea684fc9e69de05747ec4aaae049460beb971c79f474629dd87a5b4b662691f8323c1920f1b6f1dcdcb39b07082f0ff77b71da6 + languageName: node + linkType: hard + +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 1222bb7e90c32bdb949226e66d26cb7bce12e1e28e3e1b40bfa6b390ba3e08192a8664a703dff2a00a84825f4e022f9cd58c4599ff9981ab72b1d69479f4f7f6 + languageName: node + linkType: hard + +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 95bd9a57cdcb58c63b1c401c60a474b0f45b94719c30f548c891860f051bc2231575c290a6b420c6bc6e7ed99459d424c652bd5bf9a1d5259505dc35b4bf83de + languageName: node + linkType: hard + +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 5d8698d1fa599a0635d7ca85be9c26d547b317ed8fd83fc75f03efbe75d50001b5eececb1e9971de85fcde84f69ae6f8346bc92d20d55d46201d328e4c74a367 + languageName: node + linkType: hard + +"is-wsl@npm:^1.1.0": + version: 1.1.0 + resolution: "is-wsl@npm:1.1.0" + checksum: ea157d232351e68c92bd62fc541771096942fe72f69dff452dd26dcc31466258c570a3b04b8cda2e01cd2968255b02951b8670d08ea4ed76d6b1a646061ac4fe + languageName: node + linkType: hard + +"is-wsl@npm:^2.1.1, is-wsl@npm:^2.2.0": + version: 2.2.0 + resolution: "is-wsl@npm:2.2.0" + dependencies: + is-docker: ^2.0.0 + checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + +"isarray@npm:~1.0.0": + version: 1.0.0 + resolution: "isarray@npm:1.0.0" + checksum: f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isobject@npm:^3.0.1": + version: 3.0.1 + resolution: "isobject@npm:3.0.1" + checksum: db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 2367407a8d13982d8f7a859a35e7f8dd5d8f75aae4bb5484ede3a9ea1b426dc245aff28b976a2af48ee759fdd9be374ce2bd2669b644f31e76c5f46a2e29a831 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^5.0.4": + version: 5.2.1 + resolution: "istanbul-lib-instrument@npm:5.2.1" + dependencies: + "@babel/core": ^7.12.3 + "@babel/parser": ^7.14.7 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-coverage: ^3.2.0 + semver: ^6.3.0 + checksum: bf16f1803ba5e51b28bbd49ed955a736488381e09375d830e42ddeb403855b2006f850711d95ad726f2ba3f1ae8e7366de7e51d2b9ac67dc4d80191ef7ddf272 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^6.0.0": + version: 6.0.1 + resolution: "istanbul-lib-instrument@npm:6.0.1" + dependencies: + "@babel/core": ^7.12.3 + "@babel/parser": ^7.14.7 + "@istanbuljs/schema": ^0.1.2 + istanbul-lib-coverage: ^3.2.0 + semver: ^7.5.4 + checksum: fb23472e739cfc9b027cefcd7d551d5e7ca7ff2817ae5150fab99fe42786a7f7b56a29a2aa8309c37092e18297b8003f9c274f50ca4360949094d17fbac81472 + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: ^3.0.0 + make-dir: ^4.0.0 + supports-color: ^7.1.0 + checksum: fd17a1b879e7faf9bb1dc8f80b2a16e9f5b7b8498fe6ed580a618c34df0bfe53d2abd35bf8a0a00e628fb7405462576427c7df20bbe4148d19c14b431c974b21 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: ^4.1.1 + istanbul-lib-coverage: ^3.0.0 + source-map: ^0.6.1 + checksum: 21ad3df45db4b81852b662b8d4161f6446cd250c1ddc70ef96a585e2e85c26ed7cd9c2a396a71533cfb981d1a645508bc9618cae431e55d01a0628e7dec62ef2 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.3": + version: 3.1.6 + resolution: "istanbul-reports@npm:3.1.6" + dependencies: + html-escaper: ^2.0.0 + istanbul-lib-report: ^3.0.0 + checksum: 44c4c0582f287f02341e9720997f9e82c071627e1e862895745d5f52ec72c9b9f38e1d12370015d2a71dcead794f34c7732aaef3fab80a24bc617a21c3d911d6 + languageName: node + linkType: hard + +"iterator.prototype@npm:^1.1.2": + version: 1.1.2 + resolution: "iterator.prototype@npm:1.1.2" + dependencies: + define-properties: ^1.2.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + reflect.getprototypeof: ^1.0.4 + set-function-name: ^2.0.1 + checksum: d8a507e2ccdc2ce762e8a1d3f4438c5669160ac72b88b648e59a688eec6bc4e64b22338e74000518418d9e693faf2a092d2af21b9ec7dbf7763b037a54701168 + languageName: node + linkType: hard + +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + languageName: node + linkType: hard + +"jest-changed-files@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-changed-files@npm:29.7.0" + dependencies: + execa: ^5.0.0 + jest-util: ^29.7.0 + p-limit: ^3.1.0 + checksum: 963e203893c396c5dfc75e00a49426688efea7361b0f0e040035809cecd2d46b3c01c02be2d9e8d38b1138357d2de7719ea5b5be21f66c10f2e9685a5a73bb99 + languageName: node + linkType: hard + +"jest-circus@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-circus@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + co: ^4.6.0 + dedent: ^1.0.0 + is-generator-fn: ^2.0.0 + jest-each: ^29.7.0 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + p-limit: ^3.1.0 + pretty-format: ^29.7.0 + pure-rand: ^6.0.0 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: 349437148924a5a109c9b8aad6d393a9591b4dac1918fc97d81b7fc515bc905af9918495055071404af1fab4e48e4b04ac3593477b1d5dcf48c4e71b527c70a7 + languageName: node + linkType: hard + +"jest-cli@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-cli@npm:29.7.0" + dependencies: + "@jest/core": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + create-jest: ^29.7.0 + exit: ^0.1.2 + import-local: ^3.0.2 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + yargs: ^17.3.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 664901277a3f5007ea4870632ed6e7889db9da35b2434e7cb488443e6bf5513889b344b7fddf15112135495b9875892b156faeb2d7391ddb9e2a849dcb7b6c36 + languageName: node + linkType: hard + +"jest-config@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-config@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@jest/test-sequencer": ^29.7.0 + "@jest/types": ^29.6.3 + babel-jest: ^29.7.0 + chalk: ^4.0.0 + ci-info: ^3.2.0 + deepmerge: ^4.2.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + jest-circus: ^29.7.0 + jest-environment-node: ^29.7.0 + jest-get-type: ^29.6.3 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-runner: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + micromatch: ^4.0.4 + parse-json: ^5.2.0 + pretty-format: ^29.7.0 + slash: ^3.0.0 + strip-json-comments: ^3.1.1 + peerDependencies: + "@types/node": "*" + ts-node: ">=9.0.0" + peerDependenciesMeta: + "@types/node": + optional: true + ts-node: + optional: true + checksum: 4cabf8f894c180cac80b7df1038912a3fc88f96f2622de33832f4b3314f83e22b08fb751da570c0ab2b7988f21604bdabade95e3c0c041068ac578c085cf7dff + languageName: node + linkType: hard + +"jest-diff@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-diff@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + diff-sequences: ^29.6.3 + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: 08e24a9dd43bfba1ef07a6374e5af138f53137b79ec3d5cc71a2303515335898888fa5409959172e1e05de966c9e714368d15e8994b0af7441f0721ee8e1bb77 + languageName: node + linkType: hard + +"jest-docblock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-docblock@npm:29.7.0" + dependencies: + detect-newline: ^3.0.0 + checksum: 66390c3e9451f8d96c5da62f577a1dad701180cfa9b071c5025acab2f94d7a3efc2515cfa1654ebe707213241541ce9c5530232cdc8017c91ed64eea1bd3b192 + languageName: node + linkType: hard + +"jest-each@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-each@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + jest-get-type: ^29.6.3 + jest-util: ^29.7.0 + pretty-format: ^29.7.0 + checksum: e88f99f0184000fc8813f2a0aa79e29deeb63700a3b9b7928b8a418d7d93cd24933608591dbbdea732b473eb2021c72991b5cc51a17966842841c6e28e6f691c + languageName: node + linkType: hard + +"jest-environment-jsdom@npm:^29.2.1": + version: 29.7.0 + resolution: "jest-environment-jsdom@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/jsdom": ^20.0.0 + "@types/node": "*" + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + jsdom: ^20.0.0 + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + checksum: 559aac134c196fccc1dfc794d8fc87377e9f78e894bb13012b0831d88dec0abd7ece99abec69da564b8073803be4f04a9eb4f4d1bb80e29eec0cb252c254deb8 + languageName: node + linkType: hard + +"jest-environment-node@npm:^29.2.1, jest-environment-node@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-environment-node@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: 501a9966292cbe0ca3f40057a37587cb6def25e1e0c5e39ac6c650fe78d3c70a2428304341d084ac0cced5041483acef41c477abac47e9a290d5545fd2f15646 + languageName: node + linkType: hard + +"jest-expo@npm:^49.0.0": + version: 49.0.0 + resolution: "jest-expo@npm:49.0.0" + dependencies: + "@expo/config": ~8.1.0 + "@jest/create-cache-key-function": ^29.2.1 + babel-jest: ^29.2.1 + find-up: ^5.0.0 + jest-environment-jsdom: ^29.2.1 + jest-watch-select-projects: ^2.0.0 + jest-watch-typeahead: 2.2.1 + json5: ^2.2.3 + lodash: ^4.17.19 + react-test-renderer: 18.2.0 + bin: + jest: bin/jest.js + checksum: 0ec4051d058470a2d069cd1c9102c66b8d0d69061e817e6bace7c3f48759ed5f825694ac12bf6e4e6c292629b4693696e1b2b32500fd37daeccaf619d28b06f1 + languageName: node + linkType: hard + +"jest-get-type@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-get-type@npm:29.6.3" + checksum: 88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 + languageName: node + linkType: hard + +"jest-haste-map@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-haste-map@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/graceful-fs": ^4.1.3 + "@types/node": "*" + anymatch: ^3.0.3 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.9 + jest-regex-util: ^29.6.3 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 + micromatch: ^4.0.4 + walker: ^1.0.8 + dependenciesMeta: + fsevents: + optional: true + checksum: c2c8f2d3e792a963940fbdfa563ce14ef9e14d4d86da645b96d3cd346b8d35c5ce0b992ee08593939b5f718cf0a1f5a90011a056548a1dbf58397d4356786f01 + languageName: node + linkType: hard + +"jest-leak-detector@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-leak-detector@npm:29.7.0" + dependencies: + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 + languageName: node + linkType: hard + +"jest-matcher-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-matcher-utils@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + jest-diff: ^29.7.0 + jest-get-type: ^29.6.3 + pretty-format: ^29.7.0 + checksum: d7259e5f995d915e8a37a8fd494cb7d6af24cd2a287b200f831717ba0d015190375f9f5dc35393b8ba2aae9b2ebd60984635269c7f8cff7d85b077543b7744cd + languageName: node + linkType: hard + +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" + dependencies: + "@babel/code-frame": ^7.12.13 + "@jest/types": ^29.6.3 + "@types/stack-utils": ^2.0.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 + pretty-format: ^29.7.0 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 + languageName: node + linkType: hard + +"jest-mock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-mock@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + jest-util: ^29.7.0 + checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 + languageName: node + linkType: hard + +"jest-pnp-resolver@npm:^1.2.2": + version: 1.2.3 + resolution: "jest-pnp-resolver@npm:1.2.3" + peerDependencies: + jest-resolve: "*" + peerDependenciesMeta: + jest-resolve: + optional: true + checksum: db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 + languageName: node + linkType: hard + +"jest-regex-util@npm:^27.0.6": + version: 27.5.1 + resolution: "jest-regex-util@npm:27.5.1" + checksum: d45ca7a9543616a34f7f3079337439cf07566e677a096472baa2810e274b9808b76767c97b0a4029b8a5b82b9d256dee28ef9ad4138b2b9e5933f6fac106c418 + languageName: node + linkType: hard + +"jest-regex-util@npm:^29.0.0, jest-regex-util@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-regex-util@npm:29.6.3" + checksum: 0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a + languageName: node + linkType: hard + +"jest-resolve-dependencies@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve-dependencies@npm:29.7.0" + dependencies: + jest-regex-util: ^29.6.3 + jest-snapshot: ^29.7.0 + checksum: aeb75d8150aaae60ca2bb345a0d198f23496494677cd6aefa26fc005faf354061f073982175daaf32b4b9d86b26ca928586344516e3e6969aa614cb13b883984 + languageName: node + linkType: hard + +"jest-resolve@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve@npm:29.7.0" + dependencies: + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-pnp-resolver: ^1.2.2 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + resolve: ^1.20.0 + resolve.exports: ^2.0.0 + slash: ^3.0.0 + checksum: 0ca218e10731aa17920526ec39deaec59ab9b966237905ffc4545444481112cd422f01581230eceb7e82d86f44a543d520a71391ec66e1b4ef1a578bd5c73487 + languageName: node + linkType: hard + +"jest-runner@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runner@npm:29.7.0" + dependencies: + "@jest/console": ^29.7.0 + "@jest/environment": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + emittery: ^0.13.1 + graceful-fs: ^4.2.9 + jest-docblock: ^29.7.0 + jest-environment-node: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-leak-detector: ^29.7.0 + jest-message-util: ^29.7.0 + jest-resolve: ^29.7.0 + jest-runtime: ^29.7.0 + jest-util: ^29.7.0 + jest-watcher: ^29.7.0 + jest-worker: ^29.7.0 + p-limit: ^3.1.0 + source-map-support: 0.5.13 + checksum: f0405778ea64812bf9b5c50b598850d94ccf95d7ba21f090c64827b41decd680ee19fcbb494007cdd7f5d0d8906bfc9eceddd8fa583e753e736ecd462d4682fb + languageName: node + linkType: hard + +"jest-runtime@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runtime@npm:29.7.0" + dependencies: + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/globals": ^29.7.0 + "@jest/source-map": ^29.6.3 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + cjs-module-lexer: ^1.0.0 + collect-v8-coverage: ^1.0.0 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-regex-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + slash: ^3.0.0 + strip-bom: ^4.0.0 + checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e + languageName: node + linkType: hard + +"jest-snapshot@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-snapshot@npm:29.7.0" + dependencies: + "@babel/core": ^7.11.6 + "@babel/generator": ^7.7.2 + "@babel/plugin-syntax-jsx": ^7.7.2 + "@babel/plugin-syntax-typescript": ^7.7.2 + "@babel/types": ^7.3.3 + "@jest/expect-utils": ^29.7.0 + "@jest/transform": ^29.7.0 + "@jest/types": ^29.6.3 + babel-preset-current-node-syntax: ^1.0.0 + chalk: ^4.0.0 + expect: ^29.7.0 + graceful-fs: ^4.2.9 + jest-diff: ^29.7.0 + jest-get-type: ^29.6.3 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + natural-compare: ^1.4.0 + pretty-format: ^29.7.0 + semver: ^7.5.3 + checksum: 86821c3ad0b6899521ce75ee1ae7b01b17e6dfeff9166f2cf17f012e0c5d8c798f30f9e4f8f7f5bed01ea7b55a6bc159f5eda778311162cbfa48785447c237ad + languageName: node + linkType: hard + +"jest-util@npm:^27.2.0": + version: 27.5.1 + resolution: "jest-util@npm:27.5.1" + dependencies: + "@jest/types": ^27.5.1 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: ac8d122f6daf7a035dcea156641fd3701aeba245417c40836a77e35b3341b9c02ddc5d904cfcd4ddbaa00ab854da76d3b911870cafdcdbaff90ea471de26c7d7 + languageName: node + linkType: hard + +"jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca + languageName: node + linkType: hard + +"jest-validate@npm:^29.2.1, jest-validate@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-validate@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + camelcase: ^6.2.0 + chalk: ^4.0.0 + jest-get-type: ^29.6.3 + leven: ^3.1.0 + pretty-format: ^29.7.0 + checksum: 191fcdc980f8a0de4dbdd879fa276435d00eb157a48683af7b3b1b98b0f7d9de7ffe12689b617779097ff1ed77601b9f7126b0871bba4f776e222c40f62e9dae + languageName: node + linkType: hard + +"jest-watch-select-projects@npm:^2.0.0": + version: 2.0.0 + resolution: "jest-watch-select-projects@npm:2.0.0" + dependencies: + ansi-escapes: ^4.3.0 + chalk: ^3.0.0 + prompts: ^2.2.1 + checksum: 67b7a08d8e7b5ecfba67d86f02be29e4917c4416c9f169246f10cc40792b1c5fa38fcfeb25195643db080ace1f4fdf2f827bd244e7cdff7512d1ddfbc94270f0 + languageName: node + linkType: hard + +"jest-watch-typeahead@npm:2.2.1": + version: 2.2.1 + resolution: "jest-watch-typeahead@npm:2.2.1" + dependencies: + ansi-escapes: ^6.0.0 + chalk: ^4.0.0 + jest-regex-util: ^29.0.0 + jest-watcher: ^29.0.0 + slash: ^5.0.0 + string-length: ^5.0.1 + strip-ansi: ^7.0.1 + peerDependencies: + jest: ^27.0.0 || ^28.0.0 || ^29.0.0 + checksum: 5ba8068209da273187065b8900495ca9d0fce13b090d2e0193e1b862f7e920ca808f8a0c4c2ea504e1646d38519083276fbb304dba728e16b9126c0734f8f8ee + languageName: node + linkType: hard + +"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-watcher@npm:29.7.0" + dependencies: + "@jest/test-result": ^29.7.0 + "@jest/types": ^29.6.3 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + emittery: ^0.13.1 + jest-util: ^29.7.0 + string-length: ^4.0.1 + checksum: 67e6e7fe695416deff96b93a14a561a6db69389a0667e9489f24485bb85e5b54e12f3b2ba511ec0b777eca1e727235b073e3ebcdd473d68888650489f88df92f + languageName: node + linkType: hard + +"jest-worker@npm:^27.2.0": + version: 27.5.1 + resolution: "jest-worker@npm:27.5.1" + dependencies: + "@types/node": "*" + merge-stream: ^2.0.0 + supports-color: ^8.0.0 + checksum: 98cd68b696781caed61c983a3ee30bf880b5bd021c01d98f47b143d4362b85d0737f8523761e2713d45e18b4f9a2b98af1eaee77afade4111bb65c77d6f7c980 + languageName: node + linkType: hard + +"jest-worker@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" + dependencies: + "@types/node": "*" + jest-util: ^29.7.0 + merge-stream: ^2.0.0 + supports-color: ^8.0.0 + checksum: 30fff60af49675273644d408b650fc2eb4b5dcafc5a0a455f238322a8f9d8a98d847baca9d51ff197b6747f54c7901daa2287799230b856a0f48287d131f8c13 + languageName: node + linkType: hard + +"jest@npm:^29.7.0": + version: 29.7.0 + resolution: "jest@npm:29.7.0" + dependencies: + "@jest/core": ^29.7.0 + "@jest/types": ^29.6.3 + import-local: ^3.0.2 + jest-cli: ^29.7.0 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 17ca8d67504a7dbb1998cf3c3077ec9031ba3eb512da8d71cb91bcabb2b8995c4e4b292b740cb9bf1cbff5ce3e110b3f7c777b0cefb6f41ab05445f248d0ee0b + languageName: node + linkType: hard + +"jimp-compact@npm:0.16.1": + version: 0.16.1 + resolution: "jimp-compact@npm:0.16.1" + checksum: 5a1c62d70881b31f79ea65fecfe03617be0eb56139bc451f37e8972365c99ac3b52c5176c446ff27144c98ab664a99107ae08d347044e94e1de637f165b41a57 + languageName: node + linkType: hard + +"joi@npm:^17.2.1": + version: 17.11.0 + resolution: "joi@npm:17.11.0" + dependencies: + "@hapi/hoek": ^9.0.0 + "@hapi/topo": ^5.0.0 + "@sideway/address": ^4.1.3 + "@sideway/formula": ^3.0.1 + "@sideway/pinpoint": ^2.0.0 + checksum: 3a4e9ecba345cdafe585e7ed8270a44b39718e11dff3749aa27e0001a63d578b75100c062be28e6f48f960b594864034e7a13833f33fbd7ad56d5ce6b617f9bf + languageName: node + linkType: hard + +"join-component@npm:^1.1.0": + version: 1.1.0 + resolution: "join-component@npm:1.1.0" + checksum: b904c2f98549e4195022caca3a7dc837f9706c670ff333f3d617f2aed23bce2841322a999734683b6ab8e202568ad810c11ff79b58a64df66888153f04750239 + languageName: node + linkType: hard + +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: ^1.0.7 + esprima: ^4.0.0 + bin: + js-yaml: bin/js-yaml.js + checksum: bef146085f472d44dee30ec34e5cf36bf89164f5d585435a3d3da89e52622dff0b188a580e4ad091c3341889e14cb88cac6e4deb16dc5b1e9623bb0601fc255c + languageName: node + linkType: hard + +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + languageName: node + linkType: hard + +"jsc-android@npm:^250231.0.0": + version: 250231.0.0 + resolution: "jsc-android@npm:250231.0.0" + checksum: 6c3f0f6f02fa37a19935b2fbe651e9d6ecc370eb30f2ecee76379337bbf084abb568a1ef1133fe622c5b76f43cf54bb7716f92a94dca010985da38edc48841e2 + languageName: node + linkType: hard + +"jsc-safe-url@npm:^0.2.2, jsc-safe-url@npm:^0.2.4": + version: 0.2.4 + resolution: "jsc-safe-url@npm:0.2.4" + checksum: 53b5741ba2c0a54da1722929dc80becb2c6fcc9525124fb6c2aec1a00f48e79afffd26816c278111e7b938e37ace029e33cbb8cdaa4ac1f528a87e58022284af + languageName: node + linkType: hard + +"jscodeshift@npm:^0.14.0": + version: 0.14.0 + resolution: "jscodeshift@npm:0.14.0" + dependencies: + "@babel/core": ^7.13.16 + "@babel/parser": ^7.13.16 + "@babel/plugin-proposal-class-properties": ^7.13.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 + "@babel/plugin-transform-modules-commonjs": ^7.13.8 + "@babel/preset-flow": ^7.13.13 + "@babel/preset-typescript": ^7.13.0 + "@babel/register": ^7.13.16 + babel-core: ^7.0.0-bridge.0 + chalk: ^4.1.2 + flow-parser: 0.* + graceful-fs: ^4.2.4 + micromatch: ^4.0.4 + neo-async: ^2.5.0 + node-dir: ^0.1.17 + recast: ^0.21.0 + temp: ^0.8.4 + write-file-atomic: ^2.3.0 + peerDependencies: + "@babel/preset-env": ^7.1.6 + bin: + jscodeshift: bin/jscodeshift.js + checksum: 54ea6d639455883336f80b38a70648821c88b7942315dc0fbab01bc34a9ad0f0f78e3bd69304b5ab167e4262d6ed7e6284c6d32525ab01c89d9118df89b3e2a0 + languageName: node + linkType: hard + +"jsdom@npm:^20.0.0": + version: 20.0.3 + resolution: "jsdom@npm:20.0.3" + dependencies: + abab: ^2.0.6 + acorn: ^8.8.1 + acorn-globals: ^7.0.0 + cssom: ^0.5.0 + cssstyle: ^2.3.0 + data-urls: ^3.0.2 + decimal.js: ^10.4.2 + domexception: ^4.0.0 + escodegen: ^2.0.0 + form-data: ^4.0.0 + html-encoding-sniffer: ^3.0.0 + http-proxy-agent: ^5.0.0 + https-proxy-agent: ^5.0.1 + is-potential-custom-element-name: ^1.0.1 + nwsapi: ^2.2.2 + parse5: ^7.1.1 + saxes: ^6.0.0 + symbol-tree: ^3.2.4 + tough-cookie: ^4.1.2 + w3c-xmlserializer: ^4.0.0 + webidl-conversions: ^7.0.0 + whatwg-encoding: ^2.0.0 + whatwg-mimetype: ^3.0.0 + whatwg-url: ^11.0.0 + ws: ^8.11.0 + xml-name-validator: ^4.0.0 + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + checksum: 6e2ae21db397133a061b270c26d2dbc0b9051733ea3b896a7ece78d79f475ff0974f766a413c1198a79c793159119169f2335ddb23150348fbfdcfa6f3105536 + languageName: node + linkType: hard + +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 4dc190771129e12023f729ce20e1e0bfceac84d73a85bc3119f7f938843fe25a4aeccb54b6494dce26fcf263d815f5f31acdefac7cc9329efb8422a4f4d9fa9d + languageName: node + linkType: hard + +"jsesc@npm:~0.5.0": + version: 0.5.0 + resolution: "jsesc@npm:0.5.0" + bin: + jsesc: bin/jsesc + checksum: b8b44cbfc92f198ad972fba706ee6a1dfa7485321ee8c0b25f5cedd538dcb20cde3197de16a7265430fce8277a12db066219369e3d51055038946039f6e20e17 + languageName: node + linkType: hard + +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + +"json-parse-better-errors@npm:^1.0.1": + version: 1.0.2 + resolution: "json-parse-better-errors@npm:1.0.2" + checksum: ff2b5ba2a70e88fd97a3cb28c1840144c5ce8fae9cbeeddba15afa333a5c407cf0e42300cd0a2885dbb055227fe68d405070faad941beeffbfde9cf3b2c78c5d + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f + languageName: node + linkType: hard + +"json-schema-deref-sync@npm:^0.13.0": + version: 0.13.0 + resolution: "json-schema-deref-sync@npm:0.13.0" + dependencies: + clone: ^2.1.2 + dag-map: ~1.0.0 + is-valid-path: ^0.1.1 + lodash: ^4.17.13 + md5: ~2.2.0 + memory-cache: ~0.2.0 + traverse: ~0.6.6 + valid-url: ~1.0.9 + checksum: c6630b3ec37d0d43c8b75f4733fee304e93b3867f55190e779b2fb149a2f27c632694804ddbc1f56882cee8f6d92130855af061a1a941e63a20902455ac33426 + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: cff44156ddce9c67c44386ad5cddf91925fe06b1d217f2da9c4910d01f358c6e3989c4d5a02683c7a5667f9727ff05831f7aa8ae66c8ff691c556f0884d49215 + languageName: node + linkType: hard + +"json5@npm:^2.1.1, json5@npm:^2.2.2, json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 + languageName: node + linkType: hard + +"jsonfile@npm:^4.0.0": + version: 4.0.0 + resolution: "jsonfile@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e + languageName: node + linkType: hard + +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: ^4.1.6 + universalify: ^2.0.0 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 7af3b8e1ac8fe7f1eccc6263c6ca14e1966fcbc74b618d3c78a0a2075579487547b94f72b7a1114e844a1e15bb00d440e5d1720bfc4612d790a6f285d5ea8354 + languageName: node + linkType: hard + +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0": + version: 3.3.5 + resolution: "jsx-ast-utils@npm:3.3.5" + dependencies: + array-includes: ^3.1.6 + array.prototype.flat: ^1.3.1 + object.assign: ^4.1.4 + object.values: ^1.1.6 + checksum: f4b05fa4d7b5234230c905cfa88d36dc8a58a6666975a3891429b1a8cdc8a140bca76c297225cb7a499fad25a2c052ac93934449a2c31a44fc9edd06c773780a + languageName: node + linkType: hard + +"keyv@npm:^4.5.3": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: 3.0.1 + checksum: 74a24395b1c34bd44ad5cb2b49140d087553e170625240b86755a6604cd65aa16efdbdeae5cdb17ba1284a0fbb25ad06263755dbc71b8d8b06f74232ce3cdd72 + languageName: node + linkType: hard + +"kind-of@npm:^6.0.2": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b + languageName: node + linkType: hard + +"kleur@npm:^3.0.3": + version: 3.0.3 + resolution: "kleur@npm:3.0.3" + checksum: df82cd1e172f957bae9c536286265a5cdbd5eeca487cb0a3b2a7b41ef959fc61f8e7c0e9aeea9c114ccf2c166b6a8dd45a46fd619c1c569d210ecd2765ad5169 + languageName: node + linkType: hard + +"leven@npm:^3.1.0": + version: 3.1.0 + resolution: "leven@npm:3.1.0" + checksum: 638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 + languageName: node + linkType: hard + +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" + dependencies: + prelude-ls: ^1.2.1 + type-check: ~0.4.0 + checksum: 12c5021c859bd0f5248561bf139121f0358285ec545ebf48bb3d346820d5c61a4309535c7f387ed7d84361cf821e124ce346c6b7cef8ee09a67c1473b46d0fc4 + languageName: node + linkType: hard + +"lightningcss-darwin-arm64@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-darwin-arm64@npm:1.19.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"lightningcss-darwin-x64@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-darwin-x64@npm:1.19.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"lightningcss-linux-arm-gnueabihf@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-linux-arm-gnueabihf@npm:1.19.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"lightningcss-linux-arm64-gnu@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-linux-arm64-gnu@npm:1.19.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"lightningcss-linux-arm64-musl@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-linux-arm64-musl@npm:1.19.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"lightningcss-linux-x64-gnu@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-linux-x64-gnu@npm:1.19.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"lightningcss-linux-x64-musl@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-linux-x64-musl@npm:1.19.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"lightningcss-win32-x64-msvc@npm:1.19.0": + version: 1.19.0 + resolution: "lightningcss-win32-x64-msvc@npm:1.19.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"lightningcss@npm:~1.19.0": + version: 1.19.0 + resolution: "lightningcss@npm:1.19.0" + dependencies: + detect-libc: ^1.0.3 + lightningcss-darwin-arm64: 1.19.0 + lightningcss-darwin-x64: 1.19.0 + lightningcss-linux-arm-gnueabihf: 1.19.0 + lightningcss-linux-arm64-gnu: 1.19.0 + lightningcss-linux-arm64-musl: 1.19.0 + lightningcss-linux-x64-gnu: 1.19.0 + lightningcss-linux-x64-musl: 1.19.0 + lightningcss-win32-x64-msvc: 1.19.0 + dependenciesMeta: + lightningcss-darwin-arm64: + optional: true + lightningcss-darwin-x64: + optional: true + lightningcss-linux-arm-gnueabihf: + optional: true + lightningcss-linux-arm64-gnu: + optional: true + lightningcss-linux-arm64-musl: + optional: true + lightningcss-linux-x64-gnu: + optional: true + lightningcss-linux-x64-musl: + optional: true + lightningcss-win32-x64-msvc: + optional: true + checksum: c51de34b7379f9da391d0c1157893bb1484357d1ce2212a8c7943690d7a4fed7f2fa0d2dd7a92004b4444662011564ec7bf31f458a1638c856c529fe07285177 + languageName: node + linkType: hard + +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + +"locate-path@npm:^3.0.0": + version: 3.0.0 + resolution: "locate-path@npm:3.0.0" + dependencies: + p-locate: ^3.0.0 + path-exists: ^3.0.0 + checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: ^4.1.0 + checksum: 83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: ^5.0.0 + checksum: 72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.debounce@npm:^4.0.8": + version: 4.0.8 + resolution: "lodash.debounce@npm:4.0.8" + checksum: a3f527d22c548f43ae31c861ada88b2637eb48ac6aa3eb56e82d44917971b8aa96fbb37aa60efea674dc4ee8c42074f90f7b1f772e9db375435f6c83a19b3bc6 + languageName: node + linkType: hard + +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 + languageName: node + linkType: hard + +"lodash.throttle@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.throttle@npm:4.1.1" + checksum: 129c0a28cee48b348aef146f638ef8a8b197944d4e9ec26c1890c19d9bf5a5690fe11b655c77a4551268819b32d27f4206343e30c78961f60b561b8608c8c805 + languageName: node + linkType: hard + +"lodash@npm:^4.17.13, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 + languageName: node + linkType: hard + +"log-symbols@npm:^2.2.0": + version: 2.2.0 + resolution: "log-symbols@npm:2.2.0" + dependencies: + chalk: ^2.0.1 + checksum: 4c95e3b65f0352dbe91dc4989c10baf7a44e2ef5b0db7e6721e1476268e2b6f7090c3aa880d4f833a05c5c3ff18f4ec5215a09bd0099986d64a8186cfeb48ac8 + languageName: node + linkType: hard + +"log-symbols@npm:^4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"logkitty@npm:^0.7.1": + version: 0.7.1 + resolution: "logkitty@npm:0.7.1" + dependencies: + ansi-fragments: ^0.2.1 + dayjs: ^1.8.15 + yargs: ^15.1.0 + bin: + logkitty: bin/logkitty.js + checksum: f1af990ff09564ef5122597a52bba6d233302c49865e6ddea1343d2a0e2efe3005127e58e93e25c98b6b1f192731fc5c52e3204876a15fc9a52abc8b4f1af931 + languageName: node + linkType: hard + +"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": + version: 1.4.0 + resolution: "loose-envify@npm:1.4.0" + dependencies: + js-tokens: ^3.0.0 || ^4.0.0 + bin: + loose-envify: cli.js + checksum: 6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb + languageName: node + linkType: hard + +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: ^4.0.0 + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + +"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": + version: 2.1.0 + resolution: "make-dir@npm:2.1.0" + dependencies: + pify: ^4.0.1 + semver: ^5.6.0 + checksum: 043548886bfaf1820323c6a2997e6d2fa51ccc2586ac14e6f14634f7458b4db2daf15f8c310e2a0abd3e0cddc64df1890d8fc7263033602c47bb12cbfcf86aab + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: ^7.5.3 + checksum: bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" + dependencies: + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 + is-lambda: ^1.0.1 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + promise-retry: ^2.0.1 + ssri: ^10.0.0 + checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + languageName: node + linkType: hard + +"makeerror@npm:1.0.12": + version: 1.0.12 + resolution: "makeerror@npm:1.0.12" + dependencies: + tmpl: 1.0.5 + checksum: b38a025a12c8146d6eeea5a7f2bf27d51d8ad6064da8ca9405fcf7bf9b54acd43e3b30ddd7abb9b1bfa4ddb266019133313482570ddb207de568f71ecfcf6060 + languageName: node + linkType: hard + +"md5-file@npm:^3.2.3": + version: 3.2.3 + resolution: "md5-file@npm:3.2.3" + dependencies: + buffer-alloc: ^1.1.0 + bin: + md5-file: cli.js + checksum: a3738274ee0c5ce21e7c14a4b60e5de6b298740f8a37eeb502bb97a056e3f19ea0871418b4dd45ca9c70d2f1d6c79a19e9a320fba1c129b196cdf671e544c450 + languageName: node + linkType: hard + +"md5@npm:^2.2.1": + version: 2.3.0 + resolution: "md5@npm:2.3.0" + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: ~1.1.6 + checksum: a63cacf4018dc9dee08c36e6f924a64ced735b37826116c905717c41cebeb41a522f7a526ba6ad578f9c80f02cb365033ccd67fe186ffbcc1a1faeb75daa9b6e + languageName: node + linkType: hard + +"md5@npm:~2.2.0": + version: 2.2.1 + resolution: "md5@npm:2.2.1" + dependencies: + charenc: ~0.0.1 + crypt: ~0.0.1 + is-buffer: ~1.1.1 + checksum: 2237e583f961d04d43c59c2f9383d1e47099427fa37f9dc50e8aec32e770f8b038ad9268c2523a7c8041ab6f4678a742ca533a7f670dbc2857c5b18388cf4d71 + languageName: node + linkType: hard + +"md5hex@npm:^1.0.0": + version: 1.0.0 + resolution: "md5hex@npm:1.0.0" + checksum: eabca53391ef32429f78fc5c83d7c7cebee9ee88db79854492a5e19de2880d4497523b4489abeeb920fcd5bae9ee7a6d8aa343d55ed91866b2d50e619047b639 + languageName: node + linkType: hard + +"media-typer@npm:0.3.0": + version: 0.3.0 + resolution: "media-typer@npm:0.3.0" + checksum: af1b38516c28ec95d6b0826f6c8f276c58aec391f76be42aa07646b4e39d317723e869700933ca6995b056db4b09a78c92d5440dc23657e6764be5d28874bba1 + languageName: node + linkType: hard + +"memoize-one@npm:^5.0.0": + version: 5.2.1 + resolution: "memoize-one@npm:5.2.1" + checksum: a3cba7b824ebcf24cdfcd234aa7f86f3ad6394b8d9be4c96ff756dafb8b51c7f71320785fbc2304f1af48a0467cbbd2a409efc9333025700ed523f254cb52e3d + languageName: node + linkType: hard + +"memory-cache@npm:~0.2.0": + version: 0.2.0 + resolution: "memory-cache@npm:0.2.0" + checksum: 255c87fec360ce06818ca7aeb5850d798e14950a9fcea879d88e1f8d1f4a6cffb8ed16da54aa677f5ec8e47773fbe15775a1cdf837ac190e17e9fb4b71e87bee + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 + languageName: node + linkType: hard + +"metro-babel-transformer@npm:0.76.8": + version: 0.76.8 + resolution: "metro-babel-transformer@npm:0.76.8" + dependencies: + "@babel/core": ^7.20.0 + hermes-parser: 0.12.0 + nullthrows: ^1.1.1 + checksum: 2a00839585f6e9b831f29d203edcfd7dc62383efa41734fbf8d13daded7a18c7650aa70a1a03943a8d1c9ac20cb33d42ac3eae3b89484fe704a0a70a164d76ab + languageName: node + linkType: hard + +"metro-cache-key@npm:0.76.8": + version: 0.76.8 + resolution: "metro-cache-key@npm:0.76.8" + checksum: 23d33652ff814cdd4739201ed545ab421cf16aa10d4bfcf7673ec630268ceed7a3735a59a711bdfa812786d181a4e64f453f1658fd342f5ff55aef232ac63b0d + languageName: node + linkType: hard + +"metro-cache@npm:0.76.8": + version: 0.76.8 + resolution: "metro-cache@npm:0.76.8" + dependencies: + metro-core: 0.76.8 + rimraf: ^3.0.2 + checksum: 57ac005e44f5e57e62bd597b0b5023c3c961d41eb80f91a1fba61acaa21423efba5d5b710f5a4a6e09ecebe5512441d06dd54a5a4acd7f09ba8dd1361b3fc2d3 + languageName: node + linkType: hard + +"metro-config@npm:0.76.8": + version: 0.76.8 + resolution: "metro-config@npm:0.76.8" + dependencies: + connect: ^3.6.5 + cosmiconfig: ^5.0.5 + jest-validate: ^29.2.1 + metro: 0.76.8 + metro-cache: 0.76.8 + metro-core: 0.76.8 + metro-runtime: 0.76.8 + checksum: aa3208d4a0f274d2f204f26ed214cf3c8a86138d997203413599a48930192bafd791a115a30e5af55b2685aa250174fb64a2a9009d9b5842af78c033420de312 + languageName: node + linkType: hard + +"metro-core@npm:0.76.8": + version: 0.76.8 + resolution: "metro-core@npm:0.76.8" + dependencies: + lodash.throttle: ^4.1.1 + metro-resolver: 0.76.8 + checksum: 9a43e824404c194ca31de0e204f304ded65d1c4ecb401f270750f6e319f9454293067c69c682b20413951eb63fde1e4e2a8e779f9eb779d2da95ffea4e093ce9 + languageName: node + linkType: hard + +"metro-file-map@npm:0.76.8": + version: 0.76.8 + resolution: "metro-file-map@npm:0.76.8" + dependencies: + anymatch: ^3.0.3 + debug: ^2.2.0 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.4 + invariant: ^2.2.4 + jest-regex-util: ^27.0.6 + jest-util: ^27.2.0 + jest-worker: ^27.2.0 + micromatch: ^4.0.4 + node-abort-controller: ^3.1.1 + nullthrows: ^1.1.1 + walker: ^1.0.7 + dependenciesMeta: + fsevents: + optional: true + checksum: eecd1560b32115db93ca9a8c066203465619a5b39a9ccc5a9771b61d392deeda96737c87e1ed740cd00e7d8ef9149f7e1ee32a0b311242fdfca372c79b4893b4 + languageName: node + linkType: hard + +"metro-inspector-proxy@npm:0.76.8": + version: 0.76.8 + resolution: "metro-inspector-proxy@npm:0.76.8" + dependencies: + connect: ^3.6.5 + debug: ^2.2.0 + node-fetch: ^2.2.0 + ws: ^7.5.1 + yargs: ^17.6.2 + bin: + metro-inspector-proxy: src/cli.js + checksum: edf3a1488ca57883c8b511f852f66024ccd451616b1897d82600e3b51a3ea8ef14bac01ad5767fbcf8d772da77239606475319e591701f4c094489e009842d9d + languageName: node + linkType: hard + +"metro-minify-terser@npm:0.76.8": + version: 0.76.8 + resolution: "metro-minify-terser@npm:0.76.8" + dependencies: + terser: ^5.15.0 + checksum: 58beaed29fe4b2783fd06ec6ea8fe0dcc5056b2bb48dab0c5109884f3d9afffe8709c5157a364a3a0b4de48c300efe4101b34645624b95129cf1c17e5821e4ed + languageName: node + linkType: hard + +"metro-minify-uglify@npm:0.76.8": + version: 0.76.8 + resolution: "metro-minify-uglify@npm:0.76.8" + dependencies: + uglify-es: ^3.1.9 + checksum: e2c1642a5ff8f9145e282036a252d665576c65bd3d3baac1e2b05a67421f9390ef4824ea55506f92ba2854774dac028ec492cf8fb1abcdf1a97205d8d79b226b + languageName: node + linkType: hard + +"metro-react-native-babel-preset@npm:0.76.8": + version: 0.76.8 + resolution: "metro-react-native-babel-preset@npm:0.76.8" + dependencies: + "@babel/core": ^7.20.0 + "@babel/plugin-proposal-async-generator-functions": ^7.0.0 + "@babel/plugin-proposal-class-properties": ^7.18.0 + "@babel/plugin-proposal-export-default-from": ^7.0.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.0 + "@babel/plugin-proposal-numeric-separator": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.20.0 + "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 + "@babel/plugin-proposal-optional-chaining": ^7.20.0 + "@babel/plugin-syntax-dynamic-import": ^7.8.0 + "@babel/plugin-syntax-export-default-from": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.18.0 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 + "@babel/plugin-syntax-optional-chaining": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-async-to-generator": ^7.20.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.20.0 + "@babel/plugin-transform-flow-strip-types": ^7.20.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-react-jsx-self": ^7.0.0 + "@babel/plugin-transform-react-jsx-source": ^7.0.0 + "@babel/plugin-transform-runtime": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-sticky-regex": ^7.0.0 + "@babel/plugin-transform-typescript": ^7.5.0 + "@babel/plugin-transform-unicode-regex": ^7.0.0 + "@babel/template": ^7.0.0 + babel-plugin-transform-flow-enums: ^0.0.2 + react-refresh: ^0.4.0 + peerDependencies: + "@babel/core": "*" + checksum: a1b65d9020326643140ed3080426d04f553fb06e3c8fd4873a7cec65144dcaa5121a5bf260946169a502dd0c9966c3295d3f42fe8dbc31d30b3b1da0815bdff9 + languageName: node + linkType: hard + +"metro-react-native-babel-transformer@npm:0.76.8": + version: 0.76.8 + resolution: "metro-react-native-babel-transformer@npm:0.76.8" + dependencies: + "@babel/core": ^7.20.0 + babel-preset-fbjs: ^3.4.0 + hermes-parser: 0.12.0 + metro-react-native-babel-preset: 0.76.8 + nullthrows: ^1.1.1 + peerDependencies: + "@babel/core": "*" + checksum: 7b7489709b8ea27e9337dd5997e143fc947a60695b2233d77a5eb3ea9c90a129d5e8308fd6af0b592ee4b037a1e5878ab1798181325e493a05249ff173299608 + languageName: node + linkType: hard + +"metro-resolver@npm:0.76.8": + version: 0.76.8 + resolution: "metro-resolver@npm:0.76.8" + checksum: 85b45a96f01ccf25d3568b9918a81eb8ed75950e8923c9a8ddd83d7116e620af2a1fc5bf744674c8318ab5fd219e0c621a1c602d451913c054517531f98eb50b + languageName: node + linkType: hard + +"metro-runtime@npm:0.76.8": + version: 0.76.8 + resolution: "metro-runtime@npm:0.76.8" + dependencies: + "@babel/runtime": ^7.0.0 + react-refresh: ^0.4.0 + checksum: 5f3bf808adff99b4a29a3bc190263eaf8e4f1fb87a751344b54bf49b399f3e48be2cc256c415853c19b4b4a27d402e1bcc9f911bea8521f8ac325f8fddc7d631 + languageName: node + linkType: hard + +"metro-source-map@npm:0.76.8": + version: 0.76.8 + resolution: "metro-source-map@npm:0.76.8" + dependencies: + "@babel/traverse": ^7.20.0 + "@babel/types": ^7.20.0 + invariant: ^2.2.4 + metro-symbolicate: 0.76.8 + nullthrows: ^1.1.1 + ob1: 0.76.8 + source-map: ^0.5.6 + vlq: ^1.0.0 + checksum: 01134a3b73f9f67f32debff665d2a3815b84fa7f8627d82d7c343746b7fa357693f7b93e8fd6bcdc4e75a9f59c387c51edb456ad82c7e0c2e20fbca7f0ea6765 + languageName: node + linkType: hard + +"metro-symbolicate@npm:0.76.8": + version: 0.76.8 + resolution: "metro-symbolicate@npm:0.76.8" + dependencies: + invariant: ^2.2.4 + metro-source-map: 0.76.8 + nullthrows: ^1.1.1 + source-map: ^0.5.6 + through2: ^2.0.1 + vlq: ^1.0.0 + bin: + metro-symbolicate: src/index.js + checksum: 87988bbb255fd3d91d31cedc9b20eb804cd91ca6b66b66d48e4c11a361f09c71e113c7ce6191d83563591400cd31fc9a27a659fdb7fc83bf6e346ca427880af1 + languageName: node + linkType: hard + +"metro-transform-plugins@npm:0.76.8": + version: 0.76.8 + resolution: "metro-transform-plugins@npm:0.76.8" + dependencies: + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/template": ^7.0.0 + "@babel/traverse": ^7.20.0 + nullthrows: ^1.1.1 + checksum: 3db7b3ac809409042e7c6a79e9b6dba61d4e0c4a66f2f0bca3b3cadbf413e9cc3dc4d7f89e79c7a65f19ca6f3c3025c819709fc545a677532293805dd9025fa7 + languageName: node + linkType: hard + +"metro-transform-worker@npm:0.76.8": + version: 0.76.8 + resolution: "metro-transform-worker@npm:0.76.8" + dependencies: + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/parser": ^7.20.0 + "@babel/types": ^7.20.0 + babel-preset-fbjs: ^3.4.0 + metro: 0.76.8 + metro-babel-transformer: 0.76.8 + metro-cache: 0.76.8 + metro-cache-key: 0.76.8 + metro-source-map: 0.76.8 + metro-transform-plugins: 0.76.8 + nullthrows: ^1.1.1 + checksum: 21935271fcd89696dcb837fd3b7efca96b1f36372d98628349496fe1c29d74763bdbdf05946944ecd799beb4c6ea4cd8058e0ce3175b2ba625e957de90dbc440 + languageName: node + linkType: hard + +"metro@npm:0.76.8": + version: 0.76.8 + resolution: "metro@npm:0.76.8" + dependencies: + "@babel/code-frame": ^7.0.0 + "@babel/core": ^7.20.0 + "@babel/generator": ^7.20.0 + "@babel/parser": ^7.20.0 + "@babel/template": ^7.0.0 + "@babel/traverse": ^7.20.0 + "@babel/types": ^7.20.0 + accepts: ^1.3.7 + async: ^3.2.2 + chalk: ^4.0.0 + ci-info: ^2.0.0 + connect: ^3.6.5 + debug: ^2.2.0 + denodeify: ^1.2.1 + error-stack-parser: ^2.0.6 + graceful-fs: ^4.2.4 + hermes-parser: 0.12.0 + image-size: ^1.0.2 + invariant: ^2.2.4 + jest-worker: ^27.2.0 + jsc-safe-url: ^0.2.2 + lodash.throttle: ^4.1.1 + metro-babel-transformer: 0.76.8 + metro-cache: 0.76.8 + metro-cache-key: 0.76.8 + metro-config: 0.76.8 + metro-core: 0.76.8 + metro-file-map: 0.76.8 + metro-inspector-proxy: 0.76.8 + metro-minify-terser: 0.76.8 + metro-minify-uglify: 0.76.8 + metro-react-native-babel-preset: 0.76.8 + metro-resolver: 0.76.8 + metro-runtime: 0.76.8 + metro-source-map: 0.76.8 + metro-symbolicate: 0.76.8 + metro-transform-plugins: 0.76.8 + metro-transform-worker: 0.76.8 + mime-types: ^2.1.27 + node-fetch: ^2.2.0 + nullthrows: ^1.1.1 + rimraf: ^3.0.2 + serialize-error: ^2.1.0 + source-map: ^0.5.6 + strip-ansi: ^6.0.0 + throat: ^5.0.0 + ws: ^7.5.1 + yargs: ^17.6.2 + bin: + metro: src/cli.js + checksum: 848ab2857de61601df933faa8abe844343fdf5e335a3cbf906cddaaece8550259393aa1b9aa9c8eed75ec6eebf2c6203095880e8919b38034baf03081291af63 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": + version: 4.0.5 + resolution: "micromatch@npm:4.0.5" + dependencies: + braces: ^3.0.2 + picomatch: ^2.3.1 + checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc + languageName: node + linkType: hard + +"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: 1.52.0 + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + +"mime@npm:1.6.0": + version: 1.6.0 + resolution: "mime@npm:1.6.0" + bin: + mime: cli.js + checksum: fef25e39263e6d207580bdc629f8872a3f9772c923c7f8c7e793175cee22777bbe8bba95e5d509a40aaa292d8974514ce634ae35769faa45f22d17edda5e8557 + languageName: node + linkType: hard + +"mime@npm:^2.4.1, mime@npm:^2.4.4": + version: 2.6.0 + resolution: "mime@npm:2.6.0" + bin: + mime: cli.js + checksum: 1497ba7b9f6960694268a557eae24b743fd2923da46ec392b042469f4b901721ba0adcf8b0d3c2677839d0e243b209d76e5edcbd09cfdeffa2dfb6bb4df4b862 + languageName: node + linkType: hard + +"mimic-fn@npm:^1.0.0": + version: 1.2.0 + resolution: "mimic-fn@npm:1.2.0" + checksum: 69c08205156a1f4906d9c46f9b4dc08d18a50176352e77fdeb645cedfe9f20c0b19865d465bd2dec27a5c432347f24dc07fc3695e11159d193f892834233e939 + languageName: node + linkType: hard + +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a + languageName: node + linkType: hard + +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 + languageName: node + linkType: hard + +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + +"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: ^1.1.7 + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"minimatch@npm:^5.0.1": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: ^2.0.1 + checksum: 7564208ef81d7065a370f788d337cd80a689e981042cb9a1d0e6580b6c6a8c9279eba80010516e258835a988363f99f54a6f711a315089b8b42694f5da9d0d77 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.0, minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + +"minipass-collect@npm:^1.0.2": + version: 1.0.2 + resolution: "minipass-collect@npm:1.0.2" + dependencies: + minipass: ^3.0.0 + checksum: 14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" + dependencies: + encoding: ^0.1.13 + minipass: ^7.0.3 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: ^3.0.0 + checksum: 56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.2, minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: ^3.0.0 + checksum: b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: ^3.0.0 + checksum: 79076749fcacf21b5d16dd596d32c3b6bf4d6e62abb43868fac21674078505c8b15eaca4e47ed844985a4514854f917d78f588fcd029693709417d8f98b2bd60 + languageName: node + linkType: hard + +"minipass@npm:3.1.6": + version: 3.1.6 + resolution: "minipass@npm:3.1.6" + dependencies: + yallist: ^4.0.0 + checksum: 57a04041413a3531a65062452cb5175f93383ef245d6f4a2961d34386eb9aa8ac11ac7f16f791f5e8bbaf1dfb1ef01596870c88e8822215db57aa591a5bb0a77 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0, minipass@npm:^3.1.1": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: ^4.0.0 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.4 + resolution: "minipass@npm:7.0.4" + checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: ^3.0.0 + yallist: ^4.0.0 + checksum: f1fdeac0b07cf8f30fcf12f4b586795b97be856edea22b5e9072707be51fc95d41487faec3f265b42973a304fe3a64acd91a44a3826a963e37b37bafde0212c3 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.1, mkdirp@npm:~0.5.1": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: ^1.2.6 + bin: + mkdirp: bin/cmd.js + checksum: 0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + +"ms@npm:2.0.0": + version: 2.0.0 + resolution: "ms@npm:2.0.0" + checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"mv@npm:~2": + version: 2.1.1 + resolution: "mv@npm:2.1.1" + dependencies: + mkdirp: ~0.5.1 + ncp: ~2.0.0 + rimraf: ~2.4.0 + checksum: 59d4b5ebff6c265b452d6630ae8873d573c82e36fdc1ed9c34c7901a0bf2d3d357022f49db8e9bded127b743f709c7ef7befec249a2b3967578d649a8029aa06 + languageName: node + linkType: hard + +"mz@npm:^2.7.0": + version: 2.7.0 + resolution: "mz@npm:2.7.0" + dependencies: + any-promise: ^1.0.0 + object-assign: ^4.0.1 + thenify-all: ^1.0.0 + checksum: 8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 + languageName: node + linkType: hard + +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" + bin: + nanoid: bin/nanoid.cjs + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 + languageName: node + linkType: hard + +"natural-compare@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare@npm:1.4.0" + checksum: 23ad088b08f898fc9b53011d7bb78ec48e79de7627e01ab5518e806033861bef68d5b0cd0e2205c2f36690ac9571ff6bcb05eb777ced2eeda8d4ac5b44592c3d + languageName: node + linkType: hard + +"ncp@npm:~2.0.0": + version: 2.0.0 + resolution: "ncp@npm:2.0.0" + bin: + ncp: ./bin/ncp + checksum: ea9b19221da1d1c5529bdb9f8e85c9d191d156bcaae408cce5e415b7fbfd8744c288e792bd7faf1fe3b70fd44c74e22f0d43c39b209bc7ac1fb8016f70793a16 + languageName: node + linkType: hard + +"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 + languageName: node + linkType: hard + +"neo-async@npm:^2.5.0": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: deac9f8d00eda7b2e5cd1b2549e26e10a0faa70adaa6fdadca701cc55f49ee9018e427f424bac0c790b7c7e2d3068db97f3093f1093975f2acb8f8818b936ed9 + languageName: node + linkType: hard + +"nested-error-stacks@npm:~2.0.1": + version: 2.0.1 + resolution: "nested-error-stacks@npm:2.0.1" + checksum: 8430d7d80ad69b1add2992ee2992a363db6c1a26a54740963bc99a004c5acb1d2a67049397062eab2caa3a312b4da89a0b85de3bdf82d7d472a6baa166311fe6 + languageName: node + linkType: hard + +"nice-try@npm:^1.0.4": + version: 1.0.5 + resolution: "nice-try@npm:1.0.5" + checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff + languageName: node + linkType: hard + +"nocache@npm:^3.0.1": + version: 3.0.4 + resolution: "nocache@npm:3.0.4" + checksum: 6be9ee67eb561ecedc56d805c024c0fda55b9836ecba659c720073b067929aa4fe04bb7121480e004c9cf52989e62d8720f29a7fe0269f1a4941221a1e4be1c2 + languageName: node + linkType: hard + +"node-abort-controller@npm:^3.1.1": + version: 3.1.1 + resolution: "node-abort-controller@npm:3.1.1" + checksum: 2c340916af9710328b11c0828223fc65ba320e0d082214a211311bf64c2891028e42ef276b9799188c4ada9e6e1c54cf7a0b7c05dd9d59fcdc8cd633304c8047 + languageName: node + linkType: hard + +"node-dir@npm:^0.1.17": + version: 0.1.17 + resolution: "node-dir@npm:0.1.17" + dependencies: + minimatch: ^3.0.2 + checksum: 29de9560e52cdac8d3f794d38d782f6799e13d4d11aaf96d3da8c28458e1c5e33bb5f8edfb42dc34172ec5516c50c5b8850c9e1526542616757a969267263328 + languageName: node + linkType: hard + +"node-fetch@npm:^2.2.0, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + +"node-forge@npm:^1.2.1, node-forge@npm:^1.3.1": + version: 1.3.1 + resolution: "node-forge@npm:1.3.1" + checksum: 08fb072d3d670599c89a1704b3e9c649ff1b998256737f0e06fbd1a5bf41cae4457ccaee32d95052d80bbafd9ffe01284e078c8071f0267dc9744e51c5ed42a9 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" + dependencies: + env-paths: ^2.2.0 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 + graceful-fs: ^4.2.6 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + tar: ^6.1.2 + which: ^4.0.0 + bin: + node-gyp: bin/node-gyp.js + checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + languageName: node + linkType: hard + +"node-int64@npm:^0.4.0": + version: 0.4.0 + resolution: "node-int64@npm:0.4.0" + checksum: d0b30b1ee6d961851c60d5eaa745d30b5c95d94bc0e74b81e5292f7c42a49e3af87f1eb9e89f59456f80645d679202537de751b7d72e9e40ceea40c5e449057e + languageName: node + linkType: hard + +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 59443a2f77acac854c42d321bf1b43dea0aef55cd544c6a686e9816a697300458d4e82239e2d794ea05f7bbbc8a94500332e2d3ac3f11f52e4b16cbe638b3c41 + languageName: node + linkType: hard + +"node-stream-zip@npm:^1.9.1": + version: 1.15.0 + resolution: "node-stream-zip@npm:1.15.0" + checksum: 0b73ffbb09490e479c8f47038d7cba803e6242618fbc1b71c26782009d388742ed6fb5ce6e9d31f528b410249e7eb1c6e7534e9d3792a0cafd99813ac5a35107 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.0 + resolution: "nopt@npm:7.2.0" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"npm-package-arg@npm:^7.0.0": + version: 7.0.0 + resolution: "npm-package-arg@npm:7.0.0" + dependencies: + hosted-git-info: ^3.0.2 + osenv: ^0.1.5 + semver: ^5.6.0 + validate-npm-package-name: ^3.0.0 + checksum: 5b777c1177c262c2b3ea27248b77aeda401b9d6a79f6c17d32bc7be020a1daadfcb812d5a44b34977f60b220efc1590e7b84b277e4f6cb0a396b01fad06c5f33 + languageName: node + linkType: hard + +"npm-run-path@npm:^2.0.0": + version: 2.0.2 + resolution: "npm-run-path@npm:2.0.2" + dependencies: + path-key: ^2.0.0 + checksum: acd5ad81648ba4588ba5a8effb1d98d2b339d31be16826a118d50f182a134ac523172101b82eab1d01cb4c2ba358e857d54cfafd8163a1ffe7bd52100b741125 + languageName: node + linkType: hard + +"npm-run-path@npm:^4.0.1": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: ^3.0.0 + checksum: 5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 + languageName: node + linkType: hard + +"npm-run-path@npm:^5.1.0": + version: 5.1.0 + resolution: "npm-run-path@npm:5.1.0" + dependencies: + path-key: ^4.0.0 + checksum: dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 + languageName: node + linkType: hard + +"nullthrows@npm:^1.1.1": + version: 1.1.1 + resolution: "nullthrows@npm:1.1.1" + checksum: 10806b92121253eb1b08ecf707d92480f5331ba8ae5b23fa3eb0548ad24196eb797ed47606153006568a5733ea9e528a3579f21421f7828e09e7756f4bdd386f + languageName: node + linkType: hard + +"nwsapi@npm:^2.2.2": + version: 2.2.7 + resolution: "nwsapi@npm:2.2.7" + checksum: cab25f7983acec7e23490fec3ef7be608041b460504229770e3bfcf9977c41d6fe58f518994d3bd9aa3a101f501089a3d4a63536f4ff8ae4b8c4ca23bdbfda4e + languageName: node + linkType: hard + +"ob1@npm:0.76.8": + version: 0.76.8 + resolution: "ob1@npm:0.76.8" + checksum: 3feb035a0d33bd2c2d982bdd4877a10375bb71b0415cd960649f6e1faf570ac93aeb0246b1559588e722af866d02274d5abd4b601b31088feb66bbe5d9ecde25 + languageName: node + linkType: hard + +"object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f + languageName: node + linkType: hard + +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a + languageName: node + linkType: hard + +"object.assign@npm:^4.1.4": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 + languageName: node + linkType: hard + +"object.entries@npm:^1.1.6": + version: 1.1.7 + resolution: "object.entries@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: da287d434e7e32989586cd734382364ba826a2527f2bc82e6acbf9f9bfafa35d51018b66ec02543ffdfa2a5ba4af2b6f1ca6e588c65030cb4fd9c67d6ced594c + languageName: node + linkType: hard + +"object.fromentries@npm:^2.0.6": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 + languageName: node + linkType: hard + +"object.hasown@npm:^1.1.2": + version: 1.1.3 + resolution: "object.hasown@npm:1.1.3" + dependencies: + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 76bc17356f6124542fb47e5d0e78d531eafa4bba3fc2d6fc4b1a8ce8b6878912366c0d99f37ce5c84ada8fd79df7aa6ea1214fddf721f43e093ad2df51f27da1 + languageName: node + linkType: hard + +"object.values@npm:^1.1.6": + version: 1.1.7 + resolution: "object.values@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 + languageName: node + linkType: hard + +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: 1.1.1 + checksum: d20929a25e7f0bb62f937a425b5edeb4e4cde0540d77ba146ec9357f00b0d497cdb3b9b05b9c8e46222407d1548d08166bff69cc56dfa55ba0e4469228920ff0 + languageName: node + linkType: hard + +"on-finished@npm:~2.3.0": + version: 2.3.0 + resolution: "on-finished@npm:2.3.0" + dependencies: + ee-first: 1.1.1 + checksum: 1db595bd963b0124d6fa261d18320422407b8f01dc65863840f3ddaaf7bcad5b28ff6847286703ca53f4ec19595bd67a2f1253db79fc4094911ec6aa8df1671b + languageName: node + linkType: hard + +"on-headers@npm:~1.0.2": + version: 1.0.2 + resolution: "on-headers@npm:1.0.2" + checksum: 2bf13467215d1e540a62a75021e8b318a6cfc5d4fc53af8e8f84ad98dbcea02d506c6d24180cd62e1d769c44721ba542f3154effc1f7579a8288c9f7873ed8e5 + languageName: node + linkType: hard + +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: 1 + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"onetime@npm:^2.0.0": + version: 2.0.1 + resolution: "onetime@npm:2.0.1" + dependencies: + mimic-fn: ^1.0.0 + checksum: bb44015ac7a525d0fb43b029a583d4ad359834632b4424ca209b438aacf6d669dda81b5edfbdb42c22636e607b276ba5589f46694a729e3bc27948ce26f4cc1a + languageName: node + linkType: hard + +"onetime@npm:^5.1.0, onetime@npm:^5.1.2": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: ^2.1.0 + checksum: 2478859ef817fc5d4e9c2f9e5728512ddd1dbc9fb7829ad263765bb6d3b91ce699d6e2332eef6b7dff183c2f490bd3349f1666427eaba4469fba0ac38dfd0d34 + languageName: node + linkType: hard + +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" + dependencies: + mimic-fn: ^4.0.0 + checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 + languageName: node + linkType: hard + +"open@npm:^6.2.0": + version: 6.4.0 + resolution: "open@npm:6.4.0" + dependencies: + is-wsl: ^1.1.0 + checksum: e5037facf3e03ed777537db3e2511ada37f351c4394e1dadccf9cac11d63b28447ae8b495b7b138659910fd78d918bafed546e47163673c4a4e43dbb5ac53c5d + languageName: node + linkType: hard + +"open@npm:^8.0.4, open@npm:^8.3.0": + version: 8.4.2 + resolution: "open@npm:8.4.2" + dependencies: + define-lazy-prop: ^2.0.0 + is-docker: ^2.1.1 + is-wsl: ^2.2.0 + checksum: 6388bfff21b40cb9bd8f913f9130d107f2ed4724ea81a8fd29798ee322b361ca31fa2cdfb491a5c31e43a3996cfe9566741238c7a741ada8d7af1cb78d85cf26 + languageName: node + linkType: hard + +"open@npm:^9.1.0": + version: 9.1.0 + resolution: "open@npm:9.1.0" + dependencies: + default-browser: ^4.0.0 + define-lazy-prop: ^3.0.0 + is-inside-container: ^1.0.0 + is-wsl: ^2.2.0 + checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 + languageName: node + linkType: hard + +"optionator@npm:^0.9.3": + version: 0.9.3 + resolution: "optionator@npm:0.9.3" + dependencies: + "@aashutoshrathi/word-wrap": ^1.2.3 + deep-is: ^0.1.3 + fast-levenshtein: ^2.0.6 + levn: ^0.4.1 + prelude-ls: ^1.2.1 + type-check: ^0.4.0 + checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a + languageName: node + linkType: hard + +"ora@npm:3.4.0": + version: 3.4.0 + resolution: "ora@npm:3.4.0" + dependencies: + chalk: ^2.4.2 + cli-cursor: ^2.1.0 + cli-spinners: ^2.0.0 + log-symbols: ^2.2.0 + strip-ansi: ^5.2.0 + wcwidth: ^1.0.1 + checksum: f1f8e7f290b766276dcd19ddf2159a1971b1ec37eec4a5556b8f5e4afbe513a965ed65c183d38956724263b6a20989b3d8fb71b95ac4a2d6a01db2f1ed8899e4 + languageName: node + linkType: hard + +"ora@npm:^5.4.1": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: ^4.1.0 + chalk: ^4.1.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.5.0 + is-interactive: ^1.0.0 + is-unicode-supported: ^0.1.0 + log-symbols: ^4.1.0 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + checksum: 28d476ee6c1049d68368c0dc922e7225e3b5600c3ede88fade8052837f9ed342625fdaa84a6209302587c8ddd9b664f71f0759833cbdb3a4cf81344057e63c63 + languageName: node + linkType: hard + +"os-homedir@npm:^1.0.0": + version: 1.0.2 + resolution: "os-homedir@npm:1.0.2" + checksum: af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 + languageName: node + linkType: hard + +"os-tmpdir@npm:^1.0.0, os-tmpdir@npm:~1.0.2": + version: 1.0.2 + resolution: "os-tmpdir@npm:1.0.2" + checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d + languageName: node + linkType: hard + +"osenv@npm:^0.1.5": + version: 0.1.5 + resolution: "osenv@npm:0.1.5" + dependencies: + os-homedir: ^1.0.0 + os-tmpdir: ^1.0.0 + checksum: 779d261920f2a13e5e18cf02446484f12747d3f2ff82280912f52b213162d43d312647a40c332373cbccd5e3fb8126915d3bfea8dde4827f70f82da76e52d359 + languageName: node + linkType: hard + +"p-finally@npm:^1.0.0": + version: 1.0.0 + resolution: "p-finally@npm:1.0.0" + checksum: 93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 + languageName: node + linkType: hard + +"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: ^2.0.0 + checksum: 84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: ^0.1.0 + checksum: 7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^3.0.0": + version: 3.0.0 + resolution: "p-locate@npm:3.0.0" + dependencies: + p-limit: ^2.0.0 + checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: ^2.2.0 + checksum: 513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: ^3.0.2 + checksum: 1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: ^3.0.0 + checksum: cb0ab21ec0f32ddffd31dfc250e3afa61e103ef43d957cc45497afe37513634589316de4eb88abdfd969fe6410c22c0b93ab24328833b8eb1ccc087fc0442a1c + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"parent-module@npm:^1.0.0": + version: 1.0.1 + resolution: "parent-module@npm:1.0.1" + dependencies: + callsites: ^3.0.0 + checksum: 6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff + languageName: node + linkType: hard + +"parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-json@npm:4.0.0" + dependencies: + error-ex: ^1.3.1 + json-parse-better-errors: ^1.0.1 + checksum: 0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 + languageName: node + linkType: hard + +"parse-json@npm:^5.2.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": ^7.0.0 + error-ex: ^1.3.1 + json-parse-even-better-errors: ^2.3.0 + lines-and-columns: ^1.1.6 + checksum: 62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + +"parse-png@npm:^2.1.0": + version: 2.1.0 + resolution: "parse-png@npm:2.1.0" + dependencies: + pngjs: ^3.3.0 + checksum: 0c6b6c42c8830cd16f6f9e9aedafd53111c0ad2ff350ba79c629996887567558f5639ad0c95764f96f7acd1f9ff63d4ac73737e80efa3911a6de9839ee520c96 + languageName: node + linkType: hard + +"parse5@npm:^7.0.0, parse5@npm:^7.1.1": + version: 7.1.2 + resolution: "parse5@npm:7.1.2" + dependencies: + entities: ^4.4.0 + checksum: 59465dd05eb4c5ec87b76173d1c596e152a10e290b7abcda1aecf0f33be49646ea74840c69af975d7887543ea45564801736356c568d6b5e71792fd0f4055713 + languageName: node + linkType: hard + +"parseurl@npm:~1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 + languageName: node + linkType: hard + +"password-prompt@npm:^1.0.4": + version: 1.1.3 + resolution: "password-prompt@npm:1.1.3" + dependencies: + ansi-escapes: ^4.3.2 + cross-spawn: ^7.0.3 + checksum: 9a5fdbd7360db896809704c141acfe9258450a9982c4c177b82a1e6c69d204800cdab6064abac6736bd7d31142c80108deedf4484146594747cb3ce776816e97 + languageName: node + linkType: hard + +"path-browserify@npm:^1.0.0": + version: 1.0.1 + resolution: "path-browserify@npm:1.0.1" + checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 + languageName: node + linkType: hard + +"path-exists@npm:^3.0.0": + version: 3.0.0 + resolution: "path-exists@npm:3.0.0" + checksum: 96e92643aa34b4b28d0de1cd2eba52a1c5313a90c6542d03f62750d82480e20bfa62bc865d5cfc6165f5fcd5aeb0851043c40a39be5989646f223300021bae0a + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^2.0.0, path-key@npm:^2.0.1": + version: 2.0.1 + resolution: "path-key@npm:2.0.1" + checksum: f7ab0ad42fe3fb8c7f11d0c4f849871e28fbd8e1add65c370e422512fc5887097b9cf34d09c1747d45c942a8c1e26468d6356e2df3f740bf177ab8ca7301ebfd + languageName: node + linkType: hard + +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.5, path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: ^9.1.1 || ^10.0.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf + languageName: node + linkType: hard + +"pify@npm:^4.0.1": + version: 4.0.1 + resolution: "pify@npm:4.0.1" + checksum: 9c4e34278cb09987685fa5ef81499c82546c033713518f6441778fbec623fc708777fe8ac633097c72d88470d5963094076c7305cafc7ad340aae27cfacd856b + languageName: node + linkType: hard + +"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": + version: 4.0.6 + resolution: "pirates@npm:4.0.6" + checksum: 46a65fefaf19c6f57460388a5af9ab81e3d7fd0e7bc44ca59d753cb5c4d0df97c6c6e583674869762101836d68675f027d60f841c105d72734df9dfca97cbcc6 + languageName: node + linkType: hard + +"pkg-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "pkg-dir@npm:3.0.0" + dependencies: + find-up: ^3.0.0 + checksum: 70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + languageName: node + linkType: hard + +"pkg-dir@npm:^4.2.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: ^4.0.0 + checksum: 9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"pkg-up@npm:^3.1.0": + version: 3.1.0 + resolution: "pkg-up@npm:3.1.0" + dependencies: + find-up: ^3.0.0 + checksum: 5bac346b7c7c903613c057ae3ab722f320716199d753f4a7d053d38f2b5955460f3e6ab73b4762c62fd3e947f58e04f1343e92089e7bb6091c90877406fcd8c8 + languageName: node + linkType: hard + +"plist@npm:^3.0.5": + version: 3.1.0 + resolution: "plist@npm:3.1.0" + dependencies: + "@xmldom/xmldom": ^0.8.8 + base64-js: ^1.5.1 + xmlbuilder: ^15.1.1 + checksum: c8ea013da8646d4c50dff82f9be39488054621cc229957621bb00add42b5d4ce3657cf58d4b10c50f7dea1a81118f825838f838baeb4e6f17fab453ecf91d424 + languageName: node + linkType: hard + +"pngjs@npm:^3.3.0": + version: 3.4.0 + resolution: "pngjs@npm:3.4.0" + checksum: 8bd40bd698abd16b72c97b85cb858c80894fbedc76277ce72a784aa441e14795d45d9856e97333ca469b34b67528860ffc8a7317ca6beea349b645366df00bcd + languageName: node + linkType: hard + +"postcss@npm:~8.4.21": + version: 8.4.32 + resolution: "postcss@npm:8.4.32" + dependencies: + nanoid: ^3.3.7 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 220d9d0bf5d65be7ed31006c523bfb11619461d296245c1231831f90150aeb4a31eab9983ac9c5c89759a3ca8b60b3e0d098574964e1691673c3ce5c494305ae + languageName: node + linkType: hard + +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: cd192ec0d0a8e4c6da3bb80e4f62afe336df3f76271ac6deb0e6a36187133b6073a19e9727a1ff108cd8b9982e4768850d413baa71214dd80c7979617dca827a + languageName: node + linkType: hard + +"prettier-linter-helpers@npm:^1.0.0": + version: 1.0.0 + resolution: "prettier-linter-helpers@npm:1.0.0" + dependencies: + fast-diff: ^1.1.2 + checksum: 00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392 + languageName: node + linkType: hard + +"prettier@npm:^3.1.1": + version: 3.1.1 + resolution: "prettier@npm:3.1.1" + bin: + prettier: bin/prettier.cjs + checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e + languageName: node + linkType: hard + +"pretty-bytes@npm:5.6.0": + version: 5.6.0 + resolution: "pretty-bytes@npm:5.6.0" + checksum: 9c082500d1e93434b5b291bd651662936b8bd6204ec9fa17d563116a192d6d86b98f6d328526b4e8d783c07d5499e2614a807520249692da9ec81564b2f439cd + languageName: node + linkType: hard + +"pretty-format@npm:^26.5.2, pretty-format@npm:^26.6.2": + version: 26.6.2 + resolution: "pretty-format@npm:26.6.2" + dependencies: + "@jest/types": ^26.6.2 + ansi-regex: ^5.0.0 + ansi-styles: ^4.0.0 + react-is: ^17.0.1 + checksum: e3b808404d7e1519f0df1aa1f25cee0054ab475775c6b2b8c5568ff23194a92d54bf93274139b6f584ca70fd773be4eaa754b0e03f12bb0a8d1426b07f079976 + languageName: node + linkType: hard + +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": ^29.6.3 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: 032c1602383e71e9c0c02a01bbd25d6759d60e9c7cf21937dde8357aa753da348fcec5def5d1002c9678a8524d5fe099ad98861286550ef44de8808cc61e43b6 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"process-nextick-args@npm:~2.0.0": + version: 2.0.1 + resolution: "process-nextick-args@npm:2.0.1" + checksum: 1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf + languageName: node + linkType: hard + +"progress@npm:2.0.3": + version: 2.0.3 + resolution: "progress@npm:2.0.3" + checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 + languageName: node + linkType: hard + +"promise-inflight@npm:^1.0.1": + version: 1.0.1 + resolution: "promise-inflight@npm:1.0.1" + checksum: 22749483091d2c594261517f4f80e05226d4d5ecc1fc917e1886929da56e22b5718b7f2a75f3807e7a7d471bc3be2907fe92e6e8f373ddf5c64bae35b5af3981 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: ^2.0.2 + retry: ^0.12.0 + checksum: f96a3f6d90b92b568a26f71e966cbbc0f63ab85ea6ff6c81284dc869b41510e6cdef99b6b65f9030f0db422bf7c96652a3fff9f2e8fb4a0f069d8f4430359429 + languageName: node + linkType: hard + +"promise@npm:^7.1.1": + version: 7.3.1 + resolution: "promise@npm:7.3.1" + dependencies: + asap: ~2.0.3 + checksum: 475bb069130179fbd27ed2ab45f26d8862376a137a57314cf53310bdd85cc986a826fd585829be97ebc0aaf10e9d8e68be1bfe5a4a0364144b1f9eedfa940cf1 + languageName: node + linkType: hard + +"promise@npm:^8.3.0": + version: 8.3.0 + resolution: "promise@npm:8.3.0" + dependencies: + asap: ~2.0.6 + checksum: a69f0ddbddf78ffc529cffee7ad950d307347615970564b17988ce43fbe767af5c738a9439660b24a9a8cbea106c0dcbb6c2b20e23b7e96a8e89e5c2679e94d5 + languageName: node + linkType: hard + +"prompts@npm:^2.0.1, prompts@npm:^2.2.1, prompts@npm:^2.3.2, prompts@npm:^2.4.0": + version: 2.4.2 + resolution: "prompts@npm:2.4.2" + dependencies: + kleur: ^3.0.3 + sisteransi: ^1.0.5 + checksum: d8fd1fe63820be2412c13bfc5d0a01909acc1f0367e32396962e737cb2fc52d004f3302475d5ce7d18a1e8a79985f93ff04ee03007d091029c3f9104bffc007d + languageName: node + linkType: hard + +"prop-types@npm:*, prop-types@npm:^15.8.1": + version: 15.8.1 + resolution: "prop-types@npm:15.8.1" + dependencies: + loose-envify: ^1.4.0 + object-assign: ^4.1.1 + react-is: ^16.13.1 + checksum: c056d3f1c057cb7ff8344c645450e14f088a915d078dcda795041765047fa080d38e5d626560ccaac94a4e16e3aa15f3557c1a9a8d1174530955e992c675e459 + languageName: node + linkType: hard + +"psl@npm:^1.1.33": + version: 1.9.0 + resolution: "psl@npm:1.9.0" + checksum: 20c4277f640c93d393130673f392618e9a8044c6c7bf61c53917a0fddb4952790f5f362c6c730a9c32b124813e173733f9895add8d26f566ed0ea0654b2e711d + languageName: node + linkType: hard + +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0, punycode@npm:^2.1.1": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: bb0a0ceedca4c3c57a9b981b90601579058903c62be23c5e8e843d2c2d4148a3ecf029d5133486fb0e1822b098ba8bba09e89d6b21742d02fa26bda6441a6fb2 + languageName: node + linkType: hard + +"pure-rand@npm:^6.0.0": + version: 6.0.4 + resolution: "pure-rand@npm:6.0.4" + checksum: e1c4e69f8bf7303e5252756d67c3c7551385cd34d94a1f511fe099727ccbab74c898c03a06d4c4a24a89b51858781057b83ebbfe740d984240cdc04fead36068 + languageName: node + linkType: hard + +"qrcode-terminal@npm:0.11.0": + version: 0.11.0 + resolution: "qrcode-terminal@npm:0.11.0" + bin: + qrcode-terminal: ./bin/qrcode-terminal.js + checksum: ad146ea1e339e1745402a3ea131631f64f40f0d1ff9cc6bd9c21677feaa1ca6dcd32eadf188fd3febdab8bf6191b3d24d533454903a72543645a72820e4d324c + languageName: node + linkType: hard + +"qs@npm:6.11.0": + version: 6.11.0 + resolution: "qs@npm:6.11.0" + dependencies: + side-channel: ^1.0.4 + checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 + languageName: node + linkType: hard + +"querystringify@npm:^2.1.1": + version: 2.2.0 + resolution: "querystringify@npm:2.2.0" + checksum: 5641ea231bad7ef6d64d9998faca95611ed4b11c2591a8cae741e178a974f6a8e0ebde008475259abe1621cb15e692404e6b6626e927f7b849d5c09392604b15 + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 + languageName: node + linkType: hard + +"queue@npm:6.0.2": + version: 6.0.2 + resolution: "queue@npm:6.0.2" + dependencies: + inherits: ~2.0.3 + checksum: ebc23639248e4fe40a789f713c20548e513e053b3dc4924b6cb0ad741e3f264dcff948225c8737834dd4f9ec286dbc06a1a7c13858ea382d9379f4303bcc0916 + languageName: node + linkType: hard + +"range-parser@npm:~1.2.1": + version: 1.2.1 + resolution: "range-parser@npm:1.2.1" + checksum: 0a268d4fea508661cf5743dfe3d5f47ce214fd6b7dec1de0da4d669dd4ef3d2144468ebe4179049eff253d9d27e719c88dae55be64f954e80135a0cada804ec9 + languageName: node + linkType: hard + +"raw-body@npm:2.5.2": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + checksum: ba1583c8d8a48e8fbb7a873fdbb2df66ea4ff83775421bfe21ee120140949ab048200668c47d9ae3880012f6e217052690628cf679ddfbd82c9fc9358d574676 + languageName: node + linkType: hard + +"rc@npm:~1.2.7": + version: 1.2.8 + resolution: "rc@npm:1.2.8" + dependencies: + deep-extend: ^0.6.0 + ini: ~1.3.0 + minimist: ^1.2.0 + strip-json-comments: ~2.0.1 + bin: + rc: ./cli.js + checksum: 2e26e052f8be2abd64e6d1dabfbd7be03f80ec18ccbc49562d31f617d0015fbdbcf0f9eed30346ea6ab789e0fdfe4337f033f8016efdbee0df5354751842080e + languageName: node + linkType: hard + +"react-devtools-core@npm:^4.27.2": + version: 4.28.5 + resolution: "react-devtools-core@npm:4.28.5" + dependencies: + shell-quote: ^1.6.1 + ws: ^7 + checksum: d8e4b32ffcfe1ada5c9f7decffd04afc4707a3d6261953a92b8aed1c8abe15cd57d6eb4ce711f842180a2f5c60d2947209e3c1202f7ea29303ee150c55da59e0 + languageName: node + linkType: hard + +"react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.0.0, react-is@npm:^18.2.0": + version: 18.2.0 + resolution: "react-is@npm:18.2.0" + checksum: e72d0ba81b5922759e4aff17e0252bd29988f9642ed817f56b25a3e217e13eea8a7f2322af99a06edb779da12d5d636e9fda473d620df9a3da0df2a74141d53e + languageName: node + linkType: hard + +"react-is@npm:^16.13.1": + version: 16.13.1 + resolution: "react-is@npm:16.13.1" + checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f + languageName: node + linkType: hard + +"react-is@npm:^17.0.1": + version: 17.0.2 + resolution: "react-is@npm:17.0.2" + checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 + languageName: node + linkType: hard + +"react-native@npm:0.72.6": + version: 0.72.6 + resolution: "react-native@npm:0.72.6" + dependencies: + "@jest/create-cache-key-function": ^29.2.1 + "@react-native-community/cli": 11.3.7 + "@react-native-community/cli-platform-android": 11.3.7 + "@react-native-community/cli-platform-ios": 11.3.7 + "@react-native/assets-registry": ^0.72.0 + "@react-native/codegen": ^0.72.7 + "@react-native/gradle-plugin": ^0.72.11 + "@react-native/js-polyfills": ^0.72.1 + "@react-native/normalize-colors": ^0.72.0 + "@react-native/virtualized-lists": ^0.72.8 + abort-controller: ^3.0.0 + anser: ^1.4.9 + base64-js: ^1.1.2 + deprecated-react-native-prop-types: 4.1.0 + event-target-shim: ^5.0.1 + flow-enums-runtime: ^0.0.5 + invariant: ^2.2.4 + jest-environment-node: ^29.2.1 + jsc-android: ^250231.0.0 + memoize-one: ^5.0.0 + metro-runtime: 0.76.8 + metro-source-map: 0.76.8 + mkdirp: ^0.5.1 + nullthrows: ^1.1.1 + pretty-format: ^26.5.2 + promise: ^8.3.0 + react-devtools-core: ^4.27.2 + react-refresh: ^0.4.0 + react-shallow-renderer: ^16.15.0 + regenerator-runtime: ^0.13.2 + scheduler: 0.24.0-canary-efb381bbf-20230505 + stacktrace-parser: ^0.1.10 + use-sync-external-store: ^1.0.0 + whatwg-fetch: ^3.0.0 + ws: ^6.2.2 + yargs: ^17.6.2 + peerDependencies: + react: 18.2.0 + bin: + react-native: cli.js + checksum: 3cf0af092c0d6b9b6e67795664e324136f6d1a41c6a889737fb612e5ddb93d0537c890fe733e751fe3bbc139cbb4f9f6d9eff4467e8d8dc67194ac8b382fa168 + languageName: node + linkType: hard + +"react-redux@npm:^9.0.4": + version: 9.0.4 + resolution: "react-redux@npm:9.0.4" + dependencies: + "@types/use-sync-external-store": ^0.0.3 + use-sync-external-store: ^1.0.0 + peerDependencies: + "@types/react": ^18.2.25 + react: ^18.0 + react-native: ">=0.69" + redux: ^5.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + react-native: + optional: true + redux: + optional: true + checksum: acc69b85e003f4367e0fa9716ca441a2536aa513fcb1b9404e33188fa68938acf455806eba2ff639553fbba24c06b6e96982998178bb9a2669227e7e4bcd441e + languageName: node + linkType: hard + +"react-refresh@npm:^0.4.0": + version: 0.4.3 + resolution: "react-refresh@npm:0.4.3" + checksum: 58d3b899ede4c890b1d06a2d02254a77d1c0dea400be139940e47b1c451ff1c4cbb3ca5d0a9d6ee9574e570075ab6c1bef15e77b7270d4a6f571847d2b26f4fc + languageName: node + linkType: hard + +"react-shallow-renderer@npm:^16.15.0": + version: 16.15.0 + resolution: "react-shallow-renderer@npm:16.15.0" + dependencies: + object-assign: ^4.1.1 + react-is: ^16.12.0 || ^17.0.0 || ^18.0.0 + peerDependencies: + react: ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 6052c7e3e9627485120ebd8257f128aad8f56386fe8d42374b7743eac1be457c33506d153c7886b4e32923c0c352d402ab805ef9ca02dbcd8393b2bdeb6e5af8 + languageName: node + linkType: hard + +"react-test-renderer@npm:18.2.0": + version: 18.2.0 + resolution: "react-test-renderer@npm:18.2.0" + dependencies: + react-is: ^18.2.0 + react-shallow-renderer: ^16.15.0 + scheduler: ^0.23.0 + peerDependencies: + react: ^18.2.0 + checksum: 6b6980ced93fa2b72662d5e4ab3b4896833586940047ce52ca9aca801e5432adf05fcbe28289b0af3ce6a2a7c590974e25dcc8aa43d0de658bfe8bbcd686f958 + languageName: node + linkType: hard + +"react@npm:18.2.0": + version: 18.2.0 + resolution: "react@npm:18.2.0" + dependencies: + loose-envify: ^1.1.0 + checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b + languageName: node + linkType: hard + +"readable-stream@npm:^3.4.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: ^2.0.3 + string_decoder: ^1.1.1 + util-deprecate: ^1.0.1 + checksum: bdcbe6c22e846b6af075e32cf8f4751c2576238c5043169a1c221c92ee2878458a816a4ea33f4c67623c0b6827c8a400409bfb3cf0bf3381392d0b1dfb52ac8d + languageName: node + linkType: hard + +"readable-stream@npm:~2.3.6": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.3 + isarray: ~1.0.0 + process-nextick-args: ~2.0.0 + safe-buffer: ~5.1.1 + string_decoder: ~1.1.1 + util-deprecate: ~1.0.1 + checksum: 65645467038704f0c8aaf026a72fbb588a9e2ef7a75cd57a01702ee9db1c4a1e4b03aaad36861a6a0926546a74d174149c8c207527963e0c2d3eee2f37678a42 + languageName: node + linkType: hard + +"readline@npm:^1.3.0": + version: 1.3.0 + resolution: "readline@npm:1.3.0" + checksum: dfaf8e6ac20408ea00d650e95f7bb47f77c4c62dd12ed7fb51731ee84532a2f3675fcdc4cab4923dc1eef227520a2e082a093215190907758bea9f585b19438e + languageName: node + linkType: hard + +"recast@npm:^0.21.0": + version: 0.21.5 + resolution: "recast@npm:0.21.5" + dependencies: + ast-types: 0.15.2 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: 03cc7f57562238ba258d468be67bf7446ce7a707bc87a087891dad15afead46c36e9aaeedf2130e2ab5a465244a9c62bfd4127849761cf8f4085abe2f3e5f485 + languageName: node + linkType: hard + +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + +"redux-thunk@npm:^3.1.0": + version: 3.1.0 + resolution: "redux-thunk@npm:3.1.0" + peerDependencies: + redux: ^5.0.0 + checksum: bea96f8233975aad4c9f24ca1ffd08ac7ec91eaefc26e7ba9935544dc55d7f09ba2aa726676dab53dc79d0c91e8071f9729cddfea927f4c41839757d2ade0f50 + languageName: node + linkType: hard + +"redux@npm:^5.0.0": + version: 5.0.0 + resolution: "redux@npm:5.0.0" + checksum: be49160d4bd01e10108c425ade999f1b456204895c4bdd0c7825ab09efffded51955c5c242847406a7b3f273e9011a9c102848c512a099a75617b97b13d2cca8 + languageName: node + linkType: hard + +"reflect.getprototypeof@npm:^1.0.4": + version: 1.0.4 + resolution: "reflect.getprototypeof@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + which-builtin-type: ^1.1.3 + checksum: 16e2361988dbdd23274b53fb2b1b9cefeab876c3941a2543b4cadac6f989e3db3957b07a44aac46cfceb3e06e2871785ec2aac992d824f76292f3b5ee87f66f2 + languageName: node + linkType: hard + +"regenerate-unicode-properties@npm:^10.1.0": + version: 10.1.1 + resolution: "regenerate-unicode-properties@npm:10.1.1" + dependencies: + regenerate: ^1.4.2 + checksum: b80958ef40f125275824c2c47d5081dfaefebd80bff26c76761e9236767c748a4a95a69c053fe29d2df881177f2ca85df4a71fe70a82360388b31159ef19adcf + languageName: node + linkType: hard + +"regenerate@npm:^1.4.2": + version: 1.4.2 + resolution: "regenerate@npm:1.4.2" + checksum: 3317a09b2f802da8db09aa276e469b57a6c0dd818347e05b8862959c6193408242f150db5de83c12c3fa99091ad95fb42a6db2c3329bfaa12a0ea4cbbeb30cb0 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.13.2": + version: 0.13.11 + resolution: "regenerator-runtime@npm:0.13.11" + checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 9f57c93277b5585d3c83b0cf76be47b473ae8c6d9142a46ce8b0291a04bb2cf902059f0f8445dcabb3fb7378e5fe4bb4ea1e008876343d42e46d3b484534ce38 + languageName: node + linkType: hard + +"regenerator-transform@npm:^0.15.2": + version: 0.15.2 + resolution: "regenerator-transform@npm:0.15.2" + dependencies: + "@babel/runtime": ^7.8.4 + checksum: 20b6f9377d65954980fe044cfdd160de98df415b4bff38fbade67b3337efaf078308c4fed943067cd759827cc8cfeca9cb28ccda1f08333b85d6a2acbd022c27 + languageName: node + linkType: hard + +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": + version: 1.5.1 + resolution: "regexp.prototype.flags@npm:1.5.1" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + set-function-name: ^2.0.0 + checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 + languageName: node + linkType: hard + +"regexpu-core@npm:^5.3.1": + version: 5.3.2 + resolution: "regexpu-core@npm:5.3.2" + dependencies: + "@babel/regjsgen": ^0.8.0 + regenerate: ^1.4.2 + regenerate-unicode-properties: ^10.1.0 + regjsparser: ^0.9.1 + unicode-match-property-ecmascript: ^2.0.0 + unicode-match-property-value-ecmascript: ^2.1.0 + checksum: 95bb97088419f5396e07769b7de96f995f58137ad75fac5811fb5fe53737766dfff35d66a0ee66babb1eb55386ef981feaef392f9df6d671f3c124812ba24da2 + languageName: node + linkType: hard + +"regjsparser@npm:^0.9.1": + version: 0.9.1 + resolution: "regjsparser@npm:0.9.1" + dependencies: + jsesc: ~0.5.0 + bin: + regjsparser: bin/parser + checksum: 5e1b76afe8f1d03c3beaf9e0d935dd467589c3625f6d65fb8ffa14f224d783a0fed4bf49c2c1b8211043ef92b6117313419edf055a098ed8342e340586741afc + languageName: node + linkType: hard + +"remove-trailing-slash@npm:^0.1.0": + version: 0.1.1 + resolution: "remove-trailing-slash@npm:0.1.1" + checksum: dd200c6b7d6f2b49d12b3eff3abc7089917e8a268cefcd5bf67ff23f8c2ad9f866fbe2f3566e1a8dbdc4f4b1171e2941f7dd00852f8de549bb73c3df53b09d96 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7 + languageName: node + linkType: hard + +"requireg@npm:^0.2.2": + version: 0.2.2 + resolution: "requireg@npm:0.2.2" + dependencies: + nested-error-stacks: ~2.0.1 + rc: ~1.2.7 + resolve: ~1.7.1 + checksum: 99b420a02e7272717153cdf75891cbb133c02c04b287721eb1bdb0668b6a98aa1da38c08d8148fc8b1443a668d939eeb622d390538ac8da17b18a977ebe998ae + languageName: node + linkType: hard + +"requires-port@npm:^1.0.0": + version: 1.0.0 + resolution: "requires-port@npm:1.0.0" + checksum: eee0e303adffb69be55d1a214e415cf42b7441ae858c76dfc5353148644f6fd6e698926fc4643f510d5c126d12a705e7c8ed7e38061113bdf37547ab356797ff + languageName: node + linkType: hard + +"reselect@npm:^4.1.7": + version: 4.1.8 + resolution: "reselect@npm:4.1.8" + checksum: a4ac87cedab198769a29be92bc221c32da76cfdad6911eda67b4d3e7136dca86208c3b210e31632eae31ebd2cded18596f0dd230d3ccc9e978df22f233b5583e + languageName: node + linkType: hard + +"reselect@npm:^5.0.1": + version: 5.0.1 + resolution: "reselect@npm:5.0.1" + checksum: 7663b4c28a0e908e74dc25262e1d813d028b9c2ee96160cb0f40a16f09c5ac632fa16af6bafede7eb0ff16ab2d5bea2cd8814d9a9488e0262b8317fef90b1dc0 + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: ^5.0.0 + checksum: 546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 + languageName: node + linkType: hard + +"resolve-from@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-from@npm:3.0.0" + checksum: fff9819254d2d62b57f74e5c2ca9c0bdd425ca47287c4d801bc15f947533148d858229ded7793b0f59e61e49e782fffd6722048add12996e1bd4333c29669062 + languageName: node + linkType: hard + +"resolve-from@npm:^4.0.0": + version: 4.0.0 + resolution: "resolve-from@npm:4.0.0" + checksum: f4ba0b8494846a5066328ad33ef8ac173801a51739eb4d63408c847da9a2e1c1de1e6cbbf72699211f3d13f8fc1325648b169bd15eb7da35688e30a5fb0e4a7f + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 4ceeb9113e1b1372d0cd969f3468fa042daa1dd9527b1b6bb88acb6ab55d8b9cd65dbf18819f9f9ddf0db804990901dcdaade80a215e7b2c23daae38e64f5bdf + languageName: node + linkType: hard + +"resolve.exports@npm:^2.0.0": + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 1c7778ca1b86a94f8ab4055d196c7d87d1874b96df4d7c3e67bbf793140f0717fd506dcafd62785b079cd6086b9264424ad634fb904409764c3509c3df1653f2 + languageName: node + linkType: hard + +"resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: f8a26958aa572c9b064562750b52131a37c29d072478ea32e129063e2da7f83e31f7f11e7087a18225a8561cfe8d2f0df9dbea7c9d331a897571c0a2527dbb4c + languageName: node + linkType: hard + +"resolve@npm:^2.0.0-next.4": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: a73ac69a1c4bd34c56b213d91f5b17ce390688fdb4a1a96ed3025cc7e08e7bfb90b3a06fcce461780cb0b589c958afcb0080ab802c71c01a7ecc8c64feafc89f + languageName: node + linkType: hard + +"resolve@npm:~1.7.1": + version: 1.7.1 + resolution: "resolve@npm:1.7.1" + dependencies: + path-parse: ^1.0.5 + checksum: afb829d4b923f9b17aaf55320c2feaf8d44577674a3a71510d299f832fb80f6703e5a701e01cf774c3241fe8663d4b2b99053cfbca7995488d18ea9f8c7ac309 + languageName: node + linkType: hard + +"resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847 + languageName: node + linkType: hard + +"resolve@patch:resolve@^2.0.0-next.4#~builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#~builtin::version=2.0.0-next.5&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 064d09c1808d0c51b3d90b5d27e198e6d0c5dad0eb57065fd40803d6a20553e5398b07f76739d69cbabc12547058bec6b32106ea66622375fb0d7e8fca6a846c + languageName: node + linkType: hard + +"resolve@patch:resolve@~1.7.1#~builtin": + version: 1.7.1 + resolution: "resolve@patch:resolve@npm%3A1.7.1#~builtin::version=1.7.1&hash=07638b" + dependencies: + path-parse: ^1.0.5 + checksum: c2a6f0e3856ac1ddc8297091c20ca6c36d99bf289ddea366c46bd2a7ed8b31075c7f9d01ff5d390ebed1fe41b9fabe57a79ae087992ba92e3592f0c3be07c1ac + languageName: node + linkType: hard + +"restore-cursor@npm:^2.0.0": + version: 2.0.0 + resolution: "restore-cursor@npm:2.0.0" + dependencies: + onetime: ^2.0.0 + signal-exit: ^3.0.2 + checksum: 482e13d02d834b6e5e3aa90304a8b5e840775d6f06916cc92a50038adf9f098dcc72405b567da8a37e137ae40ad3e31896fa3136ae62f7a426c2fbf53d036536 + languageName: node + linkType: hard + +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: ^5.1.0 + signal-exit: ^3.0.2 + checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 623bd7d2e5119467ba66202d733ec3c2e2e26568074923bc0585b6b99db14f357e79bdedb63cab56cec47491c4a0da7e6021a7465ca6dc4f481d3898fdd3158c + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: c3076ebcc22a6bc252cb0b9c77561795256c22b757f40c0d8110b1300723f15ec0fc8685e8d4ea6d7666f36c79ccc793b1939c748bf36f18f542744a4e379fcc + languageName: node + linkType: hard + +"rimraf@npm:^2.6.2": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + languageName: node + linkType: hard + +"rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: ^7.1.3 + bin: + rimraf: bin.js + checksum: 87f4164e396f0171b0a3386cc1877a817f572148ee13a7e113b238e48e8a9f2f31d009a92ec38a591ff1567d9662c6b67fd8818a2dbbaed74bc26a87a2a4a9a0 + languageName: node + linkType: hard + +"rimraf@npm:~2.4.0": + version: 2.4.5 + resolution: "rimraf@npm:2.4.5" + dependencies: + glob: ^6.0.1 + bin: + rimraf: ./bin.js + checksum: 036793b4055d65344ad7bea73c3f4095640af7455478fe56c19783619463e6bb4374ab3556b9e6d4d6d3dd210eb677b0955ece38813e734c294fd2687201151d + languageName: node + linkType: hard + +"rimraf@npm:~2.6.2": + version: 2.6.3 + resolution: "rimraf@npm:2.6.3" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: 3ea587b981a19016297edb96d1ffe48af7e6af69660e3b371dbfc73722a73a0b0e9be5c88089fbeeb866c389c1098e07f64929c7414290504b855f54f901ab10 + languageName: node + linkType: hard + +"run-applescript@npm:^5.0.0": + version: 5.0.0 + resolution: "run-applescript@npm:5.0.0" + dependencies: + execa: ^5.0.0 + checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + languageName: node + linkType: hard + +"safe-array-concat@npm:^1.0.1": + version: 1.0.1 + resolution: "safe-array-concat@npm:1.0.1" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: 001ecf1d8af398251cbfabaf30ed66e3855127fbceee178179524b24160b49d15442f94ed6c0db0b2e796da76bb05b73bf3cc241490ec9c2b741b41d33058581 + languageName: node + linkType: hard + +"safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": + version: 5.1.2 + resolution: "safe-buffer@npm:5.1.2" + checksum: f2f1f7943ca44a594893a852894055cf619c1fbcb611237fc39e461ae751187e7baf4dc391a72125e0ac4fb2d8c5c0b3c71529622e6a58f46b960211e704903c + languageName: node + linkType: hard + +"safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + +"safe-json-stringify@npm:~1": + version: 1.2.0 + resolution: "safe-json-stringify@npm:1.2.0" + checksum: 5bb32db6d6a3ceb3752df51f4043a412419cd3d4fcd5680a865dfa34cd7e575ba659c077d13f52981ced084061df9c75c7fb12e391584d4264e6914c1cd3d216 + languageName: node + linkType: hard + +"safe-regex-test@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-regex-test@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + is-regex: ^1.1.4 + checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 + languageName: node + linkType: hard + +"sax@npm:>=0.6.0": + version: 1.3.0 + resolution: "sax@npm:1.3.0" + checksum: 238ab3a9ba8c8f8aaf1c5ea9120386391f6ee0af52f1a6a40bbb6df78241dd05d782f2359d614ac6aae08c4c4125208b456548a6cf68625aa4fe178486e63ecd + languageName: node + linkType: hard + +"saxes@npm:^6.0.0": + version: 6.0.0 + resolution: "saxes@npm:6.0.0" + dependencies: + xmlchars: ^2.2.0 + checksum: d3fa3e2aaf6c65ed52ee993aff1891fc47d5e47d515164b5449cbf5da2cbdc396137e55590472e64c5c436c14ae64a8a03c29b9e7389fc6f14035cf4e982ef3b + languageName: node + linkType: hard + +"scheduler@npm:0.24.0-canary-efb381bbf-20230505": + version: 0.24.0-canary-efb381bbf-20230505 + resolution: "scheduler@npm:0.24.0-canary-efb381bbf-20230505" + dependencies: + loose-envify: ^1.1.0 + checksum: 232149125c10f10193b1340ec4bbf14a8e6a845152790d6fd6f58207642db801abdb5a21227561a0a93871b98ba47539a6233b4e6155aae72d6db6db9f9f09b3 + languageName: node + linkType: hard + +"scheduler@npm:^0.23.0": + version: 0.23.0 + resolution: "scheduler@npm:0.23.0" + dependencies: + loose-envify: ^1.1.0 + checksum: d79192eeaa12abef860c195ea45d37cbf2bbf5f66e3c4dcd16f54a7da53b17788a70d109ee3d3dde1a0fd50e6a8fc171f4300356c5aee4fc0171de526bf35f8a + languageName: node + linkType: hard + +"semver@npm:7.3.2": + version: 7.3.2 + resolution: "semver@npm:7.3.2" + bin: + semver: bin/semver.js + checksum: 692f4900dadb43919614b0df9af23fe05743051cda0d1735b5e4d76f93c9e43a266fae73cfc928f5d1489f022c5c0e65dfd2900fcf5b1839c4e9a239729afa7b + languageName: node + linkType: hard + +"semver@npm:7.5.3": + version: 7.5.3 + resolution: "semver@npm:7.5.3" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 9d58db16525e9f749ad0a696a1f27deabaa51f66e91d2fa2b0db3de3e9644e8677de3b7d7a03f4c15bc81521e0c3916d7369e0572dbde250d9bedf5194e2a8a7 + languageName: node + linkType: hard + +"semver@npm:^5.5.0, semver@npm:^5.6.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 + languageName: node + linkType: hard + +"semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + +"send@npm:0.18.0, send@npm:^0.18.0": + version: 0.18.0 + resolution: "send@npm:0.18.0" + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + etag: ~1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: ~1.2.1 + statuses: 2.0.1 + checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8 + languageName: node + linkType: hard + +"serialize-error@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-error@npm:6.0.0" + dependencies: + type-fest: ^0.12.0 + checksum: 3419fb068af8f22a6ddfabee55b69cfc717008d381b086c01c7b1c506f96c14d1fd4a222b85b4a551cd86498ec52913a5f6b5971650fe8d0859e2b41010feb9e + languageName: node + linkType: hard + +"serialize-error@npm:^2.1.0": + version: 2.1.0 + resolution: "serialize-error@npm:2.1.0" + checksum: 28464a6f65e6becd6e49fb782aff06573fdbf3d19f161a20228179842fed05c75a34110e54c3ee020b00240f9e11d8bee9b9fee5d04e0bc0bef1fdbf2baa297e + languageName: node + linkType: hard + +"serve-static@npm:^1.13.1": + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" + dependencies: + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + parseurl: ~1.3.3 + send: 0.18.0 + checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 6e65a05f7cf7ebdf8b7c75b101e18c0b7e3dff4940d480efed8aad3a36a4005140b660fa1d804cb8bce911cac290441dc728084a30504d3516ac2ff7ad607b02 + languageName: node + linkType: hard + +"set-function-length@npm:^1.1.1": + version: 1.1.1 + resolution: "set-function-length@npm:1.1.1" + dependencies: + define-data-property: ^1.1.1 + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: c131d7569cd7e110cafdfbfbb0557249b538477624dfac4fc18c376d879672fa52563b74029ca01f8f4583a8acb35bb1e873d573a24edb80d978a7ee607c6e06 + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: ^1.0.1 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + languageName: node + linkType: hard + +"setimmediate@npm:^1.0.5": + version: 1.0.5 + resolution: "setimmediate@npm:1.0.5" + checksum: c9a6f2c5b51a2dabdc0247db9c46460152ffc62ee139f3157440bd48e7c59425093f42719ac1d7931f054f153e2d26cf37dfeb8da17a794a58198a2705e527fd + languageName: node + linkType: hard + +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: be18cbbf70e7d8097c97f713a2e76edf84e87299b40d085c6bf8b65314e994cc15e2e317727342fa6996e38e1f52c59720b53fe621e2eb593a6847bf0356db89 + languageName: node + linkType: hard + +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" + dependencies: + kind-of: ^6.0.2 + checksum: 39b3dd9630a774aba288a680e7d2901f5c0eae7b8387fc5c8ea559918b29b3da144b7bdb990d7ccd9e11be05508ac9e459ce51d01fd65e583282f6ffafcba2e7 + languageName: node + linkType: hard + +"shebang-command@npm:^1.2.0": + version: 1.2.0 + resolution: "shebang-command@npm:1.2.0" + dependencies: + shebang-regex: ^1.0.0 + checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: ^3.0.0 + checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "shebang-regex@npm:1.0.0" + checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"shell-quote@npm:^1.6.1, shell-quote@npm:^1.7.3": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 5f01201f4ef504d4c6a9d0d283fa17075f6770bfbe4c5850b074974c68062f37929ca61700d95ad2ac8822e14e8c4b990ca0e6e9272e64befd74ce5e19f0736b + languageName: node + linkType: hard + +"side-channel@npm:^1.0.4": + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" + dependencies: + call-bind: ^1.0.0 + get-intrinsic: ^1.0.2 + object-inspect: ^1.9.0 + checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + +"simple-plist@npm:^1.1.0": + version: 1.3.1 + resolution: "simple-plist@npm:1.3.1" + dependencies: + bplist-creator: 0.1.0 + bplist-parser: 0.3.1 + plist: ^3.0.5 + checksum: 3890b49db544096e6f35f53268901112be859c44b187528979f1a67e604b5b48b4cd6e5d6ee9e2e32aeb1e2535fe93e1cb102e2cf2bf5a37200d8884cb65b918 + languageName: node + linkType: hard + +"sisteransi@npm:^1.0.5": + version: 1.0.5 + resolution: "sisteransi@npm:1.0.5" + checksum: aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 + languageName: node + linkType: hard + +"slash@npm:^3.0.0": + version: 3.0.0 + resolution: "slash@npm:3.0.0" + checksum: 94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c + languageName: node + linkType: hard + +"slash@npm:^5.0.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 70434b34c50eb21b741d37d455110258c42d2cf18c01e6518aeb7299f3c6e626330c889c0c552b5ca2ef54a8f5a74213ab48895f0640717cacefeef6830a1ba4 + languageName: node + linkType: hard + +"slice-ansi@npm:^2.0.0": + version: 2.1.0 + resolution: "slice-ansi@npm:2.1.0" + dependencies: + ansi-styles: ^3.2.0 + astral-regex: ^1.0.0 + is-fullwidth-code-point: ^2.0.0 + checksum: 4e82995aa59cef7eb03ef232d73c2239a15efa0ace87a01f3012ebb942e963fbb05d448ce7391efcd52ab9c32724164aba2086f5143e0445c969221dde3b6b1e + languageName: node + linkType: hard + +"slugify@npm:^1.3.4": + version: 1.6.6 + resolution: "slugify@npm:1.6.6" + checksum: 04773c2d3b7aea8d2a61fa47cc7e5d29ce04e1a96cbaec409da57139df906acb3a449fac30b167d203212c806e73690abd4ff94fbad0a9a7b7ea109a2a638ae9 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: b5167a7142c1da704c0e3af85c402002b597081dd9575031a90b4f229ca5678e9a36e8a374f1814c8156a725d17008ae3bde63b92f9cfd132526379e580bec8b + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: ^2.0.0 + smart-buffer: ^4.2.0 + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + languageName: node + linkType: hard + +"source-map-js@npm:^1.0.2": + version: 1.0.2 + resolution: "source-map-js@npm:1.0.2" + checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c + languageName: node + linkType: hard + +"source-map-support@npm:0.5.13": + version: 0.5.13 + resolution: "source-map-support@npm:0.5.13" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 933550047b6c1a2328599a21d8b7666507427c0f5ef5eaadd56b5da0fd9505e239053c66fe181bf1df469a3b7af9d775778eee283cbb7ae16b902ddc09e93a97 + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.16, source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + +"source-map@npm:^0.5.6": + version: 0.5.7 + resolution: "source-map@npm:0.5.7" + checksum: 5dc2043b93d2f194142c7f38f74a24670cd7a0063acdaf4bf01d2964b402257ae843c2a8fa822ad5b71013b5fcafa55af7421383da919752f22ff488bc553f4d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + +"source-map@npm:^0.7.3": + version: 0.7.4 + resolution: "source-map@npm:0.7.4" + checksum: 01cc5a74b1f0e1d626a58d36ad6898ea820567e87f18dfc9d24a9843a351aaa2ec09b87422589906d6ff1deed29693e176194dc88bcae7c9a852dc74b311dbf5 + languageName: node + linkType: hard + +"split@npm:^1.0.1": + version: 1.0.1 + resolution: "split@npm:1.0.1" + dependencies: + through: 2 + checksum: 12f4554a5792c7e98bb3e22b53c63bfa5ef89aa704353e1db608a55b51f5b12afaad6e4a8ecf7843c15f273f43cdadd67b3705cc43d48a75c2cf4641d51f7e7a + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 19d79aec211f09b99ec3099b5b2ae2f6e9cdefe50bc91ac4c69144b6d3928a640bb6ae5b3def70c2e85a2c3d9f5ec2719921e3a59d3ca3ef4b2fd1a4656a0df3 + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" + dependencies: + minipass: ^7.0.3 + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + languageName: node + linkType: hard + +"ssri@npm:^8.0.1": + version: 8.0.1 + resolution: "ssri@npm:8.0.1" + dependencies: + minipass: ^3.1.1 + checksum: bc447f5af814fa9713aa201ec2522208ae0f4d8f3bda7a1f445a797c7b929a02720436ff7c478fb5edc4045adb02b1b88d2341b436a80798734e2494f1067b36 + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.3": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: ^2.0.0 + checksum: 052bf4d25bbf5f78e06c1d5e67de2e088b06871fa04107ca8d3f0e9d9263326e2942c8bedee3545795fc77d787d443a538345eef74db2f8e35db3558c6f91ff7 + languageName: node + linkType: hard + +"stackframe@npm:^1.3.4": + version: 1.3.4 + resolution: "stackframe@npm:1.3.4" + checksum: bae1596873595c4610993fa84f86a3387d67586401c1816ea048c0196800c0646c4d2da98c2ee80557fd9eff05877efe33b91ba6cd052658ed96ddc85d19067d + languageName: node + linkType: hard + +"stacktrace-parser@npm:^0.1.10": + version: 0.1.10 + resolution: "stacktrace-parser@npm:0.1.10" + dependencies: + type-fest: ^0.7.1 + checksum: f4fbddfc09121d91e587b60de4beb4941108e967d71ad3a171812dc839b010ca374d064ad0a296295fed13acd103609d99a4224a25b4e67de13cae131f1901ee + languageName: node + linkType: hard + +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"statuses@npm:~1.5.0": + version: 1.5.0 + resolution: "statuses@npm:1.5.0" + checksum: c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c + languageName: node + linkType: hard + +"stream-buffers@npm:2.2.x": + version: 2.2.0 + resolution: "stream-buffers@npm:2.2.0" + checksum: 4587d9e8f050d689fb38b4295e73408401b16de8edecc12026c6f4ae92956705ecfd995ae3845d7fa3ebf19502d5754df9143d91447fd881d86e518f43882c1c + languageName: node + linkType: hard + +"string-length@npm:^4.0.1": + version: 4.0.2 + resolution: "string-length@npm:4.0.2" + dependencies: + char-regex: ^1.0.2 + strip-ansi: ^6.0.0 + checksum: ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 + languageName: node + linkType: hard + +"string-length@npm:^5.0.1": + version: 5.0.1 + resolution: "string-length@npm:5.0.1" + dependencies: + char-regex: ^2.0.0 + strip-ansi: ^7.0.1 + checksum: 71f73b8c8a743e01dcd001bcf1b197db78d5e5e53b12bd898cddaf0961be09f947dfd8c429783db3694b55b05cb5a51de6406c5085ff1aaa10c4771440c8396d + languageName: node + linkType: hard + +"string-natural-compare@npm:^3.0.1": + version: 3.0.1 + resolution: "string-natural-compare@npm:3.0.1" + checksum: 65910d9995074086e769a68728395effbba9b7186be5b4c16a7fad4f4ef50cae95ca16e3e9086e019cbb636ae8daac9c7b8fe91b5f21865c5c0f26e3c0725406 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: ^0.2.0 + emoji-regex: ^9.2.2 + strip-ansi: ^7.0.1 + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 + side-channel: ^1.0.4 + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: ~5.2.0 + checksum: 8417646695a66e73aefc4420eb3b84cc9ffd89572861fe004e6aeb13c7bc00e2f616247505d2dbbef24247c372f70268f594af7126f43548565c68c117bdeb56 + languageName: node + linkType: hard + +"string_decoder@npm:~1.1.1": + version: 1.1.1 + resolution: "string_decoder@npm:1.1.1" + dependencies: + safe-buffer: ~5.1.0 + checksum: 9ab7e56f9d60a28f2be697419917c50cac19f3e8e6c28ef26ed5f4852289fe0de5d6997d29becf59028556f2c62983790c1d9ba1e2a3cc401768ca12d5183a5b + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-ansi@npm:^5.0.0, strip-ansi@npm:^5.2.0": + version: 5.2.0 + resolution: "strip-ansi@npm:5.2.0" + dependencies: + ansi-regex: ^4.1.0 + checksum: bdb5f76ade97062bd88e7723aa019adbfacdcba42223b19ccb528ffb9fb0b89a5be442c663c4a3fb25268eaa3f6ea19c7c3fbae830bd1562d55adccae1fcec46 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: ^6.0.1 + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-eof@npm:^1.0.0": + version: 1.0.0 + resolution: "strip-eof@npm:1.0.0" + checksum: 40bc8ddd7e072f8ba0c2d6d05267b4e0a4800898c3435b5fb5f5a21e6e47dfaff18467e7aa0d1844bb5d6274c3097246595841fbfeb317e541974ee992cac506 + languageName: node + linkType: hard + +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 + languageName: node + linkType: hard + +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 + languageName: node + linkType: hard + +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + +"strip-json-comments@npm:^3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"strip-json-comments@npm:~2.0.1": + version: 2.0.1 + resolution: "strip-json-comments@npm:2.0.1" + checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 + languageName: node + linkType: hard + +"strnum@npm:^1.0.5": + version: 1.0.5 + resolution: "strnum@npm:1.0.5" + checksum: 651b2031db5da1bf4a77fdd2f116a8ac8055157c5420f5569f64879133825915ad461513e7202a16d7fec63c54fd822410d0962f8ca12385c4334891b9ae6dd2 + languageName: node + linkType: hard + +"structured-headers@npm:^0.4.1": + version: 0.4.1 + resolution: "structured-headers@npm:0.4.1" + checksum: 2f3073b2c8b4f2515367a1647ba0b6764ce6d35b3943605940de41077c2afd2513257f4bf6fbfd67a3455f25a3e844905da6fddde6b6ad7974256495311a25a3 + languageName: node + linkType: hard + +"sucrase@npm:^3.20.0": + version: 3.34.0 + resolution: "sucrase@npm:3.34.0" + dependencies: + "@jridgewell/gen-mapping": ^0.3.2 + commander: ^4.0.0 + glob: 7.1.6 + lines-and-columns: ^1.1.6 + mz: ^2.7.0 + pirates: ^4.0.1 + ts-interface-checker: ^0.1.9 + bin: + sucrase: bin/sucrase + sucrase-node: bin/sucrase-node + checksum: 61860063bdf6103413698e13247a3074d25843e91170825a9752e4af7668ffadd331b6e99e92fc32ee5b3c484ee134936f926fa9039d5711fafff29d017a2110 + languageName: node + linkType: hard + +"sudo-prompt@npm:9.1.1": + version: 9.1.1 + resolution: "sudo-prompt@npm:9.1.1" + checksum: 20fe5bde6a27725d87938e68d6f99c0798ce9bf3a8fdebd58392a0436df713c66ebf67863e682941ff98ee7611e40ed599e12be7f264c9286106feb0f3db3860 + languageName: node + linkType: hard + +"sudo-prompt@npm:^8.2.0": + version: 8.2.5 + resolution: "sudo-prompt@npm:8.2.5" + checksum: bacff1f18a8ab8dba345cc1f3cf3a02b4cc571f71585df79af95af31278f56107f7c29402f5347b07c489888c63f2deb78d544b93a6347e83d0ed0847f4bc163 + languageName: node + linkType: hard + +"sudo-prompt@npm:^9.0.0": + version: 9.2.1 + resolution: "sudo-prompt@npm:9.2.1" + checksum: 50a29eec2f264f2b78d891452a64112d839a30bffbff4ec065dba4af691a35b23cdb8f9107d413e25c1a9f1925644a19994c00602495cab033d53f585fdfd665 + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: ^3.0.0 + checksum: 95f6f4ba5afdf92f495b5a912d4abee8dcba766ae719b975c56c084f5004845f6f5a5f7769f52d53f40e21952a6d87411bafe34af4a01e65f9926002e38e1dac + languageName: node + linkType: hard + +"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: ^4.0.0 + checksum: 3dda818de06ebbe5b9653e07842d9479f3555ebc77e9a0280caf5a14fb877ffee9ed57007c3b78f5a6324b8dbeec648d9e97a24e2ed9fdb81ddc69ea07100f4a + languageName: node + linkType: hard + +"supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + +"supports-hyperlinks@npm:^2.0.0": + version: 2.3.0 + resolution: "supports-hyperlinks@npm:2.3.0" + dependencies: + has-flag: ^4.0.0 + supports-color: ^7.0.0 + checksum: 9ee0de3c8ce919d453511b2b1588a8205bd429d98af94a01df87411391010fe22ca463f268c84b2ce2abad019dfff8452aa02806eeb5c905a8d7ad5c4f4c52b8 + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae + languageName: node + linkType: hard + +"symbol-tree@npm:^3.2.4": + version: 3.2.4 + resolution: "symbol-tree@npm:3.2.4" + checksum: 6e8fc7e1486b8b54bea91199d9535bb72f10842e40c79e882fc94fb7b14b89866adf2fd79efa5ebb5b658bc07fb459ccce5ac0e99ef3d72f474e74aaf284029d + languageName: node + linkType: hard + +"synckit@npm:^0.8.5": + version: 0.8.6 + resolution: "synckit@npm:0.8.6" + dependencies: + "@pkgr/utils": ^2.4.2 + tslib: ^2.6.2 + checksum: 7c1f4991d0afd63c090c0537f1cf8619dd5777a40cf83bf46beadbf4eb0f9e400d92044e90a177a305df4bcb56efbaf1b689877f301f2672d865b6eecf1be75a + languageName: node + linkType: hard + +"tar@npm:^6.0.2, tar@npm:^6.0.5, tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.0 + resolution: "tar@npm:6.2.0" + dependencies: + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + minipass: ^5.0.0 + minizlib: ^2.1.1 + mkdirp: ^1.0.3 + yallist: ^4.0.0 + checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + languageName: node + linkType: hard + +"temp-dir@npm:^1.0.0": + version: 1.0.0 + resolution: "temp-dir@npm:1.0.0" + checksum: cb2b58ddfb12efa83e939091386ad73b425c9a8487ea0095fe4653192a40d49184a771a1beba99045fbd011e389fd563122d79f54f82be86a55620667e08a6b2 + languageName: node + linkType: hard + +"temp-dir@npm:^2.0.0": + version: 2.0.0 + resolution: "temp-dir@npm:2.0.0" + checksum: cc4f0404bf8d6ae1a166e0e64f3f409b423f4d1274d8c02814a59a5529f07db6cd070a749664141b992b2c1af337fa9bb451a460a43bb9bcddc49f235d3115aa + languageName: node + linkType: hard + +"temp@npm:^0.8.4": + version: 0.8.4 + resolution: "temp@npm:0.8.4" + dependencies: + rimraf: ~2.6.2 + checksum: f35bed78565355dfdf95f730b7b489728bd6b7e35071bcc6497af7c827fb6c111fbe9063afc7b8cbc19522a072c278679f9a0ee81e684aa2c8617cc0f2e9c191 + languageName: node + linkType: hard + +"tempy@npm:0.3.0": + version: 0.3.0 + resolution: "tempy@npm:0.3.0" + dependencies: + temp-dir: ^1.0.0 + type-fest: ^0.3.1 + unique-string: ^1.0.0 + checksum: f81ef72a7ee6d512439af8d8891e4fc6595309451910d7ac9d760f1242a1f87272b2b97c830c8f74aaa93a3aa550483bb16db17e6345601f64d614d240edc322 + languageName: node + linkType: hard + +"tempy@npm:^0.7.1": + version: 0.7.1 + resolution: "tempy@npm:0.7.1" + dependencies: + del: ^6.0.0 + is-stream: ^2.0.0 + temp-dir: ^2.0.0 + type-fest: ^0.16.0 + unique-string: ^2.0.0 + checksum: 265652f94eed077c311777e0290c4b4f3ec670c71c62c979efcbbd67ee506d677ff2741a72d7160556e9b0fba8fc5fbd7b3c482ac94c8acc48d85411f1f079c3 + languageName: node + linkType: hard + +"terminal-link@npm:^2.1.1": + version: 2.1.1 + resolution: "terminal-link@npm:2.1.1" + dependencies: + ansi-escapes: ^4.2.1 + supports-hyperlinks: ^2.0.0 + checksum: ce3d2cd3a438c4a9453947aa664581519173ea40e77e2534d08c088ee6dda449eabdbe0a76d2a516b8b73c33262fedd10d5270ccf7576ae316e3db170ce6562f + languageName: node + linkType: hard + +"terser@npm:^5.15.0": + version: 5.26.0 + resolution: "terser@npm:5.26.0" + dependencies: + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.8.2 + commander: ^2.20.0 + source-map-support: ~0.5.20 + bin: + terser: bin/terser + checksum: 02a9bb896f04df828025af8f0eced36c315d25d310b6c2418e7dad2bed19ddeb34a9cea9b34e7c24789830fa51e1b6a9be26679980987a9c817a7e6d9cd4154b + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": ^0.1.2 + glob: ^7.1.4 + minimatch: ^3.0.4 + checksum: 3b34a3d77165a2cb82b34014b3aba93b1c4637a5011807557dc2f3da826c59975a5ccad765721c4648b39817e3472789f9b0fa98fc854c5c1c7a1e632aacdc28 + languageName: node + linkType: hard + +"text-table@npm:^0.2.0": + version: 0.2.0 + resolution: "text-table@npm:0.2.0" + checksum: b6937a38c80c7f84d9c11dd75e49d5c44f71d95e810a3250bd1f1797fc7117c57698204adf676b71497acc205d769d65c16ae8fa10afad832ae1322630aef10a + languageName: node + linkType: hard + +"thenify-all@npm:^1.0.0": + version: 1.6.0 + resolution: "thenify-all@npm:1.6.0" + dependencies: + thenify: ">= 3.1.0 < 4" + checksum: dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e + languageName: node + linkType: hard + +"thenify@npm:>= 3.1.0 < 4": + version: 3.3.1 + resolution: "thenify@npm:3.3.1" + dependencies: + any-promise: ^1.0.0 + checksum: 84e1b804bfec49f3531215f17b4a6e50fd4397b5f7c1bccc427b9c656e1ecfb13ea79d899930184f78bc2f57285c54d9a50a590c8868f4f0cef5c1d9f898b05e + languageName: node + linkType: hard + +"throat@npm:^5.0.0": + version: 5.0.0 + resolution: "throat@npm:5.0.0" + checksum: 031ff7f4431618036c1dedd99c8aa82f5c33077320a8358ed829e84b320783781d1869fe58e8f76e948306803de966f5f7573766a437562c9f5c033297ad2fe2 + languageName: node + linkType: hard + +"through2@npm:^2.0.1": + version: 2.0.5 + resolution: "through2@npm:2.0.5" + dependencies: + readable-stream: ~2.3.6 + xtend: ~4.0.1 + checksum: beb0f338aa2931e5660ec7bf3ad949e6d2e068c31f4737b9525e5201b824ac40cac6a337224856b56bd1ddd866334bbfb92a9f57cd6f66bc3f18d3d86fc0fe50 + languageName: node + linkType: hard + +"through@npm:2": + version: 2.3.8 + resolution: "through@npm:2.3.8" + checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd + languageName: node + linkType: hard + +"titleize@npm:^3.0.0": + version: 3.0.0 + resolution: "titleize@npm:3.0.0" + checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 + languageName: node + linkType: hard + +"tmp@npm:^0.0.33": + version: 0.0.33 + resolution: "tmp@npm:0.0.33" + dependencies: + os-tmpdir: ~1.0.2 + checksum: 902d7aceb74453ea02abbf58c203f4a8fc1cead89b60b31e354f74ed5b3fb09ea817f94fb310f884a5d16987dd9fa5a735412a7c2dd088dd3d415aa819ae3a28 + languageName: node + linkType: hard + +"tmpl@npm:1.0.5": + version: 1.0.5 + resolution: "tmpl@npm:1.0.5" + checksum: cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 + languageName: node + linkType: hard + +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: ^7.0.0 + checksum: f76fa01b3d5be85db6a2a143e24df9f60dd047d151062d0ba3df62953f2f697b16fe5dad9b0ac6191c7efc7b1d9dcaa4b768174b7b29da89d4428e64bc0a20ed + languageName: node + linkType: hard + +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + languageName: node + linkType: hard + +"tough-cookie@npm:^4.1.2": + version: 4.1.3 + resolution: "tough-cookie@npm:4.1.3" + dependencies: + psl: ^1.1.33 + punycode: ^2.1.1 + universalify: ^0.2.0 + url-parse: ^1.5.3 + checksum: c9226afff36492a52118432611af083d1d8493a53ff41ec4ea48e5b583aec744b989e4280bcf476c910ec1525a89a4a0f1cae81c08b18fb2ec3a9b3a72b91dcc + languageName: node + linkType: hard + +"tr46@npm:^3.0.0": + version: 3.0.0 + resolution: "tr46@npm:3.0.0" + dependencies: + punycode: ^2.1.1 + checksum: 44c3cc6767fb800490e6e9fd64fd49041aa4e49e1f6a012b34a75de739cc9ed3a6405296072c1df8b6389ae139c5e7c6496f659cfe13a04a4bff3a1422981270 + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + +"traverse@npm:~0.6.6": + version: 0.6.7 + resolution: "traverse@npm:0.6.7" + checksum: 21018085ab72f717991597e12e2b52446962ed59df591502e4d7e1a709bc0a989f7c3d451aa7d882666ad0634f1546d696c5edecda1f2fc228777df7bb529a1e + languageName: node + linkType: hard + +"ts-api-utils@npm:^1.0.1": + version: 1.0.3 + resolution: "ts-api-utils@npm:1.0.3" + peerDependencies: + typescript: ">=4.2.0" + checksum: 441cc4489d65fd515ae6b0f4eb8690057add6f3b6a63a36073753547fb6ce0c9ea0e0530220a0b282b0eec535f52c4dfc315d35f8a4c9a91c0def0707a714ca6 + languageName: node + linkType: hard + +"ts-interface-checker@npm:^0.1.9": + version: 0.1.13 + resolution: "ts-interface-checker@npm:0.1.13" + checksum: 20c29189c2dd6067a8775e07823ddf8d59a33e2ffc47a1bd59a5cb28bb0121a2969a816d5e77eda2ed85b18171aa5d1c4005a6b88ae8499ec7cc49f78571cb5e + languageName: node + linkType: hard + +"ts-node@npm:^10.9.2": + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" + dependencies: + "@cspotcode/source-map-support": ^0.8.0 + "@tsconfig/node10": ^1.0.7 + "@tsconfig/node12": ^1.0.7 + "@tsconfig/node14": ^1.0.0 + "@tsconfig/node16": ^1.0.2 + acorn: ^8.4.1 + acorn-walk: ^8.1.1 + arg: ^4.1.0 + create-require: ^1.1.0 + diff: ^4.0.1 + make-error: ^1.1.1 + v8-compile-cache-lib: ^3.0.1 + yn: 3.1.1 + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: fde256c9073969e234526e2cfead42591b9a2aec5222bac154b0de2fa9e4ceb30efcd717ee8bc785a56f3a119bdd5aa27b333d9dbec94ed254bd26f8944c67ac + languageName: node + linkType: hard + +"tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: dbe628ef87f66691d5d2959b3e41b9ca0045c3ee3c7c7b906cc1e328b39f199bb1ad9e671c39025bd56122ac57dfbf7385a94843b1cc07c60a4db74795829acd + languageName: node + linkType: hard + +"tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.0, tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + +"tsutils@npm:^3.21.0": + version: 3.21.0 + resolution: "tsutils@npm:3.21.0" + dependencies: + tslib: ^1.8.1 + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + checksum: 1843f4c1b2e0f975e08c4c21caa4af4f7f65a12ac1b81b3b8489366826259323feb3fc7a243123453d2d1a02314205a7634e048d4a8009921da19f99755cdc48 + languageName: node + linkType: hard + +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" + dependencies: + prelude-ls: ^1.2.1 + checksum: ec688ebfc9c45d0c30412e41ca9c0cdbd704580eb3a9ccf07b9b576094d7b86a012baebc95681999dd38f4f444afd28504cb3a89f2ef16b31d4ab61a0739025a + languageName: node + linkType: hard + +"type-detect@npm:4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 + languageName: node + linkType: hard + +"type-fest@npm:^0.12.0": + version: 0.12.0 + resolution: "type-fest@npm:0.12.0" + checksum: 407d6c1a6fcc907f6124c37e977ba4966205014787a32a27579da6e47c3b1bd210b68cc1c7764d904c8aa55fb4efa6945586f9b4fae742c63ed026a4559da07d + languageName: node + linkType: hard + +"type-fest@npm:^0.16.0": + version: 0.16.0 + resolution: "type-fest@npm:0.16.0" + checksum: 1a4102c06dc109db00418c753062e206cab65befd469d000ece4452ee649bf2a9cf57686d96fb42326bc9d918d9a194d4452897b486dcc41989e5c99e4e87094 + languageName: node + linkType: hard + +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 4fb3272df21ad1c552486f8a2f8e115c09a521ad7a8db3d56d53718d0c907b62c6e9141ba5f584af3f6830d0872c521357e512381f24f7c44acae583ad517d73 + languageName: node + linkType: hard + +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: e6b32a3b3877f04339bae01c193b273c62ba7bfc9e325b8703c4ee1b32dc8fe4ef5dfa54bf78265e069f7667d058e360ae0f37be5af9f153b22382cd55a9afe0 + languageName: node + linkType: hard + +"type-fest@npm:^0.3.1": + version: 0.3.1 + resolution: "type-fest@npm:0.3.1" + checksum: 347ff46c2285616635cb59f722e7f396bee81b8988b6fc1f1536b725077f2abf6ccfa22ab7a78e9b6ce7debea0e6614bbf5946cbec6674ec1bde12113af3a65c + languageName: node + linkType: hard + +"type-fest@npm:^0.7.1": + version: 0.7.1 + resolution: "type-fest@npm:0.7.1" + checksum: 5b1b113529d59949d97b76977d545989ddc11b81bb0c766b6d2ccc65473cb4b4a5c7d24f5be2c2bb2de302a5d7a13c1732ea1d34c8c59b7e0ec1f890cf7fc424 + languageName: node + linkType: hard + +"type-fest@npm:^3.0.0": + version: 3.13.1 + resolution: "type-fest@npm:3.13.1" + checksum: c06b0901d54391dc46de3802375f5579868949d71f93b425ce564e19a428a0d411ae8d8cb0e300d330071d86152c3ea86e744c3f2860a42a79585b6ec2fdae8e + languageName: node + linkType: hard + +"type-is@npm:~1.6.18": + version: 1.6.18 + resolution: "type-is@npm:1.6.18" + dependencies: + media-typer: 0.3.0 + mime-types: ~2.1.24 + checksum: 2c8e47675d55f8b4e404bcf529abdf5036c537a04c2b20177bcf78c9e3c1da69da3942b1346e6edb09e823228c0ee656ef0e033765ec39a70d496ef601a0c657 + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + is-typed-array: ^1.1.10 + checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + languageName: node + linkType: hard + +"typescript@npm:^5.1.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 + languageName: node + linkType: hard + +"typescript@patch:typescript@^5.1.3#~builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: f61375590b3162599f0f0d5b8737877ac0a7bc52761dbb585d67e7b8753a3a4c42d9a554c4cc929f591ffcf3a2b0602f65ae3ce74714fd5652623a816862b610 + languageName: node + linkType: hard + +"ua-parser-js@npm:^1.0.35": + version: 1.0.37 + resolution: "ua-parser-js@npm:1.0.37" + checksum: 4d481c720d523366d7762dc8a46a1b58967d979aacf786f9ceceb1cd767de069f64a4bdffb63956294f1c0696eb465ddb950f28ba90571709e33521b4bd75e07 + languageName: node + linkType: hard + +"uglify-es@npm:^3.1.9": + version: 3.3.9 + resolution: "uglify-es@npm:3.3.9" + dependencies: + commander: ~2.13.0 + source-map: ~0.6.1 + bin: + uglifyjs: bin/uglifyjs + checksum: f2de133ba71f05aca442db2c31a2f2614201e5b540948f022f5b53cd39b6b1b43a7db7cc2aa9917383bbb26e8043947fce35867cd1edcf2444854cb7fae0fa99 + languageName: node + linkType: hard + +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + has-bigints: ^1.0.2 + has-symbols: ^1.0.3 + which-boxed-primitive: ^1.0.2 + checksum: b7a1cf5862b5e4b5deb091672ffa579aa274f648410009c81cca63fed3b62b610c4f3b773f912ce545bb4e31edc3138975b5bc777fc6e4817dca51affb6380e9 + languageName: node + linkType: hard + +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + +"unicode-canonical-property-names-ecmascript@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" + checksum: 39be078afd014c14dcd957a7a46a60061bc37c4508ba146517f85f60361acf4c7539552645ece25de840e17e293baa5556268d091ca6762747fdd0c705001a45 + languageName: node + linkType: hard + +"unicode-match-property-ecmascript@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-match-property-ecmascript@npm:2.0.0" + dependencies: + unicode-canonical-property-names-ecmascript: ^2.0.0 + unicode-property-aliases-ecmascript: ^2.0.0 + checksum: 1f34a7434a23df4885b5890ac36c5b2161a809887000be560f56ad4b11126d433c0c1c39baf1016bdabed4ec54829a6190ee37aa24919aa116dc1a5a8a62965a + languageName: node + linkType: hard + +"unicode-match-property-value-ecmascript@npm:^2.1.0": + version: 2.1.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" + checksum: 8d6f5f586b9ce1ed0e84a37df6b42fdba1317a05b5df0c249962bd5da89528771e2d149837cad11aa26bcb84c35355cb9f58a10c3d41fa3b899181ece6c85220 + languageName: node + linkType: hard + +"unicode-property-aliases-ecmascript@npm:^2.0.0": + version: 2.1.0 + resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" + checksum: 243524431893649b62cc674d877bd64ef292d6071dd2fd01ab4d5ad26efbc104ffcd064f93f8a06b7e4ec54c172bf03f6417921a0d8c3a9994161fe1f88f815b + languageName: node + linkType: hard + +"unique-filename@npm:^1.1.1": + version: 1.1.1 + resolution: "unique-filename@npm:1.1.1" + dependencies: + unique-slug: ^2.0.0 + checksum: cf4998c9228cc7647ba7814e255dec51be43673903897b1786eff2ac2d670f54d4d733357eb08dea969aa5e6875d0e1bd391d668fbdb5a179744e7c7551a6f80 + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^2.0.0": + version: 2.0.2 + resolution: "unique-slug@npm:2.0.2" + dependencies: + imurmurhash: ^0.1.4 + checksum: 5b6876a645da08d505dedb970d1571f6cebdf87044cb6b740c8dbb24f0d6e1dc8bdbf46825fd09f994d7cf50760e6f6e063cfa197d51c5902c00a861702eb75a + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + +"unique-string@npm:^1.0.0": + version: 1.0.0 + resolution: "unique-string@npm:1.0.0" + dependencies: + crypto-random-string: ^1.0.0 + checksum: 588f16bd4ec99b5130f237793d1a5694156adde20460366726573238e41e93b739b87987e863792aeb2392b26f8afb292490ace119c82ed12c46816c9c859f5f + languageName: node + linkType: hard + +"unique-string@npm:^2.0.0": + version: 2.0.0 + resolution: "unique-string@npm:2.0.0" + dependencies: + crypto-random-string: ^2.0.0 + checksum: ef68f639136bcfe040cf7e3cd7a8dff076a665288122855148a6f7134092e6ed33bf83a7f3a9185e46c98dddc445a0da6ac25612afa1a7c38b8b654d6c02498e + languageName: node + linkType: hard + +"universalify@npm:^0.1.0": + version: 0.1.2 + resolution: "universalify@npm:0.1.2" + checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff + languageName: node + linkType: hard + +"universalify@npm:^0.2.0": + version: 0.2.0 + resolution: "universalify@npm:0.2.0" + checksum: e86134cb12919d177c2353196a4cc09981524ee87abf621f7bc8d249dbbbebaec5e7d1314b96061497981350df786e4c5128dbf442eba104d6e765bc260678b5 + languageName: node + linkType: hard + +"universalify@npm:^1.0.0": + version: 1.0.0 + resolution: "universalify@npm:1.0.0" + checksum: 095a808f2b915e3b89d29b6f3b4ee4163962b02fa5b7cb686970b8d0439f4ca789bc43f319b7cbb1ce552ae724e631d148e5aee9ce04c4f46a7fe0c5bbfd2b9e + languageName: node + linkType: hard + +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + languageName: node + linkType: hard + +"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": + version: 1.0.0 + resolution: "unpipe@npm:1.0.0" + checksum: 4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 + languageName: node + linkType: hard + +"untildify@npm:^4.0.0": + version: 4.0.0 + resolution: "untildify@npm:4.0.0" + checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.0.13": + version: 1.0.13 + resolution: "update-browserslist-db@npm:1.0.13" + dependencies: + escalade: ^3.1.1 + picocolors: ^1.0.0 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 1e47d80182ab6e4ad35396ad8b61008ae2a1330221175d0abd37689658bdb61af9b705bfc41057fd16682474d79944fb2d86767c5ed5ae34b6276b9bed353322 + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: ^2.1.0 + checksum: 7167432de6817fe8e9e0c9684f1d2de2bb688c94388f7569f7dbdb1587c9f4ca2a77962f134ec90be0cc4d004c939ff0d05acc9f34a0db39a3c797dada262633 + languageName: node + linkType: hard + +"url-join@npm:4.0.0": + version: 4.0.0 + resolution: "url-join@npm:4.0.0" + checksum: d2ac05f8ac276edbcd2b234745415abe27ef6b0c18c4d7a8e7f88fbafa1e9470912392b09391fb47f097f470d4c8b93bf2219b5638286852b2bf65d693e207ee + languageName: node + linkType: hard + +"url-parse@npm:^1.5.3, url-parse@npm:^1.5.9": + version: 1.5.10 + resolution: "url-parse@npm:1.5.10" + dependencies: + querystringify: ^2.1.1 + requires-port: ^1.0.0 + checksum: fbdba6b1d83336aca2216bbdc38ba658d9cfb8fc7f665eb8b17852de638ff7d1a162c198a8e4ed66001ddbf6c9888d41e4798912c62b4fd777a31657989f7bdf + languageName: node + linkType: hard + +"use-sync-external-store@npm:^1.0.0": + version: 1.2.0 + resolution: "use-sync-external-store@npm:1.2.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 5c639e0f8da3521d605f59ce5be9e094ca772bd44a4ce7322b055a6f58eeed8dda3c94cabd90c7a41fb6fa852210092008afe48f7038792fd47501f33299116a + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"utils-merge@npm:1.0.1": + version: 1.0.1 + resolution: "utils-merge@npm:1.0.1" + checksum: c81095493225ecfc28add49c106ca4f09cdf56bc66731aa8dabc2edbbccb1e1bfe2de6a115e5c6a380d3ea166d1636410b62ef216bb07b3feb1cfde1d95d5080 + languageName: node + linkType: hard + +"uuid@npm:^3.3.2, uuid@npm:^3.4.0": + version: 3.4.0 + resolution: "uuid@npm:3.4.0" + bin: + uuid: ./bin/uuid + checksum: 58de2feed61c59060b40f8203c0e4ed7fd6f99d42534a499f1741218a1dd0c129f4aa1de797bcf822c8ea5da7e4137aa3673431a96dae729047f7aca7b27866f + languageName: node + linkType: hard + +"uuid@npm:^7.0.3": + version: 7.0.3 + resolution: "uuid@npm:7.0.3" + bin: + uuid: dist/bin/uuid + checksum: f5b7b5cc28accac68d5c083fd51cca64896639ebd4cca88c6cfb363801aaa83aa439c86dfc8446ea250a7a98d17afd2ad9e88d9d4958c79a412eccb93bae29de + languageName: node + linkType: hard + +"uuid@npm:^8.0.0, uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 5575a8a75c13120e2f10e6ddc801b2c7ed7d8f3c8ac22c7ed0c7b2ba6383ec0abda88c905085d630e251719e0777045ae3236f04c812184b7c765f63a70e58df + languageName: node + linkType: hard + +"v8-compile-cache-lib@npm:^3.0.1": + version: 3.0.1 + resolution: "v8-compile-cache-lib@npm:3.0.1" + checksum: 78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0 + languageName: node + linkType: hard + +"v8-to-istanbul@npm:^9.0.1": + version: 9.2.0 + resolution: "v8-to-istanbul@npm:9.2.0" + dependencies: + "@jridgewell/trace-mapping": ^0.3.12 + "@types/istanbul-lib-coverage": ^2.0.1 + convert-source-map: ^2.0.0 + checksum: 31ef98c6a31b1dab6be024cf914f235408cd4c0dc56a5c744a5eea1a9e019ba279e1b6f90d695b78c3186feed391ed492380ccf095009e2eb91f3d058f0b4491 + languageName: node + linkType: hard + +"valid-url@npm:~1.0.9": + version: 1.0.9 + resolution: "valid-url@npm:1.0.9" + checksum: 3ecb030559404441c2cf104cbabab8770efb0f36d117db03d1081052ef133015a68806148ce954bb4dd0b5c42c14b709a88783c93d66b0916cb67ba771c98702 + languageName: node + linkType: hard + +"validate-npm-package-name@npm:^3.0.0": + version: 3.0.0 + resolution: "validate-npm-package-name@npm:3.0.0" + dependencies: + builtins: ^1.0.3 + checksum: ce4c68207abfb22c05eedb09ff97adbcedc80304a235a0844f5344f1fd5086aa80e4dbec5684d6094e26e35065277b765c1caef68bcea66b9056761eddb22967 + languageName: node + linkType: hard + +"vary@npm:~1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: ae0123222c6df65b437669d63dfa8c36cee20a504101b2fcd97b8bf76f91259c17f9f2b4d70a1e3c6bbcee7f51b28392833adb6b2770b23b01abec84e369660b + languageName: node + linkType: hard + +"vlq@npm:^1.0.0": + version: 1.0.1 + resolution: "vlq@npm:1.0.1" + checksum: 67ab6dd35c787eaa02c0ff1a869dd07a230db08722fb6014adaaf432634808ddb070765f70958b47997e438c331790cfcf20902411b0d6453f1a2a5923522f55 + languageName: node + linkType: hard + +"w3c-xmlserializer@npm:^4.0.0": + version: 4.0.0 + resolution: "w3c-xmlserializer@npm:4.0.0" + dependencies: + xml-name-validator: ^4.0.0 + checksum: eba070e78deb408ae8defa4d36b429f084b2b47a4741c4a9be3f27a0a3d1845e277e3072b04391a138f7e43776842627d1334e448ff13ff90ad9fb1214ee7091 + languageName: node + linkType: hard + +"walker@npm:^1.0.7, walker@npm:^1.0.8": + version: 1.0.8 + resolution: "walker@npm:1.0.8" + dependencies: + makeerror: 1.0.12 + checksum: ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c + languageName: node + linkType: hard + +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"webidl-conversions@npm:^7.0.0": + version: 7.0.0 + resolution: "webidl-conversions@npm:7.0.0" + checksum: f05588567a2a76428515333eff87200fae6c83c3948a7482ebb109562971e77ef6dc49749afa58abb993391227c5697b3ecca52018793e0cb4620a48f10bd21b + languageName: node + linkType: hard + +"whatwg-encoding@npm:^2.0.0": + version: 2.0.0 + resolution: "whatwg-encoding@npm:2.0.0" + dependencies: + iconv-lite: 0.6.3 + checksum: 7087810c410aa9b689cbd6af8773341a53cdc1f3aae2a882c163bd5522ec8ca4cdfc269aef417a5792f411807d5d77d50df4c24e3abb00bb60192858a40cc675 + languageName: node + linkType: hard + +"whatwg-fetch@npm:^3.0.0": + version: 3.6.20 + resolution: "whatwg-fetch@npm:3.6.20" + checksum: c58851ea2c4efe5c2235f13450f426824cf0253c1d45da28f45900290ae602a20aff2ab43346f16ec58917d5562e159cd691efa368354b2e82918c2146a519c5 + languageName: node + linkType: hard + +"whatwg-mimetype@npm:^3.0.0": + version: 3.0.0 + resolution: "whatwg-mimetype@npm:3.0.0" + checksum: ce08bbb36b6aaf64f3a84da89707e3e6a31e5ab1c1a2379fd68df79ba712a4ab090904f0b50e6693b0dafc8e6343a6157e40bf18fdffd26e513cf95ee2a59824 + languageName: node + linkType: hard + +"whatwg-url@npm:^11.0.0": + version: 11.0.0 + resolution: "whatwg-url@npm:11.0.0" + dependencies: + tr46: ^3.0.0 + webidl-conversions: ^7.0.0 + checksum: ed4826aaa57e66bb3488a4b25c9cd476c46ba96052747388b5801f137dd740b73fde91ad207d96baf9f17fbcc80fc1a477ad65181b5eb5fa718d27c69501d7af + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + +"which-boxed-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "which-boxed-primitive@npm:1.0.2" + dependencies: + is-bigint: ^1.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + is-symbol: ^1.0.3 + checksum: 53ce774c7379071729533922adcca47220228405e1895f26673bbd71bdf7fb09bee38c1d6399395927c6289476b5ae0629863427fd151491b71c4b6cb04f3a5e + languageName: node + linkType: hard + +"which-builtin-type@npm:^1.1.3": + version: 1.1.3 + resolution: "which-builtin-type@npm:1.1.3" + dependencies: + function.prototype.name: ^1.1.5 + has-tostringtag: ^1.0.0 + is-async-function: ^2.0.0 + is-date-object: ^1.0.5 + is-finalizationregistry: ^1.0.2 + is-generator-function: ^1.0.10 + is-regex: ^1.1.4 + is-weakref: ^1.0.2 + isarray: ^2.0.5 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.9 + checksum: 43730f7d8660ff9e33d1d3f9f9451c4784265ee7bf222babc35e61674a11a08e1c2925019d6c03154fcaaca4541df43abe35d2720843b9b4cbcebdcc31408f36 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.1": + version: 1.0.1 + resolution: "which-collection@npm:1.0.1" + dependencies: + is-map: ^2.0.1 + is-set: ^2.0.1 + is-weakmap: ^2.0.1 + is-weakset: ^2.0.1 + checksum: c815bbd163107ef9cb84f135e6f34453eaf4cca994e7ba85ddb0d27cea724c623fae2a473ceccfd5549c53cc65a5d82692de418166df3f858e1e5dc60818581c + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.9": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.4 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 + languageName: node + linkType: hard + +"which@npm:^1.2.9": + version: 1.3.1 + resolution: "which@npm:1.3.1" + dependencies: + isexe: ^2.0.0 + bin: + which: ./bin/which + checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04 + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: ^2.0.0 + bin: + node-which: ./bin/node-which + checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1 + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"wonka@npm:^4.0.14": + version: 4.0.15 + resolution: "wonka@npm:4.0.15" + checksum: afbee7359ed2d0a9146bf682f3953cb093f47d5f827e767e6ef33cb70ca6f30631afe5fe31dbb8d6c7eaed26c4ac6426e7c13568917c017ef6f42c71139b38f7 + languageName: node + linkType: hard + +"wonka@npm:^6.3.2": + version: 6.3.4 + resolution: "wonka@npm:6.3.4" + checksum: 6bb57955cb2982fb469a7824484e6854b436f89a7f10b6a981348789d88fbc944665771adc4cc404f62416417eb47ab2b8657d898e5301ccd4a53eaac6a10508 + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^2.3.0": + version: 2.4.3 + resolution: "write-file-atomic@npm:2.4.3" + dependencies: + graceful-fs: ^4.1.11 + imurmurhash: ^0.1.4 + signal-exit: ^3.0.2 + checksum: 2db81f92ae974fd87ab4a5e7932feacaca626679a7c98fcc73ad8fcea5a1950eab32fa831f79e9391ac99b562ca091ad49be37a79045bd65f595efbb8f4596ae + languageName: node + linkType: hard + +"write-file-atomic@npm:^4.0.2": + version: 4.0.2 + resolution: "write-file-atomic@npm:4.0.2" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^3.0.7 + checksum: 5da60bd4eeeb935eec97ead3df6e28e5917a6bd317478e4a85a5285e8480b8ed96032bbcc6ecd07b236142a24f3ca871c924ec4a6575e623ec1b11bf8c1c253c + languageName: node + linkType: hard + +"ws@npm:^6.2.2": + version: 6.2.2 + resolution: "ws@npm:6.2.2" + dependencies: + async-limiter: ~1.0.0 + checksum: aec3154ec51477c094ac2cb5946a156e17561a581fa27005cbf22c53ac57f8d4e5f791dd4bbba6a488602cb28778c8ab7df06251d590507c3c550fd8ebeee949 + languageName: node + linkType: hard + +"ws@npm:^7, ws@npm:^7.5.1": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + +"ws@npm:^8.11.0, ws@npm:^8.12.1": + version: 8.15.1 + resolution: "ws@npm:8.15.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b + languageName: node + linkType: hard + +"xcode@npm:^3.0.1": + version: 3.0.1 + resolution: "xcode@npm:3.0.1" + dependencies: + simple-plist: ^1.1.0 + uuid: ^7.0.3 + checksum: 908ff85851f81aec6e36ca24427db092e1cc068f052716e14de5e762196858039efabbe053a1abe8920184622501049e74a93618e8692b982f7604a9847db108 + languageName: node + linkType: hard + +"xml-name-validator@npm:^4.0.0": + version: 4.0.0 + resolution: "xml-name-validator@npm:4.0.0" + checksum: af100b79c29804f05fa35aa3683e29a321db9b9685d5e5febda3fa1e40f13f85abc40f45a6b2bf7bee33f68a1dc5e8eaef4cec100a304a9db565e6061d4cb5ad + languageName: node + linkType: hard + +"xml2js@npm:0.6.0": + version: 0.6.0 + resolution: "xml2js@npm:0.6.0" + dependencies: + sax: ">=0.6.0" + xmlbuilder: ~11.0.0 + checksum: 437f353fd66d367bf158e9555a0625df9965d944e499728a5c6bc92a54a2763179b144f14b7e1c725040f56bbd22b0fa6cfcb09ec4faf39c45ce01efe631f40b + languageName: node + linkType: hard + +"xmlbuilder@npm:^14.0.0": + version: 14.0.0 + resolution: "xmlbuilder@npm:14.0.0" + checksum: 9e93d3c73957dbb21acde63afa5d241b19057bdbdca9d53534d8351e70f1d5c9db154e3ca19bd3e9ea84c082539ab6e7845591c8778a663e8b5d3470d5427a8b + languageName: node + linkType: hard + +"xmlbuilder@npm:^15.1.1": + version: 15.1.1 + resolution: "xmlbuilder@npm:15.1.1" + checksum: 14f7302402e28d1f32823583d121594a9dca36408d40320b33f598bd589ca5163a352d076489c9c64d2dc1da19a790926a07bf4191275330d4de2b0d85bb1843 + languageName: node + linkType: hard + +"xmlbuilder@npm:~11.0.0": + version: 11.0.1 + resolution: "xmlbuilder@npm:11.0.1" + checksum: 7152695e16f1a9976658215abab27e55d08b1b97bca901d58b048d2b6e106b5af31efccbdecf9b07af37c8377d8e7e821b494af10b3a68b0ff4ae60331b415b0 + languageName: node + linkType: hard + +"xmlchars@npm:^2.2.0": + version: 2.2.0 + resolution: "xmlchars@npm:2.2.0" + checksum: 8c70ac94070ccca03f47a81fcce3b271bd1f37a591bf5424e787ae313fcb9c212f5f6786e1fa82076a2c632c0141552babcd85698c437506dfa6ae2d58723062 + languageName: node + linkType: hard + +"xtend@npm:~4.0.1": + version: 4.0.2 + resolution: "xtend@npm:4.0.2" + checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4 + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 54f0fb95621ee60898a38c572c515659e51cc9d9f787fb109cef6fde4befbe1c4602dc999d30110feee37456ad0f1660fa2edcfde6a9a740f86a290999550d30 + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5 + languageName: node + linkType: hard + +"yaml@npm:^2.2.1": + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: e6d1dae1c6383bcc8ba11796eef3b8c02d5082911c6723efeeb5ba50fc8e881df18d645e64de68e421b577296000bea9c75d6d9097c2f6699da3ae0406c030d8 + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c + languageName: node + linkType: hard + +"yargs@npm:^15.1.0": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard + +"yargs@npm:^17.3.1, yargs@npm:^17.6.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard From 56f6b4ce2dd65782fe67d56fd5ce730a75fee72f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 16 Dec 2023 19:27:41 -0600 Subject: [PATCH 018/368] Add build command --- examples/publish-ci/expo/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/publish-ci/expo/package.json b/examples/publish-ci/expo/package.json index d6ee7e9374..39f697b476 100644 --- a/examples/publish-ci/expo/package.json +++ b/examples/publish-ci/expo/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { + "build": "echo Done", "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", From dbe824e4647fc6a3ff9b11d52a552f62752f744c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 05:51:10 -0600 Subject: [PATCH 019/368] Modify build step --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 2bbc8e7233..88d4c726dc 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "echo Done", + "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd ..", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 91fd88faeb227a0d1a7ed0813ddd575eb98abc87 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 06:03:47 -0600 Subject: [PATCH 020/368] Modify `tests.yml` file --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d93ad371ce..2409635c10 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -183,6 +183,13 @@ jobs: - name: Show installed RTK versions run: yarn info @reduxjs/toolkit && yarn why @reduxjs/toolkit + - name: Set up JDK 17 for React Native build + if: matrix.example == 'react-native' + uses: actions/setup-java@v2 + with: + java-version: '17.x' + distribution: 'temurin' # AdoptOpenJDK Temurin distribution + - name: Build example run: NODE_OPTIONS=--openssl-legacy-provider yarn build From 8e93250e674240c8b83d98a0b74a46fcfa65b65a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 06:27:34 -0600 Subject: [PATCH 021/368] Try "react-native build-android" again --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 88d4c726dc..bda301438a 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd ..", + "build": "react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 50cf0388e82a629102e89b4fbdac71f4d4787eee Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 06:31:40 -0600 Subject: [PATCH 022/368] Fix permissions issue --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index bda301438a..e0737f206f 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "react-native build-android", + "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd .. && react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 25d9b2868a449b013468e8d19478b4e5364dfac0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 06:31:40 -0600 Subject: [PATCH 023/368] Fix permissions issue --- .github/workflows/tests.yml | 2 +- examples/publish-ci/react-native/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2409635c10..0e317036dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -188,7 +188,7 @@ jobs: uses: actions/setup-java@v2 with: java-version: '17.x' - distribution: 'temurin' # AdoptOpenJDK Temurin distribution + distribution: 'temurin' - name: Build example run: NODE_OPTIONS=--openssl-legacy-provider yarn build diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 88d4c726dc..e0737f206f 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd ..", + "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd .. && react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 8d25d6cea5a0c7d74e29f00b3e3b39bbab31e836 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 09:07:11 -0600 Subject: [PATCH 024/368] Generate `app.json` file --- examples/publish-ci/expo/app.json | 3 ++- examples/publish-ci/expo/package.json | 5 +++-- examples/publish-ci/expo/yarn.lock | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/publish-ci/expo/app.json b/examples/publish-ci/expo/app.json index 72424b2065..a61a97f8f5 100644 --- a/examples/publish-ci/expo/app.json +++ b/examples/publish-ci/expo/app.json @@ -21,7 +21,8 @@ "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#ffffff" - } + }, + "package": "com.anonymous.expotemplatereduxtypescript" }, "web": { "favicon": "./assets/favicon.png" diff --git a/examples/publish-ci/expo/package.json b/examples/publish-ci/expo/package.json index 39f697b476..3bd135e8d8 100644 --- a/examples/publish-ci/expo/package.json +++ b/examples/publish-ci/expo/package.json @@ -5,8 +5,8 @@ "scripts": { "build": "echo Done", "start": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web", "lint": "eslint .", "lint:fix": "eslint --fix .", @@ -17,6 +17,7 @@ "dependencies": { "@reduxjs/toolkit": "^2.0.1", "expo": "~49.0.15", + "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "react": "18.2.0", "react-native": "0.72.6", diff --git a/examples/publish-ci/expo/yarn.lock b/examples/publish-ci/expo/yarn.lock index d06307ddf1..ddee6d8984 100644 --- a/examples/publish-ci/expo/yarn.lock +++ b/examples/publish-ci/expo/yarn.lock @@ -6011,6 +6011,17 @@ __metadata: languageName: node linkType: hard +"expo-splash-screen@npm:~0.20.5": + version: 0.20.5 + resolution: "expo-splash-screen@npm:0.20.5" + dependencies: + "@expo/prebuild-config": 6.2.6 + peerDependencies: + expo: "*" + checksum: c4b0db3d0e8ab755a9f4afb1f20824229fa84ea2410528e4316a62e676e08f990157c9edd4af0978f79183d6b47cf3d4843b86f76c084274a40e07adfd697889 + languageName: node + linkType: hard + "expo-status-bar@npm:~1.6.0": version: 1.6.0 resolution: "expo-status-bar@npm:1.6.0" @@ -6035,6 +6046,7 @@ __metadata: eslint: ^8.56.0 eslint-plugin-prettier: ^5.0.1 expo: ~49.0.15 + expo-splash-screen: ~0.20.5 expo-status-bar: ~1.6.0 jest: ^29.7.0 jest-expo: ^49.0.0 From 50adeb85d4a15f75ba5ae0d926faf0ea46fc86d7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 09:07:53 -0600 Subject: [PATCH 025/368] Update `.gitignore` file --- examples/publish-ci/expo/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/publish-ci/expo/.gitignore b/examples/publish-ci/expo/.gitignore index 6265ed09f1..19ace634c7 100644 --- a/examples/publish-ci/expo/.gitignore +++ b/examples/publish-ci/expo/.gitignore @@ -16,6 +16,8 @@ web-build/ *.p12 *.key *.mobileprovision +android +ios # Metro .metro-health-check* From 5db59843870c5c0b6c94bdf43eb0cffed3f42805 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 09:08:52 -0600 Subject: [PATCH 026/368] Add build step to `package.json` --- examples/publish-ci/expo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/expo/package.json b/examples/publish-ci/expo/package.json index 3bd135e8d8..368944ef31 100644 --- a/examples/publish-ci/expo/package.json +++ b/examples/publish-ci/expo/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { - "build": "echo Done", + "build": "expo prebuild --clean -p android && cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd .. && react-native build-android", "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", From a93ccaa45ae758e74d16b830e02963b4c372aae0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 17 Dec 2023 09:12:44 -0600 Subject: [PATCH 027/368] Update `tests.yml` file --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa0470566c..e8738a3434 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -183,6 +183,13 @@ jobs: - name: Show installed RTK versions run: yarn info @reduxjs/toolkit && yarn why @reduxjs/toolkit + - name: Set up JDK 17 for React Native build + if: matrix.example == 'react-native' || matrix.example == 'expo' + uses: actions/setup-java@v2 + with: + java-version: '17.x' + distribution: 'temurin' + - name: Build example run: NODE_OPTIONS=--openssl-legacy-provider yarn build From 3a614dd1bfea59f1391c16e76217ffcb4f1c5f2e Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Mon, 18 Dec 2023 23:33:30 +0000 Subject: [PATCH 028/368] Add section re: RR custom context typing change --- docs/usage/migrating-rtk-2.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/usage/migrating-rtk-2.md b/docs/usage/migrating-rtk-2.md index 626b70d27f..cc6152f7f3 100644 --- a/docs/usage/migrating-rtk-2.md +++ b/docs/usage/migrating-rtk-2.md @@ -438,6 +438,38 @@ React-Redux v7 and v8 worked with all versions of React that supported hooks (16 **React-Redux v9 switches to _requiring_ React 18, and does _not_ support React 16 or 17**. This allows us to drop the shim and save a small bit of bundle size. +

+ +#### Custom context typing + +React Redux supports creating `hooks` (and `connect`) with a [custom context](https://react-redux.js.org/api/hooks#custom-context), but typing this has been fairly non-standard. The pre-v9 types required `Context`, but the context default value was usually initialised with `null` (as the hooks use this to make sure they actually have a provided context). This, in "best" cases, would result in something like the below: + +```ts title="Pre-v9 custom context" +import { createContext } from 'react' +import { ReactReduxContextValue, createDispatchHook } from 'react-redux' + +// highlight-next-line +const context = createContext(null as any) + +const useDispatch = createDispatchHook(context) +``` + +In v9, the types now match the runtime behaviour. The context is typed to hold `ReactReduxContextValue | null`, and the hooks know that if they receive `null` they'll throw an error so it doesn't affect the return type. + +The above example now becomes: + +```ts title="v9+ custom context" +import { createContext } from 'react' +import { ReactReduxContextValue, createDispatchHook } from 'react-redux' + +// highlight-next-line +const context = createContext(null) + +const useDispatch = createDispatchHook(context) +``` + +
+ ### Redux Thunk #### Thunk Uses Named Exports From 1f9deb2dbbe10687a22744714b3b3ecbf52044d2 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Mon, 18 Dec 2023 23:51:53 +0000 Subject: [PATCH 029/368] give examples of typing other hooks --- docs/usage/migrating-rtk-2.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/usage/migrating-rtk-2.md b/docs/usage/migrating-rtk-2.md index cc6152f7f3..deacc89922 100644 --- a/docs/usage/migrating-rtk-2.md +++ b/docs/usage/migrating-rtk-2.md @@ -446,12 +446,22 @@ React Redux supports creating `hooks` (and `connect`) with a [custom context](ht ```ts title="Pre-v9 custom context" import { createContext } from 'react' -import { ReactReduxContextValue, createDispatchHook } from 'react-redux' +import { + ReactReduxContextValue, + TypedUseSelectorHook, + createDispatchHook, + createSelectorHook, + createStoreHook, +} from 'react-redux' +import { AppStore, RootState, AppDispatch } from './store' // highlight-next-line const context = createContext(null as any) -const useDispatch = createDispatchHook(context) +export const useStore: () => AppStore = createStoreHook(context) +export const useDispatch: () => AppDispatch = createDispatchHook(context) +export const useSelector: TypedUseSelectorHook = + createSelectorHook(context) ``` In v9, the types now match the runtime behaviour. The context is typed to hold `ReactReduxContextValue | null`, and the hooks know that if they receive `null` they'll throw an error so it doesn't affect the return type. @@ -460,12 +470,22 @@ The above example now becomes: ```ts title="v9+ custom context" import { createContext } from 'react' -import { ReactReduxContextValue, createDispatchHook } from 'react-redux' +import { + ReactReduxContextValue, + TypedUseSelectorHook, + createDispatchHook, + createSelectorHook, + createStoreHook, +} from 'react-redux' +import { AppStore, RootState, AppDispatch } from './store' // highlight-next-line const context = createContext(null) -const useDispatch = createDispatchHook(context) +export const useStore: () => AppStore = createStoreHook(context) +export const useDispatch: () => AppDispatch = createDispatchHook(context) +export const useSelector: TypedUseSelectorHook = + createSelectorHook(context) ``` From af2d15d5b7cc78ce7d68118e62b2c2b54af8da62 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 23 Dec 2023 11:11:06 +0000 Subject: [PATCH 030/368] Preserve nullable store state type by avoiding intersection with {} --- packages/toolkit/src/configureStore.ts | 4 +++- .../toolkit/src/tests/configureStore.typetest.ts | 13 ++++++++++++- packages/toolkit/src/tsHelpers.ts | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/configureStore.ts b/packages/toolkit/src/configureStore.ts index 93bf59017a..e1b1a491e1 100644 --- a/packages/toolkit/src/configureStore.ts +++ b/packages/toolkit/src/configureStore.ts @@ -26,6 +26,7 @@ import type { ExtractDispatchExtensions, ExtractStoreExtensions, ExtractStateExtensions, + UnknownIfNonSpecific, } from './tsHelpers' import type { Tuple } from './utils' import type { GetDefaultEnhancers } from './getDefaultEnhancers' @@ -103,7 +104,8 @@ export type EnhancedStore< S = any, A extends Action = UnknownAction, E extends Enhancers = Enhancers -> = ExtractStoreExtensions & Store, A> +> = ExtractStoreExtensions & + Store>> /** * A friendly abstraction over the standard Redux `createStore()` function. diff --git a/packages/toolkit/src/tests/configureStore.typetest.ts b/packages/toolkit/src/tests/configureStore.typetest.ts index d141f85df2..041f1141a9 100644 --- a/packages/toolkit/src/tests/configureStore.typetest.ts +++ b/packages/toolkit/src/tests/configureStore.typetest.ts @@ -13,7 +13,7 @@ import type { PayloadAction, ConfigureStoreOptions } from '@reduxjs/toolkit' import { configureStore, createSlice, Tuple } from '@reduxjs/toolkit' import type { ThunkMiddleware, ThunkAction, ThunkDispatch } from 'redux-thunk' import { thunk } from 'redux-thunk' -import { expectNotAny, expectType } from './helpers' +import { expectExactType, expectNotAny, expectType } from './helpers' const _anyMiddleware: any = () => () => () => {} @@ -138,6 +138,17 @@ const _anyMiddleware: any = () => () => () => {} }) } +/** + * Test: nullable state is preserved + */ + +{ + const store = configureStore({ + reducer: (): string | null => null, + }) + expectExactType(null)(store.getState()) +} + /* * Test: configureStore() accepts store Tuple, but not plain array */ diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index f0ed92a6e1..bd42de858e 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -205,3 +205,5 @@ export type Id = { [K in keyof T]: T[K] } & {} export type Tail = T extends [any, ...infer Tail] ? Tail : never + +export type UnknownIfNonSpecific = {} extends T ? unknown : T From 6c45d3202c885f47c5b86dc1fc46aff93f28b9b0 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 23 Dec 2023 11:15:36 +0000 Subject: [PATCH 031/368] temporarily use build from PR to prove it works --- packages/toolkit/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 0d4f383f14..baf10b6f5f 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -112,7 +112,7 @@ ], "dependencies": { "immer": "^10.0.3", - "redux": "^5.0.0", + "redux": "https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz", "redux-thunk": "^3.1.0", "reselect": "^5.0.1" }, diff --git a/yarn.lock b/yarn.lock index aa0d44b25a..94411f0d04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7075,7 +7075,7 @@ __metadata: node-fetch: ^2.6.1 prettier: ^2.2.1 query-string: ^7.0.1 - redux: ^5.0.0 + redux: "https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz" redux-thunk: ^3.1.0 reselect: ^5.0.1 rimraf: ^3.0.2 @@ -25134,6 +25134,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"redux@https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz": + version: 5.0.0 + resolution: "redux@https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz" + checksum: 9ea2a3a8b387e6c299bd5ac4ec5b26f207ff368546c8a5c226655e57476ee5f87f52724ab2427f31e87e6cdc21566e8132f1dce1db2f5d2003b85d822c350cdc + languageName: node + linkType: hard + "redux@npm:^4.1.2": version: 4.1.2 resolution: "redux@npm:4.1.2" @@ -25152,13 +25159,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"redux@npm:^5.0.0": - version: 5.0.0 - resolution: "redux@npm:5.0.0" - checksum: be49160d4bd01e10108c425ade999f1b456204895c4bdd0c7825ab09efffded51955c5c242847406a7b3f273e9011a9c102848c512a099a75617b97b13d2cca8 - languageName: node - linkType: hard - "reftools@npm:^1.1.9": version: 1.1.9 resolution: "reftools@npm:1.1.9" From cf7dd4302b54dd35caab2d539455eeca1a9c06cb Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 23 Dec 2023 16:56:31 +0000 Subject: [PATCH 032/368] bump to redux 5.0.1 --- packages/toolkit/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index baf10b6f5f..073b7541a1 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -112,7 +112,7 @@ ], "dependencies": { "immer": "^10.0.3", - "redux": "https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz", + "redux": "^5.0.1", "redux-thunk": "^3.1.0", "reselect": "^5.0.1" }, diff --git a/yarn.lock b/yarn.lock index 94411f0d04..e4e1afe60b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7075,7 +7075,7 @@ __metadata: node-fetch: ^2.6.1 prettier: ^2.2.1 query-string: ^7.0.1 - redux: "https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz" + redux: ^5.0.1 redux-thunk: ^3.1.0 reselect: ^5.0.1 rimraf: ^3.0.2 @@ -25134,13 +25134,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"redux@https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz": - version: 5.0.0 - resolution: "redux@https://pkg.csb.dev/reduxjs/redux/commit/3e9e484f/redux/_pkg.tgz" - checksum: 9ea2a3a8b387e6c299bd5ac4ec5b26f207ff368546c8a5c226655e57476ee5f87f52724ab2427f31e87e6cdc21566e8132f1dce1db2f5d2003b85d822c350cdc - languageName: node - linkType: hard - "redux@npm:^4.1.2": version: 4.1.2 resolution: "redux@npm:4.1.2" @@ -25159,6 +25152,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"redux@npm:^5.0.1": + version: 5.0.1 + resolution: "redux@npm:5.0.1" + checksum: e74affa9009dd5d994878b9a1ce30d6569d986117175056edb003de2651c05b10fe7819d6fa94aea1a94de9a82f252f986547f007a2fbeb35c317a2e5f5ecf2c + languageName: node + linkType: hard + "reftools@npm:^1.1.9": version: 1.1.9 resolution: "reftools@npm:1.1.9" From 69d9a1d892a6020ccb0a2feddc5c6254cbe12a41 Mon Sep 17 00:00:00 2001 From: fatihgenc Date: Sun, 24 Dec 2023 00:08:23 +0300 Subject: [PATCH 033/368] docs: fix a typo in queries markdown file --- docs/rtk-query/usage/queries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rtk-query/usage/queries.mdx b/docs/rtk-query/usage/queries.mdx index 958b979adb..1eca72047e 100644 --- a/docs/rtk-query/usage/queries.mdx +++ b/docs/rtk-query/usage/queries.mdx @@ -273,7 +273,7 @@ function PostsList({ userName }: { userName: string }) { ### Query Cache Keys -When you perform a query, RTK Query automatically serializes the request parameters and creates an internal `queryCacheKey` for the request. Any future request that produces the same `queryCacheKey` will be de-duped against the original, and will share updates if a `refetch` is trigged on the query from any subscribed component. +When you perform a query, RTK Query automatically serializes the request parameters and creates an internal `queryCacheKey` for the request. Any future request that produces the same `queryCacheKey` will be de-duped against the original, and will share updates if a `refetch` is triggered on the query from any subscribed component. ### Selecting data from a query result From 0d1f7101e83865714cb512c850bc53ffaee2d5e5 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 23 Dec 2023 21:29:35 +0000 Subject: [PATCH 034/368] Release v2.0.2 --- packages/toolkit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 073b7541a1..d85de9a3d7 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@reduxjs/toolkit", - "version": "2.0.1", + "version": "2.0.2", "description": "The official, opinionated, batteries-included toolset for efficient Redux development", "author": "Mark Erikson ", "license": "MIT", From 6d6346c86c5eac5f93fb796f0885649bf5ec26e9 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sun, 31 Dec 2023 23:27:40 +0100 Subject: [PATCH 035/368] Upgrade version of "graphql-request" (#4026) * Upgrade version of "graphql-request" Upgrading the version of "graphql-request" to use the latest. This is not only to get onto the latest version of the package, but also to remove an internal bug to that can surface from it. In this case, there are duplicate `AbortSignal` types, one defined by the Typescript language, and one defined by the package. This update removes this conflict. * allow more versions --------- Co-authored-by: Donovan Hoffman --- .../package.json | 2 +- yarn.lock | 47 +++++++++++++++---- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index 34be5c5b84..5386769001 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -19,7 +19,7 @@ "dev": "microbundle watch" }, "dependencies": { - "graphql-request": "^4.0.0" + "graphql-request": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "peerDependencies": { "@reduxjs/toolkit": "^1.7.1", diff --git a/yarn.lock b/yarn.lock index e4e1afe60b..94868c7770 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5813,6 +5813,15 @@ __metadata: languageName: node linkType: hard +"@graphql-typed-document-node/core@npm:^3.2.0": + version: 3.2.0 + resolution: "@graphql-typed-document-node/core@npm:3.2.0" + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d + languageName: node + linkType: hard + "@handlebars/parser@npm:^1.1.0": version: 1.1.0 resolution: "@handlebars/parser@npm:1.1.0" @@ -7240,7 +7249,7 @@ __metadata: dependencies: "@reduxjs/toolkit": ^1.6.0 graphql: ^16.5.0 - graphql-request: ^4.0.0 + graphql-request: ^4.0.0 || ^5.0.0 || ^6.0.0 microbundle: ^0.13.3 rimraf: ^3.0.2 typescript: ^4.3.4 @@ -12652,6 +12661,15 @@ __metadata: languageName: node linkType: hard +"cross-fetch@npm:^3.1.5": + version: 3.1.6 + resolution: "cross-fetch@npm:3.1.6" + dependencies: + node-fetch: ^2.6.11 + checksum: 704b3519ab7de488328cc49a52cf1aa14132ec748382be5b9557b22398c33ffa7f8c2530e8a97ed8cb55da52b0a9740a9791d361271c4591910501682d981d9c + languageName: node + linkType: hard + "cross-spawn@npm:^6.0.0": version: 6.0.5 resolution: "cross-spawn@npm:6.0.5" @@ -16429,16 +16447,15 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-request@npm:^4.0.0": - version: 4.0.0 - resolution: "graphql-request@npm:4.0.0" +"graphql-request@npm:^4.0.0 || ^5.0.0 || ^6.0.0": + version: 6.1.0 + resolution: "graphql-request@npm:6.1.0" dependencies: - cross-fetch: ^3.0.6 - extract-files: ^9.0.0 - form-data: ^3.0.0 + "@graphql-typed-document-node/core": ^3.2.0 + cross-fetch: ^3.1.5 peerDependencies: graphql: 14 - 16 - checksum: 0d16c7f06360679c022faaa19554c2693e200263beae0dec920b0668f6c48b0d08de6e1155a50a050283a58a878b29b04db129a2d932a645bfadbe8d55530243 + checksum: 6d62630a0169574442320651c1f7626c0c602025c3c46b19e09417c9579bb209306ee63de9793a03be2e1701bb7f13971f8545d99bc6573e340f823af0ad35b2 languageName: node linkType: hard @@ -21430,6 +21447,20 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-fetch@npm:^2.6.11": + version: 2.6.11 + resolution: "node-fetch@npm:2.6.11" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 249d0666a9497553384d46b5ab296ba223521ac88fed4d8a17d6ee6c2efb0fc890f3e8091cafe7f9fba8151a5b8d925db2671543b3409a56c3cd522b468b47b3 + languageName: node + linkType: hard + "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" From 5ceb347ba49e5670abc376e681255790499b8189 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sun, 31 Dec 2023 23:33:32 +0100 Subject: [PATCH 036/368] [rtk-query-graphql-request-base-query] update RTK peerDependency (#4027) --- .../package.json | 2 +- yarn.lock | 84 +++++++++---------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index 5386769001..21d07aa2c0 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -26,7 +26,7 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { - "@reduxjs/toolkit": "^1.6.0", + "@reduxjs/toolkit": "^1.6.0 || ^2.0.0", "graphql": "^16.5.0", "microbundle": "^0.13.3", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 94868c7770..c92c07b06c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7004,47 +7004,7 @@ __metadata: languageName: unknown linkType: soft -"@reduxjs/toolkit@npm:1.8.1": - version: 1.8.1 - resolution: "@reduxjs/toolkit@npm:1.8.1" - dependencies: - immer: ^9.0.7 - redux: ^4.1.2 - redux-thunk: ^2.4.1 - reselect: ^4.1.5 - peerDependencies: - react: ^16.9.0 || ^17.0.0 || ^18 - react-redux: ^7.2.1 || ^8.0.0-beta - peerDependenciesMeta: - react: - optional: true - react-redux: - optional: true - checksum: be5cdea975a8a631fe2d88cafc7077554c7bc3621a4a7031556cc17e5dec26359018f2614c325895e7ab50865f5c511025d1e589ca01de7e2bd88d95e0a1a963 - languageName: node - linkType: hard - -"@reduxjs/toolkit@npm:^1.6.0, @reduxjs/toolkit@npm:^1.6.0-rc.1, @reduxjs/toolkit@npm:^1.8.0": - version: 1.9.1 - resolution: "@reduxjs/toolkit@npm:1.9.1" - dependencies: - immer: ^9.0.16 - redux: ^4.2.0 - redux-thunk: ^2.4.2 - reselect: ^4.1.7 - peerDependencies: - react: ^16.9.0 || ^17.0.0 || ^18 - react-redux: ^7.2.1 || ^8.0.2 - peerDependenciesMeta: - react: - optional: true - react-redux: - optional: true - checksum: e6700a0d45198ab525c96ff0425fa0125fbdc37ce514f0c77c30225837113279ceec9190ac3da35cb20e77553e56342021788bbf17465819068c4db34cb3d87f - languageName: node - linkType: hard - -"@reduxjs/toolkit@workspace:packages/toolkit": +"@reduxjs/toolkit@^1.6.0 || ^2.0.0, @reduxjs/toolkit@workspace:packages/toolkit": version: 0.0.0-use.local resolution: "@reduxjs/toolkit@workspace:packages/toolkit" dependencies: @@ -7106,6 +7066,46 @@ __metadata: languageName: unknown linkType: soft +"@reduxjs/toolkit@npm:1.8.1": + version: 1.8.1 + resolution: "@reduxjs/toolkit@npm:1.8.1" + dependencies: + immer: ^9.0.7 + redux: ^4.1.2 + redux-thunk: ^2.4.1 + reselect: ^4.1.5 + peerDependencies: + react: ^16.9.0 || ^17.0.0 || ^18 + react-redux: ^7.2.1 || ^8.0.0-beta + peerDependenciesMeta: + react: + optional: true + react-redux: + optional: true + checksum: be5cdea975a8a631fe2d88cafc7077554c7bc3621a4a7031556cc17e5dec26359018f2614c325895e7ab50865f5c511025d1e589ca01de7e2bd88d95e0a1a963 + languageName: node + linkType: hard + +"@reduxjs/toolkit@npm:^1.6.0, @reduxjs/toolkit@npm:^1.6.0-rc.1, @reduxjs/toolkit@npm:^1.8.0": + version: 1.9.1 + resolution: "@reduxjs/toolkit@npm:1.9.1" + dependencies: + immer: ^9.0.16 + redux: ^4.2.0 + redux-thunk: ^2.4.2 + reselect: ^4.1.7 + peerDependencies: + react: ^16.9.0 || ^17.0.0 || ^18 + react-redux: ^7.2.1 || ^8.0.2 + peerDependenciesMeta: + react: + optional: true + react-redux: + optional: true + checksum: e6700a0d45198ab525c96ff0425fa0125fbdc37ce514f0c77c30225837113279ceec9190ac3da35cb20e77553e56342021788bbf17465819068c4db34cb3d87f + languageName: node + linkType: hard + "@rollup/plugin-alias@npm:^3.1.1": version: 3.1.2 resolution: "@rollup/plugin-alias@npm:3.1.2" @@ -7247,7 +7247,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rtk-query/graphql-request-base-query@workspace:packages/rtk-query-graphql-request-base-query" dependencies: - "@reduxjs/toolkit": ^1.6.0 + "@reduxjs/toolkit": ^1.6.0 || ^2.0.0 graphql: ^16.5.0 graphql-request: ^4.0.0 || ^5.0.0 || ^6.0.0 microbundle: ^0.13.3 From ce724d893291dae86075e8bbbae34a93e392bf5a Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sun, 31 Dec 2023 23:35:47 +0100 Subject: [PATCH 037/368] bump graphql base query version to 2.3.0 --- packages/rtk-query-graphql-request-base-query/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index 21d07aa2c0..a32450a0a0 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -1,6 +1,6 @@ { "name": "@rtk-query/graphql-request-base-query", - "version": "2.2.0", + "version": "2.3.0", "author": { "name": "Lenz Weber", "email": "mail@phryneas.de", From e773cba789598e39275cd4c59c2b2fac92b6996e Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sat, 30 Dec 2023 12:00:10 +0100 Subject: [PATCH 038/368] add empty "test" script for CI --- packages/rtk-query-graphql-request-base-query/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index a32450a0a0..7727f37844 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -16,7 +16,8 @@ "scripts": { "build": "microbundle", "prepack": "rimraf dist/*; yarn build", - "dev": "microbundle watch" + "dev": "microbundle watch", + "test": "true" }, "dependencies": { "graphql-request": "^4.0.0 || ^5.0.0 || ^6.0.0" From 8e0942ea2c35ed00b40cb12155257d5eb50d844c Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sat, 30 Dec 2023 12:08:28 +0100 Subject: [PATCH 039/368] add repository url for provenance --- packages/rtk-query-graphql-request-base-query/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index 7727f37844..9f9370ae8c 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -7,6 +7,10 @@ "url": "https://phryneas.de/" }, "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/reduxjs/redux-toolkit.git" + }, "type": "module", "source": "src/index.ts", "main": "./dist/index.cjs", From 924b38439b7930796a4e90e3b9a337c4595f45b6 Mon Sep 17 00:00:00 2001 From: Jeremiah Otoya Date: Mon, 1 Jan 2024 10:26:33 -0800 Subject: [PATCH 040/368] fix: improve selectFromResult memoization (#4029) * use a slice instead of a hand-written reducer * add test for unnecessary selectFromResult renders * improve memoization of selectFromResult * streamline test a bit --------- Co-authored-by: Lenz Weber-Tronic Co-authored-by: Jeremiah Montoya --- .../toolkit/src/query/react/buildHooks.ts | 7 ++- .../src/query/tests/buildHooks.test.tsx | 62 ++++++++++++++++++- 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 456275affc..cd69763b65 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -915,7 +915,12 @@ export function buildHooks({ (_: ApiRootState, lastResult: any) => lastResult, (_: ApiRootState) => stableArg, ], - queryStatePreSelector + queryStatePreSelector, + { + memoizeOptions: { + resultEqualityCheck: shallowEqual, + }, + } ), [select, stableArg] ) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index d10d156514..e9f1f1ac90 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -35,7 +35,7 @@ import { server } from './mocks/server' import type { UnknownAction } from 'redux' import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import type { SerializedError } from '@reduxjs/toolkit' -import { createListenerMiddleware, configureStore } from '@reduxjs/toolkit' +import { createListenerMiddleware, configureStore, createSlice } from '@reduxjs/toolkit' import { delay } from '../../utils' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' import { countObjectKeys } from '../utils/countObjectKeys' @@ -2052,7 +2052,19 @@ describe('hooks with createApi defaults set', () => { }), }) - const storeRef = setupApiStore(api) + const counterSlice = createSlice({ + name: "counter", + initialState: { count: 0 }, + reducers: { + increment(state) { + state.count++ + } + } + }) + + const storeRef = setupApiStore(api, { + counter: counterSlice.reducer, + }) expectExactType(api.useGetPostsQuery)(api.endpoints.getPosts.useQuery) expectExactType(api.useUpdatePostMutation)( @@ -2317,6 +2329,52 @@ describe('hooks with createApi defaults set', () => { await waitFor(() => expect(getRenderCount()).toBe(3)) }) + test('useQuery with selectFromResult option does not update when unrelated data in the store changes', async () => { + function Posts() { + const { posts } = api.endpoints.getPosts.useQuery(undefined, { + selectFromResult: ({ data }) => ({ + // Intentionally use an unstable reference to force a rerender + posts: data?.filter((post) => post.name.includes('post')), + }), + }) + + getRenderCount = useRenderCounter() + + return ( +
+ {posts?.map((post) => ( +
{post.name}
+ ))} +
+ ) + } + + function CounterButton() { + return ( +
storeRef.store.dispatch(counterSlice.actions.increment())} + > + Increment Count +
+ ) + } + + render( +
+ + +
, + { wrapper: storeRef.wrapper } + ) + + await waitFor(() => expect(getRenderCount()).toBe(2)) + + const incrementBtn = screen.getByTestId('incrementButton') + fireEvent.click(incrementBtn) + expect(getRenderCount()).toBe(2) + }) + test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { const _res1 = api.endpoints.getPosts.useQuery(undefined, { From a10e10f7c28eec7594951dbf68a28af2a73d7779 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Sun, 31 Dec 2023 08:05:19 +0100 Subject: [PATCH 041/368] actually bump peerDependency bump version --- packages/rtk-query-graphql-request-base-query/package.json | 4 ++-- yarn.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rtk-query-graphql-request-base-query/package.json b/packages/rtk-query-graphql-request-base-query/package.json index 9f9370ae8c..d3f5301089 100644 --- a/packages/rtk-query-graphql-request-base-query/package.json +++ b/packages/rtk-query-graphql-request-base-query/package.json @@ -1,6 +1,6 @@ { "name": "@rtk-query/graphql-request-base-query", - "version": "2.3.0", + "version": "2.3.1", "author": { "name": "Lenz Weber", "email": "mail@phryneas.de", @@ -27,7 +27,7 @@ "graphql-request": "^4.0.0 || ^5.0.0 || ^6.0.0" }, "peerDependencies": { - "@reduxjs/toolkit": "^1.7.1", + "@reduxjs/toolkit": "^1.7.1 || ^2.0.0", "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index c92c07b06c..7e37c72741 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7254,7 +7254,7 @@ __metadata: rimraf: ^3.0.2 typescript: ^4.3.4 peerDependencies: - "@reduxjs/toolkit": ^1.7.1 + "@reduxjs/toolkit": ^1.7.1 || ^2.0.0 graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 languageName: unknown linkType: soft From ac71183ca10b3ae187fee6e76498b9c075dfee0f Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 2 Jan 2024 23:53:54 +0000 Subject: [PATCH 042/368] bump the codemod package --- packages/rtk-codemods/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 211f56278c..54edff8696 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -1,6 +1,6 @@ { "name": "@reduxjs/rtk-codemods", - "version": "0.0.3", + "version": "0.1.0", "scripts": { "lint": "eslint --cache .", "test": "vitest", From f3748d982bae9c14db087c6d6ec5e14db0111800 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 2 Jan 2024 23:56:37 +0000 Subject: [PATCH 043/368] add repository information to codemod package --- packages/rtk-codemods/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 54edff8696..a8ac4a2acb 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -39,5 +39,9 @@ }, "publishConfig": { "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/reduxjs/redux-toolkit.git" } } From 0b9fdccfffddd713998b4354d18c65d9dbd1986b Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Wed, 3 Jan 2024 17:57:50 +0000 Subject: [PATCH 044/368] Rename "createSliceWithThunks" and "createThunkSlice" to "createAppSlice" --- docs/api/createSlice.mdx | 5 ++--- docs/usage/migrating-rtk-2.md | 4 ++-- packages/toolkit/src/tests/createSlice.test.ts | 10 +++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/api/createSlice.mdx b/docs/api/createSlice.mdx index 53b01a1e4a..45786f3d51 100644 --- a/docs/api/createSlice.mdx +++ b/docs/api/createSlice.mdx @@ -251,13 +251,12 @@ Instead, import `buildCreateSlice` and `asyncThunkCreator`, and create your own ```ts import { buildCreateSlice, asyncThunkCreator } from '@reduxjs/toolkit' -// name is up to you -export const createSliceWithThunks = buildCreateSlice({ +export const createAppSlice = buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator }, }) ``` -Then import this `createSlice` as needed instead of the exported version from RTK. +Then import this `createAppSlice` as needed instead of the exported version from RTK. ::: diff --git a/docs/usage/migrating-rtk-2.md b/docs/usage/migrating-rtk-2.md index deacc89922..b537ec9d41 100644 --- a/docs/usage/migrating-rtk-2.md +++ b/docs/usage/migrating-rtk-2.md @@ -657,11 +657,11 @@ In practice, we hope these are reasonable tradeoffs. Creating thunks inside of ` Here's what the new callback syntax looks like: ```ts -const createSliceWithThunks = buildCreateSlice({ +const createAppSlice = buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator }, }) -const todosSlice = createSliceWithThunks({ +const todosSlice = createAppSlice({ name: 'todos', initialState: { loading: false, diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 6540464d28..d71bcc2f25 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -590,7 +590,7 @@ describe('createSlice', () => { '"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`."' ) }) - const createThunkSlice = buildCreateSlice({ + const createAppSlice = buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator }, }) function pending(state: any[], action: any) { @@ -607,7 +607,7 @@ describe('createSlice', () => { } test('successful thunk', async () => { - const slice = createThunkSlice({ + const slice = createAppSlice({ name: 'test', initialState: [] as any[], reducers: (create) => ({ @@ -650,7 +650,7 @@ describe('createSlice', () => { }) test('rejected thunk', async () => { - const slice = createThunkSlice({ + const slice = createAppSlice({ name: 'test', initialState: [] as any[], reducers: (create) => ({ @@ -694,7 +694,7 @@ describe('createSlice', () => { }) test('with options', async () => { - const slice = createThunkSlice({ + const slice = createAppSlice({ name: 'test', initialState: [] as any[], reducers: (create) => ({ @@ -743,7 +743,7 @@ describe('createSlice', () => { }) test('has caseReducers for the asyncThunk', async () => { - const slice = createThunkSlice({ + const slice = createAppSlice({ name: 'test', initialState: [], reducers: (create) => ({ From 3fc7d631ff87ac27bc63ac3c19fe95f027e97060 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 16:44:57 -0600 Subject: [PATCH 045/368] Initial implementation of `listenerMiddleware.withTypes` --- .../toolkit/src/listenerMiddleware/index.ts | 158 ++++++++++-------- .../tests/listenerMiddleware.test-d.ts | 95 +++++++++++ .../tests/listenerMiddleware.test.ts | 1 + .../toolkit/src/listenerMiddleware/types.ts | 150 ++++++++++++----- 4 files changed, 285 insertions(+), 119 deletions(-) create mode 100644 packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts diff --git a/packages/toolkit/src/listenerMiddleware/index.ts b/packages/toolkit/src/listenerMiddleware/index.ts index 94f43e4628..619029c831 100644 --- a/packages/toolkit/src/listenerMiddleware/index.ts +++ b/packages/toolkit/src/listenerMiddleware/index.ts @@ -4,27 +4,42 @@ import type { ThunkDispatch } from 'redux-thunk' import { createAction } from '../createAction' import { nanoid } from '../nanoid' +import { find } from '../utils' +import { + TaskAbortError, + listenerCancelled, + listenerCompleted, + taskCancelled, + taskCompleted, +} from './exceptions' +import { + createDelay, + createPause, + raceWithSignal, + runTask, + validateActive, +} from './task' import type { - ListenerMiddleware, - ListenerMiddlewareInstance, + AbortSignalWithReason, AddListenerOverloads, AnyListenerPredicate, CreateListenerMiddlewareOptions, - TypedAddListener, - TypedCreateListenerEntry, FallbackAddListenerOptions, + ForkOptions, + ForkedTask, + ForkedTaskExecutor, ListenerEntry, ListenerErrorHandler, - UnsubscribeListener, - TakePattern, ListenerErrorInfo, - ForkedTaskExecutor, - ForkedTask, - TypedRemoveListener, + ListenerMiddleware, + ListenerMiddlewareInstance, + TakePattern, TaskResult, - AbortSignalWithReason, + TypedAddListener, + TypedCreateListenerEntry, + TypedRemoveListener, + UnsubscribeListener, UnsubscribeListenerOptions, - ForkOptions, } from './types' import { abortControllerWithReason, @@ -32,44 +47,29 @@ import { assertFunction, catchRejection, } from './utils' -import { - listenerCancelled, - listenerCompleted, - TaskAbortError, - taskCancelled, - taskCompleted, -} from './exceptions' -import { - runTask, - validateActive, - createPause, - createDelay, - raceWithSignal, -} from './task' -import { find } from '../utils' export { TaskAbortError } from './exceptions' export type { - ListenerEffect, - ListenerMiddleware, - ListenerEffectAPI, - ListenerMiddlewareInstance, + AsyncTaskExecutor, CreateListenerMiddlewareOptions, - ListenerErrorHandler, - TypedStartListening, - TypedAddListener, - TypedStopListening, - TypedRemoveListener, - UnsubscribeListener, - UnsubscribeListenerOptions, - ForkedTaskExecutor, ForkedTask, ForkedTaskAPI, - AsyncTaskExecutor, + ForkedTaskExecutor, + ListenerEffect, + ListenerEffectAPI, + ListenerErrorHandler, + ListenerMiddleware, + ListenerMiddlewareInstance, SyncTaskExecutor, TaskCancelled, TaskRejected, TaskResolved, TaskResult, + TypedAddListener, + TypedRemoveListener, + TypedStartListening, + TypedStopListening, + UnsubscribeListener, + UnsubscribeListenerOptions, } from './types' //Overly-aggressive byte-shaving @@ -215,25 +215,27 @@ const getListenerEntryPropsFrom = (options: FallbackAddListenerOptions) => { } /** Accepts the possible options for creating a listener, and returns a formatted listener entry */ -export const createListenerEntry: TypedCreateListenerEntry = ( - options: FallbackAddListenerOptions -) => { - const { type, predicate, effect } = getListenerEntryPropsFrom(options) - - const id = nanoid() - const entry: ListenerEntry = { - id, - effect, - type, - predicate, - pending: new Set(), - unsubscribe: () => { - throw new Error('Unsubscribe not initialized') - }, - } +export const createListenerEntry: TypedCreateListenerEntry = + Object.assign( + (options: FallbackAddListenerOptions) => { + const { type, predicate, effect } = getListenerEntryPropsFrom(options) + + const id = nanoid() + const entry: ListenerEntry = { + id, + effect, + type, + predicate, + pending: new Set(), + unsubscribe: () => { + throw new Error('Unsubscribe not initialized') + }, + } - return entry -} + return entry + }, + { withTypes: () => createListenerEntry } + ) as unknown as TypedCreateListenerEntry const cancelActiveListeners = ( entry: ListenerEntry> @@ -302,11 +304,17 @@ const defaultErrorHandler: ListenerErrorHandler = (...args: unknown[]) => { /** * @public */ -export function createListenerMiddleware< - S = unknown, - D extends Dispatch = ThunkDispatch, +export const createListenerMiddleware = < + StateType = unknown, + DispatchType extends Dispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + >, ExtraArgument = unknown ->(middlewareOptions: CreateListenerMiddlewareOptions = {}) { +>( + middlewareOptions: CreateListenerMiddlewareOptions = {} +) => { const listenerMap = new Map() const { extra, onError = defaultErrorHandler } = middlewareOptions @@ -324,7 +332,7 @@ export function createListenerMiddleware< } } - const startListening = (options: FallbackAddListenerOptions) => { + const startListening = ((options: FallbackAddListenerOptions) => { let entry = find( Array.from(listenerMap.values()), (existingEntry) => existingEntry.effect === options.effect @@ -335,7 +343,11 @@ export function createListenerMiddleware< } return insertEntry(entry) - } + }) as AddListenerOverloads + + Object.assign(startListening, { + withTypes: () => startListening, + }) const stopListening = ( options: FallbackAddListenerOptions & UnsubscribeListenerOptions @@ -365,11 +377,11 @@ export function createListenerMiddleware< entry: ListenerEntry>, action: unknown, api: MiddlewareAPI, - getOriginalState: () => S + getOriginalState: () => StateType ) => { const internalTaskController = new AbortController() const take = createTakePattern( - startListening, + startListening as AddListenerOverloads, internalTaskController.signal ) const autoJoinPromises: Promise[] = [] @@ -433,7 +445,7 @@ export function createListenerMiddleware< const clearListenerMiddleware = createClearListenerMiddleware(listenerMap) - const middleware: ListenerMiddleware = + const middleware: ListenerMiddleware = (api) => (next) => (action) => { if (!isAction(action)) { // we only want to notify listeners for action objects @@ -441,7 +453,7 @@ export function createListenerMiddleware< } if (addListener.match(action)) { - return startListening(action.payload) + return startListening(action.payload as any) } if (clearAllListeners.match(action)) { @@ -454,18 +466,18 @@ export function createListenerMiddleware< } // Need to get this state _before_ the reducer processes the action - let originalState: S | typeof INTERNAL_NIL_TOKEN = api.getState() + let originalState: StateType | typeof INTERNAL_NIL_TOKEN = api.getState() // `getOriginalState` can only be called synchronously. // @see https://github.com/reduxjs/redux-toolkit/discussions/1648#discussioncomment-1932820 - const getOriginalState = (): S => { + const getOriginalState = (): StateType => { if (originalState === INTERNAL_NIL_TOKEN) { throw new Error( `${alm}: getOriginalState can only be called synchronously` ) } - return originalState as S + return originalState as StateType } let result: unknown @@ -475,10 +487,10 @@ export function createListenerMiddleware< result = next(action) if (listenerMap.size > 0) { - let currentState = api.getState() + const currentState = api.getState() // Work around ESBuild+TS transpilation issue const listenerEntries = Array.from(listenerMap.values()) - for (let entry of listenerEntries) { + for (const entry of listenerEntries) { let runListener = false try { @@ -511,5 +523,5 @@ export function createListenerMiddleware< startListening, stopListening, clearListeners: clearListenerMiddleware, - } as ListenerMiddlewareInstance + } as ListenerMiddlewareInstance } diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts new file mode 100644 index 0000000000..02d4ee1700 --- /dev/null +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts @@ -0,0 +1,95 @@ +import type { Action } from 'redux' +import type { ThunkAction } from 'redux-thunk' +import { expectTypeOf } from 'vitest' +import { createListenerMiddleware } from '..' +import { configureStore } from '../../configureStore' +import { createAsyncThunk } from '../../createAsyncThunk' +import { createSlice } from '../../createSlice' + +export interface CounterState { + counter: number +} + +const initialState: CounterState = { + counter: 0, +} + +export const counterSlice = createSlice({ + name: 'counter', + initialState, + reducers: { + increment(state) { + state.counter++ + }, + }, +}) + +export function fetchCount(amount = 1) { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + // The value we return becomes the `fulfilled` action payload + return response.data + } +) + +const { increment } = counterSlice.actions + +const counterStore = configureStore({ + reducer: counterSlice.reducer, +}) + +type AppStore = typeof counterStore +type AppDispatch = typeof counterStore.dispatch +type RootState = ReturnType +type AppThunk = ThunkAction< + ThunkReturnType, + RootState, + unknown, + Action +> + +describe('listenerMiddleware.withTypes()', () => { + const listenerMiddleware = createListenerMiddleware() + let timeout: number | undefined = undefined + let done = false + + type ExpectedTakeResultType = + | readonly [ReturnType, CounterState, CounterState] + | null + + test('startListening.withTypes', () => { + const startAppListening = listenerMiddleware.startListening.withTypes< + CounterState, + AppDispatch + >() + startAppListening({ + predicate: increment.match, + effect: async (_, listenerApi) => { + const stateBefore = listenerApi.getState() + + let takeResult = await listenerApi.take(increment.match, timeout) + const stateCurrent = listenerApi.getState() + expect(takeResult).toEqual([increment(), stateCurrent, stateBefore]) + + timeout = 1 + takeResult = await listenerApi.take(increment.match, timeout) + expect(takeResult).toBeNull() + + expectTypeOf< + typeof takeResult + >(takeResult).toEqualTypeOf() + + done = true + }, + }) + }) + + test('addListener.withTypes', () => {}) +}) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts index 78bc9dc56c..584eb58a69 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts @@ -1760,3 +1760,4 @@ describe('createListenerMiddleware', () => { }) }) }) + diff --git a/packages/toolkit/src/listenerMiddleware/types.ts b/packages/toolkit/src/listenerMiddleware/types.ts index 6992275dd0..34b1ba7721 100644 --- a/packages/toolkit/src/listenerMiddleware/types.ts +++ b/packages/toolkit/src/listenerMiddleware/types.ts @@ -1,14 +1,13 @@ -import type { PayloadAction, BaseActionCreator } from '../createAction' import type { - Dispatch as ReduxDispatch, - MiddlewareAPI, Middleware, + MiddlewareAPI, Action as ReduxAction, + Dispatch as ReduxDispatch, UnknownAction, } from 'redux' import type { ThunkDispatch } from 'redux-thunk' +import type { BaseActionCreator, PayloadAction } from '../createAction' import type { TaskAbortError } from './exceptions' -import { NoInfer } from '../tsHelpers' /** * @internal @@ -328,22 +327,22 @@ export type ListenerMiddleware< /** @public */ export interface ListenerMiddlewareInstance< - State = unknown, - Dispatch extends ThunkDispatch = ThunkDispatch< - State, + StateType = unknown, + DispatchType extends ThunkDispatch< + StateType, unknown, - UnknownAction - >, + ReduxAction + > = ThunkDispatch, ExtraArgument = unknown > { - middleware: ListenerMiddleware + middleware: ListenerMiddleware startListening: AddListenerOverloads< UnsubscribeListener, - State, - Dispatch, + StateType, + DispatchType, ExtraArgument > - stopListening: RemoveListenerOverloads + stopListening: RemoveListenerOverloads /** * Unsubscribes all listeners, cancels running listeners and tasks. */ @@ -401,35 +400,50 @@ export type UnsubscribeListener = ( */ export interface AddListenerOverloads< Return, - State = unknown, - Dispatch extends ReduxDispatch = ThunkDispatch, + StateType = unknown, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + >, ExtraArgument = unknown, AdditionalOptions = unknown > { /** Accepts a "listener predicate" that is also a TS type predicate for the action*/ - >( + < + MiddlewareActionType extends UnknownAction, + ListenerPredicateType extends ListenerPredicate< + MiddlewareActionType, + StateType + > + >( options: { actionCreator?: never type?: never matcher?: never - predicate: LP + predicate: ListenerPredicateType effect: ListenerEffect< - ListenerPredicateGuardedActionType, - State, - Dispatch, + ListenerPredicateGuardedActionType, + StateType, + DispatchType, ExtraArgument > } & AdditionalOptions ): Return /** Accepts an RTK action creator, like `incrementByAmount` */ - >( + >( options: { - actionCreator: C + actionCreator: ActionCreatorType type?: never matcher?: never predicate?: never - effect: ListenerEffect, State, Dispatch, ExtraArgument> + effect: ListenerEffect< + ReturnType, + StateType, + DispatchType, + ExtraArgument + > } & AdditionalOptions ): Return @@ -440,44 +454,73 @@ export interface AddListenerOverloads< type: T matcher?: never predicate?: never - effect: ListenerEffect, State, Dispatch, ExtraArgument> + effect: ListenerEffect< + ReduxAction, + StateType, + DispatchType, + ExtraArgument + > } & AdditionalOptions ): Return /** Accepts an RTK matcher function, such as `incrementByAmount.match` */ - >( + >( options: { actionCreator?: never type?: never - matcher: M + matcher: MatchFunctionType predicate?: never - effect: ListenerEffect, State, Dispatch, ExtraArgument> + effect: ListenerEffect< + GuardedType, + StateType, + DispatchType, + ExtraArgument + > } & AdditionalOptions ): Return /** Accepts a "listener predicate" that just returns a boolean, no type assertion */ - >( + >( options: { actionCreator?: never type?: never matcher?: never - predicate: LP - effect: ListenerEffect + predicate: ListenerPredicateType + effect: ListenerEffect< + UnknownAction, + StateType, + DispatchType, + ExtraArgument + > } & AdditionalOptions ): Return + + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedStartListening } /** @public */ export type RemoveListenerOverloads< - State = unknown, - Dispatch extends ReduxDispatch = ThunkDispatch + StateType = unknown, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + > > = AddListenerOverloads< boolean, - State, - Dispatch, + StateType, + DispatchType, any, UnsubscribeListenerOptions -> +> & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedRemoveListener +} /** @public */ export interface RemoveListenerAction< @@ -496,35 +539,50 @@ export interface RemoveListenerAction< * @public * A "pre-typed" version of `addListenerAction`, so the listener args are well-typed */ export type TypedAddListener< - State, - Dispatch extends ReduxDispatch = ThunkDispatch, + StateType, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + >, ExtraArgument = unknown, - Payload = ListenerEntry, + Payload = ListenerEntry, T extends string = 'listenerMiddleware/add' > = BaseActionCreator & AddListenerOverloads< PayloadAction, - State, - Dispatch, + StateType, + DispatchType, ExtraArgument - > + > & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedAddListener + } /** * @public * A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed */ export type TypedRemoveListener< - State, - Dispatch extends ReduxDispatch = ThunkDispatch, - Payload = ListenerEntry, + StateType, + DispatchType extends ReduxDispatch = ThunkDispatch, + Payload = ListenerEntry, T extends string = 'listenerMiddleware/remove' > = BaseActionCreator & AddListenerOverloads< PayloadAction, - State, - Dispatch, + StateType, + DispatchType, any, UnsubscribeListenerOptions > + // & { + // withTypes: < + // OverrideStateType extends StateType, + // OverrideDispatchType extends DispatchType + // >() => TypedRemoveListener<> + // } /** * @public From 88131a24cd7870a847741b8e4423d4b4cbbf268e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 16:47:48 -0600 Subject: [PATCH 046/368] Bump Vitest to latest version --- packages/toolkit/package.json | 2 +- yarn.lock | 644 +++++++++++++++++++++++++++++++++- 2 files changed, 641 insertions(+), 5 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index d85de9a3d7..335e054cbb 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -90,7 +90,7 @@ "tsup": "^7.2.0", "tsx": "^3.12.2", "typescript": "5.2", - "vitest": "^0.30.1", + "vitest": "^1.1.3", "yargs": "^15.3.1" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 7e37c72741..3ea896b4e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6201,6 +6201,15 @@ __metadata: languageName: node linkType: hard +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": ^0.27.8 + checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + "@jest/source-map@npm:^27.5.1": version: 27.5.1 resolution: "@jest/source-map@npm:27.5.1" @@ -6472,7 +6481,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.13": +"@jridgewell/sourcemap-codec@npm:^1.4.13, @jridgewell/sourcemap-codec@npm:^1.4.15": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 @@ -7053,7 +7062,7 @@ __metadata: tsup: ^7.2.0 tsx: ^3.12.2 typescript: 5.2 - vitest: ^0.30.1 + vitest: ^1.1.3 yargs: ^15.3.1 peerDependencies: react: ^16.9.0 || ^17.0.0 || ^18 @@ -7203,6 +7212,97 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.9.3" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-android-arm64@npm:4.9.3" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-darwin-arm64@npm:4.9.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-darwin-x64@npm:4.9.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.9.3" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.9.3" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.9.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.9.3" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.9.3" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.9.3" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.9.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.9.3" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.9.3": + version: 4.9.3 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.9.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@rtk-query/codegen-openapi@workspace:packages/rtk-query-codegen-openapi": version: 0.0.0-use.local resolution: "@rtk-query/codegen-openapi@workspace:packages/rtk-query-codegen-openapi" @@ -7363,6 +7463,13 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 00bd7362a3439021aa1ea51b0e0d0a0e8ca1351a3d54c606b115fdcc49b51b16db6e5f43b4fe7a28c38688523e22a94d49dd31168868b655f0d4d50f032d07a1 + languageName: node + linkType: hard + "@sindresorhus/is@npm:^0.14.0": version: 0.14.0 resolution: "@sindresorhus/is@npm:0.14.0" @@ -8061,6 +8168,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.5, @types/estree@npm:^1.0.0": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: dd8b5bed28e6213b7acd0fb665a84e693554d850b0df423ac8076cc3ad5823a6bc26b0251d080bdc545af83179ede51dd3f6fa78cad2c46ed1f29624ddf3e41a + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": version: 4.17.28 resolution: "@types/express-serve-static-core@npm:4.17.28" @@ -8933,6 +9047,17 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:1.1.3": + version: 1.1.3 + resolution: "@vitest/expect@npm:1.1.3" + dependencies: + "@vitest/spy": 1.1.3 + "@vitest/utils": 1.1.3 + chai: ^4.3.10 + checksum: 971492347e91af81a8c309bc6dff4369afe0f533ac73a73e4a568111ea0fa7d6dc45b69b209490ad588578fd905773e6bd4fcbe8d517ac7aeb57efb1e9c59083 + languageName: node + linkType: hard + "@vitest/runner@npm:0.30.1": version: 0.30.1 resolution: "@vitest/runner@npm:0.30.1" @@ -8945,6 +9070,17 @@ __metadata: languageName: node linkType: hard +"@vitest/runner@npm:1.1.3": + version: 1.1.3 + resolution: "@vitest/runner@npm:1.1.3" + dependencies: + "@vitest/utils": 1.1.3 + p-limit: ^5.0.0 + pathe: ^1.1.1 + checksum: a2875fab07c307aee5c7b3e4e821c2f36a561d86412edeb69f47daed10fa26fb5ba222841cf093372bce95a7384ff3a9302d69b3e594468aa565cbd5b2fe4316 + languageName: node + linkType: hard + "@vitest/snapshot@npm:0.30.1": version: 0.30.1 resolution: "@vitest/snapshot@npm:0.30.1" @@ -8956,6 +9092,17 @@ __metadata: languageName: node linkType: hard +"@vitest/snapshot@npm:1.1.3": + version: 1.1.3 + resolution: "@vitest/snapshot@npm:1.1.3" + dependencies: + magic-string: ^0.30.5 + pathe: ^1.1.1 + pretty-format: ^29.7.0 + checksum: 731af9f71f57c0a4830a2e8c6c9c354fe80b7ad00d38cd19354aaa61c1e0353a3d09b427f2a69e81b5bccce4576e2c1e8a538bce3dfbbdc080126d23ee2edb14 + languageName: node + linkType: hard + "@vitest/spy@npm:0.30.1": version: 0.30.1 resolution: "@vitest/spy@npm:0.30.1" @@ -8965,6 +9112,15 @@ __metadata: languageName: node linkType: hard +"@vitest/spy@npm:1.1.3": + version: 1.1.3 + resolution: "@vitest/spy@npm:1.1.3" + dependencies: + tinyspy: ^2.2.0 + checksum: 592a9a2bad31c2655fdc6ae87f44b36bc25aafb7efd3a750228409ab4e98bff31888d806c29c6e7bfc029a5ee225f7dc998565115b4fa452429eaa579cc0eec7 + languageName: node + linkType: hard + "@vitest/utils@npm:0.30.1": version: 0.30.1 resolution: "@vitest/utils@npm:0.30.1" @@ -8976,6 +9132,18 @@ __metadata: languageName: node linkType: hard +"@vitest/utils@npm:1.1.3": + version: 1.1.3 + resolution: "@vitest/utils@npm:1.1.3" + dependencies: + diff-sequences: ^29.6.3 + estree-walker: ^3.0.3 + loupe: ^2.3.7 + pretty-format: ^29.7.0 + checksum: d345b8c862c51b734d9fe53397a125485797cae2a4c1630cea1235f3f0987df479c84ac958f5250e77892afdc12f6d863628d619fc1bb5e34c05c3fa8a86d289 + languageName: node + linkType: hard + "@webassemblyjs/ast@npm:1.11.1": version: 1.11.1 resolution: "@webassemblyjs/ast@npm:1.11.1" @@ -9439,6 +9607,13 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^8.3.1": + version: 8.3.1 + resolution: "acorn-walk@npm:8.3.1" + checksum: 5c8926ddb5400bc825b6baca782931f9df4ace603ba1a517f5243290fd9cdb089d52877840687b5d5c939591ebc314e2e63721514feaa37c6829c828f2b940ce + languageName: node + linkType: hard + "acorn@npm:^6.4.1": version: 6.4.2 resolution: "acorn@npm:6.4.2" @@ -9475,6 +9650,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.10.0": + version: 8.11.3 + resolution: "acorn@npm:8.11.3" + bin: + acorn: bin/acorn + checksum: 76d8e7d559512566b43ab4aadc374f11f563f0a9e21626dd59cb2888444e9445923ae9f3699972767f18af61df89cd89f5eaaf772d1327b055b45cb829b4a88c + languageName: node + linkType: hard + "acorn@npm:^8.8.2": version: 8.8.2 resolution: "acorn@npm:8.8.2" @@ -11375,6 +11559,21 @@ __metadata: languageName: node linkType: hard +"chai@npm:^4.3.10": + version: 4.4.0 + resolution: "chai@npm:4.4.0" + dependencies: + assertion-error: ^1.1.0 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 + pathval: ^1.1.1 + type-detect: ^4.0.8 + checksum: 2509a0acc2707f0664157cdc9d72b1466c71cedba19a22fec80ae550593fdcfc108fd86d4a7fec3be631b6c0589bf4f05652ee73fa55dbc748387ff6cc85c6b3 + languageName: node + linkType: hard + "chai@npm:^4.3.7": version: 4.3.7 resolution: "chai@npm:4.3.7" @@ -11575,6 +11774,15 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: ^2.0.2 + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + "check-types@npm:^11.1.1": version: 11.1.2 resolution: "check-types@npm:11.1.2" @@ -13414,7 +13622,7 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^4.1.2": +"deep-eql@npm:^4.1.2, deep-eql@npm:^4.1.3": version: 4.1.3 resolution: "deep-eql@npm:4.1.3" dependencies: @@ -13721,6 +13929,13 @@ __metadata: languageName: node linkType: hard +"diff-sequences@npm:^29.6.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: f4914158e1f2276343d98ff5b31fc004e7304f5470bf0f1adb2ac6955d85a531a6458d33e87667f98f6ae52ebd3891bb47d420bb48a5bd8b7a27ee25b20e33aa + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -15038,6 +15253,15 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^3.0.3": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": ^1.0.0 + checksum: a65728d5727b71de172c5df323385755a16c0fdab8234dc756c3854cfee343261ddfbb72a809a5660fac8c75d960bb3e21aa898c2d7e9b19bb298482ca58a3af + languageName: node + linkType: hard + "esutils@npm:^2.0.2, esutils@npm:^2.0.3": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -15171,6 +15395,23 @@ __metadata: languageName: node linkType: hard +"execa@npm:^8.0.1": + version: 8.0.1 + resolution: "execa@npm:8.0.1" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^8.0.1 + human-signals: ^5.0.0 + is-stream: ^3.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^5.1.0 + onetime: ^6.0.0 + signal-exit: ^4.1.0 + strip-final-newline: ^3.0.0 + checksum: cac1bf86589d1d9b73bdc5dda65c52012d1a9619c44c526891956745f7b366ca2603d29fe3f7460bacc2b48c6eab5d6a4f7afe0534b31473d3708d1265545e1f + languageName: node + linkType: hard + "exit@npm:^0.1.2": version: 0.1.2 resolution: "exit@npm:0.1.2" @@ -15979,6 +16220,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@patch:fsevents@^1.2.7#~builtin": version: 1.2.13 resolution: "fsevents@patch:fsevents@npm%3A1.2.13#~builtin::version=1.2.13&hash=18f3a7" @@ -15998,6 +16249,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"fsevents@patch:fsevents@~2.3.3#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=18f3a7" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + "function-bind@npm:^1.1.1": version: 1.1.1 resolution: "function-bind@npm:1.1.1" @@ -16077,6 +16337,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + "get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": version: 1.1.1 resolution: "get-intrinsic@npm:1.1.1" @@ -16134,6 +16401,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"get-stream@npm:^8.0.1": + version: 8.0.1 + resolution: "get-stream@npm:8.0.1" + checksum: 01e3d3cf29e1393f05f44d2f00445c5f9ec3d1c49e8179b31795484b9c117f4c695e5e07b88b50785d5c8248a788c85d9913a79266fc77e3ef11f78f10f1b974 + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -17135,6 +17409,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"human-signals@npm:^5.0.0": + version: 5.0.0 + resolution: "human-signals@npm:5.0.0" + checksum: 6504560d5ed91444f16bea3bd9dfc66110a339442084e56c3e7fa7bbdf3f406426d6563d662bdce67064b165eac31eeabfc0857ed170aaa612cf14ec9f9a464c + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -18159,6 +18440,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 + languageName: node + linkType: hard + "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -20100,6 +20388,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"local-pkg@npm:^0.5.0": + version: 0.5.0 + resolution: "local-pkg@npm:0.5.0" + dependencies: + mlly: ^1.4.2 + pkg-types: ^1.0.3 + checksum: b0a6931e588ad4f7bf4ab49faacf49e07fc4d05030f895aa055d46727a15b99300d39491cf2c3e3f05284aec65565fb760debb74c32e64109f4a101f9300d81a + languageName: node + linkType: hard + "locate-path@npm:^2.0.0": version: 2.0.0 resolution: "locate-path@npm:2.0.0" @@ -20349,6 +20647,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"loupe@npm:^2.3.7": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: ^2.0.1 + checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b + languageName: node + linkType: hard + "lower-case-first@npm:^2.0.2": version: 2.0.2 resolution: "lower-case-first@npm:2.0.2" @@ -20433,6 +20740,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"magic-string@npm:^0.30.5": + version: 0.30.5 + resolution: "magic-string@npm:0.30.5" + dependencies: + "@jridgewell/sourcemap-codec": ^1.4.15 + checksum: da10fecff0c0a7d3faf756913ce62bd6d5e7b0402be48c3b27bfd651b90e29677e279069a63b764bcdc1b8ecdcdb898f29a5c5ec510f2323e8d62ee057a6eb18 + languageName: node + linkType: hard + "make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": version: 2.1.0 resolution: "make-dir@npm:2.1.0" @@ -20902,6 +21218,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 + languageName: node + linkType: hard + "mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": version: 1.0.1 resolution: "mimic-response@npm:1.0.1" @@ -21132,6 +21455,18 @@ fsevents@^1.2.7: languageName: node linkType: hard +"mlly@npm:^1.4.2": + version: 1.4.2 + resolution: "mlly@npm:1.4.2" + dependencies: + acorn: ^8.10.0 + pathe: ^1.1.1 + pkg-types: ^1.0.3 + ufo: ^1.3.0 + checksum: ad0813eca133e59ac03b356b87deea57da96083dce7dda58a8eeb2dce92b7cc2315bedd9268f3ff8e98effe1867ddb1307486d4c5cd8be162daa8e0fa0a98ed4 + languageName: node + linkType: hard + "move-concurrently@npm:^1.0.1": version: 1.0.1 resolution: "move-concurrently@npm:1.0.1" @@ -21303,6 +21638,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" + bin: + nanoid: bin/nanoid.cjs + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 + languageName: node + linkType: hard + "nanomatch@npm:^1.2.9": version: 1.2.13 resolution: "nanomatch@npm:1.2.13" @@ -21657,6 +22001,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"npm-run-path@npm:^5.1.0": + version: 5.2.0 + resolution: "npm-run-path@npm:5.2.0" + dependencies: + path-key: ^4.0.0 + checksum: c5325e016014e715689c4014f7e0be16cc4cbf529f32a1723e511bc4689b5f823b704d2bca61ac152ce2bda65e0205dc8b3ba0ec0f5e4c3e162d302f6f5b9efb + languageName: node + linkType: hard + "npmlog@npm:^4.1.2": version: 4.1.2 resolution: "npmlog@npm:4.1.2" @@ -21968,6 +22321,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" + dependencies: + mimic-fn: ^4.0.0 + checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 + languageName: node + linkType: hard + "open@npm:7.4.2": version: 7.4.2 resolution: "open@npm:7.4.2" @@ -22160,6 +22522,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"p-limit@npm:^5.0.0": + version: 5.0.0 + resolution: "p-limit@npm:5.0.0" + dependencies: + yocto-queue: ^1.0.0 + checksum: 87bf5837dee6942f0dbeff318436179931d9a97848d1b07dbd86140a477a5d2e6b90d9701b210b4e21fe7beaea2979dfde366e4f576fa644a59bd4d6a6371da7 + languageName: node + linkType: hard + "p-locate@npm:^2.0.0": version: 2.0.0 resolution: "p-locate@npm:2.0.0" @@ -22520,6 +22891,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 + languageName: node + linkType: hard + "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -22587,6 +22965,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"pathe@npm:^1.1.1": + version: 1.1.1 + resolution: "pathe@npm:1.1.1" + checksum: 34ab3da2e5aa832ebc6a330ffe3f73d7ba8aec6e899b53b8ec4f4018de08e40742802deb12cf5add9c73b7bf719b62c0778246bd376ca62b0fb23e0dde44b759 + languageName: node + linkType: hard + "pathval@npm:^1.1.1": version: 1.1.1 resolution: "pathval@npm:1.1.1" @@ -22701,6 +23086,17 @@ fsevents@^1.2.7: languageName: node linkType: hard +"pkg-types@npm:^1.0.3": + version: 1.0.3 + resolution: "pkg-types@npm:1.0.3" + dependencies: + jsonc-parser: ^3.2.0 + mlly: ^1.2.0 + pathe: ^1.1.0 + checksum: 4b305c834b912ddcc8a0fe77530c0b0321fe340396f84cbb87aecdbc126606f47f2178f23b8639e71a4870f9631c7217aef52ffed0ae17ea2dbbe7e43d116a6e + languageName: node + linkType: hard + "pkg-up@npm:^3.1.0": version: 3.1.0 resolution: "pkg-up@npm:3.1.0" @@ -24022,6 +24418,17 @@ fsevents@^1.2.7: languageName: node linkType: hard +"postcss@npm:^8.4.32": + version: 8.4.33 + resolution: "postcss@npm:8.4.33" + dependencies: + nanoid: ^3.3.7 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 6f98b2af4b76632a3de20c4f47bf0e984a1ce1a531cf11adcb0b1d63a6cbda0aae4165e578b66c32ca4879038e3eaad386a6be725a8fb4429c78e3c1ab858fe9 + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -24133,6 +24540,17 @@ fsevents@^1.2.7: languageName: node linkType: hard +"pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": ^29.6.3 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: 032c1602383e71e9c0c02a01bbd25d6759d60e9c7cf21937dde8357aa753da348fcec5def5d1002c9678a8524d5fe099ad98861286550ef44de8808cc61e43b6 + languageName: node + linkType: hard + "pretty-quick@npm:^3.1.0": version: 3.1.1 resolution: "pretty-quick@npm:3.1.1" @@ -25991,6 +26409,60 @@ fsevents@^1.2.7: languageName: node linkType: hard +"rollup@npm:^4.2.0": + version: 4.9.3 + resolution: "rollup@npm:4.9.3" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.9.3 + "@rollup/rollup-android-arm64": 4.9.3 + "@rollup/rollup-darwin-arm64": 4.9.3 + "@rollup/rollup-darwin-x64": 4.9.3 + "@rollup/rollup-linux-arm-gnueabihf": 4.9.3 + "@rollup/rollup-linux-arm64-gnu": 4.9.3 + "@rollup/rollup-linux-arm64-musl": 4.9.3 + "@rollup/rollup-linux-riscv64-gnu": 4.9.3 + "@rollup/rollup-linux-x64-gnu": 4.9.3 + "@rollup/rollup-linux-x64-musl": 4.9.3 + "@rollup/rollup-win32-arm64-msvc": 4.9.3 + "@rollup/rollup-win32-ia32-msvc": 4.9.3 + "@rollup/rollup-win32-x64-msvc": 4.9.3 + "@types/estree": 1.0.5 + fsevents: ~2.3.2 + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: b6dd3f836559a4cdc0b34ef3de4eb86d436e871d8cfad026aa11dbe04a5b7256899b25b4dea6618f98bf75018814bb57ea2614e6eaa9a41c3e5f6c5c9d74fb4f + languageName: node + linkType: hard + "rsvp@npm:^4.8.4": version: 4.8.5 resolution: "rsvp@npm:4.8.5" @@ -26740,6 +27212,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + "signedsource@npm:^1.0.0": version: 1.0.0 resolution: "signedsource@npm:1.0.0" @@ -27270,6 +27749,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"std-env@npm:^3.5.0": + version: 3.7.0 + resolution: "std-env@npm:3.7.0" + checksum: 4f489d13ff2ab838c9acd4ed6b786b51aa52ecacdfeaefe9275fcb220ff2ac80c6e95674723508fd29850a694569563a8caaaea738eb82ca16429b3a0b50e510 + languageName: node + linkType: hard + "stream-browserify@npm:^2.0.1": version: 2.0.2 resolution: "stream-browserify@npm:2.0.2" @@ -27562,6 +28048,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 + languageName: node + linkType: hard + "strip-indent@npm:^3.0.0": version: 3.0.0 resolution: "strip-indent@npm:3.0.0" @@ -27594,6 +28087,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"strip-literal@npm:^1.3.0": + version: 1.3.0 + resolution: "strip-literal@npm:1.3.0" + dependencies: + acorn: ^8.10.0 + checksum: f5fa7e289df8ebe82e90091fd393974faf8871be087ca50114327506519323cf15f2f8fee6ebe68b5e58bfc795269cae8bdc7cb5a83e27b02b3fe953f37b0a89 + languageName: node + linkType: hard + "style-inject@npm:^0.3.0": version: 0.3.0 resolution: "style-inject@npm:0.3.0" @@ -28208,6 +28710,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"tinybench@npm:^2.5.1": + version: 2.5.1 + resolution: "tinybench@npm:2.5.1" + checksum: 6d98526c00b68b50ab0a37590b3cc6713b96fee7dd6756a2a77bab071ed1b4a4fc54e7b11e28b35ec2f761c6a806c2befa95f10acf2fee111c49327b6fc3386f + languageName: node + linkType: hard + "tinycolor2@npm:1.4.1": version: 1.4.1 resolution: "tinycolor2@npm:1.4.1" @@ -28222,6 +28731,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"tinypool@npm:^0.8.1": + version: 0.8.1 + resolution: "tinypool@npm:0.8.1" + checksum: e1162629b32a694edd92323fe7cc57379723f36b03f37e3f9442cb8fd3a99785b2b9416ef586d2f4cec8624f356b38558c2cfd272eb265a30841371d3d67d37a + languageName: node + linkType: hard + "tinyspy@npm:^2.1.0": version: 2.1.0 resolution: "tinyspy@npm:2.1.0" @@ -28229,6 +28745,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"tinyspy@npm:^2.2.0": + version: 2.2.0 + resolution: "tinyspy@npm:2.2.0" + checksum: 36431acaa648054406147a92b9bde494b7548d0f9f3ffbcc02113c25a6e59f3310cbe924353d7f4c51436299150bec2dbb3dc595748f58c4ddffea22d5baaadb + languageName: node + linkType: hard + "title-case@npm:^3.0.3": version: 3.0.3 resolution: "title-case@npm:3.0.3" @@ -28719,7 +29242,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5": +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 @@ -28793,6 +29316,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"ufo@npm:^1.3.0": + version: 1.3.2 + resolution: "ufo@npm:1.3.2" + checksum: f1180bb715ff4dd46152fd4dec41c731e84d7b9eaf1432548a0210b2f7e0cd29de125ac88e582c6a079d8ae5bc9ab04ef2bdbafe125086480b10c1006b81bfce + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -29505,6 +30035,21 @@ fsevents@^1.2.7: languageName: node linkType: hard +"vite-node@npm:1.1.3": + version: 1.1.3 + resolution: "vite-node@npm:1.1.3" + dependencies: + cac: ^6.7.14 + debug: ^4.3.4 + pathe: ^1.1.1 + picocolors: ^1.0.0 + vite: ^5.0.0 + bin: + vite-node: vite-node.mjs + checksum: 077691a293fb4151267d7bb4ed322e3d4ce427bd06c02f7d08d7411f9fc96f98ada1aa0da172c02648b44680ba16c57a40b1aa9b98231f68ea5862a00dcdb1dd + languageName: node + linkType: hard + "vite@npm:^3.0.0 || ^4.0.0": version: 4.0.4 resolution: "vite@npm:4.0.4" @@ -29543,6 +30088,46 @@ fsevents@^1.2.7: languageName: node linkType: hard +"vite@npm:^5.0.0": + version: 5.0.11 + resolution: "vite@npm:5.0.11" + dependencies: + esbuild: ^0.19.3 + fsevents: ~2.3.3 + postcss: ^8.4.32 + rollup: ^4.2.0 + peerDependencies: + "@types/node": ^18.0.0 || >=20.0.0 + less: "*" + lightningcss: ^1.21.0 + sass: "*" + stylus: "*" + sugarss: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 262e41f25ce0cc5fc3c2065b1796f64ec115d3ac2d9625dbfb36d6628ba10e63684ef5515bb2ff1aa8e34c6f89e9c10e8211cb88f6c7f0da6869362851345437 + languageName: node + linkType: hard + "vitest@npm:^0.30.1": version: 0.30.1 resolution: "vitest@npm:0.30.1" @@ -29605,6 +30190,57 @@ fsevents@^1.2.7: languageName: node linkType: hard +"vitest@npm:^1.1.3": + version: 1.1.3 + resolution: "vitest@npm:1.1.3" + dependencies: + "@vitest/expect": 1.1.3 + "@vitest/runner": 1.1.3 + "@vitest/snapshot": 1.1.3 + "@vitest/spy": 1.1.3 + "@vitest/utils": 1.1.3 + acorn-walk: ^8.3.1 + cac: ^6.7.14 + chai: ^4.3.10 + debug: ^4.3.4 + execa: ^8.0.1 + local-pkg: ^0.5.0 + magic-string: ^0.30.5 + pathe: ^1.1.1 + picocolors: ^1.0.0 + std-env: ^3.5.0 + strip-literal: ^1.3.0 + tinybench: ^2.5.1 + tinypool: ^0.8.1 + vite: ^5.0.0 + vite-node: 1.1.3 + why-is-node-running: ^2.2.2 + peerDependencies: + "@edge-runtime/vm": "*" + "@types/node": ^18.0.0 || >=20.0.0 + "@vitest/browser": ^1.0.0 + "@vitest/ui": ^1.0.0 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/node": + optional: true + "@vitest/browser": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + bin: + vitest: vitest.mjs + checksum: 35087400a0e2b2f0f1f451d0da41abafd8c55112e143a2643286bf0d3d4567b057b40dc391c4b2a05a947edc48d981a6b8c961dc32c6642d84cd8d717bd168bc + languageName: node + linkType: hard + "vm-browserify@npm:^1.0.1": version: 1.1.2 resolution: "vm-browserify@npm:1.1.2" From 1c03ac86a4226b2146b818d5aa614b742c32ccc2 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 5 Jan 2024 23:02:05 +0000 Subject: [PATCH 047/368] Allow customising createSelector instance used by RTKQ --- packages/toolkit/src/query/core/buildSelectors.ts | 5 ++++- packages/toolkit/src/query/core/module.ts | 13 ++++++++++++- packages/toolkit/src/query/react/buildHooks.ts | 6 ++---- packages/toolkit/src/query/react/module.ts | 7 +++++++ 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/toolkit/src/query/core/buildSelectors.ts b/packages/toolkit/src/query/core/buildSelectors.ts index efd48b8170..8e151f809b 100644 --- a/packages/toolkit/src/query/core/buildSelectors.ts +++ b/packages/toolkit/src/query/core/buildSelectors.ts @@ -1,4 +1,5 @@ -import { createNextState, createSelector } from './rtkImports' +import type { createSelector as _createSelector } from './rtkImports' +import { createNextState } from './rtkImports' import type { MutationSubState, QuerySubState, @@ -123,9 +124,11 @@ export function buildSelectors< >({ serializeQueryArgs, reducerPath, + createSelector, }: { serializeQueryArgs: InternalSerializeQueryArgs reducerPath: ReducerPath + createSelector: typeof _createSelector }) { type RootState = _RootState diff --git a/packages/toolkit/src/query/core/module.ts b/packages/toolkit/src/query/core/module.ts index bc95e8df4e..8d8ab6b117 100644 --- a/packages/toolkit/src/query/core/module.ts +++ b/packages/toolkit/src/query/core/module.ts @@ -49,6 +49,7 @@ import type { ReferenceCacheLifecycle } from './buildMiddleware/cacheLifecycle' import type { ReferenceQueryLifecycle } from './buildMiddleware/queryLifecycle' import type { ReferenceCacheCollection } from './buildMiddleware/cacheCollection' import { enablePatches } from 'immer' +import { createSelector as _createSelector } from './rtkImports' /** * `ifOlderThan` - (default: `false` | `number`) - _number is value in seconds_ @@ -431,6 +432,13 @@ export type ListenerActions = { export type InternalActions = SliceActions & ListenerActions +export interface CoreModuleOptions { + /** + * A selector creator (usually from `reselect`, or matching the same signature) + */ + createSelector?: typeof _createSelector +} + /** * Creates a module containing the basic redux logic for use with `buildCreateApi`. * @@ -439,7 +447,9 @@ export type InternalActions = SliceActions & ListenerActions * const createBaseApi = buildCreateApi(coreModule()); * ``` */ -export const coreModule = (): Module => ({ +export const coreModule = ({ + createSelector = _createSelector, +}: CoreModuleOptions = {}): Module => ({ name: coreModuleName, init( api, @@ -548,6 +558,7 @@ export const coreModule = (): Module => ({ } = buildSelectors({ serializeQueryArgs: serializeQueryArgs as any, reducerPath, + createSelector, }) safeAssign(api.util, { selectInvalidatedBy, selectCachedArgsForQuery }) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index cd69763b65..b31d33a72c 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -53,10 +53,7 @@ import { UNINITIALIZED_VALUE } from './constants' import { useShallowStableValue } from './useShallowStableValue' import type { BaseQueryFn } from '../baseQueryTypes' import { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs' -import { - InternalMiddlewareState, - SubscriptionSelectors, -} from '../core/buildMiddleware/types' +import type { SubscriptionSelectors } from '../core/buildMiddleware/types' // Copy-pasted from React-Redux export const useIsomorphicLayoutEffect = @@ -582,6 +579,7 @@ export function buildHooks({ batch, hooks: { useDispatch, useSelector, useStore }, unstable__sideEffectsInRender, + createSelector, }, serializeQueryArgs, context, diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 3ff9a02166..eb43d5c654 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -23,6 +23,7 @@ import { import type { QueryKeys } from '../core/apiState' import type { PrefetchOptions } from '../core/module' import { countObjectKeys } from '../utils/countObjectKeys' +import { createSelector as _createSelector } from 'reselect' export const reactHooksModuleName = /* @__PURE__ */ Symbol() export type ReactHooksModule = typeof reactHooksModuleName @@ -111,6 +112,10 @@ export interface ReactHooksModuleOptions { * ``` */ unstable__sideEffectsInRender?: boolean + /** + * A selector creator (usually from `reselect`, or matching the same signature) + */ + createSelector?: typeof _createSelector } /** @@ -140,6 +145,7 @@ export const reactHooksModule = ({ useSelector: rrUseSelector, useStore: rrUseStore, }, + createSelector = _createSelector, unstable__sideEffectsInRender = false, ...rest }: ReactHooksModuleOptions = {}): Module => { @@ -191,6 +197,7 @@ export const reactHooksModule = ({ batch, hooks, unstable__sideEffectsInRender, + createSelector, }, serializeQueryArgs, context, From d66e83bdc493e138e3a5bb9813ef690ffcef41d3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:14:27 -0600 Subject: [PATCH 048/368] Copy Vitest Node ESM config from Reselect --- packages/toolkit/vitest.config.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 0df173bd94..38eadf7722 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -1,5 +1,12 @@ import { defineConfig } from 'vitest/config' +import path from 'path' +import { fileURLToPath } from 'url' + +// No __dirname under Node ESM +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + export default defineConfig({ test: { globals: true, @@ -7,14 +14,17 @@ export default defineConfig({ setupFiles: ['./vitest.setup.js'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { - '@reduxjs/toolkit/query/react': './src/query/react/index.ts', // @remap-prod-remove-line - '@reduxjs/toolkit/query': './src/query/index.ts', // @remap-prod-remove-line - '@reduxjs/toolkit/react': './src/index.ts', // @remap-prod-remove-line - '@reduxjs/toolkit': './src/index.ts', // @remap-prod-remove-line + '@reduxjs/toolkit/query/react': path.join( + __dirname, + './src/query/react/index.ts' + ), // @remap-prod-remove-line + '@reduxjs/toolkit/query': path.join(__dirname, './src/query/index.ts'), // @remap-prod-remove-line + '@reduxjs/toolkit/react': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line + '@reduxjs/toolkit': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line // this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', - '@internal/': './src/', + '@internal/': path.join(__dirname, './src/'), }, deps: { interopDefault: true, From 0d530b11710b12cf136bd7f0e62356d4a64209bf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:14:39 -0600 Subject: [PATCH 049/368] Update snapshots --- .../toolkit/src/query/tests/apiProvider.test.tsx | 2 +- .../src/query/tests/buildCreateApi.test.tsx | 5 ++++- packages/toolkit/src/tests/createReducer.test.ts | 16 ++++++++-------- packages/toolkit/src/tests/createSlice.test.ts | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/toolkit/src/query/tests/apiProvider.test.tsx b/packages/toolkit/src/query/tests/apiProvider.test.tsx index 98e562cd71..b153a36b7f 100644 --- a/packages/toolkit/src/query/tests/apiProvider.test.tsx +++ b/packages/toolkit/src/query/tests/apiProvider.test.tsx @@ -67,7 +67,7 @@ describe('ApiProvider', () => { ) ).toThrowErrorMatchingInlineSnapshot( - '"Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup."' + `[Error: Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup.]` ) }) }) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index 999d34693d..8d8956f559 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -120,7 +120,10 @@ describe('buildCreateApi', () => { } expect(callBuildCreateApi).toThrowErrorMatchingInlineSnapshot( - `"When using custom hooks for context, all 3 hooks need to be provided: useDispatch, useSelector, useStore.\nHook useStore was either not provided or not a function."` + ` + [Error: When using custom hooks for context, all 3 hooks need to be provided: useDispatch, useSelector, useStore. + Hook useStore was either not provided or not a function.] + ` ) }) }) diff --git a/packages/toolkit/src/tests/createReducer.test.ts b/packages/toolkit/src/tests/createReducer.test.ts index 04fb400099..5d794c78b7 100644 --- a/packages/toolkit/src/tests/createReducer.test.ts +++ b/packages/toolkit/src/tests/createReducer.test.ts @@ -306,7 +306,7 @@ describe('createReducer', () => { ) ) expect(() => reducer(5, decrement(5))).toThrowErrorMatchingInlineSnapshot( - `"A case reducer on a non-draftable value must not return undefined"` + `[Error: A case reducer on a non-draftable value must not return undefined]` ) }) test('allows you to return undefined if the state was null, thus skipping an update', () => { @@ -354,7 +354,7 @@ describe('createReducer', () => { .addCase(decrement, (state, action) => state - action.payload) ) ).toThrowErrorMatchingInlineSnapshot( - '"`builder.addCase` cannot be called with two reducers for the same action type \'increment\'"' + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` ) expect(() => createReducer(0, (builder) => @@ -364,7 +364,7 @@ describe('createReducer', () => { .addCase(decrement, (state, action) => state - action.payload) ) ).toThrowErrorMatchingInlineSnapshot( - '"`builder.addCase` cannot be called with two reducers for the same action type \'increment\'"' + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` ) }) @@ -382,7 +382,7 @@ describe('createReducer', () => { ) ) ).toThrowErrorMatchingInlineSnapshot( - '"`builder.addCase` cannot be called with an empty action type"' + `[Error: \`builder.addCase\` cannot be called with an empty action type]` ) }) }) @@ -507,14 +507,14 @@ describe('createReducer', () => { .addCase(incrementBy, () => {}) ) ).toThrowErrorMatchingInlineSnapshot( - `"\`builder.addCase\` should only be called before calling \`builder.addMatcher\`"` + `[Error: \`builder.addCase\` should only be called before calling \`builder.addMatcher\`]` ) expect(() => createReducer(initialState, (builder: any) => builder.addDefaultCase(() => {}).addCase(incrementBy, () => {}) ) ).toThrowErrorMatchingInlineSnapshot( - `"\`builder.addCase\` should only be called before calling \`builder.addDefaultCase\`"` + `[Error: \`builder.addCase\` should only be called before calling \`builder.addDefaultCase\`]` ) expect(() => createReducer(initialState, (builder: any) => @@ -523,14 +523,14 @@ describe('createReducer', () => { .addMatcher(numberActionMatcher, () => {}) ) ).toThrowErrorMatchingInlineSnapshot( - `"\`builder.addMatcher\` should only be called before calling \`builder.addDefaultCase\`"` + `[Error: \`builder.addMatcher\` should only be called before calling \`builder.addDefaultCase\`]` ) expect(() => createReducer(initialState, (builder: any) => builder.addDefaultCase(() => {}).addDefaultCase(() => {}) ) ).toThrowErrorMatchingInlineSnapshot( - `"\`builder.addDefaultCase\` can only be called once"` + `[Error: \`builder.addDefaultCase\` can only be called once]` ) }) }) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index d71bcc2f25..4856582c1e 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -252,7 +252,7 @@ describe('createSlice', () => { }) slice.reducer(undefined, { type: 'unrelated' }) }).toThrowErrorMatchingInlineSnapshot( - '"`builder.addCase` cannot be called with two reducers for the same action type \'increment\'"' + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` ) }) @@ -587,7 +587,7 @@ describe('createSlice', () => { reducers: (create) => ({ thunk: create.asyncThunk(() => {}) }), }) ).toThrowErrorMatchingInlineSnapshot( - '"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`."' + `[Error: Cannot use \`create.asyncThunk\` in the built-in \`createSlice\`. Use \`buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })\` to create a customised version of \`createSlice\`.]` ) }) const createAppSlice = buildCreateSlice({ @@ -826,7 +826,7 @@ describe('createSlice', () => { }), }) ).toThrowErrorMatchingInlineSnapshot( - `"Please use the \`create.preparedReducer\` notation for prepared action creators with the \`create\` notation."` + `[Error: Please use the \`create.preparedReducer\` notation for prepared action creators with the \`create\` notation.]` ) }) }) From 0da055a7e00de5edfe8094ba5bc65b2e9411c18c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:19:19 -0600 Subject: [PATCH 050/368] Try fixing @internal import in tests --- packages/toolkit/vitest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 38eadf7722..96054b5bcc 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ // this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', - '@internal/': path.join(__dirname, './src/'), + '@internal': path.join(__dirname, './src'), }, deps: { interopDefault: true, From 25d7c36c12e5c8ae14ffa03f9322620e18429c54 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:20:36 -0600 Subject: [PATCH 051/368] Fix formatting issue in `vitest.config.ts` --- packages/toolkit/vitest.config.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 96054b5bcc..c65f978f92 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -14,10 +14,7 @@ export default defineConfig({ setupFiles: ['./vitest.setup.js'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { - '@reduxjs/toolkit/query/react': path.join( - __dirname, - './src/query/react/index.ts' - ), // @remap-prod-remove-line + '@reduxjs/toolkit/query/react': path.join(__dirname,'./src/query/react/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/query': path.join(__dirname, './src/query/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/react': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line From a65a81f167df7163befff5c9a18941bd8aa3ec40 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:24:47 -0600 Subject: [PATCH 052/368] Update more snapshots --- .../src/query/tests/defaultSerializeQueryArgs.test.ts | 8 ++++---- .../tests/serializableStateInvariantMiddleware.test.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts index 9ec8a07dd7..45bd57cbb8 100644 --- a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts +++ b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts @@ -10,7 +10,7 @@ test('string arg', () => { endpointName, queryArgs: 'arg', }) - ).toMatchInlineSnapshot(`"test(\\"arg\\")"`) + ).toMatchInlineSnapshot(`"test("arg")"`) }) test('number arg', () => { @@ -30,7 +30,7 @@ test('simple object arg is sorted', () => { endpointName, queryArgs: { name: 'arg', age: 5 }, }) - ).toMatchInlineSnapshot(`"test({\\"age\\":5,\\"name\\":\\"arg\\"})"`) + ).toMatchInlineSnapshot(`"test({"age":5,"name":"arg"})"`) }) test('nested object arg is sorted recursively', () => { @@ -41,7 +41,7 @@ test('nested object arg is sorted recursively', () => { queryArgs: { name: { last: 'Split', first: 'Banana' }, age: 5 }, }) ).toMatchInlineSnapshot( - `"test({\\"age\\":5,\\"name\\":{\\"first\\":\\"Banana\\",\\"last\\":\\"Split\\"}})"` + `"test({"age":5,"name":{"first":"Banana","last":"Split"}})"` ) }) @@ -70,7 +70,7 @@ test('Fully serializes a deeply nested object', () => { queryArgs: nestedObj, }) expect(res).toMatchInlineSnapshot( - `"test({\\"a\\":{\\"a1\\":{\\"a11\\":{\\"a111\\":1}}},\\"b\\":{\\"b1\\":{\\"b11\\":2},\\"b2\\":{\\"b21\\":3}}})"` + `"test({"a":{"a1":{"a11":{"a111":1}}},"b":{"b1":{"b11":2},"b2":{"b21":3}}})"` ) }) diff --git a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts index 60e4e3b5a3..d9413671ed 100644 --- a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts +++ b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts @@ -112,8 +112,8 @@ describe('serializableStateInvariantMiddleware', () => { expect(getLog().log).toMatchInlineSnapshot(` "A non-serializable value was detected in an action, in the path: \`payload\`. Value: Symbol(SOME_CONSTANT) Take a look at the logic that dispatched this action: Object { - \\"payload\\": Symbol(SOME_CONSTANT), - \\"type\\": \\"an-action\\", + "payload": Symbol(SOME_CONSTANT), + "type": "an-action", } (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants) (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)" @@ -369,10 +369,10 @@ describe('serializableStateInvariantMiddleware', () => { expect(getLog().log).toMatchInlineSnapshot(` "A non-serializable value was detected in an action, in the path: \`meta.arg\`. Value: Map {} Take a look at the logic that dispatched this action: Object { - \\"meta\\": Object { - \\"arg\\": Map {}, + "meta": Object { + "arg": Map {}, }, - \\"type\\": \\"test\\", + "type": "test", } (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants) (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)" From b162492e2d4eb4bd84a7532fca2ef01a8b50158d Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 5 Jan 2024 23:32:04 +0000 Subject: [PATCH 053/368] Add test --- .../src/query/tests/buildCreateApi.test.tsx | 68 ++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index 999d34693d..80cc7736ba 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -35,7 +35,12 @@ import { server } from './mocks/server' import type { UnknownAction } from 'redux' import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import type { SerializedError } from '@reduxjs/toolkit' -import { createListenerMiddleware, configureStore } from '@reduxjs/toolkit' +import { + createListenerMiddleware, + configureStore, + lruMemoize, + createSelectorCreator, +} from '@reduxjs/toolkit' import { delay } from '../../utils' const MyContext = React.createContext(null as any) @@ -123,4 +128,65 @@ describe('buildCreateApi', () => { `"When using custom hooks for context, all 3 hooks need to be provided: useDispatch, useSelector, useStore.\nHook useStore was either not provided or not a function."` ) }) + test('allows passing createSelector instance', async () => { + const memoize = vi.fn(lruMemoize) + const createSelector = createSelectorCreator(memoize) + const createApi = buildCreateApi( + coreModule({ createSelector }), + reactHooksModule({ createSelector }) + ) + const api = createApi({ + baseQuery: async (arg: any) => { + await waitMs() + + return { + data: arg?.body ? { ...arg.body } : {}, + } + }, + endpoints: (build) => ({ + getUser: build.query<{ name: string }, number>({ + query: () => ({ + body: { name: 'Timmy' }, + }), + }), + }), + }) + + const storeRef = setupApiStore(api, {}, { withoutTestLifecycles: true }) + + await storeRef.store.dispatch(api.endpoints.getUser.initiate(1)) + + const selectUser = api.endpoints.getUser.select(1) + + expect(selectUser(storeRef.store.getState()).data).toEqual({ + name: 'Timmy', + }) + + expect(memoize).toHaveBeenCalledTimes(4) + + memoize.mockClear() + + function User() { + const { isFetching } = api.endpoints.getUser.useQuery(1) + + return ( +
+
{String(isFetching)}
+
+ ) + } + + function Wrapper({ children }: any) { + return {children} + } + + render(, { wrapper: Wrapper }) + + await waitFor(() => + expect(screen.getByTestId('isFetching').textContent).toBe('false') + ) + + // select() + selectFromResult + expect(memoize).toHaveBeenCalledTimes(8) + }) }) From f382b348dbad62f4d1ef7b4295eff3e3b7c6c766 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 5 Jan 2024 23:37:52 +0000 Subject: [PATCH 054/368] Add docs --- .../usage/customizing-create-api.mdx | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/rtk-query/usage/customizing-create-api.mdx b/docs/rtk-query/usage/customizing-create-api.mdx index 2f4d53cfb8..1dd54d4ea8 100644 --- a/docs/rtk-query/usage/customizing-create-api.mdx +++ b/docs/rtk-query/usage/customizing-create-api.mdx @@ -35,7 +35,7 @@ import { reactHooksModule, } from '@reduxjs/toolkit/query/react' -const MyContext = React.createContext(null as any) +const MyContext = React.createContext(null) const customCreateApi = buildCreateApi( coreModule(), reactHooksModule({ @@ -48,6 +48,27 @@ const customCreateApi = buildCreateApi( ) ``` +## Customizing `createSelector` for RTKQ + +Both `coreModule` and `reactHooksModule` accept a `createSelector` option which should be a selector creator instance from Reselect or with an equivalent signature. + +```ts +import * as React from 'react' +import { createSelectorCreator, lruMemoize } from '@reduxjs/toolkit' +import { + buildCreateApi, + coreModule, + reactHooksModule, +} from '@reduxjs/toolkit/query/react' + +const createLruSelector = createSelectorCreator(lruMemoize) + +const customCreateApi = buildCreateApi( + coreModule({ createSelector: createLruSelector }), + reactHooksModule({ createSelector: createLruSelector }) +) +``` + ## Creating your own module If you want to create your own module, you should review [the react-hooks module](https://github.com/reduxjs/redux-toolkit/blob/b74a52935a5840bebca5acdc8e2265e3b6497afa/src/query/react/module.ts) to see what an implementation would look like. From 7fe5413ab0f89fe7162573c7de24e170e7064b6b Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 5 Jan 2024 23:44:41 +0000 Subject: [PATCH 055/368] change example back to v8 usage --- docs/rtk-query/usage/customizing-create-api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rtk-query/usage/customizing-create-api.mdx b/docs/rtk-query/usage/customizing-create-api.mdx index 1dd54d4ea8..bb1ccf4e1c 100644 --- a/docs/rtk-query/usage/customizing-create-api.mdx +++ b/docs/rtk-query/usage/customizing-create-api.mdx @@ -35,7 +35,7 @@ import { reactHooksModule, } from '@reduxjs/toolkit/query/react' -const MyContext = React.createContext(null) +const MyContext = React.createContext(null as any) const customCreateApi = buildCreateApi( coreModule(), reactHooksModule({ From 31a86c824804ff0f500c8daed901b822d9989c52 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 18:43:20 -0600 Subject: [PATCH 056/368] Add Vitest config for type tests --- packages/toolkit/vitest.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index c65f978f92..f63d6d3409 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -9,12 +9,13 @@ const __dirname = path.dirname(__filename) export default defineConfig({ test: { + typecheck: { only: true, tsconfig: './src/tests/tsconfig.typetests.json' }, globals: true, environment: 'jsdom', setupFiles: ['./vitest.setup.js'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { - '@reduxjs/toolkit/query/react': path.join(__dirname,'./src/query/react/index.ts'), // @remap-prod-remove-line + '@reduxjs/toolkit/query/react': path.join(__dirname, './src/query/react/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/query': path.join(__dirname, './src/query/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/react': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line From ad99ac0f9c7ba1fde03660a78ff5b1612a2b8e27 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 18:43:51 -0600 Subject: [PATCH 057/368] Slightly modify `tsconfig.typetests.json` to include all source files --- packages/toolkit/src/tests/tsconfig.typetests.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index f63fa81c64..aac6a11a8e 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -1,6 +1,8 @@ { "extends": "../../tsconfig.test.json", "compilerOptions": { - "skipLibCheck": true - } + "skipLibCheck": true, + "rootDir": "../../src" + }, + "include": ["../../src/**/*.ts*"] } From 856b525c6d652c534a5ba12cfb213dbfe1831e15 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 18:44:18 -0600 Subject: [PATCH 058/368] Add some type tests for `startListening.withTypes` --- .../tests/listenerMiddleware.test-d.ts | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts index 02d4ee1700..f35e81a017 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts @@ -1,10 +1,13 @@ +import type { TypedStartListening } from '@reduxjs/toolkit' +import { + configureStore, + createAsyncThunk, + createListenerMiddleware, + createSlice, +} from '@reduxjs/toolkit' import type { Action } from 'redux' import type { ThunkAction } from 'redux-thunk' import { expectTypeOf } from 'vitest' -import { createListenerMiddleware } from '..' -import { configureStore } from '../../configureStore' -import { createAsyncThunk } from '../../createAsyncThunk' -import { createSlice } from '../../createSlice' export interface CounterState { counter: number @@ -69,27 +72,30 @@ describe('listenerMiddleware.withTypes()', () => { CounterState, AppDispatch >() + + expectTypeOf(startAppListening).toEqualTypeOf< + TypedStartListening + >() + startAppListening({ predicate: increment.match, effect: async (_, listenerApi) => { const stateBefore = listenerApi.getState() + expectTypeOf(stateBefore).toEqualTypeOf() + let takeResult = await listenerApi.take(increment.match, timeout) const stateCurrent = listenerApi.getState() - expect(takeResult).toEqual([increment(), stateCurrent, stateBefore]) + + expectTypeOf(stateCurrent).toEqualTypeOf() timeout = 1 takeResult = await listenerApi.take(increment.match, timeout) - expect(takeResult).toBeNull() - - expectTypeOf< - typeof takeResult - >(takeResult).toEqualTypeOf() done = true }, }) }) - test('addListener.withTypes', () => {}) + test.todo('addListener.withTypes', () => {}) }) From 00e99f12504064c32efdf0aeb015e55adcad076f Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sat, 6 Jan 2024 09:49:07 +0000 Subject: [PATCH 059/368] remove unused import --- packages/toolkit/src/query/react/buildHooks.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index b31d33a72c..2a3e2cc93d 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -4,7 +4,6 @@ import type { ThunkAction, ThunkDispatch, } from '@reduxjs/toolkit' -import { createSelector } from '@reduxjs/toolkit' import type { DependencyList } from 'react' import { useCallback, From 4920bb7d779117616c2d1c424846b9010528b765 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 03:19:05 -0600 Subject: [PATCH 060/368] Add `stopListening.withTypes` --- .../toolkit/src/listenerMiddleware/index.ts | 16 ++-- .../tests/listenerMiddleware.test-d.ts | 76 ++++++++++++--- .../tests/listenerMiddleware.test.ts | 2 +- .../toolkit/src/listenerMiddleware/types.ts | 95 +++++++++++++------ 4 files changed, 137 insertions(+), 52 deletions(-) diff --git a/packages/toolkit/src/listenerMiddleware/index.ts b/packages/toolkit/src/listenerMiddleware/index.ts index 619029c831..88d253b4cd 100644 --- a/packages/toolkit/src/listenerMiddleware/index.ts +++ b/packages/toolkit/src/listenerMiddleware/index.ts @@ -281,9 +281,9 @@ const safelyNotifyError = ( /** * @public */ -export const addListener = createAction( - `${alm}/add` -) as TypedAddListener +export const addListener = Object.assign(createAction(`${alm}/add`), { + withTypes: () => addListener, +}) as unknown as TypedAddListener /** * @public @@ -293,9 +293,9 @@ export const clearAllListeners = createAction(`${alm}/removeAll`) /** * @public */ -export const removeListener = createAction( - `${alm}/remove` -) as TypedRemoveListener +export const removeListener = Object.assign(createAction(`${alm}/remove`), { + withTypes: () => removeListener, +}) as unknown as TypedRemoveListener const defaultErrorHandler: ListenerErrorHandler = (...args: unknown[]) => { console.error(`${alm}/error`, ...args) @@ -373,6 +373,10 @@ export const createListenerMiddleware = < return !!entry } + Object.assign(stopListening, { + withTypes: () => stopListening, + }) + const notifyListener = async ( entry: ListenerEntry>, action: unknown, diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts index f35e81a017..7b0196016b 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts @@ -1,12 +1,19 @@ -import type { TypedStartListening } from '@reduxjs/toolkit' +import type { + Action, + ThunkAction, + TypedAddListener, + TypedRemoveListener, + TypedStartListening, + TypedStopListening, +} from '@reduxjs/toolkit' import { + addListener, configureStore, createAsyncThunk, createListenerMiddleware, createSlice, + removeListener, } from '@reduxjs/toolkit' -import type { Action } from 'redux' -import type { ThunkAction } from 'redux-thunk' import { expectTypeOf } from 'vitest' export interface CounterState { @@ -44,13 +51,13 @@ export const incrementAsync = createAsyncThunk( const { increment } = counterSlice.actions -const counterStore = configureStore({ +const store = configureStore({ reducer: counterSlice.reducer, }) -type AppStore = typeof counterStore -type AppDispatch = typeof counterStore.dispatch -type RootState = ReturnType +type AppStore = typeof store +type AppDispatch = typeof store.dispatch +type RootState = ReturnType type AppThunk = ThunkAction< ThunkReturnType, RootState, @@ -64,30 +71,36 @@ describe('listenerMiddleware.withTypes()', () => { let done = false type ExpectedTakeResultType = - | readonly [ReturnType, CounterState, CounterState] + | [ReturnType, RootState, RootState] | null test('startListening.withTypes', () => { const startAppListening = listenerMiddleware.startListening.withTypes< - CounterState, + RootState, AppDispatch >() expectTypeOf(startAppListening).toEqualTypeOf< - TypedStartListening + TypedStartListening >() startAppListening({ predicate: increment.match, - effect: async (_, listenerApi) => { + effect: async (action, listenerApi) => { const stateBefore = listenerApi.getState() - expectTypeOf(stateBefore).toEqualTypeOf() + expectTypeOf(increment).returns.toEqualTypeOf(action) + + expectTypeOf(listenerApi.dispatch).toEqualTypeOf() + + expectTypeOf(stateBefore).toEqualTypeOf() let takeResult = await listenerApi.take(increment.match, timeout) const stateCurrent = listenerApi.getState() - expectTypeOf(stateCurrent).toEqualTypeOf() + expectTypeOf(takeResult).toEqualTypeOf() + + expectTypeOf(stateCurrent).toEqualTypeOf() timeout = 1 takeResult = await listenerApi.take(increment.match, timeout) @@ -97,5 +110,40 @@ describe('listenerMiddleware.withTypes()', () => { }) }) - test.todo('addListener.withTypes', () => {}) + test('addListener.withTypes', () => { + const addAppListener = addListener.withTypes() + + expectTypeOf(addAppListener).toEqualTypeOf< + TypedAddListener + >() + + store.dispatch( + addAppListener({ + matcher: increment.match, + effect: (action, listenerApi) => { + const state = listenerApi.getState() + + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(listenerApi.dispatch).toEqualTypeOf() + }, + }) + ) + }) + + test('removeListener.withTypes', () => { + const removeAppListener = removeListener.withTypes() + + expectTypeOf(removeAppListener).toEqualTypeOf< + TypedRemoveListener + >() + }) + + test('stopListening.withTypes', () => { + const stopAppListening = listenerMiddleware.stopListening.withTypes() + + expectTypeOf(stopAppListening).toEqualTypeOf< + TypedStopListening + >() + }) }) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts index 584eb58a69..c6af789516 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts @@ -564,7 +564,7 @@ describe('createListenerMiddleware', () => { typeof store.getState, typeof store.dispatch >, - 'effect' + 'effect' | 'withTypes' > ][] = [ ['predicate', { predicate: () => true }], diff --git a/packages/toolkit/src/listenerMiddleware/types.ts b/packages/toolkit/src/listenerMiddleware/types.ts index 34b1ba7721..91d338aeaf 100644 --- a/packages/toolkit/src/listenerMiddleware/types.ts +++ b/packages/toolkit/src/listenerMiddleware/types.ts @@ -336,13 +336,18 @@ export interface ListenerMiddlewareInstance< ExtraArgument = unknown > { middleware: ListenerMiddleware + startListening: AddListenerOverloads< UnsubscribeListener, StateType, DispatchType, ExtraArgument - > - stopListening: RemoveListenerOverloads + > & + TypedStartListening + + stopListening: RemoveListenerOverloads & + TypedStopListening + /** * Unsubscribes all listeners, cancels running listeners and tasks. */ @@ -494,11 +499,6 @@ export interface AddListenerOverloads< > } & AdditionalOptions ): Return - - withTypes: < - OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType - >() => TypedStartListening } /** @public */ @@ -515,12 +515,7 @@ export type RemoveListenerOverloads< DispatchType, any, UnsubscribeListenerOptions -> & { - withTypes: < - OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType - >() => TypedRemoveListener -} +> /** @public */ export interface RemoveListenerAction< @@ -566,46 +561,84 @@ export type TypedAddListener< * A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed */ export type TypedRemoveListener< StateType, - DispatchType extends ReduxDispatch = ThunkDispatch, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + >, Payload = ListenerEntry, T extends string = 'listenerMiddleware/remove' -> = BaseActionCreator & - AddListenerOverloads< +> = BaseActionCreator & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedRemoveListener +} & AddListenerOverloads< PayloadAction, StateType, DispatchType, any, UnsubscribeListenerOptions > - // & { - // withTypes: < - // OverrideStateType extends StateType, - // OverrideDispatchType extends DispatchType - // >() => TypedRemoveListener<> - // } /** * @public * A "pre-typed" version of `middleware.startListening`, so the listener args are well-typed */ export type TypedStartListening< - State, - Dispatch extends ReduxDispatch = ThunkDispatch, + StateType, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + >, ExtraArgument = unknown -> = AddListenerOverloads +> = AddListenerOverloads< + UnsubscribeListener, + StateType, + DispatchType, + ExtraArgument +> & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedStartListening +} /** @public * A "pre-typed" version of `middleware.stopListening`, so the listener args are well-typed */ export type TypedStopListening< - State, - Dispatch extends ReduxDispatch = ThunkDispatch -> = RemoveListenerOverloads + StateType, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + > +> = RemoveListenerOverloads & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedStopListening +} /** @public * A "pre-typed" version of `createListenerEntry`, so the listener args are well-typed */ export type TypedCreateListenerEntry< - State, - Dispatch extends ReduxDispatch = ThunkDispatch -> = AddListenerOverloads, State, Dispatch> + StateType, + DispatchType extends ReduxDispatch = ThunkDispatch< + StateType, + unknown, + UnknownAction + > +> = AddListenerOverloads< + ListenerEntry, + StateType, + DispatchType +> & { + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends DispatchType + >() => TypedStopListening +} /** * Internal Types From 785484ac3eba7f0c319d3ace5904505f6c42d646 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 03:22:17 -0600 Subject: [PATCH 061/368] Rename `listenerMiddleware.test-d.ts` to `listenerMiddleware.withTypes.test-d.ts` --- ...iddleware.test-d.ts => listenerMiddleware.withTypes.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/listenerMiddleware/tests/{listenerMiddleware.test-d.ts => listenerMiddleware.withTypes.test-d.ts} (100%) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts similarity index 100% rename from packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts rename to packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts From b3f526a410d792b6f5f4a3a8af22ba09814db157 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 03:58:38 -0600 Subject: [PATCH 062/368] Add runtime tests for `listenerMiddleware.withTypes` --- .../listenerMiddleware.withTypes.test.ts | 112 ++++++++++++++++++ .../toolkit/src/tests/tsconfig.typetests.json | 6 +- 2 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts new file mode 100644 index 0000000000..8d2164fc8b --- /dev/null +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts @@ -0,0 +1,112 @@ +import type { Action } from 'redux' +import type { ThunkAction } from 'redux-thunk' +import { describe, expect, test } from 'vitest' +import { configureStore } from '../../configureStore' +import { createAsyncThunk } from '../../createAsyncThunk' +import { createSlice } from '../../createSlice' +import { addListener, createListenerMiddleware, removeListener } from '../index' + +export interface CounterState { + counter: number +} + +const initialState: CounterState = { + counter: 0, +} + +export const counterSlice = createSlice({ + name: 'counter', + initialState, + reducers: { + increment(state) { + state.counter++ + }, + }, +}) + +export function fetchCount(amount = 1) { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + // The value we return becomes the `fulfilled` action payload + return response.data + } +) + +const { increment } = counterSlice.actions + +const store = configureStore({ + reducer: counterSlice.reducer, +}) + +type AppStore = typeof store +type AppDispatch = typeof store.dispatch +type RootState = ReturnType +type AppThunk = ThunkAction< + ThunkReturnType, + RootState, + unknown, + Action +> + +const listenerMiddleware = createListenerMiddleware() + +const startAppListening = listenerMiddleware.startListening.withTypes< + RootState, + AppDispatch +>() + +const stopAppListening = listenerMiddleware.stopListening.withTypes< + RootState, + AppDispatch +>() + +const addAppListener = addListener.withTypes() + +const removeAppListener = removeListener.withTypes() + +describe(startAppListening.withTypes, () => { + test('should return startListening', () => { + expect(startAppListening.withTypes).to.be.a('function') + + expect(startAppListening.withTypes().withTypes).to.be.a('function') + + expect(startAppListening).toBe(listenerMiddleware.startListening) + }) +}) + +describe(stopAppListening.withTypes, () => { + test('should return stopListening', () => { + expect(stopAppListening.withTypes).to.be.a('function') + + expect(stopAppListening.withTypes().withTypes).to.be.a('function') + + expect(stopAppListening).toBe(listenerMiddleware.stopListening) + }) +}) + +describe(addAppListener.withTypes, () => { + test('should return addListener', () => { + expect(addAppListener.withTypes).to.be.a('function') + + expect(addAppListener.withTypes().withTypes).to.be.a('function') + + expect(addAppListener).toBe(addListener) + }) +}) + +describe(removeAppListener.withTypes, () => { + test('should return removeListener', () => { + expect(removeAppListener.withTypes).to.be.a('function') + + expect(removeAppListener.withTypes().withTypes).to.be.a('function') + + expect(removeAppListener).toBe(removeListener) + }) +}) diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index aac6a11a8e..0b5e414b7e 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.test.json", "compilerOptions": { "skipLibCheck": true, - "rootDir": "../../src" - }, - "include": ["../../src/**/*.ts*"] + // "rootDir": "../../src" + } + // "include": ["../../src/**/*.ts*"] } From 5b8885badcb3385361d56036094722924bb1cddf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 04:11:11 -0600 Subject: [PATCH 063/368] Fix `tsconfig` for type tests --- packages/toolkit/src/tests/tsconfig.typetests.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index 0b5e414b7e..3d14787422 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -2,7 +2,12 @@ "extends": "../../tsconfig.test.json", "compilerOptions": { "skipLibCheck": true, - // "rootDir": "../../src" - } - // "include": ["../../src/**/*.ts*"] + "rootDir": "../../src" + }, + "include": [ + // "../../src/**/*.ts*", + "../dynamicMiddleware", + "../entities", + "../listenerMiddleware" + ] } From fb02311c135d675a7df96dfa808da2a2dec17e1b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 06:07:49 -0600 Subject: [PATCH 064/368] Add JSDocs for `listenerMiddleware.withTypes` --- .../listenerMiddleware.withTypes.test-d.ts | 7 +- .../listenerMiddleware.withTypes.test.ts | 28 +-- .../toolkit/src/listenerMiddleware/types.ts | 191 ++++++++++++++++-- .../toolkit/src/tests/tsconfig.typetests.json | 7 +- 4 files changed, 195 insertions(+), 38 deletions(-) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts index 7b0196016b..3d6a3d1775 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts @@ -14,7 +14,7 @@ import { createSlice, removeListener, } from '@reduxjs/toolkit' -import { expectTypeOf } from 'vitest' +import { describe, expectTypeOf, test } from 'vitest' export interface CounterState { counter: number @@ -140,7 +140,10 @@ describe('listenerMiddleware.withTypes()', () => { }) test('stopListening.withTypes', () => { - const stopAppListening = listenerMiddleware.stopListening.withTypes() + const stopAppListening = listenerMiddleware.stopListening.withTypes< + RootState, + AppDispatch + >() expectTypeOf(stopAppListening).toEqualTypeOf< TypedStopListening diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts index 8d2164fc8b..c962aa0274 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts @@ -71,41 +71,45 @@ const addAppListener = addListener.withTypes() const removeAppListener = removeListener.withTypes() -describe(startAppListening.withTypes, () => { +describe('startAppListening.withTypes', () => { test('should return startListening', () => { - expect(startAppListening.withTypes).to.be.a('function') + expect(startAppListening.withTypes).toEqual(expect.any(Function)) - expect(startAppListening.withTypes().withTypes).to.be.a('function') + expect(startAppListening.withTypes().withTypes).toEqual( + expect.any(Function) + ) expect(startAppListening).toBe(listenerMiddleware.startListening) }) }) -describe(stopAppListening.withTypes, () => { +describe('stopAppListening.withTypes', () => { test('should return stopListening', () => { - expect(stopAppListening.withTypes).to.be.a('function') + expect(stopAppListening.withTypes).toEqual(expect.any(Function)) - expect(stopAppListening.withTypes().withTypes).to.be.a('function') + expect(stopAppListening.withTypes().withTypes).toEqual(expect.any(Function)) expect(stopAppListening).toBe(listenerMiddleware.stopListening) }) }) -describe(addAppListener.withTypes, () => { +describe('addAppListener.withTypes', () => { test('should return addListener', () => { - expect(addAppListener.withTypes).to.be.a('function') + expect(addAppListener.withTypes).toEqual(expect.any(Function)) - expect(addAppListener.withTypes().withTypes).to.be.a('function') + expect(addAppListener.withTypes().withTypes).toEqual(expect.any(Function)) expect(addAppListener).toBe(addListener) }) }) -describe(removeAppListener.withTypes, () => { +describe('removeAppListener.withTypes', () => { test('should return removeListener', () => { - expect(removeAppListener.withTypes).to.be.a('function') + expect(removeAppListener.withTypes).toEqual(expect.any(Function)) - expect(removeAppListener.withTypes().withTypes).to.be.a('function') + expect(removeAppListener.withTypes().withTypes).toEqual( + expect.any(Function) + ) expect(removeAppListener).toBe(removeListener) }) diff --git a/packages/toolkit/src/listenerMiddleware/types.ts b/packages/toolkit/src/listenerMiddleware/types.ts index 91d338aeaf..fc6a304224 100644 --- a/packages/toolkit/src/listenerMiddleware/types.ts +++ b/packages/toolkit/src/listenerMiddleware/types.ts @@ -531,8 +531,10 @@ export interface RemoveListenerAction< } /** + * A "pre-typed" version of `addListenerAction`, so the listener args are well-typed + * * @public - * A "pre-typed" version of `addListenerAction`, so the listener args are well-typed */ + */ export type TypedAddListener< StateType, DispatchType extends ReduxDispatch = ThunkDispatch< @@ -550,15 +552,42 @@ export type TypedAddListener< DispatchType, ExtraArgument > & { + /** + * Creates a "pre-typed" version of `addListener` + * where the `state` and `dispatch` types are predefined. + * + * This allows you to set the `state` and `dispatch` types once, + * eliminating the need to specify them with every `addListener` call. + * + * @returns A pre-typed `addListener` with the state and dispatch types already defined. + * + * @example + * ```ts + * import { addListener } from '@reduxjs/toolkit' + * + * export const addAppListener = addListener.withTypes() + * ``` + * + * @template OverrideStateType - The specific type of state the middleware listener operates on. + * @template OverrideDispatchType - The specific type of the dispatch function. + * + * @since 2.1.0 + */ withTypes: < OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType + OverrideDispatchType extends ReduxDispatch = ThunkDispatch< + OverrideStateType, + unknown, + UnknownAction + > >() => TypedAddListener } /** + * A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed + * * @public - * A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed */ + */ export type TypedRemoveListener< StateType, DispatchType extends ReduxDispatch = ThunkDispatch< @@ -568,22 +597,50 @@ export type TypedRemoveListener< >, Payload = ListenerEntry, T extends string = 'listenerMiddleware/remove' -> = BaseActionCreator & { - withTypes: < - OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType - >() => TypedRemoveListener -} & AddListenerOverloads< +> = BaseActionCreator & + AddListenerOverloads< PayloadAction, StateType, DispatchType, any, UnsubscribeListenerOptions - > + > & { + /** + * Creates a "pre-typed" version of `removeListener` + * where the `state` and `dispatch` types are predefined. + * + * This allows you to set the `state` and `dispatch` types once, + * eliminating the need to specify them with every `removeListener` call. + * + * @returns A pre-typed `removeListener` with the state and dispatch types already defined. + * + * @example + * ```ts + * import { removeListener } from '@reduxjs/toolkit' + * + * export const removeAppListener = removeListener.withTypes() + * ``` + * + * @template OverrideStateType - The specific type of state the middleware listener operates on. + * @template OverrideDispatchType - The specific type of the dispatch function. + * + * @since 2.1.0 + */ + withTypes: < + OverrideStateType extends StateType, + OverrideDispatchType extends ReduxDispatch = ThunkDispatch< + OverrideStateType, + unknown, + UnknownAction + > + >() => TypedRemoveListener + } /** + * A "pre-typed" version of `middleware.startListening`, so the listener args are well-typed + * * @public - * A "pre-typed" version of `middleware.startListening`, so the listener args are well-typed */ + */ export type TypedStartListening< StateType, DispatchType extends ReduxDispatch = ThunkDispatch< @@ -598,14 +655,49 @@ export type TypedStartListening< DispatchType, ExtraArgument > & { + /** + * Creates a "pre-typed" version of + * {@linkcode ListenerMiddlewareInstance.startListening startListening} + * where the `state` and `dispatch` types are predefined. + * + * This allows you to set the `state` and `dispatch` types once, + * eliminating the need to specify them with every + * {@linkcode ListenerMiddlewareInstance.startListening startListening} call. + * + * @returns A pre-typed `startListening` with the state and dispatch types already defined. + * + * @example + * ```ts + * import { createListenerMiddleware } from '@reduxjs/toolkit' + * + * const listenerMiddleware = createListenerMiddleware() + * + * export const startAppListening = listenerMiddleware.startListening.withTypes< + * RootState, + * AppDispatch + * >() + * ``` + * + * @template OverrideStateType - The specific type of state the middleware listener operates on. + * @template OverrideDispatchType - The specific type of the dispatch function. + * + * @since 2.1.0 + */ withTypes: < OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType + OverrideDispatchType extends ReduxDispatch = ThunkDispatch< + OverrideStateType, + unknown, + UnknownAction + > >() => TypedStartListening } -/** @public - * A "pre-typed" version of `middleware.stopListening`, so the listener args are well-typed */ +/** + * A "pre-typed" version of `middleware.stopListening`, so the listener args are well-typed + * + * @public + */ export type TypedStopListening< StateType, DispatchType extends ReduxDispatch = ThunkDispatch< @@ -614,14 +706,49 @@ export type TypedStopListening< UnknownAction > > = RemoveListenerOverloads & { + /** + * Creates a "pre-typed" version of + * {@linkcode ListenerMiddlewareInstance.stopListening stopListening} + * where the `state` and `dispatch` types are predefined. + * + * This allows you to set the `state` and `dispatch` types once, + * eliminating the need to specify them with every + * {@linkcode ListenerMiddlewareInstance.stopListening stopListening} call. + * + * @returns A pre-typed `stopListening` with the state and dispatch types already defined. + * + * @example + * ```ts + * import { createListenerMiddleware } from '@reduxjs/toolkit' + * + * const listenerMiddleware = createListenerMiddleware() + * + * export const stopAppListening = listenerMiddleware.stopListening.withTypes< + * RootState, + * AppDispatch + * >() + * ``` + * + * @template OverrideStateType - The specific type of state the middleware listener operates on. + * @template OverrideDispatchType - The specific type of the dispatch function. + * + * @since 2.1.0 + */ withTypes: < OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType + OverrideDispatchType extends ReduxDispatch = ThunkDispatch< + OverrideStateType, + unknown, + UnknownAction + > >() => TypedStopListening } -/** @public - * A "pre-typed" version of `createListenerEntry`, so the listener args are well-typed */ +/** + * A "pre-typed" version of `createListenerEntry`, so the listener args are well-typed + * + * @public + */ export type TypedCreateListenerEntry< StateType, DispatchType extends ReduxDispatch = ThunkDispatch< @@ -634,9 +761,37 @@ export type TypedCreateListenerEntry< StateType, DispatchType > & { + /** + * Creates a "pre-typed" version of `createListenerEntry` + * where the `state` and `dispatch` types are predefined. + * + * This allows you to set the `state` and `dispatch` types once, eliminating + * the need to specify them with every `createListenerEntry` call. + * + * @returns A pre-typed `createListenerEntry` with the state and dispatch types already defined. + * + * @example + * ```ts + * import { createListenerEntry } from '@reduxjs/toolkit' + * + * export const createAppListenerEntry = createListenerEntry.withTypes< + * RootState, + * AppDispatch + * >() + * ``` + * + * @template OverrideStateType - The specific type of state the middleware listener operates on. + * @template OverrideDispatchType - The specific type of the dispatch function. + * + * @since 2.1.0 + */ withTypes: < OverrideStateType extends StateType, - OverrideDispatchType extends DispatchType + OverrideDispatchType extends ReduxDispatch = ThunkDispatch< + OverrideStateType, + unknown, + UnknownAction + > >() => TypedStopListening } diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index 3d14787422..5fe2280ed9 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -4,10 +4,5 @@ "skipLibCheck": true, "rootDir": "../../src" }, - "include": [ - // "../../src/**/*.ts*", - "../dynamicMiddleware", - "../entities", - "../listenerMiddleware" - ] + "include": ["../dynamicMiddleware", "../entities", "../listenerMiddleware"] } From 5d802e0a5d5ec0f9b48864a8fe78d73d98d97634 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 7 Jan 2024 06:16:51 -0600 Subject: [PATCH 065/368] Add `listenerMiddleware.withTypes` to docs --- docs/api/createListenerMiddleware.mdx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/api/createListenerMiddleware.mdx b/docs/api/createListenerMiddleware.mdx index 58dd06dacb..7c626174c4 100644 --- a/docs/api/createListenerMiddleware.mdx +++ b/docs/api/createListenerMiddleware.mdx @@ -486,21 +486,16 @@ To fix this, the middleware provides types for defining "pre-typed" versions of ```ts no-transpile // listenerMiddleware.ts import { createListenerMiddleware, addListener } from '@reduxjs/toolkit' -import type { TypedStartListening, TypedAddListener } from '@reduxjs/toolkit' - import type { RootState, AppDispatch } from './store' export const listenerMiddleware = createListenerMiddleware() -export type AppStartListening = TypedStartListening - -export const startAppListening = - listenerMiddleware.startListening as AppStartListening - -export const addAppListener = addListener as TypedAddListener< +export const startAppListening = listenerMiddleware.startListening.withTypes< RootState, AppDispatch -> +>() + +export const addAppListener = addListener.withTypes() ``` Then import and use those pre-typed methods in your components. From ec946dcfee541417d50840c8ed4dc8b2edc26fe1 Mon Sep 17 00:00:00 2001 From: EskiMojo14 Date: Wed, 10 Jan 2024 20:35:07 +0000 Subject: [PATCH 066/368] fix inferrence and order of async thunk generics --- packages/toolkit/src/createSlice.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 0057873f8e..ea680a9e6e 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -350,7 +350,7 @@ interface AsyncThunkCreator< State, CurriedThunkApiConfig extends PreventCircular = PreventCircular > { - ( + ( payloadCreator: AsyncThunkPayloadCreator< Returned, ThunkArg, @@ -369,8 +369,8 @@ interface AsyncThunkCreator< CurriedThunkApiConfig > < - ThunkArg extends any, - Returned = unknown, + Returned, + ThunkArg, ThunkApiConfig extends PreventCircular = {} >( payloadCreator: AsyncThunkPayloadCreator< From 3646fdf7d3df45bb80da49c802ebc25f55af1481 Mon Sep 17 00:00:00 2001 From: EskiMojo14 Date: Wed, 10 Jan 2024 22:17:26 +0000 Subject: [PATCH 067/368] fix type test --- packages/toolkit/src/tests/createSlice.typetest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tests/createSlice.typetest.ts b/packages/toolkit/src/tests/createSlice.typetest.ts index 40488d7e9d..24c450f6ae 100644 --- a/packages/toolkit/src/tests/createSlice.typetest.ts +++ b/packages/toolkit/src/tests/createSlice.typetest.ts @@ -666,8 +666,8 @@ const value = actionCreators.anyKey } ), testExplicitType: create.asyncThunk< - TestArg, TestReturned, + TestArg, { rejectValue: TestReject } From 2baf5625b7cdc4c027ac7a5a537d297a99fe81dd Mon Sep 17 00:00:00 2001 From: DmitryScaletta Date: Fri, 12 Jan 2024 12:15:44 +0300 Subject: [PATCH 068/368] Fix markdown links on Next.js page --- docs/usage/nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/nextjs.mdx b/docs/usage/nextjs.mdx index d46a5ea3a6..be73e79194 100644 --- a/docs/usage/nextjs.mdx +++ b/docs/usage/nextjs.mdx @@ -386,7 +386,7 @@ The App Router has four seperate caches including `fetch` request and route cach export const dynamic = 'force-dynamic' ``` -After a mutation you should also invalidate the cache by calling (`revalidatePath`)[https://nextjs.org/docs/app/api-reference/functions/revalidatePath] or (`revalidateTag`)[https://nextjs.org/docs/app/api-reference/functions/revalidateTag] as appropriate. +After a mutation you should also invalidate the cache by calling [`revalidatePath`](https://nextjs.org/docs/app/api-reference/functions/revalidatePath) or [`revalidateTag`](https://nextjs.org/docs/app/api-reference/functions/revalidateTag) as appropriate. ### RTK Query From 564f62fe74610ff53d2abcd32944f8ec7eca0284 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 12 Jan 2024 11:00:48 +0000 Subject: [PATCH 069/368] avoid relying on `this` in createSlice --- packages/toolkit/src/createSlice.ts | 118 ++++++++++-------- .../toolkit/src/tests/createSlice.test.ts | 10 ++ 2 files changed, 78 insertions(+), 50 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index ea680a9e6e..136cecd7a0 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -88,14 +88,13 @@ export interface Slice< /** * Get localised slice selectors (expects to be called with *just* the slice's state as the first parameter) */ - getSelectors(this: this): Id> + getSelectors(): Id> /** * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state) */ getSelectors( - this: this, - selectState: (this: this, rootState: RootState) => State + selectState: (rootState: RootState) => State ): Id> /** @@ -103,7 +102,7 @@ export interface Slice< * * Equivalent to `slice.getSelectors((state: RootState) => state[slice.reducerPath])`. */ - selectors: Id< + get selectors(): Id< SliceDefinedSelectors > @@ -126,7 +125,7 @@ export interface Slice< * * Will throw an error if slice is not found. */ - selectSlice(this: this, state: { [K in ReducerPath]: State }): State + selectSlice(state: { [K in ReducerPath]: State }): State } /** @@ -153,7 +152,7 @@ interface InjectedSlice< * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state) */ getSelectors( - selectState: (this: this, rootState: RootState) => State | undefined + selectState: (rootState: RootState) => State | undefined ): Id> /** @@ -161,7 +160,7 @@ interface InjectedSlice< * * Equivalent to `slice.getSelectors((state: RootState) => state[slice.name])`. */ - selectors: Id< + get selectors(): Id< SliceDefinedSelectors< State, Selectors, @@ -740,8 +739,8 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { const selectSelf = (state: State) => state - const injectedSelectorCache = new WeakMap< - Slice, + const injectedSelectorCache = new Map< + string, WeakMap< (rootState: any) => State | undefined, Record any> @@ -750,23 +749,42 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { let _reducer: ReducerWithInitialState - const slice: Slice = { - name, - reducerPath, - reducer(state, action) { - if (!_reducer) _reducer = buildReducer() + function reducer(state: State | undefined, action: UnknownAction) { + if (!_reducer) _reducer = buildReducer() - return _reducer(state, action) - }, - actions: context.actionCreators as any, - caseReducers: context.sliceCaseReducersByName as any, - getInitialState() { - if (!_reducer) _reducer = buildReducer() + return _reducer(state, action) + } - return _reducer.getInitialState() - }, - getSelectors(selectState: (rootState: any) => State = selectSelf) { - const selectorCache = emplace(injectedSelectorCache, this, { + function getInitialState() { + if (!_reducer) _reducer = buildReducer() + + return _reducer.getInitialState() + } + + function makeSelectorProps( + reducerPath: ReducerPath, + injected = false + ): Pick< + Slice, + 'getSelectors' | 'selectors' | 'selectSlice' | 'reducerPath' + > { + function selectSlice(state: { [K in ReducerPath]: State }) { + let sliceState = state[reducerPath] + if (typeof sliceState === 'undefined') { + if (injected) { + sliceState = getInitialState() + } else if (process.env.NODE_ENV !== 'production') { + throw new Error( + 'selectSlice returned undefined for an uninjected slice reducer' + ) + } + } + return sliceState + } + function getSelectors( + selectState: (rootState: any) => State = selectSelf + ) { + const selectorCache = emplace(injectedSelectorCache, reducerPath, { insert: () => new WeakMap(), }) @@ -777,39 +795,39 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { options.selectors ?? {} )) { map[name] = wrapSelector( - this, + { getInitialState }, selector, selectState, - this !== slice + injected ) } return map }, }) as any - }, - selectSlice(state) { - let sliceState = state[this.reducerPath] - if (typeof sliceState === 'undefined') { - // check if injectInto has been called - if (this !== slice) { - sliceState = this.getInitialState() - } else if (process.env.NODE_ENV !== 'production') { - throw new Error( - 'selectSlice returned undefined for an uninjected slice reducer' - ) - } - } - return sliceState - }, - get selectors() { - return this.getSelectors(this.selectSlice) - }, + } + return { + reducerPath, + getSelectors, + get selectors() { + return getSelectors(selectSlice) + }, + selectSlice, + } + } + + const slice: Slice = { + name, + reducer, + actions: context.actionCreators as any, + caseReducers: context.sliceCaseReducersByName as any, + getInitialState, + ...makeSelectorProps(reducerPath), injectInto(injectable, { reducerPath: pathOpt, ...config } = {}) { - const reducerPath = pathOpt ?? this.reducerPath - injectable.inject({ reducerPath, reducer: this.reducer }, config) + const newReducerPath = pathOpt ?? reducerPath + injectable.inject({ reducerPath: newReducerPath, reducer }, config) return { - ...this, - reducerPath, + ...slice, + ...makeSelectorProps(newReducerPath as any, true), } as any }, } @@ -818,13 +836,13 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { } function wrapSelector>( - slice: Slice, + slice: { getInitialState(): State }, selector: S, selectState: Selector, injected?: boolean ) { function wrapper(rootState: NewState, ...args: any[]) { - let sliceState = selectState.call(slice, rootState) + let sliceState = selectState(rootState) if (typeof sliceState === 'undefined') { if (injected) { sliceState = slice.getInitialState() diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 4856582c1e..e959cc9b93 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -493,6 +493,16 @@ describe('createSlice', () => { it('allows accessing properties on the selector', () => { expect(slice.selectors.selectMultiple.unwrapped.test).toBe(0) }) + it('has selectSlice attached to slice, which can go without this', () => { + const slice = createSlice({ + name: 'counter', + initialState: 42, + reducers: {}, + }) + const { selectSlice } = slice + expect(() => selectSlice({ counter: 42 })).not.toThrow() + expect(selectSlice({ counter: 42 })).toBe(42) + }) }) describe('slice injections', () => { it('uses injectInto to inject slice into combined reducer', () => { From a37bf90e3e6caee2719f38960cce3de57f41913d Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 12 Jan 2024 11:03:33 +0000 Subject: [PATCH 070/368] just pass getInitialState --- packages/toolkit/src/createSlice.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 136cecd7a0..01657d5ef1 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -795,7 +795,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { options.selectors ?? {} )) { map[name] = wrapSelector( - { getInitialState }, + getInitialState, selector, selectState, injected @@ -836,7 +836,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { } function wrapSelector>( - slice: { getInitialState(): State }, + getInitialState: () => State, selector: S, selectState: Selector, injected?: boolean @@ -845,7 +845,7 @@ function wrapSelector>( let sliceState = selectState(rootState) if (typeof sliceState === 'undefined') { if (injected) { - sliceState = slice.getInitialState() + sliceState = getInitialState() } else if (process.env.NODE_ENV !== 'production') { throw new Error( 'selectState returned undefined for an uninjected slice reducer' From c04e4700898bba1ccf9967728320c6c8a1764259 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 12 Jan 2024 11:05:09 +0000 Subject: [PATCH 071/368] pull over test cases from #4056 --- packages/toolkit/src/tests/createSlice.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index e959cc9b93..7a16d32e16 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -533,12 +533,21 @@ describe('createSlice', () => { expect(injectedSlice.selectSlice(uninjectedState)).toBe( slice.getInitialState() ) + expect(injectedSlice.selectors.selectMultiple({}, 1)).toBe( + slice.getInitialState() + ) + expect(injectedSlice.getSelectors().selectMultiple(undefined, 1)).toBe( + slice.getInitialState() + ) const injectedState = combinedReducer(undefined, increment()) expect(injectedSlice.selectSlice(injectedState)).toBe( slice.getInitialState() + 1 ) + expect(injectedSlice.selectors.selectMultiple(injectedState, 1)).toBe( + slice.getInitialState() + 1 + ) }) it('allows providing a custom name to inject under', () => { const slice = createSlice({ From f5c46a2aa86e80554cfe87f8fced438af595ac01 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 12 Jan 2024 11:11:01 +0000 Subject: [PATCH 072/368] change order of arguments --- packages/toolkit/src/createSlice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 01657d5ef1..c9f03d2d6a 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -795,9 +795,9 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { options.selectors ?? {} )) { map[name] = wrapSelector( - getInitialState, selector, selectState, + getInitialState, injected ) } @@ -836,9 +836,9 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { } function wrapSelector>( - getInitialState: () => State, selector: S, selectState: Selector, + getInitialState: () => State, injected?: boolean ) { function wrapper(rootState: NewState, ...args: any[]) { From bc441a5b22b9ef6e1e95dcff2ffd81e159bcfc17 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 08:33:55 -0600 Subject: [PATCH 073/368] Update outdated `@types/node` dev dependency --- packages/toolkit/package.json | 2 +- yarn.lock | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 335e054cbb..df55536609 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -57,7 +57,7 @@ "@testing-library/user-event": "^13.1.5", "@types/json-stringify-safe": "^5.0.0", "@types/nanoid": "^2.1.0", - "@types/node": "^10.14.4", + "@types/node": "^20.11.0", "@types/query-string": "^6.3.0", "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", diff --git a/yarn.lock b/yarn.lock index 3ea896b4e8..91870e084e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7025,7 +7025,7 @@ __metadata: "@testing-library/user-event": ^13.1.5 "@types/json-stringify-safe": ^5.0.0 "@types/nanoid": ^2.1.0 - "@types/node": ^10.14.4 + "@types/node": ^20.11.0 "@types/query-string": ^6.3.0 "@types/react": ^18.0.12 "@types/react-dom": ^18.0.5 @@ -8481,13 +8481,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^10.14.4": - version: 10.17.60 - resolution: "@types/node@npm:10.17.60" - checksum: 2cdb3a77d071ba8513e5e8306fa64bf50e3c3302390feeaeff1fd325dd25c8441369715dfc8e3701011a72fed5958c7dfa94eb9239a81b3c286caa4d97db6eef - languageName: node - linkType: hard - "@types/node@npm:^12.0.0": version: 12.20.37 resolution: "@types/node@npm:12.20.37" @@ -8502,6 +8495,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^20.11.0": + version: 20.11.0 + resolution: "@types/node@npm:20.11.0" + dependencies: + undici-types: ~5.26.4 + checksum: 1bd6890db7e0404d11c33d28f46f19f73256f0ba35d19f0ef2a0faba09f366f188915fb9338eebebcc472075c1c4941e17c7002786aa69afa44980737846b200 + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0": version: 2.4.0 resolution: "@types/normalize-package-data@npm:2.4.0" @@ -29342,6 +29344,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + "unherit@npm:^1.0.4": version: 1.1.3 resolution: "unherit@npm:1.1.3" From 763a598a4acdf2abbbec8981cf67dd97cb1a5ed3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 08:35:16 -0600 Subject: [PATCH 074/368] Prevent Prettier from wrapping lines in `vitest.config.ts` --- packages/toolkit/vitest.config.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index f63d6d3409..45b67cf6bd 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vitest/config' -import path from 'path' -import { fileURLToPath } from 'url' +import path from 'node:path' +import { fileURLToPath } from 'node:url' // No __dirname under Node ESM const __filename = fileURLToPath(import.meta.url) @@ -15,7 +15,8 @@ export default defineConfig({ setupFiles: ['./vitest.setup.js'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { - '@reduxjs/toolkit/query/react': path.join(__dirname, './src/query/react/index.ts'), // @remap-prod-remove-line + // prettier-ignore + '@reduxjs/toolkit/query/react': path.join(__dirname,'./src/query/react/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/query': path.join(__dirname, './src/query/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit/react': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line '@reduxjs/toolkit': path.join(__dirname, './src/index.ts'), // @remap-prod-remove-line From b77b70370ca89bda2aae4e023ab6c2559af52650 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 19:11:16 -0600 Subject: [PATCH 075/368] Copy the RN example from the RN template --- .../publish-ci/react-native/.prettierrc.json | 6 +- examples/publish-ci/react-native/App.test.tsx | 105 ++ examples/publish-ci/react-native/App.tsx | 111 +- examples/publish-ci/react-native/README.md | 2 +- .../react-native/__tests__/App.test.tsx | 16 +- .../__tests__/counterSlice.test.ts | 48 +- .../publish-ci/react-native/babel.config.cts | 7 + .../publish-ci/react-native/babel.config.js | 4 - examples/publish-ci/react-native/globals.d.ts | 16 +- examples/publish-ci/react-native/index.js | 5 - examples/publish-ci/react-native/index.tsx | 14 + .../publish-ci/react-native/jest-setup.ts | 2 +- .../publish-ci/react-native/jest.config.ts | 12 +- .../publish-ci/react-native/metro.config.js | 6 +- examples/publish-ci/react-native/package.json | 34 +- ...tive.config.js => react-native.config.mjs} | 6 +- .../react-native/src/app/createAppSlice.ts | 6 + .../publish-ci/react-native/src/app/hooks.ts | 55 +- .../publish-ci/react-native/src/app/store.ts | 50 +- .../src/components/AsyncButton.tsx | 51 +- .../react-native/src/components/Header.tsx | 31 +- .../src/components/LearnReduxLinks.tsx | 84 +- .../react-native/src/components/Section.tsx | 30 +- .../react-native/src/constants/TypedColors.ts | 20 +- .../src/features/counter/Counter.tsx | 92 +- .../src/features/counter/counterAPI.ts | 6 +- .../src/features/counter/counterSlice.test.ts | 53 + .../src/features/counter/counterSlice.ts | 127 +- .../src/features/quotes/Quotes.tsx | 153 ++ .../src/features/quotes/quotesApiSlice.ts | 38 + .../react-native/src/utils/test-utils.tsx | 64 + examples/publish-ci/react-native/yarn.lock | 1252 +++++++---------- 32 files changed, 1349 insertions(+), 1157 deletions(-) create mode 100644 examples/publish-ci/react-native/App.test.tsx create mode 100644 examples/publish-ci/react-native/babel.config.cts delete mode 100644 examples/publish-ci/react-native/babel.config.js delete mode 100644 examples/publish-ci/react-native/index.js create mode 100644 examples/publish-ci/react-native/index.tsx rename examples/publish-ci/react-native/{react-native.config.js => react-native.config.mjs} (77%) create mode 100644 examples/publish-ci/react-native/src/app/createAppSlice.ts create mode 100644 examples/publish-ci/react-native/src/features/counter/counterSlice.test.ts create mode 100644 examples/publish-ci/react-native/src/features/quotes/Quotes.tsx create mode 100644 examples/publish-ci/react-native/src/features/quotes/quotesApiSlice.ts create mode 100644 examples/publish-ci/react-native/src/utils/test-utils.tsx diff --git a/examples/publish-ci/react-native/.prettierrc.json b/examples/publish-ci/react-native/.prettierrc.json index 358db5d90f..18b9c97f02 100644 --- a/examples/publish-ci/react-native/.prettierrc.json +++ b/examples/publish-ci/react-native/.prettierrc.json @@ -1,6 +1,4 @@ { - "arrowParens": "avoid", - "bracketSameLine": true, - "singleQuote": true, - "trailingComma": "all" + "semi": false, + "arrowParens": "avoid" } diff --git a/examples/publish-ci/react-native/App.test.tsx b/examples/publish-ci/react-native/App.test.tsx new file mode 100644 index 0000000000..6967d32bb8 --- /dev/null +++ b/examples/publish-ci/react-native/App.test.tsx @@ -0,0 +1,105 @@ +import { screen, waitFor } from "@testing-library/react-native" +import { App } from "./App" +import { renderWithProviders } from "./src/utils/test-utils" + +test("App should have correct initial render", () => { + renderWithProviders() + + // The app should be rendered correctly + expect(screen.getByText(/learn more redux/i)).toBeOnTheScreen() + + // Initial state: count should be 0, incrementValue should be 2 + expect(screen.getByLabelText("Count")).toHaveTextContent("0") + expect(screen.getByLabelText("Set increment amount")).toHaveDisplayValue("2") +}) + +test("Increment value and Decrement value should work as expected", async () => { + const { user } = renderWithProviders() + + // Click on "+" => Count should be 1 + await user.press(screen.getByLabelText("Increment value")) + expect(screen.getByLabelText("Count")).toHaveTextContent("1") + + // Click on "-" => Count should be 0 + await user.press(screen.getByLabelText("Decrement value")) + expect(screen.getByLabelText("Count")).toHaveTextContent("0") +}) + +test("Add Amount should work as expected", async () => { + const { user } = renderWithProviders() + + // "Add Amount" button is clicked => Count should be 2 + await user.press(screen.getByText("Add Amount")) + expect(screen.getByLabelText("Count")).toHaveTextContent("2") + + const incrementValueInput = screen.getByLabelText("Set increment amount") + // incrementValue is 2, click on "Add Amount" => Count should be 4 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "2") + await user.press(screen.getByText("Add Amount")) + expect(screen.getByLabelText("Count")).toHaveTextContent("4") + + // [Negative number] incrementValue is -1, click on "Add Amount" => Count should be 3 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "-1") + await user.press(screen.getByText("Add Amount")) + expect(screen.getByLabelText("Count")).toHaveTextContent("3") +}) + +it("Add Async should work as expected", async () => { + const { user } = renderWithProviders() + + // "Add Async" button is clicked => Count should be 2 + await user.press(screen.getByText("Add Async")) + + await waitFor(() => { + expect(screen.getByLabelText("Count")).toHaveTextContent("2") + }) + + const incrementValueInput = screen.getByLabelText("Set increment amount") + // incrementValue is 2, click on "Add Async" => Count should be 4 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "2") + + await user.press(screen.getByText("Add Async")) + await waitFor(() => { + expect(screen.getByLabelText("Count")).toHaveTextContent("4") + }) + + // [Negative number] incrementValue is -1, click on "Add Async" => Count should be 3 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "-1") + await user.press(screen.getByText("Add Async")) + await waitFor(() => { + expect(screen.getByLabelText("Count")).toHaveTextContent("3") + }) +}) + +test("Add If Odd should work as expected", async () => { + const { user } = renderWithProviders() + + // "Add If Odd" button is clicked => Count should stay 0 + await user.press(screen.getByText("Add If Odd")) + expect(screen.getByLabelText("Count")).toHaveTextContent("0") + + // Click on "+" => Count should be updated to 1 + await user.press(screen.getByLabelText("Increment value")) + expect(screen.getByLabelText("Count")).toHaveTextContent("1") + + // "Add If Odd" button is clicked => Count should be updated to 3 + await user.press(screen.getByText("Add If Odd")) + expect(screen.getByLabelText("Count")).toHaveTextContent("3") + + const incrementValueInput = screen.getByLabelText("Set increment amount") + // incrementValue is 1, click on "Add If Odd" => Count should be updated to 4 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "1") + await user.press(screen.getByText("Add If Odd")) + expect(screen.getByLabelText("Count")).toHaveTextContent("4") + + // click on "Add If Odd" => Count should stay 4 + await user.clear(incrementValueInput) + await user.type(incrementValueInput, "-1") + await user.press(screen.getByText("Add If Odd")) + expect(screen.getByLabelText("Count")).toHaveTextContent("4") +}) diff --git a/examples/publish-ci/react-native/App.tsx b/examples/publish-ci/react-native/App.tsx index bfddc53c54..7a4bb055c3 100644 --- a/examples/publish-ci/react-native/App.tsx +++ b/examples/publish-ci/react-native/App.tsx @@ -1,4 +1,3 @@ -import type { FC } from 'react'; import { SafeAreaView, ScrollView, @@ -7,75 +6,73 @@ import { Text, View, useColorScheme, -} from 'react-native'; -import { Provider } from 'react-redux'; -import { store } from './src/app/store'; -import { Counter } from './src/features/counter/Counter'; +} from "react-native" +import { Counter } from "./src/features/counter/Counter" import { DebugInstructions, HermesBadge, LearnMoreLinks, ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; -import { Header } from './src/components/Header'; -import { LearnReduxLinks } from './src/components/LearnReduxLinks'; -import { Section } from './src/components/Section'; -import { TypedColors } from './src/constants/TypedColors'; +} from "react-native/Libraries/NewAppScreen" +import { Header } from "./src/components/Header" +import { LearnReduxLinks } from "./src/components/LearnReduxLinks" +import { Section } from "./src/components/Section" +import { TypedColors } from "./src/constants/TypedColors" +import { Quotes } from "./src/features/quotes/Quotes" -export const App: FC = () => { - const isDarkMode = useColorScheme() === 'dark'; +export const App = () => { + const isDarkMode = useColorScheme() === "dark" const backgroundStyle = { backgroundColor: isDarkMode ? TypedColors.darker : TypedColors.lighter, - }; + } return ( - - - - -
- - - -
- Edit App.tsx to change this - screen and then come back to see your edits. -
-
- -
-
- -
-
- Discover what to do next with Redux: -
- -
- Read the docs to discover what to do next: -
- -
- - - - ); -}; + + + +
+ + + + +
+ Edit App.tsx to change this + screen and then come back to see your edits. +
+
+ +
+
+ +
+
+ Discover what to do next with Redux: +
+ +
+ Read the docs to discover what to do next: +
+ +
+ + + ) +} const styles = StyleSheet.create({ highlight: { - fontWeight: '700', + fontWeight: "700", }, -}); +}) diff --git a/examples/publish-ci/react-native/README.md b/examples/publish-ci/react-native/README.md index 12470c30ec..8bd066df02 100644 --- a/examples/publish-ci/react-native/README.md +++ b/examples/publish-ci/react-native/README.md @@ -2,7 +2,7 @@ This is a new [**React Native**](https://reactnative.dev) project, bootstrapped # Getting Started ->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. +> **Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. ## Step 1: Start the Metro Server diff --git a/examples/publish-ci/react-native/__tests__/App.test.tsx b/examples/publish-ci/react-native/__tests__/App.test.tsx index 452785a21d..b304c5226b 100644 --- a/examples/publish-ci/react-native/__tests__/App.test.tsx +++ b/examples/publish-ci/react-native/__tests__/App.test.tsx @@ -1,9 +1,9 @@ -import { render } from '@testing-library/react-native'; -import renderer from 'react-test-renderer'; -import { App } from '../App'; +import { render } from "@testing-library/react-native" +import renderer from "react-test-renderer" +import { App } from "../App" -test('renders correctly', () => { - renderer.create(); - const element = render(); - expect(element).toBeDefined(); -}); +test("renders correctly", () => { + renderer.create() + const element = render() + expect(element).toBeDefined() +}) diff --git a/examples/publish-ci/react-native/__tests__/counterSlice.test.ts b/examples/publish-ci/react-native/__tests__/counterSlice.test.ts index 107f3549bb..5e99006cea 100644 --- a/examples/publish-ci/react-native/__tests__/counterSlice.test.ts +++ b/examples/publish-ci/react-native/__tests__/counterSlice.test.ts @@ -1,37 +1,37 @@ -import type { CounterState } from '../src/features/counter/counterSlice'; +import type { CounterState } from "../src/features/counter/counterSlice" import { counterSlice, decrement, increment, incrementByAmount, -} from '../src/features/counter/counterSlice'; +} from "../src/features/counter/counterSlice" -describe('counter reducer', () => { - const { reducer: counterReducer } = counterSlice; +describe("counter reducer", () => { + const { reducer: counterReducer } = counterSlice const initialState: CounterState = { value: 3, - status: 'idle', - }; + status: "idle", + } - test('should handle initial state', () => { - expect(counterReducer(undefined, { type: 'unknown' })).toStrictEqual({ + test("should handle initial state", () => { + expect(counterReducer(undefined, { type: "unknown" })).toStrictEqual({ value: 0, - status: 'idle', - }); - }); + status: "idle", + }) + }) - test('should handle increment', () => { - const actual = counterReducer(initialState, increment()); - expect(actual.value).toBe(4); - }); + test("should handle increment", () => { + const actual = counterReducer(initialState, increment()) + expect(actual.value).toBe(4) + }) - test('should handle decrement', () => { - const actual = counterReducer(initialState, decrement()); - expect(actual.value).toBe(2); - }); + test("should handle decrement", () => { + const actual = counterReducer(initialState, decrement()) + expect(actual.value).toBe(2) + }) - test('should handle incrementByAmount', () => { - const actual = counterReducer(initialState, incrementByAmount(2)); - expect(actual.value).toBe(5); - }); -}); + test("should handle incrementByAmount", () => { + const actual = counterReducer(initialState, incrementByAmount(2)) + expect(actual.value).toBe(5) + }) +}) diff --git a/examples/publish-ci/react-native/babel.config.cts b/examples/publish-ci/react-native/babel.config.cts new file mode 100644 index 0000000000..f47f36ed05 --- /dev/null +++ b/examples/publish-ci/react-native/babel.config.cts @@ -0,0 +1,7 @@ +import type { TransformOptions } from "@babel/core" + +const config: TransformOptions = { + presets: ["module:@react-native/babel-preset"], +} + +export default config diff --git a/examples/publish-ci/react-native/babel.config.js b/examples/publish-ci/react-native/babel.config.js deleted file mode 100644 index ddbabad820..0000000000 --- a/examples/publish-ci/react-native/babel.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('@babel/core').TransformOptions } */ -module.exports = { - presets: ['module:@react-native/babel-preset'], -}; diff --git a/examples/publish-ci/react-native/globals.d.ts b/examples/publish-ci/react-native/globals.d.ts index c0ce308d48..41c7f89385 100644 --- a/examples/publish-ci/react-native/globals.d.ts +++ b/examples/publish-ci/react-native/globals.d.ts @@ -1,13 +1,13 @@ -declare module '*.gif' { - const logo: number; - export default logo; +declare module "*.gif" { + const logo: number + export default logo } -declare module 'react-native/Libraries/NewAppScreen' { - import type { FC } from 'react'; - export const HermesBadge: FC; +declare module "react-native/Libraries/NewAppScreen" { + import type { FC } from "react" + export const HermesBadge: FC } -declare module 'react-native/Libraries/Core/Devtools/openURLInBrowser' { - export default function openURLInBrowser(url: string): void; +declare module "react-native/Libraries/Core/Devtools/openURLInBrowser" { + export default function openURLInBrowser(url: string): void } diff --git a/examples/publish-ci/react-native/index.js b/examples/publish-ci/react-native/index.js deleted file mode 100644 index da8755df52..0000000000 --- a/examples/publish-ci/react-native/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AppRegistry } from 'react-native'; -import { App } from './App'; -import { name as appName } from './app.json'; - -AppRegistry.registerComponent(appName, () => App); diff --git a/examples/publish-ci/react-native/index.tsx b/examples/publish-ci/react-native/index.tsx new file mode 100644 index 0000000000..affdc01fc3 --- /dev/null +++ b/examples/publish-ci/react-native/index.tsx @@ -0,0 +1,14 @@ +import React from "react" +import { AppRegistry } from "react-native" +import { Provider } from "react-redux" +import { App } from "./App" +import { name as appName } from "./app.json" +import { store } from "./src/app/store" + +AppRegistry.registerComponent(appName, () => () => ( + + + + + +)) diff --git a/examples/publish-ci/react-native/jest-setup.ts b/examples/publish-ci/react-native/jest-setup.ts index 1d3ff30752..39b76127b7 100644 --- a/examples/publish-ci/react-native/jest-setup.ts +++ b/examples/publish-ci/react-native/jest-setup.ts @@ -1 +1 @@ -import '@testing-library/react-native/extend-expect'; +import "@testing-library/react-native/extend-expect" diff --git a/examples/publish-ci/react-native/jest.config.ts b/examples/publish-ci/react-native/jest.config.ts index 8db50d9c40..efdcf5d53e 100644 --- a/examples/publish-ci/react-native/jest.config.ts +++ b/examples/publish-ci/react-native/jest.config.ts @@ -1,10 +1,10 @@ -import type { Config } from 'jest'; +import type { Config } from "jest" const config: Config = { - preset: 'react-native', - testEnvironment: 'node', - setupFilesAfterEnv: ['./jest-setup.ts'], + preset: "react-native", + testEnvironment: "node", + setupFilesAfterEnv: ["/jest-setup.ts"], fakeTimers: { enableGlobally: true }, -}; +} -export default config; +export default config diff --git a/examples/publish-ci/react-native/metro.config.js b/examples/publish-ci/react-native/metro.config.js index 5bd4785bdb..e8ac2c799c 100644 --- a/examples/publish-ci/react-native/metro.config.js +++ b/examples/publish-ci/react-native/metro.config.js @@ -1,5 +1,5 @@ /** @type {Pick & { getDefaultConfig: import('metro-config').getDefaultConfig }} */ -const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); +const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config") /** * Metro configuration @@ -7,6 +7,6 @@ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); * * @type {import('metro-config').MetroConfig} */ -const config = {}; +const config = {} -module.exports = mergeConfig(getDefaultConfig(__dirname), config); +module.exports = mergeConfig(getDefaultConfig(__dirname), config) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index e0737f206f..6c446057de 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -8,7 +8,7 @@ "ios": "react-native run-ios", "lint": "eslint .", "lint:fix": "eslint --fix .", - "format": "prettier --write \"./**/*.{js,ts,tsx}\"", + "format": "prettier --write \"./**/*.{js,ts,jsx,tsx,mjs,cts,md}\"", "start": "react-native start", "test": "jest", "type-check": "tsc --noEmit" @@ -16,28 +16,28 @@ "dependencies": { "@reduxjs/toolkit": "^2.0.1", "react": "18.2.0", - "react-native": "0.73.0", - "react-redux": "^9.0.4" + "react-native": "^0.73.2", + "react-redux": "^9.1.0" }, "devDependencies": { - "@babel/core": "^7.20.0", - "@babel/preset-env": "^7.20.0", - "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "^0.73.18", - "@react-native/eslint-config": "^0.73.1", - "@react-native/metro-config": "^0.73.2", - "@react-native/typescript-config": "^0.73.1", - "@testing-library/react-native": "^12.4.1", + "@babel/core": "^7.23.7", + "@babel/preset-env": "^7.23.8", + "@babel/runtime": "^7.23.8", + "@react-native/babel-preset": "^0.73.19", + "@react-native/eslint-config": "^0.74.0", + "@react-native/metro-config": "^0.73.3", + "@react-native/typescript-config": "^0.74.0", + "@testing-library/react-native": "^12.4.3", "@types/jest": "^29.5.11", - "@types/react": "^18.2.6", + "@types/react": "^18.2.47", "@types/react-test-renderer": "^18.0.7", - "@typescript-eslint/eslint-plugin": "^6.14.0", - "@typescript-eslint/parser": "^6.14.0", - "babel-jest": "^29.6.3", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", + "babel-jest": "^29.7.0", "eslint": "^8.56.0", - "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", - "prettier": "^3.1.1", + "prettier": "^3.2.1", "react-test-renderer": "18.2.0", "ts-node": "^10.9.2", "typescript": "^5.3.3" diff --git a/examples/publish-ci/react-native/react-native.config.js b/examples/publish-ci/react-native/react-native.config.mjs similarity index 77% rename from examples/publish-ci/react-native/react-native.config.js rename to examples/publish-ci/react-native/react-native.config.mjs index bdceb0b1cc..cd913c6fc8 100644 --- a/examples/publish-ci/react-native/react-native.config.js +++ b/examples/publish-ci/react-native/react-native.config.mjs @@ -1,8 +1,10 @@ /** @type {import('@react-native-community/cli-types').UserConfig } */ -module.exports = { +const config = { project: { ios: { automaticPodsInstallation: true, }, }, -}; +} + +export default config diff --git a/examples/publish-ci/react-native/src/app/createAppSlice.ts b/examples/publish-ci/react-native/src/app/createAppSlice.ts new file mode 100644 index 0000000000..64afebbb60 --- /dev/null +++ b/examples/publish-ci/react-native/src/app/createAppSlice.ts @@ -0,0 +1,6 @@ +import { asyncThunkCreator, buildCreateSlice } from "@reduxjs/toolkit" + +// `buildCreateSlice` allows us to create a slice with async thunks. +export const createAppSlice = buildCreateSlice({ + creators: { asyncThunk: asyncThunkCreator }, +}) diff --git a/examples/publish-ci/react-native/src/app/hooks.ts b/examples/publish-ci/react-native/src/app/hooks.ts index fe7b5087f8..428211afbf 100644 --- a/examples/publish-ci/react-native/src/app/hooks.ts +++ b/examples/publish-ci/react-native/src/app/hooks.ts @@ -1,29 +1,46 @@ -import { useEffect, useRef } from 'react'; -import { Animated, useWindowDimensions } from 'react-native'; -import type { TypedUseSelectorHook } from 'react-redux'; -import { useDispatch, useSelector } from 'react-redux'; -import type { AppDispatch, RootState } from './store'; +// This file serves as a central hub for re-exporting pre-typed Redux hooks. +// These imports are restricted elsewhere to ensure consistent +// usage of typed hooks throughout the application. +// We disable the ESLint rule here because this is the designated place +// for importing and re-exporting the typed versions of hooks. +/* eslint-disable @typescript-eslint/no-restricted-imports */ +import { useEffect, useRef } from "react" +import { Animated, useWindowDimensions } from "react-native" +import { useDispatch, useSelector } from "react-redux" +import type { AppDispatch, RootState } from "./store" // Use throughout your app instead of plain `useDispatch` and `useSelector` -export const useAppDispatch: () => AppDispatch = useDispatch; -export const useAppSelector: TypedUseSelectorHook = useSelector; - +export const useAppDispatch = useDispatch.withTypes() +export const useAppSelector = useSelector.withTypes() + +/** + * Custom React hook for calculating viewport units + * based on the current window dimensions. + * + * @returns An object containing the calculated viewport heigh and width values. + */ export const useViewportUnits = () => { - const { width, height } = useWindowDimensions(); + const { width, height } = useWindowDimensions() - const vh = height / 100; - const vw = width / 100; + const vh = height / 100 + const vw = width / 100 - return { vh, vw }; -}; + return { vh, vw } +} +/** + * Custom React hook for creating a bounce animation effect. + * + * @param value - The maximum height to which the object should bounce. Defaults to 10 if not provided. + * @returns The `Animated.Value` object that can be used to drive animations. + */ export const useBounceAnimation = (value = 10) => { - const bounce = useRef(new Animated.Value(0)).current; + const bounce = useRef(new Animated.Value(0)).current bounce.interpolate({ inputRange: [-300, -100, 0, 100, 101], outputRange: [300, 0, 1, 0, 0], - }); + }) useEffect(() => { Animated.loop( @@ -39,8 +56,8 @@ export const useBounceAnimation = (value = 10) => { useNativeDriver: true, }), ]), - ).start(); - }, [bounce, value]); + ).start() + }, [bounce, value]) - return bounce; -}; + return bounce +} diff --git a/examples/publish-ci/react-native/src/app/store.ts b/examples/publish-ci/react-native/src/app/store.ts index 0191c5c97b..992d89bd35 100644 --- a/examples/publish-ci/react-native/src/app/store.ts +++ b/examples/publish-ci/react-native/src/app/store.ts @@ -1,20 +1,40 @@ -import type { Action, ThunkAction } from '@reduxjs/toolkit'; -import { configureStore } from '@reduxjs/toolkit'; -import { counterSlice } from '../features/counter/counterSlice'; +import type { Action, ThunkAction } from "@reduxjs/toolkit" +import { combineSlices, configureStore } from "@reduxjs/toolkit" +import { setupListeners } from "@reduxjs/toolkit/query" +import { counterSlice } from "../features/counter/counterSlice" +import { quotesApiSlice } from "../features/quotes/quotesApiSlice" -export const store = configureStore({ - reducer: { - [counterSlice.reducerPath]: counterSlice.reducer, - }, -}); +// `combineSlices` automatically combines the reducers using +// their `reducerPath`s, therefore we no longer need to call `combineReducers`. +const rootReducer = combineSlices(counterSlice, quotesApiSlice) +// Infer the `RootState` type from the root reducer +export type RootState = ReturnType -// Infer the `RootState` and `AppDispatch` types from the store itself -export type RootState = ReturnType; -// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} -export type AppDispatch = typeof store.dispatch; -export type AppThunk = ThunkAction< - ReturnType, +export const makeStore = (preloadedState?: Partial) => { + const store = configureStore({ + reducer: rootReducer, + // Adding the api middleware enables caching, invalidation, polling, + // and other useful features of `rtk-query`. + middleware: getDefaultMiddleware => { + return getDefaultMiddleware().concat(quotesApiSlice.middleware) + }, + preloadedState, + }) + // configure listeners using the provided defaults + // optional, but required for `refetchOnFocus`/`refetchOnReconnect` behaviors + setupListeners(store.dispatch) + return store +} + +export const store = makeStore() + +// Infer the type of `store` +export type AppStore = typeof store +// Infer the `AppDispatch` type from the store itself +export type AppDispatch = AppStore["dispatch"] +export type AppThunk = ThunkAction< + ThunkReturnType, RootState, unknown, Action ->; +> diff --git a/examples/publish-ci/react-native/src/components/AsyncButton.tsx b/examples/publish-ci/react-native/src/components/AsyncButton.tsx index 98ae2c564e..138c0a3e18 100644 --- a/examples/publish-ci/react-native/src/components/AsyncButton.tsx +++ b/examples/publish-ci/react-native/src/components/AsyncButton.tsx @@ -1,57 +1,56 @@ -import type { FC, PropsWithChildren } from 'react'; -import { useRef } from 'react'; +import type { PropsWithChildren } from "react" +import { useRef } from "react" import type { GestureResponderEvent, PressableProps, ViewStyle, -} from 'react-native'; -import { Animated, Pressable, StyleSheet, View } from 'react-native'; +} from "react-native" +import { Animated, Pressable, StyleSheet, View } from "react-native" -type AsyncButtonProps = PressableProps & PropsWithChildren; +type AsyncButtonProps = PressableProps & PropsWithChildren -export const AsyncButton: FC = ({ +export const AsyncButton = ({ onPress, style, children, ...restProps -}) => { - const progress = useRef(new Animated.Value(0)).current; - const opacity = useRef(new Animated.Value(1)).current; +}: AsyncButtonProps) => { + const progress = useRef(new Animated.Value(0)).current + const opacity = useRef(new Animated.Value(1)).current const _onPress = (e: GestureResponderEvent) => { - progress.setValue(0); - opacity.setValue(1); + progress.setValue(0) + opacity.setValue(1) - onPress?.(e); + onPress?.(e) - // TODO: Maybe change to Animated.sequence Animated.timing(progress, { toValue: 1, duration: 1000, useNativeDriver: false, }).start(({ finished }) => { if (!finished) { - return; + return } Animated.timing(opacity, { toValue: 0, duration: 200, useNativeDriver: false, - }).start(); - }); - }; + }).start() + }) + } const progressInterpolate = progress.interpolate({ inputRange: [0, 1], - outputRange: ['0%', '100%'], - extrapolate: 'clamp', - }); + outputRange: ["0%", "100%"], + extrapolate: "clamp", + }) const progressStyle: Animated.WithAnimatedObject = { width: progressInterpolate, opacity, - }; + } return ( @@ -60,15 +59,15 @@ export const AsyncButton: FC = ({ {children} - ); -}; + ) +} const styles = StyleSheet.create({ progress: { - position: 'absolute', + position: "absolute", top: 0, bottom: 0, left: 0, - backgroundColor: 'rgba(112,76,182, 0.15)', + backgroundColor: "rgba(112,76,182, 0.15)", }, -}); +}) diff --git a/examples/publish-ci/react-native/src/components/Header.tsx b/examples/publish-ci/react-native/src/components/Header.tsx index 0cfd4f3f1f..ce2373cdd1 100644 --- a/examples/publish-ci/react-native/src/components/Header.tsx +++ b/examples/publish-ci/react-native/src/components/Header.tsx @@ -1,32 +1,33 @@ -import { Animated, StyleSheet, View, useColorScheme } from 'react-native'; -import { useBounceAnimation, useViewportUnits } from '../app/hooks'; -import { TypedColors } from '../constants/TypedColors'; -import logo from './logo.gif'; +import { Animated, StyleSheet, View, useColorScheme } from "react-native" +import { useBounceAnimation, useViewportUnits } from "../app/hooks" +import { TypedColors } from "../constants/TypedColors" +import logo from "./logo.gif" export const Header = () => { - const isDarkMode = useColorScheme() === 'dark'; - const { vh } = useViewportUnits(); - const bounce = useBounceAnimation(); - const height = 40 * vh; + const isDarkMode = useColorScheme() === "dark" + const { vh } = useViewportUnits() + const bounce = useBounceAnimation() + const height = 40 * vh return ( + ]} + > - ); -}; + ) +} const styles = StyleSheet.create({ container: { - flexDirection: 'row', - justifyContent: 'center', + flexDirection: "row", + justifyContent: "center", }, -}); +}) diff --git a/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx b/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx index 318aae0d1b..065f27ac36 100644 --- a/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx +++ b/examples/publish-ci/react-native/src/components/LearnReduxLinks.tsx @@ -1,53 +1,57 @@ -import type { FC } from 'react'; -import React from 'react'; +import { Fragment } from "react" import { StyleSheet, Text, TouchableOpacity, View, useColorScheme, -} from 'react-native'; -import openURLInBrowser from 'react-native/Libraries/Core/Devtools/openURLInBrowser'; -import { TypedColors } from '../constants/TypedColors'; +} from "react-native" +import openURLInBrowser from "react-native/Libraries/Core/Devtools/openURLInBrowser" +import { TypedColors } from "../constants/TypedColors" interface Link { - title: string; - link: string; - description: string; + title: string + link: string + description: string } const links: Link[] = [ { - title: 'React', - link: 'https://reactjs.org/', - description: 'JavaScript library for building user interfaces', + title: "React", + link: "https://reactjs.org", + description: "JavaScript library for building user interfaces", }, { - title: 'Redux', - link: 'https://redux.js.org/', - description: 'A Predictable State Container for JS Apps', + title: "Redux", + link: "https://redux.js.org", + description: "A Predictable State Container for JS Apps", }, { - title: 'Redux Toolkit', - link: 'https://redux-toolkit.js.org/', + title: "Redux Toolkit", + link: "https://redux-toolkit.js.org", description: - 'The official, opinionated, batteries-included toolset for efficient Redux development', + "The official, opinionated, batteries-included toolset for efficient Redux development", }, { - title: 'React Redux', - link: 'https://react-redux.js.org', - description: 'Official React bindings for Redux', + title: "React Redux", + link: "https://react-redux.js.org", + description: "Official React bindings for Redux", }, -]; + { + title: "Reselect", + link: "https://reselect.js.org", + description: "A memoized selector library for Redux", + }, +] -export const LearnReduxLinks: FC = () => { - const isDarkMode = useColorScheme() === 'dark'; +export const LearnReduxLinks = () => { + const isDarkMode = useColorScheme() === "dark" return ( {links.map((item, index) => { return ( - + { ]} /> { - openURLInBrowser(item.link); + openURLInBrowser(item.link) }} - style={styles.linkContainer}> + style={styles.linkContainer} + > {item.title} + ]} + > {item.description} - - ); + + ) })} - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -86,25 +92,25 @@ const styles = StyleSheet.create({ paddingHorizontal: 24, }, linkContainer: { - flexWrap: 'wrap', - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', + flexWrap: "wrap", + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", paddingVertical: 8, }, link: { flex: 2, fontSize: 18, - fontWeight: '400', + fontWeight: "400", color: TypedColors.primary, }, description: { flex: 3, paddingVertical: 16, - fontWeight: '400', + fontWeight: "400", fontSize: 18, }, separator: { height: 1, }, -}); +}) diff --git a/examples/publish-ci/react-native/src/components/Section.tsx b/examples/publish-ci/react-native/src/components/Section.tsx index 84eb4995d8..c3246059fd 100644 --- a/examples/publish-ci/react-native/src/components/Section.tsx +++ b/examples/publish-ci/react-native/src/components/Section.tsx @@ -1,13 +1,13 @@ -import type { FC, PropsWithChildren } from 'react'; -import { StyleSheet, Text, View, useColorScheme } from 'react-native'; -import { TypedColors } from '../constants/TypedColors'; +import type { PropsWithChildren } from "react" +import { StyleSheet, Text, View, useColorScheme } from "react-native" +import { TypedColors } from "../constants/TypedColors" type SectionProps = PropsWithChildren<{ - title: string; -}>; + title: string +}> -export const Section: FC = ({ children, title }) => { - const isDarkMode = useColorScheme() === 'dark'; +export const Section = ({ children, title }: SectionProps) => { + const isDarkMode = useColorScheme() === "dark" return ( @@ -15,19 +15,21 @@ export const Section: FC = ({ children, title }) => { style={[ styles.sectionTitle, { color: isDarkMode ? TypedColors.white : TypedColors.black }, - ]}> + ]} + > {title} + ]} + > {children} - ); -}; + ) +} const styles = StyleSheet.create({ sectionContainer: { @@ -36,11 +38,11 @@ const styles = StyleSheet.create({ }, sectionTitle: { fontSize: 24, - fontWeight: '600', + fontWeight: "600", }, sectionDescription: { marginTop: 8, fontSize: 18, - fontWeight: '400', + fontWeight: "400", }, -}); +}) diff --git a/examples/publish-ci/react-native/src/constants/TypedColors.ts b/examples/publish-ci/react-native/src/constants/TypedColors.ts index ac1a4df35e..6d9addf872 100644 --- a/examples/publish-ci/react-native/src/constants/TypedColors.ts +++ b/examples/publish-ci/react-native/src/constants/TypedColors.ts @@ -1,13 +1,13 @@ -import { Colors } from 'react-native/Libraries/NewAppScreen'; +import { Colors } from "react-native/Libraries/NewAppScreen" -export interface TypedColors { - primary: string; - white: string; - lighter: string; - light: string; - dark: string; - darker: string; - black: string; +interface AllColors { + primary: string + white: string + lighter: string + light: string + dark: string + darker: string + black: string } -export const TypedColors = Colors as TypedColors; +export const TypedColors = Colors as AllColors diff --git a/examples/publish-ci/react-native/src/features/counter/Counter.tsx b/examples/publish-ci/react-native/src/features/counter/Counter.tsx index a768753966..a50dab2cee 100644 --- a/examples/publish-ci/react-native/src/features/counter/Counter.tsx +++ b/examples/publish-ci/react-native/src/features/counter/Counter.tsx @@ -1,14 +1,15 @@ -import type { FC } from 'react'; -import { useState } from 'react'; +import { useState } from "react" import { StyleSheet, Text, TextInput, TouchableOpacity, View, -} from 'react-native'; -import { useAppDispatch, useAppSelector } from '../../app/hooks'; -import { AsyncButton } from '../../components/AsyncButton'; + useColorScheme, +} from "react-native" +import { useAppDispatch, useAppSelector } from "../../app/hooks" +import { AsyncButton } from "../../components/AsyncButton" +import { TypedColors } from "../../constants/TypedColors" import { decrement, increment, @@ -16,71 +17,88 @@ import { incrementByAmount, incrementIfOdd, selectCount, -} from './counterSlice'; + selectStatus, +} from "./counterSlice" -export const Counter: FC = () => { - const [incrementAmount, setIncrementAmount] = useState('2'); - const count = useAppSelector(selectCount); - const status = useAppSelector(state => state.counter.status); - const dispatch = useAppDispatch(); +export const Counter = () => { + const isDarkMode = useColorScheme() === "dark" + const textStyle = { + color: isDarkMode ? TypedColors.light : TypedColors.dark, + } - const incrementValue = Number(incrementAmount) || 0; + const dispatch = useAppDispatch() + const count = useAppSelector(selectCount) + const status = useAppSelector(selectStatus) + const [incrementAmount, setIncrementAmount] = useState("2") + + const incrementValue = Number(incrementAmount) || 0 return ( dispatch(increment())}> - + + aria-label="Decrement value" + onPress={() => dispatch(decrement())} + > + - - {count} + + {count} + dispatch(decrement())}> - - + aria-label="Increment value" + onPress={() => dispatch(increment())} + > + + dispatch(incrementByAmount(incrementValue))}> + onPress={() => dispatch(incrementByAmount(incrementValue))} + > Add Amount { - dispatch(incrementAsync(incrementValue)).catch(console.log); - }}> + dispatch(incrementAsync(incrementValue)) + }} + > Add Async { - dispatch(incrementIfOdd(incrementValue)); - }}> + dispatch(incrementIfOdd(incrementValue)) + }} + > Add If Odd - ); -}; + ) +} const styles = StyleSheet.create({ row: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - flexWrap: 'wrap', + flexDirection: "row", + alignItems: "center", + justifyContent: "center", + flexWrap: "wrap", }, value: { fontSize: 78, @@ -88,7 +106,7 @@ const styles = StyleSheet.create({ marginTop: 2, }, button: { - backgroundColor: 'rgba(112, 76, 182, 0.1)', + backgroundColor: "rgba(112, 76, 182, 0.1)", borderRadius: 2, paddingLeft: 12, paddingRight: 12, @@ -96,17 +114,17 @@ const styles = StyleSheet.create({ margin: 2, }, buttonText: { - color: 'rgb(112, 76, 182)', + color: "rgb(112, 76, 182)", fontSize: 32, - textAlign: 'center', + textAlign: "center", }, textbox: { fontSize: 48, padding: 2, width: 64, - textAlign: 'center', + textAlign: "center", marginRight: 8, borderWidth: 1, - justifyContent: 'center', + justifyContent: "center", }, -}); +}) diff --git a/examples/publish-ci/react-native/src/features/counter/counterAPI.ts b/examples/publish-ci/react-native/src/features/counter/counterAPI.ts index c5b686e81d..3b5174d147 100644 --- a/examples/publish-ci/react-native/src/features/counter/counterAPI.ts +++ b/examples/publish-ci/react-native/src/features/counter/counterAPI.ts @@ -2,7 +2,7 @@ export const fetchCount = (amount = 1) => { return new Promise<{ data: number }>(resolve => setTimeout(() => { - resolve({ data: amount }); + resolve({ data: amount }) }, 500), - ); -}; + ) +} diff --git a/examples/publish-ci/react-native/src/features/counter/counterSlice.test.ts b/examples/publish-ci/react-native/src/features/counter/counterSlice.test.ts new file mode 100644 index 0000000000..3b150132f8 --- /dev/null +++ b/examples/publish-ci/react-native/src/features/counter/counterSlice.test.ts @@ -0,0 +1,53 @@ +import { makeStore } from "../../app/store" +import type { CounterSliceState } from "./counterSlice" +import { + counterSlice, + decrement, + increment, + incrementByAmount, + selectCount, +} from "./counterSlice" + +describe("counter reducer", () => { + const initialState: CounterSliceState = { + value: 3, + status: "idle", + } + + let store = makeStore() + + beforeEach(() => { + store = makeStore({ counter: initialState }) + }) + + it("should handle initial state", () => { + expect(counterSlice.reducer(undefined, { type: "unknown" })).toStrictEqual({ + value: 0, + status: "idle", + }) + }) + + it("should handle increment", () => { + expect(selectCount(store.getState())).toBe(3) + + store.dispatch(increment()) + + expect(selectCount(store.getState())).toBe(4) + }) + + it("should handle decrement", () => { + expect(selectCount(store.getState())).toBe(3) + + store.dispatch(decrement()) + + expect(selectCount(store.getState())).toBe(2) + }) + + it("should handle incrementByAmount", () => { + expect(selectCount(store.getState())).toBe(3) + + store.dispatch(incrementByAmount(2)) + + expect(selectCount(store.getState())).toBe(5) + }) +}) diff --git a/examples/publish-ci/react-native/src/features/counter/counterSlice.ts b/examples/publish-ci/react-native/src/features/counter/counterSlice.ts index d3e0750f1b..07bc1f5c3d 100644 --- a/examples/publish-ci/react-native/src/features/counter/counterSlice.ts +++ b/examples/publish-ci/react-native/src/features/counter/counterSlice.ts @@ -1,88 +1,89 @@ -import type { PayloadAction } from '@reduxjs/toolkit'; -import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; -import type { AppThunk } from '../../app/store'; -import { fetchCount } from './counterAPI'; +import type { PayloadAction } from "@reduxjs/toolkit" +import { createAppSlice } from "../../app/createAppSlice" +import type { AppThunk } from "../../app/store" +import { fetchCount } from "./counterAPI" -export interface CounterState { - value: number; - status: 'idle' | 'loading' | 'failed'; +export interface CounterSliceState { + value: number + status: "idle" | "loading" | "failed" } -const initialState: CounterState = { +const initialState: CounterSliceState = { value: 0, - status: 'idle', -}; - -// The function below is called a thunk and allows us to perform async logic. It -// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This -// will call the thunk with the `dispatch` function as the first argument. Async -// code can then be executed and other actions can be dispatched. Thunks are -// typically used to make async requests. -export const incrementAsync = createAsyncThunk( - 'counter/fetchCount', - async (amount: number) => { - const response = await fetchCount(amount); - // The value we return becomes the `fulfilled` action payload - return response.data; - }, -); + status: "idle", +} -export const counterSlice = createSlice({ - name: 'counter', +// If you are not using async thunks you can use the standalone `createSlice`. +export const counterSlice = createAppSlice({ + name: "counter", // `createSlice` will infer the state type from the `initialState` argument initialState, // The `reducers` field lets us define reducers and generate associated actions - reducers: { - increment: state => { + reducers: create => ({ + increment: create.reducer(state => { // Redux Toolkit allows us to write "mutating" logic in reducers. It // doesn't actually mutate the state because it uses the Immer library, // which detects changes to a "draft state" and produces a brand new // immutable state based off those changes - state.value += 1; - }, - decrement: state => { - state.value -= 1; - }, + state.value += 1 + }), + decrement: create.reducer(state => { + state.value -= 1 + }), // Use the `PayloadAction` type to declare the contents of `action.payload` - incrementByAmount: (state, action: PayloadAction) => { - state.value += action.payload; - }, - }, - - // The `extraReducers` field lets the slice handle actions defined elsewhere, - // including actions generated by createAsyncThunk or in other slices. - extraReducers: builder => { - builder - .addCase(incrementAsync.pending, state => { - state.status = 'loading'; - }) - .addCase(incrementAsync.fulfilled, (state, action) => { - state.status = 'idle'; - state.value += action.payload; - }) - .addCase(incrementAsync.rejected, state => { - state.status = 'failed'; - }); - }, - + incrementByAmount: create.reducer( + (state, action: PayloadAction) => { + state.value += action.payload + }, + ), + // The function below is called a thunk and allows us to perform async logic. It + // can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This + // will call the thunk with the `dispatch` function as the first argument. Async + // code can then be executed and other actions can be dispatched. Thunks are + // typically used to make async requests. + incrementAsync: create.asyncThunk( + async (amount: number) => { + const response = await fetchCount(amount) + // The value we return becomes the `fulfilled` action payload + return response.data + }, + { + pending: state => { + state.status = "loading" + }, + fulfilled: (state, action) => { + state.status = "idle" + state.value += action.payload + }, + rejected: state => { + state.status = "failed" + }, + }, + ), + }), + // You can define your selectors here. These selectors receive the slice + // state as their first argument. selectors: { selectCount: counter => counter.value, + selectStatus: counter => counter.status, }, -}); +}) -// Action creators are generated for each case reducer function -export const { increment, decrement, incrementByAmount } = counterSlice.actions; +// Action creators are generated for each case reducer function. +export const { decrement, increment, incrementByAmount, incrementAsync } = + counterSlice.actions -// Other code such as selectors can use the imported `RootState` type -export const { selectCount } = counterSlice.selectors; +// Selectors returned by `slice.selectors` take the root state as their first argument. +export const { selectCount, selectStatus } = counterSlice.selectors // We can also write thunks by hand, which may contain both sync and async logic. // Here's an example of conditionally dispatching actions based on current state. export const incrementIfOdd = (amount: number): AppThunk => (dispatch, getState) => { - const currentValue = selectCount(getState()); - if (currentValue % 2 === 1) { - dispatch(incrementByAmount(amount)); + const currentValue = selectCount(getState()) + + if (currentValue % 2 === 1 || currentValue % 2 === -1) { + dispatch(incrementByAmount(amount)) } - }; + } diff --git a/examples/publish-ci/react-native/src/features/quotes/Quotes.tsx b/examples/publish-ci/react-native/src/features/quotes/Quotes.tsx new file mode 100644 index 0000000000..f27db6077e --- /dev/null +++ b/examples/publish-ci/react-native/src/features/quotes/Quotes.tsx @@ -0,0 +1,153 @@ +import { useState } from "react" +import { + Modal, + ScrollView, + StyleSheet, + Text, + TouchableOpacity, + View, + useColorScheme, +} from "react-native" +import { TypedColors } from "../../constants/TypedColors" +import { useGetQuotesQuery } from "./quotesApiSlice" + +const options = [5, 10, 20, 30] + +export const Quotes = () => { + const isDarkMode = useColorScheme() === "dark" + const textStyle = { + color: isDarkMode ? TypedColors.light : TypedColors.dark, + } + const backgroundStyle = { + backgroundColor: isDarkMode ? TypedColors.darker : TypedColors.lighter, + } + + const [numberOfQuotes, setNumberOfQuotes] = useState(10) + const [modalVisible, setModalVisible] = useState(false) + // Using a query hook automatically fetches data and returns query values + const { data, isError, isLoading, isSuccess } = + useGetQuotesQuery(numberOfQuotes) + + if (isError) { + return There was an error!!! + } + + if (isLoading) { + return Loading... + } + + const pickNumberOfQuotes = (value: number) => { + setNumberOfQuotes(value) + setModalVisible(false) + } + + if (isSuccess) { + return ( + + { + setModalVisible(true) + }} + style={styles.button} + > + + Select the Quantity of Quotes to Fetch: {numberOfQuotes} + + + + { + setModalVisible(false) + }} + > + + + {options.map(option => ( + { + pickNumberOfQuotes(option) + }} + > + {option} + + ))} + + + + + { + + {data.quotes.map(({ author, quote, id }) => ( + + {`"${quote}"`} + - {author} + + ))} + + } + + ) + } + + return null +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: "center", + justifyContent: "center", + padding: 20, + }, + button: { + padding: 10, + backgroundColor: "rgba(112, 76, 182, 0.1)", + borderRadius: 5, + }, + buttonText: { + color: "rgb(112, 76, 182)", + fontSize: 18, + textAlign: "center", + margin: 5, + }, + modalView: { + margin: 20, + borderRadius: 5, + padding: 20, + alignItems: "center", + elevation: 5, + }, + option: { + fontSize: 30, + padding: 10, + borderBottomWidth: 1, + borderBottomColor: "#CCC", + }, + optionText: { + fontSize: 20, + }, + quotesList: { + width: "auto", + }, + quoteContainer: { + padding: 10, + borderRadius: 5, + marginVertical: 5, + }, + quoteText: { + fontStyle: "italic", + }, + author: { + fontWeight: "bold", + textAlign: "right", + marginTop: 5, + }, +}) diff --git a/examples/publish-ci/react-native/src/features/quotes/quotesApiSlice.ts b/examples/publish-ci/react-native/src/features/quotes/quotesApiSlice.ts new file mode 100644 index 0000000000..a1c7b5a248 --- /dev/null +++ b/examples/publish-ci/react-native/src/features/quotes/quotesApiSlice.ts @@ -0,0 +1,38 @@ +// Need to use the React-specific entry point to import `createApi` +import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react" + +interface Quote { + id: number + quote: string + author: string +} + +interface QuotesApiResponse { + quotes: Quote[] + total: number + skip: number + limit: number +} + +// Define a service using a base URL and expected endpoints +export const quotesApiSlice = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: "https://dummyjson.com/quotes" }), + reducerPath: "quotesApi", + // Tag types are used for caching and invalidation. + tagTypes: ["Quotes"], + endpoints: build => ({ + // Supply generics for the return type (in this case `QuotesApiResponse`) + // and the expected query argument. If there is no argument, use `void` + // for the argument type instead. + getQuotes: build.query({ + query: (limit = 10) => `?limit=${limit}`, + // `providesTags` determines which 'tag' is attached to the + // cached data returned by the query. + providesTags: (result, error, id) => [{ type: "Quotes", id }], + }), + }), +}) + +// Hooks are auto-generated by RTK-Query +// Same as `quotesApiSlice.endpoints.getQuotes.useQuery` +export const { useGetQuotesQuery } = quotesApiSlice diff --git a/examples/publish-ci/react-native/src/utils/test-utils.tsx b/examples/publish-ci/react-native/src/utils/test-utils.tsx new file mode 100644 index 0000000000..8b4ba76544 --- /dev/null +++ b/examples/publish-ci/react-native/src/utils/test-utils.tsx @@ -0,0 +1,64 @@ +import type { RenderOptions } from "@testing-library/react-native" +import { render, userEvent } from "@testing-library/react-native" +import type { PropsWithChildren, ReactElement } from "react" +import { Provider } from "react-redux" +import type { AppStore, RootState } from "../app/store" +import { makeStore } from "../app/store" + +/** + * This type extends the default options for + * React Testing Library's render function. It allows for + * additional configuration such as specifying an initial Redux state and + * a custom store instance. + */ +interface ExtendedRenderOptions extends Omit { + /** + * Defines a specific portion or the entire initial state for the Redux store. + * This is particularly useful for initializing the state in a + * controlled manner during testing, allowing components to be rendered + * with predetermined state conditions. + */ + preloadedState?: Partial + + /** + * Allows the use of a specific Redux store instance instead of a + * default or global store. This flexibility is beneficial when + * testing components with unique store requirements or when isolating + * tests from a global store state. The custom store should be configured + * to match the structure and middleware of the store used by the application. + * + * @default makeStore(preloadedState) + */ + store?: AppStore +} + +/** + * Renders the given React element with Redux Provider and custom store. + * This function is useful for testing components that are connected to the Redux store. + * + * @param ui - The React component or element to render. + * @param extendedRenderOptions - Optional configuration options for rendering. This includes `preloadedState` for initial Redux state and `store` for a specific Redux store instance. Any additional properties are passed to React Testing Library's render function. + * @returns An object containing the Redux store used in the render, User event API for simulating user interactions in tests, and all of React Testing Library's query functions for testing the component. + */ +export const renderWithProviders = ( + ui: ReactElement, + extendedRenderOptions: ExtendedRenderOptions = {}, +) => { + const { + preloadedState = {}, + // Automatically create a store instance if no store was passed in + store = makeStore(preloadedState), + ...renderOptions + } = extendedRenderOptions + + const Wrapper = ({ children }: PropsWithChildren) => ( + {children} + ) + + // Return an object with the store and all of RTL's query functions + return { + store, + user: userEvent.setup(), + ...render(ui, { wrapper: Wrapper, ...renderOptions }), + } +} diff --git a/examples/publish-ci/react-native/yarn.lock b/examples/publish-ci/react-native/yarn.lock index b8195005ff..39b7733e73 100644 --- a/examples/publish-ci/react-native/yarn.lock +++ b/examples/publish-ci/react-native/yarn.lock @@ -62,6 +62,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.23.7": + version: 7.23.7 + resolution: "@babel/core@npm:7.23.7" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helpers": ^7.23.7 + "@babel/parser": ^7.23.6 + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.7 + "@babel/types": ^7.23.6 + convert-source-map: ^2.0.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 32d5bf73372a47429afaae9adb0af39e47bcea6a831c4b5dcbb4791380cda6949cb8cb1a2fea8b60bb1ebe189209c80e333903df1fa8e9dcb04798c0ce5bf59e + languageName: node + linkType: hard + "@babel/eslint-parser@npm:^7.20.0": version: 7.23.3 resolution: "@babel/eslint-parser@npm:7.23.3" @@ -337,6 +360,17 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.23.7": + version: 7.23.8 + resolution: "@babel/helpers@npm:7.23.8" + dependencies: + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.7 + "@babel/types": ^7.23.6 + checksum: 8b522d527921f8df45a983dc7b8e790c021250addf81ba7900ba016e165442a527348f6f877aa55e1debb3eef9e860a334b4e8d834e6c9b438ed61a63d9a7ad4 + languageName: node + linkType: hard + "@babel/highlight@npm:^7.23.4": version: 7.23.4 resolution: "@babel/highlight@npm:7.23.4" @@ -381,15 +415,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.23.3" +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": + version: 7.23.7 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.23.7" dependencies: "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0 - checksum: 4690123f0ef7c11d6bf1a9579e4f463ce363563b75ec3f6ca66cf68687e39d8d747a82c833847653962f79da367eca895d9095c60d8ebb224a1d4277003acc11 + checksum: f88e400b548202a6f8c5dfd25bc4949a13ea1ccb64a170d7dea4deaa655a0fcb001d3fd61c35e1ad9c09a3d5f0d43f783400425471fe6d660ccaf33dabea9aba languageName: node linkType: hard @@ -407,7 +441,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.0": +"@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.0": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -455,7 +489,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-object-rest-spread@npm:^7.0.0, @babel/plugin-proposal-object-rest-spread@npm:^7.20.0": +"@babel/plugin-proposal-object-rest-spread@npm:^7.20.0": version: 7.20.7 resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" dependencies: @@ -526,7 +560,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-properties@npm:^7.0.0, @babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": +"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": version: 7.12.13 resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: @@ -581,7 +615,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-flow@npm:^7.0.0, @babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.23.3": +"@babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-syntax-flow@npm:7.23.3" dependencies: @@ -636,7 +670,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.0.0, @babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": +"@babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.23.3 resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" dependencies: @@ -680,7 +714,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-object-rest-spread@npm:^7.0.0, @babel/plugin-syntax-object-rest-spread@npm:^7.8.3": +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": version: 7.8.3 resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: @@ -769,9 +803,9 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.4" +"@babel/plugin-transform-async-generator-functions@npm:^7.23.7": + version: 7.23.7 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.7" dependencies: "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-plugin-utils": ^7.22.5 @@ -779,7 +813,7 @@ __metadata: "@babel/plugin-syntax-async-generators": ^7.8.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: e2fc132c9033711d55209f4781e1fc73f0f4da5e0ca80a2da73dec805166b73c92a6e83571a8994cd2c893a28302e24107e90856202b24781bab734f800102bb + checksum: b1f66b23423933c27336b1161ac92efef46683321caea97e2255a666f992979376f47a5559f64188d3831fa66a4b24c2a7a40838cc0e9737e90eebe20e8e6372 languageName: node linkType: hard @@ -796,7 +830,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.0.0, @babel/plugin-transform-block-scoped-functions@npm:^7.23.3": +"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.23.3" dependencies: @@ -843,7 +877,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.23.5": +"@babel/plugin-transform-classes@npm:^7.0.0": version: 7.23.5 resolution: "@babel/plugin-transform-classes@npm:7.23.5" dependencies: @@ -862,6 +896,24 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-classes@npm:^7.23.8": + version: 7.23.8 + resolution: "@babel/plugin-transform-classes@npm:7.23.8" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-compilation-targets": ^7.23.6 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-split-export-declaration": ^7.22.6 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7dee6cebe52131d2d16944f36e1fdb9d4b24f44d0e7e450f93a44435d001f17cc0789a4cb6b15ec67c8e484581b8a730b5c3ec374470f29ff0133086955b8c58 + languageName: node + linkType: hard + "@babel/plugin-transform-computed-properties@npm:^7.0.0, @babel/plugin-transform-computed-properties@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-computed-properties@npm:7.23.3" @@ -874,7 +926,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.0.0, @babel/plugin-transform-destructuring@npm:^7.20.0, @babel/plugin-transform-destructuring@npm:^7.23.3": +"@babel/plugin-transform-destructuring@npm:^7.20.0, @babel/plugin-transform-destructuring@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-destructuring@npm:7.23.3" dependencies: @@ -944,7 +996,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.0.0, @babel/plugin-transform-flow-strip-types@npm:^7.20.0, @babel/plugin-transform-flow-strip-types@npm:^7.23.3": +"@babel/plugin-transform-flow-strip-types@npm:^7.20.0, @babel/plugin-transform-flow-strip-types@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-flow-strip-types@npm:7.23.3" dependencies: @@ -956,7 +1008,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.0.0, @babel/plugin-transform-for-of@npm:^7.23.6": +"@babel/plugin-transform-for-of@npm:^7.23.6": version: 7.23.6 resolution: "@babel/plugin-transform-for-of@npm:7.23.6" dependencies: @@ -1016,7 +1068,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.0.0, @babel/plugin-transform-member-expression-literals@npm:^7.23.3": +"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.23.3" dependencies: @@ -1140,7 +1192,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.0.0, @babel/plugin-transform-object-super@npm:^7.23.3": +"@babel/plugin-transform-object-super@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-object-super@npm:7.23.3" dependencies: @@ -1214,7 +1266,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.0.0, @babel/plugin-transform-property-literals@npm:^7.23.3": +"@babel/plugin-transform-property-literals@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-property-literals@npm:7.23.3" dependencies: @@ -1346,7 +1398,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.0.0, @babel/plugin-transform-template-literals@npm:^7.23.3": +"@babel/plugin-transform-template-literals@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-template-literals@npm:7.23.3" dependencies: @@ -1429,9 +1481,9 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.20.0": - version: 7.23.6 - resolution: "@babel/preset-env@npm:7.23.6" +"@babel/preset-env@npm:^7.23.8": + version: 7.23.8 + resolution: "@babel/preset-env@npm:7.23.8" dependencies: "@babel/compat-data": ^7.23.5 "@babel/helper-compilation-targets": ^7.23.6 @@ -1439,7 +1491,7 @@ __metadata: "@babel/helper-validator-option": ^7.23.5 "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.23.3 "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.23.3 - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": ^7.23.3 + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": ^7.23.7 "@babel/plugin-proposal-private-property-in-object": 7.21.0-placeholder-for-preset-env.2 "@babel/plugin-syntax-async-generators": ^7.8.4 "@babel/plugin-syntax-class-properties": ^7.12.13 @@ -1460,13 +1512,13 @@ __metadata: "@babel/plugin-syntax-top-level-await": ^7.14.5 "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 "@babel/plugin-transform-arrow-functions": ^7.23.3 - "@babel/plugin-transform-async-generator-functions": ^7.23.4 + "@babel/plugin-transform-async-generator-functions": ^7.23.7 "@babel/plugin-transform-async-to-generator": ^7.23.3 "@babel/plugin-transform-block-scoped-functions": ^7.23.3 "@babel/plugin-transform-block-scoping": ^7.23.4 "@babel/plugin-transform-class-properties": ^7.23.3 "@babel/plugin-transform-class-static-block": ^7.23.4 - "@babel/plugin-transform-classes": ^7.23.5 + "@babel/plugin-transform-classes": ^7.23.8 "@babel/plugin-transform-computed-properties": ^7.23.3 "@babel/plugin-transform-destructuring": ^7.23.3 "@babel/plugin-transform-dotall-regex": ^7.23.3 @@ -1508,14 +1560,14 @@ __metadata: "@babel/plugin-transform-unicode-regex": ^7.23.3 "@babel/plugin-transform-unicode-sets-regex": ^7.23.3 "@babel/preset-modules": 0.1.6-no-external-plugins - babel-plugin-polyfill-corejs2: ^0.4.6 - babel-plugin-polyfill-corejs3: ^0.8.5 - babel-plugin-polyfill-regenerator: ^0.5.3 + babel-plugin-polyfill-corejs2: ^0.4.7 + babel-plugin-polyfill-corejs3: ^0.8.7 + babel-plugin-polyfill-regenerator: ^0.5.4 core-js-compat: ^3.31.0 semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 130262f263c8a76915ff5361f78afa9e63b4ecbf3ade8e833dc7546db7b9552ab507835bdea0feb5e70861345ca128a31327fd2e187084a215fc9dd1cc0ed38e + checksum: b850f99fc4aed4ba22c7d9207bd2bbc7a729b49ea6f2c2c36e819fe209e309b96fba336096e555b46f791b39f7cdd5ac41246b556283d435a99106eb825a209f languageName: node linkType: hard @@ -1582,7 +1634,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.8.4": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.8.4": version: 7.23.6 resolution: "@babel/runtime@npm:7.23.6" dependencies: @@ -1591,6 +1643,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.23.8": + version: 7.23.8 + resolution: "@babel/runtime@npm:7.23.8" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 0bd5543c26811153822a9f382fd39886f66825ff2a397a19008011376533747cd05c33a91f6248c0b8b0edf0448d7c167ebfba34786088f1b7eb11c65be7dfc3 + languageName: node + linkType: hard + "@babel/template@npm:^7.0.0, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" @@ -1620,6 +1681,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.23.7": + version: 7.23.7 + resolution: "@babel/traverse@npm:7.23.7" + dependencies: + "@babel/code-frame": ^7.23.5 + "@babel/generator": ^7.23.6 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.23.6 + "@babel/types": ^7.23.6 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: d4a7afb922361f710efc97b1e25ec343fab8b2a4ddc81ca84f9a153f22d4482112cba8f263774be8d297918b6c4767c7a98988ab4e53ac73686c986711dd002e + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": version: 7.23.6 resolution: "@babel/types@npm:7.23.6" @@ -1658,7 +1737,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b @@ -2150,51 +2229,35 @@ __metadata: languageName: node linkType: hard -"@pkgr/utils@npm:^2.4.2": - version: 2.4.2 - resolution: "@pkgr/utils@npm:2.4.2" - dependencies: - cross-spawn: ^7.0.3 - fast-glob: ^3.3.0 - is-glob: ^4.0.3 - open: ^9.1.0 - picocolors: ^1.0.0 - tslib: ^2.6.0 - checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc +"@pkgr/core@npm:^0.1.0": + version: 0.1.0 + resolution: "@pkgr/core@npm:0.1.0" + checksum: eeff0e0e517b1ed10eb4c1a8971413a8349bbfdab727dbe7d4085fd94eab95f0c3beb51b9245fef30562849d2a7a119e07ca48c343c8c4ec4e64ee289f50fe5e languageName: node linkType: hard -"@react-native-community/cli-clean@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-clean@npm:12.1.1" +"@react-native-community/cli-clean@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-clean@npm:12.3.0" dependencies: - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 execa: ^5.0.0 - checksum: 555394f30213d6d93142a0c6658c33fb374994ef66e0e297f96a03d1624f72c3d647824bf2a599b23cd076a46c49ddeab7c618b72dcf5f64c25d9fd844ff5d78 + checksum: e2e993f4273457b9edd5dadc64d6d12afd78af9c947331f1e56fb46097e34006bf07ea348ce5a5f7f5e1b957af69593c304572e7cc50f19ba170f943de38c128 languageName: node linkType: hard -"@react-native-community/cli-config@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-config@npm:12.1.1" +"@react-native-community/cli-config@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-config@npm:12.3.0" dependencies: - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 cosmiconfig: ^5.1.0 deepmerge: ^4.3.0 glob: ^7.1.3 joi: ^17.2.1 - checksum: 919e2fb0950ff9fedcf3017819b71cc39c4b1d78b5fae0421c7f3e42d36b40d598b0826b5880f820cfaca3d6f12302dc7fa0a9973b5ea7699723ca2dcd650b32 - languageName: node - linkType: hard - -"@react-native-community/cli-debugger-ui@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-debugger-ui@npm:12.1.1" - dependencies: - serve-static: ^1.13.1 - checksum: 4044fe6522a24e701faea57dc0b90dc201bdd1f3e8b63917c56d01e97f5ad9628ddd90a48d0906bdd8b6874fcbf9a8d818e09164246dbdd13e20b20fb5a61f1e + checksum: 43f02674969d55448bc4222a6eb01c730f8aef95f49a47789c5cce809e128e90580e99fd727ba798c9c889db8ec491d428290173ffb9cb352e3d004bd7a1bdab languageName: node linkType: hard @@ -2207,14 +2270,14 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-doctor@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-doctor@npm:12.1.1" +"@react-native-community/cli-doctor@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-doctor@npm:12.3.0" dependencies: - "@react-native-community/cli-config": 12.1.1 - "@react-native-community/cli-platform-android": 12.1.1 - "@react-native-community/cli-platform-ios": 12.1.1 - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-config": 12.3.0 + "@react-native-community/cli-platform-android": 12.3.0 + "@react-native-community/cli-platform-ios": 12.3.0 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 command-exists: ^1.2.8 deepmerge: ^4.3.0 @@ -2228,72 +2291,55 @@ __metadata: strip-ansi: ^5.2.0 wcwidth: ^1.0.1 yaml: ^2.2.1 - checksum: 110b682bebcd3baec9f149a80b0c3528403f3ea23bf8fabdf7f8204f767426fde23484961273ab0fc20472b60d7f3cb057348f86e3dbb776c8ffe528134a4fd7 + checksum: cd0ccdf9da63853a2099de90ed3b1264fd3a311ff2a2b61d0882de02e0fb1bb2d854e474497347de8454479f9fb891aaea739f2a4dd1d5bc1142a1f30a1da721 languageName: node linkType: hard -"@react-native-community/cli-hermes@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-hermes@npm:12.1.1" +"@react-native-community/cli-hermes@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-hermes@npm:12.3.0" dependencies: - "@react-native-community/cli-platform-android": 12.1.1 - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-platform-android": 12.3.0 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 hermes-profile-transformer: ^0.0.6 ip: ^1.1.5 - checksum: d1e7d5e85a4c4b77959656bb30600b21c45742c2fe4eebc0437ff1b2300625737ce8a5cde8626e5ab42d5bd56960fef13e3d0daacfb028003ff8e9aac7b6e194 + checksum: 8b9c17184f023466a072bbe5d4bbed76c40b36feab4b3359c526cd561b9231c0b936ee934b2c1bd1c969d6ba1421241a29975f3210b403fc1532f643d7a14447 languageName: node linkType: hard -"@react-native-community/cli-platform-android@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-platform-android@npm:12.1.1" +"@react-native-community/cli-platform-android@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-platform-android@npm:12.3.0" dependencies: - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 execa: ^5.0.0 fast-xml-parser: ^4.2.4 glob: ^7.1.3 logkitty: ^0.7.1 - checksum: 15db2179ec434e5aaed075951f7f4aa117a68227ba42a9773dfcc265eecc81f7c085a23ff6f8f34adc9c959ee80272f7d273b735257816c8615edae9453e892c + checksum: 21bf7edd73e1aef598a3d443bd7341eff2050fa61f3eed358dbc779620fb77677e0b002470e571812336fe00198c24563b55b3af728c72ebac5df86b344a25b6 languageName: node linkType: hard -"@react-native-community/cli-platform-ios@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-platform-ios@npm:12.1.1" +"@react-native-community/cli-platform-ios@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-platform-ios@npm:12.3.0" dependencies: - "@react-native-community/cli-tools": 12.1.1 + "@react-native-community/cli-tools": 12.3.0 chalk: ^4.1.2 execa: ^5.0.0 fast-xml-parser: ^4.0.12 glob: ^7.1.3 ora: ^5.4.1 - checksum: 5116d6ae52a3e13e989164898a8defc8d761d8a98dc7d8a5e28d2b984695adfdf0c3d06dfb2c8ed5ca66849f2aefeed43dcd80a8840e65318115260be3f6ef3d - languageName: node - linkType: hard - -"@react-native-community/cli-plugin-metro@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-plugin-metro@npm:12.1.1" - checksum: dcd0dd69c0b4086e46838f180c15fc5f5f134c22bb8199dc5b5ee210ebaffd8c170a7229f8cdfdfb50a2e35f9a5418774fe85ae0cec8df5be96ad883ac8982dc + checksum: 2bc5d4955363e0f41d7bfd42b6a61820ae813ecf1d5e057ec42b60175c7b0deac1456fe4c4734b7df353101bfc24745a32a7d0986315fce22b0c89e36bff2bd2 languageName: node linkType: hard -"@react-native-community/cli-server-api@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-server-api@npm:12.1.1" - dependencies: - "@react-native-community/cli-debugger-ui": 12.1.1 - "@react-native-community/cli-tools": 12.1.1 - compression: ^1.7.1 - connect: ^3.6.5 - errorhandler: ^1.5.1 - nocache: ^3.0.1 - pretty-format: ^26.6.2 - serve-static: ^1.13.1 - ws: ^7.5.1 - checksum: a34ff038cbe07e61144da9ebe0dcfa8d4d3520e57199430444adf2cb8ce57087b71260d132d5c1cc487d0b5c12e4f8ecb5a49fa4430e3f66f456c38bf7522f1b +"@react-native-community/cli-plugin-metro@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-plugin-metro@npm:12.3.0" + checksum: 6a9f34be596271c4e37729f70099f5996339bf8ceb5023597beb253e43115db394d3ec669a2a6635ab659d3571a7aa1ba5e5ea31d2b460f68edf1b0a82fb2950 languageName: node linkType: hard @@ -2314,24 +2360,6 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-tools@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-tools@npm:12.1.1" - dependencies: - appdirsjs: ^1.2.4 - chalk: ^4.1.2 - find-up: ^5.0.0 - mime: ^2.4.1 - node-fetch: ^2.6.0 - open: ^6.2.0 - ora: ^5.4.1 - semver: ^7.5.2 - shell-quote: ^1.7.3 - sudo-prompt: ^9.0.0 - checksum: 44fa3291de83e77d8f8e6e434fe739eb1c4bfd48d27ff3614d45129837028bcd94e7749fbf0f1bb67ad82c1c2feb73aabd1c86a52209c43cf49f1882fa0974dc - languageName: node - linkType: hard - "@react-native-community/cli-tools@npm:12.3.0": version: 12.3.0 resolution: "@react-native-community/cli-tools@npm:12.3.0" @@ -2350,28 +2378,28 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-types@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli-types@npm:12.1.1" +"@react-native-community/cli-types@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli-types@npm:12.3.0" dependencies: joi: ^17.2.1 - checksum: 172fa8b01f06902dad0e4802fc6b4ea3b89bb453a1c04e352955986296a1c777f1026f09a91dd5b6a985f38f3fecb00066a6a100fdd3c84cd1f8c664b01c030e + checksum: 001bd07cc93e9248ee324334d0c3f55415c7174aae51f62f6884a7f2edc4b39a31c66420b2006d9980a4481da466c048c91cf2b936cc220a6dbc7726e614f981 languageName: node linkType: hard -"@react-native-community/cli@npm:12.1.1": - version: 12.1.1 - resolution: "@react-native-community/cli@npm:12.1.1" +"@react-native-community/cli@npm:12.3.0": + version: 12.3.0 + resolution: "@react-native-community/cli@npm:12.3.0" dependencies: - "@react-native-community/cli-clean": 12.1.1 - "@react-native-community/cli-config": 12.1.1 - "@react-native-community/cli-debugger-ui": 12.1.1 - "@react-native-community/cli-doctor": 12.1.1 - "@react-native-community/cli-hermes": 12.1.1 - "@react-native-community/cli-plugin-metro": 12.1.1 - "@react-native-community/cli-server-api": 12.1.1 - "@react-native-community/cli-tools": 12.1.1 - "@react-native-community/cli-types": 12.1.1 + "@react-native-community/cli-clean": 12.3.0 + "@react-native-community/cli-config": 12.3.0 + "@react-native-community/cli-debugger-ui": 12.3.0 + "@react-native-community/cli-doctor": 12.3.0 + "@react-native-community/cli-hermes": 12.3.0 + "@react-native-community/cli-plugin-metro": 12.3.0 + "@react-native-community/cli-server-api": 12.3.0 + "@react-native-community/cli-tools": 12.3.0 + "@react-native-community/cli-types": 12.3.0 chalk: ^4.1.2 commander: ^9.4.1 deepmerge: ^4.3.0 @@ -2383,29 +2411,29 @@ __metadata: semver: ^7.5.2 bin: react-native: build/bin.js - checksum: 162cdcaf2c994d8329ec60a59d6afd2c41ec317c19e346c8edaf8e6e8250c7ef00c10070d24d580104ce9c2f16d2ace6f34fa485001f82ca6ce66f74e489c032 + checksum: 30ab321b69977c8ac4d0a4634dd6af893c2f055734eed486aaacc93ab85fe9a6dd124bc0c72a32f750bb7dfb3fd4ac5ce30a7ec916905b47efc443598afdae00 languageName: node linkType: hard -"@react-native/assets-registry@npm:^0.73.1": +"@react-native/assets-registry@npm:0.73.1": version: 0.73.1 resolution: "@react-native/assets-registry@npm:0.73.1" checksum: d9d09774d497bae13b1fb6a1c977bf6e442858639ee66fe4e8f955cfc903a16f79de6129471114a918a4b814eb5150bd808a5a7dc9f8b12d49795d9488d4cb67 languageName: node linkType: hard -"@react-native/babel-plugin-codegen@npm:*": - version: 0.74.0 - resolution: "@react-native/babel-plugin-codegen@npm:0.74.0" +"@react-native/babel-plugin-codegen@npm:0.73.2": + version: 0.73.2 + resolution: "@react-native/babel-plugin-codegen@npm:0.73.2" dependencies: - "@react-native/codegen": "*" - checksum: 4663bd2395503ce0e14908b718107bc5d82708be709db746eba448b57193e5dfce7a404688b12b319bf6c9e37ca4db5dd9591f471daba9dfe219970eb8ed2bf7 + "@react-native/codegen": 0.73.2 + checksum: 0951dd53499342d2ac7c10bf7a764dac9e534b38d0bba673f9fa9cec80171a9bc8ad9dcea86e832453f04bcfa2bf7bf607a1b33056aa431e8666c05aa5f668af languageName: node linkType: hard -"@react-native/babel-preset@npm:*": - version: 0.74.0 - resolution: "@react-native/babel-preset@npm:0.74.0" +"@react-native/babel-preset@npm:0.73.19, @react-native/babel-preset@npm:^0.73.19": + version: 0.73.19 + resolution: "@react-native/babel-preset@npm:0.73.19" dependencies: "@babel/core": ^7.20.0 "@babel/plugin-proposal-async-generator-functions": ^7.0.0 @@ -2446,68 +2474,16 @@ __metadata: "@babel/plugin-transform-typescript": ^7.5.0 "@babel/plugin-transform-unicode-regex": ^7.0.0 "@babel/template": ^7.0.0 - "@react-native/babel-plugin-codegen": "*" + "@react-native/babel-plugin-codegen": 0.73.2 babel-plugin-transform-flow-enums: ^0.0.2 react-refresh: ^0.14.0 peerDependencies: "@babel/core": "*" - checksum: d0d94e033407f24f09519f8b62ec6e384b4acf9e599cec3a630add0c1fda6ac1959fb91829af420932a418ccdcc147e2e7358908988a141b804e22d6a4093859 + checksum: 3c3d09f6e0c88efc3cf372ac7d866c1410c60e3dd0a5aeb63a02e732eccefe670ebc8127a60235639590568c2a3343e0f24b7159ad174091932177121cc59e1e languageName: node linkType: hard -"@react-native/babel-preset@npm:^0.73.18": - version: 0.73.18 - resolution: "@react-native/babel-preset@npm:0.73.18" - dependencies: - "@babel/core": ^7.20.0 - "@babel/plugin-proposal-async-generator-functions": ^7.0.0 - "@babel/plugin-proposal-class-properties": ^7.18.0 - "@babel/plugin-proposal-export-default-from": ^7.0.0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.0 - "@babel/plugin-proposal-numeric-separator": ^7.0.0 - "@babel/plugin-proposal-object-rest-spread": ^7.20.0 - "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 - "@babel/plugin-proposal-optional-chaining": ^7.20.0 - "@babel/plugin-syntax-dynamic-import": ^7.8.0 - "@babel/plugin-syntax-export-default-from": ^7.0.0 - "@babel/plugin-syntax-flow": ^7.18.0 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 - "@babel/plugin-syntax-optional-chaining": ^7.0.0 - "@babel/plugin-transform-arrow-functions": ^7.0.0 - "@babel/plugin-transform-async-to-generator": ^7.20.0 - "@babel/plugin-transform-block-scoping": ^7.0.0 - "@babel/plugin-transform-classes": ^7.0.0 - "@babel/plugin-transform-computed-properties": ^7.0.0 - "@babel/plugin-transform-destructuring": ^7.20.0 - "@babel/plugin-transform-flow-strip-types": ^7.20.0 - "@babel/plugin-transform-function-name": ^7.0.0 - "@babel/plugin-transform-literals": ^7.0.0 - "@babel/plugin-transform-modules-commonjs": ^7.0.0 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 - "@babel/plugin-transform-parameters": ^7.0.0 - "@babel/plugin-transform-private-methods": ^7.22.5 - "@babel/plugin-transform-private-property-in-object": ^7.22.11 - "@babel/plugin-transform-react-display-name": ^7.0.0 - "@babel/plugin-transform-react-jsx": ^7.0.0 - "@babel/plugin-transform-react-jsx-self": ^7.0.0 - "@babel/plugin-transform-react-jsx-source": ^7.0.0 - "@babel/plugin-transform-runtime": ^7.0.0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0 - "@babel/plugin-transform-spread": ^7.0.0 - "@babel/plugin-transform-sticky-regex": ^7.0.0 - "@babel/plugin-transform-typescript": ^7.5.0 - "@babel/plugin-transform-unicode-regex": ^7.0.0 - "@babel/template": ^7.0.0 - "@react-native/babel-plugin-codegen": "*" - babel-plugin-transform-flow-enums: ^0.0.2 - react-refresh: ^0.14.0 - peerDependencies: - "@babel/core": "*" - checksum: 291e9ee5ea916a36103daea2c8209c3e36381763d661a9fd1ed237eed63f7154fa37acfb23a2fd7302bbc60e25fcadecdd319bc2e0d6ef28ac92bd1d7d4a3fbf - languageName: node - linkType: hard - -"@react-native/codegen@npm:*, @react-native/codegen@npm:^0.73.2": +"@react-native/codegen@npm:0.73.2": version: 0.73.2 resolution: "@react-native/codegen@npm:0.73.2" dependencies: @@ -2524,38 +2500,38 @@ __metadata: languageName: node linkType: hard -"@react-native/community-cli-plugin@npm:^0.73.10": - version: 0.73.11 - resolution: "@react-native/community-cli-plugin@npm:0.73.11" +"@react-native/community-cli-plugin@npm:0.73.12": + version: 0.73.12 + resolution: "@react-native/community-cli-plugin@npm:0.73.12" dependencies: "@react-native-community/cli-server-api": 12.3.0 "@react-native-community/cli-tools": 12.3.0 - "@react-native/dev-middleware": ^0.73.6 - "@react-native/metro-babel-transformer": ^0.73.12 + "@react-native/dev-middleware": 0.73.7 + "@react-native/metro-babel-transformer": 0.73.13 chalk: ^4.0.0 execa: ^5.1.1 - metro: ^0.80.0 - metro-config: ^0.80.0 - metro-core: ^0.80.0 + metro: ^0.80.3 + metro-config: ^0.80.3 + metro-core: ^0.80.3 node-fetch: ^2.2.0 readline: ^1.3.0 - checksum: cd7d2d88c5e62500ab9392371275044ef60cdfbaea715fef5c52f9cdcd325e28412e27b2f207df34098de15f035470da3aae0ca1f0bf3df3cb1bd61b3cf0b585 + checksum: 503936ea343d4c5d3f6234e59cbd36e750174a9bc80a38f308d2fe317b646b18da6ea3780caffb676320e23be808e529f7bee11667052a86ed75b1cacf5b8b1c languageName: node linkType: hard -"@react-native/debugger-frontend@npm:^0.73.3": +"@react-native/debugger-frontend@npm:0.73.3": version: 0.73.3 resolution: "@react-native/debugger-frontend@npm:0.73.3" checksum: 71ecf6fdf3ecf2cae80818e2b8717acb22e291fd19edf89f570e695a165660a749244fb03465b3b8b9b7166cbdee627577dd75321f6793649b0a255aec722d92 languageName: node linkType: hard -"@react-native/dev-middleware@npm:^0.73.6": - version: 0.73.6 - resolution: "@react-native/dev-middleware@npm:0.73.6" +"@react-native/dev-middleware@npm:0.73.7": + version: 0.73.7 + resolution: "@react-native/dev-middleware@npm:0.73.7" dependencies: "@isaacs/ttlcache": ^1.4.1 - "@react-native/debugger-frontend": ^0.73.3 + "@react-native/debugger-frontend": 0.73.3 chrome-launcher: ^0.15.2 chromium-edge-launcher: ^1.0.0 connect: ^3.6.5 @@ -2564,19 +2540,19 @@ __metadata: open: ^7.0.3 serve-static: ^1.13.1 temp-dir: ^2.0.0 - checksum: 902c1bfd54ea27468d515877eaf7b0772c095c8ed8e7d715ae7b48deb41874d1d260a5f9af5ae05b40de7f056d8771ad8698a9f9424f55e4633ab2e97ca2cd4d + checksum: fd22acc763282c0cec8776cf1604a063b016b96fce0922c1f6690cd6df1cfde4540f3df3364721a13d12777e84bfc218a2a3b71f9965ee6be6bfad51c5a0d07e languageName: node linkType: hard -"@react-native/eslint-config@npm:^0.73.1": - version: 0.73.1 - resolution: "@react-native/eslint-config@npm:0.73.1" +"@react-native/eslint-config@npm:^0.74.0": + version: 0.74.0 + resolution: "@react-native/eslint-config@npm:0.74.0" dependencies: "@babel/core": ^7.20.0 "@babel/eslint-parser": ^7.20.0 - "@react-native/eslint-plugin": ^0.73.1 - "@typescript-eslint/eslint-plugin": ^5.57.1 - "@typescript-eslint/parser": ^5.57.1 + "@react-native/eslint-plugin": ^0.74.0 + "@typescript-eslint/eslint-plugin": ^6.7.4 + "@typescript-eslint/parser": ^6.7.4 eslint-config-prettier: ^8.5.0 eslint-plugin-eslint-comments: ^3.2.0 eslint-plugin-ft-flow: ^2.0.1 @@ -2588,73 +2564,72 @@ __metadata: peerDependencies: eslint: ">=8" prettier: ">=2" - checksum: d2e86572b0c09be999c5033ae49b6dcf3d492b666c027304e0e1c096de20f0adcdc140af98a42ae104d16209c5610457073a92fa04aae0c3de204ea8ef922081 + checksum: c384da1f3613d5c801f6be2e9e1693ecf22834b69fbfd6ddb726ce43c504def8283ac984e9c09100935f2b42f014d2202ecdb361f9bffbb5c490bb5de82c0788 languageName: node linkType: hard -"@react-native/eslint-plugin@npm:^0.73.1": - version: 0.73.1 - resolution: "@react-native/eslint-plugin@npm:0.73.1" - checksum: 82a9bd30ada10ec4e926021967d1ffeb7c82eaaba6f7171cc655daf3339d2e2c15897bc3cd0f529e83ef2958c3b9b0365590a6b672a1a0efe7c781bd3e854473 +"@react-native/eslint-plugin@npm:^0.74.0": + version: 0.74.0 + resolution: "@react-native/eslint-plugin@npm:0.74.0" + checksum: 2ac8713e602d2ec993f03b1f5b161f0739a71a9b36bf185de48ddcdff6c1e30c61729ad48c11a963d39a60d10d2a2ecf4c4f922ef1ea40a8f2b1e8d71626fd2f languageName: node linkType: hard -"@react-native/gradle-plugin@npm:^0.73.4": +"@react-native/gradle-plugin@npm:0.73.4": version: 0.73.4 resolution: "@react-native/gradle-plugin@npm:0.73.4" checksum: f72e2a9fc44f7a848142f09e939686b85f7f51edb0634407635b742f152f2d5162eb08579a6a03c37f2550397a64915578d185dac1b95c7cf1ba8729fa51f389 languageName: node linkType: hard -"@react-native/js-polyfills@npm:^0.73.1": +"@react-native/js-polyfills@npm:0.73.1": version: 0.73.1 resolution: "@react-native/js-polyfills@npm:0.73.1" checksum: ec5899c3f2480475a6dccb252f3de6cc0b2eccc32d3d4a61a479e5f09d6458d86860fd60af472448b417d6e19f75c6b4008de245ab7fbb6d9c4300f452a37fd5 languageName: node linkType: hard -"@react-native/metro-babel-transformer@npm:^0.73.12": - version: 0.73.12 - resolution: "@react-native/metro-babel-transformer@npm:0.73.12" +"@react-native/metro-babel-transformer@npm:0.73.13": + version: 0.73.13 + resolution: "@react-native/metro-babel-transformer@npm:0.73.13" dependencies: "@babel/core": ^7.20.0 - "@react-native/babel-preset": "*" - babel-preset-fbjs: ^3.4.0 + "@react-native/babel-preset": 0.73.19 hermes-parser: 0.15.0 nullthrows: ^1.1.1 peerDependencies: "@babel/core": "*" - checksum: ba9d27e71d76190bbc97633486e2eaa57a51bdaaad7fd13dc7cca3a864b31533773d38cf9c69ef092148e62cb88243e7f4a643f1b363e9a3f733b598c6f3374a + checksum: 56b7330dd7fef32ede05471bccbab1b3fe73902b165add4150c4302eff19f1d35b196b98cc3dbcff183b5d8ef814a472806ee36d81204c43c920ea832185c123 languageName: node linkType: hard -"@react-native/metro-config@npm:^0.73.2": - version: 0.73.2 - resolution: "@react-native/metro-config@npm:0.73.2" +"@react-native/metro-config@npm:^0.73.3": + version: 0.73.3 + resolution: "@react-native/metro-config@npm:0.73.3" dependencies: - "@react-native/js-polyfills": ^0.73.1 - "@react-native/metro-babel-transformer": ^0.73.12 - metro-config: ^0.80.0 - metro-runtime: ^0.80.0 - checksum: 91b71038c6a33b965c9b598125c78172957395e6bcede695202f846cea0f2dd4668cc3f09b5afa5dcdfce3e212007ec22b855f100473fae8b944877d68e4dbc8 + "@react-native/js-polyfills": 0.73.1 + "@react-native/metro-babel-transformer": 0.73.13 + metro-config: ^0.80.3 + metro-runtime: ^0.80.3 + checksum: f22ef2957235d98898c305b3f9acb0a521f3bd1c759ec9d7f52fd1745f636c6915d224a69ee909e58e6336059c8dee91a66a065a558514d2eff753902edb1c80 languageName: node linkType: hard -"@react-native/normalize-colors@npm:^0.73.0, @react-native/normalize-colors@npm:^0.73.2": +"@react-native/normalize-colors@npm:0.73.2, @react-native/normalize-colors@npm:^0.73.0": version: 0.73.2 resolution: "@react-native/normalize-colors@npm:0.73.2" checksum: ddf9384ad41adc4f3c8eb61ddd27113130c8060bd2f4255bee284a52aa7ddcff8a5e751f569dd416c45f8b9d4062392fa7219b221f2f7f0b229d02b8d2a5b974 languageName: node linkType: hard -"@react-native/typescript-config@npm:^0.73.1": - version: 0.73.1 - resolution: "@react-native/typescript-config@npm:0.73.1" - checksum: 9b66fe369c26758764e782f876241f51b75101b627659a148b2709e3c0548a314f5e98dfb508a72d038379a9a11eef18f5cc3e20b04d4e28210b0e09edd819fe +"@react-native/typescript-config@npm:^0.74.0": + version: 0.74.0 + resolution: "@react-native/typescript-config@npm:0.74.0" + checksum: 4b027641316d7fa9975f35982a55f9de49df462845cb4b84f4e668ec034c22d22ecf4a79d4a017d7a3d11ca770e288a6ba7ad6ab7758ff7990cfc96ef0e38771 languageName: node linkType: hard -"@react-native/virtualized-lists@npm:^0.73.3": +"@react-native/virtualized-lists@npm:0.73.4": version: 0.73.4 resolution: "@react-native/virtualized-lists@npm:0.73.4" dependencies: @@ -2734,9 +2709,9 @@ __metadata: languageName: node linkType: hard -"@testing-library/react-native@npm:^12.4.1": - version: 12.4.1 - resolution: "@testing-library/react-native@npm:12.4.1" +"@testing-library/react-native@npm:^12.4.3": + version: 12.4.3 + resolution: "@testing-library/react-native@npm:12.4.3" dependencies: jest-matcher-utils: ^29.7.0 pretty-format: ^29.7.0 @@ -2749,7 +2724,7 @@ __metadata: peerDependenciesMeta: jest: optional: true - checksum: cd73fc33e48d3eb8f4e3e4b99b88913e4fd4f91ab33285e400146730cdfdb3ee48605cc73bd18c570a56c4d364f45c3d6c8434ed7f30d3c1b53f9730ad68813e + checksum: bd1c06b200063ffad26245cbc61b7256b5bfcc2c69a32f7e6dc9ff1bf44c3743117d5010b8dbc8f9a1b660c3ee22ccf9ecc320c03db52f9ec75ba7e52c1d8ba3 languageName: node linkType: hard @@ -2898,7 +2873,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.2.6": +"@types/react@npm:*": version: 18.2.45 resolution: "@types/react@npm:18.2.45" dependencies: @@ -2909,6 +2884,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.47": + version: 18.2.47 + resolution: "@types/react@npm:18.2.47" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: 49608f07f73374e535b21f99fee28e6cfd5801d887c6ed88c41b4dc701dbcee9f0c4d289d9af7b2b23114f76dbf203ffe2c9191bfb4958cf18dae5a25daedbd0 + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.16.8 resolution: "@types/scheduler@npm:0.16.8" @@ -2962,39 +2948,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.57.1": - version: 5.62.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" - dependencies: - "@eslint-community/regexpp": ^4.4.0 - "@typescript-eslint/scope-manager": 5.62.0 - "@typescript-eslint/type-utils": 5.62.0 - "@typescript-eslint/utils": 5.62.0 - debug: ^4.3.4 - graphemer: ^1.4.0 - ignore: ^5.2.0 - natural-compare-lite: ^1.4.0 - semver: ^7.3.7 - tsutils: ^3.21.0 - peerDependencies: - "@typescript-eslint/parser": ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1 - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/eslint-plugin@npm:6.14.0" +"@typescript-eslint/eslint-plugin@npm:^6.18.1, @typescript-eslint/eslint-plugin@npm:^6.7.4": + version: 6.18.1 + resolution: "@typescript-eslint/eslint-plugin@npm:6.18.1" dependencies: "@eslint-community/regexpp": ^4.5.1 - "@typescript-eslint/scope-manager": 6.14.0 - "@typescript-eslint/type-utils": 6.14.0 - "@typescript-eslint/utils": 6.14.0 - "@typescript-eslint/visitor-keys": 6.14.0 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/type-utils": 6.18.1 + "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 debug: ^4.3.4 graphemer: ^1.4.0 ignore: ^5.2.4 @@ -3007,42 +2969,25 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: ec688fd71b21576bfe0e4176889fddf3c13d8b07792461b84017d689ed11a9bffbf4d2ab61e9bdb254e43d2c1e159d5c2fc21bdfa6a6c2d64f9e1956a668fbe8 + checksum: 933ede339bfac8377f94b211253bce40ace272a01466c290b38e681ec4752128ce63f827bbe6cc70cc0383d01655c8a22b25c640841fe90dfa4e57f73baaf2a9 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.57.1": - version: 5.62.0 - resolution: "@typescript-eslint/parser@npm:5.62.0" +"@typescript-eslint/parser@npm:^6.18.1, @typescript-eslint/parser@npm:^6.7.4": + version: 6.18.1 + resolution: "@typescript-eslint/parser@npm:6.18.1" dependencies: - "@typescript-eslint/scope-manager": 5.62.0 - "@typescript-eslint/types": 5.62.0 - "@typescript-eslint/typescript-estree": 5.62.0 - debug: ^4.3.4 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752 - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/parser@npm:6.14.0" - dependencies: - "@typescript-eslint/scope-manager": 6.14.0 - "@typescript-eslint/types": 6.14.0 - "@typescript-eslint/typescript-estree": 6.14.0 - "@typescript-eslint/visitor-keys": 6.14.0 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 debug: ^4.3.4 peerDependencies: eslint: ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 5fbe8d7431654c14ba6c9782d3728026ad5c90e02c9c4319f45df972e653cf5c15ba320dce70cdffa9fb7ce4c4263c37585e7bc1c909d1252d0a599880963063 + checksum: f123310976a73d9f08470dbad917c9e7b038e9e1362924a225a29d35fac1a2726d447952ca77b914d47f50791d235bb66f5171c7a4a0536e9c170fb20e73a2e4 languageName: node linkType: hard @@ -3056,39 +3001,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/scope-manager@npm:6.14.0" +"@typescript-eslint/scope-manager@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/scope-manager@npm:6.18.1" dependencies: - "@typescript-eslint/types": 6.14.0 - "@typescript-eslint/visitor-keys": 6.14.0 - checksum: 0b577d42db925426a9838fe61703c226e18b697374fbe20cf9b93ba30fe58bf4a7f7f42491a4d24b7f3cc12d9a189fe3524c0e9b7708727e710d95b908250a14 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 + checksum: d6708f9f2658ab68f9f4628b93c4131fb82c362383b4d5d671491082ff610258f2fc9e293739618dc76ed6d2c5909f000a54b9b905e58a5172e6e2f731666245 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/type-utils@npm:5.62.0" +"@typescript-eslint/type-utils@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/type-utils@npm:6.18.1" dependencies: - "@typescript-eslint/typescript-estree": 5.62.0 - "@typescript-eslint/utils": 5.62.0 - debug: ^4.3.4 - tsutils: ^3.21.0 - peerDependencies: - eslint: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/type-utils@npm:6.14.0" - dependencies: - "@typescript-eslint/typescript-estree": 6.14.0 - "@typescript-eslint/utils": 6.14.0 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/utils": 6.18.1 debug: ^4.3.4 ts-api-utils: ^1.0.1 peerDependencies: @@ -3096,7 +3024,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 09988f25279598840673c41ba44b03756f2dfb31284ab72af97c170711a0f31e5c53d6b120aa83f31438565e82aae1a1ca4d1ed0de4890654dd6a6a33d88202c + checksum: 44d7e14460f8a22a0c5c58ff7004cb40061e722dfcec3ac4ee15d40dafe68c61e555a79e81af8ffa0ca845fb3caf3ed5376853b9a94e2f3c823ac5e8267230c8 languageName: node linkType: hard @@ -3107,10 +3035,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/types@npm:6.14.0" - checksum: 624e6c5227f596dcc9757348d09c5a09b846a62938b8b4409614cf8108013b64ed8b270c32e87ea8890dd09ed896b82e92872c3574dbf07dcda11a168d69dd1f +"@typescript-eslint/types@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/types@npm:6.18.1" + checksum: f1713785c4dd49e6aae4186042679d205312a1c6cbfcdad133abf5c61f71c115e04c6643aa6a8aacd732e6b64030d71bbc92762164b7f231d98fc2e31c3f8ed8 languageName: node linkType: hard @@ -3132,25 +3060,43 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.14.0" +"@typescript-eslint/typescript-estree@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/typescript-estree@npm:6.18.1" dependencies: - "@typescript-eslint/types": 6.14.0 - "@typescript-eslint/visitor-keys": 6.14.0 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 + minimatch: 9.0.3 semver: ^7.5.4 ts-api-utils: ^1.0.1 peerDependenciesMeta: typescript: optional: true - checksum: 495d7616463685bfd8138ffa9fbc0a7f9130ff8a3f6f85775960b4f0a3fdc259ae53b104cdfe562b60310860b5a6c8387307790734555084aa087e3bb9c28a69 + checksum: fc5fb8abea9a6c3b774f62989b9a463569d141c32f6f2febef11d4161acaff946b204226234077b1126294fcf86a83c5fc9227f34ea3ba4cc9d39ca843dfae97 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/utils@npm:6.18.1" + dependencies: + "@eslint-community/eslint-utils": ^4.4.0 + "@types/json-schema": ^7.0.12 + "@types/semver": ^7.5.0 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + semver: ^7.5.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: b7265b0cae099feb98e233dd518b54408fde01b9703535c9e9b84c24e9af6fff0fd9a61f0f7d7b24fb738151ad25a7f57210e83a5a2700cac38ee627f5b856d4 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.10.0": +"@typescript-eslint/utils@npm:^5.10.0": version: 5.62.0 resolution: "@typescript-eslint/utils@npm:5.62.0" dependencies: @@ -3168,23 +3114,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/utils@npm:6.14.0" - dependencies: - "@eslint-community/eslint-utils": ^4.4.0 - "@types/json-schema": ^7.0.12 - "@types/semver": ^7.5.0 - "@typescript-eslint/scope-manager": 6.14.0 - "@typescript-eslint/types": 6.14.0 - "@typescript-eslint/typescript-estree": 6.14.0 - semver: ^7.5.4 - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 36e8501cb85647947189f31017c36d6f6ac7ef0399fa0e18eb64f1b83e00f1e8ace1d9ac5015ef4d9c1b820179f1def8d61d7ea9e5d61433eb848cf5c49dc8b0 - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" @@ -3195,13 +3124,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:6.14.0": - version: 6.14.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.14.0" +"@typescript-eslint/visitor-keys@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/visitor-keys@npm:6.18.1" dependencies: - "@typescript-eslint/types": 6.14.0 + "@typescript-eslint/types": 6.18.1 eslint-visitor-keys: ^3.4.1 - checksum: fc593c4e94d5739be7bd88e42313a301bc9806fad758b6a0a1bafd296ff41522be602caf4976beec84e363b0f56585bb98df3c157f70de984de721798501fd8a + checksum: 4befc450fd459e9dc368c3da7066a4948946e8b24383bf0fbaacd059cbe69ff0f71cac4f6d5d1f99a523c1fb20d39bef907e522d2c8e8315a8ce4ce678a58540 languageName: node linkType: hard @@ -3551,7 +3480,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.6.3, babel-jest@npm:^29.7.0": +"babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" dependencies: @@ -3593,7 +3522,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.6": +"babel-plugin-polyfill-corejs2@npm:^0.4.6, babel-plugin-polyfill-corejs2@npm:^0.4.7": version: 0.4.7 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.7" dependencies: @@ -3606,7 +3535,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.5": +"babel-plugin-polyfill-corejs3@npm:^0.8.5, babel-plugin-polyfill-corejs3@npm:^0.8.7": version: 0.8.7 resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" dependencies: @@ -3618,7 +3547,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.3": +"babel-plugin-polyfill-regenerator@npm:^0.5.3, babel-plugin-polyfill-regenerator@npm:^0.5.4": version: 0.5.4 resolution: "babel-plugin-polyfill-regenerator@npm:0.5.4" dependencies: @@ -3629,13 +3558,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-syntax-trailing-function-commas@npm:^7.0.0-beta.0": - version: 7.0.0-beta.0 - resolution: "babel-plugin-syntax-trailing-function-commas@npm:7.0.0-beta.0" - checksum: e37509156ca945dd9e4b82c66dd74f2d842ad917bd280cb5aa67960942300cd065eeac476d2514bdcdedec071277a358f6d517c31d9f9244d9bbc3619a8ecf8a - languageName: node - linkType: hard - "babel-plugin-transform-flow-enums@npm:^0.0.2": version: 0.0.2 resolution: "babel-plugin-transform-flow-enums@npm:0.0.2" @@ -3667,43 +3589,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-fbjs@npm:^3.4.0": - version: 3.4.0 - resolution: "babel-preset-fbjs@npm:3.4.0" - dependencies: - "@babel/plugin-proposal-class-properties": ^7.0.0 - "@babel/plugin-proposal-object-rest-spread": ^7.0.0 - "@babel/plugin-syntax-class-properties": ^7.0.0 - "@babel/plugin-syntax-flow": ^7.0.0 - "@babel/plugin-syntax-jsx": ^7.0.0 - "@babel/plugin-syntax-object-rest-spread": ^7.0.0 - "@babel/plugin-transform-arrow-functions": ^7.0.0 - "@babel/plugin-transform-block-scoped-functions": ^7.0.0 - "@babel/plugin-transform-block-scoping": ^7.0.0 - "@babel/plugin-transform-classes": ^7.0.0 - "@babel/plugin-transform-computed-properties": ^7.0.0 - "@babel/plugin-transform-destructuring": ^7.0.0 - "@babel/plugin-transform-flow-strip-types": ^7.0.0 - "@babel/plugin-transform-for-of": ^7.0.0 - "@babel/plugin-transform-function-name": ^7.0.0 - "@babel/plugin-transform-literals": ^7.0.0 - "@babel/plugin-transform-member-expression-literals": ^7.0.0 - "@babel/plugin-transform-modules-commonjs": ^7.0.0 - "@babel/plugin-transform-object-super": ^7.0.0 - "@babel/plugin-transform-parameters": ^7.0.0 - "@babel/plugin-transform-property-literals": ^7.0.0 - "@babel/plugin-transform-react-display-name": ^7.0.0 - "@babel/plugin-transform-react-jsx": ^7.0.0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0 - "@babel/plugin-transform-spread": ^7.0.0 - "@babel/plugin-transform-template-literals": ^7.0.0 - babel-plugin-syntax-trailing-function-commas: ^7.0.0-beta.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: b3352cf690729125997f254bc31b9c4db347f8646f1571958ced1c45f0da89439e183e1c88e35397eb0361b9e1fbb1dd8142d3f4647814deb427e53c54f44d5f - languageName: node - linkType: hard - "babel-preset-jest@npm:^29.6.3": version: 29.6.3 resolution: "babel-preset-jest@npm:29.6.3" @@ -3730,13 +3615,6 @@ __metadata: languageName: node linkType: hard -"big-integer@npm:^1.6.44": - version: 1.6.52 - resolution: "big-integer@npm:1.6.52" - checksum: 6e86885787a20fed96521958ae9086960e4e4b5e74d04f3ef7513d4d0ad631a9f3bde2730fc8aaa4b00419fc865f6ec573e5320234531ef37505da7da192c40b - languageName: node - linkType: hard - "bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" @@ -3748,15 +3626,6 @@ __metadata: languageName: node linkType: hard -"bplist-parser@npm:^0.2.0": - version: 0.2.0 - resolution: "bplist-parser@npm:0.2.0" - dependencies: - big-integer: ^1.6.44 - checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -3825,15 +3694,6 @@ __metadata: languageName: node linkType: hard -"bundle-name@npm:^3.0.0": - version: 3.0.0 - resolution: "bundle-name@npm:3.0.0" - dependencies: - run-applescript: ^5.0.0 - checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615 - languageName: node - linkType: hard - "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -4334,28 +4194,6 @@ __metadata: languageName: node linkType: hard -"default-browser-id@npm:^3.0.0": - version: 3.0.0 - resolution: "default-browser-id@npm:3.0.0" - dependencies: - bplist-parser: ^0.2.0 - untildify: ^4.0.0 - checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 - languageName: node - linkType: hard - -"default-browser@npm:^4.0.0": - version: 4.0.0 - resolution: "default-browser@npm:4.0.0" - dependencies: - bundle-name: ^3.0.0 - default-browser-id: ^3.0.0 - execa: ^7.1.1 - titleize: ^3.0.0 - checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 - languageName: node - linkType: hard - "defaults@npm:^1.0.3": version: 1.0.4 resolution: "defaults@npm:1.0.4" @@ -4376,13 +4214,6 @@ __metadata: languageName: node linkType: hard -"define-lazy-prop@npm:^3.0.0": - version: 3.0.0 - resolution: "define-lazy-prop@npm:3.0.0" - checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 - languageName: node - linkType: hard - "define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" @@ -4786,22 +4617,23 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^5.0.1": - version: 5.0.1 - resolution: "eslint-plugin-prettier@npm:5.0.1" +"eslint-plugin-prettier@npm:^5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" dependencies: prettier-linter-helpers: ^1.0.0 - synckit: ^0.8.5 + synckit: ^0.8.6 peerDependencies: "@types/eslint": ">=8.0.0" eslint: ">=8.0.0" + eslint-config-prettier: "*" prettier: ">=3.0.0" peerDependenciesMeta: "@types/eslint": optional: true eslint-config-prettier: optional: true - checksum: c2261033b97bafe99ccb7cc47c2fac6fa85b8bbc8b128042e52631f906b69e12afed2cdd9d7e3021cc892ee8dd4204a3574e1f32a0b718b4bb3b440944b6983b + checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381 languageName: node linkType: hard @@ -5031,23 +4863,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:^7.1.1": - version: 7.2.0 - resolution: "execa@npm:7.2.0" - dependencies: - cross-spawn: ^7.0.3 - get-stream: ^6.0.1 - human-signals: ^4.3.0 - is-stream: ^3.0.0 - merge-stream: ^2.0.0 - npm-run-path: ^5.1.0 - onetime: ^6.0.0 - signal-exit: ^3.0.7 - strip-final-newline: ^3.0.0 - checksum: 14fd17ba0ca8c87b277584d93b1d9fc24f2a65e5152b31d5eb159a3b814854283eaae5f51efa9525e304447e2f757c691877f7adff8fde5746aae67eb1edd1cc - languageName: node - linkType: hard - "exit@npm:^0.1.2": version: 0.1.2 resolution: "exit@npm:0.1.2" @@ -5089,7 +4904,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": +"fast-glob@npm:^3.2.9": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -5397,7 +5212,7 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": +"get-stream@npm:^6.0.0": version: 6.0.1 resolution: "get-stream@npm:6.0.1" checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad @@ -5592,10 +5407,10 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.17.1": - version: 0.17.1 - resolution: "hermes-estree@npm:0.17.1" - checksum: ffa6f997ad0b2a0dfe8ec782fc8cc5224a0d943b330944e62fe58c93c1f590afb67ba064d5a308c51a824b0db6e1bdc1654bfaf6bdfb4b0de4fb8f9cd8cf1050 +"hermes-estree@npm:0.18.2": + version: 0.18.2 + resolution: "hermes-estree@npm:0.18.2" + checksum: 6723aa4c475df27f964cde86518c097075a1b18168834b9329392a8ded4a9f09a854c31bc7720b0656550c05369d1d24d2fa7bee6a8d7ab35d78e1ec283ffe1f languageName: node linkType: hard @@ -5608,12 +5423,12 @@ __metadata: languageName: node linkType: hard -"hermes-parser@npm:0.17.1": - version: 0.17.1 - resolution: "hermes-parser@npm:0.17.1" +"hermes-parser@npm:0.18.2": + version: 0.18.2 + resolution: "hermes-parser@npm:0.18.2" dependencies: - hermes-estree: 0.17.1 - checksum: 0a8fd611c708ec076654e9b7aed4b8c5b4302bdef87402a66e9c09ec3f925aa3c12718c80ebc52154ec5712a348ad375a69838f243c9bc2189ec6459415d6760 + hermes-estree: 0.18.2 + checksum: d628f207e8951ee8bdf5b3c798ea9e18e2f4e49f9a5aaed639868207b7163eafb3a55b999c6ed8b4f0c4e39b474c2e1bd1bcb69303f095cab56e1711368bcbdf languageName: node linkType: hard @@ -5680,13 +5495,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^4.3.0": - version: 4.3.1 - resolution: "human-signals@npm:4.3.1" - checksum: 6f12958df3f21b6fdaf02d90896c271df00636a31e2bbea05bddf817a35c66b38a6fdac5863e2df85bd52f34958997f1f50350ff97249e1dff8452865d5235d1 - languageName: node - linkType: hard - "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -5912,15 +5720,6 @@ __metadata: languageName: node linkType: hard -"is-docker@npm:^3.0.0": - version: 3.0.0 - resolution: "is-docker@npm:3.0.0" - bin: - is-docker: cli.js - checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -5976,17 +5775,6 @@ __metadata: languageName: node linkType: hard -"is-inside-container@npm:^1.0.0": - version: 1.0.0 - resolution: "is-inside-container@npm:1.0.0" - dependencies: - is-docker: ^3.0.0 - bin: - is-inside-container: cli.js - checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 - languageName: node - linkType: hard - "is-interactive@npm:^1.0.0": version: 1.0.0 resolution: "is-interactive@npm:1.0.0" @@ -6080,13 +5868,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 - languageName: node - linkType: hard - "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -7156,62 +6937,62 @@ __metadata: languageName: node linkType: hard -"metro-babel-transformer@npm:0.80.1": - version: 0.80.1 - resolution: "metro-babel-transformer@npm:0.80.1" +"metro-babel-transformer@npm:0.80.4": + version: 0.80.4 + resolution: "metro-babel-transformer@npm:0.80.4" dependencies: "@babel/core": ^7.20.0 - hermes-parser: 0.17.1 + hermes-parser: 0.18.2 nullthrows: ^1.1.1 - checksum: e0972387b5f531c588c54ea6cca953a9e7ac504acd2e0eafc6b8e01493c9b9fda6e1adeb593cd303514726b85a280fe00b3154fa486ecd8df9f3027581a46527 + checksum: eee402bfc85b7fe1a9362bf5908bef3388ff62643102de5a36e02e0d07c6841c6250a43edc4068ce8b97fb6ce6b11eca91ab46fbf566265ba75bfc2a2d1c5804 languageName: node linkType: hard -"metro-cache-key@npm:0.80.1": - version: 0.80.1 - resolution: "metro-cache-key@npm:0.80.1" - checksum: 22c74162e474bb8ff1a71198b8c2879b1c1d5fb7a24b6d76f9ececdd79c9ddcbe1e5d42def362baffa1c7b024443caf74c3dd0790852f6f99f31a645e7acdf79 +"metro-cache-key@npm:0.80.4": + version: 0.80.4 + resolution: "metro-cache-key@npm:0.80.4" + checksum: 674b0a1e570c35d05602eeef16dcbb6e7b80ae5d67d414db347a3214c0436afe142afaf1393f39651cbef9a54a095ac100ecf0a96a6e59f59536b06911bb78af languageName: node linkType: hard -"metro-cache@npm:0.80.1": - version: 0.80.1 - resolution: "metro-cache@npm:0.80.1" +"metro-cache@npm:0.80.4": + version: 0.80.4 + resolution: "metro-cache@npm:0.80.4" dependencies: - metro-core: 0.80.1 + metro-core: 0.80.4 rimraf: ^3.0.2 - checksum: 5f981a20cc2aa91cc9acc9d2d499c3d8d11807998263df9f2f3df00851a43655f46dab0fa5a104d5f8939e0d89ae71abd155debfee2300243c0771fbb0839fb7 + checksum: 52be5695e4f043bbb0316121db020afa4a12ea2a65c7a090417daeda3dbed1e1ddcfa6f66d2526f6b6f0ee1bc22b7c7400eca1cb512af244dd85a16fdc082366 languageName: node linkType: hard -"metro-config@npm:0.80.1, metro-config@npm:^0.80.0": - version: 0.80.1 - resolution: "metro-config@npm:0.80.1" +"metro-config@npm:0.80.4, metro-config@npm:^0.80.3": + version: 0.80.4 + resolution: "metro-config@npm:0.80.4" dependencies: connect: ^3.6.5 cosmiconfig: ^5.0.5 jest-validate: ^29.6.3 - metro: 0.80.1 - metro-cache: 0.80.1 - metro-core: 0.80.1 - metro-runtime: 0.80.1 - checksum: 5c23c8fe1d9a2599dcc0d542a21e604ce0478f2a4ccd7c96f1ad12b89c4b1a193e28ec20315a18e01b19506c54eaa491ae5651c1e5e5789a6e81863298f3bbf6 + metro: 0.80.4 + metro-cache: 0.80.4 + metro-core: 0.80.4 + metro-runtime: 0.80.4 + checksum: 38c34da0ceeb0e9f6a3793f06ac4ea9bcc06bb4e48f1eff59befb469760f433e6f1fd8a35824eb547ae4413f8746ea1c4ef84d807e15148eba09de252c018459 languageName: node linkType: hard -"metro-core@npm:0.80.1, metro-core@npm:^0.80.0": - version: 0.80.1 - resolution: "metro-core@npm:0.80.1" +"metro-core@npm:0.80.4, metro-core@npm:^0.80.3": + version: 0.80.4 + resolution: "metro-core@npm:0.80.4" dependencies: lodash.throttle: ^4.1.1 - metro-resolver: 0.80.1 - checksum: 1dc79082f13f11c656899be3dd2a8dd99e2c976666e6d53230e4e00d0142dc68792237953cd8b912357ffded4fadb6df9eefb67544082779844bcc2c237f9778 + metro-resolver: 0.80.4 + checksum: e8789d047a55e9e2e5777d9aacdeaaf385153012d1eb7a832e68d3f69dfafc1757d24ee5747a39072f48c31e1b92fa126a57669adc74427f667ff1af6e24577e languageName: node linkType: hard -"metro-file-map@npm:0.80.1": - version: 0.80.1 - resolution: "metro-file-map@npm:0.80.1" +"metro-file-map@npm:0.80.4": + version: 0.80.4 + resolution: "metro-file-map@npm:0.80.4" dependencies: anymatch: ^3.0.3 debug: ^2.2.0 @@ -7227,102 +7008,102 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: cb114d3daba3a247782a5d47589d4e4f8bc6549a750d49a05b5ded601f6ef6d264f4caebb377b44de288476c771f7d50269891f153f9a59c2efca827d5d7056c + checksum: 624832cf02c41fe55b8977cf52b7bbd0c47b00953f9b2e8be6b6f0df7eac67e563795d3b1c39e2ee7265a30be141ffa0320f5dcc7d72db805857bfad71d44c95 languageName: node linkType: hard -"metro-minify-terser@npm:0.80.1": - version: 0.80.1 - resolution: "metro-minify-terser@npm:0.80.1" +"metro-minify-terser@npm:0.80.4": + version: 0.80.4 + resolution: "metro-minify-terser@npm:0.80.4" dependencies: terser: ^5.15.0 - checksum: d8bbccdb0472e48121b7bba2cf1a1aabc38cd162d2b3e6bb500b6bf20741066a406888613dd94e6e69a2862881755b156006e3edc5c5ed857dd081c4539be84c + checksum: 1a8e3dcefce1c4a599e948641fee58cc03f4121371d50adb32af5f8fc3e62958c1a0d9d16a9179a9bab62b9e82c82f8cb5dfb8b517d37552f7de78dc7e0524bf languageName: node linkType: hard -"metro-resolver@npm:0.80.1": - version: 0.80.1 - resolution: "metro-resolver@npm:0.80.1" - checksum: 1cc9bb8033124bbf32efd7072b9e0e4cd9e701b461d33f146464ab5b2bee459e86a48320edd7899e46a9f4b7cacfef4878f9ca1b4c13ef057e156794fe57bc97 +"metro-resolver@npm:0.80.4": + version: 0.80.4 + resolution: "metro-resolver@npm:0.80.4" + checksum: d56009e4ca9e8b0ce1bcb84891fbe98e5ca80a2f43e20a9bcdff565916503546646ed6eb9cb39c072cbb14de2e85acb978ccc9d19ada6a176fc95a7cfd84ee6b languageName: node linkType: hard -"metro-runtime@npm:0.80.1, metro-runtime@npm:^0.80.0": - version: 0.80.1 - resolution: "metro-runtime@npm:0.80.1" +"metro-runtime@npm:0.80.4, metro-runtime@npm:^0.80.3": + version: 0.80.4 + resolution: "metro-runtime@npm:0.80.4" dependencies: "@babel/runtime": ^7.0.0 - checksum: 15836913f68c849c2a5c58c025784c3caa9f8a32e0cbe5441a0498b2363a601d1c733c278de5d6bde5ce27e16da3c2aeddf5d42cd7b4af4f6a631ba264af64fb + checksum: 9c6f56c809d60914123eb60b0be4e14428acb94ade70c2e2bf66cedb7d7bf455d2667ca96f9fdbf2fea34229f194dbee6bae3b2020fd4bfc06b8c796f36d4520 languageName: node linkType: hard -"metro-source-map@npm:0.80.1, metro-source-map@npm:^0.80.0": - version: 0.80.1 - resolution: "metro-source-map@npm:0.80.1" +"metro-source-map@npm:0.80.4, metro-source-map@npm:^0.80.3": + version: 0.80.4 + resolution: "metro-source-map@npm:0.80.4" dependencies: "@babel/traverse": ^7.20.0 "@babel/types": ^7.20.0 invariant: ^2.2.4 - metro-symbolicate: 0.80.1 + metro-symbolicate: 0.80.4 nullthrows: ^1.1.1 - ob1: 0.80.1 + ob1: 0.80.4 source-map: ^0.5.6 vlq: ^1.0.0 - checksum: 5de90ab199ff90d96cd14ad19c72e114f9717354e50bb257afc29b6ebd26d3dfcf067dac992ec316e6a9d2c626ac86cb25a6f8699e482484f57efad05cbf69f9 + checksum: 881cf9c15c4bedb0cf784ffbdb6e83a73b9c83171f6990f6a2955a8c4382e33bb4175f5989dcd81846636a476517a4db97cee4e1a3b9c8199c0e426926cc8f0f languageName: node linkType: hard -"metro-symbolicate@npm:0.80.1": - version: 0.80.1 - resolution: "metro-symbolicate@npm:0.80.1" +"metro-symbolicate@npm:0.80.4": + version: 0.80.4 + resolution: "metro-symbolicate@npm:0.80.4" dependencies: invariant: ^2.2.4 - metro-source-map: 0.80.1 + metro-source-map: 0.80.4 nullthrows: ^1.1.1 source-map: ^0.5.6 through2: ^2.0.1 vlq: ^1.0.0 bin: metro-symbolicate: src/index.js - checksum: 23ba3fa46edf294245fa6fdd5fb74637ab3194eb04f1420dc19f43a0d29c262bd42d70936aef0bda4f6e2160d8769e92c95f63a77f4c18aee53173121a0fb42a + checksum: 112c77c75b521e45c3e8c3e71e7b352293f892b7a3e2151df43ebf2d7c01165570031468ba40a9d6e0e632af35e3cc764caf5a054a5a4b28f8d24f9407ab7be6 languageName: node linkType: hard -"metro-transform-plugins@npm:0.80.1": - version: 0.80.1 - resolution: "metro-transform-plugins@npm:0.80.1" +"metro-transform-plugins@npm:0.80.4": + version: 0.80.4 + resolution: "metro-transform-plugins@npm:0.80.4" dependencies: "@babel/core": ^7.20.0 "@babel/generator": ^7.20.0 "@babel/template": ^7.0.0 "@babel/traverse": ^7.20.0 nullthrows: ^1.1.1 - checksum: 66e56a96beacd9fd5e28922e71c84e4e67fa87b5ab65ee4542953e17e968a791ef11521232f7792092215a95704f99e4336b9753509ca810aa710d562f031363 + checksum: bcd3c6e08db2b8b0b3310dbe7f6163d79fc0408b42dfe85b1a2e97c8bd1a99e59d793cf97e9c0c959766dd3b0ccae12bd6adb73cc82e4fd66ebfdcc07957623c languageName: node linkType: hard -"metro-transform-worker@npm:0.80.1": - version: 0.80.1 - resolution: "metro-transform-worker@npm:0.80.1" +"metro-transform-worker@npm:0.80.4": + version: 0.80.4 + resolution: "metro-transform-worker@npm:0.80.4" dependencies: "@babel/core": ^7.20.0 "@babel/generator": ^7.20.0 "@babel/parser": ^7.20.0 "@babel/types": ^7.20.0 - metro: 0.80.1 - metro-babel-transformer: 0.80.1 - metro-cache: 0.80.1 - metro-cache-key: 0.80.1 - metro-source-map: 0.80.1 - metro-transform-plugins: 0.80.1 + metro: 0.80.4 + metro-babel-transformer: 0.80.4 + metro-cache: 0.80.4 + metro-cache-key: 0.80.4 + metro-source-map: 0.80.4 + metro-transform-plugins: 0.80.4 nullthrows: ^1.1.1 - checksum: 9d13198e0d6d6320b27ef962c5260fdc18e6536a029826aa7300c2cb975d9aea2d18e4f83022f31891373e72c13511b11e758cea1fb831e3081655dcfb29c199 + checksum: 8a6ec8d4b94edce5cda1f2a1e054f77372bc12db72d158c8c796abdd1bbc10409068a7100fa96d96c1566e208b86353b19c1ba657cefe467fc340881e5612747 languageName: node linkType: hard -"metro@npm:0.80.1, metro@npm:^0.80.0": - version: 0.80.1 - resolution: "metro@npm:0.80.1" +"metro@npm:0.80.4, metro@npm:^0.80.3": + version: 0.80.4 + resolution: "metro@npm:0.80.4" dependencies: "@babel/code-frame": ^7.0.0 "@babel/core": ^7.20.0 @@ -7339,25 +7120,25 @@ __metadata: denodeify: ^1.2.1 error-stack-parser: ^2.0.6 graceful-fs: ^4.2.4 - hermes-parser: 0.17.1 + hermes-parser: 0.18.2 image-size: ^1.0.2 invariant: ^2.2.4 jest-worker: ^29.6.3 jsc-safe-url: ^0.2.2 lodash.throttle: ^4.1.1 - metro-babel-transformer: 0.80.1 - metro-cache: 0.80.1 - metro-cache-key: 0.80.1 - metro-config: 0.80.1 - metro-core: 0.80.1 - metro-file-map: 0.80.1 - metro-minify-terser: 0.80.1 - metro-resolver: 0.80.1 - metro-runtime: 0.80.1 - metro-source-map: 0.80.1 - metro-symbolicate: 0.80.1 - metro-transform-plugins: 0.80.1 - metro-transform-worker: 0.80.1 + metro-babel-transformer: 0.80.4 + metro-cache: 0.80.4 + metro-cache-key: 0.80.4 + metro-config: 0.80.4 + metro-core: 0.80.4 + metro-file-map: 0.80.4 + metro-minify-terser: 0.80.4 + metro-resolver: 0.80.4 + metro-runtime: 0.80.4 + metro-source-map: 0.80.4 + metro-symbolicate: 0.80.4 + metro-transform-plugins: 0.80.4 + metro-transform-worker: 0.80.4 mime-types: ^2.1.27 node-fetch: ^2.2.0 nullthrows: ^1.1.1 @@ -7370,7 +7151,7 @@ __metadata: yargs: ^17.6.2 bin: metro: src/cli.js - checksum: 11ca9ad89bd085e87a143fcf9461075ae081b5db144f31cf4f575572241576a2742c996257553dd580423163de5ba03378ae0f047d52e1d8a7b0dcde2b8fffce + checksum: cb73294f3fc315e81e6b050e679d2ac8f28a245d16634eb43ef6ff9eb71b52526ce93b1bd372a4e489eee9ba6568422bddbb9e97f2559bbfd30b11c8f5b96471 languageName: node linkType: hard @@ -7425,13 +7206,6 @@ __metadata: languageName: node linkType: hard -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 - languageName: node - linkType: hard - "min-indent@npm:^1.0.0": version: 1.0.1 resolution: "min-indent@npm:1.0.1" @@ -7439,6 +7213,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:9.0.3, minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + "minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -7448,15 +7231,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" - dependencies: - brace-expansion: ^2.0.1 - checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 - languageName: node - linkType: hard - "minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -7589,13 +7363,6 @@ __metadata: languageName: node linkType: hard -"natural-compare-lite@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare-lite@npm:1.4.0" - checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 - languageName: node - linkType: hard - "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -7722,15 +7489,6 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^5.1.0": - version: 5.1.0 - resolution: "npm-run-path@npm:5.1.0" - dependencies: - path-key: ^4.0.0 - checksum: dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 - languageName: node - linkType: hard - "nullthrows@npm:^1.1.1": version: 1.1.1 resolution: "nullthrows@npm:1.1.1" @@ -7738,10 +7496,10 @@ __metadata: languageName: node linkType: hard -"ob1@npm:0.80.1": - version: 0.80.1 - resolution: "ob1@npm:0.80.1" - checksum: 5c30ae37dea37fd2844ec28894e6592de3d12d97035139d7e3796595e839881d610450ddeb5261d7d12a3c76c4512267fe7b088b1a9d72e16c83e5062a57180a +"ob1@npm:0.80.4": + version: 0.80.4 + resolution: "ob1@npm:0.80.4" + checksum: 2b089440537f1babae86edf51f0990fa91e0410ab1a27f1baea9b0a362d14216935ad6f66afb2e532b57fd4972870d86473d38c0576b52d98adc893e456b872f languageName: node linkType: hard @@ -7864,15 +7622,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" - dependencies: - mimic-fn: ^4.0.0 - checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 - languageName: node - linkType: hard - "open@npm:^6.2.0": version: 6.4.0 resolution: "open@npm:6.4.0" @@ -7892,18 +7641,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^9.1.0": - version: 9.1.0 - resolution: "open@npm:9.1.0" - dependencies: - default-browser: ^4.0.0 - define-lazy-prop: ^3.0.0 - is-inside-container: ^1.0.0 - is-wsl: ^2.2.0 - checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 - languageName: node - linkType: hard - "optionator@npm:^0.9.3": version: 0.9.3 resolution: "optionator@npm:0.9.3" @@ -8062,13 +7799,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^4.0.0": - version: 4.0.0 - resolution: "path-key@npm:4.0.0" - checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 - languageName: node - linkType: hard - "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -8155,12 +7885,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.1.1": - version: 3.1.1 - resolution: "prettier@npm:3.1.1" +"prettier@npm:^3.2.1": + version: 3.2.1 + resolution: "prettier@npm:3.2.1" bin: prettier: bin/prettier.cjs - checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e + checksum: 01a5fcf1db4e8172365473e540a328304e501a20bf9b4577e359e431e480d602bcf082d51020aba24bd70ceda528632c6ff8039cedb2d430aeb4af2ca7652817 languageName: node linkType: hard @@ -8313,49 +8043,49 @@ __metadata: version: 0.0.0-use.local resolution: "react-native-template-redux-typescript@workspace:." dependencies: - "@babel/core": ^7.20.0 - "@babel/preset-env": ^7.20.0 - "@babel/runtime": ^7.20.0 - "@react-native/babel-preset": ^0.73.18 - "@react-native/eslint-config": ^0.73.1 - "@react-native/metro-config": ^0.73.2 - "@react-native/typescript-config": ^0.73.1 + "@babel/core": ^7.23.7 + "@babel/preset-env": ^7.23.8 + "@babel/runtime": ^7.23.8 + "@react-native/babel-preset": ^0.73.19 + "@react-native/eslint-config": ^0.74.0 + "@react-native/metro-config": ^0.73.3 + "@react-native/typescript-config": ^0.74.0 "@reduxjs/toolkit": ^2.0.1 - "@testing-library/react-native": ^12.4.1 + "@testing-library/react-native": ^12.4.3 "@types/jest": ^29.5.11 - "@types/react": ^18.2.6 + "@types/react": ^18.2.47 "@types/react-test-renderer": ^18.0.7 - "@typescript-eslint/eslint-plugin": ^6.14.0 - "@typescript-eslint/parser": ^6.14.0 - babel-jest: ^29.6.3 + "@typescript-eslint/eslint-plugin": ^6.18.1 + "@typescript-eslint/parser": ^6.18.1 + babel-jest: ^29.7.0 eslint: ^8.56.0 - eslint-plugin-prettier: ^5.0.1 + eslint-plugin-prettier: ^5.1.3 jest: ^29.7.0 - prettier: ^3.1.1 + prettier: ^3.2.1 react: 18.2.0 - react-native: 0.73.0 - react-redux: ^9.0.4 + react-native: ^0.73.2 + react-redux: ^9.1.0 react-test-renderer: 18.2.0 ts-node: ^10.9.2 typescript: ^5.3.3 languageName: unknown linkType: soft -"react-native@npm:0.73.0": - version: 0.73.0 - resolution: "react-native@npm:0.73.0" +"react-native@npm:^0.73.2": + version: 0.73.2 + resolution: "react-native@npm:0.73.2" dependencies: "@jest/create-cache-key-function": ^29.6.3 - "@react-native-community/cli": 12.1.1 - "@react-native-community/cli-platform-android": 12.1.1 - "@react-native-community/cli-platform-ios": 12.1.1 - "@react-native/assets-registry": ^0.73.1 - "@react-native/codegen": ^0.73.2 - "@react-native/community-cli-plugin": ^0.73.10 - "@react-native/gradle-plugin": ^0.73.4 - "@react-native/js-polyfills": ^0.73.1 - "@react-native/normalize-colors": ^0.73.2 - "@react-native/virtualized-lists": ^0.73.3 + "@react-native-community/cli": 12.3.0 + "@react-native-community/cli-platform-android": 12.3.0 + "@react-native-community/cli-platform-ios": 12.3.0 + "@react-native/assets-registry": 0.73.1 + "@react-native/codegen": 0.73.2 + "@react-native/community-cli-plugin": 0.73.12 + "@react-native/gradle-plugin": 0.73.4 + "@react-native/js-polyfills": 0.73.1 + "@react-native/normalize-colors": 0.73.2 + "@react-native/virtualized-lists": 0.73.4 abort-controller: ^3.0.0 anser: ^1.4.9 ansi-regex: ^5.0.0 @@ -8367,8 +8097,8 @@ __metadata: jest-environment-node: ^29.6.3 jsc-android: ^250231.0.0 memoize-one: ^5.0.0 - metro-runtime: ^0.80.0 - metro-source-map: ^0.80.0 + metro-runtime: ^0.80.3 + metro-source-map: ^0.80.3 mkdirp: ^0.5.1 nullthrows: ^1.1.1 pretty-format: ^26.5.2 @@ -8386,13 +8116,13 @@ __metadata: react: 18.2.0 bin: react-native: cli.js - checksum: d988181d09ca53379d2e67b0928bf7b012b213b6ca1bde52ecff8881bcb36f8d78a767b7e85da629c018a0e326f29d468b9cc97c9196c46aa9a878c2859081b1 + checksum: a9ebbb7879118c2f4d749d7c252606d323b1ee22567348ff833260dcbd73d5a2c3fbd80280cb770b438e5fe63478f85f18876df0410859d37ee18b6080de9ed2 languageName: node linkType: hard -"react-redux@npm:^9.0.4": - version: 9.0.4 - resolution: "react-redux@npm:9.0.4" +"react-redux@npm:^9.1.0": + version: 9.1.0 + resolution: "react-redux@npm:9.1.0" dependencies: "@types/use-sync-external-store": ^0.0.3 use-sync-external-store: ^1.0.0 @@ -8408,7 +8138,7 @@ __metadata: optional: true redux: optional: true - checksum: acc69b85e003f4367e0fa9716ca441a2536aa513fcb1b9404e33188fa68938acf455806eba2ff639553fbba24c06b6e96982998178bb9a2669227e7e4bcd441e + checksum: 1b07714379ff0087b4fb43ffd138cc84efb7608c874d632a4e2162e1874f3e0f6b69a0a9b0f24f93cbf122c694ac9cfd315770676d4cabb167d159f1ef419560 languageName: node linkType: hard @@ -8769,15 +8499,6 @@ __metadata: languageName: node linkType: hard -"run-applescript@npm:^5.0.0": - version: 5.0.0 - resolution: "run-applescript@npm:5.0.0" - dependencies: - execa: ^5.0.0 - checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77 - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -9309,13 +9030,6 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 - languageName: node - linkType: hard - "strip-indent@npm:^3.0.0": version: 3.0.0 resolution: "strip-indent@npm:3.0.0" @@ -9380,13 +9094,13 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.8.5": - version: 0.8.6 - resolution: "synckit@npm:0.8.6" +"synckit@npm:^0.8.6": + version: 0.8.8 + resolution: "synckit@npm:0.8.8" dependencies: - "@pkgr/utils": ^2.4.2 + "@pkgr/core": ^0.1.0 tslib: ^2.6.2 - checksum: 7c1f4991d0afd63c090c0537f1cf8619dd5777a40cf83bf46beadbf4eb0f9e400d92044e90a177a305df4bcb56efbaf1b689877f301f2672d865b6eecf1be75a + checksum: 9ed5d33abb785f5f24e2531efd53b2782ca77abf7912f734d170134552b99001915531be5a50297aa45c5701b5c9041e8762e6cd7a38e41e2461c1e7fccdedf8 languageName: node linkType: hard @@ -9469,13 +9183,6 @@ __metadata: languageName: node linkType: hard -"titleize@npm:^3.0.0": - version: 3.0.0 - resolution: "titleize@npm:3.0.0" - checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -9567,7 +9274,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.6.0, tslib@npm:^2.6.2": +"tslib@npm:^2.0.1, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad @@ -9771,13 +9478,6 @@ __metadata: languageName: node linkType: hard -"untildify@npm:^4.0.0": - version: 4.0.0 - resolution: "untildify@npm:4.0.0" - checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9 - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.0.13": version: 1.0.13 resolution: "update-browserslist-db@npm:1.0.13" From 28fcf4374b8dfb69579bea72124f220b5c444650 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 19:32:00 -0600 Subject: [PATCH 076/368] Rename `index.tsx` to `index.js` --- examples/publish-ci/react-native/{index.tsx => index.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/publish-ci/react-native/{index.tsx => index.js} (100%) diff --git a/examples/publish-ci/react-native/index.tsx b/examples/publish-ci/react-native/index.js similarity index 100% rename from examples/publish-ci/react-native/index.tsx rename to examples/publish-ci/react-native/index.js From 5b655ddc771d7e9d88ea975dae0f10babfe857d0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 19:42:31 -0600 Subject: [PATCH 077/368] Add `@babel/preset-typescript` to dev dependencies --- examples/publish-ci/react-native/package.json | 1 + examples/publish-ci/react-native/yarn.lock | 256 ++++++------------ 2 files changed, 84 insertions(+), 173 deletions(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 6c446057de..978330d661 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -22,6 +22,7 @@ "devDependencies": { "@babel/core": "^7.23.7", "@babel/preset-env": "^7.23.8", + "@babel/preset-typescript": "^7.23.3", "@babel/runtime": "^7.23.8", "@react-native/babel-preset": "^0.73.19", "@react-native/eslint-config": "^0.74.0", diff --git a/examples/publish-ci/react-native/yarn.lock b/examples/publish-ci/react-native/yarn.lock index 39b7733e73..355bb65595 100644 --- a/examples/publish-ci/react-native/yarn.lock +++ b/examples/publish-ci/react-native/yarn.lock @@ -39,30 +39,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.0": - version: 7.23.6 - resolution: "@babel/core@npm:7.23.6" - dependencies: - "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.23.5 - "@babel/generator": ^7.23.6 - "@babel/helper-compilation-targets": ^7.23.6 - "@babel/helper-module-transforms": ^7.23.3 - "@babel/helpers": ^7.23.6 - "@babel/parser": ^7.23.6 - "@babel/template": ^7.22.15 - "@babel/traverse": ^7.23.6 - "@babel/types": ^7.23.6 - convert-source-map: ^2.0.0 - debug: ^4.1.0 - gensync: ^1.0.0-beta.2 - json5: ^2.2.3 - semver: ^6.3.1 - checksum: 4bddd1b80394a64b2ee33eeb216e8a2a49ad3d74f0ca9ba678c84a37f4502b2540662d72530d78228a2a349fda837fa852eea5cd3ae28465d1188acc6055868e - languageName: node - linkType: hard - -"@babel/core@npm:^7.23.7": +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.0, @babel/core@npm:^7.23.7": version: 7.23.7 resolution: "@babel/core@npm:7.23.7" dependencies: @@ -143,8 +120,8 @@ __metadata: linkType: hard "@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helper-create-class-features-plugin@npm:7.23.6" + version: 7.23.7 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.7" dependencies: "@babel/helper-annotate-as-pure": ^7.22.5 "@babel/helper-environment-visitor": ^7.22.20 @@ -157,7 +134,7 @@ __metadata: semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0 - checksum: 356b71b9f4a3a95917432bf6a452f475a292d394d9310e9c8b23c8edb564bee91e40d4290b8aa8779d2987a7c39ae717b2d76edc7c952078b8952df1a20259e3 + checksum: 33e60714b856c3816a7965d4c76278cc8f430644a2dfc4eeafad2f7167c4fbd2becdb74cbfeb04b02efd6bbd07176ef53c6683262b588e65d378438e9c55c26b languageName: node linkType: hard @@ -349,17 +326,6 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helpers@npm:7.23.6" - dependencies: - "@babel/template": ^7.22.15 - "@babel/traverse": ^7.23.6 - "@babel/types": ^7.23.6 - checksum: c5ba62497e1d717161d107c4b3de727565c68b6b9f50f59d6298e613afeca8895799b227c256e06d362e565aec34e26fb5c675b9c3d25055c52b945a21c21e21 - languageName: node - linkType: hard - "@babel/helpers@npm:^7.23.7": version: 7.23.8 resolution: "@babel/helpers@npm:7.23.8" @@ -877,26 +843,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.0.0": - version: 7.23.5 - resolution: "@babel/plugin-transform-classes@npm:7.23.5" - dependencies: - "@babel/helper-annotate-as-pure": ^7.22.5 - "@babel/helper-compilation-targets": ^7.22.15 - "@babel/helper-environment-visitor": ^7.22.20 - "@babel/helper-function-name": ^7.23.0 - "@babel/helper-optimise-call-expression": ^7.22.5 - "@babel/helper-plugin-utils": ^7.22.5 - "@babel/helper-replace-supers": ^7.22.20 - "@babel/helper-split-export-declaration": ^7.22.6 - globals: ^11.1.0 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 6d0dd3b0828e84a139a51b368f33f315edee5688ef72c68ba25e0175c68ea7357f9c8810b3f61713e368a3063cdcec94f3a2db952e453b0b14ef428a34aa8169 - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.23.8": +"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.23.8": version: 7.23.8 resolution: "@babel/plugin-transform-classes@npm:7.23.8" dependencies: @@ -1349,18 +1296,18 @@ __metadata: linkType: hard "@babel/plugin-transform-runtime@npm:^7.0.0": - version: 7.23.6 - resolution: "@babel/plugin-transform-runtime@npm:7.23.6" + version: 7.23.7 + resolution: "@babel/plugin-transform-runtime@npm:7.23.7" dependencies: "@babel/helper-module-imports": ^7.22.15 "@babel/helper-plugin-utils": ^7.22.5 - babel-plugin-polyfill-corejs2: ^0.4.6 - babel-plugin-polyfill-corejs3: ^0.8.5 - babel-plugin-polyfill-regenerator: ^0.5.3 + babel-plugin-polyfill-corejs2: ^0.4.7 + babel-plugin-polyfill-corejs3: ^0.8.7 + babel-plugin-polyfill-regenerator: ^0.5.4 semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: d87da909e40d31e984ca5487ba36fa229449b773bc0f3fbf1d3c5ccac788ad3aef7481f1d4a3384c1813ee4f958af52b449089d96c0d5625868c028dd630d683 + checksum: b3cc760afbfdddac5fec3ba3a3916a448d152ada213dcb3ffe54115eaa09db1249f1661b7f271d79c8e6b03ebd5315c049800287cde372900f2557a6e2fe3333 languageName: node linkType: hard @@ -1597,7 +1544,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.13.0": +"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.3": version: 7.23.3 resolution: "@babel/preset-typescript@npm:7.23.3" dependencies: @@ -1613,17 +1560,17 @@ __metadata: linkType: hard "@babel/register@npm:^7.13.16": - version: 7.22.15 - resolution: "@babel/register@npm:7.22.15" + version: 7.23.7 + resolution: "@babel/register@npm:7.23.7" dependencies: clone-deep: ^4.0.1 find-cache-dir: ^2.0.0 make-dir: ^2.1.0 - pirates: ^4.0.5 + pirates: ^4.0.6 source-map-support: ^0.5.16 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 5497be6773608cd2d874210edd14499fce464ddbea170219da55955afe4c9173adb591164193458fd639e43b7d1314088a6186f4abf241476c59b3f0da6afd6f + checksum: c72a6d4856ef04f13490370d805854d2d98a77786bfaec7d85e2c585e1217011c4f3df18197a890e14520906c9111bef95551ba1a9b59c88df4dfc2dfe2c8d1b languageName: node linkType: hard @@ -1634,16 +1581,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.8.4": - version: 7.23.6 - resolution: "@babel/runtime@npm:7.23.6" - dependencies: - regenerator-runtime: ^0.14.0 - checksum: 1a8eaf3d3a103ef5227b60ca7ab5c589118c36ca65ef2d64e65380b32a98a3f3b5b3ef96660fa0471b079a18b619a8317f3e7f03ab2b930c45282a8b69ed9a16 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.8": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.8.4": version: 7.23.8 resolution: "@babel/runtime@npm:7.23.8" dependencies: @@ -1663,25 +1601,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/traverse@npm:7.23.6" - dependencies: - "@babel/code-frame": ^7.23.5 - "@babel/generator": ^7.23.6 - "@babel/helper-environment-visitor": ^7.22.20 - "@babel/helper-function-name": ^7.23.0 - "@babel/helper-hoist-variables": ^7.22.5 - "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/parser": ^7.23.6 - "@babel/types": ^7.23.6 - debug: ^4.3.1 - globals: ^11.1.0 - checksum: 48f2eac0e86b6cb60dab13a5ea6a26ba45c450262fccdffc334c01089e75935f7546be195e260e97f6e43cea419862eda095018531a2718fef8189153d479f88 - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.23.7": +"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.23.7": version: 7.23.7 resolution: "@babel/traverse@npm:7.23.7" dependencies: @@ -1785,13 +1705,13 @@ __metadata: linkType: hard "@humanwhocodes/config-array@npm:^0.11.13": - version: 0.11.13 - resolution: "@humanwhocodes/config-array@npm:0.11.13" + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: - "@humanwhocodes/object-schema": ^2.0.1 - debug: ^4.1.1 + "@humanwhocodes/object-schema": ^2.0.2 + debug: ^4.3.1 minimatch: ^3.0.5 - checksum: f8ea57b0d7ed7f2d64cd3944654976829d9da91c04d9c860e18804729a33f7681f78166ef4c761850b8c324d362f7d53f14c5c44907a6b38b32c703ff85e4805 + checksum: 861ccce9eaea5de19546653bccf75bf09fe878bc39c3aab00aeee2d2a0e654516adad38dd1098aab5e3af0145bbcbf3f309bdf4d964f8dab9dcd5834ae4c02f2 languageName: node linkType: hard @@ -1802,10 +1722,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.1": - version: 2.0.1 - resolution: "@humanwhocodes/object-schema@npm:2.0.1" - checksum: 24929487b1ed48795d2f08346a0116cc5ee4634848bce64161fb947109352c562310fd159fc64dda0e8b853307f5794605191a9547f7341158559ca3c8262a45 +"@humanwhocodes/object-schema@npm:^2.0.2": + version: 2.0.2 + resolution: "@humanwhocodes/object-schema@npm:2.0.2" + checksum: 2fc11503361b5fb4f14714c700c02a3f4c7c93e9acd6b87a29f62c522d90470f364d6161b03d1cc618b979f2ae02aed1106fd29d302695d8927e2fc8165ba8ee languageName: node linkType: hard @@ -2155,12 +2075,12 @@ __metadata: linkType: hard "@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.20 - resolution: "@jridgewell/trace-mapping@npm:0.3.20" + version: 0.3.21 + resolution: "@jridgewell/trace-mapping@npm:0.3.21" dependencies: "@jridgewell/resolve-uri": ^3.1.0 "@jridgewell/sourcemap-codec": ^1.4.14 - checksum: cd1a7353135f385909468ff0cf20bdd37e59f2ee49a13a966dedf921943e222082c583ade2b579ff6cd0d8faafcb5461f253e1bf2a9f48fec439211fdbe788f5 + checksum: e91d3943c6d84687503ba033600d42b2a81d9eaf32758fee06449cd1415c59b944af08841e99f030b71f83bb5f814969e96fc8aa29e469eb3ea1b46597d13cff languageName: node linkType: hard @@ -2789,11 +2709,11 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.20.4 - resolution: "@types/babel__traverse@npm:7.20.4" + version: 7.20.5 + resolution: "@types/babel__traverse@npm:7.20.5" dependencies: "@babel/types": ^7.20.7 - checksum: f044ba80e00d07e46ee917c44f96cfc268fcf6d3871f7dfb8db8d3c6dab1508302f3e6bc508352a4a3ae627d2522e3fc500fa55907e0410a08e2e0902a8f3576 + checksum: 608e0ab4fc31cd47011d98942e6241b34d461608c0c0e153377c5fd822c436c475f1ded76a56bfa76a1adf8d9266b727bbf9bfac90c4cb152c97f30dadc5b7e8 languageName: node linkType: hard @@ -2849,11 +2769,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.10.4 - resolution: "@types/node@npm:20.10.4" + version: 20.11.0 + resolution: "@types/node@npm:20.11.0" dependencies: undici-types: ~5.26.4 - checksum: 054b296417e771ab524bea63cf3289559c6bdf290d45428f7cc68e9b00030ff7a0ece47b8c99a26b4f47a443919813bcf42beadff2f0bea7d8125fa541d92eb0 + checksum: 1bd6890db7e0404d11c33d28f46f19f73256f0ba35d19f0ef2a0faba09f366f188915fb9338eebebcc472075c1c4941e17c7002786aa69afa44980737846b200 languageName: node linkType: hard @@ -2873,18 +2793,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*": - version: 18.2.45 - resolution: "@types/react@npm:18.2.45" - dependencies: - "@types/prop-types": "*" - "@types/scheduler": "*" - csstype: ^3.0.2 - checksum: 40b256bdce67b026348022b4f8616a693afdad88cf493b77f7b4e6c5f4b0e4ba13a6068e690b9b94572920840ff30d501ea3d8518e1f21cc8fb8204d4b140c8a - languageName: node - linkType: hard - -"@types/react@npm:^18.2.47": +"@types/react@npm:*, @types/react@npm:^18.2.47": version: 18.2.47 resolution: "@types/react@npm:18.2.47" dependencies: @@ -3177,18 +3086,18 @@ __metadata: linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.3.1 - resolution: "acorn-walk@npm:8.3.1" - checksum: 5c8926ddb5400bc825b6baca782931f9df4ace603ba1a517f5243290fd9cdb089d52877840687b5d5c939591ebc314e2e63721514feaa37c6829c828f2b940ce + version: 8.3.2 + resolution: "acorn-walk@npm:8.3.2" + checksum: 3626b9d26a37b1b427796feaa5261faf712307a8920392c8dce9a5739fb31077667f4ad2ec71c7ac6aaf9f61f04a9d3d67ff56f459587206fc04aa31c27ef392 languageName: node linkType: hard "acorn@npm:^8.4.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.2 - resolution: "acorn@npm:8.11.2" + version: 8.11.3 + resolution: "acorn@npm:8.11.3" bin: acorn: bin/acorn - checksum: 818450408684da89423e3daae24e4dc9b68692db8ab49ea4569c7c5abb7a3f23669438bf129cc81dfdada95e1c9b944ee1bfca2c57a05a4dc73834a612fbf6a7 + checksum: 76d8e7d559512566b43ab4aadc374f11f563f0a9e21626dd59cb2888444e9445923ae9f3699972767f18af61df89cd89f5eaaf772d1327b055b45cb829b4a88c languageName: node linkType: hard @@ -3522,7 +3431,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.6, babel-plugin-polyfill-corejs2@npm:^0.4.7": +"babel-plugin-polyfill-corejs2@npm:^0.4.7": version: 0.4.7 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.7" dependencies: @@ -3535,7 +3444,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.5, babel-plugin-polyfill-corejs3@npm:^0.8.7": +"babel-plugin-polyfill-corejs3@npm:^0.8.7": version: 0.8.7 resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" dependencies: @@ -3547,7 +3456,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.3, babel-plugin-polyfill-regenerator@npm:^0.5.4": +"babel-plugin-polyfill-regenerator@npm:^0.5.4": version: 0.5.4 resolution: "babel-plugin-polyfill-regenerator@npm:0.5.4" dependencies: @@ -3702,8 +3611,8 @@ __metadata: linkType: hard "cacache@npm:^18.0.0": - version: 18.0.1 - resolution: "cacache@npm:18.0.1" + version: 18.0.2 + resolution: "cacache@npm:18.0.2" dependencies: "@npmcli/fs": ^3.1.0 fs-minipass: ^3.0.0 @@ -3717,7 +3626,7 @@ __metadata: ssri: ^10.0.0 tar: ^6.1.11 unique-filename: ^3.0.0 - checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + checksum: 0250df80e1ad0c828c956744850c5f742c24244e9deb5b7dc81bca90f8c10e011e132ecc58b64497cc1cad9a98968676147fb6575f4f94722f7619757b17a11b languageName: node linkType: hard @@ -3779,9 +3688,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001570 - resolution: "caniuse-lite@npm:1.0.30001570" - checksum: 460be2c7a9b1c8a83b6aae4226661c276d9dada6c84209dee547699cf4b28030b9d1fc29ddd7626acee77412b6401993878ea0ef3eadbf3a63ded9034896ae20 + version: 1.0.30001576 + resolution: "caniuse-lite@npm:1.0.30001576" + checksum: b8b332675fe703d5e57b02df5f100345f2a3796c537a42422f5bfc82d3256b8bad3f4e2788553656d2650006d13a4b5db99725e2a9462cc0c8035ba494ba1857 languageName: node linkType: hard @@ -4064,11 +3973,11 @@ __metadata: linkType: hard "core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": - version: 3.34.0 - resolution: "core-js-compat@npm:3.34.0" + version: 3.35.0 + resolution: "core-js-compat@npm:3.35.0" dependencies: browserslist: ^4.22.2 - checksum: 6281f7f57a72f254c06611ec088445e11cf84e0b4edfb5f43dece1a1ff8b0ed0e81ed0bc291024761cd90c39d0f007d8bc46548265139808081d311c7cbc9c81 + checksum: 64c41ce6870aa9130b9d0cb8f00c05204094f46db7e345d520ec2e38f8b6e1d51e921d4974ceb880948f19c0a79e5639e55be0e56f88ea20e32e9a6274da7f82 languageName: node linkType: hard @@ -4320,9 +4229,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.601": - version: 1.4.614 - resolution: "electron-to-chromium@npm:1.4.614" - checksum: e99e6c8600aa76b4d385a4381b943ec2cfeebfdc36a2675fbf87b334256428b92f5d79ab287b8bab0e1875a992284a8a95a03b41b71e9d64a75b5088daf1dc5e + version: 1.4.630 + resolution: "electron-to-chromium@npm:1.4.630" + checksum: 9bf16b06b245d6937845bbef17c0babdf8e01845c8aa31eb2d7dc3a88cd34291d2dec0d8e329450a5b8dfcf5d3dc96c56aa1c8b224d942e3b1d508e9e3cb9788 languageName: node linkType: hard @@ -4932,22 +4841,22 @@ __metadata: linkType: hard "fast-xml-parser@npm:^4.0.12, fast-xml-parser@npm:^4.2.4": - version: 4.3.2 - resolution: "fast-xml-parser@npm:4.3.2" + version: 4.3.3 + resolution: "fast-xml-parser@npm:4.3.3" dependencies: strnum: ^1.0.5 bin: fxparser: src/cli/cli.js - checksum: d507ce2efa5fd13d0a5ba28bd76dd68f2fc30ad8748357c37b70f360d19417866d79e35a688af067d5bceaaa796033fa985206aef9692f7a421e1326b6e73309 + checksum: 5e272a0dbb73c4341487935cd6f37df360999f680c0638efec0974dfc58071fb803919f7a030941a7f5bb894794a2f3356d4b863ba2fb9438191795004cdf36e languageName: node linkType: hard "fastq@npm:^1.6.0": - version: 1.15.0 - resolution: "fastq@npm:1.15.0" + version: 1.16.0 + resolution: "fastq@npm:1.16.0" dependencies: reusify: ^1.0.4 - checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a + checksum: 1d40ed1f100ae625e5720484e8602b7ad07649370f1cbc3e34a6b9630a0bfed6946bab0322d8a368a1e3cde87bb9bbb8d3bc2ae01a0c1f022fac1d07c04e4feb languageName: node linkType: hard @@ -5059,9 +4968,9 @@ __metadata: linkType: hard "flow-parser@npm:0.*": - version: 0.224.0 - resolution: "flow-parser@npm:0.224.0" - checksum: 93ddcfa8ac648b63d08aac1028dc89d26c816e11809dee0e0ee1e89adbc602b4cdf8c8b37942899bc8140337e428a587b393d2a054a3ada3e9a88a8295972df4 + version: 0.226.0 + resolution: "flow-parser@npm:0.226.0" + checksum: 88addf65749a6322fa54b6ed807d3d26e8f899ff6e9f644407149f9cc0e3729d1aa4d2312dbc6f93011a7becb7679aa61a682d0441f32f95a02d56b45d464c8d languageName: node linkType: hard @@ -5519,13 +5428,13 @@ __metadata: linkType: hard "image-size@npm:^1.0.2": - version: 1.0.2 - resolution: "image-size@npm:1.0.2" + version: 1.1.1 + resolution: "image-size@npm:1.1.1" dependencies: queue: 6.0.2 bin: image-size: bin/image-size.js - checksum: 01745fdb47f87cecf538e69c63f9adc5bfab30a345345c2de91105f3afbd1bfcfba1256af02bf3323077b33b0004469a837e077bf0cbb9c907e9c1e9e7547585 + checksum: 23b3a515dded89e7f967d52b885b430d6a5a903da954fce703130bfb6069d738d80e6588efd29acfaf5b6933424a56535aa7bf06867e4ebd0250c2ee51f19a4a languageName: node linkType: hard @@ -7844,7 +7753,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.4, pirates@npm:^4.0.5": +"pirates@npm:^4.0.4, pirates@npm:^4.0.6": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 46a65fefaf19c6f57460388a5af9ab81e3d7fd0e7bc44ca59d753cb5c4d0df97c6c6e583674869762101836d68675f027d60f841c105d72734df9dfca97cbcc6 @@ -8045,6 +7954,7 @@ __metadata: dependencies: "@babel/core": ^7.23.7 "@babel/preset-env": ^7.23.8 + "@babel/preset-typescript": ^7.23.3 "@babel/runtime": ^7.23.8 "@react-native/babel-preset": ^0.73.19 "@react-native/eslint-config": ^0.74.0 @@ -8248,9 +8158,9 @@ __metadata: linkType: hard "redux@npm:^5.0.0": - version: 5.0.0 - resolution: "redux@npm:5.0.0" - checksum: be49160d4bd01e10108c425ade999f1b456204895c4bdd0c7825ab09efffded51955c5c242847406a7b3f273e9011a9c102848c512a099a75617b97b13d2cca8 + version: 5.0.1 + resolution: "redux@npm:5.0.1" + checksum: e74affa9009dd5d994878b9a1ce30d6569d986117175056edb003de2651c05b10fe7819d6fa94aea1a94de9a82f252f986547f007a2fbeb35c317a2e5f5ecf2c languageName: node linkType: hard @@ -8358,9 +8268,9 @@ __metadata: linkType: hard "reselect@npm:^5.0.1": - version: 5.0.1 - resolution: "reselect@npm:5.0.1" - checksum: 7663b4c28a0e908e74dc25262e1d813d028b9c2ee96160cb0f40a16f09c5ac632fa16af6bafede7eb0ff16ab2d5bea2cd8814d9a9488e0262b8317fef90b1dc0 + version: 5.1.0 + resolution: "reselect@npm:5.1.0" + checksum: 5bc9c5d03d7caea00d0c0e24330bf23d91801227346fec1cef6a60988ab8d3dd7cee76e6994ca0915bc1c20845bb2bd929b95753763e0a9db74c0f9dff5cb845 languageName: node linkType: hard @@ -8535,13 +8445,13 @@ __metadata: linkType: hard "safe-regex-test@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-regex-test@npm:1.0.0" + version: 1.0.2 + resolution: "safe-regex-test@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.3 + call-bind: ^1.0.5 + get-intrinsic: ^1.2.2 is-regex: ^1.1.4 - checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + checksum: 4af5ce05a2daa4f6d4bfd5a3c64fc33d6b886f6592122e93c0efad52f7147b9b605e5ffc03c269a1e3d1f8db2a23bc636628a961c9fd65bafdc09503330673fd languageName: node linkType: hard From 2bd28785f6fc0769af72374b6be58b3ff834ca32 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 12 Jan 2024 20:44:57 -0600 Subject: [PATCH 078/368] Remove redundant test files --- .../react-native/__tests__/App.test.tsx | 9 ----- .../__tests__/counterSlice.test.ts | 37 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 examples/publish-ci/react-native/__tests__/App.test.tsx delete mode 100644 examples/publish-ci/react-native/__tests__/counterSlice.test.ts diff --git a/examples/publish-ci/react-native/__tests__/App.test.tsx b/examples/publish-ci/react-native/__tests__/App.test.tsx deleted file mode 100644 index b304c5226b..0000000000 --- a/examples/publish-ci/react-native/__tests__/App.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { render } from "@testing-library/react-native" -import renderer from "react-test-renderer" -import { App } from "../App" - -test("renders correctly", () => { - renderer.create() - const element = render() - expect(element).toBeDefined() -}) diff --git a/examples/publish-ci/react-native/__tests__/counterSlice.test.ts b/examples/publish-ci/react-native/__tests__/counterSlice.test.ts deleted file mode 100644 index 5e99006cea..0000000000 --- a/examples/publish-ci/react-native/__tests__/counterSlice.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { CounterState } from "../src/features/counter/counterSlice" -import { - counterSlice, - decrement, - increment, - incrementByAmount, -} from "../src/features/counter/counterSlice" - -describe("counter reducer", () => { - const { reducer: counterReducer } = counterSlice - const initialState: CounterState = { - value: 3, - status: "idle", - } - - test("should handle initial state", () => { - expect(counterReducer(undefined, { type: "unknown" })).toStrictEqual({ - value: 0, - status: "idle", - }) - }) - - test("should handle increment", () => { - const actual = counterReducer(initialState, increment()) - expect(actual.value).toBe(4) - }) - - test("should handle decrement", () => { - const actual = counterReducer(initialState, decrement()) - expect(actual.value).toBe(2) - }) - - test("should handle incrementByAmount", () => { - const actual = counterReducer(initialState, incrementByAmount(2)) - expect(actual.value).toBe(5) - }) -}) From 569b69d5c649356916d06497b0de924312358725 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 13 Jan 2024 17:09:51 -0600 Subject: [PATCH 079/368] Refactor build command to fix NPM execution error - Updated the build script to prevent a runtime error when invoked through NPM. --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 978330d661..04bb41f415 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd .. && react-native build-android", + "build": "cd android && chmod +x gradlew && gradlew bundleRelease --no-daemon && cd .. && react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 24ff839c588a05527913c327a50ca75e5ebd54b5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 18:31:30 -0600 Subject: [PATCH 080/368] Add `.withTypes` to `createDraftSafeSelector` --- .../toolkit/src/createDraftSafeSelector.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/toolkit/src/createDraftSafeSelector.ts b/packages/toolkit/src/createDraftSafeSelector.ts index 6fe8d267d2..67b5465687 100644 --- a/packages/toolkit/src/createDraftSafeSelector.ts +++ b/packages/toolkit/src/createDraftSafeSelector.ts @@ -5,13 +5,17 @@ export const createDraftSafeSelectorCreator: typeof createSelectorCreator = ( ...args: unknown[] ) => { const createSelector = (createSelectorCreator as any)(...args) - return (...args: unknown[]) => { - const selector = createSelector(...args) - const wrappedSelector = (value: unknown, ...rest: unknown[]) => - selector(isDraft(value) ? current(value) : value, ...rest) - Object.assign(wrappedSelector, selector) - return wrappedSelector as any - } + const createDraftSafeSelector = Object.assign( + (...args: unknown[]) => { + const selector = createSelector(...args) + const wrappedSelector = (value: unknown, ...rest: unknown[]) => + selector(isDraft(value) ? current(value) : value, ...rest) + Object.assign(wrappedSelector, selector) + return wrappedSelector as any + }, + { withTypes: () => createDraftSafeSelector } + ) + return createDraftSafeSelector } /** From f650bcb14c3736f6e0de2a6cb2e6c80e961dca5f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 18:40:53 -0600 Subject: [PATCH 081/368] Add runtime tests for `createDraftSafeSelector.withTypes` --- .../createDraftSafeSelector.withTypes.test.ts | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts diff --git a/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts b/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts new file mode 100644 index 0000000000..cb70812d46 --- /dev/null +++ b/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts @@ -0,0 +1,49 @@ +import { createDraftSafeSelector } from '@reduxjs/toolkit' + +interface Todo { + id: number + completed: boolean +} + +interface Alert { + id: number + read: boolean +} + +interface RootState { + todos: Todo[] + alerts: Alert[] +} + +const rootState: RootState = { + todos: [ + { id: 0, completed: false }, + { id: 1, completed: false }, + ], + alerts: [ + { id: 0, read: false }, + { id: 1, read: false }, + ], +} + +describe(createDraftSafeSelector.withTypes, () => { + const createTypedDraftSafeSelector = + createDraftSafeSelector.withTypes() + + test('should return createDraftSafeSelector', () => { + expect(createTypedDraftSafeSelector.withTypes).toEqual(expect.any(Function)) + + expect(createTypedDraftSafeSelector.withTypes().withTypes).toEqual( + expect.any(Function) + ) + + expect(createTypedDraftSafeSelector).toBe(createDraftSafeSelector) + + const selectTodoIds = createTypedDraftSafeSelector( + [(state) => state.todos], + (todos) => todos.map(({ id }) => id) + ) + + expect(selectTodoIds(rootState)).to.be.an('array').that.is.not.empty + }) +}) From 6f9f66232dbfd613b7b174c4151c2c378b417c3e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:52:43 -0600 Subject: [PATCH 082/368] Fix ESLint and Prettier config --- packages/rtk-codemods/.eslintignore | 2 -- packages/rtk-codemods/.eslintrc.js | 20 -------------------- packages/rtk-codemods/.eslintrc.json | 11 +++++++++++ packages/rtk-codemods/.prettierrc | 5 ----- packages/rtk-codemods/.prettierrc.json | 6 ++++++ 5 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 packages/rtk-codemods/.eslintignore delete mode 100644 packages/rtk-codemods/.eslintrc.js create mode 100644 packages/rtk-codemods/.eslintrc.json delete mode 100644 packages/rtk-codemods/.prettierrc create mode 100644 packages/rtk-codemods/.prettierrc.json diff --git a/packages/rtk-codemods/.eslintignore b/packages/rtk-codemods/.eslintignore deleted file mode 100644 index 28d21228da..0000000000 --- a/packages/rtk-codemods/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -!.* -__testfixtures__ \ No newline at end of file diff --git a/packages/rtk-codemods/.eslintrc.js b/packages/rtk-codemods/.eslintrc.js deleted file mode 100644 index 475aa701d9..0000000000 --- a/packages/rtk-codemods/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - parserOptions: { - ecmaVersion: 2018, - }, - - plugins: ['prettier', 'node'], - extends: ['eslint:recommended', 'plugin:prettier/recommended'], - env: { - node: true, - }, - rules: {}, - overrides: [ - { - files: ['__tests__/**/*.js'], - env: { - jest: true, - }, - }, - ], -}; diff --git a/packages/rtk-codemods/.eslintrc.json b/packages/rtk-codemods/.eslintrc.json new file mode 100644 index 0000000000..8f15e141ae --- /dev/null +++ b/packages/rtk-codemods/.eslintrc.json @@ -0,0 +1,11 @@ +{ + "env": { "node": true }, + "extends": ["eslint:recommended"], + "ignorePatterns": ["node_modules"], + "parserOptions": { "ecmaVersion": "latest" }, + "plugins": ["node"], + "rules": { + "no-unused-vars": [0], + "eol-last": [0] + } +} diff --git a/packages/rtk-codemods/.prettierrc b/packages/rtk-codemods/.prettierrc deleted file mode 100644 index 7c2b752778..0000000000 --- a/packages/rtk-codemods/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "es5", - "printWidth": 100 -} \ No newline at end of file diff --git a/packages/rtk-codemods/.prettierrc.json b/packages/rtk-codemods/.prettierrc.json new file mode 100644 index 0000000000..44ee5173aa --- /dev/null +++ b/packages/rtk-codemods/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "singleQuote": true, + "trailingComma": "none", + "printWidth": 80, + "semi": false +} From 23012b768ef6305a927c41b2b39b9b16f5c50d0c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:53:00 -0600 Subject: [PATCH 083/368] Fix dependencies --- packages/rtk-codemods/package.json | 20 +- yarn.lock | 935 +++++++++++++---------------- 2 files changed, 420 insertions(+), 535 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index a8ac4a2acb..9cc3f3d9d7 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -22,17 +22,21 @@ "codemod" ], "dependencies": { - "@types/jscodeshift": "^0.11.5", - "codemod-cli": "^3.2.0", - "typescript": "^4.8.0" + "execa": "^8.0.1", + "globby": "^14.0.0", + "jscodeshift": "^0.15.1", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" }, "devDependencies": { - "eslint": "^7.25.0", - "eslint-config-prettier": "^8.3.0", + "@types/jscodeshift": "^0.11.11", + "@typescript-eslint/parser": "^6.18.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "prettier": "^2.2.1", - "vitest": "^0.30.1" + "eslint-plugin-prettier": "^5.1.3", + "prettier": "^3.2.2", + "vitest": "^1.2.0" }, "engines": { "node": ">= 16" diff --git a/yarn.lock b/yarn.lock index 91870e084e..503c71e3f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,13 @@ __metadata: version: 6 cacheKey: 8 +"@aashutoshrathi/word-wrap@npm:^1.2.3": + version: 1.2.6 + resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" + checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd + languageName: node + linkType: hard + "@algolia/autocomplete-core@npm:1.7.1": version: 1.7.1 resolution: "@algolia/autocomplete-core@npm:1.7.1" @@ -737,7 +744,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.0.0, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.19.3, @babel/parser@npm:^7.3.3": +"@babel/parser@npm:^7.0.0, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.19.3, @babel/parser@npm:^7.3.3": version: 7.19.4 resolution: "@babel/parser@npm:7.19.4" bin: @@ -4730,7 +4737,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.4.0": +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: @@ -4741,7 +4748,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1": +"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b @@ -4782,6 +4789,30 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" + dependencies: + ajv: ^6.12.4 + debug: ^4.3.2 + espree: ^9.6.0 + globals: ^13.19.0 + ignore: ^5.2.0 + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + minimatch: ^3.1.2 + strip-json-comments: ^3.1.1 + checksum: 10957c7592b20ca0089262d8c2a8accbad14b4f6507e35416c32ee6b4dbf9cad67dfb77096bbd405405e9ada2b107f3797fe94362e1c55e0b09d6e90dd149127 + languageName: node + linkType: hard + +"@eslint/js@npm:8.56.0": + version: 8.56.0 + resolution: "@eslint/js@npm:8.56.0" + checksum: 5804130574ef810207bdf321c265437814e7a26f4e6fac9b496de3206afd52f533e09ec002a3be06cd9adcc9da63e727f1883938e663c4e4751c007d5b58e539 + languageName: node + linkType: hard + "@examples-action-listener/counter@workspace:examples/action-listener/counter": version: 0.0.0-use.local resolution: "@examples-action-listener/counter@workspace:examples/action-listener/counter" @@ -5183,77 +5214,6 @@ __metadata: languageName: node linkType: hard -"@glimmer/env@npm:0.1.7, @glimmer/env@npm:^0.1.7": - version: 0.1.7 - resolution: "@glimmer/env@npm:0.1.7" - checksum: d46686da1b21615c177792794ed11f725fbb1c32936d69ca54a3ac40e2314638a529b81afb23759d35cdf36462a7a6b2c02604a366473cd6a8abadfe56e9c335 - languageName: node - linkType: hard - -"@glimmer/global-context@npm:0.62.5": - version: 0.62.5 - resolution: "@glimmer/global-context@npm:0.62.5" - dependencies: - "@glimmer/env": ^0.1.7 - checksum: f60e893e9ace9536713694ddd82147fa2e8ae7106617bec661ba229af718c56fc8843e2e4afef57e9ebd77b6b7a7b9c15ca533d2ddb939febae341d2bd72aca6 - languageName: node - linkType: hard - -"@glimmer/interfaces@npm:0.62.5": - version: 0.62.5 - resolution: "@glimmer/interfaces@npm:0.62.5" - dependencies: - "@simple-dom/interface": ^1.4.0 - checksum: 9d726916324cb1eff40f9b14b562bddeb4146c57b688ec06d399294818b44c44cc0c05ae178d3d0bd3f872f27513ea646335e387d6c7a7c6ab3e2fba78f30524 - languageName: node - linkType: hard - -"@glimmer/reference@npm:^0.62.4": - version: 0.62.5 - resolution: "@glimmer/reference@npm:0.62.5" - dependencies: - "@glimmer/env": ^0.1.7 - "@glimmer/global-context": 0.62.5 - "@glimmer/interfaces": 0.62.5 - "@glimmer/util": 0.62.5 - "@glimmer/validator": 0.62.5 - checksum: 009a573c60b0cc026903a57716ae1a700ff3d1078e14618805fff0416b791a0465b7f5af03d57855b01aa9cb1e17e945fe9c05c015dd46a50faa1248d1342375 - languageName: node - linkType: hard - -"@glimmer/syntax@npm:^0.62.4": - version: 0.62.5 - resolution: "@glimmer/syntax@npm:0.62.5" - dependencies: - "@glimmer/interfaces": 0.62.5 - "@glimmer/util": 0.62.5 - "@handlebars/parser": ^1.1.0 - simple-html-tokenizer: ^0.5.10 - checksum: 1a69f1aa6bd51e9e2e5f39ce2e2ccd4bc7b3e7e4e1c91ccf4527c8bd16d5f1f99d02f60e0ec2e8eb2762d75dd07a5a5793e724c09c97680c81908d5acf9b03f8 - languageName: node - linkType: hard - -"@glimmer/util@npm:0.62.5": - version: 0.62.5 - resolution: "@glimmer/util@npm:0.62.5" - dependencies: - "@glimmer/env": 0.1.7 - "@glimmer/interfaces": 0.62.5 - "@simple-dom/interface": ^1.4.0 - checksum: 38fd1578f9985803b8ad858bb259cba223ee1ecdd308c73ccc043da1e62fa0d1f10bc4aa10de860e417f27d1d8aa98f0c1cec10322ee9f1f9423edae6a3d6fb6 - languageName: node - linkType: hard - -"@glimmer/validator@npm:0.62.5, @glimmer/validator@npm:^0.62.4": - version: 0.62.5 - resolution: "@glimmer/validator@npm:0.62.5" - dependencies: - "@glimmer/env": ^0.1.7 - "@glimmer/global-context": 0.62.5 - checksum: 58559481b35a2684c421b7fe98f5e21f660bbf37aa3abd65e27b49183a16f14ac93bfe87acef6d88951d3d8778de7afe2871eedd2822583e75f292460f4f57c8 - languageName: node - linkType: hard - "@graphql-codegen/add@npm:^2.0.2": version: 2.0.2 resolution: "@graphql-codegen/add@npm:2.0.2" @@ -5822,13 +5782,6 @@ __metadata: languageName: node linkType: hard -"@handlebars/parser@npm:^1.1.0": - version: 1.1.0 - resolution: "@handlebars/parser@npm:1.1.0" - checksum: f1ded58182780e1fdc0a9d40fe8485785118f7cf684210d538ea3847198d454cb2c122fd1849dfde545aba69502b382c4711cb084c82ca96c1f313178528dd17 - languageName: node - linkType: hard - "@hapi/hoek@npm:^9.0.0": version: 9.2.0 resolution: "@hapi/hoek@npm:9.2.0" @@ -5845,6 +5798,17 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/config-array@npm:^0.11.13": + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" + dependencies: + "@humanwhocodes/object-schema": ^2.0.2 + debug: ^4.3.1 + minimatch: ^3.0.5 + checksum: 861ccce9eaea5de19546653bccf75bf09fe878bc39c3aab00aeee2d2a0e654516adad38dd1098aab5e3af0145bbcbf3f309bdf4d964f8dab9dcd5834ae4c02f2 + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.9.2": version: 0.9.5 resolution: "@humanwhocodes/config-array@npm:0.9.5" @@ -5856,6 +5820,13 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 + languageName: node + linkType: hard + "@humanwhocodes/object-schema@npm:^1.2.1": version: 1.2.1 resolution: "@humanwhocodes/object-schema@npm:1.2.1" @@ -5863,6 +5834,13 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/object-schema@npm:^2.0.2": + version: 2.0.2 + resolution: "@humanwhocodes/object-schema@npm:2.0.2" + checksum: 2fc11503361b5fb4f14714c700c02a3f4c7c93e9acd6b87a29f62c522d90470f364d6161b03d1cc618b979f2ae02aed1106fd29d302695d8927e2fc8165ba8ee + languageName: node + linkType: hard + "@iarna/toml@npm:2.2.5, @iarna/toml@npm:^2.2.5": version: 2.2.5 resolution: "@iarna/toml@npm:2.2.5" @@ -6481,7 +6459,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.13, @jridgewell/sourcemap-codec@npm:^1.4.15": +"@jridgewell/sourcemap-codec@npm:^1.4.15": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 @@ -6733,6 +6711,16 @@ __metadata: languageName: node linkType: hard +"@nodelib/fs.walk@npm:^1.2.8": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": 2.1.5 + fastq: ^1.6.0 + checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53 + languageName: node + linkType: hard + "@npmcli/move-file@npm:^1.0.1": version: 1.1.2 resolution: "@npmcli/move-file@npm:1.1.2" @@ -6888,6 +6876,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.1.0": + version: 0.1.0 + resolution: "@pkgr/core@npm:0.1.0" + checksum: eeff0e0e517b1ed10eb4c1a8971413a8349bbfdab727dbe7d4085fd94eab95f0c3beb51b9245fef30562849d2a7a119e07ca48c343c8c4ec4e64ee289f50fe5e + languageName: node + linkType: hard + "@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": version: 0.5.7 resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.7" @@ -6999,15 +6994,19 @@ __metadata: version: 0.0.0-use.local resolution: "@reduxjs/rtk-codemods@workspace:packages/rtk-codemods" dependencies: - "@types/jscodeshift": ^0.11.5 - codemod-cli: ^3.2.0 - eslint: ^7.25.0 - eslint-config-prettier: ^8.3.0 + "@types/jscodeshift": ^0.11.11 + "@typescript-eslint/parser": ^6.18.1 + eslint: ^8.56.0 + eslint-config-prettier: ^9.1.0 eslint-plugin-node: ^11.1.0 - eslint-plugin-prettier: ^3.4.0 - prettier: ^2.2.1 - typescript: ^4.8.0 - vitest: ^0.30.1 + eslint-plugin-prettier: ^5.1.3 + execa: ^8.0.1 + globby: ^14.0.0 + jscodeshift: ^0.15.1 + prettier: ^3.2.2 + ts-node: ^10.9.2 + typescript: ^5.3.3 + vitest: ^1.2.0 bin: rtk-codemods: ./bin/cli.js languageName: unknown @@ -7442,13 +7441,6 @@ __metadata: languageName: node linkType: hard -"@simple-dom/interface@npm:^1.4.0": - version: 1.4.0 - resolution: "@simple-dom/interface@npm:1.4.0" - checksum: e0ce8b6174208c5a369c2650094d16080230bf90cb95cc8258f9fd6b93be8afedbffb9d63da7f1d295a4e8d901f5fff907a69e1d55556db9e8544f2615b2f1d7 - languageName: node - linkType: hard - "@sinclair/typebox@npm:^0.23.3": version: 0.23.5 resolution: "@sinclair/typebox@npm:0.23.5" @@ -7484,6 +7476,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/merge-streams@npm:^1.0.0": + version: 1.0.0 + resolution: "@sindresorhus/merge-streams@npm:1.0.0" + checksum: 453c2a28164113a5ec4fd23ba636e291a4112f6ee9e91cd5476b9a96e0fc9ee5ff40d405fe81bbf284c9773b7ed718a3a0f31df7895a0efd413b1f9775d154fe + languageName: node + linkType: hard + "@sinonjs/commons@npm:^1.7.0": version: 1.8.3 resolution: "@sinonjs/commons@npm:1.8.3" @@ -8083,22 +8082,6 @@ __metadata: languageName: node linkType: hard -"@types/chai-subset@npm:^1.3.3": - version: 1.3.3 - resolution: "@types/chai-subset@npm:1.3.3" - dependencies: - "@types/chai": "*" - checksum: 4481da7345022995f5a105e6683744f7203d2c3d19cfe88d8e17274d045722948abf55e0adfd97709e0f043dade37a4d4e98cd4c660e2e8a14f23e6ecf79418f - languageName: node - linkType: hard - -"@types/chai@npm:*, @types/chai@npm:^4.3.4": - version: 4.3.4 - resolution: "@types/chai@npm:4.3.4" - checksum: 571184967beb03bf64c4392a13a7d44e72da9af5a1e83077ff81c39cf59c0fda2a5c78d2005084601cf8f3d11726608574d8b5b4a0e3e9736792807afd926cd0 - languageName: node - linkType: hard - "@types/commander@npm:^2.12.2": version: 2.12.2 resolution: "@types/commander@npm:2.12.2" @@ -8347,13 +8330,13 @@ __metadata: languageName: node linkType: hard -"@types/jscodeshift@npm:^0.11.5": - version: 0.11.5 - resolution: "@types/jscodeshift@npm:0.11.5" +"@types/jscodeshift@npm:^0.11.11": + version: 0.11.11 + resolution: "@types/jscodeshift@npm:0.11.11" dependencies: ast-types: ^0.14.1 recast: ^0.20.3 - checksum: 5929f729477792a2c745289399ac0e2c0c46d4970031fa188073154262c6b0fcb03cf926d70a9fbcdc4c299df0e7fa1f0d6548e6bd1bb03c8245918c5b1a60de + checksum: 6224b781cbbc8e095cae3cb8f9dd1ca102d6c42d9c882b76ea84dfd0cd43870ce317369480ed6b593352efe9fe7199bd6c40ec2cb37646c474ba15f5b43d2109 languageName: node linkType: hard @@ -9038,14 +9021,10 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:0.30.1": - version: 0.30.1 - resolution: "@vitest/expect@npm:0.30.1" - dependencies: - "@vitest/spy": 0.30.1 - "@vitest/utils": 0.30.1 - chai: ^4.3.7 - checksum: cd7728d1532fd9b9d9ca52f76be14af72f7cf28686e91f99b1537a30d46a4207021410163b1c460076d4ada7246f7f3bdc14989c44aff0814ef83e1cdf5e4ecf +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 4f656b7b4672f2ce6e272f2427d8b0824ed11546a601d8d5412b9d7704e83db38a8d9f402ecdf2b9063fc164af842ad0ec4a55819f621ed7e7ea4d1efcc74524 languageName: node linkType: hard @@ -9060,15 +9039,14 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:0.30.1": - version: 0.30.1 - resolution: "@vitest/runner@npm:0.30.1" +"@vitest/expect@npm:1.2.0": + version: 1.2.0 + resolution: "@vitest/expect@npm:1.2.0" dependencies: - "@vitest/utils": 0.30.1 - concordance: ^5.0.4 - p-limit: ^4.0.0 - pathe: ^1.1.0 - checksum: b8f9faa63f3e98671804ab403a1dc466a48548fa5ee5e276855f0bcc1fae528ca65476584fb5528dd62ba9865c54d147b1ae78fb0cafe337c043669dcb93e67d + "@vitest/spy": 1.2.0 + "@vitest/utils": 1.2.0 + chai: ^4.3.10 + checksum: 591027d67b1006e6d9fb431dab8c2d43e4005353eea466bcafcc98303d31dc7b2f2562b24bb75ba9a5d62143a3b1fb7987c8f8b6244155752118c2c9382b6be0 languageName: node linkType: hard @@ -9083,14 +9061,14 @@ __metadata: languageName: node linkType: hard -"@vitest/snapshot@npm:0.30.1": - version: 0.30.1 - resolution: "@vitest/snapshot@npm:0.30.1" +"@vitest/runner@npm:1.2.0": + version: 1.2.0 + resolution: "@vitest/runner@npm:1.2.0" dependencies: - magic-string: ^0.30.0 - pathe: ^1.1.0 - pretty-format: ^27.5.1 - checksum: 9e0b89ca6c2cb08f2061c3d6bf5f2a1a9481c0229b8772b8be1db515552f07ea184f4248ceb11ad976ee89e2402c14e48a5700bab6ea859167fe5d10920e939c + "@vitest/utils": 1.2.0 + p-limit: ^5.0.0 + pathe: ^1.1.1 + checksum: fdb13c49a8c78d5eddf4119e55966f6681c3038421252f3ad4bd3302d4d9f686c8da37a80cd0c77ee2268b1a3c8253a22379dfb19ea3248563f174a32680ad9b languageName: node linkType: hard @@ -9105,12 +9083,14 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:0.30.1": - version: 0.30.1 - resolution: "@vitest/spy@npm:0.30.1" +"@vitest/snapshot@npm:1.2.0": + version: 1.2.0 + resolution: "@vitest/snapshot@npm:1.2.0" dependencies: - tinyspy: ^2.1.0 - checksum: af2e0a3910dfaa6b5759acd4913ca3c21ac9ad543c0d1095c23bdbca1a7d4e5dab43d8bfc4b08025d24e84965d65ae83f2cdc6aad080eaf5faf06daf06af3271 + magic-string: ^0.30.5 + pathe: ^1.1.1 + pretty-format: ^29.7.0 + checksum: 9af819d67c04c88909446ba2c7b6b941ddccbe3587dadc2d032b09f2434eb24342c51ea0e89b0e298b1a9a5426c846d1b8e1d2e72ae636ec13a1425a058bd9d4 languageName: node linkType: hard @@ -9123,14 +9103,12 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:0.30.1": - version: 0.30.1 - resolution: "@vitest/utils@npm:0.30.1" +"@vitest/spy@npm:1.2.0": + version: 1.2.0 + resolution: "@vitest/spy@npm:1.2.0" dependencies: - concordance: ^5.0.4 - loupe: ^2.3.6 - pretty-format: ^27.5.1 - checksum: a685b6ba34b0173e4da388055dc2a22ba335a74cf99679f7036cea1d183e0ee804a01984148eaad0e0f48bfb786d33800ff6dd549b94f3d064e14caa0857ee62 + tinyspy: ^2.2.0 + checksum: 6b627b4d15a4f20998873f221184f39fed73d368d8aa17ce7b7fccc4e78c20f2a42dd6ed006b1f5c23ee00466441b0b81d2c999cdb99f5326f25ba91fb6583c9 languageName: node linkType: hard @@ -9146,6 +9124,18 @@ __metadata: languageName: node linkType: hard +"@vitest/utils@npm:1.2.0": + version: 1.2.0 + resolution: "@vitest/utils@npm:1.2.0" + dependencies: + diff-sequences: ^29.6.3 + estree-walker: ^3.0.3 + loupe: ^2.3.7 + pretty-format: ^29.7.0 + checksum: ac17b2357366d6ce66efec3788262cb64cd5fcc4043b09a1b060b37ae4626d68577ef493f1b6e66b2bc0c551f1a9640ecf052aefef96fb0ef704bb56c23f636d + languageName: node + linkType: hard + "@webassemblyjs/ast@npm:1.11.1": version: 1.11.1 resolution: "@webassemblyjs/ast@npm:1.11.1" @@ -9602,7 +9592,7 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.0.0, acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1, acorn-walk@npm:^8.2.0": +"acorn-walk@npm:^8.0.0, acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1": version: 8.2.0 resolution: "acorn-walk@npm:8.2.0" checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 @@ -9652,7 +9642,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.10.0": +"acorn@npm:^8.10.0, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -10256,16 +10246,6 @@ __metadata: languageName: node linkType: hard -"async-promise-queue@npm:^1.0.5": - version: 1.0.5 - resolution: "async-promise-queue@npm:1.0.5" - dependencies: - async: ^2.4.1 - debug: ^2.6.8 - checksum: 6f18b65e4bac8c12822d66c532aba6c8a8d81ee6e7d790bc7c399e882ff55b642a86379a58df9129db8560f57f76dea0af39b065f43568fb4bec4edf40e415a9 - languageName: node - linkType: hard - "async-retry@npm:1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -10275,15 +10255,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.4.1": - version: 2.6.4 - resolution: "async@npm:2.6.4" - dependencies: - lodash: ^4.17.14 - checksum: a52083fb32e1ebe1d63e5c5624038bb30be68ff07a6c8d7dfe35e47c93fc144bd8652cbec869e0ac07d57dde387aa5f1386be3559cdee799cb1f789678d88e19 - languageName: node - linkType: hard - "async@npm:^3.2.3": version: 3.2.4 resolution: "async@npm:3.2.4" @@ -10921,13 +10892,6 @@ __metadata: languageName: node linkType: hard -"blueimp-md5@npm:^2.10.0": - version: 2.19.0 - resolution: "blueimp-md5@npm:2.19.0" - checksum: 28095dcbd2c67152a2938006e8d7c74c3406ba6556071298f872505432feb2c13241b0476644160ee0a5220383ba94cb8ccdac0053b51f68d168728f9c382530 - languageName: node - linkType: hard - "bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" @@ -11576,21 +11540,6 @@ __metadata: languageName: node linkType: hard -"chai@npm:^4.3.7": - version: 4.3.7 - resolution: "chai@npm:4.3.7" - dependencies: - assertion-error: ^1.1.0 - check-error: ^1.0.2 - deep-eql: ^4.1.2 - get-func-name: ^2.0.0 - loupe: ^2.3.1 - pathval: ^1.1.1 - type-detect: ^4.0.5 - checksum: 0bba7d267848015246a66995f044ce3f0ebc35e530da3cbdf171db744e14cbe301ab913a8d07caf7952b430257ccbb1a4a983c570a7c5748dc537897e5131f7c - languageName: node - linkType: hard - "chalk-template@npm:0.4.0": version: 0.4.0 resolution: "chalk-template@npm:0.4.0" @@ -11769,13 +11718,6 @@ __metadata: languageName: node linkType: hard -"check-error@npm:^1.0.2": - version: 1.0.2 - resolution: "check-error@npm:1.0.2" - checksum: d9d106504404b8addd1ee3f63f8c0eaa7cd962a1a28eb9c519b1c4a1dc7098be38007fc0060f045ee00f075fbb7a2a4f42abcf61d68323677e11ab98dc16042e - languageName: node - linkType: hard - "check-error@npm:^1.0.3": version: 1.0.3 resolution: "check-error@npm:1.0.3" @@ -12138,30 +12080,6 @@ __metadata: languageName: node linkType: hard -"codemod-cli@npm:^3.2.0": - version: 3.2.0 - resolution: "codemod-cli@npm:3.2.0" - dependencies: - "@babel/parser": ^7.14.0 - chalk: ^4.1.1 - common-tags: ^1.8.0 - ember-template-recast: ^4.1.4 - execa: ^5.0.0 - fs-extra: ^9.1.0 - globby: ^11.0.2 - import-cwd: ^3.0.0 - import-local: ^3.0.2 - jscodeshift: ^0.11.0 - latest-version: ^5.1.0 - pkg-up: ^3.1.0 - recast: ^0.20.4 - yargs: ^16.2.0 - bin: - codemod-cli: bin/cli.js - checksum: c0448ef19a4f2b503c125236f7b4c568d43ec22b4f42a9b461645deb00ea709864646e5801cbb283dc2c2be0cd20cd953efcec043d18ffb5d4de32de3eb901c6 - languageName: node - linkType: hard - "collapse-white-space@npm:^1.0.2": version: 1.0.6 resolution: "collapse-white-space@npm:1.0.6" @@ -12259,13 +12177,6 @@ __metadata: languageName: node linkType: hard -"colors@npm:^1.4.0": - version: 1.4.0 - resolution: "colors@npm:1.4.0" - checksum: 98aa2c2418ad87dedf25d781be69dc5fc5908e279d9d30c34d8b702e586a0474605b3a189511482b9d5ed0d20c867515d22749537f7bc546256c6014f3ebdcec - languageName: node - linkType: hard - "colors@npm:~1.2.1": version: 1.2.5 resolution: "colors@npm:1.2.5" @@ -12439,22 +12350,6 @@ __metadata: languageName: node linkType: hard -"concordance@npm:^5.0.4": - version: 5.0.4 - resolution: "concordance@npm:5.0.4" - dependencies: - date-time: ^3.1.0 - esutils: ^2.0.3 - fast-diff: ^1.2.0 - js-string-escape: ^1.0.1 - lodash: ^4.17.15 - md5-hex: ^3.0.1 - semver: ^7.3.2 - well-known-symbols: ^2.0.0 - checksum: 749153ba711492feb7c3d2f5bb04c107157440b3e39509bd5dd19ee7b3ac751d1e4cd75796d9f702e0a713312dbc661421c68aa4a2c34d5f6d91f47e3a1c64a6 - languageName: node - linkType: hard - "concurrently@npm:^6.2.0": version: 6.2.0 resolution: "concurrently@npm:6.2.0" @@ -13504,15 +13399,6 @@ __metadata: languageName: node linkType: hard -"date-time@npm:^3.1.0": - version: 3.1.0 - resolution: "date-time@npm:3.1.0" - dependencies: - time-zone: ^1.0.0 - checksum: f9cfcd1b15dfeabab15c0b9d18eb9e4e2d9d4371713564178d46a8f91ad577a290b5178b80050718d02d9c0cf646f8a875011e12d1ed05871e9f72c72c8a8fe6 - languageName: node - linkType: hard - "debounce@npm:^1.2.0": version: 1.2.1 resolution: "debounce@npm:1.2.1" @@ -13520,7 +13406,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0, debug@npm:^2.6.8, debug@npm:^2.6.9": +"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0, debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -13624,7 +13510,7 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^4.1.2, deep-eql@npm:^4.1.3": +"deep-eql@npm:^4.1.3": version: 4.1.3 resolution: "deep-eql@npm:4.1.3" dependencies: @@ -14298,27 +14184,6 @@ __metadata: languageName: node linkType: hard -"ember-template-recast@npm:^4.1.4": - version: 4.3.0 - resolution: "ember-template-recast@npm:4.3.0" - dependencies: - "@glimmer/reference": ^0.62.4 - "@glimmer/syntax": ^0.62.4 - "@glimmer/validator": ^0.62.4 - async-promise-queue: ^1.0.5 - colors: ^1.4.0 - commander: ^6.2.0 - globby: ^11.0.1 - ora: ^5.1.0 - slash: ^3.0.0 - tmp: ^0.2.1 - workerpool: ^6.0.3 - bin: - ember-template-recast: lib/bin.js - checksum: 1ed187176ee16ba1a35920bcc3d0be85971030d111dea3bd7843c4bd84a4f6d29cda153a781190191b6bb865a2e49338591d16f4442f69c7dec932b1956cc23a - languageName: node - linkType: hard - "emittery@npm:^0.10.2": version: 0.10.2 resolution: "emittery@npm:0.10.2" @@ -14763,6 +14628,17 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^9.1.0": + version: 9.1.0 + resolution: "eslint-config-prettier@npm:9.1.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907 + languageName: node + linkType: hard + "eslint-config-react-app@npm:^7.0.1": version: 7.0.1 resolution: "eslint-config-react-app@npm:7.0.1" @@ -14938,6 +14814,26 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-prettier@npm:^5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" + dependencies: + prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.6 + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: "*" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.2.0, eslint-plugin-react-hooks@npm:^4.3.0": version: 4.5.0 resolution: "eslint-plugin-react-hooks@npm:4.5.0" @@ -15012,6 +14908,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^5.2.0 + checksum: ec97dbf5fb04b94e8f4c5a91a7f0a6dd3c55e46bfc7bbcd0e3138c3a76977570e02ed89a1810c778dcd72072ff0e9621ba1379b4babe53921d71e2e4486fda3e + languageName: node + linkType: hard + "eslint-utils@npm:^2.0.0, eslint-utils@npm:^2.1.0": version: 2.1.0 resolution: "eslint-utils@npm:2.1.0" @@ -15053,7 +14959,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.4.1": +"eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 @@ -15170,6 +15076,54 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^8.56.0": + version: 8.56.0 + resolution: "eslint@npm:8.56.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@eslint-community/regexpp": ^4.6.1 + "@eslint/eslintrc": ^2.1.4 + "@eslint/js": 8.56.0 + "@humanwhocodes/config-array": ^0.11.13 + "@humanwhocodes/module-importer": ^1.0.1 + "@nodelib/fs.walk": ^1.2.8 + "@ungap/structured-clone": ^1.2.0 + ajv: ^6.12.4 + chalk: ^4.0.0 + cross-spawn: ^7.0.2 + debug: ^4.3.2 + doctrine: ^3.0.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.2.2 + eslint-visitor-keys: ^3.4.3 + espree: ^9.6.1 + esquery: ^1.4.2 + esutils: ^2.0.2 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 + find-up: ^5.0.0 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 + ignore: ^5.2.0 + imurmurhash: ^0.1.4 + is-glob: ^4.0.0 + is-path-inside: ^3.0.3 + js-yaml: ^4.1.0 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.4.1 + lodash.merge: ^4.6.2 + minimatch: ^3.1.2 + natural-compare: ^1.4.0 + optionator: ^0.9.3 + strip-ansi: ^6.0.1 + text-table: ^0.2.0 + bin: + eslint: bin/eslint.js + checksum: 883436d1e809b4a25d9eb03d42f584b84c408dbac28b0019f6ea07b5177940bf3cca86208f749a6a1e0039b63e085ee47aca1236c30721e91f0deef5cc5a5136 + languageName: node + linkType: hard + "espree@npm:^7.3.0, espree@npm:^7.3.1": version: 7.3.1 resolution: "espree@npm:7.3.1" @@ -15192,6 +15146,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^9.6.0, espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" + dependencies: + acorn: ^8.9.0 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^3.4.1 + checksum: eb8c149c7a2a77b3f33a5af80c10875c3abd65450f60b8af6db1bfcfa8f101e21c1e56a561c6dc13b848e18148d43469e7cd208506238554fb5395a9ea5a1ab9 + languageName: node + linkType: hard + "esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -15211,6 +15176,15 @@ __metadata: languageName: node linkType: hard +"esquery@npm:^1.4.2": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" + dependencies: + estraverse: ^5.1.0 + checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 + languageName: node + linkType: hard + "esrecurse@npm:^4.1.0, esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -15264,7 +15238,7 @@ __metadata: languageName: node linkType: hard -"esutils@npm:^2.0.2, esutils@npm:^2.0.3": +"esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" checksum: 22b5b08f74737379a840b8ed2036a5fb35826c709ab000683b092d9054e5c2a82c27818f12604bfc2a9a76b90b6834ef081edbc1c7ae30d1627012e067c6ec87 @@ -15574,7 +15548,7 @@ __metadata: languageName: node linkType: hard -"fast-diff@npm:^1.1.2, fast-diff@npm:^1.2.0": +"fast-diff@npm:^1.1.2": version: 1.2.0 resolution: "fast-diff@npm:1.2.0" checksum: 1b5306eaa9e826564d9e5ffcd6ebd881eb5f770b3f977fcbf38f05c824e42172b53c79920e8429c54eb742ce15a0caf268b0fdd5b38f6de52234c4a8368131ae @@ -15594,6 +15568,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -16568,6 +16555,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"globals@npm:^13.19.0": + version: 13.24.0 + resolution: "globals@npm:13.24.0" + dependencies: + type-fest: ^0.20.2 + checksum: 56066ef058f6867c04ff203b8a44c15b038346a62efbc3060052a1016be9f56f4cf0b2cd45b74b22b81e521a889fc7786c73691b0549c2f3a6e825b3d394f43c + languageName: node + linkType: hard + "globalyzer@npm:0.1.0": version: 0.1.0 resolution: "globalyzer@npm:0.1.0" @@ -16603,7 +16599,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"globby@npm:^11.0.1, globby@npm:^11.0.2, globby@npm:^11.0.3, globby@npm:^11.0.4, globby@npm:^11.1.0": +"globby@npm:^11.0.1, globby@npm:^11.0.3, globby@npm:^11.0.4, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -16630,6 +16626,20 @@ fsevents@^1.2.7: languageName: node linkType: hard +"globby@npm:^14.0.0": + version: 14.0.0 + resolution: "globby@npm:14.0.0" + dependencies: + "@sindresorhus/merge-streams": ^1.0.0 + fast-glob: ^3.3.2 + ignore: ^5.2.4 + path-type: ^5.0.0 + slash: ^5.1.0 + unicorn-magic: ^0.1.0 + checksum: f331b42993e420c8f2b61a6ca062276977ea6d95f181640ff018f00200f4fe5b50f1fae7540903483e6570ca626fe16234ab88e848d43381a2529220548a9d39 + languageName: node + linkType: hard + "globrex@npm:^0.1.2": version: 0.1.2 resolution: "globrex@npm:0.1.2" @@ -18296,7 +18306,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2": +"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 @@ -19761,13 +19771,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"js-string-escape@npm:^1.0.1": - version: 1.0.1 - resolution: "js-string-escape@npm:1.0.1" - checksum: f11e0991bf57e0c183b55c547acec85bd2445f043efc9ea5aa68b41bd2a3e7d3ce94636cb233ae0d84064ba4c1a505d32e969813c5b13f81e7d4be12c59256fe - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -20383,13 +20386,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"local-pkg@npm:^0.4.3": - version: 0.4.3 - resolution: "local-pkg@npm:0.4.3" - checksum: 7825aca531dd6afa3a3712a0208697aa4a5cd009065f32e3fb732aafcc42ed11f277b5ac67229222e96f4def55197171cdf3d5522d0381b489d2e5547b407d55 - languageName: node - linkType: hard - "local-pkg@npm:^0.5.0": version: 0.5.0 resolution: "local-pkg@npm:0.5.0" @@ -20592,7 +20588,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.5, lodash@npm:^4.7.0, lodash@npm:~4.17.0, lodash@npm:~4.17.15": +"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.5, lodash@npm:^4.7.0, lodash@npm:~4.17.0, lodash@npm:~4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -20640,7 +20636,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"loupe@npm:^2.3.1, loupe@npm:^2.3.6": +"loupe@npm:^2.3.6": version: 2.3.6 resolution: "loupe@npm:2.3.6" dependencies: @@ -20733,15 +20729,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"magic-string@npm:^0.30.0": - version: 0.30.0 - resolution: "magic-string@npm:0.30.0" - dependencies: - "@jridgewell/sourcemap-codec": ^1.4.13 - checksum: 7bdf22e27334d8a393858a16f5f840af63a7c05848c000fd714da5aa5eefa09a1bc01d8469362f25cc5c4a14ec01b46557b7fff8751365522acddf21e57c488d - languageName: node - linkType: hard - "magic-string@npm:^0.30.5": version: 0.30.5 resolution: "magic-string@npm:0.30.5" @@ -20878,15 +20865,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"md5-hex@npm:^3.0.1": - version: 3.0.1 - resolution: "md5-hex@npm:3.0.1" - dependencies: - blueimp-md5: ^2.10.0 - checksum: 6799a19e8bdd3e0c2861b94c1d4d858a89220488d7885c1fa236797e367d0c2e5f2b789e05309307083503f85be3603a9686a5915568a473137d6b4117419cc2 - languageName: node - linkType: hard - "md5.js@npm:^1.3.4": version: 1.3.5 resolution: "md5.js@npm:1.3.5" @@ -21295,7 +21273,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"minimatch@npm:3.1.2, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": +"minimatch@npm:3.1.2, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -22419,7 +22397,21 @@ fsevents@^1.2.7: languageName: node linkType: hard -"ora@npm:5.4.1, ora@npm:^5.1.0, ora@npm:^5.4.0, ora@npm:^5.4.1": +"optionator@npm:^0.9.3": + version: 0.9.3 + resolution: "optionator@npm:0.9.3" + dependencies: + "@aashutoshrathi/word-wrap": ^1.2.3 + deep-is: ^0.1.3 + fast-levenshtein: ^2.0.6 + levn: ^0.4.1 + prelude-ls: ^1.2.1 + type-check: ^0.4.0 + checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a + languageName: node + linkType: hard + +"ora@npm:5.4.1, ora@npm:^5.4.0, ora@npm:^5.4.1": version: 5.4.1 resolution: "ora@npm:5.4.1" dependencies: @@ -22515,15 +22507,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"p-limit@npm:^4.0.0": - version: 4.0.0 - resolution: "p-limit@npm:4.0.0" - dependencies: - yocto-queue: ^1.0.0 - checksum: 01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b - languageName: node - linkType: hard - "p-limit@npm:^5.0.0": version: 5.0.0 resolution: "p-limit@npm:5.0.0" @@ -22960,6 +22943,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"path-type@npm:^5.0.0": + version: 5.0.0 + resolution: "path-type@npm:5.0.0" + checksum: 15ec24050e8932c2c98d085b72cfa0d6b4eeb4cbde151a0a05726d8afae85784fc5544f733d8dfc68536587d5143d29c0bd793623fad03d7e61cc00067291cd5 + languageName: node + linkType: hard + "pathe@npm:^1.1.0": version: 1.1.0 resolution: "pathe@npm:1.1.0" @@ -24409,17 +24399,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"postcss@npm:^8.4.20": - version: 8.4.21 - resolution: "postcss@npm:8.4.21" - dependencies: - nanoid: ^3.3.4 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: e39ac60ccd1542d4f9d93d894048aac0d686b3bb38e927d8386005718e6793dbbb46930f0a523fe382f1bbd843c6d980aaea791252bf5e176180e5a4336d9679 - languageName: node - linkType: hard - "postcss@npm:^8.4.32": version: 8.4.33 resolution: "postcss@npm:8.4.33" @@ -24470,6 +24449,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"prettier@npm:^3.2.2": + version: 3.2.2 + resolution: "prettier@npm:3.2.2" + bin: + prettier: bin/prettier.cjs + checksum: b416e1e4b26c351403343ebe461feda631c0eee5c3cf316c711204a08f3c639f38a8f9177c75e98a690998ff82e8ddc80c6bc027fb4ef6cedb6a4db035b4fe9a + languageName: node + linkType: hard + "pretty-bytes@npm:^3.0.0": version: 3.0.1 resolution: "pretty-bytes@npm:3.0.1" @@ -26397,20 +26385,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"rollup@npm:^3.7.0": - version: 3.10.0 - resolution: "rollup@npm:3.10.0" - dependencies: - fsevents: ~2.3.2 - dependenciesMeta: - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 31a882689c58d084ac36362aeaf2422dc4b80d671bd88c856693c37d63a26ddac9b9819dfba7f79c2d50d5207868b0e3d75f728fe551bbc347cf5dedf8ece18e - languageName: node - linkType: hard - "rollup@npm:^4.2.0": version: 4.9.3 resolution: "rollup@npm:4.9.3" @@ -27228,13 +27202,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"simple-html-tokenizer@npm:^0.5.10": - version: 0.5.11 - resolution: "simple-html-tokenizer@npm:0.5.11" - checksum: f834a5a0b169ffe10f74bd479a071a7161e0186669e28a1cd662efacdaedd27667469e2b965d5a8538d9d8e7373cb741ea8d748259221f40fa3e4bda2efbdbfc - languageName: node - linkType: hard - "simple-swizzle@npm:^0.2.2": version: 0.2.2 resolution: "simple-swizzle@npm:0.2.2" @@ -27317,6 +27284,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"slash@npm:^5.1.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 70434b34c50eb21b741d37d455110258c42d2cf18c01e6518aeb7299f3c6e626330c889c0c552b5ca2ef54a8f5a74213ab48895f0640717cacefeef6830a1ba4 + languageName: node + linkType: hard + "slice-ansi@npm:0.0.4": version: 0.0.4 resolution: "slice-ansi@npm:0.0.4" @@ -27744,13 +27718,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"std-env@npm:^3.3.2": - version: 3.3.2 - resolution: "std-env@npm:3.3.2" - checksum: c02256bb041ba1870d23f8360bc7e47a9cf1fabcd02c8b7c4246d48f2c6bb47b4f45c70964348844e6d36521df84c4a9d09d468654b51e0eb5c600e3392b4570 - languageName: node - linkType: hard - "std-env@npm:^3.5.0": version: 3.7.0 resolution: "std-env@npm:3.7.0" @@ -28080,15 +28047,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"strip-literal@npm:^1.0.1": - version: 1.0.1 - resolution: "strip-literal@npm:1.0.1" - dependencies: - acorn: ^8.8.2 - checksum: ab40496820f02220390d95cdd620a997168efb69d5bd7d180bc4ef83ca562a95447843d8c7c88b8284879a29cf4eedc89d8001d1e098c1a1e23d12a9c755dff4 - languageName: node - linkType: hard - "strip-literal@npm:^1.3.0": version: 1.3.0 resolution: "strip-literal@npm:1.3.0" @@ -28372,6 +28330,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"synckit@npm:^0.8.6": + version: 0.8.8 + resolution: "synckit@npm:0.8.8" + dependencies: + "@pkgr/core": ^0.1.0 + tslib: ^2.6.2 + checksum: 9ed5d33abb785f5f24e2531efd53b2782ca77abf7912f734d170134552b99001915531be5a50297aa45c5701b5c9041e8762e6cd7a38e41e2461c1e7fccdedf8 + languageName: node + linkType: hard + "table@npm:^6.0.9": version: 6.7.1 resolution: "table@npm:6.7.1" @@ -28658,13 +28626,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"time-zone@npm:^1.0.0": - version: 1.0.0 - resolution: "time-zone@npm:1.0.0" - checksum: e46f5a69b8c236dcd8e91e29d40d4e7a3495ed4f59888c3f84ce1d9678e20461421a6ba41233509d47dd94bc18f1a4377764838b21b584663f942b3426dcbce8 - languageName: node - linkType: hard - "timers-browserify@npm:^2.0.4": version: 2.0.12 resolution: "timers-browserify@npm:2.0.12" @@ -28705,13 +28666,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"tinybench@npm:^2.4.0": - version: 2.4.0 - resolution: "tinybench@npm:2.4.0" - checksum: cfbe90f75755488653dde256019cc810f65e90f63fdd962e71e8b209b49598c5fc90c2227d2087eb807944895fafe7f12fe9ecae2b5e89db5adde66415e9b836 - languageName: node - linkType: hard - "tinybench@npm:^2.5.1": version: 2.5.1 resolution: "tinybench@npm:2.5.1" @@ -28726,13 +28680,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"tinypool@npm:^0.4.0": - version: 0.4.0 - resolution: "tinypool@npm:0.4.0" - checksum: 8abcac9e784793499f1eeeace8290c026454b9d7338c74029ce6a821643bab8dcab7caeb4051e39006baf681d6a62d57c3319e9c0f6e2317a45ab0fdbd76ee26 - languageName: node - linkType: hard - "tinypool@npm:^0.8.1": version: 0.8.1 resolution: "tinypool@npm:0.8.1" @@ -28740,13 +28687,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"tinyspy@npm:^2.1.0": - version: 2.1.0 - resolution: "tinyspy@npm:2.1.0" - checksum: cb83c1f74a79dd5934018bad94f60a304a29d98a2d909ea45fc367f7b80b21b0a7d8135a2ce588deb2b3ba56c7c607258b2a03e6001d89e4d564f9a95cc6a81f - languageName: node - linkType: hard - "tinyspy@npm:^2.2.0": version: 2.2.0 resolution: "tinyspy@npm:2.2.0" @@ -28772,15 +28712,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"tmp@npm:^0.2.1": - version: 0.2.1 - resolution: "tmp@npm:0.2.1" - dependencies: - rimraf: ^3.0.0 - checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -29134,6 +29065,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + "tslib@npm:~2.0.1": version: 2.0.3 resolution: "tslib@npm:2.0.3" @@ -29244,7 +29182,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 @@ -29399,6 +29337,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"unicorn-magic@npm:^0.1.0": + version: 0.1.0 + resolution: "unicorn-magic@npm:0.1.0" + checksum: 48c5882ca3378f380318c0b4eb1d73b7e3c5b728859b060276e0a490051d4180966beeb48962d850fd0c6816543bcdfc28629dcd030bb62a286a2ae2acb5acb6 + languageName: node + linkType: hard + "unified@npm:9.2.0": version: 9.2.0 resolution: "unified@npm:9.2.0" @@ -30028,22 +29973,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"vite-node@npm:0.30.1": - version: 0.30.1 - resolution: "vite-node@npm:0.30.1" - dependencies: - cac: ^6.7.14 - debug: ^4.3.4 - mlly: ^1.2.0 - pathe: ^1.1.0 - picocolors: ^1.0.0 - vite: ^3.0.0 || ^4.0.0 - bin: - vite-node: vite-node.mjs - checksum: 2a17cca94aaf9ea689aeff0b5e900aab9e9385e97189446a7bc9c067f094556a5fcdff4a04367811694c3dcd2001bef7f5133ac66cdf4307d90742c30aff5fea - languageName: node - linkType: hard - "vite-node@npm:1.1.3": version: 1.1.3 resolution: "vite-node@npm:1.1.3" @@ -30059,41 +29988,18 @@ fsevents@^1.2.7: languageName: node linkType: hard -"vite@npm:^3.0.0 || ^4.0.0": - version: 4.0.4 - resolution: "vite@npm:4.0.4" +"vite-node@npm:1.2.0": + version: 1.2.0 + resolution: "vite-node@npm:1.2.0" dependencies: - esbuild: ^0.16.3 - fsevents: ~2.3.2 - postcss: ^8.4.20 - resolve: ^1.22.1 - rollup: ^3.7.0 - peerDependencies: - "@types/node": ">= 14" - less: "*" - sass: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true + cac: ^6.7.14 + debug: ^4.3.4 + pathe: ^1.1.1 + picocolors: ^1.0.0 + vite: ^5.0.0 bin: - vite: bin/vite.js - checksum: eb86c8cdfe8dcb6644005486b31cb60bc596f2aa683cb194abb5c0afca7c2a5dfdb02bbc7f83f419ad170227ac9c3b898f4406a6d1433105fb61d79d78e47d52 + vite-node: vite-node.mjs + checksum: 18d1dfb8c4a5f926dd8089592634414b26b4a0bbcae4fd5f7f6bf336db14fcc1405481bdd70bdd5bcce25b71b38a0617b7688edf8a5463835920e3fe13e9b917 languageName: node linkType: hard @@ -30137,48 +30043,43 @@ fsevents@^1.2.7: languageName: node linkType: hard -"vitest@npm:^0.30.1": - version: 0.30.1 - resolution: "vitest@npm:0.30.1" +"vitest@npm:^1.1.3": + version: 1.1.3 + resolution: "vitest@npm:1.1.3" dependencies: - "@types/chai": ^4.3.4 - "@types/chai-subset": ^1.3.3 - "@types/node": "*" - "@vitest/expect": 0.30.1 - "@vitest/runner": 0.30.1 - "@vitest/snapshot": 0.30.1 - "@vitest/spy": 0.30.1 - "@vitest/utils": 0.30.1 - acorn: ^8.8.2 - acorn-walk: ^8.2.0 + "@vitest/expect": 1.1.3 + "@vitest/runner": 1.1.3 + "@vitest/snapshot": 1.1.3 + "@vitest/spy": 1.1.3 + "@vitest/utils": 1.1.3 + acorn-walk: ^8.3.1 cac: ^6.7.14 - chai: ^4.3.7 - concordance: ^5.0.4 + chai: ^4.3.10 debug: ^4.3.4 - local-pkg: ^0.4.3 - magic-string: ^0.30.0 - pathe: ^1.1.0 + execa: ^8.0.1 + local-pkg: ^0.5.0 + magic-string: ^0.30.5 + pathe: ^1.1.1 picocolors: ^1.0.0 - source-map: ^0.6.1 - std-env: ^3.3.2 - strip-literal: ^1.0.1 - tinybench: ^2.4.0 - tinypool: ^0.4.0 - vite: ^3.0.0 || ^4.0.0 - vite-node: 0.30.1 + std-env: ^3.5.0 + strip-literal: ^1.3.0 + tinybench: ^2.5.1 + tinypool: ^0.8.1 + vite: ^5.0.0 + vite-node: 1.1.3 why-is-node-running: ^2.2.2 peerDependencies: "@edge-runtime/vm": "*" - "@vitest/browser": "*" - "@vitest/ui": "*" + "@types/node": ^18.0.0 || >=20.0.0 + "@vitest/browser": ^1.0.0 + "@vitest/ui": ^1.0.0 happy-dom: "*" jsdom: "*" - playwright: "*" - safaridriver: "*" - webdriverio: "*" peerDependenciesMeta: "@edge-runtime/vm": optional: true + "@types/node": + optional: true "@vitest/browser": optional: true "@vitest/ui": @@ -30187,27 +30088,21 @@ fsevents@^1.2.7: optional: true jsdom: optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true bin: vitest: vitest.mjs - checksum: 68e33226dde914600270df9834bdc1f45fd225250051c046c9bc53ca51b8e0bf76dee29a5cf1a51a4c1524f00c414f81764bb463734bdcc9c3f483f2140ec516 + checksum: 35087400a0e2b2f0f1f451d0da41abafd8c55112e143a2643286bf0d3d4567b057b40dc391c4b2a05a947edc48d981a6b8c961dc32c6642d84cd8d717bd168bc languageName: node linkType: hard -"vitest@npm:^1.1.3": - version: 1.1.3 - resolution: "vitest@npm:1.1.3" +"vitest@npm:^1.2.0": + version: 1.2.0 + resolution: "vitest@npm:1.2.0" dependencies: - "@vitest/expect": 1.1.3 - "@vitest/runner": 1.1.3 - "@vitest/snapshot": 1.1.3 - "@vitest/spy": 1.1.3 - "@vitest/utils": 1.1.3 + "@vitest/expect": 1.2.0 + "@vitest/runner": 1.2.0 + "@vitest/snapshot": 1.2.0 + "@vitest/spy": 1.2.0 + "@vitest/utils": 1.2.0 acorn-walk: ^8.3.1 cac: ^6.7.14 chai: ^4.3.10 @@ -30222,7 +30117,7 @@ fsevents@^1.2.7: tinybench: ^2.5.1 tinypool: ^0.8.1 vite: ^5.0.0 - vite-node: 1.1.3 + vite-node: 1.2.0 why-is-node-running: ^2.2.2 peerDependencies: "@edge-runtime/vm": "*" @@ -30246,7 +30141,7 @@ fsevents@^1.2.7: optional: true bin: vitest: vitest.mjs - checksum: 35087400a0e2b2f0f1f451d0da41abafd8c55112e143a2643286bf0d3d4567b057b40dc391c4b2a05a947edc48d981a6b8c961dc32c6642d84cd8d717bd168bc + checksum: eb275607d71d5b101149988204af1f4205cec617bf0f8a1690c68f3f78634256f9a706b409710d258b375d54e6bcc5511b3861b5ae301965701c2849e4e80d0d languageName: node linkType: hard @@ -30754,13 +30649,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"well-known-symbols@npm:^2.0.0": - version: 2.0.0 - resolution: "well-known-symbols@npm:2.0.0" - checksum: 4f54bbc3012371cb4d228f436891b8e7536d34ac61a57541890257e96788608e096231e0121ac24d08ef2f908b3eb2dc0adba35023eaeb2a7df655da91415402 - languageName: node - linkType: hard - "whatwg-encoding@npm:^1.0.5": version: 1.0.5 resolution: "whatwg-encoding@npm:1.0.5" @@ -31167,13 +31055,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"workerpool@npm:^6.0.3": - version: 6.2.1 - resolution: "workerpool@npm:6.2.1" - checksum: c2c6eebbc5225f10f758d599a5c016fa04798bcc44e4c1dffb34050cd361d7be2e97891aa44419e7afe647b1f767b1dc0b85a5e046c409d890163f655028b09d - languageName: node - linkType: hard - "wrap-ansi@npm:^3.0.1": version: 3.0.1 resolution: "wrap-ansi@npm:3.0.1" From 21021c72e37ab6b5027add8087b482a5c1b88ea9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:53:15 -0600 Subject: [PATCH 084/368] Fix lint command --- packages/rtk-codemods/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 9cc3f3d9d7..d1ab834b47 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -2,7 +2,7 @@ "name": "@reduxjs/rtk-codemods", "version": "0.1.0", "scripts": { - "lint": "eslint --cache .", + "lint": "eslint .", "test": "vitest", "test:coverage": "vitest --coverage", "update-docs": "codemod-cli update-docs" From a5942395f78cad1bb4ae98a94d7e5b7f59b10f4d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:53:32 -0600 Subject: [PATCH 085/368] Copy `.gitignore` file from Reselect codemod --- packages/rtk-codemods/.gitignore | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/packages/rtk-codemods/.gitignore b/packages/rtk-codemods/.gitignore index 568cda7371..56fd2d9f2d 100644 --- a/packages/rtk-codemods/.gitignore +++ b/packages/rtk-codemods/.gitignore @@ -1,2 +1,32 @@ +# Dependencies /node_modules -/.eslintcache \ No newline at end of file + +# Production +/build + +# Generated files +.docusaurus +.cache-loader + +# Misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.cache +.yarnrc +.yarn/* +!.yarn/patches +!.yarn/releases +!.yarn/plugins +!.yarn/sdks +!.yarn/versions +.pnp.* +*.tgz + +/.eslintcache From 8dd9609ba5f6c9ba61dc89a063ee2d3c130dd984 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:54:30 -0600 Subject: [PATCH 086/368] Copy `transformTestUtils.ts` from Reselect codemod --- packages/rtk-codemods/transformTestUtils.ts | 86 +++++++++++---------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/packages/rtk-codemods/transformTestUtils.ts b/packages/rtk-codemods/transformTestUtils.ts index b49314cc73..8efb12b041 100644 --- a/packages/rtk-codemods/transformTestUtils.ts +++ b/packages/rtk-codemods/transformTestUtils.ts @@ -1,61 +1,63 @@ -import { describe, vi } from 'vitest'; -import type { Transform } from 'jscodeshift'; -import globby from 'globby'; -import fs from 'fs-extra'; -import path from 'path'; -import { runInlineTest } from 'jscodeshift/dist/testUtils'; +import { globbySync } from 'globby' +import type { Transform } from 'jscodeshift' +import type { TestOptions } from 'jscodeshift/src/testUtils' +import { runInlineTest } from 'jscodeshift/src/testUtils' +import fs from 'node:fs' +import path from 'node:path' +import { describe, it } from 'vitest' -export function runTransformTest( +export const runTransformTest = ( name: string, transform: Transform, - parser: string, + parser: TestOptions['parser'], fixturePath: string -) { - describe(name, function () { - globby - .sync('**/*.input.*', { - cwd: fixturePath, - absolute: true, - }) +) => { + describe(name, () => { + globbySync('**/*.input.*', { + cwd: fixturePath, + absolute: true + }) .map((entry) => entry.slice(fixturePath.length)) .forEach((filename) => { - let extension = path.extname(filename); - let testName = filename.replace(`.input${extension}`, ''); - let testInputPath = path.join(fixturePath, `${testName}${extension}`); - let inputPath = path.join(fixturePath, `${testName}.input${extension}`); - let outputPath = path.join(fixturePath, `${testName}.output${extension}`); - let optionsPath = path.join(fixturePath, `${testName}.options.json`); - let options = fs.pathExistsSync(optionsPath) ? fs.readFileSync(optionsPath) : '{}'; - - describe(testName, function () { - beforeEach(function () { - process.env.CODEMOD_CLI_ARGS = options; - }); + const extension = path.extname(filename) + const testName = filename.replace(`.input${extension}`, '') + const testInputPath = path.join(fixturePath, `${testName}${extension}`) + const inputPath = path.join( + fixturePath, + `${testName}.input${extension}` + ) + const outputPath = path.join( + fixturePath, + `${testName}.output${extension}` + ) - afterEach(function () { - process.env.CODEMOD_CLI_ARGS = ''; - }); - - it('transforms correctly', function () { + describe(testName, () => { + it('transforms correctly', () => { runInlineTest( transform, {}, - { path: testInputPath, source: fs.readFileSync(inputPath, 'utf8') }, + { + path: testInputPath, + source: fs.readFileSync(inputPath, 'utf8') + }, fs.readFileSync(outputPath, 'utf8'), { parser } - ); - }); + ) + }) - it('is idempotent', function () { + it('is idempotent', () => { runInlineTest( transform, {}, - { path: testInputPath, source: fs.readFileSync(outputPath, 'utf8') }, + { + path: testInputPath, + source: fs.readFileSync(outputPath, 'utf8') + }, fs.readFileSync(outputPath, 'utf8'), { parser } - ); - }); - }); - }); - }); + ) + }) + }) + }) + }) } From 21b67f09474245e71bfdcd8c093d7b89b4e89f37 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:54:54 -0600 Subject: [PATCH 087/368] Copy `tsconfig.json` from Reselect codemod --- packages/rtk-codemods/bin/tsconfig.json | 14 ------------- packages/rtk-codemods/tsconfig.json | 28 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) delete mode 100644 packages/rtk-codemods/bin/tsconfig.json create mode 100644 packages/rtk-codemods/tsconfig.json diff --git a/packages/rtk-codemods/bin/tsconfig.json b/packages/rtk-codemods/bin/tsconfig.json deleted file mode 100644 index d472d5de40..0000000000 --- a/packages/rtk-codemods/bin/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs" , - "strict": true , - "noUnusedLocals": false, - "resolveJsonModule": true, - "moduleResolution": "node", - "types": ["node"], - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/packages/rtk-codemods/tsconfig.json b/packages/rtk-codemods/tsconfig.json new file mode 100644 index 0000000000..56c373cc6c --- /dev/null +++ b/packages/rtk-codemods/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "isolatedModules": true, + "checkJs": true, + "baseUrl": ".", + "noEmit": true, + "strict": true, + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Node", + "esModuleInterop": true, + "skipLibCheck": true, + "allowJs": true, + "jsx": "preserve", + "noErrorTruncation": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@reduxjs/toolkit": ["../toolkit/src/index.ts"], // @remap-prod-remove-line + "@reduxjs/toolkit/query": ["../toolkit/src/query/index.ts"], // @remap-prod-remove-line + "@reduxjs/toolkit/react": ["../toolkit/src/react/index.ts"], // @remap-prod-remove-line + "@reduxjs/toolkit/query/react": ["../toolkit/src/query/react/index.ts"] // @remap-prod-remove-line + } + }, + "include": ["**/*.ts", "**/*.tsx", "bin/cli.js"] +} From 6bb5060d4f0a303918421a07047cb9e8ed4cd27f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:55:09 -0600 Subject: [PATCH 088/368] Fix `vitest.config.ts` file --- packages/rtk-codemods/vitest.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/rtk-codemods/vitest.config.ts b/packages/rtk-codemods/vitest.config.ts index b744c56463..7cef2ef780 100644 --- a/packages/rtk-codemods/vitest.config.ts +++ b/packages/rtk-codemods/vitest.config.ts @@ -3,9 +3,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { globals: true, - setupFiles: [], - include: ['./transforms/**/*.(spec|test).[jt]s?(x)'], - alias: {}, + watch: false, deps: { interopDefault: true, }, From 1cc1d14a8603ee389a2416a91a7ab86271f62ade Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 21:55:29 -0600 Subject: [PATCH 089/368] Copy `cli.js` from Reselect codemod --- packages/rtk-codemods/bin/cli.js | 43 ++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/packages/rtk-codemods/bin/cli.js b/packages/rtk-codemods/bin/cli.js index 76d86db833..28828aecfc 100755 --- a/packages/rtk-codemods/bin/cli.js +++ b/packages/rtk-codemods/bin/cli.js @@ -1,12 +1,39 @@ #!/usr/bin/env node -const path = require('path'); +import { execaSync } from 'execa' +import { globbySync } from 'globby' +import { createRequire } from 'node:module' +import path from 'node:path' +import { fileURLToPath } from 'node:url' -require('ts-node').register({ - project: path.join(__dirname, './tsconfig.json'), -}); +const require = createRequire(import.meta.url) -require('codemod-cli').runTransform( +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +const transformerDirectory = path.join( __dirname, - process.argv[2] /* transform name */, - process.argv.slice(3) /* paths or globs */ -); + '..', + 'transforms', + `${process.argv[2]}/index.ts` +) + +const jscodeshiftExecutable = require.resolve('.bin/jscodeshift') + +const extensions = 'ts,js,tsx,jsx' + +execaSync( + jscodeshiftExecutable, + [ + '-t', + transformerDirectory, + '--extensions', + extensions, + ...(process.argv.slice(3).length === 1 + ? globbySync(process.argv[3]) + : process.argv.slice(3)) + ], + { + stdio: 'inherit', + stripFinalNewline: false + } +) From 681a982a0911edf2d3adfd1492c4af250b7471ea Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 22:06:55 -0600 Subject: [PATCH 090/368] Refactor `createReducerBuilder` transform file - Eliminated `@ts-ignore` directives to improve TypeScript compliance. - Configured `lineTerminator` in `.toSource.options` for consistent end-of-line across platforms, overriding `jscodeshift`'s default OS-specific EOL. - Removed unnecessary `test.js` file. - Refactored `__fixtures__` files to contain more realistic and practical examples. --- .../createReducerBuilder.test.ts | 9 +- .../transforms/createReducerBuilder/index.ts | 109 +++++++++--------- .../__testfixtures__/basic-ts.input.ts | 30 +++-- .../__testfixtures__/basic-ts.output.ts | 29 ++++- .../__testfixtures__/basic.input.js | 64 +++++----- .../__testfixtures__/basic.output.js | 47 +++++--- .../createSliceReducerBuilder/test.js | 9 -- 7 files changed, 172 insertions(+), 125 deletions(-) delete mode 100644 packages/rtk-codemods/transforms/createSliceReducerBuilder/test.js diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/createReducerBuilder.test.ts b/packages/rtk-codemods/transforms/createReducerBuilder/createReducerBuilder.test.ts index 2f1ca8f24f..24678f709a 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/createReducerBuilder.test.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/createReducerBuilder.test.ts @@ -1,11 +1,10 @@ -import path from 'path'; -import transform, { parser } from './index'; - -import { runTransformTest } from '../../transformTestUtils'; +import path from 'node:path' +import { runTransformTest } from '../../transformTestUtils' +import transform, { parser } from './index' runTransformTest( 'createReducerBuilder', transform, parser, path.join(__dirname, '__testfixtures__') -); +) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/index.ts b/packages/rtk-codemods/transforms/createReducerBuilder/index.ts index 715c261bd8..7fbfcff005 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/index.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/index.ts @@ -1,93 +1,96 @@ -import { ExpressionKind, SpreadElementKind } from 'ast-types/gen/kinds'; -import { +import type { ExpressionKind, SpreadElementKind } from 'ast-types/gen/kinds' +import type { ExpressionStatement, JSCodeshift, ObjectExpression, - ObjectMethod, - ObjectProperty, - Transform, -} from 'jscodeshift'; - -type ObjectKey = ObjectMethod['key'] & ObjectProperty['key']; + Transform +} from 'jscodeshift' +import type { TestOptions } from 'jscodeshift/src/testUtils' function wrapInAddCaseExpression( j: JSCodeshift, addCaseArgs: (ExpressionKind | SpreadElementKind)[] ) { - const identifier = j.identifier('builder'); + const identifier = j.identifier('builder') return j.expressionStatement( - j.callExpression(j.memberExpression(identifier, j.identifier('addCase'), false), addCaseArgs) - ); + j.callExpression( + j.memberExpression(identifier, j.identifier('addCase'), false), + addCaseArgs + ) + ) } -export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectExpression) { - const caseExpressions: ExpressionStatement[] = []; - for (let property of defNode.properties) { - let addCaseArgs: (ExpressionKind | SpreadElementKind)[] = []; +export function reducerPropsToBuilderExpression( + j: JSCodeshift, + defNode: ObjectExpression +) { + const caseExpressions: ExpressionStatement[] = [] + for (const property of defNode.properties) { + let addCaseArgs: (ExpressionKind | SpreadElementKind)[] = [] switch (property.type) { case 'ObjectMethod': { - const { key, params, body } = property; + const { key, params, body } = property if (body) { - addCaseArgs = [key, j.arrowFunctionExpression(params, body)]; + addCaseArgs = [key, j.arrowFunctionExpression(params, body)] } - break; + break } case 'ObjectProperty': { - const { key } = property; + const { key } = property switch (property.value.type) { case 'ArrowFunctionExpression': case 'FunctionExpression': { - const { params, body } = property.value; + const { params, body } = property.value if (body) { - addCaseArgs = [key, j.arrowFunctionExpression(params, body)]; + addCaseArgs = [key, j.arrowFunctionExpression(params, body)] } - break; + break } case 'Identifier': case 'MemberExpression': { - const { value } = property; - addCaseArgs = [key, value]; - break; + const { value } = property + addCaseArgs = [key, value] + break } } } } if (!addCaseArgs.length) { - continue; + continue } - caseExpressions.push(wrapInAddCaseExpression(j, addCaseArgs)); + caseExpressions.push(wrapInAddCaseExpression(j, addCaseArgs)) } - return j.arrowFunctionExpression([j.identifier('builder')], j.blockStatement(caseExpressions)); + return j.arrowFunctionExpression( + [j.identifier('builder')], + j.blockStatement(caseExpressions) + ) } const transform: Transform = (file, api) => { - const j = api.jscodeshift; + const j = api.jscodeshift - return ( - j(file.source) - // @ts-ignore some expression mismatch - .find(j.CallExpression, { - callee: { name: 'createReducer' }, - // @ts-ignore some expression mismatch - arguments: { 1: { type: 'ObjectExpression' } }, - }) - .forEach((path) => { - const reducerObjectExpression = path.node.arguments[1] as ObjectExpression; - j(path).replaceWith( - j.callExpression(j.identifier('createReducer'), [ - path.node.arguments[0], - reducerPropsToBuilderExpression(j, reducerObjectExpression), - ]) - ); - }) - .toSource({ - arrowParensAlways: true, - }) - ); -}; + return j(file.source) + .find(j.CallExpression, { + callee: { name: 'createReducer' }, + arguments: [{}, { type: 'ObjectExpression' }] + }) + .forEach((path) => { + const reducerObjectExpression = path.node.arguments[1] as ObjectExpression + j(path).replaceWith( + j.callExpression(j.identifier('createReducer'), [ + path.node.arguments[0], + reducerPropsToBuilderExpression(j, reducerObjectExpression) + ]) + ) + }) + .toSource({ + arrowParensAlways: true, + lineTerminator: '\n' + }) +} -export const parser = 'tsx'; +export const parser = 'tsx' satisfies TestOptions['parser'] -export default transform; +export default transform diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.input.ts index 80614bfb8c..cdc3430fe8 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.input.ts @@ -1,27 +1,43 @@ -const aSlice = createSlice({ - name: 'name', +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload(): any { + throw new Error('Function not implemented.') +} + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', initialState: todoAdapter.getInitialState(), reducers: { property: () => {}, method(state, action: PayloadAction) { - todoAdapter.addOne(state, action); + todoAdapter.addOne(state, action) }, identifier: todoAdapter.removeOne, preparedProperty: { - prepare: (todo: Todo) => ({ payload: { id: nanoid(), ...todo } }), + prepare: (todo: Omit) => ({ + payload: { id: nanoid(), ...todo } + }), reducer: () => {} }, preparedMethod: { - prepare(todo: Todo) { + prepare(todo: Omit) { return { payload: { id: nanoid(), ...todo } } }, reducer(state, action: PayloadAction) { - todoAdapter.addOne(state, action); + todoAdapter.addOne(state, action) } }, preparedIdentifier: { prepare: withPayload(), reducer: todoAdapter.setMany - }, + } } }) \ No newline at end of file diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.output.ts index b84f139846..47bcf1d400 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic-ts.output.ts @@ -1,21 +1,38 @@ -const aSlice = createSlice({ - name: 'name', +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload(): any { + throw new Error('Function not implemented.') +} + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', initialState: todoAdapter.getInitialState(), reducers: (create) => ({ property: create.reducer(() => {}), method: create.reducer((state, action: PayloadAction) => { - todoAdapter.addOne(state, action); + todoAdapter.addOne(state, action) }), identifier: create.reducer(todoAdapter.removeOne), - preparedProperty: create.preparedReducer((todo: Todo) => ({ payload: { id: nanoid(), ...todo } }), () => {}), - preparedMethod: create.preparedReducer((todo: Todo) => { + preparedProperty: create.preparedReducer((todo: Omit) => ({ + payload: { id: nanoid(), ...todo } + }), () => {}), + + preparedMethod: create.preparedReducer((todo: Omit) => { return { payload: { id: nanoid(), ...todo } } }, (state, action: PayloadAction) => { - todoAdapter.addOne(state, action); + todoAdapter.addOne(state, action) }), preparedIdentifier: create.preparedReducer(withPayload(), todoAdapter.setMany) diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.input.js index 2319c0e9f3..4ea917d5b3 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.input.js @@ -1,27 +1,37 @@ -const aSlice = createSlice({ - name: 'name', - initialState: todoAdapter.getInitialState(), - reducers: { - property: () => {}, - method(state, action) { - todoAdapter.setMany(state, action); - }, - identifier: todoAdapter.removeOne, - preparedProperty: { - prepare: (todo) => ({ payload: { id: nanoid(), ...todo } }), - reducer: () => {} - }, - preparedMethod: { - prepare(todo) { - return { payload: { id: nanoid(), ...todo } } - }, - reducer(state, action) { - todoAdapter.setMany(state, action); - } - }, - preparedIdentifier: { - prepare: withPayload(), - reducer: todoAdapter.setMany - }, - } -}) \ No newline at end of file +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload() { + throw new Error('Function not implemented.') +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), + reducers: { + property: () => { }, + method(state, action) { + todoAdapter.addOne(state, action) + }, + identifier: todoAdapter.removeOne, + preparedProperty: { + prepare: (todo) => ({ + payload: { id: nanoid(), ...todo } + }), + reducer: () => { } + }, + preparedMethod: { + prepare(todo) { + return { payload: { id: nanoid(), ...todo } } + }, + reducer(state, action) { + todoAdapter.addOne(state, action) + } + }, + preparedIdentifier: { + prepare: withPayload(), + reducer: todoAdapter.setMany + } + } +}) diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.output.js index 24d6672386..3c527b7e21 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/__testfixtures__/basic.output.js @@ -1,23 +1,34 @@ -const aSlice = createSlice({ - name: 'name', - initialState: todoAdapter.getInitialState(), +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' - reducers: (create) => ({ - property: create.reducer(() => {}), +function withPayload() { + throw new Error('Function not implemented.') +} - method: create.reducer((state, action) => { - todoAdapter.setMany(state, action); - }), +export const todoAdapter = createEntityAdapter() - identifier: create.reducer(todoAdapter.removeOne), - preparedProperty: create.preparedReducer((todo) => ({ payload: { id: nanoid(), ...todo } }), () => {}), +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), - preparedMethod: create.preparedReducer((todo) => { - return { payload: { id: nanoid(), ...todo } } - }, (state, action) => { - todoAdapter.setMany(state, action); - }), + reducers: (create) => ({ + property: create.reducer(() => { }), - preparedIdentifier: create.preparedReducer(withPayload(), todoAdapter.setMany) - }) -}) \ No newline at end of file + method: create.reducer((state, action) => { + todoAdapter.addOne(state, action) + }), + + identifier: create.reducer(todoAdapter.removeOne), + + preparedProperty: create.preparedReducer((todo) => ({ + payload: { id: nanoid(), ...todo } + }), () => { }), + + preparedMethod: create.preparedReducer((todo) => { + return { payload: { id: nanoid(), ...todo } } + }, (state, action) => { + todoAdapter.addOne(state, action) + }), + + preparedIdentifier: create.preparedReducer(withPayload(), todoAdapter.setMany) + }) +}) diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/test.js b/packages/rtk-codemods/transforms/createSliceReducerBuilder/test.js deleted file mode 100644 index 5e34770a22..0000000000 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/test.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -const { runTransformTest } = require('codemod-cli'); - -runTransformTest({ - name: 'createSliceReducerBuilder', - path: require.resolve('./index.ts'), - fixtureDir: `${__dirname}/__testfixtures__/`, -}); From e9cc2a66d34c9c6c3dc08087e9dd2954cee720f7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 22:41:45 -0600 Subject: [PATCH 091/368] Refactor `createSliceBuilder` transform file - Eliminated `@ts-ignore` directives to improve TypeScript compliance. - Configured `lineTerminator` in `.toSource.options` for consistent end-of-line across platforms, overriding `jscodeshift`'s default OS-specific EOL. - Refactored `__fixtures__` files to contain slightly more realistic and practical examples. --- .../__testfixtures__/basic-ts.input.ts | 76 +++++++-- .../__testfixtures__/basic-ts.output.ts | 79 +++++++-- .../__testfixtures__/basic.input.js | 77 +++++---- .../__testfixtures__/basic.output.js | 77 +++++---- .../createSliceBuilder.test.ts | 14 +- .../transforms/createSliceBuilder/index.ts | 161 +++++++++--------- 6 files changed, 298 insertions(+), 186 deletions(-) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts index 9539371a75..6a549e0974 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts @@ -1,21 +1,71 @@ -const slice1 = createSlice({ - name: "a", - initialState, +import type { PayloadAction } from '@reduxjs/toolkit' +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + return response.data + } +) + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + reducers: { + deleteTodo: todoAdapter.removeOne + }, extraReducers: { - [todoAdded1a]: (state: SliceState, action: PayloadAction) => { + [incrementAsync.pending]: ( + state: TodoSliceState, + action: PayloadAction + ) => { // stuff }, - [todoAdded1b]: someFunc, - todoAdded1c: adapter.someFunc, + [incrementAsync.rejected]: todoAdapter.removeAll, + todoAdded: todoAdapter.addOne } -}); +}) + +export const { deleteTodo } = todoSlice.actions -const slice2 = createSlice({ - name: "b", - initialState, +export interface CounterSliceState { + value: number + status: 'idle' | 'loading' | 'failed' +} + +const counterInitialState: CounterSliceState = { + value: 0, + status: 'idle' +} + +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, extraReducers: { - [todoAdded](state: SliceState, action: PayloadAction) { + [deleteTodo](state: CounterSliceState, action: PayloadAction) { // stuff - }, + } } -}); +}) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts index 815db50bff..1258a0088c 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts @@ -1,24 +1,75 @@ -const slice1 = createSlice({ - name: "a", - initialState, +import type { PayloadAction } from '@reduxjs/toolkit' +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + return response.data + } +) + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + + reducers: { + deleteTodo: todoAdapter.removeOne + }, extraReducers: (builder) => { - builder.addCase(todoAdded1a, (state: SliceState, action: PayloadAction) => { - // stuff - }); + builder.addCase( + incrementAsync.pending, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ); - builder.addCase(todoAdded1b, someFunc); - builder.addCase(todoAdded1c, adapter.someFunc); + builder.addCase(incrementAsync.rejected, todoAdapter.removeAll); + builder.addCase(todoAdded, todoAdapter.addOne); } -}); +}) + +export const { deleteTodo } = todoSlice.actions + +export interface CounterSliceState { + value: number + status: 'idle' | 'loading' | 'failed' +} + +const counterInitialState: CounterSliceState = { + value: 0, + status: 'idle' +} -const slice2 = createSlice({ - name: "b", - initialState, +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, extraReducers: (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { + builder.addCase(deleteTodo, (state: CounterSliceState, action: PayloadAction) => { // stuff }); } -}); +}) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js index 23d29e537c..333e077e6f 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js @@ -1,41 +1,46 @@ -const slice1 = createSlice({ - name: "a", - initialState: {}, - extraReducers: { - [todoAdded1a]: (state, action) => { - // stuff - }, - [todoAdded1b]: (state, action) => action.payload, - [todoAdded1c + "test"]: (state, action) => { - // stuff - }, - [todoAdded1d](state, action) { - // stuff - }, - [todoAdded1e]: function(state, action) { - // stuff - }, - todoAdded1f: (state, action) => { - //stuff +import { createAsyncThunk, createEntityAdapter, createSlice } from '@reduxjs/toolkit'; + +export const todoAdapter = createEntityAdapter(); + +const todoInitialState = todoAdapter.getInitialState(); + +const fetchCount = (amount = 1) => { + return new Promise((resolve) => setTimeout(() => resolve({ data: amount }), 500)); +}; + +export const incrementAsync = createAsyncThunk('counter/fetchCount', async (amount) => { + const response = await fetchCount(amount); + return response.data; +}); + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + reducers: { + deleteTodo: todoAdapter.removeOne }, - [todoAdded1g]: someFunc, - todoAdded1h: adapter.someFunc - } + extraReducers: { + [incrementAsync.pending]: (state, action) => { + // stuff + }, + [incrementAsync.rejected]: todoAdapter.removeAll, + todoAdded: todoAdapter.addOne + } }); +export const { deleteTodo } = todoSlice.actions; -const slice2 = createSlice({ - name: "b", - initialState: {}, - extraReducers: { - [todoAdded2a]: (state, action) => { - // stuff - }, - [todoAdded2b](state, action) { - // stuff - }, - [todoAdded2c]: function(state, action) { - // stuff +const counterInitialState = { + value: 0, + status: 'idle' +}; + +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, + extraReducers: { + [deleteTodo](state, action) { + // stuff + } } - } -}); \ No newline at end of file +}); diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js index 00aef88efa..5c3e6c39cb 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js @@ -1,51 +1,50 @@ -const slice1 = createSlice({ - name: "a", - initialState: {}, +import { createAsyncThunk, createEntityAdapter, createSlice } from '@reduxjs/toolkit'; - extraReducers: (builder) => { - builder.addCase(todoAdded1a, (state, action) => { - // stuff - }); +export const todoAdapter = createEntityAdapter(); - builder.addCase(todoAdded1b, (state, action) => action.payload); +const todoInitialState = todoAdapter.getInitialState(); - builder.addCase(todoAdded1c + "test", (state, action) => { - // stuff - }); +const fetchCount = (amount = 1) => { + return new Promise((resolve) => setTimeout(() => resolve({ data: amount }), 500)); +}; - builder.addCase(todoAdded1d, (state, action) => { - // stuff - }); +export const incrementAsync = createAsyncThunk('counter/fetchCount', async (amount) => { + const response = await fetchCount(amount); + return response.data; +}); - builder.addCase(todoAdded1e, (state, action) => { - // stuff - }); +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, - builder.addCase(todoAdded1f, (state, action) => { - //stuff - }); + reducers: { + deleteTodo: todoAdapter.removeOne + }, - builder.addCase(todoAdded1g, someFunc); - builder.addCase(todoAdded1h, adapter.someFunc); - } -}); + extraReducers: (builder) => { + builder.addCase(incrementAsync.pending, (state, action) => { + // stuff + }); + builder.addCase(incrementAsync.rejected, todoAdapter.removeAll); + builder.addCase(todoAdded, todoAdapter.addOne); + } +}); -const slice2 = createSlice({ - name: "b", - initialState: {}, +export const { deleteTodo } = todoSlice.actions; - extraReducers: (builder) => { - builder.addCase(todoAdded2a, (state, action) => { - // stuff - }); +const counterInitialState = { + value: 0, + status: 'idle' +}; - builder.addCase(todoAdded2b, (state, action) => { - // stuff - }); +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, - builder.addCase(todoAdded2c, (state, action) => { - // stuff - }); - } -}); \ No newline at end of file + extraReducers: (builder) => { + builder.addCase(deleteTodo, (state, action) => { + // stuff + }); + } +}); diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/createSliceBuilder.test.ts b/packages/rtk-codemods/transforms/createSliceBuilder/createSliceBuilder.test.ts index 348bc3d4c9..c2164bffe5 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/createSliceBuilder.test.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/createSliceBuilder.test.ts @@ -1,6 +1,10 @@ -import path from 'path'; -import transform, { parser } from './index'; +import path from 'node:path' +import { runTransformTest } from '../../transformTestUtils' +import transform, { parser } from './index' -import { runTransformTest } from '../../transformTestUtils'; - -runTransformTest('createSliceBuilder', transform, parser, path.join(__dirname, '__testfixtures__')); +runTransformTest( + 'createSliceBuilder', + transform, + parser, + path.join(__dirname, '__testfixtures__') +) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/index.ts b/packages/rtk-codemods/transforms/createSliceBuilder/index.ts index 95d89337b8..80856876b5 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/index.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/index.ts @@ -1,119 +1,122 @@ -import { ExpressionKind, SpreadElementKind } from 'ast-types/gen/kinds'; -import { +import type { ExpressionKind, SpreadElementKind } from 'ast-types/gen/kinds' +import type { ExpressionStatement, JSCodeshift, ObjectExpression, - ObjectMethod, - ObjectProperty, - Transform, -} from 'jscodeshift'; - -type ObjectKey = ObjectMethod['key'] & ObjectProperty['key']; + Transform +} from 'jscodeshift' +import type { TestOptions } from 'jscodeshift/src/testUtils' function wrapInAddCaseExpression( j: JSCodeshift, addCaseArgs: (ExpressionKind | SpreadElementKind)[] ) { - const identifier = j.identifier('builder'); + const identifier = j.identifier('builder') return j.expressionStatement( - j.callExpression(j.memberExpression(identifier, j.identifier('addCase'), false), addCaseArgs) - ); + j.callExpression( + j.memberExpression(identifier, j.identifier('addCase'), false), + addCaseArgs + ) + ) } -export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectExpression) { - const caseExpressions: ExpressionStatement[] = []; - for (let property of defNode.properties) { - let addCaseArgs: (ExpressionKind | SpreadElementKind)[] = []; +export function reducerPropsToBuilderExpression( + j: JSCodeshift, + defNode: ObjectExpression +) { + const caseExpressions: ExpressionStatement[] = [] + for (const property of defNode.properties) { + let addCaseArgs: (ExpressionKind | SpreadElementKind)[] = [] switch (property.type) { case 'ObjectMethod': { - const { key, params, body } = property; + const { key, params, body } = property if (body) { - addCaseArgs = [key, j.arrowFunctionExpression(params, body)]; + addCaseArgs = [key, j.arrowFunctionExpression(params, body)] } - break; + break } - case 'ObjectProperty': { - const { key } = property; + case 'ObjectProperty': { + const { key } = property switch (property.value.type) { case 'ArrowFunctionExpression': case 'FunctionExpression': { - const { params, body } = property.value; + const { params, body } = property.value if (body) { - addCaseArgs = [key, j.arrowFunctionExpression(params, body)]; + addCaseArgs = [key, j.arrowFunctionExpression(params, body)] } - break; + break } case 'Identifier': case 'MemberExpression': { - const { value } = property; - addCaseArgs = [key, value]; - break; + const { value } = property + addCaseArgs = [key, value] + break } } } } if (!addCaseArgs.length) { - continue; + continue } - caseExpressions.push(wrapInAddCaseExpression(j, addCaseArgs)); + caseExpressions.push(wrapInAddCaseExpression(j, addCaseArgs)) } - return j.arrowFunctionExpression([j.identifier('builder')], j.blockStatement(caseExpressions)); + return j.arrowFunctionExpression( + [j.identifier('builder')], + j.blockStatement(caseExpressions) + ) } const transform: Transform = (file, api) => { - const j = api.jscodeshift; + const j = api.jscodeshift - return ( - j(file.source) - // @ts-ignore some expression mismatch - .find(j.CallExpression, { - callee: { name: 'createSlice' }, - // @ts-ignore some expression mismatch - arguments: { 0: { type: 'ObjectExpression' } }, - }) + return j(file.source) + .find(j.CallExpression, { + callee: { name: 'createSlice' }, + arguments: [{ type: 'ObjectExpression' }] + }) - .filter((path) => { - const createSliceArgsObject = path.node.arguments[0] as ObjectExpression; - return createSliceArgsObject.properties.some( - (p) => - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'extraReducers' && - p.value.type === 'ObjectExpression' - ); - }) - .forEach((path) => { - const createSliceArgsObject = path.node.arguments[0] as ObjectExpression; - j(path).replaceWith( - j.callExpression(j.identifier('createSlice'), [ - j.objectExpression( - createSliceArgsObject.properties.map((p) => { - if ( - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'extraReducers' && - p.value.type === 'ObjectExpression' - ) { - const expressionStatement = reducerPropsToBuilderExpression( - j, - p.value as ObjectExpression - ); - return j.objectProperty(p.key, expressionStatement); - } - return p; - }) - ), - ]) - ); - }) - .toSource({ - arrowParensAlways: true, - }) - ); -}; + .filter((path) => { + const createSliceArgsObject = path.node.arguments[0] as ObjectExpression + return createSliceArgsObject.properties.some( + (p) => + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'extraReducers' && + p.value.type === 'ObjectExpression' + ) + }) + .forEach((path) => { + const createSliceArgsObject = path.node.arguments[0] as ObjectExpression + j(path).replaceWith( + j.callExpression(j.identifier('createSlice'), [ + j.objectExpression( + createSliceArgsObject.properties.map((p) => { + if ( + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'extraReducers' && + p.value.type === 'ObjectExpression' + ) { + const expressionStatement = reducerPropsToBuilderExpression( + j, + p.value as ObjectExpression + ) + return j.objectProperty(p.key, expressionStatement) + } + return p + }) + ) + ]) + ) + }) + .toSource({ + arrowParensAlways: true, + lineTerminator: '\n' + }) +} -export const parser = 'tsx'; +export const parser = 'tsx' satisfies TestOptions['parser'] -export default transform; +export default transform From ecbf3f2d98703394eaf3c502e1d4918b92453d57 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 14 Jan 2024 22:59:15 -0600 Subject: [PATCH 092/368] Refactor `createSliceReducerBuilder` transform file - Eliminated `@ts-ignore` directives to improve TypeScript compliance. - Configured `lineTerminator` in `.toSource.options` for consistent end-of-line across platforms, overriding `jscodeshift`'s default OS-specific EOL. - Refactored `__fixtures__` files to contain slightly more realistic and practical examples. --- .../__testfixtures__/basic-ts.input.ts | 32 ++- .../__testfixtures__/basic-ts.output.ts | 30 ++- .../__testfixtures__/basic.input.js | 48 ++-- .../__testfixtures__/basic.output.js | 49 ++-- .../createSliceReducerBuilder.test.ts | 9 +- .../createSliceReducerBuilder/index.ts | 210 +++++++++--------- 6 files changed, 190 insertions(+), 188 deletions(-) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts index 9d0dd79709..981b79f96e 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts @@ -1,13 +1,27 @@ -createReducer(initialState, { - [todoAdded1a]: (state: SliceState, action: PayloadAction) => { +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +createReducer(todoInitialState, { + [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, - [todoAdded1b]: someFunc, - todoAdded1c: adapter.someFunc, -}); + [todoRemoved]: todoAdapter.removeOne, + todoAdded: todoAdapter.addOne +}) -createReducer(initialState, { - [todoAdded](state: SliceState, action: PayloadAction) { +createReducer(todoInitialState, { + [todoAdded](state: TodoSliceState, action: PayloadAction) { // stuff - }, -}); + } +}) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts index b0ed567675..78368bb273 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts @@ -1,14 +1,28 @@ -createReducer(initialState, (builder) => { - builder.addCase(todoAdded1a, (state: SliceState, action: PayloadAction) => { +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +createReducer(todoInitialState, (builder) => { + builder.addCase(todoAdded1a, (state: TodoSliceState, action: PayloadAction) => { // stuff }); - builder.addCase(todoAdded1b, someFunc); - builder.addCase(todoAdded1c, adapter.someFunc); -}); + builder.addCase(todoRemoved, todoAdapter.removeOne); + builder.addCase(todoAdded, todoAdapter.addOne); +}) -createReducer(initialState, (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { +createReducer(todoInitialState, (builder) => { + builder.addCase(todoAdded, (state: TodoSliceState, action: PayloadAction) => { // stuff }); -}); +}) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js index 29587d92ad..9808f18a2a 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js @@ -1,33 +1,19 @@ -createReducer(initialState, { - [todoAdded1a]: (state, action) => { - // stuff - }, - [todoAdded1b]: (state, action) => action.payload, - [todoAdded1c + "test"]: (state, action) => { - // stuff - }, - [todoAdded1d](state, action) { - // stuff - }, - [todoAdded1e]: function(state, action) { - // stuff - }, - todoAdded1f: (state, action) => { - //stuff - }, - [todoAdded1g]: someFunc, - todoAdded1h: adapter.someFunc -}); +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit'; + +export const todoAdapter = createEntityAdapter(); +const todoInitialState = todoAdapter.getInitialState(); -createReducer(initialState, { - [todoAdded2a]: (state, action) => { - // stuff - }, - [todoAdded2b](state, action) { - // stuff - }, - [todoAdded2c]: function(state, action) { - // stuff - } -}); \ No newline at end of file +createReducer(todoInitialState, { + [todoAdded1a]: (state, action) => { + // stuff + }, + [todoRemoved]: todoAdapter.removeOne, + todoAdded: todoAdapter.addOne +}); + +createReducer(todoInitialState, { + [todoAdded](state, action) { + // stuff + } +}); diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js index 26f3abb98b..c33abf1b40 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js @@ -1,41 +1,20 @@ -createReducer(initialState, (builder) => { - builder.addCase(todoAdded1a, (state, action) => { - // stuff - }); +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit'; - builder.addCase(todoAdded1b, (state, action) => action.payload); +export const todoAdapter = createEntityAdapter(); - builder.addCase(todoAdded1c + "test", (state, action) => { - // stuff - }); +const todoInitialState = todoAdapter.getInitialState(); - builder.addCase(todoAdded1d, (state, action) => { - // stuff - }); +createReducer(todoInitialState, (builder) => { + builder.addCase(todoAdded1a, (state, action) => { + // stuff + }); - builder.addCase(todoAdded1e, (state, action) => { - // stuff - }); - - builder.addCase(todoAdded1f, (state, action) => { - //stuff - }); - - builder.addCase(todoAdded1g, someFunc); - builder.addCase(todoAdded1h, adapter.someFunc); + builder.addCase(todoRemoved, todoAdapter.removeOne); + builder.addCase(todoAdded, todoAdapter.addOne); }); - -createReducer(initialState, (builder) => { - builder.addCase(todoAdded2a, (state, action) => { - // stuff - }); - - builder.addCase(todoAdded2b, (state, action) => { - // stuff - }); - - builder.addCase(todoAdded2c, (state, action) => { - // stuff - }); -}); \ No newline at end of file +createReducer(todoInitialState, (builder) => { + builder.addCase(todoAdded, (state, action) => { + // stuff + }); +}); diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/createSliceReducerBuilder.test.ts b/packages/rtk-codemods/transforms/createSliceReducerBuilder/createSliceReducerBuilder.test.ts index b283f1d97c..2b905aa0cc 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/createSliceReducerBuilder.test.ts +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/createSliceReducerBuilder.test.ts @@ -1,11 +1,10 @@ -import path from 'path'; -import transform, { parser } from './index'; - -import { runTransformTest } from '../../transformTestUtils'; +import path from 'node:path' +import { runTransformTest } from '../../transformTestUtils' +import transform, { parser } from './index' runTransformTest( 'createSliceReducerBuilder', transform, parser, path.join(__dirname, '__testfixtures__') -); +) diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/index.ts b/packages/rtk-codemods/transforms/createSliceReducerBuilder/index.ts index 549a50e3da..e168b08eee 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/index.ts +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/index.ts @@ -1,67 +1,70 @@ -/* eslint-disable node/no-extraneous-import */ -/* eslint-disable node/no-unsupported-features/es-syntax */ -import type { ExpressionKind, SpreadElementKind } from 'ast-types/gen/kinds'; +import type { ExpressionKind } from 'ast-types/gen/kinds' import type { - CallExpression, JSCodeshift, ObjectExpression, ObjectProperty, - Transform, -} from 'jscodeshift'; + Transform +} from 'jscodeshift' +import type { TestOptions } from 'jscodeshift/src/testUtils' -function creatorCall(j: JSCodeshift, type: 'reducer', reducer: ExpressionKind): CallExpression; -// eslint-disable-next-line no-redeclare -function creatorCall( - j: JSCodeshift, - type: 'preparedReducer', - prepare: ExpressionKind, - reducer: ExpressionKind -): CallExpression; -// eslint-disable-next-line no-redeclare -function creatorCall( - j: JSCodeshift, - type: 'reducer' | 'preparedReducer', - ...rest: Array -) { - return j.callExpression(j.memberExpression(j.identifier('create'), j.identifier(type)), rest); +type CreatorCallRestArguments = + | [type: 'reducer', reducer: ExpressionKind] + | [type: 'preparedReducer', prepare: ExpressionKind, reducer: ExpressionKind] + +function creatorCall(j: JSCodeshift, ...rest: CreatorCallRestArguments) { + const [type, ...restArgs] = rest + + return j.callExpression( + j.memberExpression(j.identifier('create'), j.identifier(type)), + restArgs + ) } -export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectExpression) { - const returnedObject = j.objectExpression([]); - for (let property of defNode.properties) { - let finalProp: ObjectProperty | undefined; +export function reducerPropsToBuilderExpression( + j: JSCodeshift, + defNode: ObjectExpression +) { + const returnedObject = j.objectExpression([]) + for (const property of defNode.properties) { + let finalProp: ObjectProperty | undefined switch (property.type) { case 'ObjectMethod': { - const { key, params, body } = property; + const { key, params, body } = property finalProp = j.objectProperty( key, creatorCall(j, 'reducer', j.arrowFunctionExpression(params, body)) - ); - break; + ) + break } case 'ObjectProperty': { - const { key } = property; + const { key } = property switch (property.value.type) { case 'ObjectExpression': { - let preparedReducerParams: { prepare?: ExpressionKind; reducer?: ExpressionKind } = {}; + const preparedReducerParams: { + prepare?: ExpressionKind + reducer?: ExpressionKind + } = {} for (const objProp of property.value.properties) { switch (objProp.type) { case 'ObjectMethod': { - const { key, params, body } = objProp; + const { key, params, body } = objProp if ( key.type === 'Identifier' && (key.name === 'reducer' || key.name === 'prepare') ) { - preparedReducerParams[key.name] = j.arrowFunctionExpression(params, body); + preparedReducerParams[key.name] = j.arrowFunctionExpression( + params, + body + ) } - break; + break } case 'ObjectProperty': { - const { key, value } = objProp; + const { key, value } = objProp - let finalExpression: ExpressionKind | undefined = undefined; + let finalExpression: ExpressionKind | undefined = undefined switch (value.type) { case 'ArrowFunctionExpression': @@ -69,7 +72,7 @@ export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectE case 'Identifier': case 'MemberExpression': case 'CallExpression': { - finalExpression = value; + finalExpression = value } } @@ -78,14 +81,17 @@ export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectE (key.name === 'reducer' || key.name === 'prepare') && finalExpression ) { - preparedReducerParams[key.name] = finalExpression; + preparedReducerParams[key.name] = finalExpression } - break; + break } } } - if (preparedReducerParams.prepare && preparedReducerParams.reducer) { + if ( + preparedReducerParams.prepare && + preparedReducerParams.reducer + ) { finalProp = j.objectProperty( key, creatorCall( @@ -94,86 +100,90 @@ export function reducerPropsToBuilderExpression(j: JSCodeshift, defNode: ObjectE preparedReducerParams.prepare, preparedReducerParams.reducer ) - ); + ) } else if (preparedReducerParams.reducer) { finalProp = j.objectProperty( key, creatorCall(j, 'reducer', preparedReducerParams.reducer) - ); + ) } - break; + break } case 'ArrowFunctionExpression': case 'FunctionExpression': case 'Identifier': case 'MemberExpression': case 'CallExpression': { - const { value } = property; - finalProp = j.objectProperty(key, creatorCall(j, 'reducer', value)); - break; + const { value } = property + finalProp = j.objectProperty(key, creatorCall(j, 'reducer', value)) + break } } - break; + break } } if (!finalProp) { - continue; + continue } - returnedObject.properties.push(finalProp); + returnedObject.properties.push(finalProp) } - return j.arrowFunctionExpression([j.identifier('create')], returnedObject, true); + return j.arrowFunctionExpression( + [j.identifier('create')], + returnedObject, + true + ) } const transform: Transform = (file, api) => { - const j = api.jscodeshift; - - return ( - j(file.source) - // @ts-ignore some expression mismatch - .find(j.CallExpression, { - callee: { name: 'createSlice' }, - // @ts-ignore some expression mismatch - arguments: { 0: { type: 'ObjectExpression' } }, - }) - - .filter((path) => { - const createSliceArgsObject = path.node.arguments[0] as ObjectExpression; - return createSliceArgsObject.properties.some( - (p) => - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'reducers' && - p.value.type === 'ObjectExpression' - ); - }) - .forEach((path) => { - const createSliceArgsObject = path.node.arguments[0] as ObjectExpression; - j(path).replaceWith( - j.callExpression(j.identifier('createSlice'), [ - j.objectExpression( - createSliceArgsObject.properties.map((p) => { - if ( - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'reducers' && - p.value.type === 'ObjectExpression' - ) { - const expressionStatement = reducerPropsToBuilderExpression(j, p.value); - return j.objectProperty(p.key, expressionStatement); - } - return p; - }) - ), - ]) - ); - }) - .toSource({ - arrowParensAlways: true, - }) - ); -}; - -export const parser = 'tsx'; - -export default transform; + const j = api.jscodeshift + + return j(file.source) + .find(j.CallExpression, { + callee: { name: 'createSlice' }, + arguments: [{ type: 'ObjectExpression' }] + }) + + .filter((path) => { + const createSliceArgsObject = path.node.arguments[0] as ObjectExpression + return createSliceArgsObject.properties.some( + (p) => + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'reducers' && + p.value.type === 'ObjectExpression' + ) + }) + .forEach((path) => { + const createSliceArgsObject = path.node.arguments[0] as ObjectExpression + j(path).replaceWith( + j.callExpression(j.identifier('createSlice'), [ + j.objectExpression( + createSliceArgsObject.properties.map((p) => { + if ( + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'reducers' && + p.value.type === 'ObjectExpression' + ) { + const expressionStatement = reducerPropsToBuilderExpression( + j, + p.value + ) + return j.objectProperty(p.key, expressionStatement) + } + return p + }) + ) + ]) + ) + }) + .toSource({ + arrowParensAlways: true, + lineTerminator: '\n' + }) +} + +export const parser = 'tsx' satisfies TestOptions['parser'] + +export default transform From 1a4988202f1858677b73b5c0279837dba4aafd68 Mon Sep 17 00:00:00 2001 From: Jackson Date: Mon, 15 Jan 2024 20:47:02 +1100 Subject: [PATCH 093/368] Refactor getCacheKey function to support fixedCacheKey in mutationThunk --- .../src/query/core/buildMiddleware/cacheLifecycle.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts index 247bd7434c..54caab83b3 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts @@ -251,9 +251,11 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ } } - function getCacheKey(action: any) { + function getCacheKey(action: any) { if (isQueryThunk(action)) return action.meta.arg.queryCacheKey - if (isMutationThunk(action)) return action.meta.requestId + if (isMutationThunk(action)) { + return action.meta.arg.fixedCacheKey ?? action.meta.requestId; + } if (api.internalActions.removeQueryResult.match(action)) return action.payload.queryCacheKey if (api.internalActions.removeMutationResult.match(action)) From 9fce166defcbf6354565325ff17270608059adde Mon Sep 17 00:00:00 2001 From: Jackson Date: Mon, 15 Jan 2024 21:07:02 +1100 Subject: [PATCH 094/368] Add test for fixedCacheKey creating new cache entry in useMutation-fixedCacheKey.test.tsx --- .../tests/useMutation-fixedCacheKey.test.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index ded2e71b4e..3350e2d6ef 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -8,8 +8,11 @@ import { waitFor, act, } from '@testing-library/react' +import { vi } from 'vitest' describe('fixedCacheKey', () => { + const onNewCacheEntry = vi.fn() + const api = createApi({ async baseQuery(arg: string | Promise) { return { data: await arg } @@ -354,4 +357,34 @@ describe('fixedCacheKey', () => { expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') expect(getByTestId(c1, 'data').textContent).toBe('this should be visible') }) + + test('using fixedCacheKey should create a new cache entry', async () => { + api.injectEndpoints({ + overrideExisting: true, + endpoints: (build) => ({ + send: build.mutation>({ + query: (arg) => arg, + onCacheEntryAdded(arg, { }) { + onNewCacheEntry(arg) + }, + }), + }), + }) + + render(, { + wrapper: storeRef.wrapper, + }) + + let c1 = screen.getByTestId('C1') + + expect(getByTestId(c1, 'status').textContent).toBe('uninitialized') + expect(getByTestId(c1, 'originalArgs').textContent).toBe('undefined') + + await act(async () => { + getByTestId(c1, 'trigger').click() + await Promise.resolve() + }) + + expect(onNewCacheEntry).toHaveBeenCalledWith('C1') + }) }) From ab84c4bce6cb89e1d604f71a03100ade674f8da9 Mon Sep 17 00:00:00 2001 From: Jackson Date: Mon, 15 Jan 2024 21:09:56 +1100 Subject: [PATCH 095/368] yarn format pass --- .../src/query/tests/useMutation-fixedCacheKey.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 3350e2d6ef..4b1307fb97 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -364,14 +364,14 @@ describe('fixedCacheKey', () => { endpoints: (build) => ({ send: build.mutation>({ query: (arg) => arg, - onCacheEntryAdded(arg, { }) { + onCacheEntryAdded(arg, {}) { onNewCacheEntry(arg) }, }), }), }) - render(, { + render(, { wrapper: storeRef.wrapper, }) From 5a6213c94886ae4034b4b8bdc4f8dfc955c44e33 Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 16 Jan 2024 09:35:32 +1100 Subject: [PATCH 096/368] Add onCacheEntryAdded callback to mutation endpoint in useMutation-fixedCacheKey test --- .../tests/useMutation-fixedCacheKey.test.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 4b1307fb97..8ad50bc816 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -20,6 +20,9 @@ describe('fixedCacheKey', () => { endpoints: (build) => ({ send: build.mutation>({ query: (arg) => arg, + onCacheEntryAdded: (arg) => { + onNewCacheEntry(arg) + }, }), }), }) @@ -359,18 +362,6 @@ describe('fixedCacheKey', () => { }) test('using fixedCacheKey should create a new cache entry', async () => { - api.injectEndpoints({ - overrideExisting: true, - endpoints: (build) => ({ - send: build.mutation>({ - query: (arg) => arg, - onCacheEntryAdded(arg, {}) { - onNewCacheEntry(arg) - }, - }), - }), - }) - render(, { wrapper: storeRef.wrapper, }) From b9d10345be478da12086a6dacecbd12eeeff68fd Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 16 Jan 2024 10:34:17 +1100 Subject: [PATCH 097/368] enhanceEnpoints mock for onCacheEntryAdded functionality and cleanup within test scope --- .../tests/useMutation-fixedCacheKey.test.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 8ad50bc816..05505540a7 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -20,9 +20,6 @@ describe('fixedCacheKey', () => { endpoints: (build) => ({ send: build.mutation>({ query: (arg) => arg, - onCacheEntryAdded: (arg) => { - onNewCacheEntry(arg) - }, }), }), }) @@ -362,6 +359,14 @@ describe('fixedCacheKey', () => { }) test('using fixedCacheKey should create a new cache entry', async () => { + api.enhanceEndpoints({ + endpoints: { + send: { + onCacheEntryAdded: (arg) => onNewCacheEntry(arg), + }, + }, + }) + render(, { wrapper: storeRef.wrapper, }) @@ -377,5 +382,13 @@ describe('fixedCacheKey', () => { }) expect(onNewCacheEntry).toHaveBeenCalledWith('C1') + + api.enhanceEndpoints({ + endpoints: { + send: { + onCacheEntryAdded: undefined, + }, + }, + }) }) }) From 8e45462bf589e653b7d327deab4100b954b30aeb Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 16 Jan 2024 10:36:13 +1100 Subject: [PATCH 098/368] yarn format on cacheLifecycle.ts --- .../toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts index 54caab83b3..f4a8e9bd64 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts @@ -251,10 +251,10 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ } } - function getCacheKey(action: any) { + function getCacheKey(action: any) { if (isQueryThunk(action)) return action.meta.arg.queryCacheKey if (isMutationThunk(action)) { - return action.meta.arg.fixedCacheKey ?? action.meta.requestId; + return action.meta.arg.fixedCacheKey ?? action.meta.requestId } if (api.internalActions.removeQueryResult.match(action)) return action.payload.queryCacheKey From 17f43b5dc7414691c174c3352fa13b6a9eae5cf3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 18:53:38 -0600 Subject: [PATCH 099/368] Add more scenarios to test for `createReducerBuilder` --- .../__testfixtures__/basic-ts.input.ts | 25 ++++++++++-- .../__testfixtures__/basic-ts.output.ts | 38 +++++++++++++++++-- .../__testfixtures__/basic.input.js | 25 ++++++++++-- .../__testfixtures__/basic.output.js | 32 ++++++++++++++-- 4 files changed, 108 insertions(+), 12 deletions(-) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts index 981b79f96e..8ce71abc07 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts @@ -16,12 +16,31 @@ createReducer(todoInitialState, { [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, - [todoRemoved]: todoAdapter.removeOne, - todoAdded: todoAdapter.addOne + [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => action.payload, + [todoAdded1c + 'test']: (state:TodoSliceState, action: PayloadAction) => { + // stuff + }, + [todoAdded1d](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded1e]: function(state: TodoSliceState, action: PayloadAction) { + // stuff + }, + todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { + //stuff + }, + [todoAdded1g]: someFunc, + todoAdded1h: todoAdapter.removeOne, }) createReducer(todoInitialState, { - [todoAdded](state: TodoSliceState, action: PayloadAction) { + [todoAdded2a]: (state: TodoSliceState, action: PayloadAction) => { + // stuff + }, + [todoAdded2b](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded2c]: function(state: TodoSliceState, action: PayloadAction) { // stuff } }) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts index 78368bb273..1ba27c4d1f 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts @@ -17,12 +17,44 @@ createReducer(todoInitialState, (builder) => { // stuff }); - builder.addCase(todoRemoved, todoAdapter.removeOne); - builder.addCase(todoAdded, todoAdapter.addOne); + builder.addCase( + todoAdded1b, + (state: TodoSliceState, action: PayloadAction) => action.payload + ); + + builder.addCase( + todoAdded1c + 'test', + (state:TodoSliceState, action: PayloadAction) => { + // stuff + } + ); + + builder.addCase(todoAdded1d, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded1e, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded1f, (state: TodoSliceState, action: PayloadAction) => { + //stuff + }); + + builder.addCase(todoAdded1g, someFunc); + builder.addCase(todoAdded1h, todoAdapter.removeOne); }) createReducer(todoInitialState, (builder) => { - builder.addCase(todoAdded, (state: TodoSliceState, action: PayloadAction) => { + builder.addCase(todoAdded2a, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded2b, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded2c, (state: TodoSliceState, action: PayloadAction) => { // stuff }); }) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js index 9808f18a2a..07a8d1ceaa 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js @@ -8,12 +8,31 @@ createReducer(todoInitialState, { [todoAdded1a]: (state, action) => { // stuff }, - [todoRemoved]: todoAdapter.removeOne, - todoAdded: todoAdapter.addOne + [todoAdded1b]: (state, action) => action.payload, + [todoAdded1c + 'test']: (state, action) => { + // stuff + }, + [todoAdded1d](state, action) { + // stuff + }, + [todoAdded1e]: function (state, action) { + // stuff + }, + todoAdded1f: (state, action) => { + //stuff + }, + [todoAdded1g]: someFunc, + todoAdded1h: todoAdapter.removeOne, }); createReducer(todoInitialState, { - [todoAdded](state, action) { + [todoAdded2a]: (state, action) => { + // stuff + }, + [todoAdded2b](state, action) { + // stuff + }, + [todoAdded2c]: function (state, action) { // stuff } }); diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js index c33abf1b40..036c404773 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js @@ -9,12 +9,38 @@ createReducer(todoInitialState, (builder) => { // stuff }); - builder.addCase(todoRemoved, todoAdapter.removeOne); - builder.addCase(todoAdded, todoAdapter.addOne); + builder.addCase(todoAdded1b, (state, action) => action.payload); + + builder.addCase(todoAdded1c + 'test', (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1d, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1e, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1f, (state, action) => { + //stuff + }); + + builder.addCase(todoAdded1g, someFunc); + builder.addCase(todoAdded1h, todoAdapter.removeOne); }); createReducer(todoInitialState, (builder) => { - builder.addCase(todoAdded, (state, action) => { + builder.addCase(todoAdded2a, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded2b, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded2c, (state, action) => { // stuff }); }); From d07c47b449b681451036938e60efee33f2f59dfe Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 19:19:37 -0600 Subject: [PATCH 100/368] Add more scenarios to test for `createSliceBuilder` --- .../__testfixtures__/basic-ts.input.ts | 6 ++- .../__testfixtures__/basic-ts.output.ts | 6 ++- .../__testfixtures__/basic.input.js | 6 ++- .../__testfixtures__/basic.output.js | 6 ++- .../__testfixtures__/basic-ts.input.ts | 32 +++++++++++-- .../__testfixtures__/basic-ts.output.ts | 45 ++++++++++++++++++- .../__testfixtures__/basic.input.js | 26 ++++++++++- .../__testfixtures__/basic.output.js | 32 +++++++++++++ 8 files changed, 145 insertions(+), 14 deletions(-) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts index 8ce71abc07..8e61fcefa3 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts @@ -12,6 +12,8 @@ const todoInitialState = todoAdapter.getInitialState() export type TodoSliceState = typeof todoInitialState +const { addOne } = todoAdapter + createReducer(todoInitialState, { [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff @@ -29,8 +31,8 @@ createReducer(todoInitialState, { todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { //stuff }, - [todoAdded1g]: someFunc, - todoAdded1h: todoAdapter.removeOne, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne, }) createReducer(todoInitialState, { diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts index 1ba27c4d1f..a913aa729c 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts @@ -12,6 +12,8 @@ const todoInitialState = todoAdapter.getInitialState() export type TodoSliceState = typeof todoInitialState +const { addOne } = todoAdapter + createReducer(todoInitialState, (builder) => { builder.addCase(todoAdded1a, (state: TodoSliceState, action: PayloadAction) => { // stuff @@ -41,8 +43,8 @@ createReducer(todoInitialState, (builder) => { //stuff }); - builder.addCase(todoAdded1g, someFunc); - builder.addCase(todoAdded1h, todoAdapter.removeOne); + builder.addCase(todoAdded1g, addOne); + builder.addCase(todoAdded1h, todoAdapter.addOne); }) createReducer(todoInitialState, (builder) => { diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js index 07a8d1ceaa..05897a30f3 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.input.js @@ -4,6 +4,8 @@ export const todoAdapter = createEntityAdapter(); const todoInitialState = todoAdapter.getInitialState(); +const { addOne } = todoAdapter; + createReducer(todoInitialState, { [todoAdded1a]: (state, action) => { // stuff @@ -21,8 +23,8 @@ createReducer(todoInitialState, { todoAdded1f: (state, action) => { //stuff }, - [todoAdded1g]: someFunc, - todoAdded1h: todoAdapter.removeOne, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne, }); createReducer(todoInitialState, { diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js index 036c404773..410186ab05 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic.output.js @@ -4,6 +4,8 @@ export const todoAdapter = createEntityAdapter(); const todoInitialState = todoAdapter.getInitialState(); +const { addOne } = todoAdapter; + createReducer(todoInitialState, (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff @@ -27,8 +29,8 @@ createReducer(todoInitialState, (builder) => { //stuff }); - builder.addCase(todoAdded1g, someFunc); - builder.addCase(todoAdded1h, todoAdapter.removeOne); + builder.addCase(todoAdded1g, addOne); + builder.addCase(todoAdded1h, todoAdapter.addOne); }); createReducer(todoInitialState, (builder) => { diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts index 6a549e0974..600b625912 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.input.ts @@ -1,9 +1,9 @@ -import type { PayloadAction } from '@reduxjs/toolkit' +import type { PayloadAction } from '@reduxjs/toolkit'; import { createAsyncThunk, createEntityAdapter, createSlice -} from '@reduxjs/toolkit' +} from '@reduxjs/toolkit'; export interface Todo { id: string @@ -30,6 +30,8 @@ export const incrementAsync = createAsyncThunk( } ) +const { addOne } = todoAdapter + const todoSlice = createSlice({ name: 'todo', initialState: todoInitialState, @@ -44,7 +46,31 @@ const todoSlice = createSlice({ // stuff }, [incrementAsync.rejected]: todoAdapter.removeAll, - todoAdded: todoAdapter.addOne + [incrementAsync.fulfilled]( + state: TodoSliceState, + action: PayloadAction) { + // stuff + }, + todoAdded: todoAdapter.addOne, + + [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { + // stuff + }, + [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => action.payload, + [todoAdded1c + 'test']: (state:TodoSliceState, action: PayloadAction) => { + // stuff + }, + [todoAdded1d](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded1e]: function(state: TodoSliceState, action: PayloadAction) { + // stuff + }, + todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { + //stuff + }, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne, } }) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts index 1258a0088c..de45f86075 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic-ts.output.ts @@ -1,9 +1,9 @@ -import type { PayloadAction } from '@reduxjs/toolkit' +import type { PayloadAction } from '@reduxjs/toolkit'; import { createAsyncThunk, createEntityAdapter, createSlice -} from '@reduxjs/toolkit' +} from '@reduxjs/toolkit'; export interface Todo { id: string @@ -30,6 +30,8 @@ export const incrementAsync = createAsyncThunk( } ) +const { addOne } = todoAdapter + const todoSlice = createSlice({ name: 'todo', initialState: todoInitialState, @@ -47,7 +49,46 @@ const todoSlice = createSlice({ ); builder.addCase(incrementAsync.rejected, todoAdapter.removeAll); + + builder.addCase( + incrementAsync.fulfilled, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ); + builder.addCase(todoAdded, todoAdapter.addOne); + + builder.addCase(todoAdded1a, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase( + todoAdded1b, + (state: TodoSliceState, action: PayloadAction) => action.payload + ); + + builder.addCase( + todoAdded1c + 'test', + (state:TodoSliceState, action: PayloadAction) => { + // stuff + } + ); + + builder.addCase(todoAdded1d, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded1e, (state: TodoSliceState, action: PayloadAction) => { + // stuff + }); + + builder.addCase(todoAdded1f, (state: TodoSliceState, action: PayloadAction) => { + //stuff + }); + + builder.addCase(todoAdded1g, addOne); + builder.addCase(todoAdded1h, todoAdapter.addOne); } }) diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js index 333e077e6f..65a12ca914 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.input.js @@ -13,6 +13,8 @@ export const incrementAsync = createAsyncThunk('counter/fetchCount', async (amou return response.data; }); +const { addOne } = todoAdapter; + const todoSlice = createSlice({ name: 'todo', initialState: todoInitialState, @@ -24,7 +26,29 @@ const todoSlice = createSlice({ // stuff }, [incrementAsync.rejected]: todoAdapter.removeAll, - todoAdded: todoAdapter.addOne + [incrementAsync.fulfilled](state, action) { + // stuff + }, + todoAdded: todoAdapter.addOne, + + [todoAdded1a]: (state, action) => { + // stuff + }, + [todoAdded1b]: (state, action) => action.payload, + [todoAdded1c + 'test']: (state, action) => { + // stuff + }, + [todoAdded1d](state, action) { + // stuff + }, + [todoAdded1e]: function (state, action) { + // stuff + }, + todoAdded1f: (state, action) => { + //stuff + }, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne, } }); diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js index 5c3e6c39cb..f1adcf7169 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js +++ b/packages/rtk-codemods/transforms/createSliceBuilder/__testfixtures__/basic.output.js @@ -13,6 +13,8 @@ export const incrementAsync = createAsyncThunk('counter/fetchCount', async (amou return response.data; }); +const { addOne } = todoAdapter; + const todoSlice = createSlice({ name: 'todo', initialState: todoInitialState, @@ -27,7 +29,37 @@ const todoSlice = createSlice({ }); builder.addCase(incrementAsync.rejected, todoAdapter.removeAll); + + builder.addCase(incrementAsync.fulfilled, (state, action) => { + // stuff + }); + builder.addCase(todoAdded, todoAdapter.addOne); + + builder.addCase(todoAdded1a, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1b, (state, action) => action.payload); + + builder.addCase(todoAdded1c + 'test', (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1d, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1e, (state, action) => { + // stuff + }); + + builder.addCase(todoAdded1f, (state, action) => { + //stuff + }); + + builder.addCase(todoAdded1g, addOne); + builder.addCase(todoAdded1h, todoAdapter.addOne); } }); From 3a811e7d3c0f17b4c683456e8ac410331b387ed4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 19:28:59 -0600 Subject: [PATCH 101/368] Revert "Refactor build command to fix NPM execution error" This reverts commit 569b69d5c649356916d06497b0de924312358725. --- examples/publish-ci/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 04bb41f415..978330d661 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "build": "cd android && chmod +x gradlew && gradlew bundleRelease --no-daemon && cd .. && react-native build-android", + "build": "cd android && chmod +x ./gradlew && ./gradlew bundleRelease --no-daemon && cd .. && react-native build-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", From 5c9e94ac9b3ff862a4a713f51da462b95a2c949d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:22:02 -0600 Subject: [PATCH 102/368] Copy `README.md` from react-native-template-redux-typescript --- examples/publish-ci/react-native/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/publish-ci/react-native/README.md b/examples/publish-ci/react-native/README.md index 8bd066df02..2d3d3a8d69 100644 --- a/examples/publish-ci/react-native/README.md +++ b/examples/publish-ci/react-native/README.md @@ -1,4 +1,12 @@ -This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). +# React Native Template Redux TypeScript + +The official Redux+TS template for React Native. + +## :arrow_forward: Usage + +```sh +npx react-native init MyApp --template react-native-template-redux-typescript +``` # Getting Started @@ -13,7 +21,9 @@ To start Metro, run the following command from the _root_ of your React Native p ```bash # using npm npm start +``` +```bash # OR using Yarn yarn start ``` @@ -27,7 +37,9 @@ Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _roo ```bash # using npm npm run android +``` +```bash # OR using Yarn yarn android ``` @@ -37,7 +49,9 @@ yarn android ```bash # using npm npm run ios +``` +```bash # OR using Yarn yarn ios ``` @@ -76,4 +90,4 @@ To learn more about React Native, take a look at the following resources: - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. -- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. +- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. --> From 85a6006875c039063b16ce6cbbd3d9c8c4e6e6fa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:43:00 -0600 Subject: [PATCH 103/368] Copy `.eslintrc.json` from react-native-template-redux-typescript --- .../publish-ci/react-native/.eslintrc.json | 30 ++++++++++--------- .../publish-ci/react-native/.prettierrc.json | 4 +-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/examples/publish-ci/react-native/.eslintrc.json b/examples/publish-ci/react-native/.eslintrc.json index b44d5dd6e8..637496f99b 100644 --- a/examples/publish-ci/react-native/.eslintrc.json +++ b/examples/publish-ci/react-native/.eslintrc.json @@ -2,31 +2,33 @@ "extends": [ "eslint:recommended", "@react-native", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/strict-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked", - "plugin:react/jsx-runtime" + "plugin:react/jsx-runtime", + "prettier" ], - "ignorePatterns": ["node_modules", ".vscode", "dist", "metro.config.js"], "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": true, - "tsconfigRootDir": "./" - }, + "parserOptions": { "project": true, "tsconfigRootDir": "./" }, "plugins": ["@typescript-eslint"], "root": true, "rules": { "@typescript-eslint/consistent-type-imports": [ + 2, + { "fixStyle": "separate-type-imports" } + ], + "@typescript-eslint/no-restricted-imports": [ 2, { - "fixStyle": "separate-type-imports" + "paths": [ + { + "name": "react-redux", + "importNames": ["useSelector", "useStore", "useDispatch"], + "message": "Please use pre-typed versions from `src/app/hooks.ts` instead." + } + ] } ] }, "overrides": [ - { - "files": ["./__tests__/**/*.ts", "./__tests__/**/*.tsx"], - "env": { "jest": true } - } + { "files": ["*.{c,m,}{t,j}s", "*.{t,j}sx"] }, + { "files": ["*{test,spec}.{t,j}s?(x)"], "env": { "jest": true } } ] } diff --git a/examples/publish-ci/react-native/.prettierrc.json b/examples/publish-ci/react-native/.prettierrc.json index 18b9c97f02..33d2cfa3f6 100644 --- a/examples/publish-ci/react-native/.prettierrc.json +++ b/examples/publish-ci/react-native/.prettierrc.json @@ -1,4 +1,4 @@ { - "semi": false, - "arrowParens": "avoid" + "arrowParens": "avoid", + "semi": false } From 4aa79bed734d8b2ab7bb1dd2265f80a1cdfe60f9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:43:55 -0600 Subject: [PATCH 104/368] Copy `package.json` from react-native-template-redux-typescript --- examples/publish-ci/react-native/package.json | 4 ++-- examples/publish-ci/react-native/yarn.lock | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index 978330d661..edadd871f7 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -8,7 +8,7 @@ "ios": "react-native run-ios", "lint": "eslint .", "lint:fix": "eslint --fix .", - "format": "prettier --write \"./**/*.{js,ts,jsx,tsx,mjs,cts,md}\"", + "format": "prettier --write .", "start": "react-native start", "test": "jest", "type-check": "tsc --noEmit" @@ -22,7 +22,6 @@ "devDependencies": { "@babel/core": "^7.23.7", "@babel/preset-env": "^7.23.8", - "@babel/preset-typescript": "^7.23.3", "@babel/runtime": "^7.23.8", "@react-native/babel-preset": "^0.73.19", "@react-native/eslint-config": "^0.74.0", @@ -36,6 +35,7 @@ "@typescript-eslint/parser": "^6.18.1", "babel-jest": "^29.7.0", "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "prettier": "^3.2.1", diff --git a/examples/publish-ci/react-native/yarn.lock b/examples/publish-ci/react-native/yarn.lock index 355bb65595..c2ec55e15a 100644 --- a/examples/publish-ci/react-native/yarn.lock +++ b/examples/publish-ci/react-native/yarn.lock @@ -1544,7 +1544,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.3": +"@babel/preset-typescript@npm:^7.13.0": version: 7.23.3 resolution: "@babel/preset-typescript@npm:7.23.3" dependencies: @@ -4469,6 +4469,17 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^9.1.0": + version: 9.1.0 + resolution: "eslint-config-prettier@npm:9.1.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907 + languageName: node + linkType: hard + "eslint-plugin-eslint-comments@npm:^3.2.0": version: 3.2.0 resolution: "eslint-plugin-eslint-comments@npm:3.2.0" @@ -7954,7 +7965,6 @@ __metadata: dependencies: "@babel/core": ^7.23.7 "@babel/preset-env": ^7.23.8 - "@babel/preset-typescript": ^7.23.3 "@babel/runtime": ^7.23.8 "@react-native/babel-preset": ^0.73.19 "@react-native/eslint-config": ^0.74.0 @@ -7969,6 +7979,7 @@ __metadata: "@typescript-eslint/parser": ^6.18.1 babel-jest: ^29.7.0 eslint: ^8.56.0 + eslint-config-prettier: ^9.1.0 eslint-plugin-prettier: ^5.1.3 jest: ^29.7.0 prettier: ^3.2.1 From 510c1312e360dff1186f19deceb633289983beea Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:45:11 -0600 Subject: [PATCH 105/368] Copy `store.ts` from react-native-template-redux-typescript --- examples/publish-ci/react-native/src/app/store.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/publish-ci/react-native/src/app/store.ts b/examples/publish-ci/react-native/src/app/store.ts index 992d89bd35..9de880233d 100644 --- a/examples/publish-ci/react-native/src/app/store.ts +++ b/examples/publish-ci/react-native/src/app/store.ts @@ -10,6 +10,8 @@ const rootReducer = combineSlices(counterSlice, quotesApiSlice) // Infer the `RootState` type from the root reducer export type RootState = ReturnType +// The store setup is wrapped in `makeStore` to allow reuse +// when setting up tests that need the same store config export const makeStore = (preloadedState?: Partial) => { const store = configureStore({ reducer: rootReducer, From 15c6e79505cc16f18fed52fd1770261073b131ca Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:45:39 -0600 Subject: [PATCH 106/368] Format all files --- .../AppIcon.appiconset/Contents.json | 62 +++++++++---------- .../Images.xcassets/Contents.json | 6 +- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json index 81213230de..ddd7fca89e 100644 --- a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,53 +1,53 @@ { - "images" : [ + "images": [ { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" + "idiom": "iphone", + "scale": "2x", + "size": "20x20" }, { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" + "idiom": "iphone", + "scale": "3x", + "size": "20x20" }, { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" + "idiom": "iphone", + "scale": "2x", + "size": "29x29" }, { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" + "idiom": "iphone", + "scale": "3x", + "size": "29x29" }, { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" + "idiom": "iphone", + "scale": "2x", + "size": "40x40" }, { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" + "idiom": "iphone", + "scale": "3x", + "size": "40x40" }, { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" + "idiom": "iphone", + "scale": "2x", + "size": "60x60" }, { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" + "idiom": "iphone", + "scale": "3x", + "size": "60x60" }, { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" + "idiom": "ios-marketing", + "scale": "1x", + "size": "1024x1024" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } } diff --git a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json index 2d92bd53fd..97a8662ebd 100644 --- a/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json +++ b/examples/publish-ci/react-native/ios/reduxTemplate/Images.xcassets/Contents.json @@ -1,6 +1,6 @@ { - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } } From 3e186d6f08bd8377c40eb4c5948e242ff076d1fb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 15 Jan 2024 20:59:58 -0600 Subject: [PATCH 107/368] Copy `.gitignore` from react-native-template-redux-typescript --- examples/publish-ci/react-native/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/publish-ci/react-native/.gitignore b/examples/publish-ci/react-native/.gitignore index 922b340f0a..b89bf60930 100644 --- a/examples/publish-ci/react-native/.gitignore +++ b/examples/publish-ci/react-native/.gitignore @@ -65,3 +65,6 @@ yarn-error.log # testing /coverage + +#IDE +.vscode From 84bb0399ab856c68eabf1a3e786222bbe48f22cd Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 16 Jan 2024 10:16:25 +0000 Subject: [PATCH 108/368] fix caching bug and add test --- packages/toolkit/src/createSlice.ts | 4 +-- .../toolkit/src/tests/createSlice.test.ts | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index c9f03d2d6a..f3d26e8e3d 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -740,7 +740,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { const selectSelf = (state: State) => state const injectedSelectorCache = new Map< - string, + boolean, WeakMap< (rootState: any) => State | undefined, Record any> @@ -784,7 +784,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { function getSelectors( selectState: (rootState: any) => State = selectSelf ) { - const selectorCache = emplace(injectedSelectorCache, reducerPath, { + const selectorCache = emplace(injectedSelectorCache, injected, { insert: () => new WeakMap(), }) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 7a16d32e16..3d71fc4b6a 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -596,6 +596,36 @@ describe('createSlice', () => { (slice.getInitialState() + 1) * 2 ) }) + it('avoids incorrectly caching selectors', () => { + const slice = createSlice({ + name: 'counter', + reducerPath: 'injected', + initialState: 42, + reducers: { + increment: (state) => ++state, + }, + selectors: { + selectMultiple: (state, multiplier: number) => state * multiplier, + }, + }) + expect(slice.getSelectors()).toBe(slice.getSelectors()) + const combinedReducer = combineSlices({ + static: slice.reducer, + }).withLazyLoadedSlices>() + + const injected = slice.injectInto(combinedReducer) + + expect(injected.getSelectors()).not.toBe(slice.getSelectors()) + + expect(injected.getSelectors().selectMultiple(undefined, 1)).toBe(42) + + expect(() => + // @ts-expect-error + slice.getSelectors().selectMultiple(undefined, 1) + ).toThrowErrorMatchingInlineSnapshot( + `[Error: selectState returned undefined for an uninjected slice reducer]` + ) + }) }) describe('reducers definition with asyncThunks', () => { it('is disabled by default', () => { From df9ece4a00ce39c45505c74f756ad0fb96583cf7 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 16 Jan 2024 10:22:59 +0000 Subject: [PATCH 109/368] avoid as any --- packages/toolkit/src/createSlice.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index f3d26e8e3d..3bbe4e98c5 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -761,14 +761,14 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { return _reducer.getInitialState() } - function makeSelectorProps( - reducerPath: ReducerPath, + function makeSelectorProps( + reducerPath: CurrentReducerPath, injected = false ): Pick< - Slice, + Slice, 'getSelectors' | 'selectors' | 'selectSlice' | 'reducerPath' > { - function selectSlice(state: { [K in ReducerPath]: State }) { + function selectSlice(state: { [K in CurrentReducerPath]: State }) { let sliceState = state[reducerPath] if (typeof sliceState === 'undefined') { if (injected) { @@ -827,7 +827,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { injectable.inject({ reducerPath: newReducerPath, reducer }, config) return { ...slice, - ...makeSelectorProps(newReducerPath as any, true), + ...makeSelectorProps(newReducerPath, true), } as any }, } From 4b76e93d23e0db6c5f4175a45493166c4d12085f Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 16 Jan 2024 11:47:44 +0000 Subject: [PATCH 110/368] further clarification in test --- packages/toolkit/src/tests/createSlice.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 3d71fc4b6a..957d5949cf 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -625,6 +625,15 @@ describe('createSlice', () => { ).toThrowErrorMatchingInlineSnapshot( `[Error: selectState returned undefined for an uninjected slice reducer]` ) + + const injected2 = slice.injectInto(combinedReducer, { + reducerPath: 'other', + }) + + // can use same cache for localised selectors + expect(injected.getSelectors()).toBe(injected2.getSelectors()) + // these should be different + expect(injected.selectors).not.toBe(injected2.selectors) }) }) describe('reducers definition with asyncThunks', () => { From 100cd0ec034abc868833bd04daf6c99c4b76cd56 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 16 Jan 2024 13:01:14 -0600 Subject: [PATCH 111/368] Slightly modify CLI to allow passing multiple glob patterns --- packages/rtk-codemods/bin/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-codemods/bin/cli.js b/packages/rtk-codemods/bin/cli.js index 28828aecfc..53a0f8b819 100755 --- a/packages/rtk-codemods/bin/cli.js +++ b/packages/rtk-codemods/bin/cli.js @@ -30,7 +30,7 @@ execaSync( extensions, ...(process.argv.slice(3).length === 1 ? globbySync(process.argv[3]) - : process.argv.slice(3)) + : globbySync(process.argv.slice(3))) ], { stdio: 'inherit', From 0f065ec6407cf0f423b11eca83144c30ceff1363 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 16 Jan 2024 13:02:36 -0600 Subject: [PATCH 112/368] Update dev dependencies --- packages/rtk-codemods/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index d1ab834b47..6663583857 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/jscodeshift": "^0.11.11", - "@typescript-eslint/parser": "^6.18.1", + "@typescript-eslint/parser": "^6.19.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-node": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index 503c71e3f2..65ab83a3ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6995,7 +6995,7 @@ __metadata: resolution: "@reduxjs/rtk-codemods@workspace:packages/rtk-codemods" dependencies: "@types/jscodeshift": ^0.11.11 - "@typescript-eslint/parser": ^6.18.1 + "@typescript-eslint/parser": ^6.19.0 eslint: ^8.56.0 eslint-config-prettier: ^9.1.0 eslint-plugin-node: ^11.1.0 From 2837b254bfc83cbc3d65d706cd8ded9e4d5cbc38 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 16 Jan 2024 13:03:49 -0600 Subject: [PATCH 113/368] Remove leading forward slash from test names --- packages/rtk-codemods/transformTestUtils.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/rtk-codemods/transformTestUtils.ts b/packages/rtk-codemods/transformTestUtils.ts index 8efb12b041..2d4be2c0b8 100644 --- a/packages/rtk-codemods/transformTestUtils.ts +++ b/packages/rtk-codemods/transformTestUtils.ts @@ -15,9 +15,10 @@ export const runTransformTest = ( describe(name, () => { globbySync('**/*.input.*', { cwd: fixturePath, - absolute: true + absolute: true, + objectMode: true }) - .map((entry) => entry.slice(fixturePath.length)) + .map((entry) => entry.name) .forEach((filename) => { const extension = path.extname(filename) const testName = filename.replace(`.input${extension}`, '') @@ -31,16 +32,20 @@ export const runTransformTest = ( `${testName}.output${extension}` ) - describe(testName, () => { + const inputFileContent = fs.readFileSync(inputPath, 'utf8') + + const expectedOutput = fs.readFileSync(outputPath, 'utf8') + + describe(`${testName}${extension}`, () => { it('transforms correctly', () => { runInlineTest( transform, {}, { path: testInputPath, - source: fs.readFileSync(inputPath, 'utf8') + source: inputFileContent }, - fs.readFileSync(outputPath, 'utf8'), + expectedOutput, { parser } ) }) @@ -51,9 +56,9 @@ export const runTransformTest = ( {}, { path: testInputPath, - source: fs.readFileSync(outputPath, 'utf8') + source: inputFileContent }, - fs.readFileSync(outputPath, 'utf8'), + expectedOutput, { parser } ) }) From 27fe9075f3f90f7d0fadf4d41fa2e9cbec248510 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 16 Jan 2024 13:20:22 -0600 Subject: [PATCH 114/368] Update all `README`s --- packages/rtk-codemods/README.md | 1 + .../transforms/createReducerBuilder/README.md | 212 +++++++-- .../transforms/createSliceBuilder/README.md | 429 +++++++++++++++--- .../createSliceReducerBuilder/README.md | 204 ++++++++- 4 files changed, 737 insertions(+), 109 deletions(-) diff --git a/packages/rtk-codemods/README.md b/packages/rtk-codemods/README.md index be04f2b53b..ab7f117881 100644 --- a/packages/rtk-codemods/README.md +++ b/packages/rtk-codemods/README.md @@ -27,6 +27,7 @@ node ./bin/cli.js path/of/files/ or/some**/*glob.js - [createReducerBuilder](transforms/createReducerBuilder/README.md) - [createSliceBuilder](transforms/createSliceBuilder/README.md) +- [createSliceReducerBuilder](transforms/createSliceReducerBuilder/README.md) ## Contributing diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/README.md b/packages/rtk-codemods/transforms/createReducerBuilder/README.md index 52898146e9..a50d10d582 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/README.md +++ b/packages/rtk-codemods/transforms/createReducerBuilder/README.md @@ -31,38 +31,159 @@ node ./bin/cli.js createReducerBuilder path/of/files/ or/some**/*glob.js ## +--- +
**basic-ts** **Input** ([basic-ts.input.ts](transforms\createReducerBuilder__testfixtures__\basic-ts.input.ts)): ```ts -createReducer(initialState, { - [todoAdded]: (state: SliceState, action: PayloadAction) => { +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const { addOne } = todoAdapter + +createReducer(todoInitialState, { + [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, -}); + [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => + action.payload, + [todoAdded1c + 'test']: ( + state: TodoSliceState, + action: PayloadAction + ) => { + // stuff + }, + [todoAdded1d](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded1e]: function ( + state: TodoSliceState, + action: PayloadAction + ) { + // stuff + }, + todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { + //stuff + }, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne +}) -createReducer(initialState, { - [todoAdded](state: SliceState, action: PayloadAction) { +createReducer(todoInitialState, { + [todoAdded2a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, -}); + [todoAdded2b](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded2c]: function ( + state: TodoSliceState, + action: PayloadAction + ) { + // stuff + } +}) ``` **Output** ([basic-ts.output.ts](transforms\createReducerBuilder__testfixtures__\basic-ts.output.ts)): ```ts -createReducer(initialState, (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); -}); - -createReducer(initialState, (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); -}); +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const { addOne } = todoAdapter + +createReducer(todoInitialState, (builder) => { + builder.addCase( + todoAdded1a, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1b, + (state: TodoSliceState, action: PayloadAction) => action.payload + ) + + builder.addCase( + todoAdded1c + 'test', + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1d, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1e, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1f, + (state: TodoSliceState, action: PayloadAction) => { + //stuff + } + ) + + builder.addCase(todoAdded1g, addOne) + builder.addCase(todoAdded1h, todoAdapter.addOne) +}) + +createReducer(todoInitialState, (builder) => { + builder.addCase( + todoAdded2a, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded2b, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded2c, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) +}) ``` --- @@ -72,7 +193,15 @@ createReducer(initialState, (builder) => { **Input** ([basic.input.js](transforms\createReducerBuilder__testfixtures__\basic.input.js)): ```js -createReducer(initialState, { +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +const { addOne } = todoAdapter + +createReducer(todoInitialState, { [todoAdded1a]: (state, action) => { // stuff }, @@ -89,9 +218,11 @@ createReducer(initialState, { todoAdded1f: (state, action) => { //stuff }, -}); + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne +}) -createReducer(initialState, { +createReducer(todoInitialState, { [todoAdded2a]: (state, action) => { // stuff }, @@ -100,50 +231,61 @@ createReducer(initialState, { }, [todoAdded2c]: function (state, action) { // stuff - }, -}); + } +}) ``` **Output** ([basic.output.js](transforms\createReducerBuilder__testfixtures__\basic.output.js)): ```js -createReducer(initialState, (builder) => { +import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +const { addOne } = todoAdapter + +createReducer(todoInitialState, (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff - }); + }) - builder.addCase(todoAdded1b, (state, action) => action.payload); + builder.addCase(todoAdded1b, (state, action) => action.payload) builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1d, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1e, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1f, (state, action) => { //stuff - }); -}); + }) + + builder.addCase(todoAdded1g, addOne) + builder.addCase(todoAdded1h, todoAdapter.addOne) +}) -createReducer(initialState, (builder) => { +createReducer(todoInitialState, (builder) => { builder.addCase(todoAdded2a, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2b, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2c, (state, action) => { // stuff - }); -}); + }) +}) ``` diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/README.md b/packages/rtk-codemods/transforms/createSliceBuilder/README.md index 5a15c86682..725d80a4fa 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/README.md +++ b/packages/rtk-codemods/transforms/createSliceBuilder/README.md @@ -31,56 +31,254 @@ node ./bin/cli.js createSliceBuilder path/of/files/ or/some**/*glob.js ## +--- + **basic-ts** **Input** ([basic-ts.input.ts](transforms\createSliceBuilder__testfixtures__\basic-ts.input.ts)): ```ts -const slice1 = createSlice({ - name: 'a', - initialState, +import type { PayloadAction } from '@reduxjs/toolkit' +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + return response.data + } +) + +const { addOne } = todoAdapter + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + reducers: { + deleteTodo: todoAdapter.removeOne + }, extraReducers: { - [todoAdded]: (state: SliceState, action: PayloadAction) => { + [incrementAsync.pending]: ( + state: TodoSliceState, + action: PayloadAction + ) => { // stuff }, - }, -}); + [incrementAsync.rejected]: todoAdapter.removeAll, + [incrementAsync.fulfilled]( + state: TodoSliceState, + action: PayloadAction + ) { + // stuff + }, + todoAdded: todoAdapter.addOne, -const slice2 = createSlice({ - name: 'b', - initialState, - extraReducers: { - [todoAdded](state: SliceState, action: PayloadAction) { + [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, - }, -}); + [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => + action.payload, + [todoAdded1c + 'test']: ( + state: TodoSliceState, + action: PayloadAction + ) => { + // stuff + }, + [todoAdded1d](state: TodoSliceState, action: PayloadAction) { + // stuff + }, + [todoAdded1e]: function ( + state: TodoSliceState, + action: PayloadAction + ) { + // stuff + }, + todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { + //stuff + }, + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne + } +}) + +export const { deleteTodo } = todoSlice.actions + +export interface CounterSliceState { + value: number + status: 'idle' | 'loading' | 'failed' +} + +const counterInitialState: CounterSliceState = { + value: 0, + status: 'idle' +} + +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, + extraReducers: { + [deleteTodo](state: CounterSliceState, action: PayloadAction) { + // stuff + } + } +}) ``` **Output** ([basic-ts.output.ts](transforms\createSliceBuilder__testfixtures__\basic-ts.output.ts)): ```ts -const slice1 = createSlice({ - name: 'a', - initialState, - - extraReducers: (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); +import type { PayloadAction } from '@reduxjs/toolkit' +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +export type TodoSliceState = typeof todoInitialState + +const fetchCount = (amount = 1) => { + return new Promise<{ data: number }>((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount: number) => { + const response = await fetchCount(amount) + return response.data + } +) + +const { addOne } = todoAdapter + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + + reducers: { + deleteTodo: todoAdapter.removeOne }, -}); -const slice2 = createSlice({ - name: 'b', - initialState, + extraReducers: (builder) => { + builder.addCase( + incrementAsync.pending, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase(incrementAsync.rejected, todoAdapter.removeAll) + + builder.addCase( + incrementAsync.fulfilled, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase(todoAdded, todoAdapter.addOne) + + builder.addCase( + todoAdded1a, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1b, + (state: TodoSliceState, action: PayloadAction) => action.payload + ) + + builder.addCase( + todoAdded1c + 'test', + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1d, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1e, + (state: TodoSliceState, action: PayloadAction) => { + // stuff + } + ) + + builder.addCase( + todoAdded1f, + (state: TodoSliceState, action: PayloadAction) => { + //stuff + } + ) + + builder.addCase(todoAdded1g, addOne) + builder.addCase(todoAdded1h, todoAdapter.addOne) + } +}) + +export const { deleteTodo } = todoSlice.actions + +export interface CounterSliceState { + value: number + status: 'idle' | 'loading' | 'failed' +} + +const counterInitialState: CounterSliceState = { + value: 0, + status: 'idle' +} + +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, extraReducers: (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); - }, -}); + builder.addCase( + deleteTodo, + (state: CounterSliceState, action: PayloadAction) => { + // stuff + } + ) + } +}) ``` --- @@ -90,10 +288,48 @@ const slice2 = createSlice({ **Input** ([basic.input.js](transforms\createSliceBuilder__testfixtures__\basic.input.js)): ```js -const slice1 = createSlice({ - name: 'a', - initialState: {}, +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +const fetchCount = (amount = 1) => { + return new Promise((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount) => { + const response = await fetchCount(amount) + return response.data + } +) + +const { addOne } = todoAdapter + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + reducers: { + deleteTodo: todoAdapter.removeOne + }, extraReducers: { + [incrementAsync.pending]: (state, action) => { + // stuff + }, + [incrementAsync.rejected]: todoAdapter.removeAll, + [incrementAsync.fulfilled](state, action) { + // stuff + }, + todoAdded: todoAdapter.addOne, + [todoAdded1a]: (state, action) => { // stuff }, @@ -110,76 +346,123 @@ const slice1 = createSlice({ todoAdded1f: (state, action) => { //stuff }, - }, -}); + [todoAdded1g]: addOne, + todoAdded1h: todoAdapter.addOne + } +}) -const slice2 = createSlice({ - name: 'b', - initialState: {}, +export const { deleteTodo } = todoSlice.actions + +const counterInitialState = { + value: 0, + status: 'idle' +} + +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, extraReducers: { - [todoAdded2a]: (state, action) => { + [deleteTodo](state, action) { // stuff - }, - [todoAdded2b](state, action) { - // stuff - }, - [todoAdded2c]: function (state, action) { - // stuff - }, - }, -}); + } + } +}) ``` **Output** ([basic.output.js](transforms\createSliceBuilder__testfixtures__\basic.output.js)): ```js -const slice1 = createSlice({ - name: 'a', - initialState: {}, +import { + createAsyncThunk, + createEntityAdapter, + createSlice +} from '@reduxjs/toolkit' + +export const todoAdapter = createEntityAdapter() + +const todoInitialState = todoAdapter.getInitialState() + +const fetchCount = (amount = 1) => { + return new Promise((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ) +} + +export const incrementAsync = createAsyncThunk( + 'counter/fetchCount', + async (amount) => { + const response = await fetchCount(amount) + return response.data + } +) + +const { addOne } = todoAdapter + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoInitialState, + + reducers: { + deleteTodo: todoAdapter.removeOne + }, extraReducers: (builder) => { + builder.addCase(incrementAsync.pending, (state, action) => { + // stuff + }) + + builder.addCase(incrementAsync.rejected, todoAdapter.removeAll) + + builder.addCase(incrementAsync.fulfilled, (state, action) => { + // stuff + }) + + builder.addCase(todoAdded, todoAdapter.addOne) + builder.addCase(todoAdded1a, (state, action) => { // stuff - }); + }) - builder.addCase(todoAdded1b, (state, action) => action.payload); + builder.addCase(todoAdded1b, (state, action) => action.payload) builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1d, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1e, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1f, (state, action) => { //stuff - }); - }, -}); + }) -const slice2 = createSlice({ - name: 'b', - initialState: {}, + builder.addCase(todoAdded1g, addOne) + builder.addCase(todoAdded1h, todoAdapter.addOne) + } +}) - extraReducers: (builder) => { - builder.addCase(todoAdded2a, (state, action) => { - // stuff - }); +export const { deleteTodo } = todoSlice.actions - builder.addCase(todoAdded2b, (state, action) => { - // stuff - }); +const counterInitialState = { + value: 0, + status: 'idle' +} - builder.addCase(todoAdded2c, (state, action) => { +const counterSlice = createSlice({ + name: 'counter', + initialState: counterInitialState, + + extraReducers: (builder) => { + builder.addCase(deleteTodo, (state, action) => { // stuff - }); - }, -}); + }) + } +}) ``` diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md b/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md index cafb0c9d48..f6a959db00 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md @@ -26,7 +26,209 @@ node ./bin/cli.js createSliceReducerBuilder path/of/files/ or/some**/*glob.js ## Input / Output + +- [basic-ts](#basic-ts) +- [basic](#basic) - +## + +**basic-ts** + +**Input** ([basic-ts.input.ts](transforms\createSliceReducerBuilder__testfixtures__\basic-ts.input.ts)): + +```ts +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload(): any { + throw new Error('Function not implemented.') +} + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), + reducers: { + property: () => {}, + method(state, action: PayloadAction) { + todoAdapter.addOne(state, action) + }, + identifier: todoAdapter.removeOne, + preparedProperty: { + prepare: (todo: Omit) => ({ + payload: { id: nanoid(), ...todo } + }), + reducer: () => {} + }, + preparedMethod: { + prepare(todo: Omit) { + return { payload: { id: nanoid(), ...todo } } + }, + reducer(state, action: PayloadAction) { + todoAdapter.addOne(state, action) + } + }, + preparedIdentifier: { + prepare: withPayload(), + reducer: todoAdapter.setMany + } + } +}) +``` + +**Output** ([basic-ts.output.ts](transforms\createSliceReducerBuilder__testfixtures__\basic-ts.output.ts)): + +```ts +import type { PayloadAction } from '@reduxjs/toolkit' +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload(): any { + throw new Error('Function not implemented.') +} + +export interface Todo { + id: string + title: string +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), + + reducers: (create) => ({ + property: create.reducer(() => {}), + + method: create.reducer((state, action: PayloadAction) => { + todoAdapter.addOne(state, action) + }), + + identifier: create.reducer(todoAdapter.removeOne), + + preparedProperty: create.preparedReducer( + (todo: Omit) => ({ + payload: { id: nanoid(), ...todo } + }), + () => {} + ), + + preparedMethod: create.preparedReducer( + (todo: Omit) => { + return { payload: { id: nanoid(), ...todo } } + }, + (state, action: PayloadAction) => { + todoAdapter.addOne(state, action) + } + ), + + preparedIdentifier: create.preparedReducer( + withPayload(), + todoAdapter.setMany + ) + }) +}) +``` + +--- + +**basic** + +**Input** ([basic.input.js](transforms\createSliceReducerBuilder__testfixtures__\basic.input.js)): + +```js +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload() { + throw new Error('Function not implemented.') +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), + reducers: { + property: () => {}, + method(state, action) { + todoAdapter.addOne(state, action) + }, + identifier: todoAdapter.removeOne, + preparedProperty: { + prepare: (todo) => ({ + payload: { id: nanoid(), ...todo } + }), + reducer: () => {} + }, + preparedMethod: { + prepare(todo) { + return { payload: { id: nanoid(), ...todo } } + }, + reducer(state, action) { + todoAdapter.addOne(state, action) + } + }, + preparedIdentifier: { + prepare: withPayload(), + reducer: todoAdapter.setMany + } + } +}) +``` + +**Output** ([basic.output.js](transforms\createSliceReducerBuilder__testfixtures__\basic.output.js)): + +```js +import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' + +function withPayload() { + throw new Error('Function not implemented.') +} + +export const todoAdapter = createEntityAdapter() + +const todoSlice = createSlice({ + name: 'todo', + initialState: todoAdapter.getInitialState(), + + reducers: (create) => ({ + property: create.reducer(() => {}), + + method: create.reducer((state, action) => { + todoAdapter.addOne(state, action) + }), + + identifier: create.reducer(todoAdapter.removeOne), + + preparedProperty: create.preparedReducer( + (todo) => ({ + payload: { id: nanoid(), ...todo } + }), + () => {} + ), + + preparedMethod: create.preparedReducer( + (todo) => { + return { payload: { id: nanoid(), ...todo } } + }, + (state, action) => { + todoAdapter.addOne(state, action) + } + ), + + preparedIdentifier: create.preparedReducer( + withPayload(), + todoAdapter.setMany + ) + }) +}) +``` + From dc5db44a2fe9ef1a1e93d0bd0174bf457fa91075 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 16 Jan 2024 13:21:16 -0600 Subject: [PATCH 115/368] Remove unnecessary `update-docs` command --- packages/rtk-codemods/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 6663583857..aa40d3a8ec 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -4,8 +4,7 @@ "scripts": { "lint": "eslint .", "test": "vitest", - "test:coverage": "vitest --coverage", - "update-docs": "codemod-cli update-docs" + "test:coverage": "vitest --coverage" }, "bin": "./bin/cli.js", "files": [ From 710c25efa4a4d2de6c6616137e03863c3bb7a16d Mon Sep 17 00:00:00 2001 From: Hamza Date: Wed, 17 Jan 2024 06:50:11 +0900 Subject: [PATCH 116/368] fix grammar in redux and redux toolkit comparison --- docs/introduction/why-rtk-is-redux-today.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/introduction/why-rtk-is-redux-today.md b/docs/introduction/why-rtk-is-redux-today.md index 8f4e918032..a8d3f23119 100644 --- a/docs/introduction/why-rtk-is-redux-today.md +++ b/docs/introduction/why-rtk-is-redux-today.md @@ -29,7 +29,7 @@ See these pages to learn how to use "modern Redux" with Redux Toolkit: ::: -## How Redux Toolkit Is Different Than the Redux Core +## How Redux Toolkit Is Different From the Redux Core ### What Is "Redux"? From 77a04f3244283cd2f572e3d3fb67fc417069d806 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 03:00:28 -0600 Subject: [PATCH 117/368] Update `tsconfig.typetests.json` include all TS files --- packages/toolkit/src/tests/tsconfig.typetests.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index 5fe2280ed9..9a8923ca89 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.test.json", "compilerOptions": { - "skipLibCheck": true, - "rootDir": "../../src" + "skipLibCheck": true }, - "include": ["../dynamicMiddleware", "../entities", "../listenerMiddleware"] + "include": ["../**/*.ts*"] } From 713449f3845896dfbd06f2b8788fb6d1393dd82a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 03:05:37 -0600 Subject: [PATCH 118/368] Update lockfile entry for Reselect --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 91870e084e..f50f2e668e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26063,9 +26063,9 @@ fsevents@^1.2.7: linkType: hard "reselect@npm:^5.0.1": - version: 5.0.1 - resolution: "reselect@npm:5.0.1" - checksum: 7663b4c28a0e908e74dc25262e1d813d028b9c2ee96160cb0f40a16f09c5ac632fa16af6bafede7eb0ff16ab2d5bea2cd8814d9a9488e0262b8317fef90b1dc0 + version: 5.1.0 + resolution: "reselect@npm:5.1.0" + checksum: 5bc9c5d03d7caea00d0c0e24330bf23d91801227346fec1cef6a60988ab8d3dd7cee76e6994ca0915bc1c20845bb2bd929b95753763e0a9db74c0f9dff5cb845 languageName: node linkType: hard From 21259f0b81a9c5a9e449c216cde48c8346f9e154 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 03:20:05 -0600 Subject: [PATCH 119/368] Exclude query from tsconfig --- packages/toolkit/src/tests/tsconfig.typetests.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json index 9a8923ca89..d75271e8b6 100644 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ b/packages/toolkit/src/tests/tsconfig.typetests.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.test.json", "compilerOptions": { - "skipLibCheck": true + "skipLibCheck": true, }, - "include": ["../**/*.ts*"] + "include": ["../**/*.ts*"], + "exclude": ["../query"] } From 6a936dfd79f9caff59fae8aeadd6cc11dd23e736 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 03:35:55 -0600 Subject: [PATCH 120/368] Remove `typescript` from root `package.json` --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 4022306807..b74971a475 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,7 @@ "type-fest": "2.19.0", "console-testing-library@0.6.1": "patch:console-testing-library@npm%3A0.6.1#./.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch", "@typescript-eslint/eslint-plugin": "6.12.0", - "@typescript-eslint/parser": "6.12.0", - "typescript": "5.2.2" + "@typescript-eslint/parser": "6.12.0" }, "scripts": { "build": "yarn build:packages", From 29325860ca1c3d35b9bafa8b89fd137e24eb11fa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 03:44:01 -0600 Subject: [PATCH 121/368] Update lockfile --- yarn.lock | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index f50f2e668e..b438c38a96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29284,7 +29284,17 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@npm:5.2.2": +"typescript@npm:4.1.3": + version: 4.1.3 + resolution: "typescript@npm:4.1.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 0a25f7d7cebbc5ad23f41cb30918643460477be265bd3bcd400ffedb77d16e97d46f2b0c31393b2f990c5cf5b9f7a829ad6aff8636988b8f30abf81c656237c0 + languageName: node + linkType: hard + +"typescript@npm:5.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" bin: @@ -29294,7 +29304,57 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.2.2#~builtin": +"typescript@npm:^4.1.3, typescript@npm:^4.3.4, typescript@npm:^4.8.0, typescript@npm:^4.9, typescript@npm:~4.9": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db + languageName: node + linkType: hard + +"typescript@npm:^5.0.0, typescript@npm:^5.2.2": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 + languageName: node + linkType: hard + +"typescript@npm:~4.2.4": + version: 4.2.4 + resolution: "typescript@npm:4.2.4" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 89c397df192f239359ad798b96d8e8d552e12c0c189ac5676cec4c20c410d6eec636b8e59a88f2aef0a56d961a9678d99c400099be9b7cae2f7b062eb4b7b171 + languageName: node + linkType: hard + +"typescript@npm:~4.3.2": + version: 4.3.5 + resolution: "typescript@npm:4.3.5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: bab033b5e2b0790dd35b77fd005df976ef80b8d84fd2c6e63cc31808151875beae9216e5a315fe7068e8499905c3c354248fe83272cdfc13b7705635f0c66c97 + languageName: node + linkType: hard + +"typescript@patch:typescript@4.1.3#~builtin": + version: 4.1.3 + resolution: "typescript@patch:typescript@npm%3A4.1.3#~builtin::version=4.1.3&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ed3df76d9b6efb448e5e73bca671698cda353a3807199ad95c78782a857e7685ccc94b799ac885423ced65ee21c87cbbeb823642c5dfd715efae5ebbc6137070 + languageName: node + linkType: hard + +"typescript@patch:typescript@5.2#~builtin": version: 5.2.2 resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=701156" bin: @@ -29304,6 +29364,46 @@ fsevents@^1.2.7: languageName: node linkType: hard +"typescript@patch:typescript@^4.1.3#~builtin, typescript@patch:typescript@^4.3.4#~builtin, typescript@patch:typescript@^4.8.0#~builtin, typescript@patch:typescript@^4.9#~builtin, typescript@patch:typescript@~4.9#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 + languageName: node + linkType: hard + +"typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: f61375590b3162599f0f0d5b8737877ac0a7bc52761dbb585d67e7b8753a3a4c42d9a554c4cc929f591ffcf3a2b0602f65ae3ce74714fd5652623a816862b610 + languageName: node + linkType: hard + +"typescript@patch:typescript@~4.2.4#~builtin": + version: 4.2.4 + resolution: "typescript@patch:typescript@npm%3A4.2.4#~builtin::version=4.2.4&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: eb86e0e8022e5297f7a7b871b6edfbf33b57049416ada8bf97c358760125c7c79f074fbebd1b8e8230f858ae05eb22ad0e805e8f6acd5eae1fa886681624c15e + languageName: node + linkType: hard + +"typescript@patch:typescript@~4.3.2#~builtin": + version: 4.3.5 + resolution: "typescript@patch:typescript@npm%3A4.3.5#~builtin::version=4.3.5&hash=701156" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 365df18cf979c971ef9543b2acaa8694377a803f98e1804c41d0ede0b09d7046cb0cd98f2eaf3884b0fe923c01a60af1f653841bd8805c9715d5479c09a4ebe4 + languageName: node + linkType: hard + "ua-parser-js@npm:^0.7.18": version: 0.7.28 resolution: "ua-parser-js@npm:0.7.28" From f28c9e7e3709b7add9a541c840d5ba3cbd061e0f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 04:15:43 -0600 Subject: [PATCH 122/368] Bump `@arethetypeswrong/cli` to latest version - This change was made because the previous version of `@arethetypeswrong/cli` was not compatible with TypeScript version 5.3.3 --- packages/toolkit/package.json | 2 +- yarn.lock | 62 ++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index df55536609..b1886243ff 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -49,7 +49,7 @@ } }, "devDependencies": { - "@arethetypeswrong/cli": "^0.13.1", + "@arethetypeswrong/cli": "^0.13.5", "@microsoft/api-extractor": "^7.13.2", "@phryneas/ts-version": "^1.0.2", "@size-limit/preset-small-lib": "^4.11.0", diff --git a/yarn.lock b/yarn.lock index b438c38a96..a94cd57d06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -263,11 +263,11 @@ __metadata: languageName: node linkType: hard -"@arethetypeswrong/cli@npm:^0.13.1": - version: 0.13.1 - resolution: "@arethetypeswrong/cli@npm:0.13.1" +"@arethetypeswrong/cli@npm:^0.13.5": + version: 0.13.5 + resolution: "@arethetypeswrong/cli@npm:0.13.5" dependencies: - "@arethetypeswrong/core": 0.13.0 + "@arethetypeswrong/core": 0.13.5 chalk: ^4.1.2 cli-table3: ^0.6.3 commander: ^10.0.1 @@ -276,20 +276,21 @@ __metadata: semver: ^7.5.4 bin: attw: dist/index.js - checksum: a200d2c5cd6f6245e4e2afa3a1ea98eb588a4d2a2cf7e6b76c92451d430c7c1bdcd5075e5ab6f9929dcdea36dd072fdcdb32ef085609e40c801ab40cbc96100b + checksum: 6fe8ff6f529bbdd9427172bfb8a796d741aa17d0ba50cfa402f68cca8d288c0ada2e96d5ed01590da4d035da755e6156476e74e3d4c9fdfac1328a882ba61559 languageName: node linkType: hard -"@arethetypeswrong/core@npm:0.13.0": - version: 0.13.0 - resolution: "@arethetypeswrong/core@npm:0.13.0" +"@arethetypeswrong/core@npm:0.13.5": + version: 0.13.5 + resolution: "@arethetypeswrong/core@npm:0.13.5" dependencies: "@andrewbranch/untar.js": ^1.0.3 fflate: ^0.7.4 semver: ^7.5.4 - typescript: ^5.2.2 + ts-expose-internals-conditionally: 1.0.0-empty.0 + typescript: 5.3.3 validate-npm-package-name: ^5.0.0 - checksum: cfe30a1ca0259ae6021971f155f9cba83a8329144eeac00164db680d4e46ad244b3f4bfb47b972bc19117dd3c72f2885e74b8cc1d1edc95e95960f090908efd6 + checksum: f44d99cd453668aa1b171ebc6a05f2e3745f599effabbafbbca702a2f87b449eb73b8ea1db25a268affdff561493f807ae18f58297b7116b1a19396568709a88 languageName: node linkType: hard @@ -7017,7 +7018,7 @@ __metadata: version: 0.0.0-use.local resolution: "@reduxjs/toolkit@workspace:packages/toolkit" dependencies: - "@arethetypeswrong/cli": ^0.13.1 + "@arethetypeswrong/cli": ^0.13.5 "@microsoft/api-extractor": ^7.13.2 "@phryneas/ts-version": ^1.0.2 "@size-limit/preset-small-lib": ^4.11.0 @@ -28987,6 +28988,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"ts-expose-internals-conditionally@npm:1.0.0-empty.0": + version: 1.0.0-empty.0 + resolution: "ts-expose-internals-conditionally@npm:1.0.0-empty.0" + checksum: 6b4f546fc59f04f68d579f1bc0704541ec17521f84d32a15b45bef5dbc7a787143a065e19541cc5b64ff494f16f223bce59f3f5bf10ec538e5739e23c0efb878 + languageName: node + linkType: hard + "ts-interface-checker@npm:^0.1.9": version: 0.1.13 resolution: "ts-interface-checker@npm:0.1.13" @@ -29304,23 +29312,23 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@npm:^4.1.3, typescript@npm:^4.3.4, typescript@npm:^4.8.0, typescript@npm:^4.9, typescript@npm:~4.9": - version: 4.9.5 - resolution: "typescript@npm:4.9.5" +"typescript@npm:5.3.3, typescript@npm:^5.0.0, typescript@npm:^5.2.2": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db + checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 languageName: node linkType: hard -"typescript@npm:^5.0.0, typescript@npm:^5.2.2": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:^4.1.3, typescript@npm:^4.3.4, typescript@npm:^4.8.0, typescript@npm:^4.9, typescript@npm:~4.9": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db languageName: node linkType: hard @@ -29364,23 +29372,23 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@patch:typescript@^4.1.3#~builtin, typescript@patch:typescript@^4.3.4#~builtin, typescript@patch:typescript@^4.8.0#~builtin, typescript@patch:typescript@^4.9#~builtin, typescript@patch:typescript@~4.9#~builtin": - version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=701156" +"typescript@patch:typescript@5.3.3#~builtin, typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 + checksum: f61375590b3162599f0f0d5b8737877ac0a7bc52761dbb585d67e7b8753a3a4c42d9a554c4cc929f591ffcf3a2b0602f65ae3ce74714fd5652623a816862b610 languageName: node linkType: hard -"typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" +"typescript@patch:typescript@^4.1.3#~builtin, typescript@patch:typescript@^4.3.4#~builtin, typescript@patch:typescript@^4.8.0#~builtin, typescript@patch:typescript@^4.9#~builtin, typescript@patch:typescript@~4.9#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: f61375590b3162599f0f0d5b8737877ac0a7bc52761dbb585d67e7b8753a3a4c42d9a554c4cc929f591ffcf3a2b0602f65ae3ce74714fd5652623a816862b610 + checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 languageName: node linkType: hard From 11894182434b83b6d26c3afdb51bd152fe422e1e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 04:25:20 -0600 Subject: [PATCH 123/368] Update TypeScript version from 5.2 -> ^5.2.2 --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b74971a475..0e5ad40414 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "prettier": "^2.2.1", "release-it": "^14.12.5", "serve": "^14.2.0", - "typescript": "5.2" + "typescript": "^5.2.2" }, "resolutions": { "@babel/core": "7.19.3", diff --git a/yarn.lock b/yarn.lock index a94cd57d06..eeaa6a54a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26490,7 +26490,7 @@ fsevents@^1.2.7: prettier: ^2.2.1 release-it: ^14.12.5 serve: ^14.2.0 - typescript: 5.2 + typescript: ^5.2.2 languageName: unknown linkType: soft From de7aca478ebb1080b8ff4ed45aa1ca62782e98ac Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 04:53:00 -0600 Subject: [PATCH 124/368] Remove `jscodeshift` from root resolutions --- package.json | 1 - yarn.lock | 640 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 610 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 4022306807..b8ab86d07a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "esbuild": "0.19.7", "jest-snapshot": "29.3.1", "msw": "patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752", - "jscodeshift": "0.13.1", "react-redux": "npm:8.0.2", "react": "npm:18.2.0", "react-dom": "npm:18.2.0", diff --git a/yarn.lock b/yarn.lock index 65ab83a3ba..739ca7c713 100644 --- a/yarn.lock +++ b/yarn.lock @@ -373,6 +373,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d + languageName: node + linkType: hard + "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.16.7" @@ -424,6 +433,25 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6": + version: 7.23.7 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.7" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-member-expression-to-functions": ^7.23.0 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.20 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 33e60714b856c3816a7965d4c76278cc8f430644a2dfc4eeafad2f7167c4fbd2becdb74cbfeb04b02efd6bbd07176ef53c6683262b588e65d378438e9c55c26b + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.16.7, @babel/helper-create-regexp-features-plugin@npm:^7.17.12": version: 7.17.12 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.17.12" @@ -489,6 +517,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + "@babel/helper-explode-assignable-expression@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-explode-assignable-expression@npm:7.16.7" @@ -517,6 +552,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": ^7.22.15 + "@babel/types": ^7.23.0 + checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 + languageName: node + linkType: hard + "@babel/helper-hoist-variables@npm:^7.16.7, @babel/helper-hoist-variables@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-hoist-variables@npm:7.18.6" @@ -535,6 +580,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.22.15, @babel/helper-member-expression-to-functions@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" + dependencies: + "@babel/types": ^7.23.0 + checksum: 494659361370c979ada711ca685e2efe9460683c36db1b283b446122596602c901e291e09f2f980ecedfe6e0f2bd5386cb59768285446530df10c14df1024e75 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-module-imports@npm:7.18.6" @@ -544,6 +598,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-module-imports@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: ecd7e457df0a46f889228f943ef9b4a47d485d82e030676767e6a2fdcbdaa63594d8124d4b55fd160b41c201025aec01fc27580352b1c87a37c9c6f33d116702 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.18.0, @babel/helper-module-transforms@npm:^7.18.6, @babel/helper-module-transforms@npm:^7.19.0": version: 7.19.0 resolution: "@babel/helper-module-transforms@npm:7.19.0" @@ -560,6 +623,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/helper-module-transforms@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.16.7, @babel/helper-optimise-call-expression@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-optimise-call-expression@npm:7.18.6" @@ -569,6 +647,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-optimise-call-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:7.10.4": version: 7.10.4 resolution: "@babel/helper-plugin-utils@npm:7.10.4" @@ -590,6 +677,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: c0fc7227076b6041acd2f0e818145d2e8c41968cc52fb5ca70eed48e21b8fe6dd88a0a91cbddf4951e33647336eb5ae184747ca706817ca3bef5e9e905151ff5 + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.16.8": version: 7.16.8 resolution: "@babel/helper-remap-async-to-generator@npm:7.16.8" @@ -641,6 +735,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-simple-access@npm:7.18.6" @@ -650,6 +757,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-simple-access@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: fe9686714caf7d70aedb46c3cce090f8b915b206e09225f1e4dbc416786c2fdbbee40b38b23c268b7ccef749dd2db35f255338fb4f2444429874d900dede5ad2 + languageName: node + linkType: hard + "@babel/helper-skip-transparent-expression-wrappers@npm:^7.16.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.18.9" @@ -659,6 +775,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-split-export-declaration@npm:7.18.6" @@ -668,6 +793,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" + dependencies: + "@babel/types": ^7.22.5 + checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.18.10": version: 7.18.10 resolution: "@babel/helper-string-parser@npm:7.18.10" @@ -682,6 +816,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-validator-option@npm:7.18.6" @@ -689,6 +830,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.22.15": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + "@babel/helper-wrap-function@npm:^7.16.8": version: 7.16.8 resolution: "@babel/helper-wrap-function@npm:7.16.8" @@ -744,7 +892,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.0.0, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.19.3, @babel/parser@npm:^7.3.3": +"@babel/parser@npm:^7.0.0, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.19.3, @babel/parser@npm:^7.3.3": version: 7.19.4 resolution: "@babel/parser@npm:7.19.4" bin: @@ -753,6 +901,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0": + version: 7.23.6 + resolution: "@babel/parser@npm:7.23.6" + bin: + parser: ./bin/babel-parser.js + checksum: 140801c43731a6c41fd193f5c02bc71fd647a0360ca616b23d2db8be4b9739b9f951a03fc7c2db4f9b9214f4b27c1074db0f18bc3fa653783082d5af7c8860d5 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.17.12": version: 7.17.12 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.17.12" @@ -840,7 +997,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.16.0, @babel/plugin-proposal-class-properties@npm:^7.17.12, @babel/plugin-proposal-class-properties@npm:^7.18.6": +"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.16.0, @babel/plugin-proposal-class-properties@npm:^7.17.12, @babel/plugin-proposal-class-properties@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -990,7 +1147,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.16.0, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.17.12, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.16.0, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.17.12, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" dependencies: @@ -1093,7 +1250,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.16.0, @babel/plugin-proposal-optional-chaining@npm:^7.17.12, @babel/plugin-proposal-optional-chaining@npm:^7.18.9": +"@babel/plugin-proposal-optional-chaining@npm:^7.16.0, @babel/plugin-proposal-optional-chaining@npm:^7.17.12, @babel/plugin-proposal-optional-chaining@npm:^7.18.9": version: 7.18.9 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.18.9" dependencies: @@ -1270,6 +1427,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-flow@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c6e6f355d6ace5f4a9e7bb19f1fed2398aeb9b62c4c671a189d81b124f9f5bb77c4225b6e85e19339268c60a021c1e49104e450375de5e6bb70612190d9678af + languageName: node + linkType: hard + "@babel/plugin-syntax-import-assertions@npm:^7.17.12": version: 7.17.12 resolution: "@babel/plugin-syntax-import-assertions@npm:7.17.12" @@ -1347,6 +1515,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 89037694314a74e7f0e7a9c8d3793af5bf6b23d80950c29b360db1c66859d67f60711ea437e70ad6b5b4b29affe17eababda841b6c01107c2b638e0493bafb4e + languageName: node + linkType: hard + "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" @@ -1446,6 +1625,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-typescript@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: abfad3a19290d258b028e285a1f34c9b8a0cbe46ef79eafed4ed7ffce11b5d0720b5e536c82f91cbd8442cde35a3dd8e861fa70366d87ff06fdc0d4756e30876 + languageName: node + linkType: hard + "@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.17.12": version: 7.17.12 resolution: "@babel/plugin-transform-arrow-functions@npm:7.17.12" @@ -1538,6 +1728,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-class-properties@npm:^7.22.5": + version: 7.23.3 + resolution: "@babel/plugin-transform-class-properties@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9c6f8366f667897541d360246de176dd29efc7a13d80a5b48361882f7173d9173be4646c3b7d9b003ccc0e01e25df122330308f33db921fa553aa17ad544b3fc + languageName: node + linkType: hard + "@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.17.12": version: 7.18.4 resolution: "@babel/plugin-transform-classes@npm:7.18.4" @@ -1701,6 +1903,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-flow-strip-types@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-flow": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: de38cc5cf948bc19405ea041292181527a36f59f08d787a590415fac36e9b0c7992f0d3e2fd3b9402089bafdaa1a893291a0edf15beebfd29bdedbbe582fee9b + languageName: node + linkType: hard + "@babel/plugin-transform-for-of@npm:^7.0.0, @babel/plugin-transform-for-of@npm:^7.18.1": version: 7.18.1 resolution: "@babel/plugin-transform-for-of@npm:7.18.1" @@ -1819,7 +2033,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.18.2, @babel/plugin-transform-modules-commonjs@npm:^7.18.6": +"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.18.2, @babel/plugin-transform-modules-commonjs@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.18.6" dependencies: @@ -1833,6 +2047,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 720a231ceade4ae4d2632478db4e7fecf21987d444942b72d523487ac8d715ca97de6c8f415c71e939595e1a4776403e7dc24ed68fe9125ad4acf57753c9bff7 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-systemjs@npm:^7.18.0": version: 7.18.4 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.18.4" @@ -1933,6 +2160,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11": + version: 7.23.4 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a27d73ea134d3d9560a6b2e26ab60012fba15f1db95865aa0153c18f5ec82cfef6a7b3d8df74e3c2fca81534fa5efeb6cacaf7b08bdb7d123e3dafdd079886a3 + languageName: node + linkType: hard + "@babel/plugin-transform-object-super@npm:^7.0.0, @babel/plugin-transform-object-super@npm:^7.16.7": version: 7.16.7 resolution: "@babel/plugin-transform-object-super@npm:7.16.7" @@ -1957,6 +2196,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-optional-chaining@npm:^7.23.0": + version: 7.23.4 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.4" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e7a4c08038288057b7a08d68c4d55396ada9278095509ca51ed8dfb72a7f13f26bdd7c5185de21079fe0a9d60d22c227cb32e300d266c1bda40f70eee9f4bc1e + languageName: node + linkType: hard + "@babel/plugin-transform-parameters@npm:^7.0.0, @babel/plugin-transform-parameters@npm:^7.12.1, @babel/plugin-transform-parameters@npm:^7.17.12": version: 7.17.12 resolution: "@babel/plugin-transform-parameters@npm:7.17.12" @@ -1979,6 +2231,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-private-methods@npm:^7.22.5": + version: 7.23.3 + resolution: "@babel/plugin-transform-private-methods@npm:7.23.3" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: cedc1285c49b5a6d9a3d0e5e413b756ac40b3ac2f8f68bdfc3ae268bc8d27b00abd8bb0861c72756ff5dd8bf1eb77211b7feb5baf4fdae2ebbaabe49b9adc1d0 + languageName: node + linkType: hard + "@babel/plugin-transform-property-literals@npm:^7.0.0, @babel/plugin-transform-property-literals@npm:^7.16.7": version: 7.16.7 resolution: "@babel/plugin-transform-property-literals@npm:7.16.7" @@ -2313,6 +2577,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typescript@npm:^7.23.3": + version: 7.23.6 + resolution: "@babel/plugin-transform-typescript@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0462241843d14dff9f1a4c49ab182a6f01a5f7679957c786b08165dac3e8d49184011f05ca204183d164c54b9d3496d1b3005f904fa8708e394e6f15bf5548e6 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-escapes@npm:^7.16.7": version: 7.16.7 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.16.7" @@ -2529,7 +2807,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-flow@npm:^7.12.1, @babel/preset-flow@npm:^7.13.13": +"@babel/preset-flow@npm:^7.12.1": version: 7.18.6 resolution: "@babel/preset-flow@npm:7.18.6" dependencies: @@ -2542,6 +2820,19 @@ __metadata: languageName: node linkType: hard +"@babel/preset-flow@npm:^7.22.15": + version: 7.23.3 + resolution: "@babel/preset-flow@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-transform-flow-strip-types": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 60b5dde79621ae89943af459c4dc5b6030795f595a20ca438c8100f8d82c9ebc986881719030521ff5925799518ac5aa7f3fe62af8c33ab96be3681a71f88d03 + languageName: node + linkType: hard + "@babel/preset-modules@npm:^0.1.5": version: 0.1.5 resolution: "@babel/preset-modules@npm:0.1.5" @@ -2589,7 +2880,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.12.7, @babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.15.0, @babel/preset-typescript@npm:^7.16.0, @babel/preset-typescript@npm:^7.18.6": +"@babel/preset-typescript@npm:^7.12.7, @babel/preset-typescript@npm:^7.15.0, @babel/preset-typescript@npm:^7.16.0, @babel/preset-typescript@npm:^7.18.6": version: 7.18.6 resolution: "@babel/preset-typescript@npm:7.18.6" dependencies: @@ -2602,18 +2893,33 @@ __metadata: languageName: node linkType: hard -"@babel/register@npm:^7.13.16": - version: 7.18.9 - resolution: "@babel/register@npm:7.18.9" +"@babel/preset-typescript@npm:^7.23.0": + version: 7.23.3 + resolution: "@babel/preset-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 105a2d39bbc464da0f7e1ad7f535c77c5f62d6b410219355b20e552e7d29933567a5c55339b5d0aec1a5c7a0a7dfdf1b54aae601a4fe15a157d54dcbfcb3e854 + languageName: node + linkType: hard + +"@babel/register@npm:^7.22.15": + version: 7.23.7 + resolution: "@babel/register@npm:7.23.7" dependencies: clone-deep: ^4.0.1 find-cache-dir: ^2.0.0 make-dir: ^2.1.0 - pirates: ^4.0.5 + pirates: ^4.0.6 source-map-support: ^0.5.16 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 4aeaff97e061a397f632659082ba86c539ef8194697b236d991c10d1c2ea8f73213d3b5b3b2c24625951a1ef726b7a7d2e70f70ffcb37f79ef0c1a745eebef21 + checksum: c72a6d4856ef04f13490370d805854d2d98a77786bfaec7d85e2c585e1217011c4f3df18197a890e14520906c9111bef95551ba1a9b59c88df4dfc2dfe2c8d1b languageName: node linkType: hard @@ -2666,6 +2972,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/parser": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + languageName: node + linkType: hard + "@babel/traverse@npm:7.19.3": version: 7.19.3 resolution: "@babel/traverse@npm:7.19.3" @@ -10193,6 +10510,19 @@ __metadata: languageName: node linkType: hard +"assert@npm:^2.0.0": + version: 2.1.0 + resolution: "assert@npm:2.1.0" + dependencies: + call-bind: ^1.0.2 + is-nan: ^1.3.2 + object-is: ^1.1.5 + object.assign: ^4.1.4 + util: ^0.12.5 + checksum: 1ed1cabba9abe55f4109b3f7292b4e4f3cf2953aad8dc148c0b3c3bd676675c31b1abb32ef563b7d5a19d1715bf90d1e5f09fad2a4ee655199468902da80f7c2 + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -10223,6 +10553,15 @@ __metadata: languageName: node linkType: hard +"ast-types@npm:^0.16.1": + version: 0.16.1 + resolution: "ast-types@npm:0.16.1" + dependencies: + tslib: ^2.0.1 + checksum: 21c186da9fdb1d8087b1b7dabbc4059f91aa5a1e593a9776b4393cc1eaa857e741b2dda678d20e34b16727b78fef3ab59cf8f0c75ed1ba649c78fe194e5c114b + languageName: node + linkType: hard + "astral-regex@npm:^2.0.0": version: 2.0.0 resolution: "astral-regex@npm:2.0.0" @@ -10317,6 +10656,13 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a + languageName: node + linkType: hard + "axe-core@npm:^4.3.5": version: 4.4.2 resolution: "axe-core@npm:4.4.2" @@ -11383,6 +11729,17 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" + dependencies: + function-bind: ^1.1.2 + get-intrinsic: ^1.2.1 + set-function-length: ^1.1.1 + checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + languageName: node + linkType: hard + "call-me-maybe@npm:^1.0.1": version: 1.0.1 resolution: "call-me-maybe@npm:1.0.1" @@ -13579,6 +13936,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" + dependencies: + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -13596,6 +13964,17 @@ __metadata: languageName: node linkType: hard +"define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: ^1.0.1 + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + "define-property@npm:^0.2.5": version: 0.2.5 resolution: "define-property@npm:0.2.5" @@ -15962,6 +16341,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + "for-in@npm:^1.0.2": version: 1.0.2 resolution: "for-in@npm:1.0.2" @@ -16254,6 +16642,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 + languageName: node + linkType: hard + "function.prototype.name@npm:^1.1.5": version: 1.1.5 resolution: "function.prototype.name@npm:1.1.5" @@ -16344,6 +16739,18 @@ fsevents@^1.2.7: languageName: node linkType: hard +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" + dependencies: + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 + languageName: node + linkType: hard + "get-nonce@npm:^1.0.0": version: 1.0.1 resolution: "get-nonce@npm:1.0.1" @@ -16647,6 +17054,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + "got@npm:11.8.3": version: 11.8.3 resolution: "got@npm:11.8.3" @@ -16862,6 +17278,22 @@ fsevents@^1.2.7: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.1": + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" + dependencies: + get-intrinsic: ^1.2.2 + checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + "has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -16961,6 +17393,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" + dependencies: + function-bind: ^1.1.2 + checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + languageName: node + linkType: hard + "hast-to-hyperscript@npm:^9.0.0": version: 9.0.1 resolution: "hast-to-hyperscript@npm:9.0.1" @@ -17921,6 +18362,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-arguments@npm:^1.0.4": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 7f02700ec2171b691ef3e4d0e3e6c0ba408e8434368504bb593d0d7c891c0dbfda6d19d30808b904a6cb1929bca648c061ba438c39f296c2a8ca083229c49f27 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -17983,6 +18434,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-callable@npm:^1.1.3": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac + languageName: node + linkType: hard + "is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": version: 1.2.4 resolution: "is-callable@npm:1.2.4" @@ -18158,6 +18616,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-generator-function@npm:^1.0.7": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d54644e7dbaccef15ceb1e5d91d680eb5068c9ee9f9eb0a9e04173eb5542c9b51b5ab52c5537f5703e48d5fddfd376817c1ca07a84a407b7115b769d4bdde72b + languageName: node + linkType: hard + "is-glob@npm:4.0.1": version: 4.0.1 resolution: "is-glob@npm:4.0.1" @@ -18232,6 +18699,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-nan@npm:^1.3.2": + version: 1.3.2 + resolution: "is-nan@npm:1.3.2" + dependencies: + call-bind: ^1.0.0 + define-properties: ^1.1.3 + checksum: 5dfadcef6ad12d3029d43643d9800adbba21cf3ce2ec849f734b0e14ee8da4070d82b15fdb35138716d02587c6578225b9a22779cab34888a139cc43e4e3610a + languageName: node + linkType: hard + "is-negative-zero@npm:^2.0.2": version: 2.0.2 resolution: "is-negative-zero@npm:2.0.2" @@ -18477,6 +18954,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-typed-array@npm:^1.1.3": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + "is-typedarray@npm:^1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" @@ -19801,34 +20287,38 @@ fsevents@^1.2.7: languageName: node linkType: hard -"jscodeshift@npm:0.13.1": - version: 0.13.1 - resolution: "jscodeshift@npm:0.13.1" - dependencies: - "@babel/core": ^7.13.16 - "@babel/parser": ^7.13.16 - "@babel/plugin-proposal-class-properties": ^7.13.0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 - "@babel/plugin-proposal-optional-chaining": ^7.13.12 - "@babel/plugin-transform-modules-commonjs": ^7.13.8 - "@babel/preset-flow": ^7.13.13 - "@babel/preset-typescript": ^7.13.0 - "@babel/register": ^7.13.16 +"jscodeshift@npm:^0.15.1": + version: 0.15.1 + resolution: "jscodeshift@npm:0.15.1" + dependencies: + "@babel/core": ^7.23.0 + "@babel/parser": ^7.23.0 + "@babel/plugin-transform-class-properties": ^7.22.5 + "@babel/plugin-transform-modules-commonjs": ^7.23.0 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.22.11 + "@babel/plugin-transform-optional-chaining": ^7.23.0 + "@babel/plugin-transform-private-methods": ^7.22.5 + "@babel/preset-flow": ^7.22.15 + "@babel/preset-typescript": ^7.23.0 + "@babel/register": ^7.22.15 babel-core: ^7.0.0-bridge.0 chalk: ^4.1.2 flow-parser: 0.* graceful-fs: ^4.2.4 - micromatch: ^3.1.10 + micromatch: ^4.0.4 neo-async: ^2.5.0 node-dir: ^0.1.17 - recast: ^0.20.4 + recast: ^0.23.3 temp: ^0.8.4 write-file-atomic: ^2.3.0 peerDependencies: "@babel/preset-env": ^7.1.6 + peerDependenciesMeta: + "@babel/preset-env": + optional: true bin: jscodeshift: bin/jscodeshift.js - checksum: 1c35938de5fc29cafec80e2c37d5c3411f85cd5d40e0243b52f2da0c1ab4b659daddfd62de558eca5d562303616f7838097727b651f4ad8e32b1e96f169cdd76 + checksum: d760dee2b634fa8a4610bdbdf787ce117a9a6bcc73e9ae55a38be77e380698d928d34a375a93ed4685e8bbdecfbd3cdbb87eb4b7e22fc58381db3d59fb554687 languageName: node linkType: hard @@ -22160,6 +22650,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"object-is@npm:^1.1.5": + version: 1.1.5 + resolution: "object-is@npm:1.1.5" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + checksum: 989b18c4cba258a6b74dc1d74a41805c1a1425bce29f6cabb50dcb1a6a651ea9104a1b07046739a49a5bb1bc49727bcb00efd5c55f932f6ea04ec8927a7901fe + languageName: node + linkType: hard + "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -22188,6 +22688,18 @@ fsevents@^1.2.7: languageName: node linkType: hard +"object.assign@npm:^4.1.4": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 + languageName: node + linkType: hard + "object.entries@npm:^1.1.5": version: 1.1.5 resolution: "object.entries@npm:1.1.5" @@ -23033,13 +23545,20 @@ fsevents@^1.2.7: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": +"pirates@npm:^4.0.1, pirates@npm:^4.0.4": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 languageName: node linkType: hard +"pirates@npm:^4.0.6": + version: 4.0.6 + resolution: "pirates@npm:4.0.6" + checksum: 46a65fefaf19c6f57460388a5af9ab81e3d7fd0e7bc44ca59d753cb5c4d0df97c6c6e583674869762101836d68675f027d60f841c105d72734df9dfca97cbcc6 + languageName: node + linkType: hard + "pkg-dir@npm:^3.0.0": version: 3.0.0 resolution: "pkg-dir@npm:3.0.0" @@ -25488,7 +26007,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"recast@npm:^0.20.3, recast@npm:^0.20.4": +"recast@npm:^0.20.3": version: 0.20.5 resolution: "recast@npm:0.20.5" dependencies: @@ -25500,6 +26019,19 @@ fsevents@^1.2.7: languageName: node linkType: hard +"recast@npm:^0.23.3": + version: 0.23.4 + resolution: "recast@npm:0.23.4" + dependencies: + assert: ^2.0.0 + ast-types: ^0.16.1 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: edb63bbe0457e68c0f4892f55413000e92aa7c5c53f9e109ab975d1c801cd299a62511ea72734435791f4aea6f0edf560f6a275761f66b2b6069ff6d72686029 + languageName: node + linkType: hard + "rechoir@npm:^0.6.2": version: 0.6.2 resolution: "rechoir@npm:0.6.2" @@ -26832,6 +27364,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + "semver@npm:^7.0.0, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" @@ -26987,6 +27528,19 @@ fsevents@^1.2.7: languageName: node linkType: hard +"set-function-length@npm:^1.1.1": + version: 1.2.0 + resolution: "set-function-length@npm:1.2.0" + dependencies: + define-data-property: ^1.1.1 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.2 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.1 + checksum: 63e34b45a2ff9abb419f52583481bf8ba597d33c0c85e56999085eb6078a0f7fbb4222051981c287feceeb358aa7789e7803cea2c82ac94c0ab37059596aff79 + languageName: node + linkType: hard + "set-value@npm:^2.0.0, set-value@npm:^2.0.1": version: 2.0.1 resolution: "set-value@npm:2.0.1" @@ -29824,6 +30378,19 @@ fsevents@^1.2.7: languageName: node linkType: hard +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: ^2.0.3 + is-arguments: ^1.0.4 + is-generator-function: ^1.0.7 + is-typed-array: ^1.1.3 + which-typed-array: ^1.1.2 + checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a + languageName: node + linkType: hard + "utila@npm:~0.4": version: 0.4.0 resolution: "utila@npm:0.4.0" @@ -30757,6 +31324,19 @@ fsevents@^1.2.7: languageName: node linkType: hard +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.2": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.4 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 + languageName: node + linkType: hard + "which@npm:^1.2.9, which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" From 3909d69b615a35f7b2553369139265e308beda19 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 06:31:53 -0600 Subject: [PATCH 125/368] Fix `composeWithDevTools` spy --- packages/toolkit/package.json | 2 +- .../toolkit/src/tests/configureStore.test.ts | 61 ++++--------------- 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index b1886243ff..34f89d2f23 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -100,7 +100,7 @@ "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", - "test": "vitest", + "test": "vitest --run", "type-tests": "yarn tsc -p src/tests/tsconfig.typetests.json && yarn tsc -p src/query/tests/tsconfig.typetests.json", "prepack": "yarn build" }, diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index d122395fd8..fb609e4534 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -1,8 +1,8 @@ -import { vi } from 'vitest' +import * as DevTools from '@internal/devtoolsExtension' import type { StoreEnhancer } from '@reduxjs/toolkit' import { Tuple } from '@reduxjs/toolkit' import type * as Redux from 'redux' -import type * as DevTools from '@internal/devtoolsExtension' +import { vi } from 'vitest' vi.doMock('redux', async () => { const redux: any = await vi.importActual('redux') @@ -15,45 +15,10 @@ vi.doMock('redux', async () => { return redux }) -vi.doMock('@internal/devtoolsExtension', async () => { - const devtools: typeof DevTools = await vi.importActual( - '@internal/devtoolsExtension' - ) - vi.spyOn(devtools, 'composeWithDevTools') // @remap-prod-remove-line - return devtools -}) - -function originalReduxCompose(...funcs: Function[]) { - if (funcs.length === 0) { - // infer the argument type so it is usable in inference down the line - return (arg: T) => arg - } - - if (funcs.length === 1) { - return funcs[0] - } - - return funcs.reduce( - (a, b) => - (...args: any) => - a(b(...args)) - ) -} - -function originalComposeWithDevtools() { - if (arguments.length === 0) return undefined - if (typeof arguments[0] === 'object') return originalReduxCompose - return originalReduxCompose.apply(null, arguments as any as Function[]) -} - describe('configureStore', async () => { - // RTK's internal `composeWithDevtools` function isn't publicly exported, - // so we can't mock it. However, it _does_ try to access the global extension method - // attached to `window`. So, if we mock _that_, we'll know if the enhancer ran. - const mockDevtoolsCompose = vi - .fn() - .mockImplementation(originalComposeWithDevtools) - ;(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ = mockDevtoolsCompose + const composeWithDevToolsSpy = vi.spyOn(DevTools, 'composeWithDevTools') + + ;(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ = composeWithDevToolsSpy const redux = await import('redux') @@ -76,7 +41,7 @@ describe('configureStore', async () => { expect.any(Function) ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line }) }) @@ -90,7 +55,7 @@ describe('configureStore', async () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.combineReducers).toHaveBeenCalledWith(reducer) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( expect.any(Function), undefined, @@ -113,7 +78,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith() - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -142,7 +107,7 @@ describe('configureStore', async () => { expect.any(Function), // serializableCheck expect.any(Function) // actionCreatorCheck ) - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -179,7 +144,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(thank), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -234,7 +199,7 @@ describe('configureStore', async () => { Object ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(mockDevtoolsCompose).toHaveBeenCalledWith(options) // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -247,7 +212,7 @@ describe('configureStore', async () => { it('calls createStore with preloadedState', () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -278,7 +243,7 @@ describe('configureStore', async () => { }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(mockDevtoolsCompose).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, From 45aa4615a9fc3ce5738c570414232a3d31e0d24a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 06:40:48 -0600 Subject: [PATCH 126/368] Remove `@remap-prod-remove-line` comments from `configureStore.test.ts` --- .../toolkit/src/tests/configureStore.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index fb609e4534..1d38d19173 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -41,7 +41,7 @@ describe('configureStore', async () => { expect.any(Function) ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() }) }) @@ -55,7 +55,7 @@ describe('configureStore', async () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.combineReducers).toHaveBeenCalledWith(reducer) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( expect.any(Function), undefined, @@ -78,7 +78,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -107,7 +107,7 @@ describe('configureStore', async () => { expect.any(Function), // serializableCheck expect.any(Function) // actionCreatorCheck ) - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -144,7 +144,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(thank), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -199,7 +199,7 @@ describe('configureStore', async () => { Object ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -212,7 +212,7 @@ describe('configureStore', async () => { it('calls createStore with preloadedState', () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -243,7 +243,7 @@ describe('configureStore', async () => { }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, From 850e8f7b717f7fb72a4eead3075e63ff58229a45 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 06:51:14 -0600 Subject: [PATCH 127/368] Revert "Remove `@remap-prod-remove-line` comments from `configureStore.test.ts`" This reverts commit 45aa4615a9fc3ce5738c570414232a3d31e0d24a. --- .../toolkit/src/tests/configureStore.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index 1d38d19173..fb609e4534 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -41,7 +41,7 @@ describe('configureStore', async () => { expect.any(Function) ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line }) }) @@ -55,7 +55,7 @@ describe('configureStore', async () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.combineReducers).toHaveBeenCalledWith(reducer) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( expect.any(Function), undefined, @@ -78,7 +78,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith() - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -107,7 +107,7 @@ describe('configureStore', async () => { expect.any(Function), // serializableCheck expect.any(Function) // actionCreatorCheck ) - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -144,7 +144,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(thank), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -199,7 +199,7 @@ describe('configureStore', async () => { Object ) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) + expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -212,7 +212,7 @@ describe('configureStore', async () => { it('calls createStore with preloadedState', () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -243,7 +243,7 @@ describe('configureStore', async () => { }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, From 489b096d308620cb2c6294abf529b949be2b0a22 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 06:52:54 -0600 Subject: [PATCH 128/368] Fix typo --- packages/toolkit/src/tests/configureStore.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index fb609e4534..1847b1a59d 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -55,7 +55,7 @@ describe('configureStore', async () => { expect(configureStore({ reducer })).toBeInstanceOf(Object) expect(redux.combineReducers).toHaveBeenCalledWith(reducer) expect(redux.applyMiddleware).toHaveBeenCalled() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( expect.any(Function), undefined, @@ -78,7 +78,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith() - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -107,7 +107,7 @@ describe('configureStore', async () => { expect.any(Function), // serializableCheck expect.any(Function) // actionCreatorCheck ) - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, @@ -144,7 +144,7 @@ describe('configureStore', async () => { configureStore({ middleware: () => new Tuple(thank), reducer }) ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) - expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line-line + expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, From 3a5074cd83032e6254a5f9618a5fb1634dcff1b5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 11:37:48 -0600 Subject: [PATCH 129/368] Make TypeScript slightly happier inside `configureStore.test.ts` --- .../toolkit/src/tests/configureStore.test.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index 1847b1a59d..d2ee9bf86e 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -2,10 +2,11 @@ import * as DevTools from '@internal/devtoolsExtension' import type { StoreEnhancer } from '@reduxjs/toolkit' import { Tuple } from '@reduxjs/toolkit' import type * as Redux from 'redux' +import type { MockInstance } from 'vitest' import { vi } from 'vitest' -vi.doMock('redux', async () => { - const redux: any = await vi.importActual('redux') +vi.doMock('redux', async (importOriginal) => { + const redux = await importOriginal() vi.spyOn(redux, 'applyMiddleware') vi.spyOn(redux, 'combineReducers') @@ -15,10 +16,19 @@ vi.doMock('redux', async () => { return redux }) +declare global { + interface Window { + __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: MockInstance< + Parameters, + ReturnType + > + } +} + describe('configureStore', async () => { const composeWithDevToolsSpy = vi.spyOn(DevTools, 'composeWithDevTools') - ;(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ = composeWithDevToolsSpy + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ = composeWithDevToolsSpy const redux = await import('redux') From 5cc0eb284fd6811bf384fb3a0990d9a9a8b8add1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:04:30 -0600 Subject: [PATCH 130/368] Remove extra tsconfig files --- packages/toolkit/src/query/tests/tsconfig.json | 3 --- .../toolkit/src/query/tests/tsconfig.typetests.json | 6 ------ packages/toolkit/src/tests/tsconfig.json | 3 --- packages/toolkit/src/tests/tsconfig.typetests.json | 8 -------- packages/toolkit/tsconfig.build.json | 8 ++++++++ packages/toolkit/tsconfig.json | 13 ------------- 6 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 packages/toolkit/src/query/tests/tsconfig.json delete mode 100644 packages/toolkit/src/query/tests/tsconfig.typetests.json delete mode 100644 packages/toolkit/src/tests/tsconfig.json delete mode 100644 packages/toolkit/src/tests/tsconfig.typetests.json create mode 100644 packages/toolkit/tsconfig.build.json delete mode 100644 packages/toolkit/tsconfig.json diff --git a/packages/toolkit/src/query/tests/tsconfig.json b/packages/toolkit/src/query/tests/tsconfig.json deleted file mode 100644 index 105334e225..0000000000 --- a/packages/toolkit/src/query/tests/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.test.json" -} diff --git a/packages/toolkit/src/query/tests/tsconfig.typetests.json b/packages/toolkit/src/query/tests/tsconfig.typetests.json deleted file mode 100644 index 6616cca002..0000000000 --- a/packages/toolkit/src/query/tests/tsconfig.typetests.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../../tsconfig.test.json", - "compilerOptions": { - "skipLibCheck": true - } -} diff --git a/packages/toolkit/src/tests/tsconfig.json b/packages/toolkit/src/tests/tsconfig.json deleted file mode 100644 index 3678164521..0000000000 --- a/packages/toolkit/src/tests/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.test.json" -} diff --git a/packages/toolkit/src/tests/tsconfig.typetests.json b/packages/toolkit/src/tests/tsconfig.typetests.json deleted file mode 100644 index d75271e8b6..0000000000 --- a/packages/toolkit/src/tests/tsconfig.typetests.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.test.json", - "compilerOptions": { - "skipLibCheck": true, - }, - "include": ["../**/*.ts*"], - "exclude": ["../query"] -} diff --git a/packages/toolkit/tsconfig.build.json b/packages/toolkit/tsconfig.build.json new file mode 100644 index 0000000000..a01c9d4430 --- /dev/null +++ b/packages/toolkit/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["src/**/*.test.ts*", "src/**/tests/*"] +} diff --git a/packages/toolkit/tsconfig.json b/packages/toolkit/tsconfig.json deleted file mode 100644 index cb2e851486..0000000000 --- a/packages/toolkit/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src" - ], - "exclude": [ - "src/**/*.test.ts*", - "src/**/tests/*" - ] -} \ No newline at end of file From 6339e65911303a60b1034fa4ee96ecb1b61d3dad Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:05:55 -0600 Subject: [PATCH 131/368] Bring out `tsconfig.typetests.json` to root level --- packages/toolkit/tsconfig.typetests.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/toolkit/tsconfig.typetests.json diff --git a/packages/toolkit/tsconfig.typetests.json b/packages/toolkit/tsconfig.typetests.json new file mode 100644 index 0000000000..f644f4c28c --- /dev/null +++ b/packages/toolkit/tsconfig.typetests.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.test.json", + "compilerOptions": { + "skipLibCheck": true, + // "rootDir": ".", + }, + // "include": ["../**/*.ts*"], + // "exclude": ["dist"] +} From 13423fc042a2397ad61c60349c7a251e4ae05141 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:06:21 -0600 Subject: [PATCH 132/368] Update `tsconfig.test.json` --- packages/toolkit/tsconfig.test.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index c5938454a1..80c898f42a 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -1,5 +1,5 @@ { - "extends": "../toolkit/tsconfig.base.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "allowSyntheticDefaultImports": true, "esModuleInterop": true, @@ -11,7 +11,9 @@ "target": "es2018", "jsx": "react", "baseUrl": ".", + "rootDir": ".", "skipLibCheck": false, "noImplicitReturns": false - } + }, + "exclude": ["dist", "**/*.typetest.ts*", "**/*.test-d.ts*"] } From d30bb70502e6be52506dae2f7d8d69ec693863a6 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:07:40 -0600 Subject: [PATCH 133/368] Fix NPM scripts --- packages/toolkit/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index b1886243ff..ca5893d7fe 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -95,13 +95,13 @@ }, "scripts": { "run-build": "tsup", - "build": "yarn rimraf dist && echo Compiling TS... && yarn tsc && yarn run-build", + "build": "yarn rimraf dist && echo Compiling TS... && yarn tsc -p tsconfig.build.json && yarn run-build", "build-only": "yarn rimraf dist && yarn run-build", "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", "test": "vitest", - "type-tests": "yarn tsc -p src/tests/tsconfig.typetests.json && yarn tsc -p src/query/tests/tsconfig.typetests.json", + "type-tests": "yarn tsc -p ./tsconfig.typetests.json", "prepack": "yarn build" }, "files": [ From 7be80cfe5e4412392eda59114199948446d39c27 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:08:59 -0600 Subject: [PATCH 134/368] Fix some type issues inside `module.ts` --- packages/toolkit/src/query/react/module.ts | 48 +++++++++++----------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index eb43d5c654..415bd0ba6a 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -1,29 +1,29 @@ -import type { MutationHooks, QueryHooks } from './buildHooks' -import { buildHooks } from './buildHooks' -import { isQueryDefinition, isMutationDefinition } from '../endpointDefinitions' import type { + BaseQueryFn, EndpointDefinitions, - QueryDefinition, MutationDefinition, QueryArgFrom, + QueryDefinition, } from '@reduxjs/toolkit/query' import type { Api, Module } from '../apiTypes' -import { capitalize } from '../utils' +import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions' import { safeAssign } from '../tsHelpers' -import type { BaseQueryFn } from '@reduxjs/toolkit/query' +import { capitalize } from '../utils' +import type { MutationHooks, QueryHooks } from './buildHooks' +import { buildHooks } from './buildHooks' import type { HooksWithUniqueNames } from './namedHooks' import { + batch as rrBatch, useDispatch as rrUseDispatch, useSelector as rrUseSelector, useStore as rrUseStore, - batch as rrBatch, } from 'react-redux' +import { createSelector as _createSelector } from 'reselect' import type { QueryKeys } from '../core/apiState' import type { PrefetchOptions } from '../core/module' import { countObjectKeys } from '../utils/countObjectKeys' -import { createSelector as _createSelector } from 'reselect' export const reactHooksModuleName = /* @__PURE__ */ Symbol() export type ReactHooksModule = typeof reactHooksModuleName @@ -184,24 +184,26 @@ export const reactHooksModule = ({ return { name: reactHooksModuleName, init(api, { serializeQueryArgs }, context) { - const anyApi = api as any as Api< + const anyApi = api as Api< any, - Record, + EndpointDefinitions, string, string, - ReactHooksModule - > - const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({ - api, - moduleOptions: { - batch, - hooks, - unstable__sideEffectsInRender, - createSelector, - }, - serializeQueryArgs, - context, - }) + any + > & { endpoints: any } + const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks( + { + api, + moduleOptions: { + batch, + hooks, + unstable__sideEffectsInRender, + createSelector, + }, + serializeQueryArgs, + context, + } as any + ) safeAssign(anyApi, { usePrefetch }) safeAssign(context, { batch }) From 6a2b72afa10117c9c66ef4e70be82d9dc47470ba Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:13:08 -0600 Subject: [PATCH 135/368] Rename `tsconfig.typetests.json` file to `tsconfig.json` --- packages/toolkit/{tsconfig.typetests.json => tsconfig.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{tsconfig.typetests.json => tsconfig.json} (100%) diff --git a/packages/toolkit/tsconfig.typetests.json b/packages/toolkit/tsconfig.json similarity index 100% rename from packages/toolkit/tsconfig.typetests.json rename to packages/toolkit/tsconfig.json From bbf87f3687d9602bf8444c28e06c2bd7606c96f0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:13:43 -0600 Subject: [PATCH 136/368] Fix `type-tests` NPM script --- packages/toolkit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index ca5893d7fe..c0ab0de05c 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,7 +101,7 @@ "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", "test": "vitest", - "type-tests": "yarn tsc -p ./tsconfig.typetests.json", + "type-tests": "yarn tsc -p ./tsconfig.json", "prepack": "yarn build" }, "files": [ From 0b6deb5f564df64e8a6a161b2d975a61129f60e2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:34:26 -0600 Subject: [PATCH 137/368] Add `// @ts-expect-error` for now --- packages/toolkit/src/query/react/index.ts | 6 ++--- packages/toolkit/src/query/react/module.ts | 27 +++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index 5a9b5a6cdf..ddfc51a1d8 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -1,8 +1,7 @@ // This must remain here so that the `mangleErrors.cjs` build script // does not have to import this into each source file it rewrites. -import { formatProdErrorMessage } from '@reduxjs/toolkit' -import { coreModule, buildCreateApi } from '@reduxjs/toolkit/query' +import { buildCreateApi, coreModule } from '@reduxjs/toolkit/query' import { reactHooksModule, reactHooksModuleName } from './module' export * from '@reduxjs/toolkit/query' @@ -10,13 +9,14 @@ export { ApiProvider } from './ApiProvider' const createApi = /* @__PURE__ */ buildCreateApi( coreModule(), + // @ts-expect-error reactHooksModule() ) export type { + TypedUseMutationResult, TypedUseQueryHookResult, TypedUseQueryStateResult, TypedUseQuerySubscriptionResult, - TypedUseMutationResult, } from './buildHooks' export { createApi, reactHooksModule, reactHooksModuleName } diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 415bd0ba6a..653edde71d 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -148,7 +148,8 @@ export const reactHooksModule = ({ createSelector = _createSelector, unstable__sideEffectsInRender = false, ...rest -}: ReactHooksModuleOptions = {}): Module => { +}: // @ts-expect-error +ReactHooksModuleOptions = {}): Module => { if (process.env.NODE_ENV !== 'production') { const hookNames = ['useDispatch', 'useSelector', 'useStore'] as const let warned = false @@ -191,19 +192,17 @@ export const reactHooksModule = ({ string, any > & { endpoints: any } - const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks( - { - api, - moduleOptions: { - batch, - hooks, - unstable__sideEffectsInRender, - createSelector, - }, - serializeQueryArgs, - context, - } as any - ) + const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({ + api, + moduleOptions: { + batch, + hooks, + unstable__sideEffectsInRender, + createSelector, + }, + serializeQueryArgs, + context, + } as any) safeAssign(anyApi, { usePrefetch }) safeAssign(context, { batch }) From 756940e9f4f934d73ba7d29a8abffa4db970a2da Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:40:50 -0600 Subject: [PATCH 138/368] Change `// @ts-expect-error` to `// @ts-ignore` to work around the build step issue --- packages/toolkit/src/query/react/index.ts | 2 +- packages/toolkit/src/query/react/module.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index ddfc51a1d8..27da529807 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -9,7 +9,7 @@ export { ApiProvider } from './ApiProvider' const createApi = /* @__PURE__ */ buildCreateApi( coreModule(), - // @ts-expect-error + // @ts-ignore reactHooksModule() ) diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 653edde71d..1e7fafe80f 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -148,7 +148,7 @@ export const reactHooksModule = ({ createSelector = _createSelector, unstable__sideEffectsInRender = false, ...rest -}: // @ts-expect-error +}: // @ts-ignore ReactHooksModuleOptions = {}): Module => { if (process.env.NODE_ENV !== 'production') { const hookNames = ['useDispatch', 'useSelector', 'useStore'] as const From 87856853e6b15e3ae0e0fff86607ff12c6231abd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 17:56:04 -0600 Subject: [PATCH 139/368] Add more ts-ignores --- .../toolkit/src/query/react/buildHooks.ts | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 2a3e2cc93d..7d94249134 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -1,58 +1,56 @@ import type { - UnknownAction, Selector, ThunkAction, ThunkDispatch, -} from '@reduxjs/toolkit' -import type { DependencyList } from 'react' -import { - useCallback, - useDebugValue, - useEffect, - useLayoutEffect, - useMemo, - useRef, - useState, -} from 'react' -import { QueryStatus, skipToken } from '@reduxjs/toolkit/query' -import type { - QuerySubState, - SubscriptionOptions, - QueryKeys, - RootState, -} from '@reduxjs/toolkit/query' + UnknownAction, +} from '@reduxjs/toolkit'; import type { + Api, + ApiContext, + ApiEndpointMutation, + ApiEndpointQuery, + CoreModule, EndpointDefinitions, + MutationActionCreatorResult, MutationDefinition, - QueryDefinition, - QueryArgFrom, - ResultTypeFrom, - QueryResultSelectorResult, MutationResultSelectorResult, - SkipToken, + PrefetchOptions, QueryActionCreatorResult, - MutationActionCreatorResult, + QueryArgFrom, + QueryDefinition, + QueryKeys, + QueryResultSelectorResult, + QuerySubState, + ResultTypeFrom, + RootState, SerializeQueryArgs, - Api, - ApiContext, + SkipToken, + SubscriptionOptions, TSHelpersId, TSHelpersNoInfer, TSHelpersOverride, - ApiEndpointMutation, - ApiEndpointQuery, - CoreModule, - PrefetchOptions, -} from '@reduxjs/toolkit/query' - -import { shallowEqual } from 'react-redux' -import type { ReactHooksModuleOptions } from './module' -import { useStableQueryArgs } from './useSerializedStableValue' -import type { UninitializedValue } from './constants' -import { UNINITIALIZED_VALUE } from './constants' -import { useShallowStableValue } from './useShallowStableValue' -import type { BaseQueryFn } from '../baseQueryTypes' -import { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs' -import type { SubscriptionSelectors } from '../core/buildMiddleware/types' +} from '@reduxjs/toolkit/query'; +import { QueryStatus, skipToken } from '@reduxjs/toolkit/query'; +import type { DependencyList } from 'react'; +import { + useCallback, + useDebugValue, + useEffect, + useLayoutEffect, + useMemo, + useRef, + useState, +} from 'react'; + +import { shallowEqual } from 'react-redux'; +import type { BaseQueryFn } from '../baseQueryTypes'; +import type { SubscriptionSelectors } from '../core/buildMiddleware/types'; +import { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs'; +import type { UninitializedValue } from './constants'; +import { UNINITIALIZED_VALUE } from './constants'; +import type { ReactHooksModuleOptions } from './module'; +import { useStableQueryArgs } from './useSerializedStableValue'; +import { useShallowStableValue } from './useShallowStableValue'; // Copy-pasted from React-Redux export const useIsomorphicLayoutEffect = @@ -990,6 +988,7 @@ export function buildHooks({ } function buildMutationHook(name: string): UseMutation { + // @ts-ignore return ({ selectFromResult, fixedCacheKey } = {}) => { const { select, initiate } = api.endpoints[name] as ApiEndpointMutation< MutationDefinition, From 795a9f007b83c066a81cd978753ecd33afe0f1d2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 18 Jan 2024 18:12:10 -0600 Subject: [PATCH 140/368] Add some more `// @ts-ignore`s --- .../toolkit/src/query/react/buildHooks.ts | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 7d94249134..552f02c344 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -3,7 +3,7 @@ import type { ThunkAction, ThunkDispatch, UnknownAction, -} from '@reduxjs/toolkit'; +} from '@reduxjs/toolkit' import type { Api, ApiContext, @@ -29,9 +29,9 @@ import type { TSHelpersId, TSHelpersNoInfer, TSHelpersOverride, -} from '@reduxjs/toolkit/query'; -import { QueryStatus, skipToken } from '@reduxjs/toolkit/query'; -import type { DependencyList } from 'react'; +} from '@reduxjs/toolkit/query' +import { QueryStatus, skipToken } from '@reduxjs/toolkit/query' +import type { DependencyList } from 'react' import { useCallback, useDebugValue, @@ -40,17 +40,17 @@ import { useMemo, useRef, useState, -} from 'react'; - -import { shallowEqual } from 'react-redux'; -import type { BaseQueryFn } from '../baseQueryTypes'; -import type { SubscriptionSelectors } from '../core/buildMiddleware/types'; -import { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs'; -import type { UninitializedValue } from './constants'; -import { UNINITIALIZED_VALUE } from './constants'; -import type { ReactHooksModuleOptions } from './module'; -import { useStableQueryArgs } from './useSerializedStableValue'; -import { useShallowStableValue } from './useShallowStableValue'; +} from 'react' + +import { shallowEqual } from 'react-redux' +import type { BaseQueryFn } from '../baseQueryTypes' +import type { SubscriptionSelectors } from '../core/buildMiddleware/types' +import { defaultSerializeQueryArgs } from '../defaultSerializeQueryArgs' +import type { UninitializedValue } from './constants' +import { UNINITIALIZED_VALUE } from './constants' +import type { ReactHooksModuleOptions } from './module' +import { useStableQueryArgs } from './useSerializedStableValue' +import { useShallowStableValue } from './useShallowStableValue' // Copy-pasted from React-Redux export const useIsomorphicLayoutEffect = @@ -1028,6 +1028,7 @@ export function buildHooks({ [selectFromResult, selectDefaultResult] ) + // @ts-ignore const currentState = useSelector(mutationSelector, shallowEqual) const originalArgs = fixedCacheKey == null ? promise?.arg.originalArgs : undefined From d3e9899003837a2b0a3992c53b8d093d47bdd2b3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 19 Jan 2024 01:17:54 -0600 Subject: [PATCH 141/368] Update lockfile --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index de0bcc3129..a294a3d55f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29804,7 +29804,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@npm:5.3.3, typescript@npm:^5.0.0, typescript@npm:^5.2.2": +"typescript@npm:5.3.3, typescript@npm:^5.0.0, typescript@npm:^5.2.2, typescript@npm:^5.3.3": version: 5.3.3 resolution: "typescript@npm:5.3.3" bin: @@ -29814,7 +29814,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@npm:^4.1.3, typescript@npm:^4.3.4, typescript@npm:^4.8.0, typescript@npm:^4.9, typescript@npm:~4.9": +"typescript@npm:^4.1.3, typescript@npm:^4.3.4, typescript@npm:^4.9, typescript@npm:~4.9": version: 4.9.5 resolution: "typescript@npm:4.9.5" bin: @@ -29864,7 +29864,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@patch:typescript@5.3.3#~builtin, typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": +"typescript@patch:typescript@5.3.3#~builtin, typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin, typescript@patch:typescript@^5.3.3#~builtin": version: 5.3.3 resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" bin: @@ -29874,7 +29874,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@patch:typescript@^4.1.3#~builtin, typescript@patch:typescript@^4.3.4#~builtin, typescript@patch:typescript@^4.8.0#~builtin, typescript@patch:typescript@^4.9#~builtin, typescript@patch:typescript@~4.9#~builtin": +"typescript@patch:typescript@^4.1.3#~builtin, typescript@patch:typescript@^4.3.4#~builtin, typescript@patch:typescript@^4.9#~builtin, typescript@patch:typescript@~4.9#~builtin": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=701156" bin: From e3af65bbe8e604ff3e6392225f173eb41993fa2a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 19 Jan 2024 01:26:09 -0600 Subject: [PATCH 142/368] Update dev dependencies --- packages/rtk-codemods/package.json | 4 +- yarn.lock | 97 ++++++++++++++++-------------- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index aa40d3a8ec..16ac78c1ee 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -34,8 +34,8 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^5.1.3", - "prettier": "^3.2.2", - "vitest": "^1.2.0" + "prettier": "^3.2.4", + "vitest": "^1.2.1" }, "engines": { "node": ">= 16" diff --git a/yarn.lock b/yarn.lock index a294a3d55f..f5f9adce88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7321,10 +7321,10 @@ __metadata: execa: ^8.0.1 globby: ^14.0.0 jscodeshift: ^0.15.1 - prettier: ^3.2.2 + prettier: ^3.2.4 ts-node: ^10.9.2 typescript: ^5.3.3 - vitest: ^1.2.0 + vitest: ^1.2.1 bin: rtk-codemods: ./bin/cli.js languageName: unknown @@ -9357,14 +9357,14 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:1.2.0": - version: 1.2.0 - resolution: "@vitest/expect@npm:1.2.0" +"@vitest/expect@npm:1.2.1": + version: 1.2.1 + resolution: "@vitest/expect@npm:1.2.1" dependencies: - "@vitest/spy": 1.2.0 - "@vitest/utils": 1.2.0 + "@vitest/spy": 1.2.1 + "@vitest/utils": 1.2.1 chai: ^4.3.10 - checksum: 591027d67b1006e6d9fb431dab8c2d43e4005353eea466bcafcc98303d31dc7b2f2562b24bb75ba9a5d62143a3b1fb7987c8f8b6244155752118c2c9382b6be0 + checksum: d87a2dd646f523eaf68185e85f05412969fda55f228be4806d038550f446d3235ebee57f7d3882d0fcf16cfe2e3ac7d10d311df4894fa71548ae9852c8dbd23d languageName: node linkType: hard @@ -9379,14 +9379,14 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:1.2.0": - version: 1.2.0 - resolution: "@vitest/runner@npm:1.2.0" +"@vitest/runner@npm:1.2.1": + version: 1.2.1 + resolution: "@vitest/runner@npm:1.2.1" dependencies: - "@vitest/utils": 1.2.0 + "@vitest/utils": 1.2.1 p-limit: ^5.0.0 pathe: ^1.1.1 - checksum: fdb13c49a8c78d5eddf4119e55966f6681c3038421252f3ad4bd3302d4d9f686c8da37a80cd0c77ee2268b1a3c8253a22379dfb19ea3248563f174a32680ad9b + checksum: 3a3941392e8c6359e19c3ac5c2923150251d9d32bf1252bc2951487d799ac19a7cc43eb3c02eb642c1b02f65ad365273f053bcb37153659c35a345b628baef65 languageName: node linkType: hard @@ -9401,14 +9401,14 @@ __metadata: languageName: node linkType: hard -"@vitest/snapshot@npm:1.2.0": - version: 1.2.0 - resolution: "@vitest/snapshot@npm:1.2.0" +"@vitest/snapshot@npm:1.2.1": + version: 1.2.1 + resolution: "@vitest/snapshot@npm:1.2.1" dependencies: magic-string: ^0.30.5 pathe: ^1.1.1 pretty-format: ^29.7.0 - checksum: 9af819d67c04c88909446ba2c7b6b941ddccbe3587dadc2d032b09f2434eb24342c51ea0e89b0e298b1a9a5426c846d1b8e1d2e72ae636ec13a1425a058bd9d4 + checksum: 6efee401eaab9868c7f7834fd8ec9495c83c0a5eeb632942e6a5eb1ae5a876e91ac9a1b0b760e7bfde5d80cfc3a618e668b080c01882f5eb3b79a4c588185aa4 languageName: node linkType: hard @@ -9421,12 +9421,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:1.2.0": - version: 1.2.0 - resolution: "@vitest/spy@npm:1.2.0" +"@vitest/spy@npm:1.2.1": + version: 1.2.1 + resolution: "@vitest/spy@npm:1.2.1" dependencies: tinyspy: ^2.2.0 - checksum: 6b627b4d15a4f20998873f221184f39fed73d368d8aa17ce7b7fccc4e78c20f2a42dd6ed006b1f5c23ee00466441b0b81d2c999cdb99f5326f25ba91fb6583c9 + checksum: 22a4b4539f69b28f6b0d907d6b7997972a09d85c9a136e0f953dfea45a12bc2ec8678f8d62cbc1ecfc803a0926df8901c6b5d9f8625196f68785965e1c14172c languageName: node linkType: hard @@ -9442,15 +9442,15 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:1.2.0": - version: 1.2.0 - resolution: "@vitest/utils@npm:1.2.0" +"@vitest/utils@npm:1.2.1": + version: 1.2.1 + resolution: "@vitest/utils@npm:1.2.1" dependencies: diff-sequences: ^29.6.3 estree-walker: ^3.0.3 loupe: ^2.3.7 pretty-format: ^29.7.0 - checksum: ac17b2357366d6ce66efec3788262cb64cd5fcc4043b09a1b060b37ae4626d68577ef493f1b6e66b2bc0c551f1a9640ecf052aefef96fb0ef704bb56c23f636d + checksum: 72b54d27e55b9805ab9a8224712584e8db232bd4ce6406e845fbeaf95d8845595791071868b3fdb2ca234acfaea6e7b323d25e419059ef3eb66aa2b4f5c29354 languageName: node linkType: hard @@ -9924,6 +9924,13 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^8.3.2": + version: 8.3.2 + resolution: "acorn-walk@npm:8.3.2" + checksum: 3626b9d26a37b1b427796feaa5261faf712307a8920392c8dce9a5739fb31077667f4ad2ec71c7ac6aaf9f61f04a9d3d67ff56f459587206fc04aa31c27ef392 + languageName: node + linkType: hard + "acorn@npm:^6.4.1": version: 6.4.2 resolution: "acorn@npm:6.4.2" @@ -24969,12 +24976,12 @@ fsevents@^1.2.7: languageName: node linkType: hard -"prettier@npm:^3.2.2": - version: 3.2.2 - resolution: "prettier@npm:3.2.2" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: prettier: bin/prettier.cjs - checksum: b416e1e4b26c351403343ebe461feda631c0eee5c3cf316c711204a08f3c639f38a8f9177c75e98a690998ff82e8ddc80c6bc027fb4ef6cedb6a4db035b4fe9a + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -30663,9 +30670,9 @@ fsevents@^1.2.7: languageName: node linkType: hard -"vite-node@npm:1.2.0": - version: 1.2.0 - resolution: "vite-node@npm:1.2.0" +"vite-node@npm:1.2.1": + version: 1.2.1 + resolution: "vite-node@npm:1.2.1" dependencies: cac: ^6.7.14 debug: ^4.3.4 @@ -30674,7 +30681,7 @@ fsevents@^1.2.7: vite: ^5.0.0 bin: vite-node: vite-node.mjs - checksum: 18d1dfb8c4a5f926dd8089592634414b26b4a0bbcae4fd5f7f6bf336db14fcc1405481bdd70bdd5bcce25b71b38a0617b7688edf8a5463835920e3fe13e9b917 + checksum: 2d2679a8dfecd8de6a2296c72a3d6662597ccf20cb90e4626a2df335556d8b18dbad3ae2be06e644bf905693dbdb558ff003c6dc990c6bc662adcee9e4f0fa6f languageName: node linkType: hard @@ -30769,16 +30776,16 @@ fsevents@^1.2.7: languageName: node linkType: hard -"vitest@npm:^1.2.0": - version: 1.2.0 - resolution: "vitest@npm:1.2.0" - dependencies: - "@vitest/expect": 1.2.0 - "@vitest/runner": 1.2.0 - "@vitest/snapshot": 1.2.0 - "@vitest/spy": 1.2.0 - "@vitest/utils": 1.2.0 - acorn-walk: ^8.3.1 +"vitest@npm:^1.2.1": + version: 1.2.1 + resolution: "vitest@npm:1.2.1" + dependencies: + "@vitest/expect": 1.2.1 + "@vitest/runner": 1.2.1 + "@vitest/snapshot": 1.2.1 + "@vitest/spy": 1.2.1 + "@vitest/utils": 1.2.1 + acorn-walk: ^8.3.2 cac: ^6.7.14 chai: ^4.3.10 debug: ^4.3.4 @@ -30792,7 +30799,7 @@ fsevents@^1.2.7: tinybench: ^2.5.1 tinypool: ^0.8.1 vite: ^5.0.0 - vite-node: 1.2.0 + vite-node: 1.2.1 why-is-node-running: ^2.2.2 peerDependencies: "@edge-runtime/vm": "*" @@ -30816,7 +30823,7 @@ fsevents@^1.2.7: optional: true bin: vitest: vitest.mjs - checksum: eb275607d71d5b101149988204af1f4205cec617bf0f8a1690c68f3f78634256f9a706b409710d258b375d54e6bcc5511b3861b5ae301965701c2849e4e80d0d + checksum: be5cf1ebde0ff7fd534d4c5c710b9d63b3bd7a899f1fcceab82779949cfb8c962f82bb827652debe2d0553d6f786cf76998e6f346e46e03b14e720b121ff540e languageName: node linkType: hard From 8f278e8a42474310c9021047aacc006f0af67f04 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 19 Jan 2024 17:21:54 +0000 Subject: [PATCH 143/368] re-add addEventListener call --- packages/toolkit/src/createAsyncThunk.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/src/createAsyncThunk.ts b/packages/toolkit/src/createAsyncThunk.ts index 842e17cc87..ef4f5f1977 100644 --- a/packages/toolkit/src/createAsyncThunk.ts +++ b/packages/toolkit/src/createAsyncThunk.ts @@ -608,6 +608,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { message: abortReason || 'Aborted', }) } + abortController.signal.addEventListener('abort', abortHandler) }) dispatch( pending( From a23f6fb5bba2464ba93b419d5dbe028595481aa9 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Fri, 19 Jan 2024 18:04:36 +0000 Subject: [PATCH 144/368] require queryFn meta to match base query --- packages/toolkit/src/query/endpointDefinitions.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/endpointDefinitions.ts b/packages/toolkit/src/query/endpointDefinitions.ts index c5262184cd..42f844cfe2 100644 --- a/packages/toolkit/src/query/endpointDefinitions.ts +++ b/packages/toolkit/src/query/endpointDefinitions.ts @@ -148,7 +148,13 @@ interface EndpointDefinitionWithQueryFn< api: BaseQueryApi, extraOptions: BaseQueryExtraOptions, baseQuery: (arg: Parameters[0]) => ReturnType - ): MaybePromise>> + ): MaybePromise< + QueryReturnValue< + ResultType, + BaseQueryError, + BaseQueryMeta + > + > query?: never transformResponse?: never transformErrorResponse?: never From b8ec4ce68531f10c6578f8ceff1234b38c1e6b76 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 19 Jan 2024 21:35:26 -0500 Subject: [PATCH 145/368] Added 'SafePromise' branded Promises for createAsyncThunk --- packages/toolkit/src/createAsyncThunk.ts | 5 +++-- packages/toolkit/src/index.ts | 2 +- packages/toolkit/src/tsHelpers.ts | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/createAsyncThunk.ts b/packages/toolkit/src/createAsyncThunk.ts index ef4f5f1977..c6b1517b3b 100644 --- a/packages/toolkit/src/createAsyncThunk.ts +++ b/packages/toolkit/src/createAsyncThunk.ts @@ -11,6 +11,7 @@ import type { Id, IsAny, IsUnknown, + SafePromise, TypeGuard, } from './tsHelpers' import { nanoid } from './nanoid' @@ -242,7 +243,7 @@ export type AsyncThunkAction< dispatch: GetDispatch, getState: () => GetState, extra: GetExtra -) => Promise< +) => SafePromise< | ReturnType> | ReturnType> > & { @@ -676,7 +677,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { } return finalAction })() - return Object.assign(promise as Promise, { + return Object.assign(promise as SafePromise, { abort, requestId, arg, diff --git a/packages/toolkit/src/index.ts b/packages/toolkit/src/index.ts index 43ac586292..1c8d41af43 100644 --- a/packages/toolkit/src/index.ts +++ b/packages/toolkit/src/index.ts @@ -203,6 +203,6 @@ export { combineSlices } from './combineSlices' export type { WithSlice } from './combineSlices' -export type { ExtractDispatchExtensions as TSHelpersExtractDispatchExtensions } from './tsHelpers' +export type { ExtractDispatchExtensions as TSHelpersExtractDispatchExtensions, SafePromise } from './tsHelpers' export { formatProdErrorMessage } from './formatProdErrorMessage' diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index bd42de858e..709eb268ea 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -207,3 +207,11 @@ export type Tail = T extends [any, ...infer Tail] : never export type UnknownIfNonSpecific = {} extends T ? unknown : T + +/** + * A Promise that will never reject. + * @see https://github.com/reduxjs/redux-toolkit/issues/4101 + */ +export type SafePromise = Promise & { + __brand: 'SafePromise' +} From 29d91c1fe04c2a050836e9fde83a32d161b5d564 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 19 Jan 2024 23:30:46 -0600 Subject: [PATCH 146/368] Remove unnecessary `window` mock --- packages/toolkit/src/tests/configureStore.test.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index d2ee9bf86e..19ad7ee371 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -2,7 +2,6 @@ import * as DevTools from '@internal/devtoolsExtension' import type { StoreEnhancer } from '@reduxjs/toolkit' import { Tuple } from '@reduxjs/toolkit' import type * as Redux from 'redux' -import type { MockInstance } from 'vitest' import { vi } from 'vitest' vi.doMock('redux', async (importOriginal) => { @@ -16,20 +15,9 @@ vi.doMock('redux', async (importOriginal) => { return redux }) -declare global { - interface Window { - __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: MockInstance< - Parameters, - ReturnType - > - } -} - describe('configureStore', async () => { const composeWithDevToolsSpy = vi.spyOn(DevTools, 'composeWithDevTools') - window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ = composeWithDevToolsSpy - const redux = await import('redux') const { configureStore } = await import('@reduxjs/toolkit') From bfb864ad8d41f9818cf3c27457ff3d5e63b9ebb4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 03:01:15 -0600 Subject: [PATCH 147/368] Make `tsconfig.build.json` the default `tsconfig` in tsup configs --- packages/toolkit/package.json | 2 +- packages/toolkit/tsconfig.base.json | 6 +++--- packages/toolkit/tsconfig.json | 7 ++----- packages/toolkit/tsconfig.test.json | 6 +++--- packages/toolkit/tsup.config.ts | 17 +++++++++-------- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index c0ab0de05c..db0d85fa1d 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,7 +101,7 @@ "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", "test": "vitest", - "type-tests": "yarn tsc -p ./tsconfig.json", + "type-tests": "yarn tsc -p tsconfig.json", "prepack": "yarn build" }, "files": [ diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index e06342c0cf..bf7c459f8a 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ESnext", - "module": "esnext", - "lib": ["dom", "esnext"], + "module": "ESnext", + "lib": ["DOM", "ESNext"], "importHelpers": true, // output .d.ts declaration files for consumers "declaration": true, @@ -17,7 +17,7 @@ "noUnusedLocals": false, "noUnusedParameters": false, // use Node's module resolution algorithm, instead of the legacy TS one - "moduleResolution": "node", + "moduleResolution": "Node", // transpile JSX to React.createElement "jsx": "react", // interop between ESM and CJS modules. Recommended by TS diff --git a/packages/toolkit/tsconfig.json b/packages/toolkit/tsconfig.json index f644f4c28c..95ab1d8c94 100644 --- a/packages/toolkit/tsconfig.json +++ b/packages/toolkit/tsconfig.json @@ -1,9 +1,6 @@ { "extends": "./tsconfig.test.json", "compilerOptions": { - "skipLibCheck": true, - // "rootDir": ".", - }, - // "include": ["../**/*.ts*"], - // "exclude": ["dist"] + "skipLibCheck": true + } } diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index 80c898f42a..06d5f5b2e2 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -3,12 +3,12 @@ "compilerOptions": { "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", + "module": "ESNext", + "moduleResolution": "Node", "emitDeclarationOnly": false, "strict": true, "noEmit": true, - "target": "es2018", + "target": "ES2018", "jsx": "react", "baseUrl": ".", "rootDir": ".", diff --git a/packages/toolkit/tsup.config.ts b/packages/toolkit/tsup.config.ts index 3b1f3ff417..6bec2a919d 100644 --- a/packages/toolkit/tsup.config.ts +++ b/packages/toolkit/tsup.config.ts @@ -1,13 +1,11 @@ -import { fileURLToPath } from 'url' -import path from 'path' -import fs from 'fs' -import type { BuildOptions as ESBuildOptions, Plugin } from 'esbuild' -import type { Options as TsupOptions } from 'tsup' -import { defineConfig } from 'tsup' import * as babel from '@babel/core' +import type { Plugin } from 'esbuild' import { getBuildExtensions } from 'esbuild-extra' - -import { delay } from './src/utils' +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import type { Options as TsupOptions } from 'tsup' +import { defineConfig } from 'tsup' // No __dirname under Node ESM const __filename = fileURLToPath(import.meta.url) @@ -155,6 +153,8 @@ const mangleErrorsTransform: Plugin = { }, } +const tsconfig = path.join(__dirname, './tsconfig.build.json') satisfies TsupOptions['tsconfig'] + export default defineConfig((options) => { const configs = entryPoints .map((entryPointConfig) => { @@ -188,6 +188,7 @@ export default defineConfig((options) => { [outputFilename]: entryPoint, }, format, + tsconfig, outDir: outputFolder, target, outExtension: () => ({ js: extension }), From 052a5120aed226a7084b073c73fb83305bc3c3e4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 08:46:25 -0600 Subject: [PATCH 148/368] Add back `formatProdErrorMessage` to `src\query\react\index.ts` --- packages/toolkit/src/query/react/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index 27da529807..cde9075253 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -1,5 +1,6 @@ // This must remain here so that the `mangleErrors.cjs` build script // does not have to import this into each source file it rewrites. +import { formatProdErrorMessage } from '@reduxjs/toolkit' import { buildCreateApi, coreModule } from '@reduxjs/toolkit/query' import { reactHooksModule, reactHooksModuleName } from './module' From 18d5f59056b0796323a4db105991fe15bbacf9a1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 09:29:29 -0600 Subject: [PATCH 149/368] Fix type tests excluding wrong files --- packages/toolkit/tsconfig.base.json | 4 ++-- packages/toolkit/tsconfig.build.json | 8 +++++++- packages/toolkit/tsconfig.test.json | 6 +++--- packages/toolkit/vitest.config.ts | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index bf7c459f8a..6b1b0bbe4c 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -17,7 +17,7 @@ "noUnusedLocals": false, "noUnusedParameters": false, // use Node's module resolution algorithm, instead of the legacy TS one - "moduleResolution": "Node", + "moduleResolution": "Node10", // transpile JSX to React.createElement "jsx": "react", // interop between ESM and CJS modules. Recommended by TS @@ -32,7 +32,7 @@ "allowSyntheticDefaultImports": true, "emitDeclarationOnly": true, "baseUrl": ".", - "types": ["vitest/globals"], + "types": ["vitest/globals", "vitest/importMeta"], "paths": { "@reduxjs/toolkit": ["src/index.ts"], // @remap-prod-remove-line "@reduxjs/toolkit/react": ["src/react/index.ts"], // @remap-prod-remove-line diff --git a/packages/toolkit/tsconfig.build.json b/packages/toolkit/tsconfig.build.json index a01c9d4430..f0b431720e 100644 --- a/packages/toolkit/tsconfig.build.json +++ b/packages/toolkit/tsconfig.build.json @@ -4,5 +4,11 @@ "outDir": "dist" }, "include": ["src"], - "exclude": ["src/**/*.test.ts*", "src/**/tests/*"] + "exclude": [ + "src/**/*.test.ts*", + "src/**/*.test-d.ts*", + "src/**/*.spec.ts*", + "src/**/tests/*", + "src/**/*.typetest.ts*" + ] } diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index 06d5f5b2e2..5946ec1933 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -4,16 +4,16 @@ "allowSyntheticDefaultImports": true, "esModuleInterop": true, "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "Node10", "emitDeclarationOnly": false, "strict": true, "noEmit": true, - "target": "ES2018", + "target": "ESNext", "jsx": "react", "baseUrl": ".", "rootDir": ".", "skipLibCheck": false, "noImplicitReturns": false }, - "exclude": ["dist", "**/*.typetest.ts*", "**/*.test-d.ts*"] + "exclude": ["dist"] } diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 45b67cf6bd..58ce5ebc55 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -9,7 +9,7 @@ const __dirname = path.dirname(__filename) export default defineConfig({ test: { - typecheck: { only: true, tsconfig: './src/tests/tsconfig.typetests.json' }, + typecheck: { only: true }, globals: true, environment: 'jsdom', setupFiles: ['./vitest.setup.js'], From f6809fa3ff1e284dcbd67467d325c674d3e2335d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 09:42:10 -0600 Subject: [PATCH 150/368] Rename `vitest.config.ts` to `vitest.config.mts` - This was done because the CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. --- packages/toolkit/{vitest.config.ts => vitest.config.mts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{vitest.config.ts => vitest.config.mts} (100%) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.mts similarity index 100% rename from packages/toolkit/vitest.config.ts rename to packages/toolkit/vitest.config.mts From 50c0538171c28aa496652e44a2947765fd764115 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 09:57:29 -0600 Subject: [PATCH 151/368] Change `Node10` to `Node` as TS versions before 5 do not support it --- packages/toolkit/tsconfig.base.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index 6b1b0bbe4c..aad62c5c2c 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -17,7 +17,7 @@ "noUnusedLocals": false, "noUnusedParameters": false, // use Node's module resolution algorithm, instead of the legacy TS one - "moduleResolution": "Node10", + "moduleResolution": "Node", // transpile JSX to React.createElement "jsx": "react", // interop between ESM and CJS modules. Recommended by TS From eb019a6b6ff72df539a1841ab5788bcb55a93735 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 09:59:16 -0600 Subject: [PATCH 152/368] Remove duplicate fields in `tsconfig.test.json` for simplicity --- packages/toolkit/tsconfig.test.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index 5946ec1933..cb0adf434f 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -1,16 +1,8 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "module": "ESNext", - "moduleResolution": "Node10", "emitDeclarationOnly": false, - "strict": true, "noEmit": true, - "target": "ESNext", - "jsx": "react", - "baseUrl": ".", "rootDir": ".", "skipLibCheck": false, "noImplicitReturns": false From bef848789a482eb9a82e538ec94563016bec58dd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 10:01:19 -0600 Subject: [PATCH 153/368] Change `vitest.config.ts` to `vitest.config.mts` inside `tests.yml` file --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e8738a3434..878c72c0c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,7 +133,7 @@ jobs: - name: Show installed RTK versions run: yarn info @reduxjs/toolkit - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* - name: Test types run: | From bf2500cbbb18fe54294b97541d967fca667eb40c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 10:21:51 -0600 Subject: [PATCH 154/368] Change `vitest.config.ts` to `vitest.config.mts` inside `tests.yml` file --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 878c72c0c3..078af312d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,7 +91,7 @@ jobs: - name: Install build artifact run: yarn workspace @reduxjs/toolkit add $(pwd)/package.tgz - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* - name: Run tests, against dist run: yarn test From 49efa87cea8646e71a91634ae66f832547c48f18 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:10:30 -0600 Subject: [PATCH 155/368] Add `@ts-ignore` directive to `satisfies` operator inside `tsup.config.ts` --- packages/toolkit/tsup.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/tsup.config.ts b/packages/toolkit/tsup.config.ts index 6bec2a919d..4be775e24f 100644 --- a/packages/toolkit/tsup.config.ts +++ b/packages/toolkit/tsup.config.ts @@ -153,6 +153,7 @@ const mangleErrorsTransform: Plugin = { }, } +// @ts-ignore: The `satisfies` operator does not work with TS versions prior to 4.9. const tsconfig = path.join(__dirname, './tsconfig.build.json') satisfies TsupOptions['tsconfig'] export default defineConfig((options) => { From bae0c01991d4405e3fdb423a5aadc679e913bac7 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 20 Jan 2024 12:29:42 -0500 Subject: [PATCH 156/368] Update to __safetyBrand from __brand --- packages/toolkit/src/tsHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index 709eb268ea..24b8289b39 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -213,5 +213,5 @@ export type UnknownIfNonSpecific = {} extends T ? unknown : T * @see https://github.com/reduxjs/redux-toolkit/issues/4101 */ export type SafePromise = Promise & { - __brand: 'SafePromise' + __safetyBrand: 'SafePromise' } From 789d97ce88ae7298c4275172de59638f29434b5a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 20 Jan 2024 12:41:09 -0500 Subject: [PATCH 157/368] MutationActionCreatorResult and QueryActionCreatorResult too --- .../toolkit/src/query/core/buildInitiate.ts | 20 +++++++++++-------- packages/toolkit/src/tsHelpers.ts | 10 ++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/query/core/buildInitiate.ts b/packages/toolkit/src/query/core/buildInitiate.ts index 1b3a1e0aa1..ae761f3855 100644 --- a/packages/toolkit/src/query/core/buildInitiate.ts +++ b/packages/toolkit/src/query/core/buildInitiate.ts @@ -21,6 +21,8 @@ import type { QueryResultSelectorResult } from './buildSelectors' import type { Dispatch } from 'redux' import { isNotNullish } from '../utils/isNotNullish' import { countObjectKeys } from '../utils/countObjectKeys' +import type { SafePromise } from '../../tsHelpers' +import { asSafePromise } from '../../tsHelpers' declare module './module' { export interface ApiEndpointQuery< @@ -60,7 +62,7 @@ type StartQueryActionCreator< export type QueryActionCreatorResult< D extends QueryDefinition -> = Promise> & { +> = SafePromise> & { arg: QueryArgFrom requestId: string subscriptionOptions: SubscriptionOptions | undefined @@ -90,7 +92,7 @@ type StartMutationActionCreator< export type MutationActionCreatorResult< D extends MutationDefinition -> = Promise< +> = SafePromise< | { data: ResultTypeFrom } | { error: @@ -335,7 +337,7 @@ You must add the middleware for RTK-Query to function correctly!` const selectFromState = () => selector(getState()) const statePromise: QueryActionCreatorResult = Object.assign( - forceQueryFn + (forceQueryFn ? // a query has been forced (upsertQueryData) // -> we want to resolve it once data has been written with the data that will be written thunkResult.then(selectFromState) @@ -345,7 +347,9 @@ You must add the middleware for RTK-Query to function correctly!` Promise.resolve(stateAfter) : // query just started or one is already in flight // -> wait for the running query, then resolve with data from after that - Promise.all([runningQuery, thunkResult]).then(selectFromState), + Promise.all([runningQuery, thunkResult]).then( + selectFromState + )) as SafePromise, { arg, requestId, @@ -421,10 +425,10 @@ You must add the middleware for RTK-Query to function correctly!` const thunkResult = dispatch(thunk) middlewareWarning(dispatch) const { requestId, abort, unwrap } = thunkResult - const returnValuePromise = thunkResult - .unwrap() - .then((data) => ({ data })) - .catch((error) => ({ error })) + const returnValuePromise = asSafePromise( + thunkResult.unwrap().then((data) => ({ data })), + (error) => ({ error }) + ) const reset = () => { dispatch(removeMutationResult({ requestId, fixedCacheKey })) diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index 24b8289b39..b0bdd34498 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -215,3 +215,13 @@ export type UnknownIfNonSpecific = {} extends T ? unknown : T export type SafePromise = Promise & { __safetyBrand: 'SafePromise' } + +/** + * Properly wraps a Promise as a @link {SafePromise} with .catch(fallback). + */ +export function asSafePromise( + promise: Promise, + fallback: (error: unknown) => Rejected +) { + return promise.catch(fallback) as SafePromise +} From d8db4cb52b0ac72a9c0b4efbe5064f52e860df55 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 20 Jan 2024 12:46:27 -0500 Subject: [PATCH 158/368] nit: corrected JSDoc SafePromise link --- packages/toolkit/src/tsHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index b0bdd34498..f1f1a98fcf 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -217,7 +217,7 @@ export type SafePromise = Promise & { } /** - * Properly wraps a Promise as a @link {SafePromise} with .catch(fallback). + * Properly wraps a Promise as a {@link SafePromise} with .catch(fallback). */ export function asSafePromise( promise: Promise, From d5db2953576e4361e785e22f0c34fa037db66859 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:48:22 -0600 Subject: [PATCH 159/368] Remove `interopDefault` from `vitest.config.mts` as it is enabled by default --- packages/toolkit/vitest.config.mts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 58ce5ebc55..97a9283a1f 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -26,7 +26,6 @@ export default defineConfig({ '@internal': path.join(__dirname, './src'), }, deps: { - interopDefault: true, inline: ['redux', '@reduxjs/toolkit'], }, }, From 2c5d7a7900f9e1f9d0d4df929678c8afe257e667 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:49:46 -0600 Subject: [PATCH 160/368] Replace the deprecated `deps.inline` with `server.deps.inline` --- packages/toolkit/vitest.config.mts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 97a9283a1f..33cc411957 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -25,8 +25,6 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, - deps: { - inline: ['redux', '@reduxjs/toolkit'], - }, + server: { deps: { inline: ['redux', '@reduxjs/toolkit'], } }, }, }) From 06ddb7c6cd235784ea4e031b61d214b86dadc1e9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:58:20 -0600 Subject: [PATCH 161/368] Remove `satisfies` operator to silence TS errors for TS 4.7 and 4.8 --- packages/toolkit/tsup.config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/tsup.config.ts b/packages/toolkit/tsup.config.ts index 4be775e24f..5e43c847b2 100644 --- a/packages/toolkit/tsup.config.ts +++ b/packages/toolkit/tsup.config.ts @@ -153,8 +153,10 @@ const mangleErrorsTransform: Plugin = { }, } -// @ts-ignore: The `satisfies` operator does not work with TS versions prior to 4.9. -const tsconfig = path.join(__dirname, './tsconfig.build.json') satisfies TsupOptions['tsconfig'] +const tsconfig: NonNullable = path.join( + __dirname, + './tsconfig.build.json' +) export default defineConfig((options) => { const configs = entryPoints From a46e9fc7f12c06a61025fb38df908db9ccbbdd50 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:00:09 -0600 Subject: [PATCH 162/368] Rename `vitest.setup.js` to `vitest.setup.ts` --- packages/toolkit/{vitest.setup.js => vitest.setup.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{vitest.setup.js => vitest.setup.ts} (100%) diff --git a/packages/toolkit/vitest.setup.js b/packages/toolkit/vitest.setup.ts similarity index 100% rename from packages/toolkit/vitest.setup.js rename to packages/toolkit/vitest.setup.ts From adefdaae24b30b3b50e5bd0045e3d13648e818c3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:00:29 -0600 Subject: [PATCH 163/368] Add clean NPM script --- packages/toolkit/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index db0d85fa1d..21cec7c5d2 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -94,9 +94,10 @@ "yargs": "^15.3.1" }, "scripts": { + "clean": "rimraf dist", "run-build": "tsup", - "build": "yarn rimraf dist && echo Compiling TS... && yarn tsc -p tsconfig.build.json && yarn run-build", - "build-only": "yarn rimraf dist && yarn run-build", + "build": "yarn clean && echo Compiling TS... && yarn tsc -p tsconfig.build.json && yarn run-build", + "build-only": "yarn clean && yarn run-build", "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", From 27740fc0a07f273a0d42610754089ad92208c51f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:01:34 -0600 Subject: [PATCH 164/368] Add `test:watch` NPM script --- packages/toolkit/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 21cec7c5d2..00e2d496b9 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,7 +101,8 @@ "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", - "test": "vitest", + "test": "vitest --run", + "test:watch": "vitest --watch", "type-tests": "yarn tsc -p tsconfig.json", "prepack": "yarn build" }, From a68d2a285c3de01552b92fd5ea8f513e2b20d860 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:02:27 -0600 Subject: [PATCH 165/368] Add `vitest.setup.ts` to `setupFiles` in `vitest.config.mts` --- packages/toolkit/vitest.config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 33cc411957..82774ebfa4 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -12,7 +12,7 @@ export default defineConfig({ typecheck: { only: true }, globals: true, environment: 'jsdom', - setupFiles: ['./vitest.setup.js'], + setupFiles: ['./vitest.setup.ts'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { // prettier-ignore From e2bf45a78113e2e6be6f1e3201bde4b7007788d6 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:06:05 -0600 Subject: [PATCH 166/368] Bump `node-fetch` dev dependency --- packages/toolkit/package.json | 2 +- yarn.lock | 53 ++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 00e2d496b9..fd22df90fa 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -81,7 +81,7 @@ "jsdom": "^21.0.0", "json-stringify-safe": "^5.0.1", "msw": "^0.40.2", - "node-fetch": "^2.6.1", + "node-fetch": "^3.3.2", "prettier": "^2.2.1", "query-string": "^7.0.1", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index eeaa6a54a3..5c1fe8b249 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7051,7 +7051,7 @@ __metadata: jsdom: ^21.0.0 json-stringify-safe: ^5.0.1 msw: ^0.40.2 - node-fetch: ^2.6.1 + node-fetch: ^3.3.2 prettier: ^2.2.1 query-string: ^7.0.1 redux: ^5.0.1 @@ -13462,6 +13462,13 @@ __metadata: languageName: node linkType: hard +"data-uri-to-buffer@npm:^4.0.0": + version: 4.0.1 + resolution: "data-uri-to-buffer@npm:4.0.1" + checksum: 0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c + languageName: node + linkType: hard + "data-urls@npm:^2.0.0": version: 2.0.0 resolution: "data-urls@npm:2.0.0" @@ -15692,6 +15699,16 @@ __metadata: languageName: node linkType: hard +"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": + version: 3.2.0 + resolution: "fetch-blob@npm:3.2.0" + dependencies: + node-domexception: ^1.0.0 + web-streams-polyfill: ^3.0.3 + checksum: f19bc28a2a0b9626e69fd7cf3a05798706db7f6c7548da657cbf5026a570945f5eeaedff52007ea35c8bcd3d237c58a20bf1543bc568ab2422411d762dd3d5bf + languageName: node + linkType: hard + "fflate@npm:^0.7.4": version: 0.7.4 resolution: "fflate@npm:0.7.4" @@ -16036,6 +16053,15 @@ __metadata: languageName: node linkType: hard +"formdata-polyfill@npm:^4.0.10": + version: 4.0.10 + resolution: "formdata-polyfill@npm:4.0.10" + dependencies: + fetch-blob: ^3.1.2 + checksum: 82a34df292afadd82b43d4a740ce387bc08541e0a534358425193017bf9fb3567875dc5f69564984b1da979979b70703aa73dee715a17b6c229752ae736dd9db + languageName: node + linkType: hard + "formik@npm:^2.1.5": version: 2.2.9 resolution: "formik@npm:2.2.9" @@ -21743,6 +21769,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-domexception@npm:^1.0.0": + version: 1.0.0 + resolution: "node-domexception@npm:1.0.0" + checksum: ee1d37dd2a4eb26a8a92cd6b64dfc29caec72bff5e1ed9aba80c294f57a31ba4895a60fd48347cf17dd6e766da0ae87d75657dfd1f384ebfa60462c2283f5c7f + languageName: node + linkType: hard + "node-emoji@npm:^1.10.0": version: 1.10.0 resolution: "node-emoji@npm:1.10.0" @@ -21808,6 +21841,17 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-fetch@npm:^3.3.2": + version: 3.3.2 + resolution: "node-fetch@npm:3.3.2" + dependencies: + data-uri-to-buffer: ^4.0.0 + fetch-blob: ^3.1.4 + formdata-polyfill: ^4.0.10 + checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 + languageName: node + linkType: hard + "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -30495,6 +30539,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"web-streams-polyfill@npm:^3.0.3": + version: 3.3.2 + resolution: "web-streams-polyfill@npm:3.3.2" + checksum: 0292f4113c1bda40d8e8ecebee39eb14cc2e2e560a65a6867980e394537a2645130e2c73f5ef6e641fd3697d2f71720ccf659aebaf69a9d5a773f653a0fdf39d + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" From ea732043304f101e6bedaf2ab8a71ed993e7d803 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 20 Jan 2024 15:46:52 -0500 Subject: [PATCH 167/368] Rename to __linterBrands from __safetyBrand --- packages/toolkit/src/tsHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index f1f1a98fcf..d4d6a2f3e0 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -213,7 +213,7 @@ export type UnknownIfNonSpecific = {} extends T ? unknown : T * @see https://github.com/reduxjs/redux-toolkit/issues/4101 */ export type SafePromise = Promise & { - __safetyBrand: 'SafePromise' + __linterBrands: 'SafePromise' } /** From 90a7d92185f2e0723717c72f8b908513106e054a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:53:10 -0600 Subject: [PATCH 168/368] Bump msw --- package.json | 1 - packages/toolkit/package.json | 2 +- yarn.lock | 288 ++++++++++++++++++++++++++++++---- 3 files changed, 262 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 0e5ad40414..4b42815687 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "@babel/types": "7.19.3", "esbuild": "0.19.7", "jest-snapshot": "29.3.1", - "msw": "patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752", "jscodeshift": "0.13.1", "react-redux": "npm:8.0.2", "react": "npm:18.2.0", diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index fd22df90fa..5fcb4bc5ea 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -80,7 +80,7 @@ "invariant": "^2.2.4", "jsdom": "^21.0.0", "json-stringify-safe": "^5.0.1", - "msw": "^0.40.2", + "msw": "^2.1.4", "node-fetch": "^3.3.2", "prettier": "^2.2.1", "query-string": "^7.0.1", diff --git a/yarn.lock b/yarn.lock index 5c1fe8b249..1710704aef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2696,6 +2696,24 @@ __metadata: languageName: node linkType: hard +"@bundled-es-modules/cookie@npm:^2.0.0": + version: 2.0.0 + resolution: "@bundled-es-modules/cookie@npm:2.0.0" + dependencies: + cookie: ^0.5.0 + checksum: 53114eabbedda20ba6c63f45dcea35c568616d22adf5d1882cef9761f65ae636bf47e0c66325572cc8e3a335e0257caf5f76ff1287990d9e9265be7bc9767a87 + languageName: node + linkType: hard + +"@bundled-es-modules/statuses@npm:^1.0.1": + version: 1.0.1 + resolution: "@bundled-es-modules/statuses@npm:1.0.1" + dependencies: + statuses: ^2.0.1 + checksum: bcaa7de192e73056950b5fd20e75140d8d09074b1adc4437924b2051bb02b4dbf568c96e67d53b220fb7d735c3446e2ba746599cb1793ab2d23dd2ef230a8622 + languageName: node + linkType: hard + "@chakra-ui/accordion@npm:1.0.0": version: 1.0.0 resolution: "@chakra-ui/accordion@npm:1.0.0" @@ -6641,6 +6659,16 @@ __metadata: languageName: node linkType: hard +"@mswjs/cookies@npm:^0.1.4": + version: 0.1.7 + resolution: "@mswjs/cookies@npm:0.1.7" + dependencies: + "@types/set-cookie-parser": ^2.4.0 + set-cookie-parser: ^2.4.6 + checksum: d9b152dfdeba08b282a236485610bcfe992626e3c638fe51ebc5c7b5273d41d74e5447ae556a6c76460a8d3c7a7de6f544c681232cb50ae05b6b1e112bb77286 + languageName: node + linkType: hard + "@mswjs/cookies@npm:^0.2.0": version: 0.2.0 resolution: "@mswjs/cookies@npm:0.2.0" @@ -6651,6 +6679,13 @@ __metadata: languageName: node linkType: hard +"@mswjs/cookies@npm:^1.1.0": + version: 1.1.0 + resolution: "@mswjs/cookies@npm:1.1.0" + checksum: 1d9be44548907b92ff6acd46795292968661be19f1c04c43fdb2beb98bc7e58b8ffcef3be19d0f2cb58df07a36a6b53b4bbc0ea34e023b7366dbc28ffee90338 + languageName: node + linkType: hard + "@mswjs/data@npm:^0.3.0": version: 0.3.0 resolution: "@mswjs/data@npm:0.3.0" @@ -6707,6 +6742,32 @@ __metadata: languageName: node linkType: hard +"@mswjs/interceptors@npm:^0.25.14": + version: 0.25.14 + resolution: "@mswjs/interceptors@npm:0.25.14" + dependencies: + "@open-draft/deferred-promise": ^2.2.0 + "@open-draft/logger": ^0.3.0 + "@open-draft/until": ^2.0.0 + is-node-process: ^1.2.0 + outvariant: ^1.2.1 + strict-event-emitter: ^0.5.1 + checksum: caf9513cf6848ff0c3f1402abf881d3c1333f68fae54076cfd3fd919b7edb709769342bd3afd2a60ef4ae698ef47776b6203e0ea6a5d8e788e97eda7ed9dbbd4 + languageName: node + linkType: hard + +"@mswjs/interceptors@npm:^0.8.0": + version: 0.8.1 + resolution: "@mswjs/interceptors@npm:0.8.1" + dependencies: + "@open-draft/until": ^1.0.3 + debug: ^4.3.0 + headers-utils: ^3.0.2 + strict-event-emitter: ^0.2.0 + checksum: cb4aaf4d83b0f12560f856952a4fa12b77cc50d273da08823b8a7c4a89602a770b0143823f1dcb38832c9a8fc064c9497c455f6079656fcf113b80561b3488a8 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -6875,6 +6936,23 @@ __metadata: languageName: node linkType: hard +"@open-draft/deferred-promise@npm:^2.2.0": + version: 2.2.0 + resolution: "@open-draft/deferred-promise@npm:2.2.0" + checksum: 7f29d39725bb8ab5b62f89d88a4202ce2439ac740860979f9e3d0015dfe4bc3daddcfa5727fa4eed482fdbee770aa591b1136b98b0a0f0569a65294f35bdf56a + languageName: node + linkType: hard + +"@open-draft/logger@npm:^0.3.0": + version: 0.3.0 + resolution: "@open-draft/logger@npm:0.3.0" + dependencies: + is-node-process: ^1.2.0 + outvariant: ^1.4.0 + checksum: 7adfe3d0ed8ca32333ce2a77f9a93d561ebc89c989eaa9722f1dc8a2d2854f5de1bef6fa6894cdf58e16fa4dd9cfa99444ea1f5cac6eb1518e9247911ed042d5 + languageName: node + linkType: hard + "@open-draft/until@npm:^1.0.3": version: 1.0.3 resolution: "@open-draft/until@npm:1.0.3" @@ -6882,6 +6960,13 @@ __metadata: languageName: node linkType: hard +"@open-draft/until@npm:^2.0.0, @open-draft/until@npm:^2.1.0": + version: 2.1.0 + resolution: "@open-draft/until@npm:2.1.0" + checksum: 140ea3b16f4a3a6a729c1256050e20a93d408d7aa1e125648ce2665b3c526ed452510c6e4a6f4b15d95fb5e41203fb51510eb8fbc8812d5e5a91880293d66471 + languageName: node + linkType: hard + "@phryneas/ts-version@npm:^1.0.2": version: 1.0.2 resolution: "@phryneas/ts-version@npm:1.0.2" @@ -7050,7 +7135,7 @@ __metadata: invariant: ^2.2.4 jsdom: ^21.0.0 json-stringify-safe: ^5.0.1 - msw: ^0.40.2 + msw: ^2.1.4 node-fetch: ^3.3.2 prettier: ^2.2.1 query-string: ^7.0.1 @@ -8128,13 +8213,20 @@ __metadata: languageName: node linkType: hard -"@types/cookie@npm:^0.4.1": +"@types/cookie@npm:^0.4.0, @types/cookie@npm:^0.4.1": version: 0.4.1 resolution: "@types/cookie@npm:0.4.1" checksum: 3275534ed69a76c68eb1a77d547d75f99fedc80befb75a3d1d03662fb08d697e6f8b1274e12af1a74c6896071b11510631ba891f64d30c78528d0ec45a9c1a18 languageName: node linkType: hard +"@types/cookie@npm:^0.6.0": + version: 0.6.0 + resolution: "@types/cookie@npm:0.6.0" + checksum: 5edce7995775b0b196b142883e4d4f71fd93c294eaec973670f1fa2540b70ea7390408ed513ddefef5fcb12a578100c76596e8f2a714b0c2ae9f70ee773f4510 + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.3": version: 3.7.3 resolution: "@types/eslint-scope@npm:3.7.3" @@ -8289,6 +8381,16 @@ __metadata: languageName: node linkType: hard +"@types/inquirer@npm:8.2.1": + version: 8.2.1 + resolution: "@types/inquirer@npm:8.2.1" + dependencies: + "@types/through": "*" + rxjs: ^7.2.0 + checksum: 5362d0b1cbec3887c9d5a671a0b19c58cf54066456c8967dd7ee799dfcc242cc8cd8959440c0f2fe7768becaf721b45fd30c222e6b9bcca378f45c68af43bab5 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.3 resolution: "@types/istanbul-lib-coverage@npm:2.0.3" @@ -8334,6 +8436,13 @@ __metadata: languageName: node linkType: hard +"@types/js-levenshtein@npm:^1.1.0": + version: 1.1.3 + resolution: "@types/js-levenshtein@npm:1.1.3" + checksum: eb338696da976925ea8448a42d775d7615a14323dceeb08909f187d0b3d3b4c1f67a1c36ef586b1c2318b70ab141bba8fc58311ba1c816711704605aec09db8b + languageName: node + linkType: hard + "@types/js-levenshtein@npm:^1.1.1": version: 1.1.1 resolution: "@types/js-levenshtein@npm:1.1.1" @@ -8735,6 +8844,13 @@ __metadata: languageName: node linkType: hard +"@types/statuses@npm:^2.0.4": + version: 2.0.4 + resolution: "@types/statuses@npm:2.0.4" + checksum: 3a806c3b96d1845e3e7441fbf0839037e95f717334760ddb7c29223c9a34a7206b68e2998631f89f1a1e3ef5b67b15652f6e8fa14987ebd7f6d38587c1bffd18 + languageName: node + linkType: hard + "@types/testing-library__jest-dom@npm:^5.9.1": version: 5.14.3 resolution: "@types/testing-library__jest-dom@npm:5.14.3" @@ -8744,6 +8860,15 @@ __metadata: languageName: node linkType: hard +"@types/through@npm:*": + version: 0.0.33 + resolution: "@types/through@npm:0.0.33" + dependencies: + "@types/node": "*" + checksum: fd0b73f873a64ed5366d1d757c42e5dbbb2201002667c8958eda7ca02fff09d73de91360572db465ee00240c32d50c6039ea736d8eca374300f9664f93e8da39 + languageName: node + linkType: hard + "@types/tinycolor2@npm:1.4.2": version: 1.4.2 resolution: "@types/tinycolor2@npm:1.4.2" @@ -12073,6 +12198,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + "clone-deep@npm:^4.0.1": version: 4.0.1 resolution: "clone-deep@npm:4.0.1" @@ -12617,14 +12753,14 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0": +"cookie@npm:0.5.0, cookie@npm:^0.5.0": version: 0.5.0 resolution: "cookie@npm:0.5.0" checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 languageName: node linkType: hard -"cookie@npm:^0.4.2": +"cookie@npm:^0.4.1, cookie@npm:^0.4.2": version: 0.4.2 resolution: "cookie@npm:0.4.2" checksum: a00833c998bedf8e787b4c342defe5fa419abd96b32f4464f718b91022586b8f1bafbddd499288e75c037642493c83083da426c6a9080d309e3bd90fd11baa9b @@ -13537,7 +13673,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -16782,6 +16918,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"graphql@npm:^15.4.0": + version: 15.8.0 + resolution: "graphql@npm:15.8.0" + checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e + languageName: node + linkType: hard + "graphql@npm:^15.5.0": version: 15.5.0 resolution: "graphql@npm:15.5.0" @@ -16796,6 +16939,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"graphql@npm:^16.8.1": + version: 16.8.1 + resolution: "graphql@npm:16.8.1" + checksum: 8d304b7b6f708c8c5cc164b06e92467dfe36aff6d4f2cf31dd19c4c2905a0e7b89edac4b7e225871131fd24e21460836b369de0c06532644d15b461d55b1ccc0 + languageName: node + linkType: hard + "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -17084,6 +17234,20 @@ fsevents@^1.2.7: languageName: node linkType: hard +"headers-polyfill@npm:^4.0.2": + version: 4.0.2 + resolution: "headers-polyfill@npm:4.0.2" + checksum: a95280ed58df429fc86c4f49b21596be3ea3f5f3d790e7d75238668df9b90b292f15a968c7c19ae1db88c0ae036dd1bf363a71b8e771199d82848e2d8b3c6c2e + languageName: node + linkType: hard + +"headers-utils@npm:^3.0.2": + version: 3.0.2 + resolution: "headers-utils@npm:3.0.2" + checksum: 210fe65756d6de8a96afe68617463fb6faf675a24d864e849b17bddf051c4a24d621a510a1bb80fd9d4763b932eb44b5d8fd6fc4f14fa62fb211603456a57b4f + languageName: node + linkType: hard + "hex-color-regex@npm:^1.1.0": version: 1.1.0 resolution: "hex-color-regex@npm:1.1.0" @@ -18263,6 +18427,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-node-process@npm:^1.2.0": + version: 1.2.0 + resolution: "is-node-process@npm:1.2.0" + checksum: 930765cdc6d81ab8f1bbecbea4a8d35c7c6d88a3ff61f3630e0fc7f22d624d7661c1df05c58547d0eb6a639dfa9304682c8e342c4113a6ed51472b704cee2928 + languageName: node + linkType: hard + "is-npm@npm:^5.0.0": version: 5.0.0 resolution: "is-npm@npm:5.0.0" @@ -21538,7 +21709,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"msw@npm:0.40.2": +"msw@npm:0.40.2, msw@npm:^0.40.2": version: 0.40.2 resolution: "msw@npm:0.40.2" dependencies: @@ -21572,37 +21743,64 @@ fsevents@^1.2.7: languageName: node linkType: hard -"msw@patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752::locator=rtk-monorepo%40workspace%3A.": - version: 0.40.2 - resolution: "msw@patch:msw@npm%3A0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752::version=0.40.2&hash=830779&locator=rtk-monorepo%40workspace%3A." +"msw@npm:^0.28.2": + version: 0.28.2 + resolution: "msw@npm:0.28.2" dependencies: - "@mswjs/cookies": ^0.2.0 - "@mswjs/interceptors": ^0.15.1 + "@mswjs/cookies": ^0.1.4 + "@mswjs/interceptors": ^0.8.0 "@open-draft/until": ^1.0.3 - "@types/cookie": ^0.4.1 - "@types/js-levenshtein": ^1.1.1 - chalk: 4.1.1 + "@types/cookie": ^0.4.0 + "@types/inquirer": ^7.3.1 + "@types/js-levenshtein": ^1.1.0 + chalk: ^4.1.0 chokidar: ^3.4.2 - cookie: ^0.4.2 - graphql: ^16.3.0 - headers-polyfill: ^3.0.4 - inquirer: ^8.2.0 - is-node-process: ^1.0.1 + cookie: ^0.4.1 + graphql: ^15.4.0 + headers-utils: ^3.0.2 + inquirer: ^7.3.3 js-levenshtein: ^1.1.6 - node-fetch: ^2.6.7 - path-to-regexp: ^6.2.0 + node-fetch: ^2.6.1 + node-match-path: ^0.6.1 statuses: ^2.0.0 strict-event-emitter: ^0.2.0 - type-fest: ^1.2.2 - yargs: ^17.3.1 + yargs: ^16.2.0 + bin: + msw: cli/index.js + checksum: bfcac14831d88ebee0375933a84294696410a2f93a8dd0cf0d37fb8f641ce93e9d2d840253fb5755003ea8bd7126dc83bd6844066bf5073f0a264cd8c768dec7 + languageName: node + linkType: hard + +"msw@npm:^2.1.4": + version: 2.1.4 + resolution: "msw@npm:2.1.4" + dependencies: + "@bundled-es-modules/cookie": ^2.0.0 + "@bundled-es-modules/statuses": ^1.0.1 + "@mswjs/cookies": ^1.1.0 + "@mswjs/interceptors": ^0.25.14 + "@open-draft/until": ^2.1.0 + "@types/cookie": ^0.6.0 + "@types/statuses": ^2.0.4 + chalk: ^4.1.2 + chokidar: ^3.4.2 + graphql: ^16.8.1 + headers-polyfill: ^4.0.2 + inquirer: ^8.2.0 + is-node-process: ^1.2.0 + outvariant: ^1.4.2 + path-to-regexp: ^6.2.0 + strict-event-emitter: ^0.5.1 + type-fest: ^4.9.0 + yargs: ^17.7.2 peerDependencies: - typescript: ">= 4.2.x <= 4.6.x" + typescript: ">= 4.7.x <= 5.3.x" peerDependenciesMeta: typescript: optional: true bin: msw: cli/index.js - checksum: 3a5cd03a451462b2198824438ef3b81372c5fb3f39a81d1909141b7207a9776302bb90b98b2c0ddc67fe179b32cdadb83a0c69b2f7a256e36b21e58f102a6b7b + checksum: da8aaf9682ac48a635966beef9add9493297de797b266066bcd8ae0c2708488b81558251412e41489511a63deda1774b42e28197e9b73ddf14d9ecf8bb916e7a languageName: node linkType: hard @@ -21917,6 +22115,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-match-path@npm:^0.6.1": + version: 0.6.3 + resolution: "node-match-path@npm:0.6.3" + checksum: d515bc069f293688109c058ee02567528fdaa856290d362b80a2254734975014e4eefcdcc5164a8adfd5560aa870e277c97fe8be648074d5088056cf61553c7c + languageName: node + linkType: hard + "node-readfiles@npm:^0.2.0": version: 0.2.0 resolution: "node-readfiles@npm:0.2.0" @@ -22512,6 +22717,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"outvariant@npm:^1.4.0, outvariant@npm:^1.4.2": + version: 1.4.2 + resolution: "outvariant@npm:1.4.2" + checksum: 5d9e2b3edb1cc8be9cbfc1c8c97e8b05137c4384bbfc56e0a465de26c5d2f023e65732ddcda9d46599b06d667fbc0de32c30d2ecd11f6f3f43bcf8ce0d320918 + languageName: node + linkType: hard + "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -27768,7 +27980,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"statuses@npm:2.0.1, statuses@npm:^2.0.0": +"statuses@npm:2.0.1, statuses@npm:^2.0.0, statuses@npm:^2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb @@ -27852,6 +28064,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"strict-event-emitter@npm:^0.5.1": + version: 0.5.1 + resolution: "strict-event-emitter@npm:0.5.1" + checksum: 350480431bc1c28fdb601ef4976c2f8155fc364b4740f9692dd03e5bdd48aafc99a5e021fe655fbd986d0b803e9f3fc5c4b018b35cb838c4690d60f2a26f1cf3 + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -31613,7 +31832,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1": +"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c @@ -31669,6 +31888,21 @@ fsevents@^1.2.7: languageName: node linkType: hard +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" From aa0eef762f7f7e52b04ab43caa973f16b66f1897 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:54:22 -0600 Subject: [PATCH 169/368] Fix stubbing globals in `vitest.setup.ts` --- packages/toolkit/vitest.setup.ts | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/toolkit/vitest.setup.ts b/packages/toolkit/vitest.setup.ts index fc4a30240e..1be6b0b461 100644 --- a/packages/toolkit/vitest.setup.ts +++ b/packages/toolkit/vitest.setup.ts @@ -1,19 +1,18 @@ -//@ts-ignore -import nodeFetch from 'node-fetch' -//@ts-ignore -globalThis.fetch = nodeFetch -//@ts-ignore -globalThis.Request = nodeFetch.Request -globalThis.Headers = nodeFetch.Headers +import nodeFetch, { Headers, Request } from 'node-fetch' import { server } from './src/query/tests/mocks/server' -beforeAll(() => server.listen({ onUnhandledRequest: 'error' })) -afterEach(() => server.resetHandlers()) -afterAll(() => server.close()) +vi.stubGlobal('fetch', nodeFetch) +vi.stubGlobal('Request', Request) +vi.stubGlobal('Headers', Headers) -process.on('unhandledRejection', (error) => { - // eslint-disable-next-line no-undef - fail(error) +beforeAll(() => { + server.listen({ onUnhandledRequest: 'error' }) }) -process.env.NODE_ENV = 'development' +afterEach(() => { + server.resetHandlers() +}) + +afterAll(() => { + server.close() +}) From 15dfd2ce15d5b07716c59d9c64b28e5fbc324b31 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:59:30 -0600 Subject: [PATCH 170/368] Fix handlers to be compatible with latest version of `msw` --- .../toolkit/src/query/tests/mocks/server.ts | 114 ++++++++++++------ 1 file changed, 74 insertions(+), 40 deletions(-) diff --git a/packages/toolkit/src/query/tests/mocks/server.ts b/packages/toolkit/src/query/tests/mocks/server.ts index 62d1c350f5..12197674d6 100644 --- a/packages/toolkit/src/query/tests/mocks/server.ts +++ b/packages/toolkit/src/query/tests/mocks/server.ts @@ -1,62 +1,96 @@ import { setupServer } from 'msw/node' -import { rest } from 'msw' - -// This configures a request mocking server with the given request handlers. +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' export type Post = { - id: number + id: string title: string body: string } -export const posts: Record = { - 1: { id: 1, title: 'hello', body: 'extra body!' }, +export const posts: Record = { + '1': { id: '1', title: 'hello', body: 'extra body!' }, } -export const server = setupServer( - rest.get('https://example.com/echo', (req, res, ctx) => - res(ctx.json({ ...req, headers: req.headers.all() })) - ), - rest.post('https://example.com/echo', (req, res, ctx) => - res(ctx.json({ ...req, headers: req.headers.all() })) - ), - rest.get('https://example.com/success', (_, res, ctx) => - res(ctx.json({ value: 'success' })) +export const handlers = [ + http.get( + 'https://example.com/echo', + async ({ request, params, cookies, requestId }) => { + return HttpResponse.json( + { + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }, + { headers: request.headers } + ) + } ), - rest.post('https://example.com/success', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post( + 'https://example.com/echo', + async ({ request, cookies, params, requestId }) => { + const body = headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + + return HttpResponse.json( + { + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: request?.headers + ? headersToObject(request.headers) + : request?.headers, + }, + { headers: request.headers } + ) + } ), - rest.get('https://example.com/empty', (_, res, ctx) => res(ctx.body(''))), - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'success' }) + }), + http.post('https://example.com/success', ({ request }) => { + return HttpResponse.json({ value: 'success' }) + }), + http.get('https://example.com/empty', () => new HttpResponse('')), + http.get('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ), - rest.post('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ), - rest.get('https://example.com/nonstandard-error', (_, res, ctx) => - res( - ctx.status(200), - ctx.json({ + http.get('https://example.com/nonstandard-error', () => + HttpResponse.json( + { success: false, message: 'This returns a 200 but is really an error', - }) + }, + { status: 200 } ) ), - rest.get('https://example.com/mirror', (req, res, ctx) => - res(ctx.json(req.params)) + http.get('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) ), - rest.post('https://example.com/mirror', (req, res, ctx) => - res(ctx.json(req.params)) + http.post('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) ), - rest.get('https://example.com/posts/random', (req, res, ctx) => { + http.get('https://example.com/posts/random', () => { // just simulate an api that returned a random ID - const { id, ..._post } = posts[1] - return res(ctx.json({ id })) + const { id } = posts[1] + return HttpResponse.json({ id }) }), - rest.get( + http.get>( 'https://example.com/post/:id', - (req, res, ctx) => { - return res(ctx.json(posts[req.params.id])) - } - ) -) + ({ params }) => HttpResponse.json(posts[params.id]) + ), +] + + +// This configures a request mocking server with the given request handlers. +export const server = setupServer(...handlers) From 0e99f8325f8c2a465f1c3654cf28675ed75e21db Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:00:31 -0600 Subject: [PATCH 171/368] Split up handlers and server files --- .../toolkit/src/query/tests/mocks/handlers.ts | 91 ++++++++++++++++++ .../toolkit/src/query/tests/mocks/server.ts | 93 +------------------ 2 files changed, 92 insertions(+), 92 deletions(-) create mode 100644 packages/toolkit/src/query/tests/mocks/handlers.ts diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts new file mode 100644 index 0000000000..5602d5b26e --- /dev/null +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -0,0 +1,91 @@ +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' + +export type Post = { + id: string + title: string + body: string +} + +export const posts: Record = { + '1': { id: '1', title: 'hello', body: 'extra body!' }, +} + +export const handlers = [ + http.get( + 'https://example.com/echo', + async ({ request, params, cookies, requestId }) => { + return HttpResponse.json( + { + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }, + { headers: request.headers } + ) + } + ), + http.post( + 'https://example.com/echo', + async ({ request, cookies, params, requestId }) => { + const body = headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + + return HttpResponse.json( + { + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: request?.headers + ? headersToObject(request.headers) + : request?.headers, + }, + { headers: request.headers } + ) + } + ), + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'success' }) + }), + http.post('https://example.com/success', ({ request }) => { + return HttpResponse.json({ value: 'success' }) + }), + http.get('https://example.com/empty', () => new HttpResponse('')), + http.get('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) + ), + http.post('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) + ), + http.get('https://example.com/nonstandard-error', () => + HttpResponse.json( + { + success: false, + message: 'This returns a 200 but is really an error', + }, + { status: 200 } + ) + ), + http.get('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) + ), + http.post('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) + ), + http.get('https://example.com/posts/random', () => { + // just simulate an api that returned a random ID + const { id } = posts[1] + return HttpResponse.json({ id }) + }), + http.get>( + 'https://example.com/post/:id', + ({ params }) => HttpResponse.json(posts[params.id]) + ), +] diff --git a/packages/toolkit/src/query/tests/mocks/server.ts b/packages/toolkit/src/query/tests/mocks/server.ts index 12197674d6..5dc2fb1467 100644 --- a/packages/toolkit/src/query/tests/mocks/server.ts +++ b/packages/toolkit/src/query/tests/mocks/server.ts @@ -1,96 +1,5 @@ import { setupServer } from 'msw/node' -import { headersToObject } from 'headers-polyfill' -import { HttpResponse, http } from 'msw' - -export type Post = { - id: string - title: string - body: string -} - -export const posts: Record = { - '1': { id: '1', title: 'hello', body: 'extra body!' }, -} - -export const handlers = [ - http.get( - 'https://example.com/echo', - async ({ request, params, cookies, requestId }) => { - return HttpResponse.json( - { - ...request, - params, - cookies, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }, - { headers: request.headers } - ) - } - ), - http.post( - 'https://example.com/echo', - async ({ request, cookies, params, requestId }) => { - const body = headersToObject(request.headers)['content-type'] === 'text/html' - ? await request.text() - : await request.json() - - return HttpResponse.json( - { - ...request, - cookies, - params, - requestId, - body, - url: new URL(request.url), - headers: request?.headers - ? headersToObject(request.headers) - : request?.headers, - }, - { headers: request.headers } - ) - } - ), - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'success' }) - }), - http.post('https://example.com/success', ({ request }) => { - return HttpResponse.json({ value: 'success' }) - }), - http.get('https://example.com/empty', () => new HttpResponse('')), - http.get('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.post('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.get('https://example.com/nonstandard-error', () => - HttpResponse.json( - { - success: false, - message: 'This returns a 200 but is really an error', - }, - { status: 200 } - ) - ), - http.get('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.post('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.get('https://example.com/posts/random', () => { - // just simulate an api that returned a random ID - const { id } = posts[1] - return HttpResponse.json({ id }) - }), - http.get>( - 'https://example.com/post/:id', - ({ params }) => HttpResponse.json(posts[params.id]) - ), -] - +import { handlers } from './handlers' // This configures a request mocking server with the given request handlers. export const server = setupServer(...handlers) From 42ffa5217ebba10391e4fede0c5da69c39c5084e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:08:09 -0600 Subject: [PATCH 172/368] Use codemods provided by msw to modernize msw syntax --- .../src/query/tests/buildCreateApi.test.tsx | 44 ++------- .../src/query/tests/buildHooks.test.tsx | 64 ++++++------ .../toolkit/src/query/tests/createApi.test.ts | 70 +++++++------ .../src/query/tests/errorHandling.test.tsx | 62 ++++++------ .../src/query/tests/fetchBaseQuery.test.tsx | 97 +++++++++++-------- packages/toolkit/src/query/tests/helpers.tsx | 18 ++-- .../toolkit/src/query/tests/queryFn.test.tsx | 4 +- .../src/query/tests/queryLifecycle.test.tsx | 8 +- .../toolkit/src/tests/combineSlices.test.ts | 7 ++ .../toolkit/src/tests/createSlice.test.ts | 7 ++ 10 files changed, 195 insertions(+), 186 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index ad5ff1af55..ec12eefec1 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -1,3 +1,10 @@ +import { createSelectorCreator, lruMemoize } from '@reduxjs/toolkit' +import { + buildCreateApi, + coreModule, + reactHooksModule, +} from '@reduxjs/toolkit/query/react' +import { render, screen, waitFor } from '@testing-library/react' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { @@ -6,42 +13,7 @@ import { createStoreHook, Provider, } from 'react-redux' -import { - buildCreateApi, - coreModule, - reactHooksModule, -} from '@reduxjs/toolkit/query/react' -import { - act, - fireEvent, - render, - screen, - waitFor, - renderHook, -} from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { rest } from 'msw' -import { - actionsReducer, - ANY, - expectExactType, - expectType, - setupApiStore, - withProvider, - useRenderCounter, - waitMs, -} from './helpers' -import { server } from './mocks/server' -import type { UnknownAction } from 'redux' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' -import type { SerializedError } from '@reduxjs/toolkit' -import { - createListenerMiddleware, - configureStore, - lruMemoize, - createSelectorCreator, -} from '@reduxjs/toolkit' -import { delay } from '../../utils' +import { setupApiStore, useRenderCounter, waitMs } from './helpers' const MyContext = React.createContext(null as any) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index e9f1f1ac90..fc28863fdc 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -20,10 +20,9 @@ import { renderHook, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' import { actionsReducer, - ANY, expectExactType, expectType, setupApiStore, @@ -104,7 +103,7 @@ const api = createApi({ query: (update) => ({ body: update }), }), getError: build.query({ - query: (query) => '/error', + query: () => '/error', }), listItems: build.query({ serializeQueryArgs: ({ endpointName }) => { @@ -119,7 +118,7 @@ const api = createApi({ merge: (currentCache, newItems) => { currentCache.push(...newItems) }, - forceRefetch: ({ currentArg, previousArg }) => { + forceRefetch: () => { return true }, }), @@ -757,7 +756,7 @@ describe('hooks tests', () => { } // 1) Initial state: an active subscription - const { result, rerender, unmount } = renderHook( + const { rerender, unmount } = renderHook( ([arg, options]: Parameters< typeof pokemonApi.useGetPokemonByNameQuery >) => pokemonApi.useGetPokemonByNameQuery(arg, options), @@ -1752,14 +1751,14 @@ describe('hooks tests', () => { test('initially failed useQueries that provide an tag will refetch after a mutation invalidates it', async () => { const checkSessionData = { name: 'matt' } server.use( - rest.get('https://example.com/me', (req, res, ctx) => { - return res.once(ctx.status(500)) + http.get('https://example.com/me', () => { + return HttpResponse.json(null, { status: 500 }) + }, { once: true }), + http.get('https://example.com/me', () => { + return HttpResponse.json(checkSessionData) }), - rest.get('https://example.com/me', (req, res, ctx) => { - return res(ctx.json(checkSessionData)) - }), - rest.post('https://example.com/login', (req, res, ctx) => { - return res(ctx.status(200)) + http.post('https://example.com/login', () => { + return HttpResponse.json(null, { status: 200 }) }) ) let data, isLoading, isError @@ -1977,39 +1976,41 @@ describe('hooks with createApi defaults set', () => { posts = [...initialPosts] const handlers = [ - rest.get('https://example.com/posts', (req, res, ctx) => { - return res(ctx.json(posts)) + http.get('https://example.com/posts', () => { + return HttpResponse.json(posts) }), - rest.put>( + http.put>( 'https://example.com/post/:id', - (req, res, ctx) => { - const id = Number(req.params.id) + async ({ request, params }) => { + const body = await request.json(); + const id = Number(params.id) const idx = posts.findIndex((post) => post.id === id) const newPosts = posts.map((post, index) => index !== idx ? post : { - ...req.body, + ...body, id, - name: req.body.name || post.name, + name: body?.name || post.name, fetched_at: new Date().toUTCString(), } ) posts = [...newPosts] - return res(ctx.json(posts)) + return HttpResponse.json(posts) } ), - rest.post('https://example.com/post', (req, res, ctx) => { - let post = req.body as Omit + http.post>('https://example.com/post', async ({ request }) => { + const body = await request.json(); + let post = body startingId += 1 posts.concat({ ...post, fetched_at: new Date().toISOString(), id: startingId, }) - return res(ctx.json(posts)) + return HttpResponse.json(posts) }), ] @@ -2017,7 +2018,7 @@ describe('hooks with createApi defaults set', () => { }) interface Post { - id: number + id: string name: string fetched_at: string } @@ -2091,7 +2092,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQueryState(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) getRenderCount = useRenderCounter() @@ -2170,7 +2171,7 @@ describe('hooks with createApi defaults set', () => { isSuccess, isError, }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), isUninitialized, isLoading, isFetching, @@ -2227,7 +2228,7 @@ describe('hooks with createApi defaults set', () => { getRenderCount = useRenderCounter() const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) @@ -2276,7 +2277,7 @@ describe('hooks with createApi defaults set', () => { @@ -2287,7 +2288,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) getRenderCount = useRenderCounter() @@ -2377,11 +2378,6 @@ describe('hooks with createApi defaults set', () => { test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { - const _res1 = api.endpoints.getPosts.useQuery(undefined, { - // selectFromResult must always return an object - // @ts-expect-error - selectFromResult: ({ data }) => data?.length ?? 0, - }) const res2 = api.endpoints.getPosts.useQuery(undefined, { // selectFromResult must always return an object diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index cdeb22c952..1d043104ba 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,35 +1,35 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { + FetchBaseQueryError, + FetchBaseQueryMeta, +} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' import type { Api, MutationDefinition, QueryDefinition, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { - FetchBaseQueryError, - FetchBaseQueryMeta, -} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' +import type { SpyInstance } from 'vitest' +import { vi } from 'vitest' +import type { + DefinitionsFromApi, + OverrideResultType, + TagTypesFromApi, +} from '@reduxjs/toolkit/dist/query/endpointDefinitions' +import { HttpResponse, http } from 'msw' +import nodeFetch from 'node-fetch' +import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { ANY, - expectType, expectExactType, + expectType, + getSerializedHeaders, setupApiStore, waitMs, - getSerializedHeaders, } from './helpers' import { server } from './mocks/server' -import { rest } from 'msw' -import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' -import { string } from 'yargs' -import type { - DefinitionsFromApi, - OverrideResultType, - TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' const originalEnv = process.env.NODE_ENV beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) @@ -651,11 +651,12 @@ describe('additional transformResponse behaviors', () => { query: build.query({ query: () => '/success', transformResponse: async (response: SuccessResponse) => { - const res = await fetch('https://example.com/echo', { + const res: any = await nodeFetch('https://example.com/echo', { method: 'POST', body: JSON.stringify({ banana: 'bread' }), }).then((res) => res.json()) - const additionalData = JSON.parse(res.body) as EchoResponseData + + const additionalData = res.body as EchoResponseData return { ...response, ...additionalData } }, }), @@ -680,6 +681,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse handles an async transformation and returns the merged data (query)', async () => { const result = await storeRef.store.dispatch(api.endpoints.query.initiate()) + console.log(result) expect(result.data).toEqual({ value: 'success', banana: 'bread' }) }) @@ -716,7 +718,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - 'x-powered-by': 'msw', + // 'x-powered-by': 'msw', }, }, }, @@ -737,7 +739,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - 'x-powered-by': 'msw', + // 'x-powered-by': 'msw', }, }, }, @@ -795,8 +797,10 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('query lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'failed' })) + http.get( + 'https://example.com/success', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) ) @@ -819,8 +823,10 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('mutation lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - rest.post('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'failed' })) + http.post( + 'https://example.com/success', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) ) @@ -944,7 +950,7 @@ describe('custom serializeQueryArgs per endpoint', () => { } const dummyClient: MyApiClient = { - async fetchPost(id) { + async fetchPost() { return { value: 'success' } }, } @@ -1105,12 +1111,13 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - rest.get('https://example.com/listItems', (req, res, ctx) => { - const pageString = req.url.searchParams.get('page') + http.get('https://example.com/listItems', ({ request }) => { + const url = new URL(request.url) + const pageString = url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return res(ctx.json(results)) + return HttpResponse.json(results) }) ) @@ -1133,12 +1140,13 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - rest.get('https://example.com/listItems2', (req, res, ctx) => { - const pageString = req.url.searchParams.get('page') + http.get('https://example.com/listItems2', ({ request }) => { + const url = new URL(request.url) + const pageString = url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return res(ctx.json(results)) + return HttpResponse.json(results) }) ) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index 96a3e0cc63..de6eb2c3da 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' import axios from 'axios' import { expectExactType, hookWaitFor, setupApiStore } from './helpers' @@ -34,8 +34,8 @@ const api = createApi({ const storeRef = setupApiStore(api) -const failQueryOnce = rest.get('/query', (_, req, ctx) => - req.once(ctx.status(500), ctx.json({ value: 'failed' })) +const failQueryOnce = http.get('/query', () => + HttpResponse.json({ value: 'failed' }, { status: 500 }), { once: true } ) describe('fetchBaseQuery', () => { @@ -85,8 +85,8 @@ describe('fetchBaseQuery', () => { describe('query error handling', () => { test('success', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -106,8 +106,8 @@ describe('query error handling', () => { test('error', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -130,8 +130,8 @@ describe('query error handling', () => { test('success -> error', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -149,8 +149,8 @@ describe('query error handling', () => { ) server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -174,13 +174,13 @@ describe('query error handling', () => { test('error -> success', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -217,8 +217,8 @@ describe('query error handling', () => { describe('mutation error handling', () => { test('success', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -242,8 +242,8 @@ describe('mutation error handling', () => { test('error', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -270,8 +270,8 @@ describe('mutation error handling', () => { test('success -> error', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -295,8 +295,8 @@ describe('mutation error handling', () => { } server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -323,13 +323,13 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -442,8 +442,8 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/success', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { @@ -481,8 +481,8 @@ describe('error handling in a component', () => { test('a mutation is unwrappable and has the correct types', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json(mockErrorResponse)) + http.get('https://example.com/success', () => + HttpResponse.json(mockErrorResponse, { status: 500 }), { once: true } ) ) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 6ab089f2be..5169bf6240 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,12 +1,11 @@ -import { vi } from 'vitest' import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' +import nodeFetch from 'node-fetch' import { setupApiStore, waitMs } from './helpers' import { server } from './mocks/server' -// @ts-ignore -import nodeFetch from 'node-fetch' -import { rest } from 'msw' +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' import queryString from 'query-string' import type { BaseQueryApi } from '../baseQueryTypes' @@ -19,7 +18,7 @@ const defaultHeaders: Record = { const baseUrl = 'https://example.com' // @ts-ignore -const fetchFn = vi.fn, any[]>(global.fetch) +const fetchFn = vi.fn, any[]>(nodeFetch) const baseQuery = fetchBaseQuery({ baseUrl, @@ -108,6 +107,7 @@ describe('fetchBaseQuery', () => { expect(res).toBeInstanceOf(Object) expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) + expect(res.data).toBeNull() }) @@ -143,8 +143,10 @@ describe('fetchBaseQuery', () => { describe('non-JSON-body', () => { it('success: should return data ("text" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -163,8 +165,10 @@ describe('fetchBaseQuery', () => { it('success: should fail gracefully (default="json" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -184,11 +188,10 @@ describe('fetchBaseQuery', () => { it('success: parse text without error ("content-type" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once( - ctx.text(`this is not json!`) - // NOTE: MSW sets content-type header as text automatically - ) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -213,11 +216,10 @@ describe('fetchBaseQuery', () => { it('success: parse json without error ("content-type" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once( - ctx.json(`this will become json!`) - // NOTE: MSW sets content-type header as json automatically - ) + http.get( + 'https://example.com/success', + () => HttpResponse.json(`this will become json!`), + { once: true } ) ) @@ -242,8 +244,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status ("text" responseHandler)', async () => { server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(`this is not json!`)) + http.get('https://example.com/error', () => + HttpResponse.text(`this is not json!`, { status: 500 }) ) ) @@ -266,8 +268,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status as text ("content-type" responseHandler)', async () => { const serverResponse = 'Internal Server Error' server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(serverResponse)) + http.get('https://example.com/error', () => + HttpResponse.text(serverResponse, { status: 500 }) ) ) @@ -295,8 +297,8 @@ describe('fetchBaseQuery', () => { errors: { field1: "Password cannot be 'password'" }, } server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json(serverResponse)) + http.get('https://example.com/error', () => + HttpResponse.json(serverResponse, { status: 500 }) ) ) @@ -321,8 +323,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail gracefully (default="json" responseHandler)', async () => { server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(`this is not json!`)) + http.get('https://example.com/error', () => + HttpResponse.text(`this is not json!`, { status: 500 }) ) ) @@ -914,8 +916,10 @@ describe('fetchBaseQuery', () => { describe('Accepts global arguments', () => { test('Global responseHandler', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -971,10 +975,17 @@ describe('fetchBaseQuery', () => { reject = _reject }) server.use( - rest.get('https://example.com/empty1', async (req, res, ctx) => { - await Promise.race([waitMs(3000), donePromise]) - return res.once(ctx.json({ ...req, headers: req.headers.all() })) - }) + http.get( + 'https://example.com/empty1', + async ({ request, params, cookies, requestId }) => { + await Promise.race([waitMs(2000), donePromise]) + return HttpResponse.json({ + ...request, + headers: headersToObject(request.headers), + }) + }, + { once: true } + ) ) const globalizedBaseQuery = fetchBaseQuery({ baseUrl, @@ -987,9 +998,10 @@ describe('fetchBaseQuery', () => { commonBaseQueryApi, {} ) + expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The user aborted a request.', + error: 'AbortError: The operation was aborted.', }) reject!() }) @@ -1083,10 +1095,17 @@ describe('timeout', () => { }) server.use( - rest.get('https://example.com/empty2', async (req, res, ctx) => { - await Promise.race([waitMs(3000), donePromise]) - return res.once(ctx.json({ ...req, headers: req.headers.all() })) - }) + http.get( + 'https://example.com/empty2', + async ({ request }) => { + await Promise.race([waitMs(3000), donePromise]) + return HttpResponse.json({ + ...request, + headers: headersToObject(request.headers), + }) + }, + { once: true } + ) ) const result = await baseQuery( { url: '/empty2', timeout: 200 }, @@ -1095,7 +1114,7 @@ describe('timeout', () => { ) expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The user aborted a request.', + error: 'AbortError: The operation was aborted.', }) reject!() }) diff --git a/packages/toolkit/src/query/tests/helpers.tsx b/packages/toolkit/src/query/tests/helpers.tsx index acf2bf097b..24e9edec1d 100644 --- a/packages/toolkit/src/query/tests/helpers.tsx +++ b/packages/toolkit/src/query/tests/helpers.tsx @@ -1,22 +1,22 @@ -import React, { useCallback } from 'react' import type { - UnknownAction, EnhancedStore, Middleware, - Store, Reducer, + Store, + UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' +import React, { useCallback } from 'react' import { Provider } from 'react-redux' +import { act, cleanup } from '@testing-library/react' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' -import { cleanup, act } from '@testing-library/react' export const ANY = 0 as any @@ -159,7 +159,7 @@ expect.extend({ if (normalize(log) === normalize(expectedOutput)) return { - message: () => `Console output matches + message: () => `Console output matches === ${expectedOutput} ===`, @@ -167,11 +167,11 @@ ${expectedOutput} } else return { - message: () => `Console output + message: () => `Console output === ${log} -=== -does not match +=== +does not match === ${expectedOutput} ===`, diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index daf751c6a3..1de7d4a473 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -3,8 +3,8 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { Post } from './mocks/server' -import { posts } from './mocks/server' +import type { Post } from './mocks/handlers' +import { posts } from './mocks/handlers' import { actionsReducer, setupApiStore } from './helpers' import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index d3099799b8..ec003f261c 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -8,7 +8,7 @@ import type { import { fetchBaseQuery } from '@reduxjs/toolkit/query' import { expectType, setupApiStore } from './helpers' import { server } from './mocks/server' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -398,9 +398,9 @@ test('query: updateCachedData', async () => { // request 2: error expect(onError).not.toHaveBeenCalled() server.use( - rest.get('https://example.com/success', (_, req, ctx) => - req.once(ctx.status(500), ctx.json({ value: 'failed' })) - ) + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'failed' }, {status: 500}) + }, {once: true}), ) storeRef.store.dispatch( extended.endpoints.injected.initiate('arg', { forceRefetch: true }) diff --git a/packages/toolkit/src/tests/combineSlices.test.ts b/packages/toolkit/src/tests/combineSlices.test.ts index 4e3439fd0f..d98117bc7c 100644 --- a/packages/toolkit/src/tests/combineSlices.test.ts +++ b/packages/toolkit/src/tests/combineSlices.test.ts @@ -65,6 +65,13 @@ describe('combineSlices', () => { }) }) describe('injects', () => { + beforeEach(() => { + + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs + }) + it('injects slice', () => { const combinedReducer = combineSlices(stringSlice).withLazyLoadedSlices< diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 957d5949cf..741788afcf 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -56,6 +56,13 @@ describe('createSlice', () => { }) describe('when initial state is undefined', () => { + beforeEach(() => { + + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs + }) + it('should throw an error', () => { createSlice({ name: 'test', From 4fdae59596a55f58cb831df5d9801f59a30b98a0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:09:55 -0600 Subject: [PATCH 173/368] Skip faulty tests for now --- packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 5169bf6240..5d4c4d565d 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -969,7 +969,7 @@ describe('fetchBaseQuery', () => { }) }) - test('Global timeout', async () => { + test.skip('Global timeout', async () => { let reject: () => void const donePromise = new Promise((resolve, _reject) => { reject = _reject @@ -977,7 +977,7 @@ describe('fetchBaseQuery', () => { server.use( http.get( 'https://example.com/empty1', - async ({ request, params, cookies, requestId }) => { + async ({ request }) => { await Promise.race([waitMs(2000), donePromise]) return HttpResponse.json({ ...request, @@ -1049,7 +1049,7 @@ describe('fetchFn', () => { }) describe('FormData', () => { - test('sets the right headers when sending FormData', async () => { + test.skip('sets the right headers when sending FormData', async () => { const body = new FormData() body.append('username', 'test') body.append( @@ -1088,7 +1088,7 @@ describe('still throws on completely unexpected errors', () => { }) describe('timeout', () => { - test('throws a timeout error when a request takes longer than specified timeout duration', async () => { + test.skip('throws a timeout error when a request takes longer than specified timeout duration', async () => { let reject: () => void const donePromise = new Promise((resolve, _reject) => { reject = _reject From 1db913027551516e414bcb54d4a452093687c103 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:16:24 -0600 Subject: [PATCH 174/368] Bump TS version for toolkit --- packages/toolkit/package.json | 2 +- yarn.lock | 26 +++----------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 5fcb4bc5ea..e3d82b7285 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -89,7 +89,7 @@ "tslib": "^1.10.0", "tsup": "^7.2.0", "tsx": "^3.12.2", - "typescript": "5.2", + "typescript": "^5.3.3", "vitest": "^1.1.3", "yargs": "^15.3.1" }, diff --git a/yarn.lock b/yarn.lock index 1710704aef..2d2c863000 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7147,7 +7147,7 @@ __metadata: tslib: ^1.10.0 tsup: ^7.2.0 tsx: ^3.12.2 - typescript: 5.2 + typescript: ^5.3.3 vitest: ^1.1.3 yargs: ^15.3.1 peerDependencies: @@ -29565,17 +29565,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@npm:5.2": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c - languageName: node - linkType: hard - -"typescript@npm:5.3.3, typescript@npm:^5.0.0, typescript@npm:^5.2.2": +"typescript@npm:5.3.3, typescript@npm:^5.0.0, typescript@npm:^5.2.2, typescript@npm:^5.3.3": version: 5.3.3 resolution: "typescript@npm:5.3.3" bin: @@ -29625,17 +29615,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"typescript@patch:typescript@5.2#~builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=701156" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 - languageName: node - linkType: hard - -"typescript@patch:typescript@5.3.3#~builtin, typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": +"typescript@patch:typescript@5.3.3#~builtin, typescript@patch:typescript@^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin, typescript@patch:typescript@^5.3.3#~builtin": version: 5.3.3 resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=701156" bin: From c8e1961b15b180dd008692ec3b34b086b1cf839d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:22:45 -0600 Subject: [PATCH 175/368] Convert `createSlice` skip test to todo test --- .../toolkit/src/tests/createSlice.test.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 741788afcf..94b67126e1 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -1,17 +1,16 @@ -import { vi } from 'vitest' import type { PayloadAction, WithSlice } from '@reduxjs/toolkit' import { asyncThunkCreator, buildCreateSlice, - configureStore, combineSlices, - createSlice, + configureStore, createAction, + createSlice, } from '@reduxjs/toolkit' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' type CreateSlice = typeof createSlice @@ -57,7 +56,6 @@ describe('createSlice', () => { describe('when initial state is undefined', () => { beforeEach(() => { - vi.stubEnv('NODE_ENV', 'development') return vi.unstubAllEnvs @@ -445,11 +443,12 @@ describe('createSlice', () => { }) // TODO Determine final production behavior here - it.skip('Crashes in production', () => { - process.env.NODE_ENV = 'production' + it.todo('Crashes in production', () => { + vi.stubEnv('NODE_ENV', 'production') + const { createSlice } = require('../createSlice') - let dummySlice = (createSlice as CreateSlice)({ + const dummySlice = (createSlice as CreateSlice)({ name: 'dummy', initialState: [], reducers: {}, @@ -457,13 +456,15 @@ describe('createSlice', () => { extraReducers: {}, }) const wrapper = () => { - let reducer = dummySlice.reducer + const { reducer } = dummySlice reducer(undefined, { type: 'dummy' }) } expect(wrapper).toThrowError( /The object notation for `createSlice.extraReducers` has been removed/ ) + + vi.unstubAllEnvs() }) }) describe('slice selectors', () => { From 7e54e5ce907c2d747b72e0e5d76e4b197f4b6ec0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:25:53 -0600 Subject: [PATCH 176/368] Fix timeout tests --- .../toolkit/src/query/tests/createApi.test.ts | 3 -- .../src/query/tests/fetchBaseQuery.test.tsx | 36 ++++++++++--------- packages/toolkit/vitest.config.mts | 2 +- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 1d043104ba..cf2ffae030 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -681,7 +681,6 @@ describe('additional transformResponse behaviors', () => { test('transformResponse handles an async transformation and returns the merged data (query)', async () => { const result = await storeRef.store.dispatch(api.endpoints.query.initiate()) - console.log(result) expect(result.data).toEqual({ value: 'success', banana: 'bread' }) }) @@ -718,7 +717,6 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - // 'x-powered-by': 'msw', }, }, }, @@ -739,7 +737,6 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - // 'x-powered-by': 'msw', }, }, }, diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 5d4c4d565d..a43c5d9ce9 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -969,24 +969,26 @@ describe('fetchBaseQuery', () => { }) }) - test.skip('Global timeout', async () => { - let reject: () => void - const donePromise = new Promise((resolve, _reject) => { - reject = _reject - }) + test('Global timeout', async () => { server.use( http.get( 'https://example.com/empty1', - async ({ request }) => { - await Promise.race([waitMs(2000), donePromise]) + async ({ request, cookies, params, requestId }) => { + await delay(300) + return HttpResponse.json({ ...request, + cookies, + params, + requestId, + url: new URL(request.url), headers: headersToObject(request.headers), }) }, { once: true } ) ) + const globalizedBaseQuery = fetchBaseQuery({ baseUrl, fetchFn: fetchFn as any, @@ -1003,7 +1005,6 @@ describe('fetchBaseQuery', () => { status: 'TIMEOUT_ERROR', error: 'AbortError: The operation was aborted.', }) - reject!() }) }) }) @@ -1088,34 +1089,35 @@ describe('still throws on completely unexpected errors', () => { }) describe('timeout', () => { - test.skip('throws a timeout error when a request takes longer than specified timeout duration', async () => { - let reject: () => void - const donePromise = new Promise((resolve, _reject) => { - reject = _reject - }) - + test('throws a timeout error when a request takes longer than specified timeout duration', async () => { server.use( http.get( 'https://example.com/empty2', - async ({ request }) => { - await Promise.race([waitMs(3000), donePromise]) + async ({ request, cookies, params, requestId }) => { + await delay(300) + return HttpResponse.json({ ...request, + url: new URL(request.url), + cookies, + params, + requestId, headers: headersToObject(request.headers), }) }, { once: true } ) ) + const result = await baseQuery( { url: '/empty2', timeout: 200 }, commonBaseQueryApi, {} ) + expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', error: 'AbortError: The operation was aborted.', }) - reject!() }) }) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 82774ebfa4..5dc15c9e03 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -25,6 +25,6 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, - server: { deps: { inline: ['redux', '@reduxjs/toolkit'], } }, + server: { deps: { inline: ['redux', '@reduxjs/toolkit'] } }, }, }) From 4237e776d65770367642fbd2738d80df49dbcf14 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:26:31 -0600 Subject: [PATCH 177/368] Fix `FormData` tests --- .../src/query/tests/fetchBaseQuery.test.tsx | 10 ++- .../toolkit/src/query/tests/mocks/handlers.ts | 67 +++++++++---------- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index a43c5d9ce9..ca9fe832e1 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,11 +1,11 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import nodeFetch from 'node-fetch' -import { setupApiStore, waitMs } from './helpers' +import { setupApiStore } from './helpers' import { server } from './mocks/server' import { headersToObject } from 'headers-polyfill' -import { HttpResponse, http } from 'msw' +import { HttpResponse, delay, http } from 'msw' import queryString from 'query-string' import type { BaseQueryApi } from '../baseQueryTypes' @@ -1050,9 +1050,11 @@ describe('fetchFn', () => { }) describe('FormData', () => { - test.skip('sets the right headers when sending FormData', async () => { + test('sets the right headers when sending FormData', async () => { const body = new FormData() + body.append('username', 'test') + body.append( 'file', new Blob([JSON.stringify({ hello: 'there' }, null, 2)], { @@ -1065,7 +1067,9 @@ describe('FormData', () => { commonBaseQueryApi, {} ) + const request: any = res.data + expect(request.headers['content-type']).not.toContain('application/json') }) }) diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts index 5602d5b26e..945d629ea3 100644 --- a/packages/toolkit/src/query/tests/mocks/handlers.ts +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -15,48 +15,47 @@ export const handlers = [ http.get( 'https://example.com/echo', async ({ request, params, cookies, requestId }) => { - return HttpResponse.json( - { - ...request, - params, - cookies, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }, - { headers: request.headers } - ) + return HttpResponse.json({ + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }) } ), http.post( 'https://example.com/echo', async ({ request, cookies, params, requestId }) => { - const body = headersToObject(request.headers)['content-type'] === 'text/html' - ? await request.text() - : await request.json() + let body - return HttpResponse.json( - { - ...request, - cookies, - params, - requestId, - body, - url: new URL(request.url), - headers: request?.headers - ? headersToObject(request.headers) - : request?.headers, - }, - { headers: request.headers } - ) + try { + body = + headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + } catch (err) { + body = request.body + } + + return HttpResponse.json({ + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: headersToObject(request.headers), + }) } ), - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'success' }) - }), - http.post('https://example.com/success', ({ request }) => { - return HttpResponse.json({ value: 'success' }) - }), + http.get('https://example.com/success', () => + HttpResponse.json({ value: 'success' }) + ), + http.post('https://example.com/success', () => + HttpResponse.json({ value: 'success' }) + ), http.get('https://example.com/empty', () => new HttpResponse('')), http.get('https://example.com/error', () => HttpResponse.json({ value: 'error' }, { status: 500 }) From 75b5e2da724aec0551ec03864523841e4b0ad9e9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:38:07 -0600 Subject: [PATCH 178/368] Segregate `buildMiddleware` type tests and runtime tests --- .../src/query/tests/buildMiddleware.test-d.ts | 83 +++++++++++++++++++ .../src/query/tests/buildMiddleware.test.tsx | 49 +---------- 2 files changed, 84 insertions(+), 48 deletions(-) create mode 100644 packages/toolkit/src/query/tests/buildMiddleware.test-d.ts diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test-d.ts b/packages/toolkit/src/query/tests/buildMiddleware.test-d.ts new file mode 100644 index 0000000000..b7382f4077 --- /dev/null +++ b/packages/toolkit/src/query/tests/buildMiddleware.test-d.ts @@ -0,0 +1,83 @@ +import { createApi } from '@reduxjs/toolkit/query' + +const baseQuery = (args?: any) => ({ data: args }) + +const api = createApi({ + baseQuery, + tagTypes: ['Banana', 'Bread'], + endpoints: (build) => ({ + getBanana: build.query({ + query(id) { + return { url: `banana/${id}` } + }, + providesTags: ['Banana'], + }), + getBananas: build.query({ + query() { + return { url: 'bananas' } + }, + providesTags: ['Banana'], + }), + getBread: build.query({ + query(id) { + return { url: `bread/${id}` } + }, + providesTags: ['Bread'], + }), + }), +}) + +describe('type tests', () => { + it('should allow for an array of string TagTypes', () => { + api.util.invalidateTags(['Banana', 'Bread']) + }) + + it('should allow for an array of full TagTypes descriptions', () => { + api.util.invalidateTags([{ type: 'Banana' }, { type: 'Bread', id: 1 }]) + }) + + it('should allow for a mix of full descriptions as well as plain strings', () => { + api.util.invalidateTags(['Banana', { type: 'Bread', id: 1 }]) + }) + + it('should error when using non-existing TagTypes', () => { + // @ts-expect-error + api.util.invalidateTags(['Missing Tag']) + }) + + it('should error when using non-existing TagTypes in the full format', () => { + // @ts-expect-error + api.util.invalidateTags([{ type: 'Missing' }]) + }) + + it('should allow pre-fetching for an endpoint that takes an arg', () => { + api.util.prefetch('getBanana', 5, { force: true }) + api.util.prefetch('getBanana', 5, { force: false }) + api.util.prefetch('getBanana', 5, { ifOlderThan: false }) + api.util.prefetch('getBanana', 5, { ifOlderThan: 30 }) + api.util.prefetch('getBanana', 5, {}) + }) + + it('should error when pre-fetching with the incorrect arg type', () => { + // @ts-expect-error arg should be number, not string + api.util.prefetch('getBanana', '5', { force: true }) + }) + + it('should allow pre-fetching for an endpoint with a void arg', () => { + api.util.prefetch('getBananas', undefined, { force: true }) + api.util.prefetch('getBananas', undefined, { force: false }) + api.util.prefetch('getBananas', undefined, { ifOlderThan: false }) + api.util.prefetch('getBananas', undefined, { ifOlderThan: 30 }) + api.util.prefetch('getBananas', undefined, {}) + }) + + it('should error when pre-fetching with a defined arg when expecting void', () => { + // @ts-expect-error arg should be void, not number + api.util.prefetch('getBananas', 5, { force: true }) + }) + + it('should error when pre-fetching for an incorrect endpoint name', () => { + // @ts-expect-error endpoint name does not exist + api.util.prefetch('getPomegranates', undefined, { force: true }) + }) +}) diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index f6154ea848..1556d32a93 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -68,51 +68,4 @@ it('invalidates the specified tags', async () => { getBread.matchPending, getBread.matchFulfilled ) -}) - -describe.skip('TS only tests', () => { - it('should allow for an array of string TagTypes', () => { - api.util.invalidateTags(['Banana', 'Bread']) - }) - it('should allow for an array of full TagTypes descriptions', () => { - api.util.invalidateTags([{ type: 'Banana' }, { type: 'Bread', id: 1 }]) - }) - - it('should allow for a mix of full descriptions as well as plain strings', () => { - api.util.invalidateTags(['Banana', { type: 'Bread', id: 1 }]) - }) - it('should error when using non-existing TagTypes', () => { - // @ts-expect-error - api.util.invalidateTags(['Missing Tag']) - }) - it('should error when using non-existing TagTypes in the full format', () => { - // @ts-expect-error - api.util.invalidateTags([{ type: 'Missing' }]) - }) - it('should allow pre-fetching for an endpoint that takes an arg', () => { - api.util.prefetch('getBanana', 5, { force: true }) - api.util.prefetch('getBanana', 5, { force: false }) - api.util.prefetch('getBanana', 5, { ifOlderThan: false }) - api.util.prefetch('getBanana', 5, { ifOlderThan: 30 }) - api.util.prefetch('getBanana', 5, {}) - }) - it('should error when pre-fetching with the incorrect arg type', () => { - // @ts-expect-error arg should be number, not string - api.util.prefetch('getBanana', '5', { force: true }) - }) - it('should allow pre-fetching for an endpoint with a void arg', () => { - api.util.prefetch('getBananas', undefined, { force: true }) - api.util.prefetch('getBananas', undefined, { force: false }) - api.util.prefetch('getBananas', undefined, { ifOlderThan: false }) - api.util.prefetch('getBananas', undefined, { ifOlderThan: 30 }) - api.util.prefetch('getBananas', undefined, {}) - }) - it('should error when pre-fetching with a defined arg when expecting void', () => { - // @ts-expect-error arg should be void, not number - api.util.prefetch('getBananas', 5, { force: true }) - }) - it('should error when pre-fetching for an incorrect endpoint name', () => { - // @ts-expect-error endpoint name does not exist - api.util.prefetch('getPomegranates', undefined, { force: true }) - }) -}) +}) \ No newline at end of file From f0a9ef9e8cbb453efb7e897b0cd15979c2ef36e8 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:45:13 -0600 Subject: [PATCH 179/368] Rename `buildSelector.test.ts` to `buildSelector.test-d.ts` - This was done to be more explicit about the fact that this file only includes type tests. --- ...ildSelector.test.ts => buildSelector.test-d.ts} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename packages/toolkit/src/query/tests/{buildSelector.test.ts => buildSelector.test-d.ts} (86%) diff --git a/packages/toolkit/src/query/tests/buildSelector.test.ts b/packages/toolkit/src/query/tests/buildSelector.test-d.ts similarity index 86% rename from packages/toolkit/src/query/tests/buildSelector.test.ts rename to packages/toolkit/src/query/tests/buildSelector.test-d.ts index 5a62a1320d..968b70c3a5 100644 --- a/packages/toolkit/src/query/tests/buildSelector.test.ts +++ b/packages/toolkit/src/query/tests/buildSelector.test-d.ts @@ -1,10 +1,9 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { createSelector, configureStore } from '@reduxjs/toolkit' -import { expectExactType } from './helpers' +import { configureStore, createSelector } from '@reduxjs/toolkit' describe('buildSelector', () => { - test.skip('buildSelector typetest', () => { + test('buildSelector type test', () => { interface Todo { userId: number id: number @@ -50,9 +49,10 @@ describe('buildSelector', () => { // This only compiles if we carried the types through const upperTitle = todoTitle.toUpperCase() - expectExactType(upperTitle) + expectTypeOf(upperTitle).toEqualTypeOf() }) - test.skip('selectCachedArgsForQuery typetest', () => { + + test('selectCachedArgsForQuery type test', () => { interface Todo { userId: number id: number @@ -81,8 +81,8 @@ describe('buildSelector', () => { }, }) - expectExactType( + expectTypeOf( exampleApi.util.selectCachedArgsForQuery(store.getState(), 'getTodos') - ) + ).toEqualTypeOf() }) }) From 0017cbed0e2e858c5ba43b6849bb2fca7b4312c7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:54:44 -0600 Subject: [PATCH 180/368] Segregate `retry.test.ts` runtime and type tests --- .../toolkit/src/query/tests/devWarnings.test.tsx | 2 +- packages/toolkit/src/query/tests/retry.test-d.ts | 9 +++++++++ packages/toolkit/src/query/tests/retry.test.ts | 16 ++-------------- 3 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 packages/toolkit/src/query/tests/retry.test-d.ts diff --git a/packages/toolkit/src/query/tests/devWarnings.test.tsx b/packages/toolkit/src/query/tests/devWarnings.test.tsx index d87968f9f1..df8339f5f3 100644 --- a/packages/toolkit/src/query/tests/devWarnings.test.tsx +++ b/packages/toolkit/src/query/tests/devWarnings.test.tsx @@ -270,7 +270,7 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi * It would be great to support this case as well, but for now: * "It is what it is." */ - test.skip('common: two apis, only second middleware', async () => { + test.todo('common: two apis, only second middleware', async () => { const store = configureStore({ reducer: { // @ts-ignore diff --git a/packages/toolkit/src/query/tests/retry.test-d.ts b/packages/toolkit/src/query/tests/retry.test-d.ts new file mode 100644 index 0000000000..8576c1d820 --- /dev/null +++ b/packages/toolkit/src/query/tests/retry.test-d.ts @@ -0,0 +1,9 @@ +describe('RetryOptions type tests', () => { + test('RetryOptions only accepts one of maxRetries or retryCondition', () => { + // @ts-expect-error Should complain if both exist at once + const ro: RetryOptions = { + maxRetries: 5, + retryCondition: () => false, + } + }) +}) diff --git a/packages/toolkit/src/query/tests/retry.test.ts b/packages/toolkit/src/query/tests/retry.test.ts index 2bb35e89ae..9f90eecafa 100644 --- a/packages/toolkit/src/query/tests/retry.test.ts +++ b/packages/toolkit/src/query/tests/retry.test.ts @@ -1,8 +1,6 @@ -import { vi } from 'vitest' import type { BaseQueryFn } from '@reduxjs/toolkit/query' import { createApi, retry } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' -import type { RetryOptions } from '../retry' +import { setupApiStore } from './helpers' beforeEach(() => { vi.useFakeTimers() @@ -12,13 +10,11 @@ const loopTimers = async (max: number = 12) => { let count = 0 while (count < max) { await vi.advanceTimersByTimeAsync(1) - vi.advanceTimersByTime(120000) + vi.advanceTimersByTime(120_000) count++ } } -vi.fn() - describe('configuration', () => { test('retrying without any config options', async () => { const baseBaseQuery = vi.fn< @@ -468,12 +464,4 @@ describe('configuration', () => { expect(baseBaseQuery).toHaveBeenCalledTimes(1) }) - - test.skip('RetryOptions only accepts one of maxRetries or retryCondition', () => { - // @ts-expect-error Should complain if both exist at once - const ro: RetryOptions = { - maxRetries: 5, - retryCondition: () => false, - } - }) }) From 5563f1ca18d9db8cba0b869c10d8cfd0c2c8b645 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 01:31:43 -0600 Subject: [PATCH 181/368] Rename `unionTypes.test.ts` to `unionTypes.test-d.ts` - This was done to be more explicit about the fact that this file only includes type tests. --- .../src/query/tests/{unionTypes.test.ts => unionTypes.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/query/tests/{unionTypes.test.ts => unionTypes.test-d.ts} (100%) diff --git a/packages/toolkit/src/query/tests/unionTypes.test.ts b/packages/toolkit/src/query/tests/unionTypes.test-d.ts similarity index 100% rename from packages/toolkit/src/query/tests/unionTypes.test.ts rename to packages/toolkit/src/query/tests/unionTypes.test-d.ts From 931f6f687db602e064485c073e4dbf8348dddd6e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 01:32:32 -0600 Subject: [PATCH 182/368] Fix export issue in `retry.test-d.ts` --- packages/toolkit/src/query/tests/retry.test-d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/toolkit/src/query/tests/retry.test-d.ts b/packages/toolkit/src/query/tests/retry.test-d.ts index 8576c1d820..93862b41a9 100644 --- a/packages/toolkit/src/query/tests/retry.test-d.ts +++ b/packages/toolkit/src/query/tests/retry.test-d.ts @@ -7,3 +7,5 @@ describe('RetryOptions type tests', () => { } }) }) + +export {} From 771a308c9dc97c49464cd88f1b705796944669ce Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 02:21:15 -0600 Subject: [PATCH 183/368] Fix type tests inside `unionTypes.test-d.ts` --- .../src/query/tests/unionTypes.test-d.ts | 765 +++++++++++------- 1 file changed, 473 insertions(+), 292 deletions(-) diff --git a/packages/toolkit/src/query/tests/unionTypes.test-d.ts b/packages/toolkit/src/query/tests/unionTypes.test-d.ts index eaceba0b68..738d55ea71 100644 --- a/packages/toolkit/src/query/tests/unionTypes.test-d.ts +++ b/packages/toolkit/src/query/tests/unionTypes.test-d.ts @@ -1,15 +1,15 @@ import type { SerializedError } from '@reduxjs/toolkit' import type { FetchBaseQueryError, + TypedUseMutationResult, TypedUseQueryHookResult, TypedUseQueryStateResult, TypedUseQuerySubscriptionResult, - TypedUseMutationResult, } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { expectExactType, expectType } from './helpers' const baseQuery = fetchBaseQuery() + const api = createApi({ baseQuery, endpoints: (build) => ({ @@ -18,47 +18,66 @@ const api = createApi({ }), }) -describe.skip('TS only tests', () => { +describe('union types', () => { test('query selector union', () => { const result = api.endpoints.test.select()({} as any) if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isLoading) { - expectExactType('' as string | undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeNullable() + + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -66,78 +85,103 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) test('useQuery union', () => { const result = api.endpoints.test.useQuery() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isLoading) { - expectExactType(undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toEqualTypeOf() } if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isFetching) { - expectExactType('' as string | undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toBeBoolean() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as boolean)(result.isLoading) - expectExactType(false as boolean)(result.isSuccess) - expectExactType(false as false)(result.isError) + expectTypeOf(result.isSuccess).toBeBoolean() + + expectTypeOf(result.isError).toEqualTypeOf() } - expectExactType('' as string | undefined)(result.currentData) - // @ts-expect-error - expectExactType('' as string)(result.currentData) + expectTypeOf(result.currentData).toEqualTypeOf() + + expectTypeOf(result.currentData).not.toBeString() if (result.isSuccess) { if (!result.isFetching) { - expectExactType('' as string)(result.currentData) + expectTypeOf(result.currentData).toBeString() } else { - expectExactType('' as string | undefined)(result.currentData) - // @ts-expect-error - expectExactType('' as string)(result.currentData) + expectTypeOf(result.currentData).toEqualTypeOf() + + expectTypeOf(result.currentData).not.toBeString() } } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -145,64 +189,90 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) test('useQuery TS4.1 union', () => { const result = api.useTestQuery() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isLoading) { - expectExactType(undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isFetching) { - expectExactType('' as string | undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as boolean)(result.isLoading) - expectExactType(false as boolean)(result.isSuccess) - expectExactType(false as false)(result.isError) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toBeBoolean() + + expectTypeOf(result.isSuccess).toBeBoolean() + + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -210,7 +280,7 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) @@ -218,57 +288,82 @@ describe.skip('TS only tests', () => { const [_trigger, result] = api.endpoints.test.useLazyQuery() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toEqualTypeOf() } if (result.isLoading) { - expectExactType(undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isFetching) { - expectExactType('' as string | undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as boolean)(result.isLoading) - expectExactType(false as boolean)(result.isSuccess) - expectExactType(false as false)(result.isError) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toBeBoolean() + + expectTypeOf(result.isSuccess).toBeBoolean() + + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -276,7 +371,7 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) @@ -284,57 +379,83 @@ describe.skip('TS only tests', () => { const [_trigger, result] = api.useLazyTestQuery() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isLoading) { - expectExactType(undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) - expectExactType(false as false)(result.isFetching) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() + + expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as boolean)(result.isFetching) + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isFetching).toBeBoolean() } + if (result.isFetching) { - expectExactType('' as string | undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toEqualTypeOf() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toBeBoolean() + + expectTypeOf(result.isSuccess).toBeBoolean() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as boolean)(result.isLoading) - expectExactType(false as boolean)(result.isSuccess) - expectExactType(false as false)(result.isError) + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -342,7 +463,7 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) @@ -357,14 +478,24 @@ describe.skip('TS only tests', () => { ) const { refetch, ...useQueryResultWithoutMethods } = useQueryResult - expectExactType(useQueryStateResult)(useQueryResultWithoutMethods) - expectExactType(useQueryStateWithSelectFromResult)( - // @ts-expect-error + + assertType(useQueryStateResult) + + expectTypeOf(useQueryStateResult).toMatchTypeOf( useQueryResultWithoutMethods ) - expectType>>( - await refetch() + + expectTypeOf(useQueryStateResult).not.toEqualTypeOf( + useQueryResultWithoutMethods ) + + expectTypeOf(useQueryStateWithSelectFromResult) + .parameter(0) + .not.toEqualTypeOf(useQueryResultWithoutMethods) + + expectTypeOf(api.endpoints.test.select).returns.returns.toEqualTypeOf< + Awaited> + >() }) test('useQueryState (with selectFromResult)', () => { @@ -387,14 +518,15 @@ describe.skip('TS only tests', () => { } }, }) - expectExactType({ + + expectTypeOf({ data: '' as string | number, isUninitialized: false, isLoading: true, isFetching: true, isSuccess: false, isError: false, - })(result) + }).toEqualTypeOf(result) }) test('useQuery (with selectFromResult)', async () => { @@ -417,60 +549,78 @@ describe.skip('TS only tests', () => { } }, }) - expectExactType({ + + expectTypeOf({ data: '' as string | number, isUninitialized: false, isLoading: true, isFetching: true, isSuccess: false, isError: false, - })(result) + }).toEqualTypeOf(result) - expectType>>( - await refetch() - ) + expectTypeOf(api.endpoints.test.select).returns.returns.toEqualTypeOf< + Awaited> + >() }) test('useMutation union', () => { const [_trigger, result] = api.endpoints.mutation.useMutation() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isLoading) { - expectExactType(undefined as undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -478,7 +628,7 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) @@ -500,56 +650,74 @@ describe.skip('TS only tests', () => { } }, }) - expectExactType({ + + expectTypeOf({ data: '' as string, isUninitialized: false, isLoading: true, isSuccess: false, isError: false, reset: () => {}, - })(result) + }).toMatchTypeOf(result) }) test('useMutation TS4.1 union', () => { const [_trigger, result] = api.useMutationMutation() if (result.isUninitialized) { - expectExactType(undefined)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isLoading).toEqualTypeOf() - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isLoading) { - expectExactType(undefined as undefined)(result.data) - expectExactType( - undefined as SerializedError | FetchBaseQueryError | undefined - )(result.error) + expectTypeOf(result.data).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError | undefined + >() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isError) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isError) { - expectExactType('' as string | undefined)(result.data) - expectExactType({} as SerializedError | FetchBaseQueryError)(result.error) + expectTypeOf(result.data).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isSuccess) + expectTypeOf(result.error).toEqualTypeOf< + SerializedError | FetchBaseQueryError + >() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() + + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isSuccess).toEqualTypeOf() } + if (result.isSuccess) { - expectExactType('' as string)(result.data) - expectExactType(undefined)(result.error) + expectTypeOf(result.data).toBeString() + + expectTypeOf(result.error).toBeUndefined() + + expectTypeOf(result.isUninitialized).toEqualTypeOf() - expectExactType(false as false)(result.isUninitialized) - expectExactType(false as false)(result.isLoading) - expectExactType(false as false)(result.isError) + expectTypeOf(result.isLoading).toEqualTypeOf() + + expectTypeOf(result.isError).toEqualTypeOf() } - // @ts-expect-error - expectType(result) + expectTypeOf(result).not.toBeNever() + // is always one of those four if ( !result.isUninitialized && @@ -557,55 +725,68 @@ describe.skip('TS only tests', () => { !result.isError && !result.isSuccess ) { - expectType(result) + expectTypeOf(result).toBeNever() } }) +}) - test('"Typed" helper types', () => { - // useQuery - { - const result = api.endpoints.test.useQuery() - expectType>( - result - ) - } - // useQuery with selectFromResult - { - const result = api.endpoints.test.useQuery(undefined, { - selectFromResult: () => ({ x: true }), - }) - expectType< - TypedUseQueryHookResult - >(result) - } - // useQueryState - { - const result = api.endpoints.test.useQueryState() - expectType>( - result - ) - } - // useQueryState with selectFromResult - { - const result = api.endpoints.test.useQueryState(undefined, { - selectFromResult: () => ({ x: true }), - }) - expectType< - TypedUseQueryStateResult - >(result) - } - // useQuerySubscription - { - const result = api.endpoints.test.useQuerySubscription() - expectType< - TypedUseQuerySubscriptionResult - >(result) - } +describe('"Typed" helper types', () => { + test('useQuery', () => { + const result = api.endpoints.test.useQuery() - // useMutation - { - const [trigger, result] = api.endpoints.mutation.useMutation() - expectType>(result) - } + expectTypeOf< + TypedUseQueryHookResult + >().toEqualTypeOf(result) + }) + + test('useQuery with selectFromResult', () => { + const result = api.endpoints.test.useQuery(undefined, { + selectFromResult: () => ({ x: true }), + }) + + expectTypeOf< + TypedUseQueryHookResult + >().toEqualTypeOf(result) + }) + + test('useQueryState', () => { + const result = api.endpoints.test.useQueryState() + + expectTypeOf< + TypedUseQueryStateResult + >().toEqualTypeOf(result) + }) + + test('useQueryState with selectFromResult', () => { + const result = api.endpoints.test.useQueryState(undefined, { + selectFromResult: () => ({ x: true }), + }) + + expectTypeOf< + TypedUseQueryStateResult + >().toEqualTypeOf(result) + }) + + test('useQuerySubscription', () => { + const result = api.endpoints.test.useQuerySubscription() + + expectTypeOf< + TypedUseQuerySubscriptionResult + >().toEqualTypeOf(result) + }) + + test('useMutation', () => { + const [trigger, result] = api.endpoints.mutation.useMutation() + + expectTypeOf< + TypedUseMutationResult + >().toMatchTypeOf(result) + + // TODO: `TypedUseMutationResult` might need a closer look since here the result is assignable to it but they are not of equal types + expectTypeOf< + TypedUseMutationResult + >().not.toEqualTypeOf(result) + + assertType>(result) }) }) From f0dcf26940dcf782898c7bfe3dea2dcc886ee94a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 03:15:38 -0600 Subject: [PATCH 184/368] Add `customMatchers.d.ts` ambient declaration file --- packages/toolkit/src/query/tests/helpers.tsx | 20 ++----------------- .../src/tests/utils/customMatchers.d.ts | 12 +++++++++++ 2 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 packages/toolkit/src/tests/utils/customMatchers.d.ts diff --git a/packages/toolkit/src/query/tests/helpers.tsx b/packages/toolkit/src/query/tests/helpers.tsx index 24e9edec1d..dd73dfff9b 100644 --- a/packages/toolkit/src/query/tests/helpers.tsx +++ b/packages/toolkit/src/query/tests/helpers.tsx @@ -23,7 +23,7 @@ export const ANY = 0 as any export const DEFAULT_DELAY_MS = 150 export const getSerializedHeaders = (headers: Headers = new Headers()) => { - let result: Record = {} + const result: Record = {} headers.forEach((val, key) => { result[key] = val }) @@ -98,14 +98,6 @@ export const useRenderCounter = () => { return useCallback(() => countRef.current, []) } -declare global { - namespace jest { - interface Matchers { - toMatchSequence(...matchers: Array<(arg: any) => boolean>): R - } - } -} - expect.extend({ toMatchSequence( _actions: UnknownAction[], @@ -132,14 +124,6 @@ ${actions.map((a) => a.type).join('\n')}`, }, }) -declare global { - namespace jest { - interface Matchers { - toHaveConsoleOutput(expectedOutput: string): Promise - } - } -} - function normalize(str: string) { return str .normalize() @@ -154,7 +138,7 @@ expect.extend({ ) { const restore = mockConsole(createConsole()) await fn() - const log = getLog().log + const { log } = getLog() restore() if (normalize(log) === normalize(expectedOutput)) diff --git a/packages/toolkit/src/tests/utils/customMatchers.d.ts b/packages/toolkit/src/tests/utils/customMatchers.d.ts new file mode 100644 index 0000000000..1911ae10bd --- /dev/null +++ b/packages/toolkit/src/tests/utils/customMatchers.d.ts @@ -0,0 +1,12 @@ +import type { Assertion, AsymmetricMatchersContaining } from 'vitest' + +interface CustomMatchers { + toMatchSequence(...matchers: Array<(arg: any) => boolean>): R + toHaveConsoleOutput(expectedOutput: string): Promise + +} + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} \ No newline at end of file From 41054feffd85ad8b0faf0f039e4b03f4279164eb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 03:56:52 -0600 Subject: [PATCH 185/368] Move `src\query\tests\helpers.tsx` to `src\tests\utils\helpers.tsx` --- packages/toolkit/src/tests/{helpers.ts => typeTestHelpers.ts} | 0 packages/toolkit/src/{query/tests => tests/utils}/helpers.tsx | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{helpers.ts => typeTestHelpers.ts} (100%) rename packages/toolkit/src/{query/tests => tests/utils}/helpers.tsx (100%) diff --git a/packages/toolkit/src/tests/helpers.ts b/packages/toolkit/src/tests/typeTestHelpers.ts similarity index 100% rename from packages/toolkit/src/tests/helpers.ts rename to packages/toolkit/src/tests/typeTestHelpers.ts diff --git a/packages/toolkit/src/query/tests/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx similarity index 100% rename from packages/toolkit/src/query/tests/helpers.tsx rename to packages/toolkit/src/tests/utils/helpers.tsx From 86987196e2ef75a8eebb6da7b0765e91b5a98ba2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 03:57:41 -0600 Subject: [PATCH 186/368] Move `typeTestHelpers.ts` file into `tests/utils` folder --- packages/toolkit/src/tests/{ => utils}/typeTestHelpers.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{ => utils}/typeTestHelpers.ts (100%) diff --git a/packages/toolkit/src/tests/typeTestHelpers.ts b/packages/toolkit/src/tests/utils/typeTestHelpers.ts similarity index 100% rename from packages/toolkit/src/tests/typeTestHelpers.ts rename to packages/toolkit/src/tests/utils/typeTestHelpers.ts From 757d2d729cda003cfe39e0f2bb2e22e946f067fe Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 04:05:22 -0600 Subject: [PATCH 187/368] Add `"react-jsx"` to `tsconfig.test.json` --- packages/toolkit/tsconfig.test.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index cb0adf434f..b9cdc2216d 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -4,6 +4,7 @@ "emitDeclarationOnly": false, "noEmit": true, "rootDir": ".", + "jsx": "react-jsx", "skipLibCheck": false, "noImplicitReturns": false }, From c345514524c656e9f6fc7f5f0223d7e5195c588e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 04:07:05 -0600 Subject: [PATCH 188/368] Segregate type and runtime test utilities inside `tests/utils` folder --- .../dynamicMiddleware/tests/index.typetest.ts | 2 +- .../dynamicMiddleware/tests/react.typetest.ts | 2 +- .../src/query/tests/apiProvider.test.tsx | 10 +- .../src/query/tests/buildCreateApi.test.tsx | 9 +- .../src/query/tests/buildHooks.test.tsx | 118 ++++++++++-------- .../src/query/tests/buildInitiate.test.tsx | 2 +- .../src/query/tests/buildMiddleware.test.tsx | 9 +- .../src/query/tests/buildSlice.test.ts | 4 +- .../src/query/tests/buildThunks.test.tsx | 3 +- .../src/query/tests/cacheLifecycle.test.ts | 12 +- .../toolkit/src/query/tests/cleanup.test.tsx | 33 ++--- .../toolkit/src/query/tests/createApi.test.ts | 33 +++-- .../src/query/tests/errorHandling.test.tsx | 75 ++++++----- .../src/query/tests/fakeBaseQuery.test.tsx | 2 +- .../src/query/tests/fetchBaseQuery.test.tsx | 2 +- .../src/query/tests/invalidation.test.tsx | 7 +- .../toolkit/src/query/tests/matchers.test.tsx | 6 +- .../query/tests/optimisticUpdates.test.tsx | 30 +++-- .../query/tests/optimisticUpserts.test.tsx | 10 +- .../toolkit/src/query/tests/polling.test.tsx | 9 +- .../toolkit/src/query/tests/queryFn.test.tsx | 5 +- .../src/query/tests/queryLifecycle.test.tsx | 24 ++-- .../src/query/tests/raceConditions.test.ts | 16 +-- .../query/tests/refetchingBehaviors.test.tsx | 17 ++- .../toolkit/src/query/tests/retry.test.ts | 2 +- .../tests/useMutation-fixedCacheKey.test.tsx | 13 +- packages/toolkit/src/tests/Tuple.typetest.ts | 2 +- .../toolkit/src/tests/combineSlices.test.ts | 9 +- .../src/tests/combineSlices.typetest.ts | 2 +- .../src/tests/configureStore.typetest.ts | 16 ++- .../src/tests/createAction.typetest.tsx | 15 ++- .../src/tests/createAsyncThunk.test.ts | 12 +- .../src/tests/createAsyncThunk.typetest.ts | 16 +-- .../src/tests/createEntityAdapter.typetest.ts | 8 +- .../src/tests/createReducer.typetest.ts | 6 +- .../toolkit/src/tests/createSlice.typetest.ts | 18 +-- .../src/tests/getDefaultMiddleware.test.ts | 12 +- .../toolkit/src/tests/mapBuilders.typetest.ts | 2 +- .../toolkit/src/tests/matchers.typetest.ts | 2 +- packages/toolkit/src/tests/utils/helpers.tsx | 67 +--------- .../src/tests/utils/typeTestHelpers.ts | 2 +- 41 files changed, 304 insertions(+), 340 deletions(-) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts index 386b1aaa9d..b554c8751a 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts @@ -3,7 +3,7 @@ import type { Action, UnknownAction, Middleware } from 'redux' import type { ThunkDispatch } from 'redux-thunk' import { createDynamicMiddleware } from '../index' import { configureStore } from '../../configureStore' -import { expectExactType, expectType } from '../../tests/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' const untypedInstance = createDynamicMiddleware() diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts b/packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts index 59088fd3b5..a975d80c63 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts @@ -4,7 +4,7 @@ import type { ReactReduxContextValue } from 'react-redux' import type { Action, UnknownAction, Middleware } from 'redux' import type { ThunkDispatch } from 'redux-thunk' import { createDynamicMiddleware } from '../react' -import { expectExactType, expectType } from '../../tests/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' /* eslint-disable no-lone-blocks */ interface AppDispatch extends ThunkDispatch { diff --git a/packages/toolkit/src/query/tests/apiProvider.test.tsx b/packages/toolkit/src/query/tests/apiProvider.test.tsx index b153a36b7f..5b10573877 100644 --- a/packages/toolkit/src/query/tests/apiProvider.test.tsx +++ b/packages/toolkit/src/query/tests/apiProvider.test.tsx @@ -1,13 +1,13 @@ -import * as React from 'react' -import { createApi, ApiProvider } from '@reduxjs/toolkit/query/react' +import { configureStore } from '@reduxjs/toolkit' +import { ApiProvider, createApi } from '@reduxjs/toolkit/query/react' import { fireEvent, render, waitFor } from '@testing-library/react' -import { waitMs } from './helpers' +import { delay } from 'msw' +import * as React from 'react' import { Provider } from 'react-redux' -import { configureStore } from '@reduxjs/toolkit' const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? arg.body : null } }, endpoints: (build) => ({ diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index ec12eefec1..9149d9c3b1 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -5,15 +5,16 @@ import { reactHooksModule, } from '@reduxjs/toolkit/query/react' import { render, screen, waitFor } from '@testing-library/react' +import { delay } from 'msw' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { + Provider, createDispatchHook, createSelectorHook, createStoreHook, - Provider, } from 'react-redux' -import { setupApiStore, useRenderCounter, waitMs } from './helpers' +import { setupApiStore, useRenderCounter } from '../../tests/utils/helpers' const MyContext = React.createContext(null as any) @@ -32,7 +33,7 @@ describe('buildCreateApi', () => { const api = customCreateApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? { ...arg.body } : {}, @@ -112,7 +113,7 @@ describe('buildCreateApi', () => { ) const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? { ...arg.body } : {}, diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index fc28863fdc..6a15b21fc0 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,43 +1,43 @@ -import * as React from 'react' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { SerializedError } from '@reduxjs/toolkit' +import { + configureStore, + createListenerMiddleware, + createSlice, +} from '@reduxjs/toolkit' +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import type { UseMutation, UseQuery, } from '@reduxjs/toolkit/dist/query/react/buildHooks' import { + QueryStatus, createApi, fetchBaseQuery, - QueryStatus, skipToken, } from '@reduxjs/toolkit/query/react' import { act, fireEvent, render, + renderHook, screen, waitFor, - renderHook, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { http, HttpResponse } from 'msw' +import { HttpResponse, delay, http } from 'msw' +import * as React from 'react' +import type { UnknownAction } from 'redux' +import type { MockInstance } from 'vitest' import { actionsReducer, - expectExactType, - expectType, setupApiStore, - withProvider, useRenderCounter, - waitMs, -} from './helpers' -import { server } from './mocks/server' -import type { UnknownAction } from 'redux' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' -import type { SerializedError } from '@reduxjs/toolkit' -import { createListenerMiddleware, configureStore, createSlice } from '@reduxjs/toolkit' -import { delay } from '../../utils' + withProvider, +} from '../../tests/utils/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' import { countObjectKeys } from '../utils/countObjectKeys' +import { server } from './mocks/server' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -51,7 +51,7 @@ interface Item { const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) if (arg?.body && 'amount' in arg.body) { amount += 1 } @@ -491,7 +491,7 @@ describe('hooks tests', () => { unmount() // Wait to make sure we've passed the `refetchOnMountOrArgChange` value - await waitMs(510) + await delay(510) render(, { wrapper: storeRef.wrapper }) // Let's make sure we actually fetch, and we increment @@ -594,7 +594,7 @@ describe('hooks tests', () => { unmount() - await waitMs(100) + await delay(100) // This will pull from the cache as the time criteria is not met. ;({ unmount } = render(, { @@ -612,7 +612,7 @@ describe('hooks tests', () => { unmount() - await waitMs(500) + await delay(500) ;({ unmount } = render(, { wrapper: storeRef.wrapper, })) @@ -817,7 +817,7 @@ describe('hooks tests', () => { }) describe('Hook middleware requirements', () => { - let mock: SpyInstance + let mock: MockInstance beforeEach(() => { mock = vi.spyOn(console, 'error').mockImplementation(() => {}) @@ -1562,7 +1562,7 @@ describe('hooks tests', () => { status: QueryStatus.fulfilled, }) - await waitMs() + await delay() expect( api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) @@ -1610,7 +1610,7 @@ describe('hooks tests', () => { ) // Wait 400ms, making it respect ifOlderThan - await waitMs(400) + await delay(400) // This should run the query being that we're past the threshold userEvent.hover(screen.getByTestId('lowPriority')) @@ -1678,7 +1678,7 @@ describe('hooks tests', () => { await waitFor(() => expect(screen.getByTestId('isFetching').textContent).toBe('false') ) - await waitMs() + await delay() // Get a snapshot of the last result const latestQueryData = api.endpoints.getUser.select(USER_ID)( @@ -1751,14 +1751,18 @@ describe('hooks tests', () => { test('initially failed useQueries that provide an tag will refetch after a mutation invalidates it', async () => { const checkSessionData = { name: 'matt' } server.use( - http.get('https://example.com/me', () => { + http.get( + 'https://example.com/me', + () => { return HttpResponse.json(null, { status: 500 }) - }, { once: true }), + }, + { once: true } + ), http.get('https://example.com/me', () => { - return HttpResponse.json(checkSessionData) + return HttpResponse.json(checkSessionData) }), http.post('https://example.com/login', () => { - return HttpResponse.json(null, { status: 200 }) + return HttpResponse.json(null, { status: 200 }) }) ) let data, isLoading, isError @@ -1827,7 +1831,7 @@ describe('hooks tests', () => { describe('hooks with createApi defaults set', () => { const defaultApi = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay() if ('amount' in arg?.body) { amount += 1 } @@ -1977,12 +1981,12 @@ describe('hooks with createApi defaults set', () => { const handlers = [ http.get('https://example.com/posts', () => { - return HttpResponse.json(posts) + return HttpResponse.json(posts) }), http.put>( 'https://example.com/post/:id', async ({ request, params }) => { - const body = await request.json(); + const body = await request.json() const id = Number(params.id) const idx = posts.findIndex((post) => post.id === id) @@ -1998,20 +2002,23 @@ describe('hooks with createApi defaults set', () => { ) posts = [...newPosts] - return HttpResponse.json(posts) + return HttpResponse.json(posts) } ), - http.post>('https://example.com/post', async ({ request }) => { - const body = await request.json(); - let post = body - startingId += 1 - posts.concat({ - ...post, - fetched_at: new Date().toISOString(), - id: startingId, - }) + http.post>( + 'https://example.com/post', + async ({ request }) => { + const body = await request.json() + let post = body + startingId += 1 + posts.concat({ + ...post, + fetched_at: new Date().toISOString(), + id: startingId, + }) return HttpResponse.json(posts) - }), + } + ), ] server.use(...handlers) @@ -2054,13 +2061,13 @@ describe('hooks with createApi defaults set', () => { }) const counterSlice = createSlice({ - name: "counter", + name: 'counter', initialState: { count: 0 }, reducers: { increment(state) { state.count++ - } - } + }, + }, }) const storeRef = setupApiStore(api, { @@ -2092,7 +2099,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQueryState(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === (1 as any)), }), }) getRenderCount = useRenderCounter() @@ -2171,7 +2178,7 @@ describe('hooks with createApi defaults set', () => { isSuccess, isError, }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === (1 as any)), isUninitialized, isLoading, isFetching, @@ -2228,7 +2235,7 @@ describe('hooks with createApi defaults set', () => { getRenderCount = useRenderCounter() const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === (1 as any)), }), }) @@ -2288,7 +2295,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === (1 as any)), }), }) getRenderCount = useRenderCounter() @@ -2354,7 +2361,9 @@ describe('hooks with createApi defaults set', () => { return (
storeRef.store.dispatch(counterSlice.actions.increment())} + onClick={() => + storeRef.store.dispatch(counterSlice.actions.increment()) + } > Increment Count
@@ -2378,7 +2387,6 @@ describe('hooks with createApi defaults set', () => { test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { - const res2 = api.endpoints.getPosts.useQuery(undefined, { // selectFromResult must always return an object selectFromResult: ({ data }) => ({ size: data?.length ?? 0 }), @@ -2405,7 +2413,7 @@ describe('hooks with createApi defaults set', () => { describe('selectFromResult (mutation) behavior', () => { const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay() if ('amount' in arg?.body) { amount += 1 } @@ -2454,11 +2462,11 @@ describe('hooks with createApi defaults set', () => { expect(getRenderCount()).toBe(1) fireEvent.click(screen.getByTestId('incrementButton')) - await waitMs(200) // give our baseQuery a chance to return + await delay(200) // give our baseQuery a chance to return expect(getRenderCount()).toBe(2) fireEvent.click(screen.getByTestId('incrementButton')) - await waitMs(200) + await delay(200) expect(getRenderCount()).toBe(3) const { increment } = api.endpoints diff --git a/packages/toolkit/src/query/tests/buildInitiate.test.tsx b/packages/toolkit/src/query/tests/buildInitiate.test.tsx index 27925d14b2..3ac8184995 100644 --- a/packages/toolkit/src/query/tests/buildInitiate.test.tsx +++ b/packages/toolkit/src/query/tests/buildInitiate.test.tsx @@ -1,7 +1,7 @@ +import { setupApiStore } from '../../tests/utils/helpers' import { createApi } from '../core' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' import { fakeBaseQuery } from '../fakeBaseQuery' -import { setupApiStore } from './helpers' let calls = 0 const api = createApi({ diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index 1556d32a93..c07563edfb 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -1,5 +1,6 @@ import { createApi } from '@reduxjs/toolkit/query' -import { actionsReducer, setupApiStore, waitMs } from './helpers' +import { delay } from 'msw' +import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' const baseQuery = (args?: any) => ({ data: args }) const api = createApi({ @@ -43,7 +44,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(api.util.invalidateTags(['Banana', 'Bread'])) // Slight pause to let the middleware run and such - await waitMs(20) + delay(20) const firstSequence = [ api.internalActions.middlewareRegistered.match, @@ -58,7 +59,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(getBread.initiate(1)) await storeRef.store.dispatch(api.util.invalidateTags([{ type: 'Bread' }])) - await waitMs(20) + delay(20) expect(storeRef.store.getState().actions).toMatchSequence( ...firstSequence, @@ -68,4 +69,4 @@ it('invalidates the specified tags', async () => { getBread.matchPending, getBread.matchFulfilled ) -}) \ No newline at end of file +}) diff --git a/packages/toolkit/src/query/tests/buildSlice.test.ts b/packages/toolkit/src/query/tests/buildSlice.test.ts index 1a075beb6e..3b5efe268f 100644 --- a/packages/toolkit/src/query/tests/buildSlice.test.ts +++ b/packages/toolkit/src/query/tests/buildSlice.test.ts @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi } from '@reduxjs/toolkit/query' -import { setupApiStore } from './helpers' -import { delay } from '../../utils' +import { delay } from 'msw' +import { setupApiStore } from '../../tests/utils/helpers' let shouldApiResponseSuccess = true diff --git a/packages/toolkit/src/query/tests/buildThunks.test.tsx b/packages/toolkit/src/query/tests/buildThunks.test.tsx index ed40bd9342..aa4afebd51 100644 --- a/packages/toolkit/src/query/tests/buildThunks.test.tsx +++ b/packages/toolkit/src/query/tests/buildThunks.test.tsx @@ -1,9 +1,8 @@ import { configureStore } from '@reduxjs/toolkit' -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query/react' import { renderHook, waitFor } from '@testing-library/react' +import { withProvider } from '../../tests/utils/helpers' import type { BaseQueryApi } from '../baseQueryTypes' -import { withProvider } from './helpers' test('handles a non-async baseQuery without error', async () => { const baseQuery = (args?: any) => ({ data: args }) diff --git a/packages/toolkit/src/query/tests/cacheLifecycle.test.ts b/packages/toolkit/src/query/tests/cacheLifecycle.test.ts index fa505f895d..e143af311a 100644 --- a/packages/toolkit/src/query/tests/cacheLifecycle.test.ts +++ b/packages/toolkit/src/query/tests/cacheLifecycle.test.ts @@ -1,14 +1,12 @@ -import { createApi } from '@reduxjs/toolkit/query' import type { FetchBaseQueryMeta } from '@reduxjs/toolkit/query' -import { vi } from 'vitest' -import { fetchBaseQuery } from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import { - expectType, + DEFAULT_DELAY_MS, fakeTimerWaitFor, setupApiStore, - DEFAULT_DELAY_MS, -} from './helpers' -import { QueryActionCreatorResult } from '../core/buildInitiate' +} from '../../tests/utils/helpers' +import { expectType } from '../../tests/utils/typeTestHelpers' +import type { QueryActionCreatorResult } from '../core/buildInitiate' beforeAll(() => { vi.useFakeTimers() diff --git a/packages/toolkit/src/query/tests/cleanup.test.tsx b/packages/toolkit/src/query/tests/cleanup.test.tsx index cb1ff750fa..eff34b400d 100644 --- a/packages/toolkit/src/query/tests/cleanup.test.tsx +++ b/packages/toolkit/src/query/tests/cleanup.test.tsx @@ -1,12 +1,11 @@ // tests for "cleanup-after-unsubscribe" behaviour -import { vi } from 'vitest' import React from 'react' import { createListenerMiddleware } from '@reduxjs/toolkit' import { createApi, QueryStatus } from '@reduxjs/toolkit/query/react' -import { render, waitFor, act, screen } from '@testing-library/react' -import { setupApiStore } from './helpers' -import { SubscriptionSelectors } from '../core/buildMiddleware/types' +import { act, render, screen, waitFor } from '@testing-library/react' +import { setupApiStore } from '../../tests/utils/helpers' +import type { SubscriptionSelectors } from '../core/buildMiddleware/types' const tick = () => new Promise((res) => setImmediate(res)) @@ -21,8 +20,8 @@ const api = createApi({ }) const storeRef = setupApiStore(api) -let getSubStateA = () => storeRef.store.getState().api.queries['a(undefined)'] -let getSubStateB = () => storeRef.store.getState().api.queries['b(undefined)'] +const getSubStateA = () => storeRef.store.getState().api.queries['a(undefined)'] +const getSubStateB = () => storeRef.store.getState().api.queries['b(undefined)'] function UsingA() { const { data } = api.endpoints.a.useQuery() @@ -55,7 +54,7 @@ test('data stays in store when component stays rendered', async () => { expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) ) - vi.advanceTimersByTime(120000) + vi.advanceTimersByTime(120_000) expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) }) @@ -70,7 +69,7 @@ test('data is removed from store after 60 seconds', async () => { unmount() - vi.advanceTimersByTime(59000) + vi.advanceTimersByTime(59_000) expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) @@ -98,16 +97,12 @@ test('data stays in store when component stays rendered while data for another c const statusA = getSubStateA() await act(async () => { - rerender( - <> - - - ) + rerender() vi.advanceTimersByTime(10) }) - vi.advanceTimersByTime(120000) + vi.advanceTimersByTime(120_000) expect(getSubStateA()).toEqual(statusA) expect(getSubStateB()).toBeUndefined() @@ -133,11 +128,7 @@ test('data stays in store when one component requiring the data stays in the sto const statusB = getSubStateB() await act(async () => { - rerender( - <> - - - ) + rerender() vi.advanceTimersByTime(10) vi.runAllTimers() }) @@ -160,7 +151,7 @@ test('Minimizes the number of subscription dispatches when multiple components a withoutTestLifecycles: true, }) - let actionTypes: unknown[] = [] + const actionTypes: unknown[] = [] listenerMiddleware.startListening({ predicate: () => true, @@ -210,4 +201,4 @@ test('Minimizes the number of subscription dispatches when multiple components a 'api/executeQuery/pending', 'api/executeQuery/fulfilled', ]) -}, 25000) +}, 25_000) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index cf2ffae030..8ea735d335 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -10,32 +10,31 @@ import type { QueryDefinition, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { MockInstance } from 'vitest' import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, } from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { HttpResponse, http } from 'msw' +import { HttpResponse, delay, http } from 'msw' import nodeFetch from 'node-fetch' -import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { ANY, - expectExactType, - expectType, getSerializedHeaders, setupApiStore, - waitMs, -} from './helpers' +} from '../../tests/utils/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' +import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { server } from './mocks/server' -const originalEnv = process.env.NODE_ENV -beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) -afterAll(() => void ((process.env as any).NODE_ENV = originalEnv)) +beforeAll(() => { + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs +}) -let spy: SpyInstance +let spy: MockInstance beforeAll(() => { spy = vi.spyOn(console, 'error').mockImplementation(() => {}) }) @@ -185,7 +184,7 @@ describe('wrong tagTypes log errors', () => { store.dispatch(api.endpoints[endpoint].initiate()) let result: { status: string } do { - await waitMs(5) + await delay(5) // @ts-ignore result = api.endpoints[endpoint].select()(store.getState()) } while (result.status === 'pending') @@ -460,11 +459,11 @@ describe('endpoint definition typings', () => { }) storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) - await waitMs(1) + await delay(1) expect(spy).not.toHaveBeenCalled() storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) - await waitMs(1) + await delay(1) expect(spy).toHaveBeenCalledWith( "Tag type 'missing' was used, but not specified in `tagTypes`!" ) @@ -805,7 +804,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { const failAttempt = storeRef.store.dispatch(api.endpoints.query.initiate()) expect(storeRef.store.getState().testReducer.count).toBe(0) await failAttempt - await waitMs(10) + await delay(10) expect(storeRef.store.getState().testReducer.count).toBe(-1) const successAttempt = storeRef.store.dispatch( @@ -813,7 +812,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { ) expect(storeRef.store.getState().testReducer.count).toBe(0) await successAttempt - await waitMs(10) + await delay(10) expect(storeRef.store.getState().testReducer.count).toBe(1) }) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index de6eb2c3da..ae1bbbc296 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,22 +1,23 @@ -import * as React from 'react' +import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { http, HttpResponse } from 'msw' -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' -import axios from 'axios' -import { expectExactType, hookWaitFor, setupApiStore } from './helpers' -import { server } from './mocks/server' import { + act, fireEvent, render, - waitFor, - screen, - act, renderHook, + screen, + waitFor, } from '@testing-library/react' +import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' +import axios from 'axios' +import { HttpResponse, http } from 'msw' +import * as React from 'react' import { useDispatch } from 'react-redux' -import type { UnknownAction, ThunkDispatch } from '@reduxjs/toolkit' +import { hookWaitFor, setupApiStore } from '../../tests/utils/helpers' +import { expectExactType } from '../../tests/utils/typeTestHelpers' import type { BaseQueryApi } from '../baseQueryTypes' +import { server } from './mocks/server' const baseQuery = fetchBaseQuery({ baseUrl: 'https://example.com' }) @@ -34,8 +35,10 @@ const api = createApi({ const storeRef = setupApiStore(api) -const failQueryOnce = http.get('/query', () => - HttpResponse.json({ value: 'failed' }, { status: 500 }), { once: true } +const failQueryOnce = http.get( + '/query', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) describe('fetchBaseQuery', () => { @@ -86,7 +89,7 @@ describe('query error handling', () => { test('success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -107,7 +110,7 @@ describe('query error handling', () => { test('error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -131,7 +134,7 @@ describe('query error handling', () => { test('success -> error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -149,8 +152,10 @@ describe('query error handling', () => { ) server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.get( + 'https://example.com/query', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -175,12 +180,14 @@ describe('query error handling', () => { test('error -> success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.get( + 'https://example.com/query', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -218,7 +225,7 @@ describe('mutation error handling', () => { test('success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -243,7 +250,7 @@ describe('mutation error handling', () => { test('error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -271,7 +278,7 @@ describe('mutation error handling', () => { test('success -> error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -295,8 +302,10 @@ describe('mutation error handling', () => { } server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.post( + 'https://example.com/mutation', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -324,12 +333,14 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.post( + 'https://example.com/mutation', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -443,7 +454,7 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( http.get('https://example.com/success', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { @@ -481,8 +492,10 @@ describe('error handling in a component', () => { test('a mutation is unwrappable and has the correct types', async () => { server.use( - http.get('https://example.com/success', () => - HttpResponse.json(mockErrorResponse, { status: 500 }), { once: true } + http.get( + 'https://example.com/success', + () => HttpResponse.json(mockErrorResponse, { status: 500 }), + { once: true } ) ) diff --git a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx index c2f7b4c997..5e9343fafe 100644 --- a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx @@ -1,6 +1,6 @@ import { configureStore } from '@reduxjs/toolkit' import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' -import './helpers' +import './utils/typeTestHelpers' type CustomErrorType = { type: 'Custom' } diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index ca9fe832e1..ee37f66292 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import nodeFetch from 'node-fetch' -import { setupApiStore } from './helpers' +import { setupApiStore } from '../../tests/utils/helpers' import { server } from './mocks/server' import { headersToObject } from 'headers-polyfill' diff --git a/packages/toolkit/src/query/tests/invalidation.test.tsx b/packages/toolkit/src/query/tests/invalidation.test.tsx index a4081a3d63..1b3ad924b9 100644 --- a/packages/toolkit/src/query/tests/invalidation.test.tsx +++ b/packages/toolkit/src/query/tests/invalidation.test.tsx @@ -1,7 +1,8 @@ -import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' import type { TagDescription } from '@reduxjs/toolkit/dist/query/endpointDefinitions' +import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' import { waitFor } from '@testing-library/react' +import { delay } from 'msw' +import { setupApiStore } from '../../tests/utils/helpers' const tagTypes = [ 'apple', @@ -135,7 +136,7 @@ test.each(caseMatrix)( store.dispatch(invalidating.initiate()) expect(queryCount).toBe(1) - await waitMs(2) + await delay(2) expect(queryCount).toBe(shouldInvalidate ? 2 : 1) } ) diff --git a/packages/toolkit/src/query/tests/matchers.test.tsx b/packages/toolkit/src/query/tests/matchers.test.tsx index 37c1dfe58b..2aad352e5c 100644 --- a/packages/toolkit/src/query/tests/matchers.test.tsx +++ b/packages/toolkit/src/query/tests/matchers.test.tsx @@ -1,13 +1,13 @@ import type { SerializedError } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { renderHook, act } from '@testing-library/react' +import { act, renderHook } from '@testing-library/react' import { actionsReducer, - expectExactType, hookWaitFor, setupApiStore, -} from './helpers' +} from '../../tests/utils/helpers' +import { expectExactType } from '../../tests/utils/typeTestHelpers' interface ResultType { result: 'complex' diff --git a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx index f96e2b4162..afad253eb8 100644 --- a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx @@ -1,7 +1,11 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore, waitMs } from './helpers' -import { renderHook, act } from '@testing-library/react' +import { act, renderHook } from '@testing-library/react' +import { delay } from 'msw' +import { + actionsReducer, + hookWaitFor, + setupApiStore, +} from '../../tests/utils/helpers' import type { InvalidationState } from '../core/apiState' interface Post { @@ -11,7 +15,9 @@ interface Post { } const baseQuery = vi.fn() -beforeEach(() => baseQuery.mockReset()) +beforeEach(() => { + baseQuery.mockReset() +}) const api = createApi({ baseQuery: (...args: any[]) => { @@ -105,7 +111,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -127,7 +133,7 @@ describe('basic lifecycle', () => { expect(baseQuery).toHaveBeenCalledWith('arg', expect.any(Object), undefined) expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, @@ -212,7 +218,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided3 = provided['Post']['3'] + const provided3 = provided.Post['3'] let returnValue!: ReturnType> act(() => { @@ -236,7 +242,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4 = provided['Post']['4'] + const provided4 = provided.Post['4'] expect(provided4).toEqual(provided3) @@ -248,12 +254,12 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4Next = provided['Post']['4'] + const provided4Next = provided.Post['4'] expect(provided4Next).toEqual([]) }) - test('updates (list) cache values excluding provided tags, undos that', async () => { + test('updates (list) cache values excluding provided tags, undoes that', async () => { baseQuery .mockResolvedValueOnce([ { @@ -295,7 +301,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4 = provided['Post']['4'] + const provided4 = provided.Post['4'] expect(provided4).toEqual(undefined) @@ -307,7 +313,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4Next = provided['Post']['4'] + const provided4Next = provided.Post['4'] expect(provided4Next).toEqual(undefined) }) diff --git a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx index 1d67f0f1a0..8e9be677e6 100644 --- a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx @@ -1,9 +1,7 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore, waitMs } from './helpers' -import { skipToken } from '../core/buildSelectors' +import { actionsReducer, hookWaitFor, setupApiStore } from '../../tests/utils/helpers' import { renderHook, act, waitFor } from '@testing-library/react' -import { delay } from '../../utils' +import { delay } from "msw"; interface Post { id: string @@ -149,7 +147,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -172,7 +170,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index d5d3cd20f8..42645ad9c4 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -1,7 +1,6 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' -import { delay } from '../../utils' +import { delay } from 'msw' +import { setupApiStore } from '../../tests/utils/helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' const mockBaseQuery = vi @@ -50,7 +49,7 @@ describe('polling tests', () => { storeRef.store.dispatch(api.util.resetApiState()) - await waitMs(30) + await delay(30) expect(mockBaseQuery).toHaveBeenCalledTimes(1) }) @@ -119,7 +118,7 @@ describe('polling tests', () => { }) ) - await waitMs(20) + await delay(20) expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2) }) diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index 1de7d4a473..5e3029caed 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -1,12 +1,11 @@ -import { vi } from 'vitest' import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' +import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' +import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' import type { Post } from './mocks/handlers' import { posts } from './mocks/handlers' -import { actionsReducer, setupApiStore } from './helpers' -import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' describe('queryFn base implementation tests', () => { const baseQuery: BaseQueryFn = diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index ec003f261c..4745b87855 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -1,14 +1,14 @@ -import { vi } from 'vitest' -import { createApi } from '@reduxjs/toolkit/query' -import { waitFor } from '@testing-library/react' import type { - FetchBaseQueryMeta, FetchBaseQueryError, + FetchBaseQueryMeta, } from '@reduxjs/toolkit/query' -import { fetchBaseQuery } from '@reduxjs/toolkit/query' -import { expectType, setupApiStore } from './helpers' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' +import { waitFor } from '@testing-library/react' +import { HttpResponse, http } from 'msw' +import { vi } from 'vitest' +import { setupApiStore } from '../../tests/utils/helpers' +import { expectType } from '../../tests/utils/typeTestHelpers' import { server } from './mocks/server' -import { http, HttpResponse } from 'msw' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -398,9 +398,13 @@ test('query: updateCachedData', async () => { // request 2: error expect(onError).not.toHaveBeenCalled() server.use( - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'failed' }, {status: 500}) - }, {once: true}), + http.get( + 'https://example.com/success', + () => { + return HttpResponse.json({ value: 'failed' }, { status: 500 }) + }, + { once: true } + ) ) storeRef.store.dispatch( extended.endpoints.injected.initiate('arg', { forceRefetch: true }) diff --git a/packages/toolkit/src/query/tests/raceConditions.test.ts b/packages/toolkit/src/query/tests/raceConditions.test.ts index 0ec49da2fb..3178f42666 100644 --- a/packages/toolkit/src/query/tests/raceConditions.test.ts +++ b/packages/toolkit/src/query/tests/raceConditions.test.ts @@ -1,6 +1,6 @@ import { createApi, QueryStatus } from '@reduxjs/toolkit/query' -import { getLog } from 'console-testing-library' -import { actionsReducer, setupApiStore, waitMs } from './helpers' +import { delay } from 'msw' +import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' // We need to be able to control when which query resolves to simulate race // conditions properly, that's the purpose of this factory. @@ -59,7 +59,7 @@ it('invalidates a query after a corresponding mutation', async () => { const getQueryState = () => storeRef.store.getState().api.queries[query.queryCacheKey] getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -68,14 +68,14 @@ it('invalidates a query after a corresponding mutation', async () => { const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(1) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -92,17 +92,17 @@ it('invalidates a query whose corresponding mutation finished while the query wa const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) // should already be refetching getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(1) diff --git a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx index f2703e5b56..c696d73f88 100644 --- a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx +++ b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx @@ -1,9 +1,8 @@ -import { vi } from 'vitest' -import * as React from 'react' import { createApi, setupListeners } from '@reduxjs/toolkit/query/react' -import { act, fireEvent, render, waitFor, screen } from '@testing-library/react' -import { setupApiStore, waitMs } from './helpers' -import { delay } from '../../utils' +import { act, fireEvent, render, screen, waitFor } from '@testing-library/react' +import { delay } from 'msw' +import * as React from 'react' +import { setupApiStore } from '../../tests/utils/helpers' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -12,7 +11,7 @@ let amount = 0 const defaultApi = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) if ('amount' in arg?.body) { amount += 1 } @@ -77,7 +76,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await waitMs() + await delay(150) await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('2') @@ -117,7 +116,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await waitMs() + await delay(150) await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('1') @@ -394,7 +393,7 @@ describe('customListenersHandler', () => { } ) - await waitMs() + await delay(150) let data, isLoading, isFetching diff --git a/packages/toolkit/src/query/tests/retry.test.ts b/packages/toolkit/src/query/tests/retry.test.ts index 9f90eecafa..de71e1f644 100644 --- a/packages/toolkit/src/query/tests/retry.test.ts +++ b/packages/toolkit/src/query/tests/retry.test.ts @@ -1,6 +1,6 @@ import type { BaseQueryFn } from '@reduxjs/toolkit/query' import { createApi, retry } from '@reduxjs/toolkit/query' -import { setupApiStore } from './helpers' +import { setupApiStore } from '../../tests/utils/helpers' beforeEach(() => { vi.useFakeTimers() diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 05505540a7..40b47cbe58 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -1,14 +1,15 @@ import { createApi } from '@reduxjs/toolkit/query/react' -import { setupApiStore, waitMs } from './helpers' -import React from 'react' import { + act, + getByTestId, render, screen, - getByTestId, waitFor, - act, } from '@testing-library/react' +import { delay } from 'msw' +import React from 'react' import { vi } from 'vitest' +import { setupApiStore } from '../../tests/utils/helpers' describe('fixedCacheKey', () => { const onNewCacheEntry = vi.fn() @@ -342,7 +343,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await waitMs() + await delay(150) expect(getByTestId(c1, 'status').textContent).toBe('pending') expect(getByTestId(c1, 'data').textContent).toBe('') @@ -352,7 +353,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await waitMs() + await delay(150) expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') expect(getByTestId(c1, 'data').textContent).toBe('this should be visible') diff --git a/packages/toolkit/src/tests/Tuple.typetest.ts b/packages/toolkit/src/tests/Tuple.typetest.ts index 4beaf28fae..102cfd40df 100644 --- a/packages/toolkit/src/tests/Tuple.typetest.ts +++ b/packages/toolkit/src/tests/Tuple.typetest.ts @@ -1,5 +1,5 @@ import { Tuple } from '@reduxjs/toolkit' -import { expectType } from './helpers' +import { expectType } from "./utils/typeTestHelpers" /** * Test: compatibility is checked between described types diff --git a/packages/toolkit/src/tests/combineSlices.test.ts b/packages/toolkit/src/tests/combineSlices.test.ts index d98117bc7c..6376e508b0 100644 --- a/packages/toolkit/src/tests/combineSlices.test.ts +++ b/packages/toolkit/src/tests/combineSlices.test.ts @@ -1,10 +1,10 @@ -import { createReducer } from '../createReducer' -import { createAction } from '../createAction' -import { createSlice } from '../createSlice' import type { WithSlice } from '../combineSlices' import { combineSlices } from '../combineSlices' -import { expectType } from './helpers' +import { createAction } from '../createAction' +import { createReducer } from '../createReducer' +import { createSlice } from '../createSlice' import type { CombinedState } from '../query/core/apiState' +import { expectType } from './utils/typeTestHelpers' const dummyAction = createAction('dummy') @@ -66,7 +66,6 @@ describe('combineSlices', () => { }) describe('injects', () => { beforeEach(() => { - vi.stubEnv('NODE_ENV', 'development') return vi.unstubAllEnvs diff --git a/packages/toolkit/src/tests/combineSlices.typetest.ts b/packages/toolkit/src/tests/combineSlices.typetest.ts index 8ab744f335..7b92faf380 100644 --- a/packages/toolkit/src/tests/combineSlices.typetest.ts +++ b/packages/toolkit/src/tests/combineSlices.typetest.ts @@ -2,7 +2,7 @@ import type { Reducer, Slice, WithSlice } from '@reduxjs/toolkit' import { combineSlices } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { expectExactType, expectType } from './helpers' +import { expectExactType, expectType } from './utils/typeTestHelpers' declare const stringSlice: Slice diff --git a/packages/toolkit/src/tests/configureStore.typetest.ts b/packages/toolkit/src/tests/configureStore.typetest.ts index 041f1141a9..1480420422 100644 --- a/packages/toolkit/src/tests/configureStore.typetest.ts +++ b/packages/toolkit/src/tests/configureStore.typetest.ts @@ -1,19 +1,23 @@ /* eslint-disable no-lone-blocks */ +import type { ConfigureStoreOptions, PayloadAction } from '@reduxjs/toolkit' +import { Tuple, configureStore, createSlice } from '@reduxjs/toolkit' import type { + Action, Dispatch, - UnknownAction, Middleware, Reducer, Store, - Action, StoreEnhancer, + UnknownAction, } from 'redux' import { applyMiddleware, combineReducers } from 'redux' -import type { PayloadAction, ConfigureStoreOptions } from '@reduxjs/toolkit' -import { configureStore, createSlice, Tuple } from '@reduxjs/toolkit' -import type { ThunkMiddleware, ThunkAction, ThunkDispatch } from 'redux-thunk' +import type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk' import { thunk } from 'redux-thunk' -import { expectExactType, expectNotAny, expectType } from './helpers' +import { + expectExactType, + expectNotAny, + expectType, +} from './utils/typeTestHelpers' const _anyMiddleware: any = () => () => () => {} diff --git a/packages/toolkit/src/tests/createAction.typetest.tsx b/packages/toolkit/src/tests/createAction.typetest.tsx index 991d8c0f63..a6644d8312 100644 --- a/packages/toolkit/src/tests/createAction.typetest.tsx +++ b/packages/toolkit/src/tests/createAction.typetest.tsx @@ -1,17 +1,16 @@ -import React from 'react' -import type { Action, UnknownAction, ActionCreator } from 'redux' +import type { IsAny } from '@internal/tsHelpers' import type { - PayloadAction, - PayloadActionCreator, - ActionCreatorWithoutPayload, + ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, ActionCreatorWithPayload, - ActionCreatorWithNonInferrablePayload, ActionCreatorWithPreparedPayload, + ActionCreatorWithoutPayload, + PayloadAction, + PayloadActionCreator, } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' -import type { IsAny } from '@internal/tsHelpers' -import { expectType } from './helpers' +import type { Action, ActionCreator, UnknownAction } from 'redux' +import { expectType } from './utils/typeTestHelpers' /* PayloadAction */ diff --git a/packages/toolkit/src/tests/createAsyncThunk.test.ts b/packages/toolkit/src/tests/createAsyncThunk.test.ts index f57b4fe45c..7134409e7b 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test.ts @@ -1,20 +1,20 @@ -import { vi } from 'vitest' +import { miniSerializeError } from '@internal/createAsyncThunk' import type { UnknownAction } from '@reduxjs/toolkit' import { - createAsyncThunk, - unwrapResult, configureStore, + createAsyncThunk, createReducer, + unwrapResult, } from '@reduxjs/toolkit' -import { miniSerializeError } from '@internal/createAsyncThunk' +import { vi } from 'vitest' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' -import { expectType } from './helpers' import { delay } from '../utils' +import { expectType } from './utils/typeTestHelpers' declare global { interface Window { diff --git a/packages/toolkit/src/tests/createAsyncThunk.typetest.ts b/packages/toolkit/src/tests/createAsyncThunk.typetest.ts index 05cf4fd604..76d1cbb8ca 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.typetest.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.typetest.ts @@ -1,27 +1,27 @@ /* eslint-disable no-lone-blocks */ import type { - UnknownAction, - SerializedError, AsyncThunk, + SerializedError, + UnknownAction, } from '@reduxjs/toolkit' import { + configureStore, createAsyncThunk, createReducer, - unwrapResult, createSlice, - configureStore, + unwrapResult, } from '@reduxjs/toolkit' import type { ThunkDispatch } from 'redux-thunk' -import type { AxiosError } from 'axios' -import apiRequest from 'axios' -import type { IsAny, IsUnknown } from '@internal/tsHelpers' -import { expectExactType, expectType } from './helpers' import type { AsyncThunkFulfilledActionCreator, AsyncThunkRejectedActionCreator, } from '@internal/createAsyncThunk' +import type { IsAny, IsUnknown } from '@internal/tsHelpers' import type { TSVersion } from '@phryneas/ts-version' +import type { AxiosError } from 'axios' +import apiRequest from 'axios' +import { expectExactType, expectType } from './utils/typeTestHelpers' const ANY = {} as any const defaultDispatch = (() => {}) as ThunkDispatch<{}, any, UnknownAction> diff --git a/packages/toolkit/src/tests/createEntityAdapter.typetest.ts b/packages/toolkit/src/tests/createEntityAdapter.typetest.ts index 30a64395c1..0e2b9a45ec 100644 --- a/packages/toolkit/src/tests/createEntityAdapter.typetest.ts +++ b/packages/toolkit/src/tests/createEntityAdapter.typetest.ts @@ -1,13 +1,13 @@ import type { - EntityAdapter, ActionCreatorWithPayload, ActionCreatorWithoutPayload, - EntityStateAdapter, + EntityAdapter, EntityId, + EntityStateAdapter, Update, } from '@reduxjs/toolkit' -import { createSlice, createEntityAdapter } from '@reduxjs/toolkit' -import { expectType } from './helpers' +import { createEntityAdapter, createSlice } from '@reduxjs/toolkit' +import { expectType } from './utils/typeTestHelpers' function extractReducers( adapter: EntityAdapter diff --git a/packages/toolkit/src/tests/createReducer.typetest.ts b/packages/toolkit/src/tests/createReducer.typetest.ts index 4fe5c2a62f..90228dcedd 100644 --- a/packages/toolkit/src/tests/createReducer.typetest.ts +++ b/packages/toolkit/src/tests/createReducer.typetest.ts @@ -1,7 +1,7 @@ -import type { Reducer } from 'redux' import type { ActionReducerMapBuilder } from '@reduxjs/toolkit' -import { createReducer, createAction } from '@reduxjs/toolkit' -import { expectType } from './helpers' +import { createAction, createReducer } from '@reduxjs/toolkit' +import type { Reducer } from 'redux' +import { expectType } from './utils/typeTestHelpers' /* * Test: createReducer() infers type of returned reducer. diff --git a/packages/toolkit/src/tests/createSlice.typetest.ts b/packages/toolkit/src/tests/createSlice.typetest.ts index 24c450f6ae..9b53b54e46 100644 --- a/packages/toolkit/src/tests/createSlice.typetest.ts +++ b/packages/toolkit/src/tests/createSlice.typetest.ts @@ -1,10 +1,9 @@ -import type { Action, UnknownAction, Reducer } from 'redux' import type { ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, - ActionCreatorWithoutPayload, ActionCreatorWithPayload, ActionCreatorWithPreparedPayload, + ActionCreatorWithoutPayload, ActionReducerMapBuilder, AsyncThunk, CaseReducer, @@ -17,16 +16,21 @@ import type { ValidateSliceCaseReducers, } from '@reduxjs/toolkit' import { + asyncThunkCreator, + buildCreateSlice, configureStore, - isRejected, createAction, - createSlice, - buildCreateSlice, - asyncThunkCreator, createAsyncThunk, + createSlice, + isRejected, } from '@reduxjs/toolkit' -import { expectExactType, expectType, expectUnknown } from './helpers' import { castDraft } from 'immer' +import type { Action, Reducer, UnknownAction } from 'redux' +import { + expectExactType, + expectType, + expectUnknown, +} from './utils/typeTestHelpers' /* * Test: Slice name is strongly typed. diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts index 6ee86933b2..d32def1019 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts @@ -1,17 +1,17 @@ -import { vi } from 'vitest' import type { - UnknownAction, + Action, + Dispatch, Middleware, ThunkAction, - Action, ThunkDispatch, - Dispatch, + UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' -import { thunk } from 'redux-thunk' import type { ThunkMiddleware } from 'redux-thunk' +import { thunk } from 'redux-thunk' +import { vi } from 'vitest' -import { expectType } from './helpers' +import { expectType } from './utils/typeTestHelpers' import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' import { Tuple } from '@internal/utils' diff --git a/packages/toolkit/src/tests/mapBuilders.typetest.ts b/packages/toolkit/src/tests/mapBuilders.typetest.ts index 334572300e..dec653378e 100644 --- a/packages/toolkit/src/tests/mapBuilders.typetest.ts +++ b/packages/toolkit/src/tests/mapBuilders.typetest.ts @@ -3,7 +3,7 @@ import { createAsyncThunk } from '@internal/createAsyncThunk' import { executeReducerBuilderCallback } from '@internal/mapBuilders' import type { UnknownAction } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' -import { expectExactType, expectType } from './helpers' +import { expectExactType, expectType } from './utils/typeTestHelpers' /** Test: builder callback for actionMap */ { diff --git a/packages/toolkit/src/tests/matchers.typetest.ts b/packages/toolkit/src/tests/matchers.typetest.ts index 495796727f..2cd8cd31ce 100644 --- a/packages/toolkit/src/tests/matchers.typetest.ts +++ b/packages/toolkit/src/tests/matchers.typetest.ts @@ -1,4 +1,4 @@ -import { expectExactType, expectUnknown } from './helpers' +import { expectExactType, expectUnknown } from './utils/typeTestHelpers' import type { UnknownAction } from 'redux' import type { SerializedError } from '../../src' import { diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index dd73dfff9b..d7eacec6a8 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -7,7 +7,7 @@ import type { } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' -import React, { useCallback } from 'react' +import { useCallback, useEffect, useRef } from 'react' import { Provider } from 'react-redux' @@ -83,13 +83,13 @@ export const fakeTimerWaitFor = async (cb: () => void, time = 2000) => { } export const useRenderCounter = () => { - const countRef = React.useRef(0) + const countRef = useRef(0) - React.useEffect(() => { + useEffect(() => { countRef.current += 1 }) - React.useEffect(() => { + useEffect(() => { return () => { countRef.current = 0 } @@ -260,62 +260,3 @@ export function setupApiStore< return refObj } - -// type test helpers - -export declare type IsAny = true | false extends ( - T extends never ? true : false -) - ? True - : False - -export declare type IsUnknown = unknown extends T - ? IsAny - : False - -export function expectType(t: T): T { - return t -} - -type Equals = IsAny< - T, - never, - IsAny -> -export function expectExactType(t: T) { - return >(u: U) => {} -} - -type EnsureUnknown = IsUnknown -export function expectUnknown>(t: T) { - return t -} - -type EnsureAny = IsAny -export function expectExactAny>(t: T) { - return t -} - -type IsNotAny = IsAny -export function expectNotAny>(t: T): T { - return t -} - -expectType('5' as string) -expectType('5' as const) -expectType('5' as any) -expectExactType('5' as const)('5' as const) -// @ts-expect-error -expectExactType('5' as string)('5' as const) -// @ts-expect-error -expectExactType('5' as any)('5' as const) -expectUnknown('5' as unknown) -// @ts-expect-error -expectUnknown('5' as const) -// @ts-expect-error -expectUnknown('5' as any) -expectExactAny('5' as any) -// @ts-expect-error -expectExactAny('5' as const) -// @ts-expect-error -expectExactAny('5' as unknown) diff --git a/packages/toolkit/src/tests/utils/typeTestHelpers.ts b/packages/toolkit/src/tests/utils/typeTestHelpers.ts index 6146ca1ee0..4ba7eb8b8a 100644 --- a/packages/toolkit/src/tests/utils/typeTestHelpers.ts +++ b/packages/toolkit/src/tests/utils/typeTestHelpers.ts @@ -1,4 +1,4 @@ -import type { IsAny, IsUnknown } from '../../src/tsHelpers' +import type { IsAny, IsUnknown } from '../../tsHelpers' export function expectType(t: T): T { return t From 78c55c7395c6eb87bc2e635e7ac77ec1c0b50565 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:07:22 -0600 Subject: [PATCH 189/368] Rename `customMatchers.d.ts` to `vitest.d.ts` --- .../toolkit/src/tests/utils/{customMatchers.d.ts => vitest.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/utils/{customMatchers.d.ts => vitest.d.ts} (100%) diff --git a/packages/toolkit/src/tests/utils/customMatchers.d.ts b/packages/toolkit/src/tests/utils/vitest.d.ts similarity index 100% rename from packages/toolkit/src/tests/utils/customMatchers.d.ts rename to packages/toolkit/src/tests/utils/vitest.d.ts From 75906ee78cd35a15ed8a781c668bf4d28d905728 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:08:08 -0600 Subject: [PATCH 190/368] Fix `helpers.tsx` imports --- .../src/query/tests/buildHooks.test.tsx | 49 ++++++++++--------- .../src/query/tests/buildMiddleware.test.tsx | 4 +- .../src/query/tests/fakeBaseQuery.test.tsx | 2 +- packages/toolkit/src/tests/utils/vitest.d.ts | 3 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index 6a15b21fc0..e33007a612 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -24,7 +24,7 @@ import { waitFor, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { HttpResponse, delay, http } from 'msw' +import { HttpResponse, http } from 'msw' import * as React from 'react' import type { UnknownAction } from 'redux' import type { MockInstance } from 'vitest' @@ -32,6 +32,7 @@ import { actionsReducer, setupApiStore, useRenderCounter, + waitMs, withProvider, } from '../../tests/utils/helpers' import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' @@ -51,7 +52,7 @@ interface Item { const api = createApi({ baseQuery: async (arg: any) => { - await delay(150) + await waitMs(150) if (arg?.body && 'amount' in arg.body) { amount += 1 } @@ -491,7 +492,7 @@ describe('hooks tests', () => { unmount() // Wait to make sure we've passed the `refetchOnMountOrArgChange` value - await delay(510) + await waitMs(510) render(, { wrapper: storeRef.wrapper }) // Let's make sure we actually fetch, and we increment @@ -594,7 +595,7 @@ describe('hooks tests', () => { unmount() - await delay(100) + await waitMs(100) // This will pull from the cache as the time criteria is not met. ;({ unmount } = render(, { @@ -612,7 +613,7 @@ describe('hooks tests', () => { unmount() - await delay(500) + await waitMs(500) ;({ unmount } = render(, { wrapper: storeRef.wrapper, })) @@ -767,7 +768,7 @@ describe('hooks tests', () => { ) await act(async () => { - await delay(1) + await waitMs(1) }) // 2) Set the current subscription to `{skip: true} @@ -796,13 +797,13 @@ describe('hooks tests', () => { checkNumSubscriptions('b', 1) await act(async () => { - await delay(1) + await waitMs(1) }) unmount() await act(async () => { - await delay(1) + await waitMs(1) }) // There should be no subscription entries left over after changing @@ -811,7 +812,7 @@ describe('hooks tests', () => { const finalSubscriptions = getSubscriptions() - for (let cacheKeyEntry of Object.values(finalSubscriptions)) { + for (const cacheKeyEntry of Object.values(finalSubscriptions)) { expect(Object.values(cacheKeyEntry!).length).toBe(0) } }) @@ -1562,7 +1563,7 @@ describe('hooks tests', () => { status: QueryStatus.fulfilled, }) - await delay() + await waitMs() expect( api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) @@ -1610,7 +1611,7 @@ describe('hooks tests', () => { ) // Wait 400ms, making it respect ifOlderThan - await delay(400) + await waitMs(400) // This should run the query being that we're past the threshold userEvent.hover(screen.getByTestId('lowPriority')) @@ -1678,7 +1679,7 @@ describe('hooks tests', () => { await waitFor(() => expect(screen.getByTestId('isFetching').textContent).toBe('false') ) - await delay() + await waitMs() // Get a snapshot of the last result const latestQueryData = api.endpoints.getUser.select(USER_ID)( @@ -1831,7 +1832,7 @@ describe('hooks tests', () => { describe('hooks with createApi defaults set', () => { const defaultApi = createApi({ baseQuery: async (arg: any) => { - await delay() + await waitMs() if ('amount' in arg?.body) { amount += 1 } @@ -2413,7 +2414,7 @@ describe('hooks with createApi defaults set', () => { describe('selectFromResult (mutation) behavior', () => { const api = createApi({ baseQuery: async (arg: any) => { - await delay() + await waitMs() if ('amount' in arg?.body) { amount += 1 } @@ -2462,11 +2463,11 @@ describe('hooks with createApi defaults set', () => { expect(getRenderCount()).toBe(1) fireEvent.click(screen.getByTestId('incrementButton')) - await delay(200) // give our baseQuery a chance to return + await waitMs(200) // give our baseQuery a chance to return expect(getRenderCount()).toBe(2) fireEvent.click(screen.getByTestId('incrementButton')) - await delay(200) + await waitMs(200) expect(getRenderCount()).toBe(3) const { increment } = api.endpoints @@ -2607,14 +2608,14 @@ describe('skip behaviour', () => { ) expect(result.current).toEqual(uninitialized) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(0) await act(async () => { rerender([1]) }) expect(result.current).toMatchObject({ status: QueryStatus.fulfilled }) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(1) await act(async () => { @@ -2625,7 +2626,7 @@ describe('skip behaviour', () => { currentData: undefined, data: { name: 'Timmy' }, }) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(0) }) @@ -2640,7 +2641,7 @@ describe('skip behaviour', () => { ) expect(result.current).toEqual(uninitialized) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(0) // also no subscription on `getUser(skipToken)` or similar: @@ -2650,7 +2651,7 @@ describe('skip behaviour', () => { rerender([1]) }) expect(result.current).toMatchObject({ status: QueryStatus.fulfilled }) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(1) expect(getSubscriptions()).not.toEqual({}) @@ -2662,7 +2663,7 @@ describe('skip behaviour', () => { currentData: undefined, data: { name: 'Timmy' }, }) - await delay(1) + await waitMs(1) expect(getSubscriptionCount('getUser(1)')).toBe(0) }) @@ -2677,7 +2678,7 @@ describe('skip behaviour', () => { ) await act(async () => { - await delay(1) + await waitMs(1) }) // Normal fulfilled result, with both `data` and `currentData` @@ -2690,7 +2691,7 @@ describe('skip behaviour', () => { await act(async () => { rerender([1, { skip: true }]) - await delay(1) + await waitMs(1) }) // After skipping, the query is "uninitialized", but still retains the last fetched `data` diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index c07563edfb..857b799703 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -44,7 +44,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(api.util.invalidateTags(['Banana', 'Bread'])) // Slight pause to let the middleware run and such - delay(20) + await delay(20) const firstSequence = [ api.internalActions.middlewareRegistered.match, @@ -59,7 +59,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(getBread.initiate(1)) await storeRef.store.dispatch(api.util.invalidateTags([{ type: 'Bread' }])) - delay(20) + await delay(20) expect(storeRef.store.getState().actions).toMatchSequence( ...firstSequence, diff --git a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx index 5e9343fafe..f049e970c0 100644 --- a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx @@ -1,6 +1,6 @@ import { configureStore } from '@reduxjs/toolkit' import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' -import './utils/typeTestHelpers' +import '../../tests/utils/helpers' type CustomErrorType = { type: 'Custom' } diff --git a/packages/toolkit/src/tests/utils/vitest.d.ts b/packages/toolkit/src/tests/utils/vitest.d.ts index 1911ae10bd..dca0a6008e 100644 --- a/packages/toolkit/src/tests/utils/vitest.d.ts +++ b/packages/toolkit/src/tests/utils/vitest.d.ts @@ -3,10 +3,9 @@ import type { Assertion, AsymmetricMatchersContaining } from 'vitest' interface CustomMatchers { toMatchSequence(...matchers: Array<(arg: any) => boolean>): R toHaveConsoleOutput(expectedOutput: string): Promise - } declare module 'vitest' { interface Assertion extends CustomMatchers {} interface AsymmetricMatchersContaining extends CustomMatchers {} -} \ No newline at end of file +} From 073904bd91187d472b5c80cc60ea8288d7c0e4c9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:25:36 -0600 Subject: [PATCH 191/368] Fix ambient declaration issue --- packages/toolkit/tsconfig.base.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index aad62c5c2c..373152ed03 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -32,7 +32,7 @@ "allowSyntheticDefaultImports": true, "emitDeclarationOnly": true, "baseUrl": ".", - "types": ["vitest/globals", "vitest/importMeta"], + "types": ["vitest/globals", "vitest/importMeta", "vitest"], "paths": { "@reduxjs/toolkit": ["src/index.ts"], // @remap-prod-remove-line "@reduxjs/toolkit/react": ["src/react/index.ts"], // @remap-prod-remove-line From 5f1451399a13816ba20f31bd098d858b35f94d42 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:40:52 -0600 Subject: [PATCH 192/368] Try to fix ambient declarations issue --- packages/toolkit/src/tests/utils/helpers.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index d7eacec6a8..deba0571d9 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -18,6 +18,18 @@ import { mockConsole, } from 'console-testing-library/pure' +import type { Assertion, AsymmetricMatchersContaining } from 'vitest' + +interface CustomMatchers { + toMatchSequence(...matchers: Array<(arg: any) => boolean>): R + toHaveConsoleOutput(expectedOutput: string): Promise +} + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} + export const ANY = 0 as any export const DEFAULT_DELAY_MS = 150 From eba8c4e9a1c11e594a03129f593a93075a029d07 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:46:11 -0600 Subject: [PATCH 193/368] Remove extra `vitest.d.ts` file --- packages/toolkit/src/tests/utils/vitest.d.ts | 11 ----------- packages/toolkit/tsconfig.base.json | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 packages/toolkit/src/tests/utils/vitest.d.ts diff --git a/packages/toolkit/src/tests/utils/vitest.d.ts b/packages/toolkit/src/tests/utils/vitest.d.ts deleted file mode 100644 index dca0a6008e..0000000000 --- a/packages/toolkit/src/tests/utils/vitest.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Assertion, AsymmetricMatchersContaining } from 'vitest' - -interface CustomMatchers { - toMatchSequence(...matchers: Array<(arg: any) => boolean>): R - toHaveConsoleOutput(expectedOutput: string): Promise -} - -declare module 'vitest' { - interface Assertion extends CustomMatchers {} - interface AsymmetricMatchersContaining extends CustomMatchers {} -} diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index 373152ed03..aad62c5c2c 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -32,7 +32,7 @@ "allowSyntheticDefaultImports": true, "emitDeclarationOnly": true, "baseUrl": ".", - "types": ["vitest/globals", "vitest/importMeta", "vitest"], + "types": ["vitest/globals", "vitest/importMeta"], "paths": { "@reduxjs/toolkit": ["src/index.ts"], // @remap-prod-remove-line "@reduxjs/toolkit/react": ["src/react/index.ts"], // @remap-prod-remove-line From c81bf7ca90919680ede4fbbfea8c4131d7b2736d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 05:58:54 -0600 Subject: [PATCH 194/368] Revert "Remove extra `vitest.d.ts` file" This reverts commit eba8c4e9a1c11e594a03129f593a93075a029d07. --- packages/toolkit/src/tests/utils/vitest.d.ts | 11 +++++++++++ packages/toolkit/tsconfig.base.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 packages/toolkit/src/tests/utils/vitest.d.ts diff --git a/packages/toolkit/src/tests/utils/vitest.d.ts b/packages/toolkit/src/tests/utils/vitest.d.ts new file mode 100644 index 0000000000..dca0a6008e --- /dev/null +++ b/packages/toolkit/src/tests/utils/vitest.d.ts @@ -0,0 +1,11 @@ +import type { Assertion, AsymmetricMatchersContaining } from 'vitest' + +interface CustomMatchers { + toMatchSequence(...matchers: Array<(arg: any) => boolean>): R + toHaveConsoleOutput(expectedOutput: string): Promise +} + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index aad62c5c2c..373152ed03 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -32,7 +32,7 @@ "allowSyntheticDefaultImports": true, "emitDeclarationOnly": true, "baseUrl": ".", - "types": ["vitest/globals", "vitest/importMeta"], + "types": ["vitest/globals", "vitest/importMeta", "vitest"], "paths": { "@reduxjs/toolkit": ["src/index.ts"], // @remap-prod-remove-line "@reduxjs/toolkit/react": ["src/react/index.ts"], // @remap-prod-remove-line From 5e6921b3212f098458b7773ac6bede014028e1b9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 07:27:40 -0600 Subject: [PATCH 195/368] Add back `namespace jest` declaration merging --- packages/toolkit/src/tests/utils/helpers.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index deba0571d9..1e2f5bbc36 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -30,6 +30,12 @@ declare module 'vitest' { interface AsymmetricMatchersContaining extends CustomMatchers {} } +declare global { + namespace jest { + interface Matchers extends CustomMatchers {} + } +} + export const ANY = 0 as any export const DEFAULT_DELAY_MS = 150 From be4e03e24965acb2ac1ea1aa0400ac3e1aee9db2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 09:24:30 -0600 Subject: [PATCH 196/368] Remove `interopDefault` from `vitest.config.ts` as it is enabled by default --- packages/rtk-codemods/vitest.config.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/rtk-codemods/vitest.config.ts b/packages/rtk-codemods/vitest.config.ts index 7cef2ef780..37b9105b6c 100644 --- a/packages/rtk-codemods/vitest.config.ts +++ b/packages/rtk-codemods/vitest.config.ts @@ -1,11 +1,8 @@ -import { defineConfig } from 'vitest/config'; +import { defineConfig } from 'vitest/config' export default defineConfig({ test: { globals: true, - watch: false, - deps: { - interopDefault: true, - }, - }, -}); + watch: false + } +}) From 6145da553f69760a0f9c1b0fb444ce0c472eb478 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 09:25:50 -0600 Subject: [PATCH 197/368] Add `test:watch` NPM script --- packages/rtk-codemods/package.json | 3 ++- packages/rtk-codemods/vitest.config.ts | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 16ac78c1ee..db15993180 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -3,7 +3,8 @@ "version": "0.1.0", "scripts": { "lint": "eslint .", - "test": "vitest", + "test": "vitest --run", + "test:watch": "vitest --watch", "test:coverage": "vitest --coverage" }, "bin": "./bin/cli.js", diff --git a/packages/rtk-codemods/vitest.config.ts b/packages/rtk-codemods/vitest.config.ts index 37b9105b6c..556ad64883 100644 --- a/packages/rtk-codemods/vitest.config.ts +++ b/packages/rtk-codemods/vitest.config.ts @@ -2,7 +2,6 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { - globals: true, - watch: false + globals: true } }) From 49309bb112ae80f0a22ee1b9608f7fa3128f7b58 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 09:26:26 -0600 Subject: [PATCH 198/368] Rename `vitest.config.ts` to `vitest.config.mts` - This was done because the CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. --- packages/rtk-codemods/{vitest.config.ts => vitest.config.mts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/rtk-codemods/{vitest.config.ts => vitest.config.mts} (100%) diff --git a/packages/rtk-codemods/vitest.config.ts b/packages/rtk-codemods/vitest.config.mts similarity index 100% rename from packages/rtk-codemods/vitest.config.ts rename to packages/rtk-codemods/vitest.config.mts From f459a7971b90c2ca110550a4289ba4085d01c5ed Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 09:30:54 -0600 Subject: [PATCH 199/368] Update dev dependencies --- packages/rtk-codemods/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index db15993180..5754ed4466 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/jscodeshift": "^0.11.11", - "@typescript-eslint/parser": "^6.19.0", + "@typescript-eslint/parser": "^6.19.1", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-node": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index f5f9adce88..6296ad14d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7313,7 +7313,7 @@ __metadata: resolution: "@reduxjs/rtk-codemods@workspace:packages/rtk-codemods" dependencies: "@types/jscodeshift": ^0.11.11 - "@typescript-eslint/parser": ^6.19.0 + "@typescript-eslint/parser": ^6.19.1 eslint: ^8.56.0 eslint-config-prettier: ^9.1.0 eslint-plugin-node: ^11.1.0 From 2083d02e3d9297dc8de96a23c53cc3d2d0bdb6af Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 09:40:03 -0600 Subject: [PATCH 200/368] Add TS 4.7 example snippet --- .../__testfixtures__/basic-ts.input.ts | 22 ++++++++++++++----- .../__testfixtures__/basic-ts.output.ts | 7 +++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts index 8e61fcefa3..57f0a84cbf 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.input.ts @@ -6,6 +6,11 @@ export interface Todo { title: string } +// This only included to make sure the codemod does not +// throw a runtime error when faced with TS 4.7+ syntax such as +// the `satisfies` operator and instantiation expressions +const someString = 'someString' satisfies string + export const todoAdapter = createEntityAdapter() const todoInitialState = todoAdapter.getInitialState() @@ -18,21 +23,25 @@ createReducer(todoInitialState, { [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { // stuff }, - [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => action.payload, - [todoAdded1c + 'test']: (state:TodoSliceState, action: PayloadAction) => { + [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => + action.payload, + [todoAdded1c + 'test']: (state: TodoSliceState, action: PayloadAction) => { // stuff }, [todoAdded1d](state: TodoSliceState, action: PayloadAction) { // stuff }, - [todoAdded1e]: function(state: TodoSliceState, action: PayloadAction) { + [todoAdded1e]: function ( + state: TodoSliceState, + action: PayloadAction + ) { // stuff }, todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { //stuff }, [todoAdded1g]: addOne, - todoAdded1h: todoAdapter.addOne, + todoAdded1h: todoAdapter.addOne }) createReducer(todoInitialState, { @@ -42,7 +51,10 @@ createReducer(todoInitialState, { [todoAdded2b](state: TodoSliceState, action: PayloadAction) { // stuff }, - [todoAdded2c]: function(state: TodoSliceState, action: PayloadAction) { + [todoAdded2c]: function ( + state: TodoSliceState, + action: PayloadAction + ) { // stuff } }) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts index a913aa729c..a3d7af1089 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts +++ b/packages/rtk-codemods/transforms/createReducerBuilder/__testfixtures__/basic-ts.output.ts @@ -6,6 +6,11 @@ export interface Todo { title: string } +// This only included to make sure the codemod does not +// throw a runtime error when faced with TS 4.7+ syntax such as +// the `satisfies` operator and instantiation expressions +const someString = 'someString' satisfies string + export const todoAdapter = createEntityAdapter() const todoInitialState = todoAdapter.getInitialState() @@ -26,7 +31,7 @@ createReducer(todoInitialState, (builder) => { builder.addCase( todoAdded1c + 'test', - (state:TodoSliceState, action: PayloadAction) => { + (state: TodoSliceState, action: PayloadAction) => { // stuff } ); From 68d718a2c1d0da1682de68a3e1d6db976fd66a78 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 09:42:10 -0600 Subject: [PATCH 201/368] Rename `vitest.config.ts` to `vitest.config.mts` - This was done because the CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. --- packages/toolkit/{vitest.config.ts => vitest.config.mts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{vitest.config.ts => vitest.config.mts} (100%) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.mts similarity index 100% rename from packages/toolkit/vitest.config.ts rename to packages/toolkit/vitest.config.mts From 9b3eb8f3753f393bc9ae3342d87a3b87f72dc412 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 10:59:54 -0600 Subject: [PATCH 202/368] Change `vitest.config.ts` to `vitest.config.mts` inside `tests.yml` file --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea33ef8f9a..9ad30e6a04 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,7 +91,7 @@ jobs: - name: Install build artifact run: yarn workspace @reduxjs/toolkit add $(pwd)/package.tgz - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* - name: Run tests, against dist run: yarn test @@ -133,7 +133,7 @@ jobs: - name: Show installed RTK versions run: yarn info @reduxjs/toolkit - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* - name: Test types run: | From 58a106e287f08e5b474b9a9e060901345d14fa7b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:48:22 -0600 Subject: [PATCH 203/368] Remove `interopDefault` from `vitest.config.mts` as it is enabled by default --- packages/toolkit/vitest.config.mts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 45b67cf6bd..e502e5059b 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -26,7 +26,6 @@ export default defineConfig({ '@internal': path.join(__dirname, './src'), }, deps: { - interopDefault: true, inline: ['redux', '@reduxjs/toolkit'], }, }, From e7019ee757aa909514b863bf3be1050d03b318d6 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 11:49:46 -0600 Subject: [PATCH 204/368] Replace the deprecated `deps.inline` with `server.deps.inline` --- packages/toolkit/vitest.config.mts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index e502e5059b..4a0855c7ac 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -25,8 +25,6 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, - deps: { - inline: ['redux', '@reduxjs/toolkit'], - }, + server: { deps: { inline: ['redux', '@reduxjs/toolkit'], } }, }, }) From 8f69f3bd3d55aa5faa24c24c0a12f1588fa33b4f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:00:09 -0600 Subject: [PATCH 205/368] Rename `vitest.setup.js` to `vitest.setup.ts` --- packages/toolkit/{vitest.setup.js => vitest.setup.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{vitest.setup.js => vitest.setup.ts} (100%) diff --git a/packages/toolkit/vitest.setup.js b/packages/toolkit/vitest.setup.ts similarity index 100% rename from packages/toolkit/vitest.setup.js rename to packages/toolkit/vitest.setup.ts From ae7de6c49c66233eaf2ae8192005590121dcb60e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:01:34 -0600 Subject: [PATCH 206/368] Add `test:watch` NPM script --- packages/toolkit/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 34f89d2f23..8ae7c2e274 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,6 +101,7 @@ "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", "test": "vitest --run", + "test:watch": "vitest --watch", "type-tests": "yarn tsc -p src/tests/tsconfig.typetests.json && yarn tsc -p src/query/tests/tsconfig.typetests.json", "prepack": "yarn build" }, From 50a1a64f000b0a00d5836dee5f36dd5cbc0b74a5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:02:27 -0600 Subject: [PATCH 207/368] Add `vitest.setup.ts` to `setupFiles` in `vitest.config.mts` --- packages/toolkit/vitest.config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 4a0855c7ac..4b8695ae44 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -12,7 +12,7 @@ export default defineConfig({ typecheck: { only: true, tsconfig: './src/tests/tsconfig.typetests.json' }, globals: true, environment: 'jsdom', - setupFiles: ['./vitest.setup.js'], + setupFiles: ['./vitest.setup.ts'], include: ['./src/**/*.(spec|test).[jt]s?(x)'], alias: { // prettier-ignore From 834a7c9712dfbc40a4625849eda89855f325bdb0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 20 Jan 2024 14:06:05 -0600 Subject: [PATCH 208/368] Bump `node-fetch` dev dependency --- packages/toolkit/package.json | 2 +- yarn.lock | 53 ++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 8ae7c2e274..bf21f18bbb 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -81,7 +81,7 @@ "jsdom": "^21.0.0", "json-stringify-safe": "^5.0.1", "msw": "^0.40.2", - "node-fetch": "^2.6.1", + "node-fetch": "^3.3.2", "prettier": "^2.2.1", "query-string": "^7.0.1", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index eeaa6a54a3..5c1fe8b249 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7051,7 +7051,7 @@ __metadata: jsdom: ^21.0.0 json-stringify-safe: ^5.0.1 msw: ^0.40.2 - node-fetch: ^2.6.1 + node-fetch: ^3.3.2 prettier: ^2.2.1 query-string: ^7.0.1 redux: ^5.0.1 @@ -13462,6 +13462,13 @@ __metadata: languageName: node linkType: hard +"data-uri-to-buffer@npm:^4.0.0": + version: 4.0.1 + resolution: "data-uri-to-buffer@npm:4.0.1" + checksum: 0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c + languageName: node + linkType: hard + "data-urls@npm:^2.0.0": version: 2.0.0 resolution: "data-urls@npm:2.0.0" @@ -15692,6 +15699,16 @@ __metadata: languageName: node linkType: hard +"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": + version: 3.2.0 + resolution: "fetch-blob@npm:3.2.0" + dependencies: + node-domexception: ^1.0.0 + web-streams-polyfill: ^3.0.3 + checksum: f19bc28a2a0b9626e69fd7cf3a05798706db7f6c7548da657cbf5026a570945f5eeaedff52007ea35c8bcd3d237c58a20bf1543bc568ab2422411d762dd3d5bf + languageName: node + linkType: hard + "fflate@npm:^0.7.4": version: 0.7.4 resolution: "fflate@npm:0.7.4" @@ -16036,6 +16053,15 @@ __metadata: languageName: node linkType: hard +"formdata-polyfill@npm:^4.0.10": + version: 4.0.10 + resolution: "formdata-polyfill@npm:4.0.10" + dependencies: + fetch-blob: ^3.1.2 + checksum: 82a34df292afadd82b43d4a740ce387bc08541e0a534358425193017bf9fb3567875dc5f69564984b1da979979b70703aa73dee715a17b6c229752ae736dd9db + languageName: node + linkType: hard + "formik@npm:^2.1.5": version: 2.2.9 resolution: "formik@npm:2.2.9" @@ -21743,6 +21769,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-domexception@npm:^1.0.0": + version: 1.0.0 + resolution: "node-domexception@npm:1.0.0" + checksum: ee1d37dd2a4eb26a8a92cd6b64dfc29caec72bff5e1ed9aba80c294f57a31ba4895a60fd48347cf17dd6e766da0ae87d75657dfd1f384ebfa60462c2283f5c7f + languageName: node + linkType: hard + "node-emoji@npm:^1.10.0": version: 1.10.0 resolution: "node-emoji@npm:1.10.0" @@ -21808,6 +21841,17 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-fetch@npm:^3.3.2": + version: 3.3.2 + resolution: "node-fetch@npm:3.3.2" + dependencies: + data-uri-to-buffer: ^4.0.0 + fetch-blob: ^3.1.4 + formdata-polyfill: ^4.0.10 + checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 + languageName: node + linkType: hard + "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -30495,6 +30539,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"web-streams-polyfill@npm:^3.0.3": + version: 3.3.2 + resolution: "web-streams-polyfill@npm:3.3.2" + checksum: 0292f4113c1bda40d8e8ecebee39eb14cc2e2e560a65a6867980e394537a2645130e2c73f5ef6e641fd3697d2f71720ccf659aebaf69a9d5a773f653a0fdf39d + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" From c4c874dbeb43319b0c0b3c7a3fb66fd419e9542e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:53:10 -0600 Subject: [PATCH 209/368] Bump msw --- package.json | 1 - packages/toolkit/package.json | 2 +- yarn.lock | 288 ++++++++++++++++++++++++++++++---- 3 files changed, 262 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 0e5ad40414..4b42815687 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "@babel/types": "7.19.3", "esbuild": "0.19.7", "jest-snapshot": "29.3.1", - "msw": "patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752", "jscodeshift": "0.13.1", "react-redux": "npm:8.0.2", "react": "npm:18.2.0", diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index bf21f18bbb..9a3b6063e0 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -80,7 +80,7 @@ "invariant": "^2.2.4", "jsdom": "^21.0.0", "json-stringify-safe": "^5.0.1", - "msw": "^0.40.2", + "msw": "^2.1.4", "node-fetch": "^3.3.2", "prettier": "^2.2.1", "query-string": "^7.0.1", diff --git a/yarn.lock b/yarn.lock index 5c1fe8b249..1710704aef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2696,6 +2696,24 @@ __metadata: languageName: node linkType: hard +"@bundled-es-modules/cookie@npm:^2.0.0": + version: 2.0.0 + resolution: "@bundled-es-modules/cookie@npm:2.0.0" + dependencies: + cookie: ^0.5.0 + checksum: 53114eabbedda20ba6c63f45dcea35c568616d22adf5d1882cef9761f65ae636bf47e0c66325572cc8e3a335e0257caf5f76ff1287990d9e9265be7bc9767a87 + languageName: node + linkType: hard + +"@bundled-es-modules/statuses@npm:^1.0.1": + version: 1.0.1 + resolution: "@bundled-es-modules/statuses@npm:1.0.1" + dependencies: + statuses: ^2.0.1 + checksum: bcaa7de192e73056950b5fd20e75140d8d09074b1adc4437924b2051bb02b4dbf568c96e67d53b220fb7d735c3446e2ba746599cb1793ab2d23dd2ef230a8622 + languageName: node + linkType: hard + "@chakra-ui/accordion@npm:1.0.0": version: 1.0.0 resolution: "@chakra-ui/accordion@npm:1.0.0" @@ -6641,6 +6659,16 @@ __metadata: languageName: node linkType: hard +"@mswjs/cookies@npm:^0.1.4": + version: 0.1.7 + resolution: "@mswjs/cookies@npm:0.1.7" + dependencies: + "@types/set-cookie-parser": ^2.4.0 + set-cookie-parser: ^2.4.6 + checksum: d9b152dfdeba08b282a236485610bcfe992626e3c638fe51ebc5c7b5273d41d74e5447ae556a6c76460a8d3c7a7de6f544c681232cb50ae05b6b1e112bb77286 + languageName: node + linkType: hard + "@mswjs/cookies@npm:^0.2.0": version: 0.2.0 resolution: "@mswjs/cookies@npm:0.2.0" @@ -6651,6 +6679,13 @@ __metadata: languageName: node linkType: hard +"@mswjs/cookies@npm:^1.1.0": + version: 1.1.0 + resolution: "@mswjs/cookies@npm:1.1.0" + checksum: 1d9be44548907b92ff6acd46795292968661be19f1c04c43fdb2beb98bc7e58b8ffcef3be19d0f2cb58df07a36a6b53b4bbc0ea34e023b7366dbc28ffee90338 + languageName: node + linkType: hard + "@mswjs/data@npm:^0.3.0": version: 0.3.0 resolution: "@mswjs/data@npm:0.3.0" @@ -6707,6 +6742,32 @@ __metadata: languageName: node linkType: hard +"@mswjs/interceptors@npm:^0.25.14": + version: 0.25.14 + resolution: "@mswjs/interceptors@npm:0.25.14" + dependencies: + "@open-draft/deferred-promise": ^2.2.0 + "@open-draft/logger": ^0.3.0 + "@open-draft/until": ^2.0.0 + is-node-process: ^1.2.0 + outvariant: ^1.2.1 + strict-event-emitter: ^0.5.1 + checksum: caf9513cf6848ff0c3f1402abf881d3c1333f68fae54076cfd3fd919b7edb709769342bd3afd2a60ef4ae698ef47776b6203e0ea6a5d8e788e97eda7ed9dbbd4 + languageName: node + linkType: hard + +"@mswjs/interceptors@npm:^0.8.0": + version: 0.8.1 + resolution: "@mswjs/interceptors@npm:0.8.1" + dependencies: + "@open-draft/until": ^1.0.3 + debug: ^4.3.0 + headers-utils: ^3.0.2 + strict-event-emitter: ^0.2.0 + checksum: cb4aaf4d83b0f12560f856952a4fa12b77cc50d273da08823b8a7c4a89602a770b0143823f1dcb38832c9a8fc064c9497c455f6079656fcf113b80561b3488a8 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -6875,6 +6936,23 @@ __metadata: languageName: node linkType: hard +"@open-draft/deferred-promise@npm:^2.2.0": + version: 2.2.0 + resolution: "@open-draft/deferred-promise@npm:2.2.0" + checksum: 7f29d39725bb8ab5b62f89d88a4202ce2439ac740860979f9e3d0015dfe4bc3daddcfa5727fa4eed482fdbee770aa591b1136b98b0a0f0569a65294f35bdf56a + languageName: node + linkType: hard + +"@open-draft/logger@npm:^0.3.0": + version: 0.3.0 + resolution: "@open-draft/logger@npm:0.3.0" + dependencies: + is-node-process: ^1.2.0 + outvariant: ^1.4.0 + checksum: 7adfe3d0ed8ca32333ce2a77f9a93d561ebc89c989eaa9722f1dc8a2d2854f5de1bef6fa6894cdf58e16fa4dd9cfa99444ea1f5cac6eb1518e9247911ed042d5 + languageName: node + linkType: hard + "@open-draft/until@npm:^1.0.3": version: 1.0.3 resolution: "@open-draft/until@npm:1.0.3" @@ -6882,6 +6960,13 @@ __metadata: languageName: node linkType: hard +"@open-draft/until@npm:^2.0.0, @open-draft/until@npm:^2.1.0": + version: 2.1.0 + resolution: "@open-draft/until@npm:2.1.0" + checksum: 140ea3b16f4a3a6a729c1256050e20a93d408d7aa1e125648ce2665b3c526ed452510c6e4a6f4b15d95fb5e41203fb51510eb8fbc8812d5e5a91880293d66471 + languageName: node + linkType: hard + "@phryneas/ts-version@npm:^1.0.2": version: 1.0.2 resolution: "@phryneas/ts-version@npm:1.0.2" @@ -7050,7 +7135,7 @@ __metadata: invariant: ^2.2.4 jsdom: ^21.0.0 json-stringify-safe: ^5.0.1 - msw: ^0.40.2 + msw: ^2.1.4 node-fetch: ^3.3.2 prettier: ^2.2.1 query-string: ^7.0.1 @@ -8128,13 +8213,20 @@ __metadata: languageName: node linkType: hard -"@types/cookie@npm:^0.4.1": +"@types/cookie@npm:^0.4.0, @types/cookie@npm:^0.4.1": version: 0.4.1 resolution: "@types/cookie@npm:0.4.1" checksum: 3275534ed69a76c68eb1a77d547d75f99fedc80befb75a3d1d03662fb08d697e6f8b1274e12af1a74c6896071b11510631ba891f64d30c78528d0ec45a9c1a18 languageName: node linkType: hard +"@types/cookie@npm:^0.6.0": + version: 0.6.0 + resolution: "@types/cookie@npm:0.6.0" + checksum: 5edce7995775b0b196b142883e4d4f71fd93c294eaec973670f1fa2540b70ea7390408ed513ddefef5fcb12a578100c76596e8f2a714b0c2ae9f70ee773f4510 + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.3": version: 3.7.3 resolution: "@types/eslint-scope@npm:3.7.3" @@ -8289,6 +8381,16 @@ __metadata: languageName: node linkType: hard +"@types/inquirer@npm:8.2.1": + version: 8.2.1 + resolution: "@types/inquirer@npm:8.2.1" + dependencies: + "@types/through": "*" + rxjs: ^7.2.0 + checksum: 5362d0b1cbec3887c9d5a671a0b19c58cf54066456c8967dd7ee799dfcc242cc8cd8959440c0f2fe7768becaf721b45fd30c222e6b9bcca378f45c68af43bab5 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.3 resolution: "@types/istanbul-lib-coverage@npm:2.0.3" @@ -8334,6 +8436,13 @@ __metadata: languageName: node linkType: hard +"@types/js-levenshtein@npm:^1.1.0": + version: 1.1.3 + resolution: "@types/js-levenshtein@npm:1.1.3" + checksum: eb338696da976925ea8448a42d775d7615a14323dceeb08909f187d0b3d3b4c1f67a1c36ef586b1c2318b70ab141bba8fc58311ba1c816711704605aec09db8b + languageName: node + linkType: hard + "@types/js-levenshtein@npm:^1.1.1": version: 1.1.1 resolution: "@types/js-levenshtein@npm:1.1.1" @@ -8735,6 +8844,13 @@ __metadata: languageName: node linkType: hard +"@types/statuses@npm:^2.0.4": + version: 2.0.4 + resolution: "@types/statuses@npm:2.0.4" + checksum: 3a806c3b96d1845e3e7441fbf0839037e95f717334760ddb7c29223c9a34a7206b68e2998631f89f1a1e3ef5b67b15652f6e8fa14987ebd7f6d38587c1bffd18 + languageName: node + linkType: hard + "@types/testing-library__jest-dom@npm:^5.9.1": version: 5.14.3 resolution: "@types/testing-library__jest-dom@npm:5.14.3" @@ -8744,6 +8860,15 @@ __metadata: languageName: node linkType: hard +"@types/through@npm:*": + version: 0.0.33 + resolution: "@types/through@npm:0.0.33" + dependencies: + "@types/node": "*" + checksum: fd0b73f873a64ed5366d1d757c42e5dbbb2201002667c8958eda7ca02fff09d73de91360572db465ee00240c32d50c6039ea736d8eca374300f9664f93e8da39 + languageName: node + linkType: hard + "@types/tinycolor2@npm:1.4.2": version: 1.4.2 resolution: "@types/tinycolor2@npm:1.4.2" @@ -12073,6 +12198,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + "clone-deep@npm:^4.0.1": version: 4.0.1 resolution: "clone-deep@npm:4.0.1" @@ -12617,14 +12753,14 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0": +"cookie@npm:0.5.0, cookie@npm:^0.5.0": version: 0.5.0 resolution: "cookie@npm:0.5.0" checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 languageName: node linkType: hard -"cookie@npm:^0.4.2": +"cookie@npm:^0.4.1, cookie@npm:^0.4.2": version: 0.4.2 resolution: "cookie@npm:0.4.2" checksum: a00833c998bedf8e787b4c342defe5fa419abd96b32f4464f718b91022586b8f1bafbddd499288e75c037642493c83083da426c6a9080d309e3bd90fd11baa9b @@ -13537,7 +13673,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -16782,6 +16918,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"graphql@npm:^15.4.0": + version: 15.8.0 + resolution: "graphql@npm:15.8.0" + checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e + languageName: node + linkType: hard + "graphql@npm:^15.5.0": version: 15.5.0 resolution: "graphql@npm:15.5.0" @@ -16796,6 +16939,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"graphql@npm:^16.8.1": + version: 16.8.1 + resolution: "graphql@npm:16.8.1" + checksum: 8d304b7b6f708c8c5cc164b06e92467dfe36aff6d4f2cf31dd19c4c2905a0e7b89edac4b7e225871131fd24e21460836b369de0c06532644d15b461d55b1ccc0 + languageName: node + linkType: hard + "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -17084,6 +17234,20 @@ fsevents@^1.2.7: languageName: node linkType: hard +"headers-polyfill@npm:^4.0.2": + version: 4.0.2 + resolution: "headers-polyfill@npm:4.0.2" + checksum: a95280ed58df429fc86c4f49b21596be3ea3f5f3d790e7d75238668df9b90b292f15a968c7c19ae1db88c0ae036dd1bf363a71b8e771199d82848e2d8b3c6c2e + languageName: node + linkType: hard + +"headers-utils@npm:^3.0.2": + version: 3.0.2 + resolution: "headers-utils@npm:3.0.2" + checksum: 210fe65756d6de8a96afe68617463fb6faf675a24d864e849b17bddf051c4a24d621a510a1bb80fd9d4763b932eb44b5d8fd6fc4f14fa62fb211603456a57b4f + languageName: node + linkType: hard + "hex-color-regex@npm:^1.1.0": version: 1.1.0 resolution: "hex-color-regex@npm:1.1.0" @@ -18263,6 +18427,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-node-process@npm:^1.2.0": + version: 1.2.0 + resolution: "is-node-process@npm:1.2.0" + checksum: 930765cdc6d81ab8f1bbecbea4a8d35c7c6d88a3ff61f3630e0fc7f22d624d7661c1df05c58547d0eb6a639dfa9304682c8e342c4113a6ed51472b704cee2928 + languageName: node + linkType: hard + "is-npm@npm:^5.0.0": version: 5.0.0 resolution: "is-npm@npm:5.0.0" @@ -21538,7 +21709,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"msw@npm:0.40.2": +"msw@npm:0.40.2, msw@npm:^0.40.2": version: 0.40.2 resolution: "msw@npm:0.40.2" dependencies: @@ -21572,37 +21743,64 @@ fsevents@^1.2.7: languageName: node linkType: hard -"msw@patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752::locator=rtk-monorepo%40workspace%3A.": - version: 0.40.2 - resolution: "msw@patch:msw@npm%3A0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752::version=0.40.2&hash=830779&locator=rtk-monorepo%40workspace%3A." +"msw@npm:^0.28.2": + version: 0.28.2 + resolution: "msw@npm:0.28.2" dependencies: - "@mswjs/cookies": ^0.2.0 - "@mswjs/interceptors": ^0.15.1 + "@mswjs/cookies": ^0.1.4 + "@mswjs/interceptors": ^0.8.0 "@open-draft/until": ^1.0.3 - "@types/cookie": ^0.4.1 - "@types/js-levenshtein": ^1.1.1 - chalk: 4.1.1 + "@types/cookie": ^0.4.0 + "@types/inquirer": ^7.3.1 + "@types/js-levenshtein": ^1.1.0 + chalk: ^4.1.0 chokidar: ^3.4.2 - cookie: ^0.4.2 - graphql: ^16.3.0 - headers-polyfill: ^3.0.4 - inquirer: ^8.2.0 - is-node-process: ^1.0.1 + cookie: ^0.4.1 + graphql: ^15.4.0 + headers-utils: ^3.0.2 + inquirer: ^7.3.3 js-levenshtein: ^1.1.6 - node-fetch: ^2.6.7 - path-to-regexp: ^6.2.0 + node-fetch: ^2.6.1 + node-match-path: ^0.6.1 statuses: ^2.0.0 strict-event-emitter: ^0.2.0 - type-fest: ^1.2.2 - yargs: ^17.3.1 + yargs: ^16.2.0 + bin: + msw: cli/index.js + checksum: bfcac14831d88ebee0375933a84294696410a2f93a8dd0cf0d37fb8f641ce93e9d2d840253fb5755003ea8bd7126dc83bd6844066bf5073f0a264cd8c768dec7 + languageName: node + linkType: hard + +"msw@npm:^2.1.4": + version: 2.1.4 + resolution: "msw@npm:2.1.4" + dependencies: + "@bundled-es-modules/cookie": ^2.0.0 + "@bundled-es-modules/statuses": ^1.0.1 + "@mswjs/cookies": ^1.1.0 + "@mswjs/interceptors": ^0.25.14 + "@open-draft/until": ^2.1.0 + "@types/cookie": ^0.6.0 + "@types/statuses": ^2.0.4 + chalk: ^4.1.2 + chokidar: ^3.4.2 + graphql: ^16.8.1 + headers-polyfill: ^4.0.2 + inquirer: ^8.2.0 + is-node-process: ^1.2.0 + outvariant: ^1.4.2 + path-to-regexp: ^6.2.0 + strict-event-emitter: ^0.5.1 + type-fest: ^4.9.0 + yargs: ^17.7.2 peerDependencies: - typescript: ">= 4.2.x <= 4.6.x" + typescript: ">= 4.7.x <= 5.3.x" peerDependenciesMeta: typescript: optional: true bin: msw: cli/index.js - checksum: 3a5cd03a451462b2198824438ef3b81372c5fb3f39a81d1909141b7207a9776302bb90b98b2c0ddc67fe179b32cdadb83a0c69b2f7a256e36b21e58f102a6b7b + checksum: da8aaf9682ac48a635966beef9add9493297de797b266066bcd8ae0c2708488b81558251412e41489511a63deda1774b42e28197e9b73ddf14d9ecf8bb916e7a languageName: node linkType: hard @@ -21917,6 +22115,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"node-match-path@npm:^0.6.1": + version: 0.6.3 + resolution: "node-match-path@npm:0.6.3" + checksum: d515bc069f293688109c058ee02567528fdaa856290d362b80a2254734975014e4eefcdcc5164a8adfd5560aa870e277c97fe8be648074d5088056cf61553c7c + languageName: node + linkType: hard + "node-readfiles@npm:^0.2.0": version: 0.2.0 resolution: "node-readfiles@npm:0.2.0" @@ -22512,6 +22717,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"outvariant@npm:^1.4.0, outvariant@npm:^1.4.2": + version: 1.4.2 + resolution: "outvariant@npm:1.4.2" + checksum: 5d9e2b3edb1cc8be9cbfc1c8c97e8b05137c4384bbfc56e0a465de26c5d2f023e65732ddcda9d46599b06d667fbc0de32c30d2ecd11f6f3f43bcf8ce0d320918 + languageName: node + linkType: hard + "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -27768,7 +27980,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"statuses@npm:2.0.1, statuses@npm:^2.0.0": +"statuses@npm:2.0.1, statuses@npm:^2.0.0, statuses@npm:^2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb @@ -27852,6 +28064,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"strict-event-emitter@npm:^0.5.1": + version: 0.5.1 + resolution: "strict-event-emitter@npm:0.5.1" + checksum: 350480431bc1c28fdb601ef4976c2f8155fc364b4740f9692dd03e5bdd48aafc99a5e021fe655fbd986d0b803e9f3fc5c4b018b35cb838c4690d60f2a26f1cf3 + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -31613,7 +31832,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1": +"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c @@ -31669,6 +31888,21 @@ fsevents@^1.2.7: languageName: node linkType: hard +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" From 0820d20604de08b6a7a4e1c51e5e4e466efd605e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:54:22 -0600 Subject: [PATCH 210/368] Fix stubbing globals in `vitest.setup.ts` --- packages/toolkit/vitest.setup.ts | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/toolkit/vitest.setup.ts b/packages/toolkit/vitest.setup.ts index fc4a30240e..1be6b0b461 100644 --- a/packages/toolkit/vitest.setup.ts +++ b/packages/toolkit/vitest.setup.ts @@ -1,19 +1,18 @@ -//@ts-ignore -import nodeFetch from 'node-fetch' -//@ts-ignore -globalThis.fetch = nodeFetch -//@ts-ignore -globalThis.Request = nodeFetch.Request -globalThis.Headers = nodeFetch.Headers +import nodeFetch, { Headers, Request } from 'node-fetch' import { server } from './src/query/tests/mocks/server' -beforeAll(() => server.listen({ onUnhandledRequest: 'error' })) -afterEach(() => server.resetHandlers()) -afterAll(() => server.close()) +vi.stubGlobal('fetch', nodeFetch) +vi.stubGlobal('Request', Request) +vi.stubGlobal('Headers', Headers) -process.on('unhandledRejection', (error) => { - // eslint-disable-next-line no-undef - fail(error) +beforeAll(() => { + server.listen({ onUnhandledRequest: 'error' }) }) -process.env.NODE_ENV = 'development' +afterEach(() => { + server.resetHandlers() +}) + +afterAll(() => { + server.close() +}) From c6b4213be1e86819e02305e0f4430e7f4d837ae3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 19:59:30 -0600 Subject: [PATCH 211/368] Fix handlers to be compatible with latest version of `msw` --- .../toolkit/src/query/tests/mocks/server.ts | 114 ++++++++++++------ 1 file changed, 74 insertions(+), 40 deletions(-) diff --git a/packages/toolkit/src/query/tests/mocks/server.ts b/packages/toolkit/src/query/tests/mocks/server.ts index 62d1c350f5..12197674d6 100644 --- a/packages/toolkit/src/query/tests/mocks/server.ts +++ b/packages/toolkit/src/query/tests/mocks/server.ts @@ -1,62 +1,96 @@ import { setupServer } from 'msw/node' -import { rest } from 'msw' - -// This configures a request mocking server with the given request handlers. +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' export type Post = { - id: number + id: string title: string body: string } -export const posts: Record = { - 1: { id: 1, title: 'hello', body: 'extra body!' }, +export const posts: Record = { + '1': { id: '1', title: 'hello', body: 'extra body!' }, } -export const server = setupServer( - rest.get('https://example.com/echo', (req, res, ctx) => - res(ctx.json({ ...req, headers: req.headers.all() })) - ), - rest.post('https://example.com/echo', (req, res, ctx) => - res(ctx.json({ ...req, headers: req.headers.all() })) - ), - rest.get('https://example.com/success', (_, res, ctx) => - res(ctx.json({ value: 'success' })) +export const handlers = [ + http.get( + 'https://example.com/echo', + async ({ request, params, cookies, requestId }) => { + return HttpResponse.json( + { + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }, + { headers: request.headers } + ) + } ), - rest.post('https://example.com/success', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post( + 'https://example.com/echo', + async ({ request, cookies, params, requestId }) => { + const body = headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + + return HttpResponse.json( + { + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: request?.headers + ? headersToObject(request.headers) + : request?.headers, + }, + { headers: request.headers } + ) + } ), - rest.get('https://example.com/empty', (_, res, ctx) => res(ctx.body(''))), - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'success' }) + }), + http.post('https://example.com/success', ({ request }) => { + return HttpResponse.json({ value: 'success' }) + }), + http.get('https://example.com/empty', () => new HttpResponse('')), + http.get('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ), - rest.post('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ), - rest.get('https://example.com/nonstandard-error', (_, res, ctx) => - res( - ctx.status(200), - ctx.json({ + http.get('https://example.com/nonstandard-error', () => + HttpResponse.json( + { success: false, message: 'This returns a 200 but is really an error', - }) + }, + { status: 200 } ) ), - rest.get('https://example.com/mirror', (req, res, ctx) => - res(ctx.json(req.params)) + http.get('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) ), - rest.post('https://example.com/mirror', (req, res, ctx) => - res(ctx.json(req.params)) + http.post('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) ), - rest.get('https://example.com/posts/random', (req, res, ctx) => { + http.get('https://example.com/posts/random', () => { // just simulate an api that returned a random ID - const { id, ..._post } = posts[1] - return res(ctx.json({ id })) + const { id } = posts[1] + return HttpResponse.json({ id }) }), - rest.get( + http.get>( 'https://example.com/post/:id', - (req, res, ctx) => { - return res(ctx.json(posts[req.params.id])) - } - ) -) + ({ params }) => HttpResponse.json(posts[params.id]) + ), +] + + +// This configures a request mocking server with the given request handlers. +export const server = setupServer(...handlers) From a02161778824a37758133e8e0ea12373dc4867ca Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:00:31 -0600 Subject: [PATCH 212/368] Split up handlers and server files --- .../toolkit/src/query/tests/mocks/handlers.ts | 91 ++++++++++++++++++ .../toolkit/src/query/tests/mocks/server.ts | 93 +------------------ 2 files changed, 92 insertions(+), 92 deletions(-) create mode 100644 packages/toolkit/src/query/tests/mocks/handlers.ts diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts new file mode 100644 index 0000000000..5602d5b26e --- /dev/null +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -0,0 +1,91 @@ +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' + +export type Post = { + id: string + title: string + body: string +} + +export const posts: Record = { + '1': { id: '1', title: 'hello', body: 'extra body!' }, +} + +export const handlers = [ + http.get( + 'https://example.com/echo', + async ({ request, params, cookies, requestId }) => { + return HttpResponse.json( + { + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }, + { headers: request.headers } + ) + } + ), + http.post( + 'https://example.com/echo', + async ({ request, cookies, params, requestId }) => { + const body = headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + + return HttpResponse.json( + { + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: request?.headers + ? headersToObject(request.headers) + : request?.headers, + }, + { headers: request.headers } + ) + } + ), + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'success' }) + }), + http.post('https://example.com/success', ({ request }) => { + return HttpResponse.json({ value: 'success' }) + }), + http.get('https://example.com/empty', () => new HttpResponse('')), + http.get('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) + ), + http.post('https://example.com/error', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) + ), + http.get('https://example.com/nonstandard-error', () => + HttpResponse.json( + { + success: false, + message: 'This returns a 200 but is really an error', + }, + { status: 200 } + ) + ), + http.get('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) + ), + http.post('https://example.com/mirror', ({ params }) => + HttpResponse.json(params) + ), + http.get('https://example.com/posts/random', () => { + // just simulate an api that returned a random ID + const { id } = posts[1] + return HttpResponse.json({ id }) + }), + http.get>( + 'https://example.com/post/:id', + ({ params }) => HttpResponse.json(posts[params.id]) + ), +] diff --git a/packages/toolkit/src/query/tests/mocks/server.ts b/packages/toolkit/src/query/tests/mocks/server.ts index 12197674d6..5dc2fb1467 100644 --- a/packages/toolkit/src/query/tests/mocks/server.ts +++ b/packages/toolkit/src/query/tests/mocks/server.ts @@ -1,96 +1,5 @@ import { setupServer } from 'msw/node' -import { headersToObject } from 'headers-polyfill' -import { HttpResponse, http } from 'msw' - -export type Post = { - id: string - title: string - body: string -} - -export const posts: Record = { - '1': { id: '1', title: 'hello', body: 'extra body!' }, -} - -export const handlers = [ - http.get( - 'https://example.com/echo', - async ({ request, params, cookies, requestId }) => { - return HttpResponse.json( - { - ...request, - params, - cookies, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }, - { headers: request.headers } - ) - } - ), - http.post( - 'https://example.com/echo', - async ({ request, cookies, params, requestId }) => { - const body = headersToObject(request.headers)['content-type'] === 'text/html' - ? await request.text() - : await request.json() - - return HttpResponse.json( - { - ...request, - cookies, - params, - requestId, - body, - url: new URL(request.url), - headers: request?.headers - ? headersToObject(request.headers) - : request?.headers, - }, - { headers: request.headers } - ) - } - ), - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'success' }) - }), - http.post('https://example.com/success', ({ request }) => { - return HttpResponse.json({ value: 'success' }) - }), - http.get('https://example.com/empty', () => new HttpResponse('')), - http.get('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.post('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.get('https://example.com/nonstandard-error', () => - HttpResponse.json( - { - success: false, - message: 'This returns a 200 but is really an error', - }, - { status: 200 } - ) - ), - http.get('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.post('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.get('https://example.com/posts/random', () => { - // just simulate an api that returned a random ID - const { id } = posts[1] - return HttpResponse.json({ id }) - }), - http.get>( - 'https://example.com/post/:id', - ({ params }) => HttpResponse.json(posts[params.id]) - ), -] - +import { handlers } from './handlers' // This configures a request mocking server with the given request handlers. export const server = setupServer(...handlers) From c8a5f3bb43fca11f5d8384dc6b83c3abe78686d8 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 20:08:09 -0600 Subject: [PATCH 213/368] Use codemods provided by msw to modernize msw syntax --- .../src/query/tests/buildCreateApi.test.tsx | 44 ++------- .../src/query/tests/buildHooks.test.tsx | 64 ++++++------ .../toolkit/src/query/tests/createApi.test.ts | 70 +++++++------ .../src/query/tests/errorHandling.test.tsx | 62 ++++++------ .../src/query/tests/fetchBaseQuery.test.tsx | 97 +++++++++++-------- packages/toolkit/src/query/tests/helpers.tsx | 18 ++-- .../toolkit/src/query/tests/queryFn.test.tsx | 4 +- .../src/query/tests/queryLifecycle.test.tsx | 8 +- .../toolkit/src/tests/combineSlices.test.ts | 7 ++ .../toolkit/src/tests/createSlice.test.ts | 7 ++ 10 files changed, 195 insertions(+), 186 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index ad5ff1af55..ec12eefec1 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -1,3 +1,10 @@ +import { createSelectorCreator, lruMemoize } from '@reduxjs/toolkit' +import { + buildCreateApi, + coreModule, + reactHooksModule, +} from '@reduxjs/toolkit/query/react' +import { render, screen, waitFor } from '@testing-library/react' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { @@ -6,42 +13,7 @@ import { createStoreHook, Provider, } from 'react-redux' -import { - buildCreateApi, - coreModule, - reactHooksModule, -} from '@reduxjs/toolkit/query/react' -import { - act, - fireEvent, - render, - screen, - waitFor, - renderHook, -} from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { rest } from 'msw' -import { - actionsReducer, - ANY, - expectExactType, - expectType, - setupApiStore, - withProvider, - useRenderCounter, - waitMs, -} from './helpers' -import { server } from './mocks/server' -import type { UnknownAction } from 'redux' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' -import type { SerializedError } from '@reduxjs/toolkit' -import { - createListenerMiddleware, - configureStore, - lruMemoize, - createSelectorCreator, -} from '@reduxjs/toolkit' -import { delay } from '../../utils' +import { setupApiStore, useRenderCounter, waitMs } from './helpers' const MyContext = React.createContext(null as any) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index e9f1f1ac90..fc28863fdc 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -20,10 +20,9 @@ import { renderHook, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' import { actionsReducer, - ANY, expectExactType, expectType, setupApiStore, @@ -104,7 +103,7 @@ const api = createApi({ query: (update) => ({ body: update }), }), getError: build.query({ - query: (query) => '/error', + query: () => '/error', }), listItems: build.query({ serializeQueryArgs: ({ endpointName }) => { @@ -119,7 +118,7 @@ const api = createApi({ merge: (currentCache, newItems) => { currentCache.push(...newItems) }, - forceRefetch: ({ currentArg, previousArg }) => { + forceRefetch: () => { return true }, }), @@ -757,7 +756,7 @@ describe('hooks tests', () => { } // 1) Initial state: an active subscription - const { result, rerender, unmount } = renderHook( + const { rerender, unmount } = renderHook( ([arg, options]: Parameters< typeof pokemonApi.useGetPokemonByNameQuery >) => pokemonApi.useGetPokemonByNameQuery(arg, options), @@ -1752,14 +1751,14 @@ describe('hooks tests', () => { test('initially failed useQueries that provide an tag will refetch after a mutation invalidates it', async () => { const checkSessionData = { name: 'matt' } server.use( - rest.get('https://example.com/me', (req, res, ctx) => { - return res.once(ctx.status(500)) + http.get('https://example.com/me', () => { + return HttpResponse.json(null, { status: 500 }) + }, { once: true }), + http.get('https://example.com/me', () => { + return HttpResponse.json(checkSessionData) }), - rest.get('https://example.com/me', (req, res, ctx) => { - return res(ctx.json(checkSessionData)) - }), - rest.post('https://example.com/login', (req, res, ctx) => { - return res(ctx.status(200)) + http.post('https://example.com/login', () => { + return HttpResponse.json(null, { status: 200 }) }) ) let data, isLoading, isError @@ -1977,39 +1976,41 @@ describe('hooks with createApi defaults set', () => { posts = [...initialPosts] const handlers = [ - rest.get('https://example.com/posts', (req, res, ctx) => { - return res(ctx.json(posts)) + http.get('https://example.com/posts', () => { + return HttpResponse.json(posts) }), - rest.put>( + http.put>( 'https://example.com/post/:id', - (req, res, ctx) => { - const id = Number(req.params.id) + async ({ request, params }) => { + const body = await request.json(); + const id = Number(params.id) const idx = posts.findIndex((post) => post.id === id) const newPosts = posts.map((post, index) => index !== idx ? post : { - ...req.body, + ...body, id, - name: req.body.name || post.name, + name: body?.name || post.name, fetched_at: new Date().toUTCString(), } ) posts = [...newPosts] - return res(ctx.json(posts)) + return HttpResponse.json(posts) } ), - rest.post('https://example.com/post', (req, res, ctx) => { - let post = req.body as Omit + http.post>('https://example.com/post', async ({ request }) => { + const body = await request.json(); + let post = body startingId += 1 posts.concat({ ...post, fetched_at: new Date().toISOString(), id: startingId, }) - return res(ctx.json(posts)) + return HttpResponse.json(posts) }), ] @@ -2017,7 +2018,7 @@ describe('hooks with createApi defaults set', () => { }) interface Post { - id: number + id: string name: string fetched_at: string } @@ -2091,7 +2092,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQueryState(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) getRenderCount = useRenderCounter() @@ -2170,7 +2171,7 @@ describe('hooks with createApi defaults set', () => { isSuccess, isError, }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), isUninitialized, isLoading, isFetching, @@ -2227,7 +2228,7 @@ describe('hooks with createApi defaults set', () => { getRenderCount = useRenderCounter() const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) @@ -2276,7 +2277,7 @@ describe('hooks with createApi defaults set', () => { @@ -2287,7 +2288,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1), + post: data?.find((post) => post.id === 1 as any), }), }) getRenderCount = useRenderCounter() @@ -2377,11 +2378,6 @@ describe('hooks with createApi defaults set', () => { test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { - const _res1 = api.endpoints.getPosts.useQuery(undefined, { - // selectFromResult must always return an object - // @ts-expect-error - selectFromResult: ({ data }) => data?.length ?? 0, - }) const res2 = api.endpoints.getPosts.useQuery(undefined, { // selectFromResult must always return an object diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index cdeb22c952..1d043104ba 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,35 +1,35 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { + FetchBaseQueryError, + FetchBaseQueryMeta, +} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' import type { Api, MutationDefinition, QueryDefinition, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { - FetchBaseQueryError, - FetchBaseQueryMeta, -} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' +import type { SpyInstance } from 'vitest' +import { vi } from 'vitest' +import type { + DefinitionsFromApi, + OverrideResultType, + TagTypesFromApi, +} from '@reduxjs/toolkit/dist/query/endpointDefinitions' +import { HttpResponse, http } from 'msw' +import nodeFetch from 'node-fetch' +import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { ANY, - expectType, expectExactType, + expectType, + getSerializedHeaders, setupApiStore, waitMs, - getSerializedHeaders, } from './helpers' import { server } from './mocks/server' -import { rest } from 'msw' -import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' -import { string } from 'yargs' -import type { - DefinitionsFromApi, - OverrideResultType, - TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' const originalEnv = process.env.NODE_ENV beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) @@ -651,11 +651,12 @@ describe('additional transformResponse behaviors', () => { query: build.query({ query: () => '/success', transformResponse: async (response: SuccessResponse) => { - const res = await fetch('https://example.com/echo', { + const res: any = await nodeFetch('https://example.com/echo', { method: 'POST', body: JSON.stringify({ banana: 'bread' }), }).then((res) => res.json()) - const additionalData = JSON.parse(res.body) as EchoResponseData + + const additionalData = res.body as EchoResponseData return { ...response, ...additionalData } }, }), @@ -680,6 +681,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse handles an async transformation and returns the merged data (query)', async () => { const result = await storeRef.store.dispatch(api.endpoints.query.initiate()) + console.log(result) expect(result.data).toEqual({ value: 'success', banana: 'bread' }) }) @@ -716,7 +718,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - 'x-powered-by': 'msw', + // 'x-powered-by': 'msw', }, }, }, @@ -737,7 +739,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - 'x-powered-by': 'msw', + // 'x-powered-by': 'msw', }, }, }, @@ -795,8 +797,10 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('query lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'failed' })) + http.get( + 'https://example.com/success', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) ) @@ -819,8 +823,10 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('mutation lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - rest.post('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'failed' })) + http.post( + 'https://example.com/success', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) ) @@ -944,7 +950,7 @@ describe('custom serializeQueryArgs per endpoint', () => { } const dummyClient: MyApiClient = { - async fetchPost(id) { + async fetchPost() { return { value: 'success' } }, } @@ -1105,12 +1111,13 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - rest.get('https://example.com/listItems', (req, res, ctx) => { - const pageString = req.url.searchParams.get('page') + http.get('https://example.com/listItems', ({ request }) => { + const url = new URL(request.url) + const pageString = url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return res(ctx.json(results)) + return HttpResponse.json(results) }) ) @@ -1133,12 +1140,13 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - rest.get('https://example.com/listItems2', (req, res, ctx) => { - const pageString = req.url.searchParams.get('page') + http.get('https://example.com/listItems2', ({ request }) => { + const url = new URL(request.url) + const pageString = url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return res(ctx.json(results)) + return HttpResponse.json(results) }) ) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index 96a3e0cc63..de6eb2c3da 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' import axios from 'axios' import { expectExactType, hookWaitFor, setupApiStore } from './helpers' @@ -34,8 +34,8 @@ const api = createApi({ const storeRef = setupApiStore(api) -const failQueryOnce = rest.get('/query', (_, req, ctx) => - req.once(ctx.status(500), ctx.json({ value: 'failed' })) +const failQueryOnce = http.get('/query', () => + HttpResponse.json({ value: 'failed' }, { status: 500 }), { once: true } ) describe('fetchBaseQuery', () => { @@ -85,8 +85,8 @@ describe('fetchBaseQuery', () => { describe('query error handling', () => { test('success', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -106,8 +106,8 @@ describe('query error handling', () => { test('error', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -130,8 +130,8 @@ describe('query error handling', () => { test('success -> error', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -149,8 +149,8 @@ describe('query error handling', () => { ) server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -174,13 +174,13 @@ describe('query error handling', () => { test('error -> success', async () => { server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'success' }) ) ) server.use( - rest.get('https://example.com/query', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/query', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -217,8 +217,8 @@ describe('query error handling', () => { describe('mutation error handling', () => { test('success', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -242,8 +242,8 @@ describe('mutation error handling', () => { test('error', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -270,8 +270,8 @@ describe('mutation error handling', () => { test('success -> error', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -295,8 +295,8 @@ describe('mutation error handling', () => { } server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -323,13 +323,13 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res(ctx.json({ value: 'success' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'success' }) ) ) server.use( - rest.post('https://example.com/mutation', (_, res, ctx) => - res.once(ctx.status(500), ctx.json({ value: 'error' })) + http.post('https://example.com/mutation', () => + HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } ) ) @@ -442,8 +442,8 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res(ctx.status(500), ctx.json({ value: 'error' })) + http.get('https://example.com/success', () => + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { @@ -481,8 +481,8 @@ describe('error handling in a component', () => { test('a mutation is unwrappable and has the correct types', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.status(500), ctx.json(mockErrorResponse)) + http.get('https://example.com/success', () => + HttpResponse.json(mockErrorResponse, { status: 500 }), { once: true } ) ) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 6ab089f2be..5169bf6240 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,12 +1,11 @@ -import { vi } from 'vitest' import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' +import nodeFetch from 'node-fetch' import { setupApiStore, waitMs } from './helpers' import { server } from './mocks/server' -// @ts-ignore -import nodeFetch from 'node-fetch' -import { rest } from 'msw' +import { headersToObject } from 'headers-polyfill' +import { HttpResponse, http } from 'msw' import queryString from 'query-string' import type { BaseQueryApi } from '../baseQueryTypes' @@ -19,7 +18,7 @@ const defaultHeaders: Record = { const baseUrl = 'https://example.com' // @ts-ignore -const fetchFn = vi.fn, any[]>(global.fetch) +const fetchFn = vi.fn, any[]>(nodeFetch) const baseQuery = fetchBaseQuery({ baseUrl, @@ -108,6 +107,7 @@ describe('fetchBaseQuery', () => { expect(res).toBeInstanceOf(Object) expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) + expect(res.data).toBeNull() }) @@ -143,8 +143,10 @@ describe('fetchBaseQuery', () => { describe('non-JSON-body', () => { it('success: should return data ("text" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -163,8 +165,10 @@ describe('fetchBaseQuery', () => { it('success: should fail gracefully (default="json" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -184,11 +188,10 @@ describe('fetchBaseQuery', () => { it('success: parse text without error ("content-type" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once( - ctx.text(`this is not json!`) - // NOTE: MSW sets content-type header as text automatically - ) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -213,11 +216,10 @@ describe('fetchBaseQuery', () => { it('success: parse json without error ("content-type" responseHandler)', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once( - ctx.json(`this will become json!`) - // NOTE: MSW sets content-type header as json automatically - ) + http.get( + 'https://example.com/success', + () => HttpResponse.json(`this will become json!`), + { once: true } ) ) @@ -242,8 +244,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status ("text" responseHandler)', async () => { server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(`this is not json!`)) + http.get('https://example.com/error', () => + HttpResponse.text(`this is not json!`, { status: 500 }) ) ) @@ -266,8 +268,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status as text ("content-type" responseHandler)', async () => { const serverResponse = 'Internal Server Error' server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(serverResponse)) + http.get('https://example.com/error', () => + HttpResponse.text(serverResponse, { status: 500 }) ) ) @@ -295,8 +297,8 @@ describe('fetchBaseQuery', () => { errors: { field1: "Password cannot be 'password'" }, } server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.json(serverResponse)) + http.get('https://example.com/error', () => + HttpResponse.json(serverResponse, { status: 500 }) ) ) @@ -321,8 +323,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail gracefully (default="json" responseHandler)', async () => { server.use( - rest.get('https://example.com/error', (_, res, ctx) => - res(ctx.status(500), ctx.text(`this is not json!`)) + http.get('https://example.com/error', () => + HttpResponse.text(`this is not json!`, { status: 500 }) ) ) @@ -914,8 +916,10 @@ describe('fetchBaseQuery', () => { describe('Accepts global arguments', () => { test('Global responseHandler', async () => { server.use( - rest.get('https://example.com/success', (_, res, ctx) => - res.once(ctx.text(`this is not json!`)) + http.get( + 'https://example.com/success', + () => HttpResponse.text(`this is not json!`), + { once: true } ) ) @@ -971,10 +975,17 @@ describe('fetchBaseQuery', () => { reject = _reject }) server.use( - rest.get('https://example.com/empty1', async (req, res, ctx) => { - await Promise.race([waitMs(3000), donePromise]) - return res.once(ctx.json({ ...req, headers: req.headers.all() })) - }) + http.get( + 'https://example.com/empty1', + async ({ request, params, cookies, requestId }) => { + await Promise.race([waitMs(2000), donePromise]) + return HttpResponse.json({ + ...request, + headers: headersToObject(request.headers), + }) + }, + { once: true } + ) ) const globalizedBaseQuery = fetchBaseQuery({ baseUrl, @@ -987,9 +998,10 @@ describe('fetchBaseQuery', () => { commonBaseQueryApi, {} ) + expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The user aborted a request.', + error: 'AbortError: The operation was aborted.', }) reject!() }) @@ -1083,10 +1095,17 @@ describe('timeout', () => { }) server.use( - rest.get('https://example.com/empty2', async (req, res, ctx) => { - await Promise.race([waitMs(3000), donePromise]) - return res.once(ctx.json({ ...req, headers: req.headers.all() })) - }) + http.get( + 'https://example.com/empty2', + async ({ request }) => { + await Promise.race([waitMs(3000), donePromise]) + return HttpResponse.json({ + ...request, + headers: headersToObject(request.headers), + }) + }, + { once: true } + ) ) const result = await baseQuery( { url: '/empty2', timeout: 200 }, @@ -1095,7 +1114,7 @@ describe('timeout', () => { ) expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The user aborted a request.', + error: 'AbortError: The operation was aborted.', }) reject!() }) diff --git a/packages/toolkit/src/query/tests/helpers.tsx b/packages/toolkit/src/query/tests/helpers.tsx index acf2bf097b..24e9edec1d 100644 --- a/packages/toolkit/src/query/tests/helpers.tsx +++ b/packages/toolkit/src/query/tests/helpers.tsx @@ -1,22 +1,22 @@ -import React, { useCallback } from 'react' import type { - UnknownAction, EnhancedStore, Middleware, - Store, Reducer, + Store, + UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' +import React, { useCallback } from 'react' import { Provider } from 'react-redux' +import { act, cleanup } from '@testing-library/react' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' -import { cleanup, act } from '@testing-library/react' export const ANY = 0 as any @@ -159,7 +159,7 @@ expect.extend({ if (normalize(log) === normalize(expectedOutput)) return { - message: () => `Console output matches + message: () => `Console output matches === ${expectedOutput} ===`, @@ -167,11 +167,11 @@ ${expectedOutput} } else return { - message: () => `Console output + message: () => `Console output === ${log} -=== -does not match +=== +does not match === ${expectedOutput} ===`, diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index daf751c6a3..1de7d4a473 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -3,8 +3,8 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { Post } from './mocks/server' -import { posts } from './mocks/server' +import type { Post } from './mocks/handlers' +import { posts } from './mocks/handlers' import { actionsReducer, setupApiStore } from './helpers' import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index d3099799b8..ec003f261c 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -8,7 +8,7 @@ import type { import { fetchBaseQuery } from '@reduxjs/toolkit/query' import { expectType, setupApiStore } from './helpers' import { server } from './mocks/server' -import { rest } from 'msw' +import { http, HttpResponse } from 'msw' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -398,9 +398,9 @@ test('query: updateCachedData', async () => { // request 2: error expect(onError).not.toHaveBeenCalled() server.use( - rest.get('https://example.com/success', (_, req, ctx) => - req.once(ctx.status(500), ctx.json({ value: 'failed' })) - ) + http.get('https://example.com/success', () => { + return HttpResponse.json({ value: 'failed' }, {status: 500}) + }, {once: true}), ) storeRef.store.dispatch( extended.endpoints.injected.initiate('arg', { forceRefetch: true }) diff --git a/packages/toolkit/src/tests/combineSlices.test.ts b/packages/toolkit/src/tests/combineSlices.test.ts index 4e3439fd0f..d98117bc7c 100644 --- a/packages/toolkit/src/tests/combineSlices.test.ts +++ b/packages/toolkit/src/tests/combineSlices.test.ts @@ -65,6 +65,13 @@ describe('combineSlices', () => { }) }) describe('injects', () => { + beforeEach(() => { + + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs + }) + it('injects slice', () => { const combinedReducer = combineSlices(stringSlice).withLazyLoadedSlices< diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 957d5949cf..741788afcf 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -56,6 +56,13 @@ describe('createSlice', () => { }) describe('when initial state is undefined', () => { + beforeEach(() => { + + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs + }) + it('should throw an error', () => { createSlice({ name: 'test', From 9576c3d594f4bdbf3e6602d30fed5e662cf70ef9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:22:45 -0600 Subject: [PATCH 214/368] Convert `createSlice` skip test to todo test --- .../toolkit/src/tests/createSlice.test.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 741788afcf..94b67126e1 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -1,17 +1,16 @@ -import { vi } from 'vitest' import type { PayloadAction, WithSlice } from '@reduxjs/toolkit' import { asyncThunkCreator, buildCreateSlice, - configureStore, combineSlices, - createSlice, + configureStore, createAction, + createSlice, } from '@reduxjs/toolkit' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' type CreateSlice = typeof createSlice @@ -57,7 +56,6 @@ describe('createSlice', () => { describe('when initial state is undefined', () => { beforeEach(() => { - vi.stubEnv('NODE_ENV', 'development') return vi.unstubAllEnvs @@ -445,11 +443,12 @@ describe('createSlice', () => { }) // TODO Determine final production behavior here - it.skip('Crashes in production', () => { - process.env.NODE_ENV = 'production' + it.todo('Crashes in production', () => { + vi.stubEnv('NODE_ENV', 'production') + const { createSlice } = require('../createSlice') - let dummySlice = (createSlice as CreateSlice)({ + const dummySlice = (createSlice as CreateSlice)({ name: 'dummy', initialState: [], reducers: {}, @@ -457,13 +456,15 @@ describe('createSlice', () => { extraReducers: {}, }) const wrapper = () => { - let reducer = dummySlice.reducer + const { reducer } = dummySlice reducer(undefined, { type: 'dummy' }) } expect(wrapper).toThrowError( /The object notation for `createSlice.extraReducers` has been removed/ ) + + vi.unstubAllEnvs() }) }) describe('slice selectors', () => { From b3a2d59e631f03194c0ec450dc63e9c7163cc3a4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:25:53 -0600 Subject: [PATCH 215/368] Fix timeout tests --- .../toolkit/src/query/tests/createApi.test.ts | 3 -- .../src/query/tests/fetchBaseQuery.test.tsx | 32 ++++++++++--------- packages/toolkit/vitest.config.mts | 2 +- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 1d043104ba..cf2ffae030 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -681,7 +681,6 @@ describe('additional transformResponse behaviors', () => { test('transformResponse handles an async transformation and returns the merged data (query)', async () => { const result = await storeRef.store.dispatch(api.endpoints.query.initiate()) - console.log(result) expect(result.data).toEqual({ value: 'success', banana: 'bread' }) }) @@ -718,7 +717,6 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - // 'x-powered-by': 'msw', }, }, }, @@ -739,7 +737,6 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', - // 'x-powered-by': 'msw', }, }, }, diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 5169bf6240..f261c53692 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -970,23 +970,25 @@ describe('fetchBaseQuery', () => { }) test('Global timeout', async () => { - let reject: () => void - const donePromise = new Promise((resolve, _reject) => { - reject = _reject - }) server.use( http.get( 'https://example.com/empty1', - async ({ request, params, cookies, requestId }) => { - await Promise.race([waitMs(2000), donePromise]) + async ({ request, cookies, params, requestId }) => { + await delay(300) + return HttpResponse.json({ ...request, + cookies, + params, + requestId, + url: new URL(request.url), headers: headersToObject(request.headers), }) }, { once: true } ) ) + const globalizedBaseQuery = fetchBaseQuery({ baseUrl, fetchFn: fetchFn as any, @@ -1003,7 +1005,6 @@ describe('fetchBaseQuery', () => { status: 'TIMEOUT_ERROR', error: 'AbortError: The operation was aborted.', }) - reject!() }) }) }) @@ -1089,33 +1090,34 @@ describe('still throws on completely unexpected errors', () => { describe('timeout', () => { test('throws a timeout error when a request takes longer than specified timeout duration', async () => { - let reject: () => void - const donePromise = new Promise((resolve, _reject) => { - reject = _reject - }) - server.use( http.get( 'https://example.com/empty2', - async ({ request }) => { - await Promise.race([waitMs(3000), donePromise]) + async ({ request, cookies, params, requestId }) => { + await delay(300) + return HttpResponse.json({ ...request, + url: new URL(request.url), + cookies, + params, + requestId, headers: headersToObject(request.headers), }) }, { once: true } ) ) + const result = await baseQuery( { url: '/empty2', timeout: 200 }, commonBaseQueryApi, {} ) + expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', error: 'AbortError: The operation was aborted.', }) - reject!() }) }) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.mts index 4b8695ae44..0cdf981daa 100644 --- a/packages/toolkit/vitest.config.mts +++ b/packages/toolkit/vitest.config.mts @@ -25,6 +25,6 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, - server: { deps: { inline: ['redux', '@reduxjs/toolkit'], } }, + server: { deps: { inline: ['redux', '@reduxjs/toolkit'] } }, }, }) From 4212a972289fb96475374aff778ebb24c90ecbbb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 22 Jan 2024 21:26:31 -0600 Subject: [PATCH 216/368] Fix `FormData` tests --- .../src/query/tests/fetchBaseQuery.test.tsx | 8 ++- .../toolkit/src/query/tests/mocks/handlers.ts | 67 +++++++++---------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index f261c53692..ca9fe832e1 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,11 +1,11 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import nodeFetch from 'node-fetch' -import { setupApiStore, waitMs } from './helpers' +import { setupApiStore } from './helpers' import { server } from './mocks/server' import { headersToObject } from 'headers-polyfill' -import { HttpResponse, http } from 'msw' +import { HttpResponse, delay, http } from 'msw' import queryString from 'query-string' import type { BaseQueryApi } from '../baseQueryTypes' @@ -1052,7 +1052,9 @@ describe('fetchFn', () => { describe('FormData', () => { test('sets the right headers when sending FormData', async () => { const body = new FormData() + body.append('username', 'test') + body.append( 'file', new Blob([JSON.stringify({ hello: 'there' }, null, 2)], { @@ -1065,7 +1067,9 @@ describe('FormData', () => { commonBaseQueryApi, {} ) + const request: any = res.data + expect(request.headers['content-type']).not.toContain('application/json') }) }) diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts index 5602d5b26e..945d629ea3 100644 --- a/packages/toolkit/src/query/tests/mocks/handlers.ts +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -15,48 +15,47 @@ export const handlers = [ http.get( 'https://example.com/echo', async ({ request, params, cookies, requestId }) => { - return HttpResponse.json( - { - ...request, - params, - cookies, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }, - { headers: request.headers } - ) + return HttpResponse.json({ + ...request, + params, + cookies, + requestId, + url: new URL(request.url), + headers: headersToObject(request.headers), + }) } ), http.post( 'https://example.com/echo', async ({ request, cookies, params, requestId }) => { - const body = headersToObject(request.headers)['content-type'] === 'text/html' - ? await request.text() - : await request.json() + let body - return HttpResponse.json( - { - ...request, - cookies, - params, - requestId, - body, - url: new URL(request.url), - headers: request?.headers - ? headersToObject(request.headers) - : request?.headers, - }, - { headers: request.headers } - ) + try { + body = + headersToObject(request.headers)['content-type'] === 'text/html' + ? await request.text() + : await request.json() + } catch (err) { + body = request.body + } + + return HttpResponse.json({ + ...request, + cookies, + params, + requestId, + body, + url: new URL(request.url), + headers: headersToObject(request.headers), + }) } ), - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'success' }) - }), - http.post('https://example.com/success', ({ request }) => { - return HttpResponse.json({ value: 'success' }) - }), + http.get('https://example.com/success', () => + HttpResponse.json({ value: 'success' }) + ), + http.post('https://example.com/success', () => + HttpResponse.json({ value: 'success' }) + ), http.get('https://example.com/empty', () => new HttpResponse('')), http.get('https://example.com/error', () => HttpResponse.json({ value: 'error' }, { status: 500 }) From 5def501baa3b98b2489a1dbe739088a7ad1f7792 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:01:57 -0600 Subject: [PATCH 217/368] Use the `delay` function recommended by MSW --- .../src/query/tests/apiProvider.test.tsx | 10 +-- .../src/query/tests/buildCreateApi.test.tsx | 9 ++- .../src/query/tests/buildMiddleware.test.tsx | 7 +- .../src/query/tests/buildSlice.test.ts | 2 +- .../toolkit/src/query/tests/createApi.test.ts | 32 ++++---- .../src/query/tests/devWarnings.test.tsx | 2 +- .../src/query/tests/errorHandling.test.tsx | 74 +++++++++++-------- .../src/query/tests/invalidation.test.tsx | 7 +- .../query/tests/optimisticUpdates.test.tsx | 30 +++++--- .../query/tests/optimisticUpserts.test.tsx | 10 +-- .../toolkit/src/query/tests/polling.test.tsx | 9 +-- .../src/query/tests/queryLifecycle.test.tsx | 21 +++--- .../src/query/tests/raceConditions.test.ts | 16 ++-- .../query/tests/refetchingBehaviors.test.tsx | 17 ++--- .../toolkit/src/query/tests/retry.test.ts | 6 +- .../tests/useMutation-fixedCacheKey.test.tsx | 13 ++-- 16 files changed, 142 insertions(+), 123 deletions(-) diff --git a/packages/toolkit/src/query/tests/apiProvider.test.tsx b/packages/toolkit/src/query/tests/apiProvider.test.tsx index b153a36b7f..5b10573877 100644 --- a/packages/toolkit/src/query/tests/apiProvider.test.tsx +++ b/packages/toolkit/src/query/tests/apiProvider.test.tsx @@ -1,13 +1,13 @@ -import * as React from 'react' -import { createApi, ApiProvider } from '@reduxjs/toolkit/query/react' +import { configureStore } from '@reduxjs/toolkit' +import { ApiProvider, createApi } from '@reduxjs/toolkit/query/react' import { fireEvent, render, waitFor } from '@testing-library/react' -import { waitMs } from './helpers' +import { delay } from 'msw' +import * as React from 'react' import { Provider } from 'react-redux' -import { configureStore } from '@reduxjs/toolkit' const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? arg.body : null } }, endpoints: (build) => ({ diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index ec12eefec1..261e7dface 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -5,15 +5,16 @@ import { reactHooksModule, } from '@reduxjs/toolkit/query/react' import { render, screen, waitFor } from '@testing-library/react' +import { delay } from 'msw' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { + Provider, createDispatchHook, createSelectorHook, createStoreHook, - Provider, } from 'react-redux' -import { setupApiStore, useRenderCounter, waitMs } from './helpers' +import { setupApiStore, useRenderCounter } from './helpers' const MyContext = React.createContext(null as any) @@ -32,7 +33,7 @@ describe('buildCreateApi', () => { const api = customCreateApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? { ...arg.body } : {}, @@ -112,7 +113,7 @@ describe('buildCreateApi', () => { ) const api = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) return { data: arg?.body ? { ...arg.body } : {}, diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index f6154ea848..0f7f39936d 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -1,5 +1,6 @@ import { createApi } from '@reduxjs/toolkit/query' -import { actionsReducer, setupApiStore, waitMs } from './helpers' +import { delay } from 'msw' +import { actionsReducer, setupApiStore } from './helpers' const baseQuery = (args?: any) => ({ data: args }) const api = createApi({ @@ -43,7 +44,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(api.util.invalidateTags(['Banana', 'Bread'])) // Slight pause to let the middleware run and such - await waitMs(20) + await delay(20) const firstSequence = [ api.internalActions.middlewareRegistered.match, @@ -58,7 +59,7 @@ it('invalidates the specified tags', async () => { await storeRef.store.dispatch(getBread.initiate(1)) await storeRef.store.dispatch(api.util.invalidateTags([{ type: 'Bread' }])) - await waitMs(20) + await delay(20) expect(storeRef.store.getState().actions).toMatchSequence( ...firstSequence, diff --git a/packages/toolkit/src/query/tests/buildSlice.test.ts b/packages/toolkit/src/query/tests/buildSlice.test.ts index 1a075beb6e..303299462e 100644 --- a/packages/toolkit/src/query/tests/buildSlice.test.ts +++ b/packages/toolkit/src/query/tests/buildSlice.test.ts @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi } from '@reduxjs/toolkit/query' +import { delay } from 'msw' import { setupApiStore } from './helpers' -import { delay } from '../../utils' let shouldApiResponseSuccess = true diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index cf2ffae030..70783701eb 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -10,32 +10,32 @@ import type { QueryDefinition, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { MockInstance } from 'vitest' import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, } from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { HttpResponse, http } from 'msw' +import { HttpResponse, delay, http } from 'msw' import nodeFetch from 'node-fetch' -import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { ANY, - expectExactType, - expectType, getSerializedHeaders, setupApiStore, - waitMs, + expectExactType, + expectType, } from './helpers' +import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' import { server } from './mocks/server' -const originalEnv = process.env.NODE_ENV -beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) -afterAll(() => void ((process.env as any).NODE_ENV = originalEnv)) +beforeAll(() => { + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs +}) -let spy: SpyInstance +let spy: MockInstance beforeAll(() => { spy = vi.spyOn(console, 'error').mockImplementation(() => {}) }) @@ -185,7 +185,7 @@ describe('wrong tagTypes log errors', () => { store.dispatch(api.endpoints[endpoint].initiate()) let result: { status: string } do { - await waitMs(5) + await delay(5) // @ts-ignore result = api.endpoints[endpoint].select()(store.getState()) } while (result.status === 'pending') @@ -460,11 +460,11 @@ describe('endpoint definition typings', () => { }) storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) - await waitMs(1) + await delay(1) expect(spy).not.toHaveBeenCalled() storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) - await waitMs(1) + await delay(1) expect(spy).toHaveBeenCalledWith( "Tag type 'missing' was used, but not specified in `tagTypes`!" ) @@ -805,7 +805,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { const failAttempt = storeRef.store.dispatch(api.endpoints.query.initiate()) expect(storeRef.store.getState().testReducer.count).toBe(0) await failAttempt - await waitMs(10) + await delay(10) expect(storeRef.store.getState().testReducer.count).toBe(-1) const successAttempt = storeRef.store.dispatch( @@ -813,7 +813,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { ) expect(storeRef.store.getState().testReducer.count).toBe(0) await successAttempt - await waitMs(10) + await delay(10) expect(storeRef.store.getState().testReducer.count).toBe(1) }) diff --git a/packages/toolkit/src/query/tests/devWarnings.test.tsx b/packages/toolkit/src/query/tests/devWarnings.test.tsx index d87968f9f1..df8339f5f3 100644 --- a/packages/toolkit/src/query/tests/devWarnings.test.tsx +++ b/packages/toolkit/src/query/tests/devWarnings.test.tsx @@ -270,7 +270,7 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi * It would be great to support this case as well, but for now: * "It is what it is." */ - test.skip('common: two apis, only second middleware', async () => { + test.todo('common: two apis, only second middleware', async () => { const store = configureStore({ reducer: { // @ts-ignore diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index de6eb2c3da..2ae61ed0de 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,22 +1,22 @@ -import * as React from 'react' +import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { http, HttpResponse } from 'msw' -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' -import axios from 'axios' -import { expectExactType, hookWaitFor, setupApiStore } from './helpers' -import { server } from './mocks/server' import { + act, fireEvent, render, - waitFor, - screen, - act, renderHook, + screen, + waitFor, } from '@testing-library/react' +import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' +import axios from 'axios' +import { HttpResponse, http } from 'msw' +import * as React from 'react' import { useDispatch } from 'react-redux' -import type { UnknownAction, ThunkDispatch } from '@reduxjs/toolkit' +import { expectExactType, hookWaitFor, setupApiStore } from './helpers' import type { BaseQueryApi } from '../baseQueryTypes' +import { server } from './mocks/server' const baseQuery = fetchBaseQuery({ baseUrl: 'https://example.com' }) @@ -34,8 +34,10 @@ const api = createApi({ const storeRef = setupApiStore(api) -const failQueryOnce = http.get('/query', () => - HttpResponse.json({ value: 'failed' }, { status: 500 }), { once: true } +const failQueryOnce = http.get( + '/query', + () => HttpResponse.json({ value: 'failed' }, { status: 500 }), + { once: true } ) describe('fetchBaseQuery', () => { @@ -86,7 +88,7 @@ describe('query error handling', () => { test('success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -107,7 +109,7 @@ describe('query error handling', () => { test('error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -131,7 +133,7 @@ describe('query error handling', () => { test('success -> error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -149,8 +151,10 @@ describe('query error handling', () => { ) server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.get( + 'https://example.com/query', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -175,12 +179,14 @@ describe('query error handling', () => { test('error -> success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.get( + 'https://example.com/query', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -218,7 +224,7 @@ describe('mutation error handling', () => { test('success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -243,7 +249,7 @@ describe('mutation error handling', () => { test('error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -271,7 +277,7 @@ describe('mutation error handling', () => { test('success -> error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -295,8 +301,10 @@ describe('mutation error handling', () => { } server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.post( + 'https://example.com/mutation', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -324,12 +332,14 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }) ) ) server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }), { once: true } + http.post( + 'https://example.com/mutation', + () => HttpResponse.json({ value: 'error' }, { status: 500 }), + { once: true } ) ) @@ -443,7 +453,7 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( http.get('https://example.com/success', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { @@ -481,8 +491,10 @@ describe('error handling in a component', () => { test('a mutation is unwrappable and has the correct types', async () => { server.use( - http.get('https://example.com/success', () => - HttpResponse.json(mockErrorResponse, { status: 500 }), { once: true } + http.get( + 'https://example.com/success', + () => HttpResponse.json(mockErrorResponse, { status: 500 }), + { once: true } ) ) diff --git a/packages/toolkit/src/query/tests/invalidation.test.tsx b/packages/toolkit/src/query/tests/invalidation.test.tsx index a4081a3d63..b1cc22be20 100644 --- a/packages/toolkit/src/query/tests/invalidation.test.tsx +++ b/packages/toolkit/src/query/tests/invalidation.test.tsx @@ -1,7 +1,8 @@ -import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' import type { TagDescription } from '@reduxjs/toolkit/dist/query/endpointDefinitions' +import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' import { waitFor } from '@testing-library/react' +import { delay } from 'msw' +import { setupApiStore } from './helpers' const tagTypes = [ 'apple', @@ -135,7 +136,7 @@ test.each(caseMatrix)( store.dispatch(invalidating.initiate()) expect(queryCount).toBe(1) - await waitMs(2) + await delay(2) expect(queryCount).toBe(shouldInvalidate ? 2 : 1) } ) diff --git a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx index f96e2b4162..35e092cea1 100644 --- a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx @@ -1,7 +1,11 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore, waitMs } from './helpers' -import { renderHook, act } from '@testing-library/react' +import { act, renderHook } from '@testing-library/react' +import { delay } from 'msw' +import { + actionsReducer, + hookWaitFor, + setupApiStore, +} from './helpers' import type { InvalidationState } from '../core/apiState' interface Post { @@ -11,7 +15,9 @@ interface Post { } const baseQuery = vi.fn() -beforeEach(() => baseQuery.mockReset()) +beforeEach(() => { + baseQuery.mockReset() +}) const api = createApi({ baseQuery: (...args: any[]) => { @@ -105,7 +111,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -127,7 +133,7 @@ describe('basic lifecycle', () => { expect(baseQuery).toHaveBeenCalledWith('arg', expect.any(Object), undefined) expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, @@ -212,7 +218,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided3 = provided['Post']['3'] + const provided3 = provided.Post['3'] let returnValue!: ReturnType> act(() => { @@ -236,7 +242,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4 = provided['Post']['4'] + const provided4 = provided.Post['4'] expect(provided4).toEqual(provided3) @@ -248,12 +254,12 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4Next = provided['Post']['4'] + const provided4Next = provided.Post['4'] expect(provided4Next).toEqual([]) }) - test('updates (list) cache values excluding provided tags, undos that', async () => { + test('updates (list) cache values excluding provided tags, undoes that', async () => { baseQuery .mockResolvedValueOnce([ { @@ -295,7 +301,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4 = provided['Post']['4'] + const provided4 = provided.Post['4'] expect(provided4).toEqual(undefined) @@ -307,7 +313,7 @@ describe('updateQueryData', () => { provided = storeRef.store.getState().api.provided }) - const provided4Next = provided['Post']['4'] + const provided4Next = provided.Post['4'] expect(provided4Next).toEqual(undefined) }) diff --git a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx index 1d67f0f1a0..4af89268dc 100644 --- a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx @@ -1,9 +1,7 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore, waitMs } from './helpers' -import { skipToken } from '../core/buildSelectors' +import { actionsReducer, hookWaitFor, setupApiStore } from './helpers' import { renderHook, act, waitFor } from '@testing-library/react' -import { delay } from '../../utils' +import { delay } from "msw" interface Post { id: string @@ -149,7 +147,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -172,7 +170,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => waitMs(5)) + await act(() => delay(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index d5d3cd20f8..ce82c74838 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -1,7 +1,6 @@ -import { vi } from 'vitest' import { createApi } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' -import { delay } from '../../utils' +import { delay } from 'msw' +import { setupApiStore } from './helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' const mockBaseQuery = vi @@ -50,7 +49,7 @@ describe('polling tests', () => { storeRef.store.dispatch(api.util.resetApiState()) - await waitMs(30) + await delay(30) expect(mockBaseQuery).toHaveBeenCalledTimes(1) }) @@ -119,7 +118,7 @@ describe('polling tests', () => { }) ) - await waitMs(20) + await delay(20) expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2) }) diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index ec003f261c..a42e43a4ce 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -1,14 +1,13 @@ -import { vi } from 'vitest' -import { createApi } from '@reduxjs/toolkit/query' -import { waitFor } from '@testing-library/react' import type { - FetchBaseQueryMeta, FetchBaseQueryError, + FetchBaseQueryMeta, } from '@reduxjs/toolkit/query' -import { fetchBaseQuery } from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' +import { waitFor } from '@testing-library/react' +import { HttpResponse, http } from 'msw' +import { vi } from 'vitest' import { expectType, setupApiStore } from './helpers' import { server } from './mocks/server' -import { http, HttpResponse } from 'msw' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -398,9 +397,13 @@ test('query: updateCachedData', async () => { // request 2: error expect(onError).not.toHaveBeenCalled() server.use( - http.get('https://example.com/success', () => { - return HttpResponse.json({ value: 'failed' }, {status: 500}) - }, {once: true}), + http.get( + 'https://example.com/success', + () => { + return HttpResponse.json({ value: 'failed' }, { status: 500 }) + }, + { once: true } + ) ) storeRef.store.dispatch( extended.endpoints.injected.initiate('arg', { forceRefetch: true }) diff --git a/packages/toolkit/src/query/tests/raceConditions.test.ts b/packages/toolkit/src/query/tests/raceConditions.test.ts index 0ec49da2fb..7ae34a8bf4 100644 --- a/packages/toolkit/src/query/tests/raceConditions.test.ts +++ b/packages/toolkit/src/query/tests/raceConditions.test.ts @@ -1,6 +1,6 @@ import { createApi, QueryStatus } from '@reduxjs/toolkit/query' -import { getLog } from 'console-testing-library' -import { actionsReducer, setupApiStore, waitMs } from './helpers' +import { delay } from 'msw' +import { actionsReducer, setupApiStore } from './helpers' // We need to be able to control when which query resolves to simulate race // conditions properly, that's the purpose of this factory. @@ -59,7 +59,7 @@ it('invalidates a query after a corresponding mutation', async () => { const getQueryState = () => storeRef.store.getState().api.queries[query.queryCacheKey] getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -68,14 +68,14 @@ it('invalidates a query after a corresponding mutation', async () => { const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(1) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -92,17 +92,17 @@ it('invalidates a query whose corresponding mutation finished while the query wa const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) // should already be refetching getEatenBananaPromises.resolveOldest() - await waitMs(2) + await delay(2) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(1) diff --git a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx index f2703e5b56..e3b3f0b752 100644 --- a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx +++ b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx @@ -1,9 +1,8 @@ -import { vi } from 'vitest' -import * as React from 'react' import { createApi, setupListeners } from '@reduxjs/toolkit/query/react' -import { act, fireEvent, render, waitFor, screen } from '@testing-library/react' -import { setupApiStore, waitMs } from './helpers' -import { delay } from '../../utils' +import { act, fireEvent, render, screen, waitFor } from '@testing-library/react' +import { delay } from 'msw' +import * as React from 'react' +import { setupApiStore } from './helpers' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -12,7 +11,7 @@ let amount = 0 const defaultApi = createApi({ baseQuery: async (arg: any) => { - await waitMs() + await delay(150) if ('amount' in arg?.body) { amount += 1 } @@ -77,7 +76,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await waitMs() + await delay(150) await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('2') @@ -117,7 +116,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await waitMs() + await delay(150) await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('1') @@ -394,7 +393,7 @@ describe('customListenersHandler', () => { } ) - await waitMs() + await delay(150) let data, isLoading, isFetching diff --git a/packages/toolkit/src/query/tests/retry.test.ts b/packages/toolkit/src/query/tests/retry.test.ts index 2bb35e89ae..3b5181ebea 100644 --- a/packages/toolkit/src/query/tests/retry.test.ts +++ b/packages/toolkit/src/query/tests/retry.test.ts @@ -1,7 +1,7 @@ import { vi } from 'vitest' import type { BaseQueryFn } from '@reduxjs/toolkit/query' import { createApi, retry } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' +import { setupApiStore } from './helpers' import type { RetryOptions } from '../retry' beforeEach(() => { @@ -12,13 +12,11 @@ const loopTimers = async (max: number = 12) => { let count = 0 while (count < max) { await vi.advanceTimersByTimeAsync(1) - vi.advanceTimersByTime(120000) + vi.advanceTimersByTime(120_000) count++ } } -vi.fn() - describe('configuration', () => { test('retrying without any config options', async () => { const baseBaseQuery = vi.fn< diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 05505540a7..c38ba610c7 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -1,14 +1,15 @@ import { createApi } from '@reduxjs/toolkit/query/react' -import { setupApiStore, waitMs } from './helpers' -import React from 'react' import { + act, + getByTestId, render, screen, - getByTestId, waitFor, - act, } from '@testing-library/react' +import { delay } from 'msw' +import React from 'react' import { vi } from 'vitest' +import { setupApiStore } from './helpers' describe('fixedCacheKey', () => { const onNewCacheEntry = vi.fn() @@ -342,7 +343,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await waitMs() + await delay(150) expect(getByTestId(c1, 'status').textContent).toBe('pending') expect(getByTestId(c1, 'data').textContent).toBe('') @@ -352,7 +353,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await waitMs() + await delay(150) expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') expect(getByTestId(c1, 'data').textContent).toBe('this should be visible') From 53ac252fd67fea0455e257cca9914c33e5f62a26 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:24:36 -0600 Subject: [PATCH 218/368] Revert "Rename `vitest.config.ts` to `vitest.config.mts`" This reverts commit f6809fa3ff1e284dcbd67467d325c674d3e2335d. --- packages/toolkit/{vitest.config.mts => vitest.config.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/{vitest.config.mts => vitest.config.ts} (100%) diff --git a/packages/toolkit/vitest.config.mts b/packages/toolkit/vitest.config.ts similarity index 100% rename from packages/toolkit/vitest.config.mts rename to packages/toolkit/vitest.config.ts From 518db422fd2793e877c2d4ee51629c02aa38f662 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:27:09 -0600 Subject: [PATCH 219/368] Revert "Change `vitest.config.ts` to `vitest.config.mts` inside `tests.yml` file" This reverts commit bef848789a482eb9a82e538ec94563016bec58dd. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ad30e6a04..959a336308 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,7 +133,7 @@ jobs: - name: Show installed RTK versions run: yarn info @reduxjs/toolkit - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* - name: Test types run: | From 3fc140e623a4bd65ab2903967fe0cd031ef39351 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:27:52 -0600 Subject: [PATCH 220/368] Revert "Change `vitest.config.ts` to `vitest.config.mts` inside `tests.yml` file" This reverts commit bf2500cbbb18fe54294b97541d967fca667eb40c. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 959a336308..ea33ef8f9a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,7 +91,7 @@ jobs: - name: Install build artifact run: yarn workspace @reduxjs/toolkit add $(pwd)/package.tgz - - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.* + - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.* - name: Run tests, against dist run: yarn test From 03c183d4b5932a6b7825e5e0983bafcedbaf366a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:28:50 -0600 Subject: [PATCH 221/368] Revert "Remove `interopDefault` from `vitest.config.mts` as it is enabled by default" This reverts commit d5db2953576e4361e785e22f0c34fa037db66859. --- packages/toolkit/vitest.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 5dc15c9e03..3f0e4f6e6d 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -25,6 +25,13 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, +<<<<<<< HEAD:packages/toolkit/vitest.config.ts server: { deps: { inline: ['redux', '@reduxjs/toolkit'] } }, +======= + deps: { + interopDefault: true, + inline: ['redux', '@reduxjs/toolkit'], + }, +>>>>>>> parent of d5db2953 (Remove `interopDefault` from `vitest.config.mts` as it is enabled by default):packages/toolkit/vitest.config.mts }, }) From 04a73e4e0f0b05d51e31e03656c2e53e49292e8f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:29:56 -0600 Subject: [PATCH 222/368] Revert "Replace the deprecated `deps.inline` with `server.deps.inline`" This reverts commit 2c5d7a7900f9e1f9d0d4df929678c8afe257e667. --- packages/toolkit/vitest.config.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 3f0e4f6e6d..5817b15a89 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -25,13 +25,8 @@ export default defineConfig({ //'^@reduxjs/toolkit/dist/(.*)$': '/src/*', '@internal': path.join(__dirname, './src'), }, -<<<<<<< HEAD:packages/toolkit/vitest.config.ts - server: { deps: { inline: ['redux', '@reduxjs/toolkit'] } }, -======= deps: { - interopDefault: true, inline: ['redux', '@reduxjs/toolkit'], }, ->>>>>>> parent of d5db2953 (Remove `interopDefault` from `vitest.config.mts` as it is enabled by default):packages/toolkit/vitest.config.mts }, }) From a3eb0f6b68e4a3f2998c0b8242ef7f7f0ccb4214 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:30:50 -0600 Subject: [PATCH 223/368] Revert "Add `test:watch` NPM script" This reverts commit 27740fc0a07f273a0d42610754089ad92208c51f. --- packages/toolkit/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index e3d82b7285..c2f8447492 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,8 +101,7 @@ "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", - "test": "vitest --run", - "test:watch": "vitest --watch", + "test": "vitest", "type-tests": "yarn tsc -p tsconfig.json", "prepack": "yarn build" }, From 9e3d91a05c90a1ea69c8078456923a28884adb7d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 12:55:17 -0600 Subject: [PATCH 224/368] Remove `msw-npm-0.40.2-2107d48752` file --- .yarn/patches/msw-npm-0.40.2-2107d48752 | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .yarn/patches/msw-npm-0.40.2-2107d48752 diff --git a/.yarn/patches/msw-npm-0.40.2-2107d48752 b/.yarn/patches/msw-npm-0.40.2-2107d48752 deleted file mode 100644 index d25dca19e4..0000000000 --- a/.yarn/patches/msw-npm-0.40.2-2107d48752 +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/lib/types/context/set.d.ts b/lib/types/context/set.d.ts -index 266229bad706ec49392b8b87e18560c1566b490d..4fad485f8ffec2db92e808a05ccd9274414a9bd9 100644 ---- a/lib/types/context/set.d.ts -+++ b/lib/types/context/set.d.ts -@@ -15,4 +15,5 @@ export declare type ForbiddenHeaderError = `SafeRespo - * }) - * @see {@link https://mswjs.io/docs/api/context/set `ctx.set()`} - */ -+// @ts-ignore - export declare function set(...args: N extends string ? Lowercase extends ForbiddenHeaderNames ? ForbiddenHeaderError : [N, string] : N extends HeadersObject ? Lowercase extends ForbiddenHeaderNames ? ForbiddenHeaderError : [N] : [N]): ResponseTransformer; -diff --git a/lib/types/sharedOptions.d.ts b/lib/types/sharedOptions.d.ts -index d1d6e05df2dc2c29f06d8d0b91c500a10e651a29..3d8c29fd2089b2abf21d78cd277aac9271e781c2 100644 ---- a/lib/types/sharedOptions.d.ts -+++ b/lib/types/sharedOptions.d.ts -@@ -21,4 +21,5 @@ export interface LifeCycleEventsMap { - 'response:bypass': (response: ResponseType, requestId: string) => void; - unhandledException: (error: Error, request: MockedRequest) => void; - } -+// @ts-ignore - export declare type LifeCycleEventEmitter = Pick, 'on' | 'removeListener' | 'removeAllListeners'>; From e0cb1875a2078c0351494d51407784a9b1745600 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:16:04 -0600 Subject: [PATCH 225/368] Remove `as any` type assertions inside `buildHooks.test.tsx` --- .../toolkit/src/query/tests/buildHooks.test.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index fc28863fdc..deb9b7d7e0 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1979,7 +1979,7 @@ describe('hooks with createApi defaults set', () => { http.get('https://example.com/posts', () => { return HttpResponse.json(posts) }), - http.put>( + http.put<{ id: string }, Partial>( 'https://example.com/post/:id', async ({ request, params }) => { const body = await request.json(); @@ -2018,7 +2018,7 @@ describe('hooks with createApi defaults set', () => { }) interface Post { - id: string + id: number name: string fetched_at: string } @@ -2092,7 +2092,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQueryState(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === 1), }), }) getRenderCount = useRenderCounter() @@ -2171,7 +2171,7 @@ describe('hooks with createApi defaults set', () => { isSuccess, isError, }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === 1), isUninitialized, isLoading, isFetching, @@ -2228,7 +2228,7 @@ describe('hooks with createApi defaults set', () => { getRenderCount = useRenderCounter() const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === 1), }), }) @@ -2277,7 +2277,7 @@ describe('hooks with createApi defaults set', () => { @@ -2288,7 +2288,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === 1 as any), + post: data?.find((post) => post.id === 1), }), }) getRenderCount = useRenderCounter() From 21fe9fcfac92594c7e35eaada9e067bb6c571a39 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:23:14 -0600 Subject: [PATCH 226/368] Fix type issues related to `PathParams` inside `handlers.ts` --- .../toolkit/src/query/tests/mocks/handlers.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts index 945d629ea3..17f707f743 100644 --- a/packages/toolkit/src/query/tests/mocks/handlers.ts +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -2,13 +2,13 @@ import { headersToObject } from 'headers-polyfill' import { HttpResponse, http } from 'msw' export type Post = { - id: string + id: number title: string body: string } export const posts: Record = { - '1': { id: '1', title: 'hello', body: 'extra body!' }, + 1: { id: 1, title: 'hello', body: 'extra body!' }, } export const handlers = [ @@ -25,6 +25,7 @@ export const handlers = [ }) } ), + http.post( 'https://example.com/echo', async ({ request, cookies, params, requestId }) => { @@ -50,19 +51,25 @@ export const handlers = [ }) } ), + http.get('https://example.com/success', () => HttpResponse.json({ value: 'success' }) ), + http.post('https://example.com/success', () => HttpResponse.json({ value: 'success' }) ), + http.get('https://example.com/empty', () => new HttpResponse('')), + http.get('https://example.com/error', () => HttpResponse.json({ value: 'error' }, { status: 500 }) ), + http.post('https://example.com/error', () => HttpResponse.json({ value: 'error' }, { status: 500 }) ), + http.get('https://example.com/nonstandard-error', () => HttpResponse.json( { @@ -72,18 +79,22 @@ export const handlers = [ { status: 200 } ) ), + http.get('https://example.com/mirror', ({ params }) => HttpResponse.json(params) ), + http.post('https://example.com/mirror', ({ params }) => HttpResponse.json(params) ), + http.get('https://example.com/posts/random', () => { // just simulate an api that returned a random ID const { id } = posts[1] return HttpResponse.json({ id }) }), - http.get>( + + http.get<{ id: string }, any, Pick>( 'https://example.com/post/:id', ({ params }) => HttpResponse.json(posts[params.id]) ), From bf5c147b3ba61c095b80b72848dc7c11bdc395b1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:52:37 -0600 Subject: [PATCH 227/368] Revert "Remove `interopDefault` from `vitest.config.mts` as it is enabled by default" This reverts commit d5db2953576e4361e785e22f0c34fa037db66859. --- packages/toolkit/vitest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 5817b15a89..8d615700e2 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -26,6 +26,7 @@ export default defineConfig({ '@internal': path.join(__dirname, './src'), }, deps: { + interopDefault: true, inline: ['redux', '@reduxjs/toolkit'], }, }, From 07288a5d384a3da024eaa678a768a9cf4f3cf383 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:53:59 -0600 Subject: [PATCH 228/368] Revert "Bump `node-fetch` dev dependency" This reverts commit e2bf45a78113e2e6be6f1e3201bde4b7007788d6. --- packages/toolkit/package.json | 4 +-- yarn.lock | 55 ++--------------------------------- 2 files changed, 4 insertions(+), 55 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index c2f8447492..3b8dad20f9 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -80,8 +80,8 @@ "invariant": "^2.2.4", "jsdom": "^21.0.0", "json-stringify-safe": "^5.0.1", - "msw": "^2.1.4", - "node-fetch": "^3.3.2", + "msw": "^0.40.2", + "node-fetch": "^2.6.1", "prettier": "^2.2.1", "query-string": "^7.0.1", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 2d2c863000..6a8ebfcb01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7135,8 +7135,8 @@ __metadata: invariant: ^2.2.4 jsdom: ^21.0.0 json-stringify-safe: ^5.0.1 - msw: ^2.1.4 - node-fetch: ^3.3.2 + msw: ^0.40.2 + node-fetch: ^2.6.1 prettier: ^2.2.1 query-string: ^7.0.1 redux: ^5.0.1 @@ -13598,13 +13598,6 @@ __metadata: languageName: node linkType: hard -"data-uri-to-buffer@npm:^4.0.0": - version: 4.0.1 - resolution: "data-uri-to-buffer@npm:4.0.1" - checksum: 0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c - languageName: node - linkType: hard - "data-urls@npm:^2.0.0": version: 2.0.0 resolution: "data-urls@npm:2.0.0" @@ -15835,16 +15828,6 @@ __metadata: languageName: node linkType: hard -"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": - version: 3.2.0 - resolution: "fetch-blob@npm:3.2.0" - dependencies: - node-domexception: ^1.0.0 - web-streams-polyfill: ^3.0.3 - checksum: f19bc28a2a0b9626e69fd7cf3a05798706db7f6c7548da657cbf5026a570945f5eeaedff52007ea35c8bcd3d237c58a20bf1543bc568ab2422411d762dd3d5bf - languageName: node - linkType: hard - "fflate@npm:^0.7.4": version: 0.7.4 resolution: "fflate@npm:0.7.4" @@ -16189,15 +16172,6 @@ __metadata: languageName: node linkType: hard -"formdata-polyfill@npm:^4.0.10": - version: 4.0.10 - resolution: "formdata-polyfill@npm:4.0.10" - dependencies: - fetch-blob: ^3.1.2 - checksum: 82a34df292afadd82b43d4a740ce387bc08541e0a534358425193017bf9fb3567875dc5f69564984b1da979979b70703aa73dee715a17b6c229752ae736dd9db - languageName: node - linkType: hard - "formik@npm:^2.1.5": version: 2.2.9 resolution: "formik@npm:2.2.9" @@ -21967,13 +21941,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"node-domexception@npm:^1.0.0": - version: 1.0.0 - resolution: "node-domexception@npm:1.0.0" - checksum: ee1d37dd2a4eb26a8a92cd6b64dfc29caec72bff5e1ed9aba80c294f57a31ba4895a60fd48347cf17dd6e766da0ae87d75657dfd1f384ebfa60462c2283f5c7f - languageName: node - linkType: hard - "node-emoji@npm:^1.10.0": version: 1.10.0 resolution: "node-emoji@npm:1.10.0" @@ -22039,17 +22006,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"node-fetch@npm:^3.3.2": - version: 3.3.2 - resolution: "node-fetch@npm:3.3.2" - dependencies: - data-uri-to-buffer: ^4.0.0 - fetch-blob: ^3.1.4 - formdata-polyfill: ^4.0.10 - checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 - languageName: node - linkType: hard - "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -30738,13 +30694,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"web-streams-polyfill@npm:^3.0.3": - version: 3.3.2 - resolution: "web-streams-polyfill@npm:3.3.2" - checksum: 0292f4113c1bda40d8e8ecebee39eb14cc2e2e560a65a6867980e394537a2645130e2c73f5ef6e641fd3697d2f71720ccf659aebaf69a9d5a773f653a0fdf39d - languageName: node - linkType: hard - "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" From e98cee574474f7e8de87305b04b78e40f686ee14 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:56:10 -0600 Subject: [PATCH 229/368] Revert "Fix handlers to be compatible with latest version of `msw`" This reverts commit 15dfd2ce15d5b07716c59d9c64b28e5fbc324b31. --- .../toolkit/src/query/tests/mocks/server.ts | 61 ++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/mocks/server.ts b/packages/toolkit/src/query/tests/mocks/server.ts index 5dc2fb1467..62d1c350f5 100644 --- a/packages/toolkit/src/query/tests/mocks/server.ts +++ b/packages/toolkit/src/query/tests/mocks/server.ts @@ -1,5 +1,62 @@ import { setupServer } from 'msw/node' -import { handlers } from './handlers' +import { rest } from 'msw' // This configures a request mocking server with the given request handlers. -export const server = setupServer(...handlers) + +export type Post = { + id: number + title: string + body: string +} + +export const posts: Record = { + 1: { id: 1, title: 'hello', body: 'extra body!' }, +} + +export const server = setupServer( + rest.get('https://example.com/echo', (req, res, ctx) => + res(ctx.json({ ...req, headers: req.headers.all() })) + ), + rest.post('https://example.com/echo', (req, res, ctx) => + res(ctx.json({ ...req, headers: req.headers.all() })) + ), + rest.get('https://example.com/success', (_, res, ctx) => + res(ctx.json({ value: 'success' })) + ), + rest.post('https://example.com/success', (_, res, ctx) => + res(ctx.json({ value: 'success' })) + ), + rest.get('https://example.com/empty', (_, res, ctx) => res(ctx.body(''))), + rest.get('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.json({ value: 'error' })) + ), + rest.post('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.json({ value: 'error' })) + ), + rest.get('https://example.com/nonstandard-error', (_, res, ctx) => + res( + ctx.status(200), + ctx.json({ + success: false, + message: 'This returns a 200 but is really an error', + }) + ) + ), + rest.get('https://example.com/mirror', (req, res, ctx) => + res(ctx.json(req.params)) + ), + rest.post('https://example.com/mirror', (req, res, ctx) => + res(ctx.json(req.params)) + ), + rest.get('https://example.com/posts/random', (req, res, ctx) => { + // just simulate an api that returned a random ID + const { id, ..._post } = posts[1] + return res(ctx.json({ id })) + }), + rest.get( + 'https://example.com/post/:id', + (req, res, ctx) => { + return res(ctx.json(posts[req.params.id])) + } + ) +) From ab772d024244f5fb3514efb21ba7040bcfbccb5d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 13:57:24 -0600 Subject: [PATCH 230/368] Revert "Split up handlers and server files" This reverts commit 0e99f8325f8c2a465f1c3654cf28675ed75e21db. --- .../toolkit/src/query/tests/mocks/handlers.ts | 90 ------------------- 1 file changed, 90 deletions(-) delete mode 100644 packages/toolkit/src/query/tests/mocks/handlers.ts diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts deleted file mode 100644 index 945d629ea3..0000000000 --- a/packages/toolkit/src/query/tests/mocks/handlers.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { headersToObject } from 'headers-polyfill' -import { HttpResponse, http } from 'msw' - -export type Post = { - id: string - title: string - body: string -} - -export const posts: Record = { - '1': { id: '1', title: 'hello', body: 'extra body!' }, -} - -export const handlers = [ - http.get( - 'https://example.com/echo', - async ({ request, params, cookies, requestId }) => { - return HttpResponse.json({ - ...request, - params, - cookies, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }) - } - ), - http.post( - 'https://example.com/echo', - async ({ request, cookies, params, requestId }) => { - let body - - try { - body = - headersToObject(request.headers)['content-type'] === 'text/html' - ? await request.text() - : await request.json() - } catch (err) { - body = request.body - } - - return HttpResponse.json({ - ...request, - cookies, - params, - requestId, - body, - url: new URL(request.url), - headers: headersToObject(request.headers), - }) - } - ), - http.get('https://example.com/success', () => - HttpResponse.json({ value: 'success' }) - ), - http.post('https://example.com/success', () => - HttpResponse.json({ value: 'success' }) - ), - http.get('https://example.com/empty', () => new HttpResponse('')), - http.get('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.post('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ), - http.get('https://example.com/nonstandard-error', () => - HttpResponse.json( - { - success: false, - message: 'This returns a 200 but is really an error', - }, - { status: 200 } - ) - ), - http.get('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.post('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) - ), - http.get('https://example.com/posts/random', () => { - // just simulate an api that returned a random ID - const { id } = posts[1] - return HttpResponse.json({ id }) - }), - http.get>( - 'https://example.com/post/:id', - ({ params }) => HttpResponse.json(posts[params.id]) - ), -] From 767047dabb77bec76a5b1545988c635f465c5212 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:03:51 -0600 Subject: [PATCH 231/368] Revert "Use codemods provided by msw to modernize msw syntax" This reverts commit 42ffa5217ebba10391e4fede0c5da69c39c5084e. --- .../src/query/tests/buildCreateApi.test.tsx | 45 ++++++-- .../src/query/tests/buildHooks.test.tsx | 91 +++++++-------- .../toolkit/src/query/tests/createApi.test.ts | 72 +++++------- .../src/query/tests/errorHandling.test.tsx | 77 ++++++------- .../src/query/tests/fetchBaseQuery.test.tsx | 109 +++++++----------- .../toolkit/src/query/tests/queryFn.test.tsx | 7 +- .../src/query/tests/queryLifecycle.test.tsx | 9 +- packages/toolkit/src/tests/utils/helpers.tsx | 8 +- 8 files changed, 196 insertions(+), 222 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index 9149d9c3b1..bef6a86b09 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -1,11 +1,3 @@ -import { createSelectorCreator, lruMemoize } from '@reduxjs/toolkit' -import { - buildCreateApi, - coreModule, - reactHooksModule, -} from '@reduxjs/toolkit/query/react' -import { render, screen, waitFor } from '@testing-library/react' -import { delay } from 'msw' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { @@ -14,7 +6,42 @@ import { createSelectorHook, createStoreHook, } from 'react-redux' -import { setupApiStore, useRenderCounter } from '../../tests/utils/helpers' +import { + buildCreateApi, + coreModule, + reactHooksModule, +} from '@reduxjs/toolkit/query/react' +import { + act, + fireEvent, + render, + screen, + waitFor, + renderHook, +} from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { rest } from 'msw' +import { + actionsReducer, + ANY, + expectExactType, + expectType, + setupApiStore, + withProvider, + useRenderCounter, + waitMs, +} from './helpers' +import { server } from './mocks/server' +import type { UnknownAction } from 'redux' +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' +import type { SerializedError } from '@reduxjs/toolkit' +import { + createListenerMiddleware, + configureStore, + lruMemoize, + createSelectorCreator, +} from '@reduxjs/toolkit' +import { delay } from '../../utils' const MyContext = React.createContext(null as any) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index e33007a612..849adeee40 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -24,12 +24,12 @@ import { waitFor, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { HttpResponse, http } from 'msw' -import * as React from 'react' -import type { UnknownAction } from 'redux' -import type { MockInstance } from 'vitest' +import { rest } from 'msw' import { actionsReducer, + ANY, + expectExactType, + expectType, setupApiStore, useRenderCounter, waitMs, @@ -104,7 +104,7 @@ const api = createApi({ query: (update) => ({ body: update }), }), getError: build.query({ - query: () => '/error', + query: (query) => '/error', }), listItems: build.query({ serializeQueryArgs: ({ endpointName }) => { @@ -119,7 +119,7 @@ const api = createApi({ merge: (currentCache, newItems) => { currentCache.push(...newItems) }, - forceRefetch: () => { + forceRefetch: ({ currentArg, previousArg }) => { return true }, }), @@ -757,7 +757,7 @@ describe('hooks tests', () => { } // 1) Initial state: an active subscription - const { rerender, unmount } = renderHook( + const { result, rerender, unmount } = renderHook( ([arg, options]: Parameters< typeof pokemonApi.useGetPokemonByNameQuery >) => pokemonApi.useGetPokemonByNameQuery(arg, options), @@ -1752,18 +1752,14 @@ describe('hooks tests', () => { test('initially failed useQueries that provide an tag will refetch after a mutation invalidates it', async () => { const checkSessionData = { name: 'matt' } server.use( - http.get( - 'https://example.com/me', - () => { - return HttpResponse.json(null, { status: 500 }) - }, - { once: true } - ), - http.get('https://example.com/me', () => { - return HttpResponse.json(checkSessionData) + rest.get('https://example.com/me', (req, res, ctx) => { + return res.once(ctx.status(500)) + }), + rest.get('https://example.com/me', (req, res, ctx) => { + return res(ctx.json(checkSessionData)) }), - http.post('https://example.com/login', () => { - return HttpResponse.json(null, { status: 200 }) + rest.post('https://example.com/login', (req, res, ctx) => { + return res(ctx.status(200)) }) ) let data, isLoading, isError @@ -1981,52 +1977,47 @@ describe('hooks with createApi defaults set', () => { posts = [...initialPosts] const handlers = [ - http.get('https://example.com/posts', () => { - return HttpResponse.json(posts) + rest.get('https://example.com/posts', (req, res, ctx) => { + return res(ctx.json(posts)) }), - http.put>( + rest.put>( 'https://example.com/post/:id', - async ({ request, params }) => { - const body = await request.json() - const id = Number(params.id) + (req, res, ctx) => { + const id = Number(req.params.id) const idx = posts.findIndex((post) => post.id === id) const newPosts = posts.map((post, index) => index !== idx ? post : { - ...body, + ...req.body, id, - name: body?.name || post.name, + name: req.body.name || post.name, fetched_at: new Date().toUTCString(), } ) posts = [...newPosts] - return HttpResponse.json(posts) - } - ), - http.post>( - 'https://example.com/post', - async ({ request }) => { - const body = await request.json() - let post = body - startingId += 1 - posts.concat({ - ...post, - fetched_at: new Date().toISOString(), - id: startingId, - }) - return HttpResponse.json(posts) + return res(ctx.json(posts)) } ), + rest.post('https://example.com/post', (req, res, ctx) => { + let post = req.body as Omit + startingId += 1 + posts.concat({ + ...post, + fetched_at: new Date().toISOString(), + id: startingId, + }) + return res(ctx.json(posts)) + }), ] server.use(...handlers) }) interface Post { - id: string + id: number name: string fetched_at: string } @@ -2100,7 +2091,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQueryState(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === (1 as any)), + post: data?.find((post) => post.id === 1), }), }) getRenderCount = useRenderCounter() @@ -2179,7 +2170,7 @@ describe('hooks with createApi defaults set', () => { isSuccess, isError, }) => ({ - post: data?.find((post) => post.id === (1 as any)), + post: data?.find((post) => post.id === 1), isUninitialized, isLoading, isFetching, @@ -2236,7 +2227,7 @@ describe('hooks with createApi defaults set', () => { getRenderCount = useRenderCounter() const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === (1 as any)), + post: data?.find((post) => post.id === 1), }), }) @@ -2285,7 +2276,7 @@ describe('hooks with createApi defaults set', () => { @@ -2296,7 +2287,7 @@ describe('hooks with createApi defaults set', () => { function SelectedPost() { const { post } = api.endpoints.getPosts.useQuery(undefined, { selectFromResult: ({ data }) => ({ - post: data?.find((post) => post.id === (1 as any)), + post: data?.find((post) => post.id === 1), }), }) getRenderCount = useRenderCounter() @@ -2388,6 +2379,12 @@ describe('hooks with createApi defaults set', () => { test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { + const _res1 = api.endpoints.getPosts.useQuery(undefined, { + // selectFromResult must always return an object + // @ts-expect-error + selectFromResult: ({ data }) => data?.length ?? 0, + }) + const res2 = api.endpoints.getPosts.useQuery(undefined, { // selectFromResult must always return an object selectFromResult: ({ data }) => ({ size: data?.length ?? 0 }), diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 8ea735d335..319ee9f9a9 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,40 +1,33 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' -import type { - FetchBaseQueryError, - FetchBaseQueryMeta, -} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' +import type { SpyInstance } from 'vitest' +import { vi } from 'vitest' import type { Api, MutationDefinition, QueryDefinition, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { MockInstance } from 'vitest' - import type { - DefinitionsFromApi, - OverrideResultType, - TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { HttpResponse, delay, http } from 'msw' -import nodeFetch from 'node-fetch' + FetchBaseQueryError, + FetchBaseQueryMeta, +} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' + import { ANY, - getSerializedHeaders, + expectType, + expectExactType, setupApiStore, -} from '../../tests/utils/helpers' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -import type { SerializeQueryArgs } from '../defaultSerializeQueryArgs' + waitMs, + getSerializedHeaders, +} from './helpers' import { server } from './mocks/server' -beforeAll(() => { - vi.stubEnv('NODE_ENV', 'development') +const originalEnv = process.env.NODE_ENV +beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) +afterAll(() => void ((process.env as any).NODE_ENV = originalEnv)) - return vi.unstubAllEnvs -}) - -let spy: MockInstance +let spy: SpyInstance beforeAll(() => { spy = vi.spyOn(console, 'error').mockImplementation(() => {}) }) @@ -650,12 +643,11 @@ describe('additional transformResponse behaviors', () => { query: build.query({ query: () => '/success', transformResponse: async (response: SuccessResponse) => { - const res: any = await nodeFetch('https://example.com/echo', { + const res = await fetch('https://example.com/echo', { method: 'POST', body: JSON.stringify({ banana: 'bread' }), }).then((res) => res.json()) - - const additionalData = res.body as EchoResponseData + const additionalData = JSON.parse(res.body) as EchoResponseData return { ...response, ...additionalData } }, }), @@ -716,6 +708,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', + 'x-powered-by': 'msw', }, }, }, @@ -736,6 +729,7 @@ describe('additional transformResponse behaviors', () => { response: { headers: { 'content-type': 'application/json', + 'x-powered-by': 'msw', }, }, }, @@ -793,10 +787,8 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('query lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'failed' })) ) ) @@ -819,10 +811,8 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { test('mutation lifecycle events fire properly', async () => { // We intentionally fail the first request so we can test all lifecycles server.use( - http.post( - 'https://example.com/success', - () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } + rest.post('https://example.com/success', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'failed' })) ) ) @@ -946,7 +936,7 @@ describe('custom serializeQueryArgs per endpoint', () => { } const dummyClient: MyApiClient = { - async fetchPost() { + async fetchPost(id) { return { value: 'success' } }, } @@ -1107,13 +1097,12 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - http.get('https://example.com/listItems', ({ request }) => { - const url = new URL(request.url) - const pageString = url.searchParams.get('page') + rest.get('https://example.com/listItems', (req, res, ctx) => { + const pageString = req.url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return HttpResponse.json(results) + return res(ctx.json(results)) }) ) @@ -1136,13 +1125,12 @@ describe('custom serializeQueryArgs per endpoint', () => { const PAGE_SIZE = 3 server.use( - http.get('https://example.com/listItems2', ({ request }) => { - const url = new URL(request.url) - const pageString = url.searchParams.get('page') + rest.get('https://example.com/listItems2', (req, res, ctx) => { + const pageString = req.url.searchParams.get('page') const pageNum = parseInt(pageString || '0') const results = paginate(allItems, PAGE_SIZE, pageNum) - return HttpResponse.json(results) + return res(ctx.json(results)) }) ) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index ae1bbbc296..b4b923025c 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,6 +1,11 @@ import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { rest } from 'msw' +import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' +import axios from 'axios' +import { expectExactType, hookWaitFor, setupApiStore } from './helpers' +import { server } from './mocks/server' import { act, fireEvent, @@ -35,10 +40,8 @@ const api = createApi({ const storeRef = setupApiStore(api) -const failQueryOnce = http.get( - '/query', - () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } +const failQueryOnce = rest.get('/query', (_, req, ctx) => + req.once(ctx.status(500), ctx.json({ value: 'failed' })) ) describe('fetchBaseQuery', () => { @@ -88,8 +91,8 @@ describe('fetchBaseQuery', () => { describe('query error handling', () => { test('success', async () => { server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + rest.get('https://example.com/query', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -109,8 +112,8 @@ describe('query error handling', () => { test('error', async () => { server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + rest.get('https://example.com/query', (_, res, ctx) => + res(ctx.status(500), ctx.json({ value: 'error' })) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -133,8 +136,8 @@ describe('query error handling', () => { test('success -> error', async () => { server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + rest.get('https://example.com/query', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -152,10 +155,8 @@ describe('query error handling', () => { ) server.use( - http.get( - 'https://example.com/query', - () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } + rest.get('https://example.com/query', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'error' })) ) ) @@ -179,15 +180,13 @@ describe('query error handling', () => { test('error -> success', async () => { server.use( - http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) + rest.get('https://example.com/query', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) server.use( - http.get( - 'https://example.com/query', - () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } + rest.get('https://example.com/query', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'error' })) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { @@ -224,8 +223,8 @@ describe('query error handling', () => { describe('mutation error handling', () => { test('success', async () => { server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + rest.post('https://example.com/mutation', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -249,8 +248,8 @@ describe('mutation error handling', () => { test('error', async () => { server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + rest.post('https://example.com/mutation', (_, res, ctx) => + res(ctx.status(500), ctx.json({ value: 'error' })) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -277,8 +276,8 @@ describe('mutation error handling', () => { test('success -> error', async () => { server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + rest.post('https://example.com/mutation', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -302,10 +301,8 @@ describe('mutation error handling', () => { } server.use( - http.post( - 'https://example.com/mutation', - () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } + rest.post('https://example.com/mutation', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'error' })) ) ) @@ -332,15 +329,13 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( - http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) + rest.post('https://example.com/mutation', (_, res, ctx) => + res(ctx.json({ value: 'success' })) ) ) server.use( - http.post( - 'https://example.com/mutation', - () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } + rest.post('https://example.com/mutation', (_, res, ctx) => + res.once(ctx.status(500), ctx.json({ value: 'error' })) ) ) @@ -453,8 +448,8 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( - http.get('https://example.com/success', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + rest.get('https://example.com/success', (_, res, ctx) => + res(ctx.status(500), ctx.json({ value: 'error' })) ) ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { @@ -492,10 +487,8 @@ describe('error handling in a component', () => { test('a mutation is unwrappable and has the correct types', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.json(mockErrorResponse, { status: 500 }), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once(ctx.status(500), ctx.json(mockErrorResponse)) ) ) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index ee37f66292..37d8950287 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,11 +1,12 @@ +import { vi } from 'vitest' import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import nodeFetch from 'node-fetch' -import { setupApiStore } from '../../tests/utils/helpers' +import { setupApiStore, waitMs } from './helpers' import { server } from './mocks/server' +// @ts-ignore +import nodeFetch from 'node-fetch' -import { headersToObject } from 'headers-polyfill' -import { HttpResponse, delay, http } from 'msw' +import { rest } from 'msw' import queryString from 'query-string' import type { BaseQueryApi } from '../baseQueryTypes' @@ -18,7 +19,7 @@ const defaultHeaders: Record = { const baseUrl = 'https://example.com' // @ts-ignore -const fetchFn = vi.fn, any[]>(nodeFetch) +const fetchFn = vi.fn, any[]>(global.fetch) const baseQuery = fetchBaseQuery({ baseUrl, @@ -107,7 +108,6 @@ describe('fetchBaseQuery', () => { expect(res).toBeInstanceOf(Object) expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) - expect(res.data).toBeNull() }) @@ -143,10 +143,8 @@ describe('fetchBaseQuery', () => { describe('non-JSON-body', () => { it('success: should return data ("text" responseHandler)', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.text(`this is not json!`), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once(ctx.text(`this is not json!`)) ) ) @@ -165,10 +163,8 @@ describe('fetchBaseQuery', () => { it('success: should fail gracefully (default="json" responseHandler)', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.text(`this is not json!`), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once(ctx.text(`this is not json!`)) ) ) @@ -188,10 +184,11 @@ describe('fetchBaseQuery', () => { it('success: parse text without error ("content-type" responseHandler)', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.text(`this is not json!`), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once( + ctx.text(`this is not json!`) + // NOTE: MSW sets content-type header as text automatically + ) ) ) @@ -216,10 +213,11 @@ describe('fetchBaseQuery', () => { it('success: parse json without error ("content-type" responseHandler)', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.json(`this will become json!`), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once( + ctx.json(`this will become json!`) + // NOTE: MSW sets content-type header as json automatically + ) ) ) @@ -244,8 +242,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status ("text" responseHandler)', async () => { server.use( - http.get('https://example.com/error', () => - HttpResponse.text(`this is not json!`, { status: 500 }) + rest.get('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.text(`this is not json!`)) ) ) @@ -268,8 +266,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status as text ("content-type" responseHandler)', async () => { const serverResponse = 'Internal Server Error' server.use( - http.get('https://example.com/error', () => - HttpResponse.text(serverResponse, { status: 500 }) + rest.get('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.text(serverResponse)) ) ) @@ -297,8 +295,8 @@ describe('fetchBaseQuery', () => { errors: { field1: "Password cannot be 'password'" }, } server.use( - http.get('https://example.com/error', () => - HttpResponse.json(serverResponse, { status: 500 }) + rest.get('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.json(serverResponse)) ) ) @@ -323,8 +321,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail gracefully (default="json" responseHandler)', async () => { server.use( - http.get('https://example.com/error', () => - HttpResponse.text(`this is not json!`, { status: 500 }) + rest.get('https://example.com/error', (_, res, ctx) => + res(ctx.status(500), ctx.text(`this is not json!`)) ) ) @@ -916,10 +914,8 @@ describe('fetchBaseQuery', () => { describe('Accepts global arguments', () => { test('Global responseHandler', async () => { server.use( - http.get( - 'https://example.com/success', - () => HttpResponse.text(`this is not json!`), - { once: true } + rest.get('https://example.com/success', (_, res, ctx) => + res.once(ctx.text(`this is not json!`)) ) ) @@ -971,22 +967,10 @@ describe('fetchBaseQuery', () => { test('Global timeout', async () => { server.use( - http.get( - 'https://example.com/empty1', - async ({ request, cookies, params, requestId }) => { - await delay(300) - - return HttpResponse.json({ - ...request, - cookies, - params, - requestId, - url: new URL(request.url), - headers: headersToObject(request.headers), - }) - }, - { once: true } - ) + rest.get('https://example.com/empty1', async (req, res, ctx) => { + await Promise.race([waitMs(3000), donePromise]) + return res.once(ctx.json({ ...req, headers: req.headers.all() })) + }) ) const globalizedBaseQuery = fetchBaseQuery({ @@ -1000,10 +984,9 @@ describe('fetchBaseQuery', () => { commonBaseQueryApi, {} ) - expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The operation was aborted.', + error: 'AbortError: The user aborted a request.', }) }) }) @@ -1095,22 +1078,10 @@ describe('still throws on completely unexpected errors', () => { describe('timeout', () => { test('throws a timeout error when a request takes longer than specified timeout duration', async () => { server.use( - http.get( - 'https://example.com/empty2', - async ({ request, cookies, params, requestId }) => { - await delay(300) - - return HttpResponse.json({ - ...request, - url: new URL(request.url), - cookies, - params, - requestId, - headers: headersToObject(request.headers), - }) - }, - { once: true } - ) + rest.get('https://example.com/empty2', async (req, res, ctx) => { + await Promise.race([waitMs(3000), donePromise]) + return res.once(ctx.json({ ...req, headers: req.headers.all() })) + }) ) const result = await baseQuery( @@ -1121,7 +1092,7 @@ describe('timeout', () => { expect(result?.error).toEqual({ status: 'TIMEOUT_ERROR', - error: 'AbortError: The operation was aborted.', + error: 'AbortError: The user aborted a request.', }) }) }) diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index 5e3029caed..c797b74294 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -3,9 +3,10 @@ import { configureStore } from '@reduxjs/toolkit' import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' -import type { Post } from './mocks/handlers' -import { posts } from './mocks/handlers' +import type { Post } from './mocks/server' +import { posts } from './mocks/server' +import { actionsReducer, setupApiStore } from './helpers' +import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' describe('queryFn base implementation tests', () => { const baseQuery: BaseQueryFn = diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index 4745b87855..8d2d22586f 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -9,6 +9,7 @@ import { vi } from 'vitest' import { setupApiStore } from '../../tests/utils/helpers' import { expectType } from '../../tests/utils/typeTestHelpers' import { server } from './mocks/server' +import { rest } from 'msw' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -398,12 +399,8 @@ test('query: updateCachedData', async () => { // request 2: error expect(onError).not.toHaveBeenCalled() server.use( - http.get( - 'https://example.com/success', - () => { - return HttpResponse.json({ value: 'failed' }, { status: 500 }) - }, - { once: true } + rest.get('https://example.com/success', (_, req, ctx) => + req.once(ctx.status(500), ctx.json({ value: 'failed' })) ) ) storeRef.store.dispatch( diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index 1e2f5bbc36..e0d71b3a0e 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -1,9 +1,10 @@ +import React, { useCallback } from 'react' import type { + UnknownAction, EnhancedStore, Middleware, - Reducer, Store, - UnknownAction, + Reducer, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' @@ -11,11 +12,10 @@ import { useCallback, useEffect, useRef } from 'react' import { Provider } from 'react-redux' -import { act, cleanup } from '@testing-library/react' import { + mockConsole, createConsole, getLog, - mockConsole, } from 'console-testing-library/pure' import type { Assertion, AsymmetricMatchersContaining } from 'vitest' From d0e893ff5ebff57db1c87d4fc37c7b4de456c8b3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:08:04 -0600 Subject: [PATCH 232/368] Update lockfile --- yarn.lock | 177 +----------------------------------------------------- 1 file changed, 3 insertions(+), 174 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6a8ebfcb01..54ecdea928 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2696,24 +2696,6 @@ __metadata: languageName: node linkType: hard -"@bundled-es-modules/cookie@npm:^2.0.0": - version: 2.0.0 - resolution: "@bundled-es-modules/cookie@npm:2.0.0" - dependencies: - cookie: ^0.5.0 - checksum: 53114eabbedda20ba6c63f45dcea35c568616d22adf5d1882cef9761f65ae636bf47e0c66325572cc8e3a335e0257caf5f76ff1287990d9e9265be7bc9767a87 - languageName: node - linkType: hard - -"@bundled-es-modules/statuses@npm:^1.0.1": - version: 1.0.1 - resolution: "@bundled-es-modules/statuses@npm:1.0.1" - dependencies: - statuses: ^2.0.1 - checksum: bcaa7de192e73056950b5fd20e75140d8d09074b1adc4437924b2051bb02b4dbf568c96e67d53b220fb7d735c3446e2ba746599cb1793ab2d23dd2ef230a8622 - languageName: node - linkType: hard - "@chakra-ui/accordion@npm:1.0.0": version: 1.0.0 resolution: "@chakra-ui/accordion@npm:1.0.0" @@ -6679,13 +6661,6 @@ __metadata: languageName: node linkType: hard -"@mswjs/cookies@npm:^1.1.0": - version: 1.1.0 - resolution: "@mswjs/cookies@npm:1.1.0" - checksum: 1d9be44548907b92ff6acd46795292968661be19f1c04c43fdb2beb98bc7e58b8ffcef3be19d0f2cb58df07a36a6b53b4bbc0ea34e023b7366dbc28ffee90338 - languageName: node - linkType: hard - "@mswjs/data@npm:^0.3.0": version: 0.3.0 resolution: "@mswjs/data@npm:0.3.0" @@ -6742,20 +6717,6 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.25.14": - version: 0.25.14 - resolution: "@mswjs/interceptors@npm:0.25.14" - dependencies: - "@open-draft/deferred-promise": ^2.2.0 - "@open-draft/logger": ^0.3.0 - "@open-draft/until": ^2.0.0 - is-node-process: ^1.2.0 - outvariant: ^1.2.1 - strict-event-emitter: ^0.5.1 - checksum: caf9513cf6848ff0c3f1402abf881d3c1333f68fae54076cfd3fd919b7edb709769342bd3afd2a60ef4ae698ef47776b6203e0ea6a5d8e788e97eda7ed9dbbd4 - languageName: node - linkType: hard - "@mswjs/interceptors@npm:^0.8.0": version: 0.8.1 resolution: "@mswjs/interceptors@npm:0.8.1" @@ -6936,23 +6897,6 @@ __metadata: languageName: node linkType: hard -"@open-draft/deferred-promise@npm:^2.2.0": - version: 2.2.0 - resolution: "@open-draft/deferred-promise@npm:2.2.0" - checksum: 7f29d39725bb8ab5b62f89d88a4202ce2439ac740860979f9e3d0015dfe4bc3daddcfa5727fa4eed482fdbee770aa591b1136b98b0a0f0569a65294f35bdf56a - languageName: node - linkType: hard - -"@open-draft/logger@npm:^0.3.0": - version: 0.3.0 - resolution: "@open-draft/logger@npm:0.3.0" - dependencies: - is-node-process: ^1.2.0 - outvariant: ^1.4.0 - checksum: 7adfe3d0ed8ca32333ce2a77f9a93d561ebc89c989eaa9722f1dc8a2d2854f5de1bef6fa6894cdf58e16fa4dd9cfa99444ea1f5cac6eb1518e9247911ed042d5 - languageName: node - linkType: hard - "@open-draft/until@npm:^1.0.3": version: 1.0.3 resolution: "@open-draft/until@npm:1.0.3" @@ -6960,13 +6904,6 @@ __metadata: languageName: node linkType: hard -"@open-draft/until@npm:^2.0.0, @open-draft/until@npm:^2.1.0": - version: 2.1.0 - resolution: "@open-draft/until@npm:2.1.0" - checksum: 140ea3b16f4a3a6a729c1256050e20a93d408d7aa1e125648ce2665b3c526ed452510c6e4a6f4b15d95fb5e41203fb51510eb8fbc8812d5e5a91880293d66471 - languageName: node - linkType: hard - "@phryneas/ts-version@npm:^1.0.2": version: 1.0.2 resolution: "@phryneas/ts-version@npm:1.0.2" @@ -8220,13 +8157,6 @@ __metadata: languageName: node linkType: hard -"@types/cookie@npm:^0.6.0": - version: 0.6.0 - resolution: "@types/cookie@npm:0.6.0" - checksum: 5edce7995775b0b196b142883e4d4f71fd93c294eaec973670f1fa2540b70ea7390408ed513ddefef5fcb12a578100c76596e8f2a714b0c2ae9f70ee773f4510 - languageName: node - linkType: hard - "@types/eslint-scope@npm:^3.7.3": version: 3.7.3 resolution: "@types/eslint-scope@npm:3.7.3" @@ -8844,13 +8774,6 @@ __metadata: languageName: node linkType: hard -"@types/statuses@npm:^2.0.4": - version: 2.0.4 - resolution: "@types/statuses@npm:2.0.4" - checksum: 3a806c3b96d1845e3e7441fbf0839037e95f717334760ddb7c29223c9a34a7206b68e2998631f89f1a1e3ef5b67b15652f6e8fa14987ebd7f6d38587c1bffd18 - languageName: node - linkType: hard - "@types/testing-library__jest-dom@npm:^5.9.1": version: 5.14.3 resolution: "@types/testing-library__jest-dom@npm:5.14.3" @@ -12198,17 +12121,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: ^4.2.0 - strip-ansi: ^6.0.1 - wrap-ansi: ^7.0.0 - checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 - languageName: node - linkType: hard - "clone-deep@npm:^4.0.1": version: 4.0.1 resolution: "clone-deep@npm:4.0.1" @@ -12753,7 +12665,7 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0, cookie@npm:^0.5.0": +"cookie@npm:0.5.0": version: 0.5.0 resolution: "cookie@npm:0.5.0" checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 @@ -16913,13 +16825,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql@npm:^16.8.1": - version: 16.8.1 - resolution: "graphql@npm:16.8.1" - checksum: 8d304b7b6f708c8c5cc164b06e92467dfe36aff6d4f2cf31dd19c4c2905a0e7b89edac4b7e225871131fd24e21460836b369de0c06532644d15b461d55b1ccc0 - languageName: node - linkType: hard - "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -17208,13 +17113,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"headers-polyfill@npm:^4.0.2": - version: 4.0.2 - resolution: "headers-polyfill@npm:4.0.2" - checksum: a95280ed58df429fc86c4f49b21596be3ea3f5f3d790e7d75238668df9b90b292f15a968c7c19ae1db88c0ae036dd1bf363a71b8e771199d82848e2d8b3c6c2e - languageName: node - linkType: hard - "headers-utils@npm:^3.0.2": version: 3.0.2 resolution: "headers-utils@npm:3.0.2" @@ -18401,13 +18299,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-node-process@npm:^1.2.0": - version: 1.2.0 - resolution: "is-node-process@npm:1.2.0" - checksum: 930765cdc6d81ab8f1bbecbea4a8d35c7c6d88a3ff61f3630e0fc7f22d624d7661c1df05c58547d0eb6a639dfa9304682c8e342c4113a6ed51472b704cee2928 - languageName: node - linkType: hard - "is-npm@npm:^5.0.0": version: 5.0.0 resolution: "is-npm@npm:5.0.0" @@ -21745,39 +21636,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"msw@npm:^2.1.4": - version: 2.1.4 - resolution: "msw@npm:2.1.4" - dependencies: - "@bundled-es-modules/cookie": ^2.0.0 - "@bundled-es-modules/statuses": ^1.0.1 - "@mswjs/cookies": ^1.1.0 - "@mswjs/interceptors": ^0.25.14 - "@open-draft/until": ^2.1.0 - "@types/cookie": ^0.6.0 - "@types/statuses": ^2.0.4 - chalk: ^4.1.2 - chokidar: ^3.4.2 - graphql: ^16.8.1 - headers-polyfill: ^4.0.2 - inquirer: ^8.2.0 - is-node-process: ^1.2.0 - outvariant: ^1.4.2 - path-to-regexp: ^6.2.0 - strict-event-emitter: ^0.5.1 - type-fest: ^4.9.0 - yargs: ^17.7.2 - peerDependencies: - typescript: ">= 4.7.x <= 5.3.x" - peerDependenciesMeta: - typescript: - optional: true - bin: - msw: cli/index.js - checksum: da8aaf9682ac48a635966beef9add9493297de797b266066bcd8ae0c2708488b81558251412e41489511a63deda1774b42e28197e9b73ddf14d9ecf8bb916e7a - languageName: node - linkType: hard - "multicast-dns@npm:^7.2.5": version: 7.2.5 resolution: "multicast-dns@npm:7.2.5" @@ -22673,13 +22531,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"outvariant@npm:^1.4.0, outvariant@npm:^1.4.2": - version: 1.4.2 - resolution: "outvariant@npm:1.4.2" - checksum: 5d9e2b3edb1cc8be9cbfc1c8c97e8b05137c4384bbfc56e0a465de26c5d2f023e65732ddcda9d46599b06d667fbc0de32c30d2ecd11f6f3f43bcf8ce0d320918 - languageName: node - linkType: hard - "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -27936,7 +27787,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"statuses@npm:2.0.1, statuses@npm:^2.0.0, statuses@npm:^2.0.1": +"statuses@npm:2.0.1, statuses@npm:^2.0.0": version: 2.0.1 resolution: "statuses@npm:2.0.1" checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb @@ -28020,13 +27871,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"strict-event-emitter@npm:^0.5.1": - version: 0.5.1 - resolution: "strict-event-emitter@npm:0.5.1" - checksum: 350480431bc1c28fdb601ef4976c2f8155fc364b4740f9692dd03e5bdd48aafc99a5e021fe655fbd986d0b803e9f3fc5c4b018b35cb838c4690d60f2a26f1cf3 - languageName: node - linkType: hard - "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -31761,7 +31605,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.0.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c @@ -31817,21 +31661,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"yargs@npm:^17.7.2": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: ^8.0.1 - escalade: ^3.1.1 - get-caller-file: ^2.0.5 - require-directory: ^2.1.1 - string-width: ^4.2.3 - y18n: ^5.0.5 - yargs-parser: ^21.1.1 - checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a - languageName: node - linkType: hard - "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" From e5220ca84b495bda7c06d21b4b823e7c84c7d426 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:12:11 -0600 Subject: [PATCH 233/368] Remove extra `vitest.d.ts` file --- packages/toolkit/src/tests/utils/vitest.d.ts | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 packages/toolkit/src/tests/utils/vitest.d.ts diff --git a/packages/toolkit/src/tests/utils/vitest.d.ts b/packages/toolkit/src/tests/utils/vitest.d.ts deleted file mode 100644 index dca0a6008e..0000000000 --- a/packages/toolkit/src/tests/utils/vitest.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Assertion, AsymmetricMatchersContaining } from 'vitest' - -interface CustomMatchers { - toMatchSequence(...matchers: Array<(arg: any) => boolean>): R - toHaveConsoleOutput(expectedOutput: string): Promise -} - -declare module 'vitest' { - interface Assertion extends CustomMatchers {} - interface AsymmetricMatchersContaining extends CustomMatchers {} -} From 5aa099791feff999f0c78f598fa82d89e49543cd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:12:33 -0600 Subject: [PATCH 234/368] Revert changes inside `apiProvider.test.tsx` --- packages/toolkit/src/query/tests/apiProvider.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/apiProvider.test.tsx b/packages/toolkit/src/query/tests/apiProvider.test.tsx index 5b10573877..de69ba1b11 100644 --- a/packages/toolkit/src/query/tests/apiProvider.test.tsx +++ b/packages/toolkit/src/query/tests/apiProvider.test.tsx @@ -1,13 +1,13 @@ import { configureStore } from '@reduxjs/toolkit' import { ApiProvider, createApi } from '@reduxjs/toolkit/query/react' import { fireEvent, render, waitFor } from '@testing-library/react' -import { delay } from 'msw' import * as React from 'react' import { Provider } from 'react-redux' +import { waitMs } from '../../tests/utils/helpers' const api = createApi({ baseQuery: async (arg: any) => { - await delay(150) + await waitMs(150) return { data: arg?.body ? arg.body : null } }, endpoints: (build) => ({ From 6a66e301468cc8dcf38fea56a84b84307ca941d7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:12:49 -0600 Subject: [PATCH 235/368] Revert changes inside `helpers.tsx` --- packages/toolkit/src/tests/utils/helpers.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index e0d71b3a0e..7912e27599 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -1,10 +1,9 @@ -import React, { useCallback } from 'react' import type { - UnknownAction, EnhancedStore, Middleware, - Store, Reducer, + Store, + UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' @@ -13,11 +12,13 @@ import { useCallback, useEffect, useRef } from 'react' import { Provider } from 'react-redux' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' +import { cleanup } from '@testing-library/react' +import { act } from 'react-dom/test-utils' import type { Assertion, AsymmetricMatchersContaining } from 'vitest' interface CustomMatchers { From 6f88342ebd9f32bad1f7798e2443435f8c3064d4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:14:36 -0600 Subject: [PATCH 236/368] Revert changes inside `useMutation-fixedCacheKey.test.tsx` --- .../src/query/tests/useMutation-fixedCacheKey.test.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 40b47cbe58..fdc29a73d9 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -6,10 +6,9 @@ import { screen, waitFor, } from '@testing-library/react' -import { delay } from 'msw' import React from 'react' import { vi } from 'vitest' -import { setupApiStore } from '../../tests/utils/helpers' +import { setupApiStore, waitMs } from '../../tests/utils/helpers' describe('fixedCacheKey', () => { const onNewCacheEntry = vi.fn() @@ -343,7 +342,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await delay(150) + await waitMs() expect(getByTestId(c1, 'status').textContent).toBe('pending') expect(getByTestId(c1, 'data').textContent).toBe('') @@ -353,7 +352,7 @@ describe('fixedCacheKey', () => { await Promise.resolve() }) - await delay(150) + await waitMs() expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') expect(getByTestId(c1, 'data').textContent).toBe('this should be visible') From 464b1adaef0ed7de279dac56cffa2ce68a88c725 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:16:06 -0600 Subject: [PATCH 237/368] Revert changes inside `refetchingBehaviors.test.tsx` --- .../query/tests/refetchingBehaviors.test.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx index c696d73f88..20e47ac046 100644 --- a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx +++ b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx @@ -1,8 +1,6 @@ -import { createApi, setupListeners } from '@reduxjs/toolkit/query/react' -import { act, fireEvent, render, screen, waitFor } from '@testing-library/react' -import { delay } from 'msw' -import * as React from 'react' -import { setupApiStore } from '../../tests/utils/helpers' +import { createApi, setupListeners } from '@reduxjs/toolkit/query/react'; +import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; +import { setupApiStore, waitMs } from '../../tests/utils/helpers'; // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -11,7 +9,7 @@ let amount = 0 const defaultApi = createApi({ baseQuery: async (arg: any) => { - await delay(150) + await waitMs() if ('amount' in arg?.body) { amount += 1 } @@ -76,7 +74,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await delay(150) + await waitMs() await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('2') @@ -116,7 +114,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await delay(150) + await waitMs() await waitFor(() => expect(screen.getByTestId('amount').textContent).toBe('1') @@ -218,7 +216,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await delay(1) + await waitMs(1) expect(getIncrementedAmountState()).toBeUndefined() }) }) @@ -393,7 +391,7 @@ describe('customListenersHandler', () => { } ) - await delay(150) + await waitMs() let data, isLoading, isFetching From 6b8e29fbac0de9151c018bb9fa3d9b8f2c4e2f25 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:18:20 -0600 Subject: [PATCH 238/368] Revert changes inside `raceConditions.test.ts` --- .../src/query/tests/raceConditions.test.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/query/tests/raceConditions.test.ts b/packages/toolkit/src/query/tests/raceConditions.test.ts index 3178f42666..840e7795ff 100644 --- a/packages/toolkit/src/query/tests/raceConditions.test.ts +++ b/packages/toolkit/src/query/tests/raceConditions.test.ts @@ -1,6 +1,5 @@ import { createApi, QueryStatus } from '@reduxjs/toolkit/query' -import { delay } from 'msw' -import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' +import { actionsReducer, setupApiStore, waitMs } from '../../tests/utils/helpers' // We need to be able to control when which query resolves to simulate race // conditions properly, that's the purpose of this factory. @@ -59,7 +58,7 @@ it('invalidates a query after a corresponding mutation', async () => { const getQueryState = () => storeRef.store.getState().api.queries[query.queryCacheKey] getEatenBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -68,14 +67,14 @@ it('invalidates a query after a corresponding mutation', async () => { const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) getEatenBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getQueryState()?.data).toBe(1) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) @@ -92,17 +91,17 @@ it('invalidates a query whose corresponding mutation finished while the query wa const getMutationState = () => storeRef.store.getState().api.mutations[mutation.requestId] eatBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getMutationState()?.status).toBe(QueryStatus.fulfilled) getEatenBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getQueryState()?.data).toBe(0) expect(getQueryState()?.status).toBe(QueryStatus.pending) // should already be refetching getEatenBananaPromises.resolveOldest() - await delay(2) + await waitMs(2) expect(getQueryState()?.status).toBe(QueryStatus.fulfilled) expect(getQueryState()?.data).toBe(1) From 14370c9b06662c9a80937c81584cccb3216118f7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:19:07 -0600 Subject: [PATCH 239/368] Revert changes inside `queryLifecycle.test.tsx` --- packages/toolkit/src/query/tests/queryLifecycle.test.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index 8d2d22586f..fc08256ccf 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -4,7 +4,6 @@ import type { } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import { waitFor } from '@testing-library/react' -import { HttpResponse, http } from 'msw' import { vi } from 'vitest' import { setupApiStore } from '../../tests/utils/helpers' import { expectType } from '../../tests/utils/typeTestHelpers' From f257c01d1015b8c710562285d43c268ae0005d58 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:22:00 -0600 Subject: [PATCH 240/368] Revert changes inside `queryFn.test.tsx` --- packages/toolkit/src/query/tests/queryFn.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index c797b74294..3fc5f0c746 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -1,11 +1,10 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' -import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import type { Post } from './mocks/server' import { posts } from './mocks/server' -import { actionsReducer, setupApiStore } from './helpers' +import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' describe('queryFn base implementation tests', () => { From ebf3916a083aa600dc27b44199b7788e56382175 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:23:26 -0600 Subject: [PATCH 241/368] Revert changes inside `polling.test.tsx` --- packages/toolkit/src/query/tests/polling.test.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 42645ad9c4..be0e29772b 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -1,6 +1,5 @@ import { createApi } from '@reduxjs/toolkit/query' -import { delay } from 'msw' -import { setupApiStore } from '../../tests/utils/helpers' +import { setupApiStore, waitMs } from '../../tests/utils/helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' const mockBaseQuery = vi @@ -49,7 +48,7 @@ describe('polling tests', () => { storeRef.store.dispatch(api.util.resetApiState()) - await delay(30) + await waitMs(30) expect(mockBaseQuery).toHaveBeenCalledTimes(1) }) @@ -65,13 +64,13 @@ describe('polling tests', () => { const getSubs = createSubscriptionGetter(queryCacheKey) - await delay(1) + await waitMs(1) expect(Object.keys(getSubs())).toHaveLength(1) expect(getSubs()[requestId].pollingInterval).toBe(10) subscription.updateSubscriptionOptions({ pollingInterval: 20 }) - await delay(1) + await waitMs(1) expect(Object.keys(getSubs())).toHaveLength(1) expect(getSubs()[requestId].pollingInterval).toBe(20) }) @@ -91,7 +90,7 @@ describe('polling tests', () => { }) ) - await delay(10) + await waitMs(10) const getSubs = createSubscriptionGetter(subscriptionOne.queryCacheKey) @@ -99,7 +98,7 @@ describe('polling tests', () => { subscriptionOne.unsubscribe() - await delay(1) + await waitMs(1) expect(Object.keys(getSubs())).toHaveLength(1) }) @@ -118,7 +117,7 @@ describe('polling tests', () => { }) ) - await delay(20) + await waitMs(20) expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2) }) From d7ea7280a4e57a68df595331f5b01ae0563446fd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:24:20 -0600 Subject: [PATCH 242/368] Revert changes inside `optimisticUpserts.test.tsx` --- .../query/tests/optimisticUpserts.test.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx index 8e9be677e6..0d18cf9743 100644 --- a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx @@ -1,7 +1,11 @@ import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore } from '../../tests/utils/helpers' -import { renderHook, act, waitFor } from '@testing-library/react' -import { delay } from "msw"; +import { act, renderHook, waitFor } from '@testing-library/react' +import { + actionsReducer, + hookWaitFor, + setupApiStore, + waitMs, +} from '../../tests/utils/helpers' interface Post { id: string @@ -48,7 +52,7 @@ const api = createApi({ }), post2: build.query({ queryFn: async (id) => { - await delay(20) + await waitMs(20) return { data: { id, @@ -147,7 +151,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => delay(5)) + await act(() => waitMs(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -170,7 +174,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => delay(5)) + await act(() => waitMs(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, @@ -272,7 +276,7 @@ describe('upsertQueryData', () => { title: 'All about cheese.', contents: 'Yummy', } - baseQuery.mockImplementation(() => delay(20).then(() => fetchedData)) + baseQuery.mockImplementation(() => waitMs(20).then(() => fetchedData)) const upsertedData = { id: '3', title: 'Data from a SSR Render', @@ -295,7 +299,7 @@ describe('upsertQueryData', () => { }) test('upsert while a normal query is running (rejected)', async () => { baseQuery.mockImplementationOnce(async () => { - await delay(20) + await waitMs(20) // eslint-disable-next-line no-throw-literal throw 'Error!' }) From 3e59d90422ef367bae1cb2fbd52b0cb25e79c255 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:24:53 -0600 Subject: [PATCH 243/368] Revert changes inside `optimisticUpdates.test.tsx` --- packages/toolkit/src/query/tests/optimisticUpdates.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx index afad253eb8..6b1f52282b 100644 --- a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx @@ -1,10 +1,10 @@ import { createApi } from '@reduxjs/toolkit/query/react' import { act, renderHook } from '@testing-library/react' -import { delay } from 'msw' import { actionsReducer, hookWaitFor, setupApiStore, + waitMs, } from '../../tests/utils/helpers' import type { InvalidationState } from '../core/apiState' @@ -111,7 +111,7 @@ describe('basic lifecycle', () => { expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => delay(5)) + await act(() => waitMs(5)) expect(onError).not.toHaveBeenCalled() expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' }) }) @@ -133,7 +133,7 @@ describe('basic lifecycle', () => { expect(baseQuery).toHaveBeenCalledWith('arg', expect.any(Object), undefined) expect(onError).not.toHaveBeenCalled() expect(onSuccess).not.toHaveBeenCalled() - await act(() => delay(5)) + await act(() => waitMs(5)) expect(onError).toHaveBeenCalledWith({ error: 'error', isUnhandledError: false, From a27496b1a4682d51a5c6be51e0a4bd69e09248d2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:25:29 -0600 Subject: [PATCH 244/368] Revert changes inside `invalidation.test.tsx` --- packages/toolkit/src/query/tests/invalidation.test.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/tests/invalidation.test.tsx b/packages/toolkit/src/query/tests/invalidation.test.tsx index 1b3ad924b9..fbd3740f99 100644 --- a/packages/toolkit/src/query/tests/invalidation.test.tsx +++ b/packages/toolkit/src/query/tests/invalidation.test.tsx @@ -1,8 +1,7 @@ import type { TagDescription } from '@reduxjs/toolkit/dist/query/endpointDefinitions' import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' import { waitFor } from '@testing-library/react' -import { delay } from 'msw' -import { setupApiStore } from '../../tests/utils/helpers' +import { setupApiStore, waitMs } from '../../tests/utils/helpers' const tagTypes = [ 'apple', @@ -136,7 +135,7 @@ test.each(caseMatrix)( store.dispatch(invalidating.initiate()) expect(queryCount).toBe(1) - await delay(2) + await waitMs(2) expect(queryCount).toBe(shouldInvalidate ? 2 : 1) } ) From 6eb56037cf623ef24f1e74b1a6f31d6d987204f1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:28:24 -0600 Subject: [PATCH 245/368] Revert changes inside `fetchBaseQuery.test.tsx` --- .../src/query/tests/fetchBaseQuery.test.tsx | 14 ++++++++++++-- packages/toolkit/vitest.setup.ts | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 37d8950287..35db26d787 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,7 +1,7 @@ -import { vi } from 'vitest' import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { setupApiStore, waitMs } from './helpers' +import { vi } from 'vitest' +import { setupApiStore, waitMs } from '../../tests/utils/helpers' import { server } from './mocks/server' // @ts-ignore import nodeFetch from 'node-fetch' @@ -966,6 +966,10 @@ describe('fetchBaseQuery', () => { }) test('Global timeout', async () => { + let reject: () => void + const donePromise = new Promise((resolve, _reject) => { + reject = _reject + }) server.use( rest.get('https://example.com/empty1', async (req, res, ctx) => { await Promise.race([waitMs(3000), donePromise]) @@ -988,6 +992,7 @@ describe('fetchBaseQuery', () => { status: 'TIMEOUT_ERROR', error: 'AbortError: The user aborted a request.', }) + reject!() }) }) }) @@ -1077,6 +1082,10 @@ describe('still throws on completely unexpected errors', () => { describe('timeout', () => { test('throws a timeout error when a request takes longer than specified timeout duration', async () => { + let reject: () => void + const donePromise = new Promise((resolve, _reject) => { + reject = _reject + }) server.use( rest.get('https://example.com/empty2', async (req, res, ctx) => { await Promise.race([waitMs(3000), donePromise]) @@ -1094,5 +1103,6 @@ describe('timeout', () => { status: 'TIMEOUT_ERROR', error: 'AbortError: The user aborted a request.', }) + reject!() }) }) diff --git a/packages/toolkit/vitest.setup.ts b/packages/toolkit/vitest.setup.ts index 1be6b0b461..ad6694ee57 100644 --- a/packages/toolkit/vitest.setup.ts +++ b/packages/toolkit/vitest.setup.ts @@ -1,3 +1,4 @@ +// @ts-ignore import nodeFetch, { Headers, Request } from 'node-fetch' import { server } from './src/query/tests/mocks/server' From 190adc0feb290a791e88560b4358a3e524a4b8bf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:29:40 -0600 Subject: [PATCH 246/368] Revert changes inside `errorHandling.test.tsx` --- packages/toolkit/src/query/tests/errorHandling.test.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index b4b923025c..0db5ec0ca3 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,11 +1,6 @@ import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit' import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { rest } from 'msw' -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' -import axios from 'axios' -import { expectExactType, hookWaitFor, setupApiStore } from './helpers' -import { server } from './mocks/server' import { act, fireEvent, @@ -16,7 +11,7 @@ import { } from '@testing-library/react' import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios' import axios from 'axios' -import { HttpResponse, http } from 'msw' +import { rest } from 'msw' import * as React from 'react' import { useDispatch } from 'react-redux' import { hookWaitFor, setupApiStore } from '../../tests/utils/helpers' From cdb8df8a67ade3caa6f78068963bd5b3e7a6b8e5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:32:53 -0600 Subject: [PATCH 247/368] Revert changes inside `createApi.test.ts` --- .../toolkit/src/query/tests/createApi.test.ts | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 319ee9f9a9..1fdd426b28 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,33 +1,42 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' -import type { SpyInstance } from 'vitest' -import { vi } from 'vitest' +import type { + FetchBaseQueryError, + FetchBaseQueryMeta, +} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' import type { Api, MutationDefinition, QueryDefinition, + SerializeQueryArgs, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { - FetchBaseQueryError, - FetchBaseQueryMeta, -} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' +import type { MockInstance } from 'vitest' +import { vi } from 'vitest' +import { rest } from 'msw' import { ANY, - expectType, - expectExactType, - setupApiStore, - waitMs, getSerializedHeaders, -} from './helpers' + setupApiStore, +} from '../../tests/utils/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' +import { delay } from '../../utils' +import type { + DefinitionsFromApi, + OverrideResultType, + TagTypesFromApi, +} from '../endpointDefinitions' import { server } from './mocks/server' -const originalEnv = process.env.NODE_ENV -beforeAll(() => void ((process.env as any).NODE_ENV = 'development')) -afterAll(() => void ((process.env as any).NODE_ENV = originalEnv)) +beforeAll(() => { + vi.stubEnv('NODE_ENV', 'development') + + return vi.unstubAllEnvs +}) + +let spy: MockInstance -let spy: SpyInstance beforeAll(() => { spy = vi.spyOn(console, 'error').mockImplementation(() => {}) }) From 4d429448fc14da577f6a485dcbfab26310ae29d7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:33:45 -0600 Subject: [PATCH 248/368] Revert changes inside `buildSlice.test.ts` --- packages/toolkit/src/query/tests/buildSlice.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/buildSlice.test.ts b/packages/toolkit/src/query/tests/buildSlice.test.ts index 3b5efe268f..927c522bd8 100644 --- a/packages/toolkit/src/query/tests/buildSlice.test.ts +++ b/packages/toolkit/src/query/tests/buildSlice.test.ts @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi } from '@reduxjs/toolkit/query' -import { delay } from 'msw' import { setupApiStore } from '../../tests/utils/helpers' +import { delay } from '../../utils' let shouldApiResponseSuccess = true From f3d2c4b51ae54ef29c644dd9ff7835b96d7049f9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:34:08 -0600 Subject: [PATCH 249/368] Revert changes inside `buildMiddleware.test.tsx` --- packages/toolkit/src/query/tests/buildMiddleware.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index 857b799703..43b2ccd9a1 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -1,6 +1,6 @@ import { createApi } from '@reduxjs/toolkit/query' -import { delay } from 'msw' import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' +import { delay } from '../../utils' const baseQuery = (args?: any) => ({ data: args }) const api = createApi({ From 944c0c7c691ced2c3cd94af664647c1af45ee450 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:34:55 -0600 Subject: [PATCH 250/368] Revert changes inside `buildHooks.test.tsx` --- .../src/query/tests/buildHooks.test.tsx | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index 849adeee40..2a0aab7de2 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,20 +1,20 @@ -import type { SerializedError } from '@reduxjs/toolkit' +import type { SerializedError, UnknownAction } from '@reduxjs/toolkit'; import { configureStore, createListenerMiddleware, createSlice, -} from '@reduxjs/toolkit' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' +} from '@reduxjs/toolkit'; +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState'; import type { UseMutation, UseQuery, -} from '@reduxjs/toolkit/dist/query/react/buildHooks' +} from '@reduxjs/toolkit/dist/query/react/buildHooks'; import { QueryStatus, createApi, fetchBaseQuery, skipToken, -} from '@reduxjs/toolkit/query/react' +} from '@reduxjs/toolkit/query/react'; import { act, fireEvent, @@ -22,23 +22,22 @@ import { renderHook, screen, waitFor, -} from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { rest } from 'msw' +} from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { rest } from 'msw'; +import React from "react"; +import type { MockInstance } from "vitest"; import { actionsReducer, - ANY, - expectExactType, - expectType, setupApiStore, useRenderCounter, waitMs, withProvider, -} from '../../tests/utils/helpers' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -import type { SubscriptionSelectors } from '../core/buildMiddleware/types' -import { countObjectKeys } from '../utils/countObjectKeys' -import { server } from './mocks/server' +} from '../../tests/utils/helpers'; +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers'; +import type { SubscriptionSelectors } from '../core/buildMiddleware/types'; +import { countObjectKeys } from '../utils/countObjectKeys'; +import { server } from './mocks/server'; // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or From 2154d33aa7e9ee3546b83db6cf1f562975065fef Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:36:00 -0600 Subject: [PATCH 251/368] Revert changes inside `buildCreateApi.test.tsx` --- .../src/query/tests/buildCreateApi.test.tsx | 43 ++++--------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index bef6a86b09..3a0b453c1d 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -1,3 +1,10 @@ +import { createSelectorCreator, lruMemoize } from '@reduxjs/toolkit' +import { + buildCreateApi, + coreModule, + reactHooksModule, +} from '@reduxjs/toolkit/query/react' +import { render, screen, waitFor } from '@testing-library/react' import * as React from 'react' import type { ReactReduxContextValue } from 'react-redux' import { @@ -6,41 +13,7 @@ import { createSelectorHook, createStoreHook, } from 'react-redux' -import { - buildCreateApi, - coreModule, - reactHooksModule, -} from '@reduxjs/toolkit/query/react' -import { - act, - fireEvent, - render, - screen, - waitFor, - renderHook, -} from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { rest } from 'msw' -import { - actionsReducer, - ANY, - expectExactType, - expectType, - setupApiStore, - withProvider, - useRenderCounter, - waitMs, -} from './helpers' -import { server } from './mocks/server' -import type { UnknownAction } from 'redux' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' -import type { SerializedError } from '@reduxjs/toolkit' -import { - createListenerMiddleware, - configureStore, - lruMemoize, - createSelectorCreator, -} from '@reduxjs/toolkit' +import { setupApiStore, useRenderCounter } from '../../tests/utils/helpers' import { delay } from '../../utils' const MyContext = React.createContext(null as any) From b87f71077a3469e019deca15cf259eef53271c9a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:40:12 -0600 Subject: [PATCH 252/368] Fix `delay` related issues inside `optimisticUpserts.test.tsx` --- .../toolkit/src/query/tests/optimisticUpserts.test.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx index 0d18cf9743..b2d1241c11 100644 --- a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx @@ -6,6 +6,7 @@ import { setupApiStore, waitMs, } from '../../tests/utils/helpers' +import { delay } from '../../utils' interface Post { id: string @@ -52,7 +53,7 @@ const api = createApi({ }), post2: build.query({ queryFn: async (id) => { - await waitMs(20) + await delay(20) return { data: { id, @@ -276,7 +277,7 @@ describe('upsertQueryData', () => { title: 'All about cheese.', contents: 'Yummy', } - baseQuery.mockImplementation(() => waitMs(20).then(() => fetchedData)) + baseQuery.mockImplementation(() => delay(20).then(() => fetchedData)) const upsertedData = { id: '3', title: 'Data from a SSR Render', @@ -299,7 +300,7 @@ describe('upsertQueryData', () => { }) test('upsert while a normal query is running (rejected)', async () => { baseQuery.mockImplementationOnce(async () => { - await waitMs(20) + await delay(20) // eslint-disable-next-line no-throw-literal throw 'Error!' }) From c8e1fc36e4955784b3671cbc9ae2ef665ecf85e4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 14:41:05 -0600 Subject: [PATCH 253/368] Add `test:watch` NPM script --- packages/toolkit/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 3b8dad20f9..fa669f403a 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,7 +101,8 @@ "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", - "test": "vitest", + "test": "vitest --run", + "test:watch": "vitest --watch", "type-tests": "yarn tsc -p tsconfig.json", "prepack": "yarn build" }, From 2d53ca5fd30b0684dfe639838a2433349a46590d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 15:41:02 -0600 Subject: [PATCH 254/368] Fix import issue in `createApi.test.ts` --- packages/toolkit/src/query/tests/createApi.test.ts | 14 +++++++------- packages/toolkit/tsconfig.base.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 1fdd426b28..3adc339a3e 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -19,14 +19,14 @@ import { ANY, getSerializedHeaders, setupApiStore, + waitMs, } from '../../tests/utils/helpers' import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -import { delay } from '../../utils' import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, -} from '../endpointDefinitions' +} from '@reduxjs/toolkit/dist/query/endpointDefinitions' import { server } from './mocks/server' beforeAll(() => { @@ -186,7 +186,7 @@ describe('wrong tagTypes log errors', () => { store.dispatch(api.endpoints[endpoint].initiate()) let result: { status: string } do { - await delay(5) + await waitMs(5) // @ts-ignore result = api.endpoints[endpoint].select()(store.getState()) } while (result.status === 'pending') @@ -461,11 +461,11 @@ describe('endpoint definition typings', () => { }) storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) - await delay(1) + await waitMs(1) expect(spy).not.toHaveBeenCalled() storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) - await delay(1) + await waitMs(1) expect(spy).toHaveBeenCalledWith( "Tag type 'missing' was used, but not specified in `tagTypes`!" ) @@ -805,7 +805,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { const failAttempt = storeRef.store.dispatch(api.endpoints.query.initiate()) expect(storeRef.store.getState().testReducer.count).toBe(0) await failAttempt - await delay(10) + await waitMs(10) expect(storeRef.store.getState().testReducer.count).toBe(-1) const successAttempt = storeRef.store.dispatch( @@ -813,7 +813,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { ) expect(storeRef.store.getState().testReducer.count).toBe(0) await successAttempt - await delay(10) + await waitMs(10) expect(storeRef.store.getState().testReducer.count).toBe(1) }) diff --git a/packages/toolkit/tsconfig.base.json b/packages/toolkit/tsconfig.base.json index 373152ed03..aad62c5c2c 100644 --- a/packages/toolkit/tsconfig.base.json +++ b/packages/toolkit/tsconfig.base.json @@ -32,7 +32,7 @@ "allowSyntheticDefaultImports": true, "emitDeclarationOnly": true, "baseUrl": ".", - "types": ["vitest/globals", "vitest/importMeta", "vitest"], + "types": ["vitest/globals", "vitest/importMeta"], "paths": { "@reduxjs/toolkit": ["src/index.ts"], // @remap-prod-remove-line "@reduxjs/toolkit/react": ["src/react/index.ts"], // @remap-prod-remove-line From d0925af8159f870f6a3ef7c7c405ffdb44f820bd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 16:21:03 -0600 Subject: [PATCH 255/368] Fix Vitest type checker bug - It seems like Vitest's type checker will fail if it detects an object property named "test". --- .../src/query/tests/unionTypes.test-d.ts | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/packages/toolkit/src/query/tests/unionTypes.test-d.ts b/packages/toolkit/src/query/tests/unionTypes.test-d.ts index 738d55ea71..3c25aa969d 100644 --- a/packages/toolkit/src/query/tests/unionTypes.test-d.ts +++ b/packages/toolkit/src/query/tests/unionTypes.test-d.ts @@ -13,14 +13,14 @@ const baseQuery = fetchBaseQuery() const api = createApi({ baseQuery, endpoints: (build) => ({ - test: build.query({ query: () => '' }), + getTest: build.query({ query: () => '' }), mutation: build.mutation({ query: () => '' }), }), }) describe('union types', () => { test('query selector union', () => { - const result = api.endpoints.test.select()({} as any) + const result = api.endpoints.getTest.select()({} as any) if (result.isUninitialized) { expectTypeOf(result.data).toBeUndefined() @@ -89,7 +89,7 @@ describe('union types', () => { } }) test('useQuery union', () => { - const result = api.endpoints.test.useQuery() + const result = api.endpoints.getTest.useQuery() if (result.isUninitialized) { expectTypeOf(result.data).toBeUndefined() @@ -193,7 +193,7 @@ describe('union types', () => { } }) test('useQuery TS4.1 union', () => { - const result = api.useTestQuery() + const result = api.useGetTestQuery() if (result.isUninitialized) { expectTypeOf(result.data).toBeUndefined() @@ -285,7 +285,7 @@ describe('union types', () => { }) test('useLazyQuery union', () => { - const [_trigger, result] = api.endpoints.test.useLazyQuery() + const [_trigger, result] = api.endpoints.getTest.useLazyQuery() if (result.isUninitialized) { expectTypeOf(result.data).toBeUndefined() @@ -376,7 +376,7 @@ describe('union types', () => { }) test('useLazyQuery TS4.1 union', () => { - const [_trigger, result] = api.useLazyTestQuery() + const [_trigger, result] = api.useLazyGetTestQuery() if (result.isUninitialized) { expectTypeOf(result.data).toBeUndefined() @@ -468,9 +468,9 @@ describe('union types', () => { }) test('queryHookResult (without selector) union', async () => { - const useQueryStateResult = api.endpoints.test.useQueryState() - const useQueryResult = api.endpoints.test.useQuery() - const useQueryStateWithSelectFromResult = api.endpoints.test.useQueryState( + const useQueryStateResult = api.endpoints.getTest.useQueryState() + const useQueryResult = api.endpoints.getTest.useQuery() + const useQueryStateWithSelectFromResult = api.endpoints.getTest.useQueryState( undefined, { selectFromResult: () => ({ x: true }), @@ -493,13 +493,14 @@ describe('union types', () => { .parameter(0) .not.toEqualTypeOf(useQueryResultWithoutMethods) - expectTypeOf(api.endpoints.test.select).returns.returns.toEqualTypeOf< + expectTypeOf(api.endpoints.getTest.select).returns.returns.toEqualTypeOf< Awaited> >() }) test('useQueryState (with selectFromResult)', () => { - const result = api.endpoints.test.useQueryState(undefined, { + + const result = api.endpoints.getTest.useQueryState(undefined, { selectFromResult({ data, isLoading, @@ -530,7 +531,7 @@ describe('union types', () => { }) test('useQuery (with selectFromResult)', async () => { - const { refetch, ...result } = api.endpoints.test.useQuery(undefined, { + const { refetch, ...result } = api.endpoints.getTest.useQuery(undefined, { selectFromResult({ data, isLoading, @@ -559,7 +560,7 @@ describe('union types', () => { isError: false, }).toEqualTypeOf(result) - expectTypeOf(api.endpoints.test.select).returns.returns.toEqualTypeOf< + expectTypeOf(api.endpoints.getTest.select).returns.returns.toEqualTypeOf< Awaited> >() }) @@ -732,7 +733,7 @@ describe('union types', () => { describe('"Typed" helper types', () => { test('useQuery', () => { - const result = api.endpoints.test.useQuery() + const result = api.endpoints.getTest.useQuery() expectTypeOf< TypedUseQueryHookResult @@ -740,7 +741,7 @@ describe('"Typed" helper types', () => { }) test('useQuery with selectFromResult', () => { - const result = api.endpoints.test.useQuery(undefined, { + const result = api.endpoints.getTest.useQuery(undefined, { selectFromResult: () => ({ x: true }), }) @@ -750,7 +751,7 @@ describe('"Typed" helper types', () => { }) test('useQueryState', () => { - const result = api.endpoints.test.useQueryState() + const result = api.endpoints.getTest.useQueryState() expectTypeOf< TypedUseQueryStateResult @@ -758,7 +759,7 @@ describe('"Typed" helper types', () => { }) test('useQueryState with selectFromResult', () => { - const result = api.endpoints.test.useQueryState(undefined, { + const result = api.endpoints.getTest.useQueryState(undefined, { selectFromResult: () => ({ x: true }), }) @@ -768,7 +769,7 @@ describe('"Typed" helper types', () => { }) test('useQuerySubscription', () => { - const result = api.endpoints.test.useQuerySubscription() + const result = api.endpoints.getTest.useQuerySubscription() expectTypeOf< TypedUseQuerySubscriptionResult From 9676b8e0d2b7c5811864976d30bb5dd2b64cbd7a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 17:40:42 -0600 Subject: [PATCH 256/368] Perform type checking with runtime tests --- packages/toolkit/package.json | 2 +- packages/toolkit/vitest.config.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index fa669f403a..280f4dac1e 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -101,7 +101,7 @@ "format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"", "format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"", "lint": "eslint src examples", - "test": "vitest --run", + "test": "vitest --run --typecheck", "test:watch": "vitest --watch", "type-tests": "yarn tsc -p tsconfig.json", "prepack": "yarn build" diff --git a/packages/toolkit/vitest.config.ts b/packages/toolkit/vitest.config.ts index 8d615700e2..e4955f3e82 100644 --- a/packages/toolkit/vitest.config.ts +++ b/packages/toolkit/vitest.config.ts @@ -9,7 +9,6 @@ const __dirname = path.dirname(__filename) export default defineConfig({ test: { - typecheck: { only: true }, globals: true, environment: 'jsdom', setupFiles: ['./vitest.setup.ts'], From 8d54f122f462fc41b9e31d0ee82e8f6d14239af1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 17:45:37 -0600 Subject: [PATCH 257/368] Make `tsconfig.test.json` responsible for running type tests during CI --- packages/toolkit/package.json | 2 +- packages/toolkit/tsconfig.build.json | 1 + packages/toolkit/tsconfig.json | 9 +++++++-- packages/toolkit/tsconfig.test.json | 14 +++++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 280f4dac1e..98440bc989 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -103,7 +103,7 @@ "lint": "eslint src examples", "test": "vitest --run --typecheck", "test:watch": "vitest --watch", - "type-tests": "yarn tsc -p tsconfig.json", + "type-tests": "yarn tsc -p tsconfig.test.json --noEmit", "prepack": "yarn build" }, "files": [ diff --git a/packages/toolkit/tsconfig.build.json b/packages/toolkit/tsconfig.build.json index f0b431720e..c643ccc7c0 100644 --- a/packages/toolkit/tsconfig.build.json +++ b/packages/toolkit/tsconfig.build.json @@ -1,4 +1,5 @@ { + // For building the library. "extends": "./tsconfig.base.json", "compilerOptions": { "outDir": "dist" diff --git a/packages/toolkit/tsconfig.json b/packages/toolkit/tsconfig.json index 95ab1d8c94..2c4a93a02e 100644 --- a/packages/toolkit/tsconfig.json +++ b/packages/toolkit/tsconfig.json @@ -1,6 +1,11 @@ { + // For general development and intellisense. + // Scans the entire source code against the current TS version + // we are using during development. "extends": "./tsconfig.test.json", "compilerOptions": { - "skipLibCheck": true - } + "skipLibCheck": true, + "rootDir": "." + }, + "include": ["."] } diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index b9cdc2216d..f9c5f859aa 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -1,12 +1,20 @@ { + // For runtime and type tests during CI. "extends": "./tsconfig.base.json", "compilerOptions": { "emitDeclarationOnly": false, "noEmit": true, - "rootDir": ".", + "rootDir": "./src", "jsx": "react-jsx", - "skipLibCheck": false, + "skipLibCheck": true, "noImplicitReturns": false }, - "exclude": ["dist"] + "exclude": ["dist"], + "include": [ + "src/**/*.test.ts*", + "src/**/*.test-d.ts*", + "src/**/*.spec.ts*", + "src/**/tests/*", + "src/**/*.typetest.ts*" + ] } From 6ec0d4e9290f413ae7706e5d9ef88301d45dacaa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 19:29:59 -0600 Subject: [PATCH 258/368] Fix remaining import issues in test files --- .../src/query/tests/buildCreateApi.test.tsx | 1 - .../src/query/tests/buildHooks.test.tsx | 99 ++++++++++--------- .../toolkit/src/query/tests/createApi.test.ts | 6 ++ .../src/query/tests/fetchBaseQuery.test.tsx | 14 +-- .../toolkit/src/query/tests/polling.test.tsx | 8 +- .../query/tests/refetchingBehaviors.test.tsx | 4 +- packages/toolkit/src/tests/utils/helpers.tsx | 2 +- 7 files changed, 71 insertions(+), 63 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index 1defd6672e..9149d9c3b1 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -15,7 +15,6 @@ import { createStoreHook, } from 'react-redux' import { setupApiStore, useRenderCounter } from '../../tests/utils/helpers' -import { delay } from '../../utils' const MyContext = React.createContext(null as any) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index dbdfdb884b..4371e2442f 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,20 +1,20 @@ -import type { SerializedError, UnknownAction } from '@reduxjs/toolkit'; +import type { SerializedError, UnknownAction } from '@reduxjs/toolkit' import { configureStore, createListenerMiddleware, createSlice, -} from '@reduxjs/toolkit'; -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState'; +} from '@reduxjs/toolkit' +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import type { UseMutation, UseQuery, -} from '@reduxjs/toolkit/dist/query/react/buildHooks'; +} from '@reduxjs/toolkit/dist/query/react/buildHooks' import { QueryStatus, createApi, fetchBaseQuery, skipToken, -} from '@reduxjs/toolkit/query/react'; +} from '@reduxjs/toolkit/query/react' import { act, fireEvent, @@ -22,21 +22,22 @@ import { renderHook, screen, waitFor, - renderHook, } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { http, HttpResponse } from 'msw' +import { HttpResponse, http } from 'msw' +import { useEffect, useState } from 'react' +import type { MockInstance } from 'vitest' import { actionsReducer, setupApiStore, useRenderCounter, waitMs, withProvider, -} from '../../tests/utils/helpers'; -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers'; -import type { SubscriptionSelectors } from '../core/buildMiddleware/types'; -import { countObjectKeys } from '../utils/countObjectKeys'; -import { server } from './mocks/server'; +} from '../../tests/utils/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' +import type { SubscriptionSelectors } from '../core/buildMiddleware/types' +import { countObjectKeys } from '../utils/countObjectKeys' +import { server } from './mocks/server' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -188,7 +189,7 @@ describe('hooks tests', () => { test('useQuery hook sets isFetching=true whenever a request is in flight', async () => { function User() { - const [value, setValue] = React.useState(0) + const [value, setValue] = useState(0) const { isFetching } = api.endpoints.getUser.useQuery(1, { skip: value < 1, @@ -229,7 +230,7 @@ describe('hooks tests', () => { test('useQuery hook sets isLoading=true only on initial request', async () => { let refetch: any, isLoading: boolean, isFetching: boolean function User() { - const [value, setValue] = React.useState(0) + const [value, setValue] = useState(0) ;({ isLoading, isFetching, refetch } = api.endpoints.getUser.useQuery( 2, @@ -278,7 +279,7 @@ describe('hooks tests', () => { test('useQuery hook sets isLoading and isFetching to the correct states', async () => { let refetchMe: () => void = () => {} function User() { - const [value, setValue] = React.useState(0) + const [value, setValue] = useState(0) getRenderCount = useRenderCounter() const { isLoading, isFetching, refetch } = @@ -344,10 +345,10 @@ describe('hooks tests', () => { const { isLoading, isFetching, status } = api.endpoints.getUser.useQuery(id) - React.useEffect(() => { + useEffect(() => { loadingHist.push(isLoading) }, [isLoading]) - React.useEffect(() => { + useEffect(() => { fetchingHist.push(isFetching) }, [isFetching]) return ( @@ -509,7 +510,7 @@ describe('hooks tests', () => { test('refetchOnMountOrArgChange works as expected when changing skip from false->true', async () => { let data, isLoading, isFetching function User() { - const [skip, setSkip] = React.useState(true) + const [skip, setSkip] = useState(true) ;({ data, isLoading, isFetching } = api.endpoints.getIncrementedAmount.useQuery(undefined, { refetchOnMountOrArgChange: 0.5, @@ -555,7 +556,7 @@ describe('hooks tests', () => { let data, isLoading, isFetching function User() { - const [skip, setSkip] = React.useState(true) + const [skip, setSkip] = useState(true) ;({ data, isLoading, isFetching } = api.endpoints.getIncrementedAmount.useQuery(undefined, { skip, @@ -633,7 +634,7 @@ describe('hooks tests', () => { test(`useQuery refetches when query args object changes even if serialized args don't change`, async () => { function ItemList() { - const [pageNumber, setPageNumber] = React.useState(0) + const [pageNumber, setPageNumber] = useState(0) const { data = [] } = api.useListItemsQuery({ pageNumber }) const renderedItems = data.map((item) => ( @@ -908,7 +909,7 @@ describe('hooks tests', () => { test('useLazyQuery accepts updated subscription options and only dispatches updateSubscriptionOptions when values are updated', async () => { let interval = 1000 function User() { - const [options, setOptions] = React.useState() + const [options, setOptions] = useState() const [fetchUser, { data: hookData, isFetching, isUninitialized }] = api.endpoints.getUser.useLazyQuery(options) getRenderCount = useRenderCounter() @@ -1066,7 +1067,7 @@ describe('hooks tests', () => { test('useLazyQuery hook callback returns various properties to handle the result', async () => { function User() { const [getUser] = api.endpoints.getUser.useLazyQuery() - const [{ successMsg, errMsg, isAborted }, setValues] = React.useState({ + const [{ successMsg, errMsg, isAborted }, setValues] = useState({ successMsg: '', errMsg: '', isAborted: false, @@ -1160,7 +1161,7 @@ describe('hooks tests', () => { const [getUser, { data, error }] = api.endpoints.getUserAndForceError.useLazyQuery() - const [unwrappedError, setUnwrappedError] = React.useState() + const [unwrappedError, setUnwrappedError] = useState() const handleClick = async () => { const res = getUser(1) @@ -1213,7 +1214,7 @@ describe('hooks tests', () => { function User() { const [getUser, { data, error }] = api.endpoints.getUser.useLazyQuery() - const [unwrappedResult, setUnwrappedResult] = React.useState< + const [unwrappedResult, setUnwrappedResult] = useState< undefined | { name: string } >() @@ -1320,9 +1321,9 @@ describe('hooks tests', () => { test('useMutation hook callback returns various properties to handle the result', async () => { function User() { const [updateUser] = api.endpoints.updateUser.useMutation() - const [successMsg, setSuccessMsg] = React.useState('') - const [errMsg, setErrMsg] = React.useState('') - const [isAborted, setIsAborted] = React.useState(false) + const [successMsg, setSuccessMsg] = useState('') + const [errMsg, setErrMsg] = useState('') + const [isAborted, setIsAborted] = useState(false) const handleClick = async () => { const res = updateUser({ name: 'Banana' }) @@ -1750,14 +1751,18 @@ describe('hooks tests', () => { test('initially failed useQueries that provide an tag will refetch after a mutation invalidates it', async () => { const checkSessionData = { name: 'matt' } server.use( - http.get('https://example.com/me', () => { + http.get( + 'https://example.com/me', + () => { return HttpResponse.json(null, { status: 500 }) - }, { once: true }), + }, + { once: true } + ), http.get('https://example.com/me', () => { - return HttpResponse.json(checkSessionData) + return HttpResponse.json(checkSessionData) }), http.post('https://example.com/login', () => { - return HttpResponse.json(null, { status: 200 }) + return HttpResponse.json(null, { status: 200 }) }) ) let data, isLoading, isError @@ -1976,12 +1981,12 @@ describe('hooks with createApi defaults set', () => { const handlers = [ http.get('https://example.com/posts', () => { - return HttpResponse.json(posts) + return HttpResponse.json(posts) }), http.put<{ id: string }, Partial>( 'https://example.com/post/:id', async ({ request, params }) => { - const body = await request.json(); + const body = await request.json() const id = Number(params.id) const idx = posts.findIndex((post) => post.id === id) @@ -1997,20 +2002,23 @@ describe('hooks with createApi defaults set', () => { ) posts = [...newPosts] - return HttpResponse.json(posts) + return HttpResponse.json(posts) } ), - http.post>('https://example.com/post', async ({ request }) => { - const body = await request.json(); - let post = body - startingId += 1 - posts.concat({ - ...post, - fetched_at: new Date().toISOString(), - id: startingId, - }) + http.post>( + 'https://example.com/post', + async ({ request }) => { + const body = await request.json() + let post = body + startingId += 1 + posts.concat({ + ...post, + fetched_at: new Date().toISOString(), + id: startingId, + }) return HttpResponse.json(posts) - }), + } + ), ] server.use(...handlers) @@ -2292,7 +2300,7 @@ describe('hooks with createApi defaults set', () => { }) getRenderCount = useRenderCounter() - React.useEffect(() => { + useEffect(() => { expectablePost = post }, [post]) @@ -2379,7 +2387,6 @@ describe('hooks with createApi defaults set', () => { test('useQuery with selectFromResult option has a type error if the result is not an object', async () => { function SelectedPost() { - const res2 = api.endpoints.getPosts.useQuery(undefined, { // selectFromResult must always return an object selectFromResult: ({ data }) => ({ size: data?.length ?? 0 }), diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 7f7d73f658..5c0f1e13f7 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -20,6 +20,12 @@ import type { } from '@reduxjs/toolkit/dist/query/endpointDefinitions' import { HttpResponse, delay, http } from 'msw' import nodeFetch from 'node-fetch' +import { + ANY, + getSerializedHeaders, + setupApiStore, +} from '../../tests/utils/helpers' +import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' import { server } from './mocks/server' beforeAll(() => { diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 17f642466c..08e9d6a8f1 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -1,17 +1,13 @@ import { createSlice } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { vi } from 'vitest' -import { setupApiStore, waitMs } from '../../tests/utils/helpers' -import { server } from './mocks/server' -// @ts-ignore -import nodeFetch from 'node-fetch' -import { setupApiStore } from './helpers' -import { server } from './mocks/server' - import { headersToObject } from 'headers-polyfill' import { HttpResponse, delay, http } from 'msw' +import nodeFetch from 'node-fetch' import queryString from 'query-string' +import { vi } from 'vitest' +import { setupApiStore } from '../../tests/utils/helpers' import type { BaseQueryApi } from '../baseQueryTypes' +import { server } from './mocks/server' const defaultHeaders: Record = { fake: 'header', @@ -28,7 +24,7 @@ const baseQuery = fetchBaseQuery({ baseUrl, fetchFn: fetchFn as any, prepareHeaders: (headers, { getState }) => { - const token = (getState() as RootState).auth.token + const { token } = (getState() as RootState).auth // If we have a token set in state, let's assume that we should be passing it. if (token) { diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 47853a85aa..42645ad9c4 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -65,13 +65,13 @@ describe('polling tests', () => { const getSubs = createSubscriptionGetter(queryCacheKey) - await waitMs(1) + await delay(1) expect(Object.keys(getSubs())).toHaveLength(1) expect(getSubs()[requestId].pollingInterval).toBe(10) subscription.updateSubscriptionOptions({ pollingInterval: 20 }) - await waitMs(1) + await delay(1) expect(Object.keys(getSubs())).toHaveLength(1) expect(getSubs()[requestId].pollingInterval).toBe(20) }) @@ -91,7 +91,7 @@ describe('polling tests', () => { }) ) - await waitMs(10) + await delay(10) const getSubs = createSubscriptionGetter(subscriptionOne.queryCacheKey) @@ -99,7 +99,7 @@ describe('polling tests', () => { subscriptionOne.unsubscribe() - await waitMs(1) + await delay(1) expect(Object.keys(getSubs())).toHaveLength(1) }) diff --git a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx index 4c7304a783..06b7fbccd9 100644 --- a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx +++ b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx @@ -36,7 +36,7 @@ const defaultApi = createApi({ const storeRef = setupApiStore(defaultApi) -let getIncrementedAmountState = () => +const getIncrementedAmountState = () => storeRef.store.getState().api.queries['getIncrementedAmount(undefined)'] afterEach(() => { @@ -217,7 +217,7 @@ describe('refetchOnFocus tests', () => { fireEvent.focus(window) }) - await waitMs(1) + await delay(1) expect(getIncrementedAmountState()).toBeUndefined() }) }) diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index 8e56a6f8a1..2eed676de2 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -154,7 +154,7 @@ expect.extend({ ) { const restore = mockConsole(createConsole()) await fn() - const log = getLog().log + const { log } = getLog() restore() if (normalize(log) === normalize(expectedOutput)) From 01bcfcc24a5c232e4f9d671157885bf52ffca483 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 21:46:00 -0600 Subject: [PATCH 259/368] Add back `CustomMatchers.d.ts` ambient declaration file --- packages/toolkit/src/tests/utils/CustomMatchers.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/toolkit/src/tests/utils/CustomMatchers.d.ts diff --git a/packages/toolkit/src/tests/utils/CustomMatchers.d.ts b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts new file mode 100644 index 0000000000..129b82b453 --- /dev/null +++ b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts @@ -0,0 +1,11 @@ +import type { Assertion, AsymmetricMatchersContaining } from "vitest" + +interface CustomMatchers { + toHaveConsoleOutput(expectedOutput: string): Promise + toMatchSequence(...matchers: Array<(arg: any) => boolean>): R +} + +declare module "vitest" { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} \ No newline at end of file From 8597a717e192f42643c18e5b34cf08b46243bc8c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 23 Jan 2024 21:47:31 -0600 Subject: [PATCH 260/368] Remove `declare global` from `helpers.tsx` - Now we can have an ambient declaration file to handle types for custom matchers. --- packages/toolkit/src/tests/utils/helpers.tsx | 85 +++----------------- 1 file changed, 9 insertions(+), 76 deletions(-) diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index 2eed676de2..76fb1bb6a5 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -1,29 +1,29 @@ -import React, { useCallback } from 'react' import type { - UnknownAction, EnhancedStore, Middleware, - Store, Reducer, + Store, + UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { setupListeners } from '@reduxjs/toolkit/query' +import { useCallback, useEffect, useRef } from 'react' import { Provider } from 'react-redux' +import { act, cleanup } from '@testing-library/react' import { - mockConsole, createConsole, getLog, + mockConsole, } from 'console-testing-library/pure' -import { cleanup, act } from '@testing-library/react' export const ANY = 0 as any export const DEFAULT_DELAY_MS = 150 export const getSerializedHeaders = (headers: Headers = new Headers()) => { - let result: Record = {} + const result: Record = {} headers.forEach((val, key) => { result[key] = val }) @@ -83,13 +83,13 @@ export const fakeTimerWaitFor = async (cb: () => void, time = 2000) => { } export const useRenderCounter = () => { - const countRef = React.useRef(0) + const countRef = useRef(0) - React.useEffect(() => { + useEffect(() => { countRef.current += 1 }) - React.useEffect(() => { + useEffect(() => { return () => { countRef.current = 0 } @@ -98,14 +98,6 @@ export const useRenderCounter = () => { return useCallback(() => countRef.current, []) } -declare global { - namespace jest { - interface Matchers { - toMatchSequence(...matchers: Array<(arg: any) => boolean>): R - } - } -} - expect.extend({ toMatchSequence( _actions: UnknownAction[], @@ -276,62 +268,3 @@ export function setupApiStore< return refObj } - -// type test helpers - -export declare type IsAny = true | false extends ( - T extends never ? true : false -) - ? True - : False - -export declare type IsUnknown = unknown extends T - ? IsAny - : False - -export function expectType(t: T): T { - return t -} - -type Equals = IsAny< - T, - never, - IsAny -> -export function expectExactType(t: T) { - return >(u: U) => {} -} - -type EnsureUnknown = IsUnknown -export function expectUnknown>(t: T) { - return t -} - -type EnsureAny = IsAny -export function expectExactAny>(t: T) { - return t -} - -type IsNotAny = IsAny -export function expectNotAny>(t: T): T { - return t -} - -expectType('5' as string) -expectType('5' as const) -expectType('5' as any) -expectExactType('5' as const)('5' as const) -// @ts-expect-error -expectExactType('5' as string)('5' as const) -// @ts-expect-error -expectExactType('5' as any)('5' as const) -expectUnknown('5' as unknown) -// @ts-expect-error -expectUnknown('5' as const) -// @ts-expect-error -expectUnknown('5' as any) -expectExactAny('5' as any) -// @ts-expect-error -expectExactAny('5' as const) -// @ts-expect-error -expectExactAny('5' as unknown) From bbf887925548c26aee5d6ee91d62b3da15ecf09c Mon Sep 17 00:00:00 2001 From: Nick Girardo Date: Wed, 24 Jan 2024 00:04:28 -0500 Subject: [PATCH 261/368] Add missing reducer field to ConfigureStoreOptions docs --- docs/api/configureStore.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api/configureStore.mdx b/docs/api/configureStore.mdx index 08aa0f089c..c6364c9833 100644 --- a/docs/api/configureStore.mdx +++ b/docs/api/configureStore.mdx @@ -46,6 +46,10 @@ interface ConfigureStoreOptions< P = S > { /** + * A single reducer function that will be used as the root reducer, or an + * object of slice reducers that will be passed to `combineReducers()`. + */ + reducer: Reducer | ReducersMapObject /** * An array of Redux middleware to install. If not supplied, defaults to From 2fe59156161312be7502d426c7809dce3621d76a Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 9 Jan 2024 17:58:55 +1100 Subject: [PATCH 262/368] Updated middleware to handle poll skipping Changes made to the polling middleware to handle the situation when the page is out of focus. The code now includes a check to see whether to skip polling if the page is out of focus. Restructured the return from 'findLowestPollingInterval' function to include 'skipPollOnFocusLost' flag. --- .../src/query/core/buildMiddleware/polling.ts | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index 839a3a5243..48e79c746e 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -53,35 +53,38 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ { queryCacheKey }: QuerySubstateIdentifier, api: SubMiddlewareApi ) { - const state = api.getState()[reducerPath] - const querySubState = state.queries[queryCacheKey] - const subscriptions = internalState.currentSubscriptions[queryCacheKey] + const state = api.getState()[reducerPath]; + const querySubState = state.queries[queryCacheKey]; + const subscriptions = internalState.currentSubscriptions[queryCacheKey]; if (!querySubState || querySubState.status === QueryStatus.uninitialized) - return + return; - const lowestPollingInterval = findLowestPollingInterval(subscriptions) - if (!Number.isFinite(lowestPollingInterval)) return + const { lowestPollingInterval, skipPollOnFocusLost } = findLowestPollingInterval(subscriptions); + if (!Number.isFinite(lowestPollingInterval)) return; - const currentPoll = currentPolls[queryCacheKey] + const currentPoll = currentPolls[queryCacheKey]; if (currentPoll?.timeout) { - clearTimeout(currentPoll.timeout) - currentPoll.timeout = undefined + clearTimeout(currentPoll.timeout); + currentPoll.timeout = undefined; } - const nextPollTimestamp = Date.now() + lowestPollingInterval + const nextPollTimestamp = Date.now() + lowestPollingInterval; - const currentInterval: typeof currentPolls[number] = (currentPolls[ - queryCacheKey - ] = { + // Always update the polling interval + currentPolls[queryCacheKey] = { nextPollTimestamp, pollingInterval: lowestPollingInterval, timeout: setTimeout(() => { - currentInterval!.timeout = undefined - api.dispatch(refetchQuery(querySubState, queryCacheKey)) + // Conditionally dispatch the query + if (document.hasFocus() || !skipPollOnFocusLost) { + api.dispatch(refetchQuery(querySubState, queryCacheKey)); + } + // Regardless of dispatch, set up the next poll + startNextPoll({ queryCacheKey }, api); }, lowestPollingInterval), - }) + }; } function updatePollingInterval( @@ -96,7 +99,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ return } - const lowestPollingInterval = findLowestPollingInterval(subscriptions) + const { lowestPollingInterval } = findLowestPollingInterval(subscriptions) if (!Number.isFinite(lowestPollingInterval)) { cleanupPollForKey(queryCacheKey) @@ -126,6 +129,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ } function findLowestPollingInterval(subscribers: Subscribers = {}) { + let skipPollOnFocusLost: boolean | undefined = false let lowestPollingInterval = Number.POSITIVE_INFINITY for (let key in subscribers) { if (!!subscribers[key].pollingInterval) { @@ -133,10 +137,15 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ subscribers[key].pollingInterval!, lowestPollingInterval ) + skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost } } - return lowestPollingInterval + return { + lowestPollingInterval, + skipPollOnFocusLost, + } } + return handler } From bbb89b633f6288bdf89ec310104f4918e19ee18c Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 9 Jan 2024 17:59:48 +1100 Subject: [PATCH 263/368] Add 'skipPollOnFocusLost' flag to query hooks The query hooks in 'buildHooks.ts' and 'apiState.ts' files now include the 'skipPollOnFocusLost' flag. --- packages/toolkit/src/query/core/apiState.ts | 6 ++++++ packages/toolkit/src/query/react/buildHooks.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/packages/toolkit/src/query/core/apiState.ts b/packages/toolkit/src/query/core/apiState.ts index 3b1d6624c9..192d32190c 100644 --- a/packages/toolkit/src/query/core/apiState.ts +++ b/packages/toolkit/src/query/core/apiState.ts @@ -83,6 +83,12 @@ export type SubscriptionOptions = { * How frequently to automatically re-fetch data (in milliseconds). Defaults to `0` (off). */ pollingInterval?: number + /** + * Defaults to 'false'. This setting allows you to control whether RTK Query will continue polling if the window is not focused. + * + * If pollingInterval is not set or set to 0, this **will not be evaluated** until pollingInterval is greater than 0. + */ + skipPollOnFocusLost?: boolean /** * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after regaining a network connection. * diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 2a3e2cc93d..369637f5b4 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -672,6 +672,7 @@ export function buildHooks({ refetchOnMountOrArgChange, skip = false, pollingInterval = 0, + skipPollOnFocusLost = false, } = {} ) => { const { initiate } = api.endpoints[name] as ApiEndpointQuery< @@ -715,6 +716,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval, + skipPollOnFocusLost, }) const lastRenderHadSubscription = useRef(false) @@ -815,6 +817,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval = 0, + skipPollOnFocusLost = false, } = {}) => { const { initiate } = api.endpoints[name] as ApiEndpointQuery< QueryDefinition, @@ -829,6 +832,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval, + skipPollOnFocusLost, }) usePossiblyImmediateEffect(() => { From d1b997127c68b7dd55ea51bd6b6493551e2decc0 Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 9 Jan 2024 18:06:09 +1100 Subject: [PATCH 264/368] yarn format changes --- .../src/query/core/buildMiddleware/polling.ts | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index 48e79c746e..c05bb6ff6d 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -53,38 +53,36 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ { queryCacheKey }: QuerySubstateIdentifier, api: SubMiddlewareApi ) { - const state = api.getState()[reducerPath]; - const querySubState = state.queries[queryCacheKey]; - const subscriptions = internalState.currentSubscriptions[queryCacheKey]; + const state = api.getState()[reducerPath] + const querySubState = state.queries[queryCacheKey] + const subscriptions = internalState.currentSubscriptions[queryCacheKey] if (!querySubState || querySubState.status === QueryStatus.uninitialized) - return; + return - const { lowestPollingInterval, skipPollOnFocusLost } = findLowestPollingInterval(subscriptions); - if (!Number.isFinite(lowestPollingInterval)) return; + const { lowestPollingInterval, skipPollOnFocusLost } = + findLowestPollingInterval(subscriptions) + if (!Number.isFinite(lowestPollingInterval)) return - const currentPoll = currentPolls[queryCacheKey]; + const currentPoll = currentPolls[queryCacheKey] if (currentPoll?.timeout) { - clearTimeout(currentPoll.timeout); - currentPoll.timeout = undefined; + clearTimeout(currentPoll.timeout) + currentPoll.timeout = undefined } - const nextPollTimestamp = Date.now() + lowestPollingInterval; + const nextPollTimestamp = Date.now() + lowestPollingInterval - // Always update the polling interval currentPolls[queryCacheKey] = { nextPollTimestamp, pollingInterval: lowestPollingInterval, timeout: setTimeout(() => { - // Conditionally dispatch the query if (document.hasFocus() || !skipPollOnFocusLost) { - api.dispatch(refetchQuery(querySubState, queryCacheKey)); + api.dispatch(refetchQuery(querySubState, queryCacheKey)) } - // Regardless of dispatch, set up the next poll - startNextPoll({ queryCacheKey }, api); + startNextPoll({ queryCacheKey }, api) }, lowestPollingInterval), - }; + } } function updatePollingInterval( From e7fce612d6f0be73ebc08862dc7905ec794b6d5b Mon Sep 17 00:00:00 2001 From: Jackson Date: Wed, 10 Jan 2024 15:28:51 +1100 Subject: [PATCH 265/368] Add tests for 'skipPollOnFocusLost' option New test cases have been added for the 'skipPollOnFocusLost' option in query polling. Specifically, these tests verify the correct behaviour when this option is toggled, when it's reset on mount, and when it's changed via subscription options update. --- .../toolkit/src/query/tests/polling.test.tsx | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index ce82c74838..d2b2fb2275 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -122,4 +122,85 @@ describe('polling tests', () => { expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2) }) + + it('respects skipPollOnFocusLost', async () => { + storeRef.store.dispatch( + getPosts.initiate(1, { + subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: true }, + subscribe: true, + }) + ) + + await delay(20) + const callsWithSkip = mockBaseQuery.mock.calls.length + + storeRef.store.dispatch( + getPosts.initiate(1, { + subscriptionOptions: { + pollingInterval: 10, + skipPollOnFocusLost: false, + }, + subscribe: true, + }) + ) + + await delay(30) + const callsWithoutSkip = mockBaseQuery.mock.calls.length + + expect(callsWithSkip).toBe(1) + expect(callsWithoutSkip).toBeGreaterThan(2) + }) + + it('replaces skipPollOnFocusLost with most recent mount', async () => { + storeRef.store.dispatch( + getPosts.initiate(1, { + subscriptionOptions: { + pollingInterval: 10, + skipPollOnFocusLost: false, + }, + subscribe: true, + }) + ) + + await delay(50) + const callsWithSkip = mockBaseQuery.mock.calls.length + + storeRef.store.dispatch( + getPosts.initiate(1, { + subscriptionOptions: { pollingInterval: 15, skipPollOnFocusLost: true }, + subscribe: true, + }) + ) + + await delay(50) + const callsWithoutSkip = mockBaseQuery.mock.calls.length + + expect(callsWithSkip).toBeGreaterThan(2) + expect(callsWithoutSkip).toBe(callsWithSkip + 1) + }) + + it('replaces skipPollOnFocusLost when the subscription options are updated', async () => { + const { requestId, queryCacheKey, ...subscription } = + storeRef.store.dispatch( + getPosts.initiate(1, { + subscriptionOptions: { pollingInterval: 10 }, + subscribe: true, + }) + ) + + const getSubs = createSubscriptionGetter(queryCacheKey) + + await delay(1) + expect(Object.keys(getSubs())).toHaveLength(1) + expect(getSubs()[requestId].skipPollOnFocusLost).toBe(false) + + subscription.updateSubscriptionOptions({ + pollingInterval: 20, + skipPollOnFocusLost: true, + }) + + await delay(1) + expect(Object.keys(getSubs())).toHaveLength(1) + expect(getSubs()[requestId].skipPollOnFocusLost).toBe(true) + }) }) From 65a6ae32a21223527a81bff8b46bbdadd4e3fe20 Mon Sep 17 00:00:00 2001 From: Jackson Date: Wed, 10 Jan 2024 15:43:47 +1100 Subject: [PATCH 266/368] Added mockClear() to mockBaseQuery in failing test --- packages/toolkit/src/query/tests/polling.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index d2b2fb2275..66671e65ca 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -124,6 +124,7 @@ describe('polling tests', () => { }) it('respects skipPollOnFocusLost', async () => { + mockBaseQuery.mockClear() storeRef.store.dispatch( getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: true }, @@ -146,6 +147,7 @@ describe('polling tests', () => { await delay(30) const callsWithoutSkip = mockBaseQuery.mock.calls.length + console.log(callsWithSkip, callsWithoutSkip) expect(callsWithSkip).toBe(1) expect(callsWithoutSkip).toBeGreaterThan(2) @@ -183,7 +185,7 @@ describe('polling tests', () => { const { requestId, queryCacheKey, ...subscription } = storeRef.store.dispatch( getPosts.initiate(1, { - subscriptionOptions: { pollingInterval: 10 }, + subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: false }, subscribe: true, }) ) From 823c3b70b907a6ee5e2e2676011960cca641c6e6 Mon Sep 17 00:00:00 2001 From: Jackson Date: Wed, 10 Jan 2024 15:47:30 +1100 Subject: [PATCH 267/368] Format skipPollOnFocusLost test --- packages/toolkit/src/query/tests/polling.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 66671e65ca..2a21215ec3 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -185,7 +185,10 @@ describe('polling tests', () => { const { requestId, queryCacheKey, ...subscription } = storeRef.store.dispatch( getPosts.initiate(1, { - subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: false }, + subscriptionOptions: { + pollingInterval: 10, + skipPollOnFocusLost: false, + }, subscribe: true, }) ) From 65b448f9099a378d3db9ba48fb000b0fa2cc8647 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 11 Jan 2024 23:59:23 +1100 Subject: [PATCH 268/368] Update skipPollOnFocusLost to use listenerMiddleware Added documentation to apiState, tests to support listenerMiddleware usage and polling.ts updated to match --- packages/toolkit/src/query/core/apiState.ts | 2 + .../src/query/core/buildMiddleware/polling.ts | 6 ++- .../toolkit/src/query/tests/polling.test.tsx | 48 ++++++++++++++----- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/packages/toolkit/src/query/core/apiState.ts b/packages/toolkit/src/query/core/apiState.ts index 192d32190c..79b248ea35 100644 --- a/packages/toolkit/src/query/core/apiState.ts +++ b/packages/toolkit/src/query/core/apiState.ts @@ -87,6 +87,8 @@ export type SubscriptionOptions = { * Defaults to 'false'. This setting allows you to control whether RTK Query will continue polling if the window is not focused. * * If pollingInterval is not set or set to 0, this **will not be evaluated** until pollingInterval is greater than 0. + * + * Note: requires [`setupListeners`](./setupListeners) to have been called. */ skipPollOnFocusLost?: boolean /** diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index c05bb6ff6d..909aa94219 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -77,7 +77,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ nextPollTimestamp, pollingInterval: lowestPollingInterval, timeout: setTimeout(() => { - if (document.hasFocus() || !skipPollOnFocusLost) { + if (state.config.focused || !skipPollOnFocusLost) { api.dispatch(refetchQuery(querySubState, queryCacheKey)) } startNextPoll({ queryCacheKey }, api) @@ -135,7 +135,9 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ subscribers[key].pollingInterval!, lowestPollingInterval ) - skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost + // if (!skipPollOnFocusLost) { + skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost + // } } } diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 2a21215ec3..258fbf7dbe 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -2,6 +2,8 @@ import { createApi } from '@reduxjs/toolkit/query' import { delay } from 'msw' import { setupApiStore } from './helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' +import { createListenerMiddleware } from '@reduxjs/toolkit' + const mockBaseQuery = vi .fn() @@ -125,18 +127,27 @@ describe('polling tests', () => { it('respects skipPollOnFocusLost', async () => { mockBaseQuery.mockClear() - storeRef.store.dispatch( - getPosts.initiate(1, { + const listenerMiddleware = createListenerMiddleware() + const storeListenerRef = setupApiStore(api, undefined, { + middleware: { + concat: [listenerMiddleware.middleware], + }, + withoutTestLifecycles: true, + }) + + storeListenerRef.store.dispatch( + getPosts.initiate(2, { subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: true }, subscribe: true, }) ) + storeListenerRef.store.dispatch(api.internalActions?.onFocusLost()) - await delay(20) + await delay(50) const callsWithSkip = mockBaseQuery.mock.calls.length - storeRef.store.dispatch( - getPosts.initiate(1, { + storeListenerRef.store.dispatch( + getPosts.initiate(2, { subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: false, @@ -145,17 +156,28 @@ describe('polling tests', () => { }) ) - await delay(30) + storeListenerRef.store.dispatch(api.internalActions?.onFocus()) + + await delay(50) const callsWithoutSkip = mockBaseQuery.mock.calls.length - console.log(callsWithSkip, callsWithoutSkip) expect(callsWithSkip).toBe(1) expect(callsWithoutSkip).toBeGreaterThan(2) + + storeListenerRef.store.dispatch(api.util.resetApiState()) }) - it('replaces skipPollOnFocusLost with most recent mount', async () => { - storeRef.store.dispatch( - getPosts.initiate(1, { + it('respects skipPollOnFocusLost if any subscription is true', async () => { + const listenerMiddleware = createListenerMiddleware() + const storeListenerRef = setupApiStore(api, undefined, { + middleware: { + concat: [listenerMiddleware.middleware], + }, + withoutTestLifecycles: true, + }) + + storeListenerRef.store.dispatch( + getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: false, @@ -167,13 +189,15 @@ describe('polling tests', () => { await delay(50) const callsWithSkip = mockBaseQuery.mock.calls.length - storeRef.store.dispatch( - getPosts.initiate(1, { + storeListenerRef.store.dispatch( + getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 15, skipPollOnFocusLost: true }, subscribe: true, }) ) + storeListenerRef.store.dispatch(api.internalActions?.onFocusLost()) + await delay(50) const callsWithoutSkip = mockBaseQuery.mock.calls.length From b9d37c3d56157b9b99daaff4fae3ce4e59c54491 Mon Sep 17 00:00:00 2001 From: Jackson Date: Fri, 12 Jan 2024 00:05:06 +1100 Subject: [PATCH 269/368] changed polling test name to represent actual behaviour --- packages/toolkit/src/query/core/buildMiddleware/polling.ts | 4 +--- packages/toolkit/src/query/tests/polling.test.tsx | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index 909aa94219..c91d161c95 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -135,9 +135,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ subscribers[key].pollingInterval!, lowestPollingInterval ) - // if (!skipPollOnFocusLost) { - skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost - // } + skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost } } diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 258fbf7dbe..1f0f400c9a 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -4,7 +4,6 @@ import { setupApiStore } from './helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' import { createListenerMiddleware } from '@reduxjs/toolkit' - const mockBaseQuery = vi .fn() .mockImplementation((args: any) => ({ data: args })) @@ -167,7 +166,7 @@ describe('polling tests', () => { storeListenerRef.store.dispatch(api.util.resetApiState()) }) - it('respects skipPollOnFocusLost if any subscription is true', async () => { + it('respects skipPollOnFocusLost of the most recent mounted subscription', async () => { const listenerMiddleware = createListenerMiddleware() const storeListenerRef = setupApiStore(api, undefined, { middleware: { From e676ee8d28c1929e5963558c9740491d5e0de3cf Mon Sep 17 00:00:00 2001 From: Jackson Date: Sat, 13 Jan 2024 21:05:47 +1100 Subject: [PATCH 270/368] Removed redundant createListenerMiddleware from tests --- .../toolkit/src/query/tests/polling.test.tsx | 33 +++++-------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 1f0f400c9a..17c3cd1205 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -2,7 +2,6 @@ import { createApi } from '@reduxjs/toolkit/query' import { delay } from 'msw' import { setupApiStore } from './helpers' import type { SubscriptionSelectors } from '../core/buildMiddleware/types' -import { createListenerMiddleware } from '@reduxjs/toolkit' const mockBaseQuery = vi .fn() @@ -126,26 +125,18 @@ describe('polling tests', () => { it('respects skipPollOnFocusLost', async () => { mockBaseQuery.mockClear() - const listenerMiddleware = createListenerMiddleware() - const storeListenerRef = setupApiStore(api, undefined, { - middleware: { - concat: [listenerMiddleware.middleware], - }, - withoutTestLifecycles: true, - }) - - storeListenerRef.store.dispatch( + storeRef.store.dispatch( getPosts.initiate(2, { subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: true }, subscribe: true, }) ) - storeListenerRef.store.dispatch(api.internalActions?.onFocusLost()) + storeRef.store.dispatch(api.internalActions?.onFocusLost()) await delay(50) const callsWithSkip = mockBaseQuery.mock.calls.length - storeListenerRef.store.dispatch( + storeRef.store.dispatch( getPosts.initiate(2, { subscriptionOptions: { pollingInterval: 10, @@ -155,7 +146,7 @@ describe('polling tests', () => { }) ) - storeListenerRef.store.dispatch(api.internalActions?.onFocus()) + storeRef.store.dispatch(api.internalActions?.onFocus()) await delay(50) const callsWithoutSkip = mockBaseQuery.mock.calls.length @@ -163,19 +154,11 @@ describe('polling tests', () => { expect(callsWithSkip).toBe(1) expect(callsWithoutSkip).toBeGreaterThan(2) - storeListenerRef.store.dispatch(api.util.resetApiState()) + storeRef.store.dispatch(api.util.resetApiState()) }) it('respects skipPollOnFocusLost of the most recent mounted subscription', async () => { - const listenerMiddleware = createListenerMiddleware() - const storeListenerRef = setupApiStore(api, undefined, { - middleware: { - concat: [listenerMiddleware.middleware], - }, - withoutTestLifecycles: true, - }) - - storeListenerRef.store.dispatch( + storeRef.store.dispatch( getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 10, @@ -188,14 +171,14 @@ describe('polling tests', () => { await delay(50) const callsWithSkip = mockBaseQuery.mock.calls.length - storeListenerRef.store.dispatch( + storeRef.store.dispatch( getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 15, skipPollOnFocusLost: true }, subscribe: true, }) ) - storeListenerRef.store.dispatch(api.internalActions?.onFocusLost()) + storeRef.store.dispatch(api.internalActions?.onFocusLost()) await delay(50) const callsWithoutSkip = mockBaseQuery.mock.calls.length From 4ae5a9bbdfe4e7f941b6b156ad07f130eca52269 Mon Sep 17 00:00:00 2001 From: Jackson Date: Sun, 21 Jan 2024 18:13:27 +1100 Subject: [PATCH 271/368] Polling skipPollOnFocusLost behavior changed to skip if any subscription has the setting and tests changed to better reflect this behavior and intent --- .../src/query/core/buildMiddleware/polling.ts | 3 ++- .../toolkit/src/query/tests/polling.test.tsx | 20 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index c91d161c95..beb5666bbc 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -135,7 +135,8 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ subscribers[key].pollingInterval!, lowestPollingInterval ) - skipPollOnFocusLost = subscribers[key].skipPollOnFocusLost + skipPollOnFocusLost = + subscribers[key].skipPollOnFocusLost || skipPollOnFocusLost } } diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 17c3cd1205..297d4eaff3 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -157,7 +157,7 @@ describe('polling tests', () => { storeRef.store.dispatch(api.util.resetApiState()) }) - it('respects skipPollOnFocusLost of the most recent mounted subscription', async () => { + it('respects skipPollOnFocusLost if at least one subscription has it', async () => { storeRef.store.dispatch( getPosts.initiate(3, { subscriptionOptions: { @@ -169,7 +169,7 @@ describe('polling tests', () => { ) await delay(50) - const callsWithSkip = mockBaseQuery.mock.calls.length + const callsWithoutSkip = mockBaseQuery.mock.calls.length storeRef.store.dispatch( getPosts.initiate(3, { @@ -178,13 +178,23 @@ describe('polling tests', () => { }) ) + storeRef.store.dispatch( + getPosts.initiate(3, { + subscriptionOptions: { + pollingInterval: 20, + skipPollOnFocusLost: false, + }, + subscribe: true, + }) + ) + storeRef.store.dispatch(api.internalActions?.onFocusLost()) await delay(50) - const callsWithoutSkip = mockBaseQuery.mock.calls.length + const callsWithSkip = mockBaseQuery.mock.calls.length - expect(callsWithSkip).toBeGreaterThan(2) - expect(callsWithoutSkip).toBe(callsWithSkip + 1) + expect(callsWithoutSkip).toBeGreaterThan(2) + expect(callsWithSkip).toBe(callsWithoutSkip + 1) }) it('replaces skipPollOnFocusLost when the subscription options are updated', async () => { From 8cbf2a1c9fbe50037a00f376a2cd274b83f3b27f Mon Sep 17 00:00:00 2001 From: Jackson Date: Wed, 24 Jan 2024 20:10:17 +1100 Subject: [PATCH 272/368] skipPollOnFocused lost to skipPollingIfUnfocused and yarn format --- packages/toolkit/src/query/core/apiState.ts | 2 +- .../src/query/core/buildMiddleware/polling.ts | 12 ++++---- .../toolkit/src/query/react/buildHooks.ts | 8 ++--- .../toolkit/src/query/tests/polling.test.tsx | 30 +++++++++++-------- 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/packages/toolkit/src/query/core/apiState.ts b/packages/toolkit/src/query/core/apiState.ts index 79b248ea35..71ca4856e4 100644 --- a/packages/toolkit/src/query/core/apiState.ts +++ b/packages/toolkit/src/query/core/apiState.ts @@ -90,7 +90,7 @@ export type SubscriptionOptions = { * * Note: requires [`setupListeners`](./setupListeners) to have been called. */ - skipPollOnFocusLost?: boolean + skipPollingIfUnfocused?: boolean /** * Defaults to `false`. This setting allows you to control whether RTK Query will try to refetch all subscribed queries after regaining a network connection. * diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index beb5666bbc..2870d43443 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -60,7 +60,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ if (!querySubState || querySubState.status === QueryStatus.uninitialized) return - const { lowestPollingInterval, skipPollOnFocusLost } = + const { lowestPollingInterval, skipPollingIfUnfocused } = findLowestPollingInterval(subscriptions) if (!Number.isFinite(lowestPollingInterval)) return @@ -77,7 +77,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ nextPollTimestamp, pollingInterval: lowestPollingInterval, timeout: setTimeout(() => { - if (state.config.focused || !skipPollOnFocusLost) { + if (state.config.focused || !skipPollingIfUnfocused) { api.dispatch(refetchQuery(querySubState, queryCacheKey)) } startNextPoll({ queryCacheKey }, api) @@ -127,7 +127,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ } function findLowestPollingInterval(subscribers: Subscribers = {}) { - let skipPollOnFocusLost: boolean | undefined = false + let skipPollingIfUnfocused: boolean | undefined = false let lowestPollingInterval = Number.POSITIVE_INFINITY for (let key in subscribers) { if (!!subscribers[key].pollingInterval) { @@ -135,14 +135,14 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ subscribers[key].pollingInterval!, lowestPollingInterval ) - skipPollOnFocusLost = - subscribers[key].skipPollOnFocusLost || skipPollOnFocusLost + skipPollingIfUnfocused = + subscribers[key].skipPollingIfUnfocused || skipPollingIfUnfocused } } return { lowestPollingInterval, - skipPollOnFocusLost, + skipPollingIfUnfocused, } } diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 369637f5b4..a17ba0ae4f 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -672,7 +672,7 @@ export function buildHooks({ refetchOnMountOrArgChange, skip = false, pollingInterval = 0, - skipPollOnFocusLost = false, + skipPollingIfUnfocused = false, } = {} ) => { const { initiate } = api.endpoints[name] as ApiEndpointQuery< @@ -716,7 +716,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval, - skipPollOnFocusLost, + skipPollingIfUnfocused, }) const lastRenderHadSubscription = useRef(false) @@ -817,7 +817,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval = 0, - skipPollOnFocusLost = false, + skipPollingIfUnfocused = false, } = {}) => { const { initiate } = api.endpoints[name] as ApiEndpointQuery< QueryDefinition, @@ -832,7 +832,7 @@ export function buildHooks({ refetchOnReconnect, refetchOnFocus, pollingInterval, - skipPollOnFocusLost, + skipPollingIfUnfocused, }) usePossiblyImmediateEffect(() => { diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index 297d4eaff3..1e5deb1056 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -123,11 +123,14 @@ describe('polling tests', () => { expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2) }) - it('respects skipPollOnFocusLost', async () => { + it('respects skipPollingIfUnfocused', async () => { mockBaseQuery.mockClear() storeRef.store.dispatch( getPosts.initiate(2, { - subscriptionOptions: { pollingInterval: 10, skipPollOnFocusLost: true }, + subscriptionOptions: { + pollingInterval: 10, + skipPollingIfUnfocused: true, + }, subscribe: true, }) ) @@ -140,7 +143,7 @@ describe('polling tests', () => { getPosts.initiate(2, { subscriptionOptions: { pollingInterval: 10, - skipPollOnFocusLost: false, + skipPollingIfUnfocused: false, }, subscribe: true, }) @@ -157,12 +160,12 @@ describe('polling tests', () => { storeRef.store.dispatch(api.util.resetApiState()) }) - it('respects skipPollOnFocusLost if at least one subscription has it', async () => { + it('respects skipPollingIfUnfocused if at least one subscription has it', async () => { storeRef.store.dispatch( getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 10, - skipPollOnFocusLost: false, + skipPollingIfUnfocused: false, }, subscribe: true, }) @@ -173,7 +176,10 @@ describe('polling tests', () => { storeRef.store.dispatch( getPosts.initiate(3, { - subscriptionOptions: { pollingInterval: 15, skipPollOnFocusLost: true }, + subscriptionOptions: { + pollingInterval: 15, + skipPollingIfUnfocused: true, + }, subscribe: true, }) ) @@ -182,7 +188,7 @@ describe('polling tests', () => { getPosts.initiate(3, { subscriptionOptions: { pollingInterval: 20, - skipPollOnFocusLost: false, + skipPollingIfUnfocused: false, }, subscribe: true, }) @@ -197,13 +203,13 @@ describe('polling tests', () => { expect(callsWithSkip).toBe(callsWithoutSkip + 1) }) - it('replaces skipPollOnFocusLost when the subscription options are updated', async () => { + it('replaces skipPollingIfUnfocused when the subscription options are updated', async () => { const { requestId, queryCacheKey, ...subscription } = storeRef.store.dispatch( getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10, - skipPollOnFocusLost: false, + skipPollingIfUnfocused: false, }, subscribe: true, }) @@ -213,15 +219,15 @@ describe('polling tests', () => { await delay(1) expect(Object.keys(getSubs())).toHaveLength(1) - expect(getSubs()[requestId].skipPollOnFocusLost).toBe(false) + expect(getSubs()[requestId].skipPollingIfUnfocused).toBe(false) subscription.updateSubscriptionOptions({ pollingInterval: 20, - skipPollOnFocusLost: true, + skipPollingIfUnfocused: true, }) await delay(1) expect(Object.keys(getSubs())).toHaveLength(1) - expect(getSubs()[requestId].skipPollOnFocusLost).toBe(true) + expect(getSubs()[requestId].skipPollingIfUnfocused).toBe(true) }) }) From f5b07fee734bb75288c64e1a4b8c14d005fa22a4 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Wed, 24 Jan 2024 10:12:55 +0000 Subject: [PATCH 273/368] bump RTK to 2.1.0 --- packages/toolkit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 9a3b6063e0..300a6aa96b 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@reduxjs/toolkit", - "version": "2.0.2", + "version": "2.1.0", "description": "The official, opinionated, batteries-included toolset for efficient Redux development", "author": "Mark Erikson ", "license": "MIT", From 325d5406f08c9e1c6104bf463e84f4b902f51940 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 02:11:33 -0600 Subject: [PATCH 274/368] Include `CustomMatchers.d.ts` in `tsconfig.test.json` --- packages/toolkit/tsconfig.test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/tsconfig.test.json b/packages/toolkit/tsconfig.test.json index f9c5f859aa..2bb74da6da 100644 --- a/packages/toolkit/tsconfig.test.json +++ b/packages/toolkit/tsconfig.test.json @@ -14,7 +14,7 @@ "src/**/*.test.ts*", "src/**/*.test-d.ts*", "src/**/*.spec.ts*", - "src/**/tests/*", + "src/**/tests/**/*", "src/**/*.typetest.ts*" ] } From 81c1ad741a18c66dca716ef7b65396786aafb926 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 04:18:50 -0600 Subject: [PATCH 275/368] Add global module augmentation for `namespace jest` - This changes was made because TypeScript 4.7 and 4.8 need an explicit global module augmentation for the `jest` namespace. --- packages/toolkit/src/tests/utils/CustomMatchers.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/toolkit/src/tests/utils/CustomMatchers.d.ts b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts index 129b82b453..46a58c74d0 100644 --- a/packages/toolkit/src/tests/utils/CustomMatchers.d.ts +++ b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts @@ -8,4 +8,10 @@ interface CustomMatchers { declare module "vitest" { interface Assertion extends CustomMatchers {} interface AsymmetricMatchersContaining extends CustomMatchers {} +} + +declare global { + namespace jest { + interface Matchers extends CustomMatchers {} + } } \ No newline at end of file From 7046ddc606107cca9ba32cc98d3ad8731b71a87a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 04:32:10 -0600 Subject: [PATCH 276/368] Remove `jscodeshift` from root `package.json`'s `resolutions` --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 4b42815687..38d507c014 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "@babel/types": "7.19.3", "esbuild": "0.19.7", "jest-snapshot": "29.3.1", - "jscodeshift": "0.13.1", "react-redux": "npm:8.0.2", "react": "npm:18.2.0", "react-dom": "npm:18.2.0", From 7daecc4c19c9310db602c43adf6daeffdb579faa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 05:03:28 -0600 Subject: [PATCH 277/368] Move `@typescript-eslint/parser` from `resolutions` to `devDependencies` --- package.json | 6 +- yarn.lock | 278 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 273 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 38d507c014..946436ebd5 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "examples/action-listener/*" ], "devDependencies": { + "@typescript-eslint/eslint-plugin": "6.12.0", + "@typescript-eslint/parser": "6.12.0", "eslint": "^7.25.0", "eslint-config-prettier": "^8.3.0", "eslint-config-react-app": "^7.0.1", @@ -64,9 +66,7 @@ "docs/@types/react-dom": "npm:17.0.11", "docs/@types/react": "npm:17.0.11", "type-fest": "2.19.0", - "console-testing-library@0.6.1": "patch:console-testing-library@npm%3A0.6.1#./.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch", - "@typescript-eslint/eslint-plugin": "6.12.0", - "@typescript-eslint/parser": "6.12.0" + "console-testing-library@0.6.1": "patch:console-testing-library@npm%3A0.6.1#./.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch" }, "scripts": { "build": "yarn build:packages", diff --git a/yarn.lock b/yarn.lock index 9557f923f7..2271638f69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5084,7 +5084,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b @@ -9086,6 +9086,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": + version: 7.5.6 + resolution: "@types/semver@npm:7.5.6" + checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 + languageName: node + linkType: hard + "@types/semver@npm:^7.3.9": version: 7.3.9 resolution: "@types/semver@npm:7.3.9" @@ -9093,13 +9100,6 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.5.0": - version: 7.5.6 - resolution: "@types/semver@npm:7.5.6" - checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 - languageName: node - linkType: hard - "@types/serve-index@npm:^1.9.1": version: 1.9.1 resolution: "@types/serve-index@npm:1.9.1" @@ -9295,6 +9295,55 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/eslint-plugin@npm:^5.5.0": + version: 5.62.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" + dependencies: + "@eslint-community/regexpp": ^4.4.0 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/type-utils": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.0 + natural-compare-lite: ^1.4.0 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependencies: + "@typescript-eslint/parser": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1 + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:^6": + version: 6.19.1 + resolution: "@typescript-eslint/eslint-plugin@npm:6.19.1" + dependencies: + "@eslint-community/regexpp": ^4.5.1 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/type-utils": 6.19.1 + "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 + debug: ^4.3.4 + graphemer: ^1.4.0 + ignore: ^5.2.4 + natural-compare: ^1.4.0 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependencies: + "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: ad04000cd6c15d864ff92655baa3aec99bb0ccf4714fedd145fedde60a27590a5feafe480beb2f0f3864b416098bde1e9431bada7480eb7ca4efad891e1d2f6f + languageName: node + linkType: hard + "@typescript-eslint/experimental-utils@npm:^5.0.0": version: 5.27.1 resolution: "@typescript-eslint/experimental-utils@npm:5.27.1" @@ -9324,6 +9373,41 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/parser@npm:^5.5.0": + version: 5.62.0 + resolution: "@typescript-eslint/parser@npm:5.62.0" + dependencies: + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + debug: ^4.3.4 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^6, @typescript-eslint/parser@npm:^6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/parser@npm:6.19.1" + dependencies: + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 + debug: ^4.3.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: cd29619da08a2d9b7123ba4d8240989c747f8e0d5672179d8b147e413ee1334d1fa48570b0c37cf0ae4e26a275fd2d268cbe702c6fed639d3331abbb3292570a + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:5.27.1": version: 5.27.1 resolution: "@typescript-eslint/scope-manager@npm:5.27.1" @@ -9334,6 +9418,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + checksum: 6062d6b797fe1ce4d275bb0d17204c827494af59b5eaf09d8a78cdd39dadddb31074dded4297aaf5d0f839016d601032857698b0e4516c86a41207de606e9573 + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/scope-manager@npm:6.12.0" @@ -9344,6 +9438,33 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/scope-manager@npm:6.19.1" + dependencies: + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 + checksum: 848cdebc16a3803e8a6d6035a7067605309a652bb2425f475f755b5ace4d80d2c17c8c8901f0f4759556da8d0a5b71024d472b85c3f3c70d0e6dcfe2a972ef35 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/type-utils@npm:5.62.0" + dependencies: + "@typescript-eslint/typescript-estree": 5.62.0 + "@typescript-eslint/utils": 5.62.0 + debug: ^4.3.4 + tsutils: ^3.21.0 + peerDependencies: + eslint: "*" + peerDependenciesMeta: + typescript: + optional: true + checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739 + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/type-utils@npm:6.12.0" @@ -9361,6 +9482,23 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/type-utils@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/type-utils@npm:6.19.1" + dependencies: + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/utils": 6.19.1 + debug: ^4.3.4 + ts-api-utils: ^1.0.1 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: eab1a30f8d85f7c6e2545de5963fbec2f3bb91913d59623069b4b0db372a671ab048c7018376fc853c3af06ea39417f3e7b27dd665027dd812347a5e64cecd77 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:5.27.1": version: 5.27.1 resolution: "@typescript-eslint/types@npm:5.27.1" @@ -9368,6 +9506,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 48c87117383d1864766486f24de34086155532b070f6264e09d0e6139449270f8a9559cfef3c56d16e3bcfb52d83d42105d61b36743626399c7c2b5e0ac3b670 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/types@npm:6.12.0" @@ -9375,6 +9520,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/types@npm:6.19.1" + checksum: 598ce222b59c20432d06f60703d0c2dd16d9b2151569c192852136c57b8188e3ef6ef9fddaa2c136c9a756fcc7d873c0e29ec41cfd340564842287ef7b4571cd + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.27.1": version: 5.27.1 resolution: "@typescript-eslint/typescript-estree@npm:5.27.1" @@ -9393,6 +9545,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 3624520abb5807ed8f57b1197e61c7b1ed770c56dfcaca66372d584ff50175225798bccb701f7ef129d62c5989070e1ee3a0aa2d84e56d9524dcf011a2bb1a52 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/typescript-estree@npm:6.12.0" @@ -9411,6 +9581,25 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/typescript-estree@npm:6.19.1" + dependencies: + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + minimatch: 9.0.3 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependenciesMeta: + typescript: + optional: true + checksum: fb71a14aeee0468780219c5b8d39075f85d360b04ccd0ee88f4f0a615d2c232a6d3016e36d8c6eda2d9dfda86b4f4cc2c3d7582940fb29d33c7cf305e124d4e2 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.27.1, @typescript-eslint/utils@npm:^5.13.0": version: 5.27.1 resolution: "@typescript-eslint/utils@npm:5.27.1" @@ -9427,6 +9616,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + eslint-scope: ^5.1.1 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/utils@npm:6.12.0" @@ -9444,6 +9651,23 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/utils@npm:6.19.1" + dependencies: + "@eslint-community/eslint-utils": ^4.4.0 + "@types/json-schema": ^7.0.12 + "@types/semver": ^7.5.0 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + semver: ^7.5.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: fe72e75c3ea17a85772b83f148555ea94ff5d55d13586f3fc038833197a74f8071e14c2bbf1781c40eec20005f052f4be2513a725eea82a15da3cb9af3046c70 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.27.1": version: 5.27.1 resolution: "@typescript-eslint/visitor-keys@npm:5.27.1" @@ -9454,6 +9678,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + eslint-visitor-keys: ^3.3.0 + checksum: 976b05d103fe8335bef5c93ad3f76d781e3ce50329c0243ee0f00c0fcfb186c81df50e64bfdd34970148113f8ade90887f53e3c4938183afba830b4ba8e30a35 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:6.12.0": version: 6.12.0 resolution: "@typescript-eslint/visitor-keys@npm:6.12.0" @@ -9464,6 +9698,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:6.19.1": + version: 6.19.1 + resolution: "@typescript-eslint/visitor-keys@npm:6.19.1" + dependencies: + "@typescript-eslint/types": 6.19.1 + eslint-visitor-keys: ^3.4.1 + checksum: bdf057a42e776970a89cdd568e493e3ea7ec085544d8f318d33084da63c3395ad2c0fb9cef9f61ceeca41f5dab54ab064b7078fe596889005e412ec74d2d1ae4 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -21977,6 +22221,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"minimatch@npm:9.0.3": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + "minimatch@npm:^5.0.1": version: 5.1.0 resolution: "minimatch@npm:5.1.0" @@ -22368,6 +22621,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"natural-compare-lite@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare-lite@npm:1.4.0" + checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -27246,6 +27506,8 @@ fsevents@^1.2.7: version: 0.0.0-use.local resolution: "rtk-monorepo@workspace:." dependencies: + "@typescript-eslint/eslint-plugin": 6.12.0 + "@typescript-eslint/parser": 6.12.0 eslint: ^7.25.0 eslint-config-prettier: ^8.3.0 eslint-config-react-app: ^7.0.1 From d9fb5b6647a564e9dae08cd66d8742bd7d60abaf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 06:51:14 -0600 Subject: [PATCH 278/368] Remove some `@ts-ignore`s --- packages/toolkit/src/query/react/buildHooks.ts | 1 - packages/toolkit/src/query/react/index.ts | 1 - packages/toolkit/src/query/react/module.ts | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 74efc3111c..e0c0beb82e 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -1032,7 +1032,6 @@ export function buildHooks({ [selectFromResult, selectDefaultResult] ) - // @ts-ignore const currentState = useSelector(mutationSelector, shallowEqual) const originalArgs = fixedCacheKey == null ? promise?.arg.originalArgs : undefined diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index cde9075253..437fc4287c 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -10,7 +10,6 @@ export { ApiProvider } from './ApiProvider' const createApi = /* @__PURE__ */ buildCreateApi( coreModule(), - // @ts-ignore reactHooksModule() ) diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 1e7fafe80f..1e64271e29 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -148,8 +148,7 @@ export const reactHooksModule = ({ createSelector = _createSelector, unstable__sideEffectsInRender = false, ...rest -}: // @ts-ignore -ReactHooksModuleOptions = {}): Module => { +}: ReactHooksModuleOptions = {}): Module => { if (process.env.NODE_ENV !== 'production') { const hookNames = ['useDispatch', 'useSelector', 'useStore'] as const let warned = false From 288b5e7e5e3cbd0aff388d600c4d4f2e08b80f08 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Thu, 25 Jan 2024 13:35:59 +0000 Subject: [PATCH 279/368] rm ts-ignore with strategic anys --- packages/toolkit/src/query/react/buildHooks.ts | 3 +-- packages/toolkit/src/query/react/module.ts | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index e0c0beb82e..5a524719cf 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -992,7 +992,6 @@ export function buildHooks({ } function buildMutationHook(name: string): UseMutation { - // @ts-ignore return ({ selectFromResult, fixedCacheKey } = {}) => { const { select, initiate } = api.endpoints[name] as ApiEndpointMutation< MutationDefinition, @@ -1025,7 +1024,7 @@ export function buildHooks({ [fixedCacheKey, promise, select] ) const mutationSelector = useMemo( - () => + (): Selector, any> => selectFromResult ? createSelector([selectDefaultResult], selectFromResult) : selectDefaultResult, diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 1e64271e29..f4b41e9eac 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -184,13 +184,13 @@ export const reactHooksModule = ({ return { name: reactHooksModuleName, init(api, { serializeQueryArgs }, context) { - const anyApi = api as Api< + const anyApi = api as any as Api< any, - EndpointDefinitions, + Record, string, string, - any - > & { endpoints: any } + ReactHooksModule + > const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({ api, moduleOptions: { @@ -201,7 +201,7 @@ export const reactHooksModule = ({ }, serializeQueryArgs, context, - } as any) + }) safeAssign(anyApi, { usePrefetch }) safeAssign(context, { batch }) From 2b9b4dc413a75cb18a1257103ec4111e967b6d08 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 07:41:31 -0600 Subject: [PATCH 280/368] Fix RTKQ type issue --- packages/toolkit/src/query/apiTypes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/apiTypes.ts b/packages/toolkit/src/query/apiTypes.ts index 2aa7992999..7065455bf0 100644 --- a/packages/toolkit/src/query/apiTypes.ts +++ b/packages/toolkit/src/query/apiTypes.ts @@ -28,7 +28,7 @@ export interface ApiModules< export type ModuleName = keyof ApiModules -export type Module = { +export type Module = { name: Name init< BaseQuery extends BaseQueryFn, From e25222d033c934cdb9ec7d61e298d18f411de90d Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Thu, 25 Jan 2024 14:24:40 +0000 Subject: [PATCH 281/368] fix it for real this time, probably --- packages/toolkit/src/query/apiTypes.ts | 2 +- packages/toolkit/src/query/react/module.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/query/apiTypes.ts b/packages/toolkit/src/query/apiTypes.ts index 7065455bf0..2aa7992999 100644 --- a/packages/toolkit/src/query/apiTypes.ts +++ b/packages/toolkit/src/query/apiTypes.ts @@ -28,7 +28,7 @@ export interface ApiModules< export type ModuleName = keyof ApiModules -export type Module = { +export type Module = { name: Name init< BaseQuery extends BaseQueryFn, diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index f4b41e9eac..f6e46b120f 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -4,8 +4,9 @@ import type { MutationDefinition, QueryArgFrom, QueryDefinition, + Api, + Module, } from '@reduxjs/toolkit/query' -import type { Api, Module } from '../apiTypes' import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions' import { safeAssign } from '../tsHelpers' import { capitalize } from '../utils' @@ -187,8 +188,8 @@ export const reactHooksModule = ({ const anyApi = api as any as Api< any, Record, - string, - string, + any, + any, ReactHooksModule > const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({ From bb31056dba17d40f542d0a5746a9885e42fe6957 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 08:31:03 -0600 Subject: [PATCH 282/368] Fix RTKQ import path alias import issue --- packages/toolkit/src/query/react/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index f4b41e9eac..ce7e70464a 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -5,7 +5,7 @@ import type { QueryArgFrom, QueryDefinition, } from '@reduxjs/toolkit/query' -import type { Api, Module } from '../apiTypes' +import type { Api, Module } from '@reduxjs/toolkit/query' import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions' import { safeAssign } from '../tsHelpers' import { capitalize } from '../utils' From 6b80fddfb69c4a732073521b584c44823d157424 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 25 Jan 2024 08:32:13 -0600 Subject: [PATCH 283/368] Remove duplicates --- packages/toolkit/src/query/react/module.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 8063ca3da5..68bcddb253 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -1,13 +1,12 @@ import type { + Api, BaseQueryFn, EndpointDefinitions, + Module, MutationDefinition, QueryArgFrom, QueryDefinition, - Api, - Module, } from '@reduxjs/toolkit/query' -import type { Api, Module } from '@reduxjs/toolkit/query' import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions' import { safeAssign } from '../tsHelpers' import { capitalize } from '../utils' From 5fc787155888de81372ed2163c53d6aea1bd7f1d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 08:31:21 -0600 Subject: [PATCH 284/368] Revert "Update all `README`s" This reverts commit 27fe9075f3f90f7d0fadf4d41fa2e9cbec248510. --- .../transforms/createReducerBuilder/README.md | 212 ++------- .../transforms/createSliceBuilder/README.md | 429 +++--------------- .../createSliceReducerBuilder/README.md | 204 +-------- 3 files changed, 109 insertions(+), 736 deletions(-) diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/README.md b/packages/rtk-codemods/transforms/createReducerBuilder/README.md index a50d10d582..52898146e9 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/README.md +++ b/packages/rtk-codemods/transforms/createReducerBuilder/README.md @@ -31,159 +31,38 @@ node ./bin/cli.js createReducerBuilder path/of/files/ or/some**/*glob.js ## ---- - **basic-ts** **Input** ([basic-ts.input.ts](transforms\createReducerBuilder__testfixtures__\basic-ts.input.ts)): ```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -export type TodoSliceState = typeof todoInitialState - -const { addOne } = todoAdapter - -createReducer(todoInitialState, { - [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { +createReducer(initialState, { + [todoAdded]: (state: SliceState, action: PayloadAction) => { // stuff }, - [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => - action.payload, - [todoAdded1c + 'test']: ( - state: TodoSliceState, - action: PayloadAction - ) => { - // stuff - }, - [todoAdded1d](state: TodoSliceState, action: PayloadAction) { - // stuff - }, - [todoAdded1e]: function ( - state: TodoSliceState, - action: PayloadAction - ) { - // stuff - }, - todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { - //stuff - }, - [todoAdded1g]: addOne, - todoAdded1h: todoAdapter.addOne -}) +}); -createReducer(todoInitialState, { - [todoAdded2a]: (state: TodoSliceState, action: PayloadAction) => { +createReducer(initialState, { + [todoAdded](state: SliceState, action: PayloadAction) { // stuff }, - [todoAdded2b](state: TodoSliceState, action: PayloadAction) { - // stuff - }, - [todoAdded2c]: function ( - state: TodoSliceState, - action: PayloadAction - ) { - // stuff - } -}) +}); ``` **Output** ([basic-ts.output.ts](transforms\createReducerBuilder__testfixtures__\basic-ts.output.ts)): ```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -export type TodoSliceState = typeof todoInitialState - -const { addOne } = todoAdapter - -createReducer(todoInitialState, (builder) => { - builder.addCase( - todoAdded1a, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1b, - (state: TodoSliceState, action: PayloadAction) => action.payload - ) - - builder.addCase( - todoAdded1c + 'test', - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1d, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1e, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1f, - (state: TodoSliceState, action: PayloadAction) => { - //stuff - } - ) - - builder.addCase(todoAdded1g, addOne) - builder.addCase(todoAdded1h, todoAdapter.addOne) -}) - -createReducer(todoInitialState, (builder) => { - builder.addCase( - todoAdded2a, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded2b, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded2c, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) -}) +createReducer(initialState, (builder) => { + builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { + // stuff + }); +}); + +createReducer(initialState, (builder) => { + builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { + // stuff + }); +}); ``` --- @@ -193,15 +72,7 @@ createReducer(todoInitialState, (builder) => { **Input** ([basic.input.js](transforms\createReducerBuilder__testfixtures__\basic.input.js)): ```js -import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -const { addOne } = todoAdapter - -createReducer(todoInitialState, { +createReducer(initialState, { [todoAdded1a]: (state, action) => { // stuff }, @@ -218,11 +89,9 @@ createReducer(todoInitialState, { todoAdded1f: (state, action) => { //stuff }, - [todoAdded1g]: addOne, - todoAdded1h: todoAdapter.addOne -}) +}); -createReducer(todoInitialState, { +createReducer(initialState, { [todoAdded2a]: (state, action) => { // stuff }, @@ -231,61 +100,50 @@ createReducer(todoInitialState, { }, [todoAdded2c]: function (state, action) { // stuff - } -}) + }, +}); ``` **Output** ([basic.output.js](transforms\createReducerBuilder__testfixtures__\basic.output.js)): ```js -import { createEntityAdapter, createReducer } from '@reduxjs/toolkit' - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -const { addOne } = todoAdapter - -createReducer(todoInitialState, (builder) => { +createReducer(initialState, (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff - }) + }); - builder.addCase(todoAdded1b, (state, action) => action.payload) + builder.addCase(todoAdded1b, (state, action) => action.payload); builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1d, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1e, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1f, (state, action) => { //stuff - }) - - builder.addCase(todoAdded1g, addOne) - builder.addCase(todoAdded1h, todoAdapter.addOne) -}) + }); +}); -createReducer(todoInitialState, (builder) => { +createReducer(initialState, (builder) => { builder.addCase(todoAdded2a, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded2b, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded2c, (state, action) => { // stuff - }) -}) + }); +}); ``` diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/README.md b/packages/rtk-codemods/transforms/createSliceBuilder/README.md index 725d80a4fa..5a15c86682 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/README.md +++ b/packages/rtk-codemods/transforms/createSliceBuilder/README.md @@ -31,254 +31,56 @@ node ./bin/cli.js createSliceBuilder path/of/files/ or/some**/*glob.js ## ---- - **basic-ts** **Input** ([basic-ts.input.ts](transforms\createSliceBuilder__testfixtures__\basic-ts.input.ts)): ```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { - createAsyncThunk, - createEntityAdapter, - createSlice -} from '@reduxjs/toolkit' - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -export type TodoSliceState = typeof todoInitialState - -const fetchCount = (amount = 1) => { - return new Promise<{ data: number }>((resolve) => - setTimeout(() => resolve({ data: amount }), 500) - ) -} - -export const incrementAsync = createAsyncThunk( - 'counter/fetchCount', - async (amount: number) => { - const response = await fetchCount(amount) - return response.data - } -) - -const { addOne } = todoAdapter - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoInitialState, - reducers: { - deleteTodo: todoAdapter.removeOne - }, +const slice1 = createSlice({ + name: 'a', + initialState, extraReducers: { - [incrementAsync.pending]: ( - state: TodoSliceState, - action: PayloadAction - ) => { + [todoAdded]: (state: SliceState, action: PayloadAction) => { // stuff }, - [incrementAsync.rejected]: todoAdapter.removeAll, - [incrementAsync.fulfilled]( - state: TodoSliceState, - action: PayloadAction - ) { - // stuff - }, - todoAdded: todoAdapter.addOne, + }, +}); - [todoAdded1a]: (state: TodoSliceState, action: PayloadAction) => { - // stuff - }, - [todoAdded1b]: (state: TodoSliceState, action: PayloadAction) => - action.payload, - [todoAdded1c + 'test']: ( - state: TodoSliceState, - action: PayloadAction - ) => { - // stuff - }, - [todoAdded1d](state: TodoSliceState, action: PayloadAction) { - // stuff - }, - [todoAdded1e]: function ( - state: TodoSliceState, - action: PayloadAction - ) { - // stuff - }, - todoAdded1f: (state: TodoSliceState, action: PayloadAction) => { - //stuff - }, - [todoAdded1g]: addOne, - todoAdded1h: todoAdapter.addOne - } -}) - -export const { deleteTodo } = todoSlice.actions - -export interface CounterSliceState { - value: number - status: 'idle' | 'loading' | 'failed' -} - -const counterInitialState: CounterSliceState = { - value: 0, - status: 'idle' -} - -const counterSlice = createSlice({ - name: 'counter', - initialState: counterInitialState, +const slice2 = createSlice({ + name: 'b', + initialState, extraReducers: { - [deleteTodo](state: CounterSliceState, action: PayloadAction) { + [todoAdded](state: SliceState, action: PayloadAction) { // stuff - } - } -}) + }, + }, +}); ``` **Output** ([basic-ts.output.ts](transforms\createSliceBuilder__testfixtures__\basic-ts.output.ts)): ```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { - createAsyncThunk, - createEntityAdapter, - createSlice -} from '@reduxjs/toolkit' - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -export type TodoSliceState = typeof todoInitialState - -const fetchCount = (amount = 1) => { - return new Promise<{ data: number }>((resolve) => - setTimeout(() => resolve({ data: amount }), 500) - ) -} - -export const incrementAsync = createAsyncThunk( - 'counter/fetchCount', - async (amount: number) => { - const response = await fetchCount(amount) - return response.data - } -) - -const { addOne } = todoAdapter - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoInitialState, - - reducers: { - deleteTodo: todoAdapter.removeOne - }, +const slice1 = createSlice({ + name: 'a', + initialState, extraReducers: (builder) => { - builder.addCase( - incrementAsync.pending, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase(incrementAsync.rejected, todoAdapter.removeAll) - - builder.addCase( - incrementAsync.fulfilled, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase(todoAdded, todoAdapter.addOne) - - builder.addCase( - todoAdded1a, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1b, - (state: TodoSliceState, action: PayloadAction) => action.payload - ) - - builder.addCase( - todoAdded1c + 'test', - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1d, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1e, - (state: TodoSliceState, action: PayloadAction) => { - // stuff - } - ) - - builder.addCase( - todoAdded1f, - (state: TodoSliceState, action: PayloadAction) => { - //stuff - } - ) - - builder.addCase(todoAdded1g, addOne) - builder.addCase(todoAdded1h, todoAdapter.addOne) - } -}) - -export const { deleteTodo } = todoSlice.actions - -export interface CounterSliceState { - value: number - status: 'idle' | 'loading' | 'failed' -} - -const counterInitialState: CounterSliceState = { - value: 0, - status: 'idle' -} - -const counterSlice = createSlice({ - name: 'counter', - initialState: counterInitialState, + builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { + // stuff + }); + }, +}); + +const slice2 = createSlice({ + name: 'b', + initialState, extraReducers: (builder) => { - builder.addCase( - deleteTodo, - (state: CounterSliceState, action: PayloadAction) => { - // stuff - } - ) - } -}) + builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { + // stuff + }); + }, +}); ``` --- @@ -288,48 +90,10 @@ const counterSlice = createSlice({ **Input** ([basic.input.js](transforms\createSliceBuilder__testfixtures__\basic.input.js)): ```js -import { - createAsyncThunk, - createEntityAdapter, - createSlice -} from '@reduxjs/toolkit' - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -const fetchCount = (amount = 1) => { - return new Promise((resolve) => - setTimeout(() => resolve({ data: amount }), 500) - ) -} - -export const incrementAsync = createAsyncThunk( - 'counter/fetchCount', - async (amount) => { - const response = await fetchCount(amount) - return response.data - } -) - -const { addOne } = todoAdapter - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoInitialState, - reducers: { - deleteTodo: todoAdapter.removeOne - }, +const slice1 = createSlice({ + name: 'a', + initialState: {}, extraReducers: { - [incrementAsync.pending]: (state, action) => { - // stuff - }, - [incrementAsync.rejected]: todoAdapter.removeAll, - [incrementAsync.fulfilled](state, action) { - // stuff - }, - todoAdded: todoAdapter.addOne, - [todoAdded1a]: (state, action) => { // stuff }, @@ -346,123 +110,76 @@ const todoSlice = createSlice({ todoAdded1f: (state, action) => { //stuff }, - [todoAdded1g]: addOne, - todoAdded1h: todoAdapter.addOne - } -}) - -export const { deleteTodo } = todoSlice.actions - -const counterInitialState = { - value: 0, - status: 'idle' -} + }, +}); -const counterSlice = createSlice({ - name: 'counter', - initialState: counterInitialState, +const slice2 = createSlice({ + name: 'b', + initialState: {}, extraReducers: { - [deleteTodo](state, action) { + [todoAdded2a]: (state, action) => { // stuff - } - } -}) + }, + [todoAdded2b](state, action) { + // stuff + }, + [todoAdded2c]: function (state, action) { + // stuff + }, + }, +}); ``` **Output** ([basic.output.js](transforms\createSliceBuilder__testfixtures__\basic.output.js)): ```js -import { - createAsyncThunk, - createEntityAdapter, - createSlice -} from '@reduxjs/toolkit' - -export const todoAdapter = createEntityAdapter() - -const todoInitialState = todoAdapter.getInitialState() - -const fetchCount = (amount = 1) => { - return new Promise((resolve) => - setTimeout(() => resolve({ data: amount }), 500) - ) -} - -export const incrementAsync = createAsyncThunk( - 'counter/fetchCount', - async (amount) => { - const response = await fetchCount(amount) - return response.data - } -) - -const { addOne } = todoAdapter - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoInitialState, - - reducers: { - deleteTodo: todoAdapter.removeOne - }, +const slice1 = createSlice({ + name: 'a', + initialState: {}, extraReducers: (builder) => { - builder.addCase(incrementAsync.pending, (state, action) => { - // stuff - }) - - builder.addCase(incrementAsync.rejected, todoAdapter.removeAll) - - builder.addCase(incrementAsync.fulfilled, (state, action) => { - // stuff - }) - - builder.addCase(todoAdded, todoAdapter.addOne) - builder.addCase(todoAdded1a, (state, action) => { // stuff - }) + }); - builder.addCase(todoAdded1b, (state, action) => action.payload) + builder.addCase(todoAdded1b, (state, action) => action.payload); builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1d, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1e, (state, action) => { // stuff - }) + }); builder.addCase(todoAdded1f, (state, action) => { //stuff - }) - - builder.addCase(todoAdded1g, addOne) - builder.addCase(todoAdded1h, todoAdapter.addOne) - } -}) + }); + }, +}); -export const { deleteTodo } = todoSlice.actions +const slice2 = createSlice({ + name: 'b', + initialState: {}, -const counterInitialState = { - value: 0, - status: 'idle' -} + extraReducers: (builder) => { + builder.addCase(todoAdded2a, (state, action) => { + // stuff + }); -const counterSlice = createSlice({ - name: 'counter', - initialState: counterInitialState, + builder.addCase(todoAdded2b, (state, action) => { + // stuff + }); - extraReducers: (builder) => { - builder.addCase(deleteTodo, (state, action) => { + builder.addCase(todoAdded2c, (state, action) => { // stuff - }) - } -}) + }); + }, +}); ``` diff --git a/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md b/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md index f6a959db00..cafb0c9d48 100644 --- a/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md +++ b/packages/rtk-codemods/transforms/createSliceReducerBuilder/README.md @@ -26,209 +26,7 @@ node ./bin/cli.js createSliceReducerBuilder path/of/files/ or/some**/*glob.js ## Input / Output - -- [basic-ts](#basic-ts) -- [basic](#basic) -## - -**basic-ts** - -**Input** ([basic-ts.input.ts](transforms\createSliceReducerBuilder__testfixtures__\basic-ts.input.ts)): - -```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' - -function withPayload(): any { - throw new Error('Function not implemented.') -} - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoAdapter.getInitialState(), - reducers: { - property: () => {}, - method(state, action: PayloadAction) { - todoAdapter.addOne(state, action) - }, - identifier: todoAdapter.removeOne, - preparedProperty: { - prepare: (todo: Omit) => ({ - payload: { id: nanoid(), ...todo } - }), - reducer: () => {} - }, - preparedMethod: { - prepare(todo: Omit) { - return { payload: { id: nanoid(), ...todo } } - }, - reducer(state, action: PayloadAction) { - todoAdapter.addOne(state, action) - } - }, - preparedIdentifier: { - prepare: withPayload(), - reducer: todoAdapter.setMany - } - } -}) -``` - -**Output** ([basic-ts.output.ts](transforms\createSliceReducerBuilder__testfixtures__\basic-ts.output.ts)): - -```ts -import type { PayloadAction } from '@reduxjs/toolkit' -import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' - -function withPayload(): any { - throw new Error('Function not implemented.') -} - -export interface Todo { - id: string - title: string -} - -export const todoAdapter = createEntityAdapter() - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoAdapter.getInitialState(), - - reducers: (create) => ({ - property: create.reducer(() => {}), - - method: create.reducer((state, action: PayloadAction) => { - todoAdapter.addOne(state, action) - }), - - identifier: create.reducer(todoAdapter.removeOne), - - preparedProperty: create.preparedReducer( - (todo: Omit) => ({ - payload: { id: nanoid(), ...todo } - }), - () => {} - ), - - preparedMethod: create.preparedReducer( - (todo: Omit) => { - return { payload: { id: nanoid(), ...todo } } - }, - (state, action: PayloadAction) => { - todoAdapter.addOne(state, action) - } - ), - - preparedIdentifier: create.preparedReducer( - withPayload(), - todoAdapter.setMany - ) - }) -}) -``` - ---- - -**basic** - -**Input** ([basic.input.js](transforms\createSliceReducerBuilder__testfixtures__\basic.input.js)): - -```js -import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' - -function withPayload() { - throw new Error('Function not implemented.') -} - -export const todoAdapter = createEntityAdapter() - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoAdapter.getInitialState(), - reducers: { - property: () => {}, - method(state, action) { - todoAdapter.addOne(state, action) - }, - identifier: todoAdapter.removeOne, - preparedProperty: { - prepare: (todo) => ({ - payload: { id: nanoid(), ...todo } - }), - reducer: () => {} - }, - preparedMethod: { - prepare(todo) { - return { payload: { id: nanoid(), ...todo } } - }, - reducer(state, action) { - todoAdapter.addOne(state, action) - } - }, - preparedIdentifier: { - prepare: withPayload(), - reducer: todoAdapter.setMany - } - } -}) -``` - -**Output** ([basic.output.js](transforms\createSliceReducerBuilder__testfixtures__\basic.output.js)): - -```js -import { createEntityAdapter, createSlice, nanoid } from '@reduxjs/toolkit' - -function withPayload() { - throw new Error('Function not implemented.') -} - -export const todoAdapter = createEntityAdapter() - -const todoSlice = createSlice({ - name: 'todo', - initialState: todoAdapter.getInitialState(), - - reducers: (create) => ({ - property: create.reducer(() => {}), - - method: create.reducer((state, action) => { - todoAdapter.addOne(state, action) - }), - - identifier: create.reducer(todoAdapter.removeOne), - - preparedProperty: create.preparedReducer( - (todo) => ({ - payload: { id: nanoid(), ...todo } - }), - () => {} - ), - - preparedMethod: create.preparedReducer( - (todo) => { - return { payload: { id: nanoid(), ...todo } } - }, - (state, action) => { - todoAdapter.addOne(state, action) - } - ), - - preparedIdentifier: create.preparedReducer( - withPayload(), - todoAdapter.setMany - ) - }) -}) -``` - + From 30ccbcef25a362a82225f87ab7432cb6077efc72 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 10:53:32 -0600 Subject: [PATCH 285/368] Bump prettier and prettier related packages --- package.json | 6 +-- packages/toolkit/package.json | 6 +-- yarn.lock | 76 ++++++++++++++++++++++++++++++++--- 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 4b42815687..bebb9a8ca1 100644 --- a/package.json +++ b/package.json @@ -24,16 +24,16 @@ ], "devDependencies": { "eslint": "^7.25.0", - "eslint-config-prettier": "^8.3.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-react-app": "^7.0.1", "eslint-plugin-flowtype": "^5.7.2", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", "netlify-plugin-cache": "^1.0.3", - "prettier": "^2.2.1", + "prettier": "^3.2.4", "release-it": "^14.12.5", "serve": "^14.2.0", "typescript": "^5.2.2" diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index d26f303770..b7bd2d4661 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -68,12 +68,12 @@ "console-testing-library": "0.6.1", "esbuild-extra": "^0.3.1", "eslint": "^7.25.0", - "eslint-config-prettier": "^8.3.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-react-app": "^7.0.1", "eslint-plugin-flowtype": "^5.7.2", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", "fs-extra": "^9.1.0", @@ -82,7 +82,7 @@ "json-stringify-safe": "^5.0.1", "msw": "^2.1.4", "node-fetch": "^3.3.2", - "prettier": "^2.2.1", + "prettier": "^3.2.4", "query-string": "^7.0.1", "rimraf": "^3.0.2", "size-limit": "^4.11.0", diff --git a/yarn.lock b/yarn.lock index 2d2c863000..18458d571b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6974,6 +6974,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.1.0": + version: 0.1.1 + resolution: "@pkgr/core@npm:0.1.1" + checksum: 6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba + languageName: node + linkType: hard + "@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": version: 0.5.7 resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.7" @@ -7122,12 +7129,12 @@ __metadata: console-testing-library: 0.6.1 esbuild-extra: ^0.3.1 eslint: ^7.25.0 - eslint-config-prettier: ^8.3.0 + eslint-config-prettier: ^9.1.0 eslint-config-react-app: ^7.0.1 eslint-plugin-flowtype: ^5.7.2 eslint-plugin-import: ^2.22.1 eslint-plugin-jsx-a11y: ^6.4.1 - eslint-plugin-prettier: ^3.4.0 + eslint-plugin-prettier: ^5.1.3 eslint-plugin-react: ^7.23.2 eslint-plugin-react-hooks: ^4.2.0 fs-extra: ^9.1.0 @@ -7137,7 +7144,7 @@ __metadata: json-stringify-safe: ^5.0.1 msw: ^2.1.4 node-fetch: ^3.3.2 - prettier: ^2.2.1 + prettier: ^3.2.4 query-string: ^7.0.1 redux: ^5.0.1 redux-thunk: ^3.1.0 @@ -14907,6 +14914,17 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^9.1.0": + version: 9.1.0 + resolution: "eslint-config-prettier@npm:9.1.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907 + languageName: node + linkType: hard + "eslint-config-react-app@npm:^7.0.1": version: 7.0.1 resolution: "eslint-config-react-app@npm:7.0.1" @@ -15082,6 +15100,26 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-prettier@npm:^5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" + dependencies: + prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.6 + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: "*" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.2.0, eslint-plugin-react-hooks@npm:^4.3.0": version: 4.5.0 resolution: "eslint-plugin-react-hooks@npm:4.5.0" @@ -24727,6 +24765,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" + bin: + prettier: bin/prettier.cjs + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 + languageName: node + linkType: hard + "pretty-bytes@npm:^3.0.0": version: 3.0.1 resolution: "pretty-bytes@npm:3.0.1" @@ -26734,16 +26781,16 @@ fsevents@^1.2.7: resolution: "rtk-monorepo@workspace:." dependencies: eslint: ^7.25.0 - eslint-config-prettier: ^8.3.0 + eslint-config-prettier: ^9.1.0 eslint-config-react-app: ^7.0.1 eslint-plugin-flowtype: ^5.7.2 eslint-plugin-import: ^2.22.1 eslint-plugin-jsx-a11y: ^6.4.1 - eslint-plugin-prettier: ^3.4.0 + eslint-plugin-prettier: ^5.1.3 eslint-plugin-react: ^7.23.2 eslint-plugin-react-hooks: ^4.2.0 netlify-plugin-cache: ^1.0.3 - prettier: ^2.2.1 + prettier: ^3.2.4 release-it: ^14.12.5 serve: ^14.2.0 typescript: ^5.2.2 @@ -28636,6 +28683,16 @@ fsevents@^1.2.7: languageName: node linkType: hard +"synckit@npm:^0.8.6": + version: 0.8.8 + resolution: "synckit@npm:0.8.8" + dependencies: + "@pkgr/core": ^0.1.0 + tslib: ^2.6.2 + checksum: 9ed5d33abb785f5f24e2531efd53b2782ca77abf7912f734d170134552b99001915531be5a50297aa45c5701b5c9041e8762e6cd7a38e41e2461c1e7fccdedf8 + languageName: node + linkType: hard + "table@npm:^6.0.9": version: 6.7.1 resolution: "table@npm:6.7.1" @@ -29405,6 +29462,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + "tslib@npm:~2.0.1": version: 2.0.3 resolution: "tslib@npm:2.0.3" From 78bd2dc33a74a90ab09d146c485c629f076ff4b1 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 14:28:59 -0600 Subject: [PATCH 286/368] Bump Prettier for other packages that depended on it --- examples/publish-ci/cra4/package.json | 2 +- examples/publish-ci/cra4/yarn.lock | 12 ++++++------ examples/publish-ci/cra5/package.json | 2 +- examples/publish-ci/cra5/yarn.lock | 12 ++++++------ examples/publish-ci/expo/package.json | 2 +- examples/publish-ci/expo/yarn.lock | 10 +++++----- examples/publish-ci/next/package.json | 2 +- examples/publish-ci/next/yarn.lock | 12 ++++++------ examples/publish-ci/react-native/package.json | 2 +- examples/publish-ci/react-native/yarn.lock | 10 +++++----- examples/publish-ci/vite/package.json | 2 +- examples/publish-ci/vite/yarn.lock | 12 ++++++------ packages/rtk-query-codegen-openapi/package.json | 2 +- website/package.json | 3 ++- yarn.lock | 3 ++- 15 files changed, 45 insertions(+), 43 deletions(-) diff --git a/examples/publish-ci/cra4/package.json b/examples/publish-ci/cra4/package.json index 7f2bae85e9..76fbf193d1 100644 --- a/examples/publish-ci/cra4/package.json +++ b/examples/publish-ci/cra4/package.json @@ -50,7 +50,7 @@ "@types/react": "^18.0.26", "@types/react-dom": "^18.0.10", "playwright": "^1.31.1", - "prettier": "^2.8.4", + "prettier": "^3.2.4", "serve": "^14.2.0", "typescript": "^4.9.4" } diff --git a/examples/publish-ci/cra4/yarn.lock b/examples/publish-ci/cra4/yarn.lock index 3fc20d3f5f..dec5e5b77a 100644 --- a/examples/publish-ci/cra4/yarn.lock +++ b/examples/publish-ci/cra4/yarn.lock @@ -12795,12 +12795,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.8.4": - version: 2.8.4 - resolution: "prettier@npm:2.8.4" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: - prettier: bin-prettier.js - checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e + prettier: bin/prettier.cjs + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -13960,7 +13960,7 @@ __metadata: "@types/react-dom": ^18.0.10 msw: ^1.3.2 playwright: ^1.31.1 - prettier: ^2.8.4 + prettier: ^3.2.4 react: ^18.2.0 react-dom: ^18.2.0 react-redux: ^9.0.0-rc.0 diff --git a/examples/publish-ci/cra5/package.json b/examples/publish-ci/cra5/package.json index 466ef7279f..ab7b5b3b02 100644 --- a/examples/publish-ci/cra5/package.json +++ b/examples/publish-ci/cra5/package.json @@ -50,7 +50,7 @@ "@types/react": "^18.0.26", "@types/react-dom": "^18.0.10", "playwright": "^1.31.1", - "prettier": "^2.8.4", + "prettier": "^3.2.4", "serve": "^14.2.0", "typescript": "^4.9.4" } diff --git a/examples/publish-ci/cra5/yarn.lock b/examples/publish-ci/cra5/yarn.lock index dde65c30be..ba777023c4 100644 --- a/examples/publish-ci/cra5/yarn.lock +++ b/examples/publish-ci/cra5/yarn.lock @@ -10896,12 +10896,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.8.4": - version: 2.8.4 - resolution: "prettier@npm:2.8.4" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: - prettier: bin-prettier.js - checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e + prettier: bin/prettier.cjs + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -11749,7 +11749,7 @@ __metadata: "@types/react-dom": ^18.0.10 msw: ^1.3.2 playwright: ^1.31.1 - prettier: ^2.8.4 + prettier: ^3.2.4 react: ^18.2.0 react-dom: ^18.2.0 react-redux: ^9.0.0-rc.0 diff --git a/examples/publish-ci/expo/package.json b/examples/publish-ci/expo/package.json index 368944ef31..4bb97e09a4 100644 --- a/examples/publish-ci/expo/package.json +++ b/examples/publish-ci/expo/package.json @@ -37,7 +37,7 @@ "eslint-plugin-prettier": "^5.0.1", "jest": "^29.7.0", "jest-expo": "^49.0.0", - "prettier": "^3.1.1", + "prettier": "^3.2.4", "ts-node": "^10.9.2", "typescript": "^5.1.3" }, diff --git a/examples/publish-ci/expo/yarn.lock b/examples/publish-ci/expo/yarn.lock index ddee6d8984..3de50eedc6 100644 --- a/examples/publish-ci/expo/yarn.lock +++ b/examples/publish-ci/expo/yarn.lock @@ -6050,7 +6050,7 @@ __metadata: expo-status-bar: ~1.6.0 jest: ^29.7.0 jest-expo: ^49.0.0 - prettier: ^3.1.1 + prettier: ^3.2.4 react: 18.2.0 react-native: 0.72.6 react-redux: ^9.0.4 @@ -10172,12 +10172,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.1.1": - version: 3.1.1 - resolution: "prettier@npm:3.1.1" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: prettier: bin/prettier.cjs - checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard diff --git a/examples/publish-ci/next/package.json b/examples/publish-ci/next/package.json index 780479ddd0..2efb5ff4b6 100644 --- a/examples/publish-ci/next/package.json +++ b/examples/publish-ci/next/package.json @@ -27,7 +27,7 @@ "@types/react": "^18.0.26", "@types/react-dom": "^18.0.10", "playwright": "^1.31.1", - "prettier": "^2.8.4", + "prettier": "^3.2.4", "serve": "^14.2.0", "typescript": "^4.9.4" }, diff --git a/examples/publish-ci/next/yarn.lock b/examples/publish-ci/next/yarn.lock index 69a1244da3..85ca00c3ee 100644 --- a/examples/publish-ci/next/yarn.lock +++ b/examples/publish-ci/next/yarn.lock @@ -2863,12 +2863,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.8.4": - version: 2.8.4 - resolution: "prettier@npm:2.8.4" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: - prettier: bin-prettier.js - checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e + prettier: bin/prettier.cjs + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -3157,7 +3157,7 @@ __metadata: msw: ^1.3.2 next: ^13.2 playwright: ^1.31.1 - prettier: ^2.8.4 + prettier: ^3.2.4 react: ^18.2.0 react-dom: ^18.2.0 react-redux: ^9.0.0-rc.0 diff --git a/examples/publish-ci/react-native/package.json b/examples/publish-ci/react-native/package.json index edadd871f7..7aef98431f 100644 --- a/examples/publish-ci/react-native/package.json +++ b/examples/publish-ci/react-native/package.json @@ -38,7 +38,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", - "prettier": "^3.2.1", + "prettier": "^3.2.4", "react-test-renderer": "18.2.0", "ts-node": "^10.9.2", "typescript": "^5.3.3" diff --git a/examples/publish-ci/react-native/yarn.lock b/examples/publish-ci/react-native/yarn.lock index c2ec55e15a..02cd5be44e 100644 --- a/examples/publish-ci/react-native/yarn.lock +++ b/examples/publish-ci/react-native/yarn.lock @@ -7805,12 +7805,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.2.1": - version: 3.2.1 - resolution: "prettier@npm:3.2.1" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: prettier: bin/prettier.cjs - checksum: 01a5fcf1db4e8172365473e540a328304e501a20bf9b4577e359e431e480d602bcf082d51020aba24bd70ceda528632c6ff8039cedb2d430aeb4af2ca7652817 + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -7982,7 +7982,7 @@ __metadata: eslint-config-prettier: ^9.1.0 eslint-plugin-prettier: ^5.1.3 jest: ^29.7.0 - prettier: ^3.2.1 + prettier: ^3.2.4 react: 18.2.0 react-native: ^0.73.2 react-redux: ^9.1.0 diff --git a/examples/publish-ci/vite/package.json b/examples/publish-ci/vite/package.json index 3689f436e5..b1bb636e5c 100644 --- a/examples/publish-ci/vite/package.json +++ b/examples/publish-ci/vite/package.json @@ -28,7 +28,7 @@ "@types/react-dom": "^18.0.10", "@vitejs/plugin-react": "^3.0.0", "playwright": "^1.31.1", - "prettier": "^2.8.4", + "prettier": "^3.2.4", "serve": "^14.2.0", "typescript": "^4.9.4", "vite": "^4.2.1" diff --git a/examples/publish-ci/vite/yarn.lock b/examples/publish-ci/vite/yarn.lock index 69d4f11162..9795f23cd6 100644 --- a/examples/publish-ci/vite/yarn.lock +++ b/examples/publish-ci/vite/yarn.lock @@ -3316,12 +3316,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.8.4": - version: 2.8.4 - resolution: "prettier@npm:2.8.4" +"prettier@npm:^3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: - prettier: bin-prettier.js - checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e + prettier: bin/prettier.cjs + checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3 languageName: node linkType: hard @@ -3657,7 +3657,7 @@ __metadata: "@vitejs/plugin-react": ^3.0.0 msw: ^1.3.2 playwright: ^1.31.1 - prettier: ^2.8.4 + prettier: ^3.2.4 react: ^18.2.0 react-dom: ^18.2.0 react-redux: ^9.0.0-rc.0 diff --git a/packages/rtk-query-codegen-openapi/package.json b/packages/rtk-query-codegen-openapi/package.json index 475c23fc34..b50139d8c4 100644 --- a/packages/rtk-query-codegen-openapi/package.json +++ b/packages/rtk-query-codegen-openapi/package.json @@ -59,7 +59,7 @@ "@apidevtools/swagger-parser": "^10.0.2", "commander": "^6.2.0", "oazapfts": "^4.8.0", - "prettier": "^2.2.1", + "prettier": "^3.2.4", "semver": "^7.3.5", "swagger2openapi": "^7.0.4", "typescript": "^5.0.0" diff --git a/website/package.json b/website/package.json index 0cf8eb3dc4..14ce1cce33 100644 --- a/website/package.json +++ b/website/package.json @@ -32,6 +32,7 @@ ] }, "devDependencies": { - "netlify-plugin-cache": "^1.0.3" + "netlify-plugin-cache": "^1.0.3", + "prettier": "^3.2.4" } } diff --git a/yarn.lock b/yarn.lock index 18458d571b..ea5ccaa3a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7423,7 +7423,7 @@ __metadata: msw: ^0.40.2 oazapfts: ^4.8.0 openapi-types: ^9.1.0 - prettier: ^2.2.1 + prettier: ^3.2.4 pretty-quick: ^3.1.0 semver: ^7.3.5 swagger2openapi: ^7.0.4 @@ -31150,6 +31150,7 @@ fsevents@^1.2.7: "@docusaurus/preset-classic": 2.1.0 classnames: ^2.2.6 netlify-plugin-cache: ^1.0.3 + prettier: ^3.2.4 react: ^18.1.0 react-dom: ^18.1.0 react-lite-youtube-embed: ^2.0.3 From 5994f5fcdfed0240b213435a57ba4d681a3dd1a0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 14:35:07 -0600 Subject: [PATCH 287/368] Rename `src/dynamicMiddleware/tests/index.typetest.ts` to `src/dynamicMiddleware/tests/index.test-d.ts` --- .../tests/{index.typetest.ts => index.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/dynamicMiddleware/tests/{index.typetest.ts => index.test-d.ts} (100%) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts similarity index 100% rename from packages/toolkit/src/dynamicMiddleware/tests/index.typetest.ts rename to packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts From 799b20bbed8ad9eb8e4faa24b0c69b981ab5294b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 14:56:33 -0600 Subject: [PATCH 288/368] Migrate type tests for `src\dynamicMiddleware\tests\index.test-d.ts` to Vitest --- .../dynamicMiddleware/tests/index.test-d.ts | 127 ++++++++---------- 1 file changed, 58 insertions(+), 69 deletions(-) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts index b554c8751a..c3bdeee210 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts @@ -1,9 +1,7 @@ -/* eslint-disable no-lone-blocks */ -import type { Action, UnknownAction, Middleware } from 'redux' +import type { Action, Middleware, UnknownAction } from 'redux' import type { ThunkDispatch } from 'redux-thunk' -import { createDynamicMiddleware } from '../index' import { configureStore } from '../../configureStore' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' +import { createDynamicMiddleware } from '../index' const untypedInstance = createDynamicMiddleware() @@ -13,17 +11,6 @@ interface AppDispatch extends ThunkDispatch { const typedInstance = createDynamicMiddleware() -/** - * Test: instance typed at creation ensures middleware compatibility with store - */ -{ - const store = configureStore({ - reducer: () => '', - // @ts-expect-error - middleware: (gDM) => gDM().prepend(typedInstance.middleware), - }) -} - declare const staticMiddleware: Middleware<(n: 1) => 1> const store = configureStore({ @@ -35,68 +22,70 @@ const store = configureStore({ declare const compatibleMiddleware: Middleware<{}, number, AppDispatch> declare const incompatibleMiddleware: Middleware<{}, string, AppDispatch> -/** - * Test: instance typed at creation enforces correct middleware type - */ -{ - typedInstance.addMiddleware( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) - - const dispatch = store.dispatch( - typedInstance.withMiddleware( +declare const addedMiddleware: Middleware<(n: 2) => 2> + +describe('type tests', () => { + test('instance typed at creation ensures middleware compatibility with store', () => { + const store = configureStore({ + reducer: () => '', + // @ts-expect-error + middleware: (gDM) => gDM().prepend(typedInstance.middleware), + }) + }) + + test('instance typed at creation enforces correct middleware type', () => { + typedInstance.addMiddleware( compatibleMiddleware, // @ts-expect-error incompatibleMiddleware ) - ) -} -/** - * Test: withTypes() enforces correct middleware type - */ -{ - const addMiddleware = untypedInstance.addMiddleware.withTypes<{ - state: number - dispatch: AppDispatch - }>() - - addMiddleware( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) - - const withMiddleware = untypedInstance.withMiddleware.withTypes<{ - state: number - dispatch: AppDispatch - }>() - - const dispatch = store.dispatch( - withMiddleware( + const dispatch = store.dispatch( + typedInstance.withMiddleware( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) + ) + }) + + test('withTypes() enforces correct middleware type', () => { + const addMiddleware = untypedInstance.addMiddleware.withTypes<{ + state: number + dispatch: AppDispatch + }>() + + addMiddleware( compatibleMiddleware, // @ts-expect-error incompatibleMiddleware ) - ) -} -declare const addedMiddleware: Middleware<(n: 2) => 2> + const withMiddleware = untypedInstance.withMiddleware.withTypes<{ + state: number + dispatch: AppDispatch + }>() + + const dispatch = store.dispatch( + withMiddleware( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) + ) + }) -/** - * Test: withMiddleware returns typed dispatch, with any applicable extensions - */ -{ - const dispatch = store.dispatch(typedInstance.withMiddleware(addedMiddleware)) - - // standard - expectType>(dispatch({ type: 'foo' })) - // thunk - expectType(dispatch(() => 'foo')) - // static - expectExactType(1 as const)(dispatch(1)) - // added - expectExactType(2 as const)(dispatch(2)) -} + test('withMiddleware returns typed dispatch, with any applicable extensions', () => { + const dispatch = store.dispatch( + typedInstance.withMiddleware(addedMiddleware) + ) + + expectTypeOf(dispatch({ type: 'foo' })).toEqualTypeOf>() + + expectTypeOf(dispatch(() => 'foo')).toEqualTypeOf() + + expectTypeOf(dispatch(1)).toEqualTypeOf<1>() + + expectTypeOf(dispatch(2)).toEqualTypeOf<2>() + }) +}) From acb46b5f2a0ed6db218278ad714e54c0a32f6391 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 14:58:05 -0600 Subject: [PATCH 289/368] Rename `src/dynamicMiddleware/tests/react.typetest.ts` to `src/dynamicMiddleware/tests/react.test-d.ts` --- .../tests/{react.typetest.ts => react.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/dynamicMiddleware/tests/{react.typetest.ts => react.test-d.ts} (100%) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts similarity index 100% rename from packages/toolkit/src/dynamicMiddleware/tests/react.typetest.ts rename to packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts From 70af524fd8ee38c915bb79bb017c87fc5226478f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:04:25 -0600 Subject: [PATCH 290/368] Migrate type tests for `src\dynamicMiddleware\tests\react.test-d.ts` to Vitest --- .../dynamicMiddleware/tests/index.test-d.ts | 4 + .../dynamicMiddleware/tests/react.test-d.ts | 122 ++++++++---------- 2 files changed, 61 insertions(+), 65 deletions(-) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts index c3bdeee210..8c1e570fdc 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts @@ -80,12 +80,16 @@ describe('type tests', () => { typedInstance.withMiddleware(addedMiddleware) ) + // standard expectTypeOf(dispatch({ type: 'foo' })).toEqualTypeOf>() + // thunk expectTypeOf(dispatch(() => 'foo')).toEqualTypeOf() + // static expectTypeOf(dispatch(1)).toEqualTypeOf<1>() + // added expectTypeOf(dispatch(2)).toEqualTypeOf<2>() }) }) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts index a975d80c63..9d9c2782c1 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts @@ -1,11 +1,8 @@ -/* eslint-disable no-lone-blocks */ import type { Context } from 'react' import type { ReactReduxContextValue } from 'react-redux' -import type { Action, UnknownAction, Middleware } from 'redux' +import type { Action, Middleware, UnknownAction } from 'redux' import type { ThunkDispatch } from 'redux-thunk' import { createDynamicMiddleware } from '../react' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -/* eslint-disable no-lone-blocks */ interface AppDispatch extends ThunkDispatch { (n: 1): 1 @@ -20,70 +17,65 @@ declare const incompatibleMiddleware: Middleware<{}, string, AppDispatch> declare const customContext: Context -/** - * Test: instance typed at creation enforces correct middleware type - */ -{ - const useDispatch = typedInstance.createDispatchWithMiddlewareHook( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) +declare const addedMiddleware: Middleware<(n: 2) => 2> - const createDispatchWithMiddlewareHook = - typedInstance.createDispatchWithMiddlewareHookFactory(customContext) - const useDispatchWithContext = createDispatchWithMiddlewareHook( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) -} +describe('type tests', () => { + test('instance typed at creation enforces correct middleware type', () => { + const useDispatch = typedInstance.createDispatchWithMiddlewareHook( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) -/** - * Test: withTypes() enforces correct middleware type - */ -{ - const createDispatchWithMiddlewareHook = - untypedInstance.createDispatchWithMiddlewareHook.withTypes<{ - state: number - dispatch: AppDispatch - }>() - const useDispatch = createDispatchWithMiddlewareHook( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) + const createDispatchWithMiddlewareHook = + typedInstance.createDispatchWithMiddlewareHookFactory(customContext) + const useDispatchWithContext = createDispatchWithMiddlewareHook( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) + }) - const createCustomDispatchWithMiddlewareHook = untypedInstance - .createDispatchWithMiddlewareHookFactory(customContext) - .withTypes<{ - state: number - dispatch: AppDispatch - }>() - const useCustomDispatch = createCustomDispatchWithMiddlewareHook( - compatibleMiddleware, - // @ts-expect-error - incompatibleMiddleware - ) -} + test('withTypes() enforces correct middleware type', () => { + const createDispatchWithMiddlewareHook = + untypedInstance.createDispatchWithMiddlewareHook.withTypes<{ + state: number + dispatch: AppDispatch + }>() + const useDispatch = createDispatchWithMiddlewareHook( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) -declare const addedMiddleware: Middleware<(n: 2) => 2> + const createCustomDispatchWithMiddlewareHook = untypedInstance + .createDispatchWithMiddlewareHookFactory(customContext) + .withTypes<{ + state: number + dispatch: AppDispatch + }>() + const useCustomDispatch = createCustomDispatchWithMiddlewareHook( + compatibleMiddleware, + // @ts-expect-error + incompatibleMiddleware + ) + }) -/** - * Test: useDispatchWithMW returns typed dispatch, with any applicable extensions - */ -{ - const useDispatchWithMW = - typedInstance.createDispatchWithMiddlewareHook(addedMiddleware) - // eslint-disable-next-line react-hooks/rules-of-hooks - const dispatch = useDispatchWithMW() + test('useDispatchWithMW returns typed dispatch, with any applicable extensions', () => { + const useDispatchWithMW = + typedInstance.createDispatchWithMiddlewareHook(addedMiddleware) + const dispatch = useDispatchWithMW() - // standard - expectType>(dispatch({ type: 'foo' })) - // thunk - expectType(dispatch(() => 'foo')) - // static - expectExactType(1 as const)(dispatch(1)) - // added - expectExactType(2 as const)(dispatch(2)) -} + // standard + expectTypeOf(dispatch({ type: 'foo' })).toEqualTypeOf>() + + // thunk + expectTypeOf(dispatch(() => 'foo')).toEqualTypeOf() + + // static + expectTypeOf(dispatch(1)).toEqualTypeOf<1>() + + // added + expectTypeOf(dispatch(2)).toEqualTypeOf<2>() + }) +}) From ad884ed6b4db9ef2c0cc17b491dd4c88a9d4fd91 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:06:04 -0600 Subject: [PATCH 291/368] Rename `src/query/tests/baseQueryTypes.typetest.ts` to `src/query/tests/baseQueryTypes.test-d.ts` --- .../{baseQueryTypes.typetest.ts => baseQueryTypes.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/query/tests/{baseQueryTypes.typetest.ts => baseQueryTypes.test-d.ts} (100%) diff --git a/packages/toolkit/src/query/tests/baseQueryTypes.typetest.ts b/packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts similarity index 100% rename from packages/toolkit/src/query/tests/baseQueryTypes.typetest.ts rename to packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts From b8f6f8152e1dc820cee67488d1f0f2771a206f2d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:07:52 -0600 Subject: [PATCH 292/368] Migrate type tests for `src\query\tests\baseQueryTypes.test-d.ts` to Vitest --- .../src/query/tests/baseQueryTypes.test-d.ts | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts b/packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts index f321ced60c..1ffa324b8b 100644 --- a/packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts +++ b/packages/toolkit/src/query/tests/baseQueryTypes.test-d.ts @@ -1,33 +1,32 @@ import { createApi, fetchBaseQuery, retry } from '@reduxjs/toolkit/query' -/** - * Test: BaseQuery meta types propagate to endpoint callbacks - */ -{ - createApi({ - baseQuery: fetchBaseQuery(), - endpoints: (build) => ({ - getDummy: build.query({ - query: () => 'dummy', - onCacheEntryAdded: async (arg, { cacheDataLoaded }) => { - const { meta } = await cacheDataLoaded - const { request, response } = meta! // Expect request and response to be there - }, +describe('type tests', () => { + test('BaseQuery meta types propagate to endpoint callbacks', () => { + createApi({ + baseQuery: fetchBaseQuery(), + endpoints: (build) => ({ + getDummy: build.query({ + query: () => 'dummy', + onCacheEntryAdded: async (arg, { cacheDataLoaded }) => { + const { meta } = await cacheDataLoaded + const { request, response } = meta! // Expect request and response to be there + }, + }), }), - }), - }) + }) - const baseQuery = retry(fetchBaseQuery()) // Even when wrapped with retry - createApi({ - baseQuery, - endpoints: (build) => ({ - getDummy: build.query({ - query: () => 'dummy', - onCacheEntryAdded: async (arg, { cacheDataLoaded }) => { - const { meta } = await cacheDataLoaded - const { request, response } = meta! // Expect request and response to be there - }, + const baseQuery = retry(fetchBaseQuery()) // Even when wrapped with retry + createApi({ + baseQuery, + endpoints: (build) => ({ + getDummy: build.query({ + query: () => 'dummy', + onCacheEntryAdded: async (arg, { cacheDataLoaded }) => { + const { meta } = await cacheDataLoaded + const { request, response } = meta! // Expect request and response to be there + }, + }), }), - }), + }) }) -} +}) From 9928268fbd55e9d5280f3ecb8220b3b699ada872 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:11:47 -0600 Subject: [PATCH 293/368] Rename `src/tests/combineSlices.typetest.ts` to `src/tests/combineSlices.test-d.ts` --- .../tests/{combineSlices.typetest.ts => combineSlices.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{combineSlices.typetest.ts => combineSlices.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/combineSlices.typetest.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/combineSlices.typetest.ts rename to packages/toolkit/src/tests/combineSlices.test-d.ts From e3a6d209d6e76937ca101f7f1cb494d5542f379d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:35:16 -0600 Subject: [PATCH 294/368] Migrate type tests for `src/tests/combineSlices.test-d.ts` to Vitest --- .../toolkit/src/tests/combineSlices.test-d.ts | 329 +++++++++--------- 1 file changed, 163 insertions(+), 166 deletions(-) diff --git a/packages/toolkit/src/tests/combineSlices.test-d.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts index 7b92faf380..4d3cdb0cf2 100644 --- a/packages/toolkit/src/tests/combineSlices.test-d.ts +++ b/packages/toolkit/src/tests/combineSlices.test-d.ts @@ -1,8 +1,6 @@ -/* eslint-disable no-lone-blocks */ import type { Reducer, Slice, WithSlice } from '@reduxjs/toolkit' import { combineSlices } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { expectExactType, expectType } from './utils/typeTestHelpers' declare const stringSlice: Slice @@ -21,70 +19,6 @@ const exampleApi = createApi({ type ExampleApiState = ReturnType -/** - * Test: combineSlices correctly combines static state - */ -{ - const rootReducer = combineSlices(stringSlice, numberSlice, exampleApi, { - boolean: booleanReducer, - }) - expectType<{ - string: string - number: number - boolean: boolean - api: ExampleApiState - }>(rootReducer(undefined, { type: '' })) -} - -/** - * Test: withLazyLoadedSlices adds partial to state - */ -{ - const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice & WithSlice - >() - expectExactType(0)( - rootReducer(undefined, { type: '' }).number - ) - expectExactType(undefined)( - rootReducer(undefined, { type: '' }).api - ) -} - -/** - * Test: inject marks injected keys as required - */ -{ - const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice & - WithSlice & { boolean: boolean } - >() - - expectExactType(0)( - rootReducer(undefined, { type: '' }).number - ) - expectExactType(true)( - rootReducer(undefined, { type: '' }).boolean - ) - expectExactType(undefined)( - rootReducer(undefined, { type: '' }).api - ) - - const withNumber = rootReducer.inject(numberSlice) - expectExactType(0)(withNumber(undefined, { type: '' }).number) - - const withBool = rootReducer.inject({ - reducerPath: 'boolean' as const, - reducer: booleanReducer, - }) - expectExactType(true)(withBool(undefined, { type: '' }).boolean) - - const withApi = rootReducer.inject(exampleApi) - expectExactType({} as ExampleApiState)( - withApi(undefined, { type: '' }).api - ) -} - declare const wrongNumberSlice: Slice declare const wrongBooleanReducer: Reducer @@ -98,113 +32,176 @@ const wrongApi = createApi({ }), }) -/** - * Test: selector() allows defining selectors with injected reducers defined - */ -{ - const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice & { boolean: boolean } - >() - - type RootState = ReturnType - - const withoutInjection = rootReducer.selector( - (state: RootState) => state.number - ) - - expectExactType(0)( - withoutInjection(rootReducer(undefined, { type: '' })) - ) - - const withInjection = rootReducer - .inject(numberSlice) - .selector((state) => state.number) - - expectExactType(0)( - withInjection(rootReducer(undefined, { type: '' })) - ) -} - -/** - * Test: selector() passes arguments through - */ -{ - const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice & { boolean: boolean } - >() - - const selector = rootReducer - .inject(numberSlice) - .selector((state, num: number) => state.number) - - const state = rootReducer(undefined, { type: '' }) - // @ts-expect-error required argument - selector(state) - // @ts-expect-error number not string - selector(state, '') - selector(state, 0) -} - -/** - * Test: nested calls inferred correctly - */ -{ - const innerReducer = - combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice +describe('type tests', () => { + test('combineSlices correctly combines static state', () => { + const rootReducer = combineSlices(stringSlice, numberSlice, exampleApi, { + boolean: booleanReducer, + }) + + expectTypeOf(rootReducer(undefined, { type: '' })).toEqualTypeOf<{ + string: string + number: number + boolean: boolean + api: ExampleApiState + }>() + }) + + test('withLazyLoadedSlices adds partial to state', () => { + const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice & WithSlice >() - const innerSelector = innerReducer.inject(numberSlice).selector( - (state) => state.number, - (rootState: RootState) => rootState.inner - ) + expectTypeOf(rootReducer(undefined, { type: '' }).number).toEqualTypeOf< + number | undefined + >() - const outerReducer = combineSlices({ inner: innerReducer }) + expectTypeOf(rootReducer(undefined, { type: '' }).api).toEqualTypeOf< + ExampleApiState | undefined + >() + }) - type RootState = ReturnType + test('inject marks injected keys as required', () => { + const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice & + WithSlice & { boolean: boolean } + >() - expectType<{ inner: { string: string } }>( - outerReducer(undefined, { type: '' }) - ) + expectTypeOf(rootReducer(undefined, { type: '' }).number).toEqualTypeOf< + number | undefined + >() - expectType(innerSelector(outerReducer(undefined, { type: '' }))) -} + expectTypeOf(rootReducer(undefined, { type: '' }).boolean).toEqualTypeOf< + boolean | undefined + >() + + expectTypeOf(rootReducer(undefined, { type: '' }).api).toEqualTypeOf< + ExampleApiState | undefined + >() + + const withNumber = rootReducer.inject(numberSlice) + + expectTypeOf( + withNumber(undefined, { type: '' }).number + ).toEqualTypeOf() -/** - * Test: selector errors if selectorFn and selectState are mismatched - */ + const withBool = rootReducer.inject({ + reducerPath: 'boolean' as const, + reducer: booleanReducer, + }) -{ - const combinedReducer = - combineSlices(stringSlice).withLazyLoadedSlices< - WithSlice + expectTypeOf( + withBool(undefined, { type: '' }).boolean + ).toEqualTypeOf() + + const withApi = rootReducer.inject(exampleApi) + + expectTypeOf( + withApi(undefined, { type: '' }).api + ).toEqualTypeOf() + }) + + test('selector() allows defining selectors with injected reducers defined', () => { + const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice & { boolean: boolean } >() - const outerReducer = combineSlices({ inner: combinedReducer }) - - type RootState = ReturnType - - combinedReducer.selector( - (state) => state.number, - // @ts-expect-error wrong state returned - (rootState: RootState) => rootState.inner.number - ) - combinedReducer.selector( - (state, num: number) => state.number, - // @ts-expect-error wrong arguments - (rootState: RootState, str: string) => rootState.inner - ) - - combinedReducer.selector( - (state, num: number) => state.number, - (rootState: RootState) => rootState.inner - ) - - // TODO: see if there's a way of making this work - // probably a rare case so not the end of the world if not - combinedReducer.selector( - (state) => state.number, - // @ts-ignore - (rootState: RootState, num: number) => rootState.inner - ) -} + type RootState = ReturnType + + const withoutInjection = rootReducer.selector( + (state: RootState) => state.number + ) + + expectTypeOf( + withoutInjection(rootReducer(undefined, { type: '' })) + ).toEqualTypeOf() + + const withInjection = rootReducer + .inject(numberSlice) + .selector((state) => state.number) + + expectTypeOf( + withInjection(rootReducer(undefined, { type: '' })) + ).toEqualTypeOf() + }) + + test('selector() passes arguments through', () => { + const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice & { boolean: boolean } + >() + + const selector = rootReducer + .inject(numberSlice) + .selector((state, num: number) => state.number) + + const state = rootReducer(undefined, { type: '' }) + // @ts-expect-error required argument + selector(state) + // @ts-expect-error number not string + selector(state, '') + selector(state, 0) + }) + + test('nested calls inferred correctly', () => { + const innerReducer = + combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice + >() + + const innerSelector = innerReducer.inject(numberSlice).selector( + (state) => state.number, + (rootState: RootState) => rootState.inner + ) + + const outerReducer = combineSlices({ inner: innerReducer }) + + type RootState = ReturnType + + expectTypeOf(outerReducer(undefined, { type: '' })).toMatchTypeOf<{ + inner: { string: string } + }>() + + expectTypeOf(outerReducer(undefined, { type: '' })).not.toEqualTypeOf<{ + inner: { string: string } + }>() + + expectTypeOf( + innerSelector(outerReducer(undefined, { type: '' })) + ).toEqualTypeOf() + }) + + test('selector errors if selectorFn and selectState are mismatched', () => { + const combinedReducer = + combineSlices(stringSlice).withLazyLoadedSlices< + WithSlice + >() + + const outerReducer = combineSlices({ inner: combinedReducer }) + + type RootState = ReturnType + + combinedReducer.selector( + (state) => state.number, + // @ts-expect-error wrong state returned + (rootState: RootState) => rootState.inner.number + ) + + combinedReducer.selector( + (state, num: number) => state.number, + // @ts-expect-error wrong arguments + (rootState: RootState, str: string) => rootState.inner + ) + + combinedReducer.selector( + (state, num: number) => state.number, + (rootState: RootState) => rootState.inner + ) + + // TODO: see if there's a way of making this work + // probably a rare case so not the end of the world if not + combinedReducer.selector( + (state) => state.number, + // @ts-ignore + (rootState: RootState, num: number) => rootState.inner + ) + }) +}) From 505ee087d8069ce07f0669951b125c69d8a93451 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 15:36:06 -0600 Subject: [PATCH 295/368] Rename `src/tests/configureStore.typetest.ts` to `src/tests/configureStore.test-d.ts` --- .../{configureStore.typetest.ts => configureStore.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{configureStore.typetest.ts => configureStore.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/configureStore.typetest.ts b/packages/toolkit/src/tests/configureStore.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/configureStore.typetest.ts rename to packages/toolkit/src/tests/configureStore.test-d.ts From 6fbf1bd7dd7221137900d29bfc5a6f3f129ed682 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 16:55:29 -0600 Subject: [PATCH 296/368] Migrate type tests for `src/tests/configureStore.test-d.ts` to Vitest --- .../dynamicMiddleware/tests/index.test-d.ts | 2 +- .../dynamicMiddleware/tests/react.test-d.ts | 2 +- .../src/query/tests/buildSelector.test-d.ts | 2 +- .../toolkit/src/tests/combineSlices.test-d.ts | 12 +- .../src/tests/configureStore.test-d.ts | 1387 ++++++++--------- 5 files changed, 684 insertions(+), 721 deletions(-) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts index 8c1e570fdc..c34bc364b7 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts @@ -84,7 +84,7 @@ describe('type tests', () => { expectTypeOf(dispatch({ type: 'foo' })).toEqualTypeOf>() // thunk - expectTypeOf(dispatch(() => 'foo')).toEqualTypeOf() + expectTypeOf(dispatch(() => 'foo')).toBeString() // static expectTypeOf(dispatch(1)).toEqualTypeOf<1>() diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts index 9d9c2782c1..f7c8d6645a 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts @@ -70,7 +70,7 @@ describe('type tests', () => { expectTypeOf(dispatch({ type: 'foo' })).toEqualTypeOf>() // thunk - expectTypeOf(dispatch(() => 'foo')).toEqualTypeOf() + expectTypeOf(dispatch(() => 'foo')).toBeString() // static expectTypeOf(dispatch(1)).toEqualTypeOf<1>() diff --git a/packages/toolkit/src/query/tests/buildSelector.test-d.ts b/packages/toolkit/src/query/tests/buildSelector.test-d.ts index 968b70c3a5..d92936b05f 100644 --- a/packages/toolkit/src/query/tests/buildSelector.test-d.ts +++ b/packages/toolkit/src/query/tests/buildSelector.test-d.ts @@ -49,7 +49,7 @@ describe('buildSelector', () => { // This only compiles if we carried the types through const upperTitle = todoTitle.toUpperCase() - expectTypeOf(upperTitle).toEqualTypeOf() + expectTypeOf(upperTitle).toBeString() }) test('selectCachedArgsForQuery type test', () => { diff --git a/packages/toolkit/src/tests/combineSlices.test-d.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts index 4d3cdb0cf2..496b072ab5 100644 --- a/packages/toolkit/src/tests/combineSlices.test-d.ts +++ b/packages/toolkit/src/tests/combineSlices.test-d.ts @@ -80,18 +80,14 @@ describe('type tests', () => { const withNumber = rootReducer.inject(numberSlice) - expectTypeOf( - withNumber(undefined, { type: '' }).number - ).toEqualTypeOf() + expectTypeOf(withNumber(undefined, { type: '' }).number).toBeNumber() const withBool = rootReducer.inject({ reducerPath: 'boolean' as const, reducer: booleanReducer, }) - expectTypeOf( - withBool(undefined, { type: '' }).boolean - ).toEqualTypeOf() + expectTypeOf(withBool(undefined, { type: '' }).boolean).toBeBoolean() const withApi = rootReducer.inject(exampleApi) @@ -121,7 +117,7 @@ describe('type tests', () => { expectTypeOf( withInjection(rootReducer(undefined, { type: '' })) - ).toEqualTypeOf() + ).toBeNumber() }) test('selector() passes arguments through', () => { @@ -166,7 +162,7 @@ describe('type tests', () => { expectTypeOf( innerSelector(outerReducer(undefined, { type: '' })) - ).toEqualTypeOf() + ).toBeNumber() }) test('selector errors if selectorFn and selectState are mismatched', () => { diff --git a/packages/toolkit/src/tests/configureStore.test-d.ts b/packages/toolkit/src/tests/configureStore.test-d.ts index 1480420422..c03a47d5ea 100644 --- a/packages/toolkit/src/tests/configureStore.test-d.ts +++ b/packages/toolkit/src/tests/configureStore.test-d.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-lone-blocks */ import type { ConfigureStoreOptions, PayloadAction } from '@reduxjs/toolkit' import { Tuple, configureStore, createSlice } from '@reduxjs/toolkit' import type { @@ -13,825 +12,793 @@ import type { import { applyMiddleware, combineReducers } from 'redux' import type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk' import { thunk } from 'redux-thunk' -import { - expectExactType, - expectNotAny, - expectType, -} from './utils/typeTestHelpers' const _anyMiddleware: any = () => () => () => {} -/* - * Test: configureStore() requires a valid reducer or reducer map. - */ -{ - configureStore({ - reducer: (state, action) => 0, - }) +describe('type tests', () => { + test('configureStore() requires a valid reducer or reducer map.', () => { + configureStore({ + reducer: (state, action) => 0, + }) - configureStore({ - reducer: { - counter1: () => 0, - counter2: () => 1, - }, - }) + configureStore({ + reducer: { + counter1: () => 0, + counter2: () => 1, + }, + }) - // @ts-expect-error - configureStore({ reducer: 'not a reducer' }) - - // @ts-expect-error - configureStore({ reducer: { a: 'not a reducer' } }) - - // @ts-expect-error - configureStore({}) -} - -/* - * Test: configureStore() infers the store state type. - */ -{ - const reducer: Reducer = () => 0 - const store = configureStore({ reducer }) - const numberStore: Store = store - - // @ts-expect-error - const stringStore: Store = store -} - -/* - * Test: configureStore() infers the store action type. - */ -{ - const reducer: Reducer> = () => 0 - const store = configureStore({ reducer }) - const numberStore: Store> = store - - // @ts-expect-error - const stringStore: Store> = store -} - -/* - * Test: configureStore() accepts Tuple, but not plain array. - */ -{ - const middleware: Middleware = (store) => (next) => next - - configureStore({ - reducer: () => 0, - middleware: () => new Tuple(middleware), - }) + // @ts-expect-error + configureStore({ reducer: 'not a reducer' }) - configureStore({ - reducer: () => 0, // @ts-expect-error - middleware: () => [middleware], - }) + configureStore({ reducer: { a: 'not a reducer' } }) - configureStore({ - reducer: () => 0, // @ts-expect-error - middleware: () => new Tuple('not middleware'), - }) -} - -/* - * Test: configureStore() accepts devTools flag. - */ -{ - configureStore({ - reducer: () => 0, - devTools: true, + configureStore({}) }) - configureStore({ - reducer: () => 0, + test('configureStore() infers the store state type.', () => { + const reducer: Reducer = () => 0 + const store = configureStore({ reducer }) + const numberStore: Store = store + // @ts-expect-error - devTools: 'true', - }) -} - -/* - * Test: configureStore() accepts devTools EnhancerOptions. - */ -{ - configureStore({ - reducer: () => 0, - devTools: { name: 'myApp' }, + const stringStore: Store = store }) - configureStore({ - reducer: () => 0, + test('configureStore() infers the store action type.', () => { + const reducer: Reducer> = () => 0 + const store = configureStore({ reducer }) + const numberStore: Store> = store + // @ts-expect-error - devTools: { appname: 'myApp' }, - }) -} - -/* - * Test: configureStore() accepts preloadedState. - */ -{ - configureStore({ - reducer: () => 0, - preloadedState: 0, + const stringStore: Store> = store }) - configureStore({ - // @ts-expect-error - reducer: (_: number) => 0, - preloadedState: 'non-matching state type', + test('configureStore() accepts Tuple, but not plain array.', () => { + const middleware: Middleware = (store) => (next) => next + + configureStore({ + reducer: () => 0, + middleware: () => new Tuple(middleware), + }) + + configureStore({ + reducer: () => 0, + // @ts-expect-error + middleware: () => [middleware], + }) + + configureStore({ + reducer: () => 0, + // @ts-expect-error + middleware: () => new Tuple('not middleware'), + }) }) -} -/** - * Test: nullable state is preserved - */ + test('configureStore() accepts devTools flag.', () => { + configureStore({ + reducer: () => 0, + devTools: true, + }) -{ - const store = configureStore({ - reducer: (): string | null => null, + configureStore({ + reducer: () => 0, + // @ts-expect-error + devTools: 'true', + }) }) - expectExactType(null)(store.getState()) -} -/* - * Test: configureStore() accepts store Tuple, but not plain array - */ -{ - { - const enhancer = applyMiddleware(() => (next) => next) + test('configureStore() accepts devTools EnhancerOptions.', () => { + configureStore({ + reducer: () => 0, + devTools: { name: 'myApp' }, + }) - const store = configureStore({ + configureStore({ reducer: () => 0, - enhancers: () => new Tuple(enhancer), + // @ts-expect-error + devTools: { appname: 'myApp' }, }) + }) - const store2 = configureStore({ + test('configureStore() accepts preloadedState.', () => { + configureStore({ reducer: () => 0, + preloadedState: 0, + }) + + configureStore({ // @ts-expect-error - enhancers: () => [enhancer], + reducer: (_: number) => 0, + preloadedState: 'non-matching state type', }) + }) - expectType>( - store.dispatch - ) - } + test('nullable state is preserved', () => { + const store = configureStore({ + reducer: (): string | null => null, + }) - configureStore({ - reducer: () => 0, - // @ts-expect-error - enhancers: () => new Tuple('not a store enhancer'), + expectTypeOf(store.getState()).toEqualTypeOf() }) - { - const somePropertyStoreEnhancer: StoreEnhancer<{ someProperty: string }> = ( - next - ) => { - return (reducer, preloadedState) => { - return { - ...next(reducer, preloadedState), - someProperty: 'some value', - } - } + test('configureStore() accepts store Tuple, but not plain array', () => { + { + const enhancer = applyMiddleware(() => (next) => next) + + const store = configureStore({ + reducer: () => 0, + enhancers: () => new Tuple(enhancer), + }) + + const store2 = configureStore({ + reducer: () => 0, + // @ts-expect-error + enhancers: () => [enhancer], + }) + + expectTypeOf(store.dispatch).toMatchTypeOf< + Dispatch & ThunkDispatch + >() + + expectTypeOf(store.dispatch).not.toEqualTypeOf< + Dispatch & ThunkDispatch + >() } - const anotherPropertyStoreEnhancer: StoreEnhancer<{ - anotherProperty: number - }> = (next) => { - return (reducer, preloadedState) => { - return { - ...next(reducer, preloadedState), - anotherProperty: 123, + configureStore({ + reducer: () => 0, + // @ts-expect-error + enhancers: () => new Tuple('not a store enhancer'), + }) + + { + const somePropertyStoreEnhancer: StoreEnhancer<{ someProperty: string }> = + (next) => { + return (reducer, preloadedState) => { + return { + ...next(reducer, preloadedState), + someProperty: 'some value', + } + } + } + + const anotherPropertyStoreEnhancer: StoreEnhancer<{ + anotherProperty: number + }> = (next) => { + return (reducer, preloadedState) => { + return { + ...next(reducer, preloadedState), + anotherProperty: 123, + } } } + + const store = configureStore({ + reducer: () => 0, + enhancers: () => + new Tuple(somePropertyStoreEnhancer, anotherPropertyStoreEnhancer), + }) + + expectTypeOf(store.dispatch).toEqualTypeOf() + + expectTypeOf(store.someProperty).toBeString() + + expectTypeOf(store.anotherProperty).toBeNumber() + + const storeWithCallback = configureStore({ + reducer: () => 0, + enhancers: (getDefaultEnhancers) => + getDefaultEnhancers() + .prepend(anotherPropertyStoreEnhancer) + .concat(somePropertyStoreEnhancer), + }) + + expectTypeOf(store.dispatch).toMatchTypeOf< + Dispatch & ThunkDispatch + >() + + expectTypeOf(store.dispatch).not.toEqualTypeOf< + Dispatch & ThunkDispatch + >() + + expectTypeOf(store.someProperty).toBeString() + + expectTypeOf(store.anotherProperty).toBeNumber() } - const store = configureStore({ - reducer: () => 0, - enhancers: () => - new Tuple(somePropertyStoreEnhancer, anotherPropertyStoreEnhancer), - }) + { + const someStateExtendingEnhancer: StoreEnhancer< + {}, + { someProperty: string } + > = + (next) => + (...args) => { + const store = next(...args) + const getState = () => ({ + ...store.getState(), + someProperty: 'some value', + }) + return { + ...store, + getState, + } as any + } - expectType(store.dispatch) - expectType(store.someProperty) - expectType(store.anotherProperty) + const anotherStateExtendingEnhancer: StoreEnhancer< + {}, + { anotherProperty: number } + > = + (next) => + (...args) => { + const store = next(...args) + const getState = () => ({ + ...store.getState(), + anotherProperty: 123, + }) + return { + ...store, + getState, + } as any + } - const storeWithCallback = configureStore({ - reducer: () => 0, - enhancers: (getDefaultEnhancers) => - getDefaultEnhancers() - .prepend(anotherPropertyStoreEnhancer) - .concat(somePropertyStoreEnhancer), - }) - - expectType>( - store.dispatch - ) - expectType(storeWithCallback.someProperty) - expectType(storeWithCallback.anotherProperty) - } - - { - const someStateExtendingEnhancer: StoreEnhancer< - {}, - { someProperty: string } - > = - (next) => - (...args) => { - const store = next(...args) - const getState = () => ({ - ...store.getState(), - someProperty: 'some value', - }) - return { - ...store, - getState, - } as any - } + const store = configureStore({ + reducer: () => ({ aProperty: 0 }), + enhancers: () => + new Tuple(someStateExtendingEnhancer, anotherStateExtendingEnhancer), + }) - const anotherStateExtendingEnhancer: StoreEnhancer< - {}, - { anotherProperty: number } - > = - (next) => - (...args) => { - const store = next(...args) - const getState = () => ({ - ...store.getState(), - anotherProperty: 123, - }) - return { - ...store, - getState, - } as any - } + const state = store.getState() - const store = configureStore({ - reducer: () => ({ aProperty: 0 }), - enhancers: () => - new Tuple(someStateExtendingEnhancer, anotherStateExtendingEnhancer), - }) + expectTypeOf(state.aProperty).toBeNumber() - const state = store.getState() - expectType(state.aProperty) - expectType(state.someProperty) - expectType(state.anotherProperty) + expectTypeOf(state.someProperty).toBeString() - const storeWithCallback = configureStore({ - reducer: () => ({ aProperty: 0 }), - enhancers: (gDE) => - gDE().concat(someStateExtendingEnhancer, anotherStateExtendingEnhancer), - }) + expectTypeOf(state.anotherProperty).toBeNumber() - const stateWithCallback = storeWithCallback.getState() + const storeWithCallback = configureStore({ + reducer: () => ({ aProperty: 0 }), + enhancers: (gDE) => + gDE().concat( + someStateExtendingEnhancer, + anotherStateExtendingEnhancer + ), + }) - expectType(stateWithCallback.aProperty) - expectType(stateWithCallback.someProperty) - expectType(stateWithCallback.anotherProperty) - } -} + const stateWithCallback = storeWithCallback.getState() -/** - * Test: Preloaded state typings - */ -{ - let counterReducer1: Reducer = () => 0 - let counterReducer2: Reducer = () => 0 + expectTypeOf(stateWithCallback.aProperty).toBeNumber() - /** - * Test: partial preloaded state - */ - { - const store = configureStore({ - reducer: { - counter1: counterReducer1, - counter2: counterReducer2, - }, - preloadedState: { - counter1: 0, - }, - }) + expectTypeOf(stateWithCallback.someProperty).toBeString() - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 - } + expectTypeOf(stateWithCallback.anotherProperty).toBeNumber() + } + }) - /** - * Test: empty preloaded state - */ - { - const store = configureStore({ - reducer: { - counter1: counterReducer1, - counter2: counterReducer2, - }, - preloadedState: {}, - }) + test('Preloaded state typings', () => { + const counterReducer1: Reducer = () => 0 + const counterReducer2: Reducer = () => 0 - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 - } + test('partial preloaded state', () => { + const store = configureStore({ + reducer: { + counter1: counterReducer1, + counter2: counterReducer2, + }, + preloadedState: { + counter1: 0, + }, + }) - /** - * Test: excess properties in preloaded state - */ - { - const store = configureStore({ - reducer: { - // @ts-expect-error - counter1: counterReducer1, - counter2: counterReducer2, - }, - preloadedState: { - counter1: 0, - counter3: 5, - }, + const counter1: number = store.getState().counter1 + const counter2: number = store.getState().counter2 }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 - } + test('empty preloaded state', () => { + const store = configureStore({ + reducer: { + counter1: counterReducer1, + counter2: counterReducer2, + }, + preloadedState: {}, + }) - /** - * Test: mismatching properties in preloaded state - */ - { - const store = configureStore({ - reducer: { - // @ts-expect-error - counter1: counterReducer1, - counter2: counterReducer2, - }, - preloadedState: { - counter3: 5, - }, + const counter1: number = store.getState().counter1 + const counter2: number = store.getState().counter2 }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 - } + test('excess properties in preloaded state', () => { + const store = configureStore({ + reducer: { + // @ts-expect-error + counter1: counterReducer1, + counter2: counterReducer2, + }, + preloadedState: { + counter1: 0, + counter3: 5, + }, + }) - /** - * Test: string preloaded state when expecting object - */ - { - const store = configureStore({ - reducer: { - // @ts-expect-error - counter1: counterReducer1, - counter2: counterReducer2, - }, - preloadedState: 'test', + const counter1: number = store.getState().counter1 + const counter2: number = store.getState().counter2 }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 - } - - /** - * Test: nested combineReducers allows partial - */ - { - const store = configureStore({ - reducer: { - group1: combineReducers({ + test('mismatching properties in preloaded state', () => { + const store = configureStore({ + reducer: { + // @ts-expect-error counter1: counterReducer1, counter2: counterReducer2, - }), - group2: combineReducers({ + }, + preloadedState: { + counter3: 5, + }, + }) + + const counter1: number = store.getState().counter1 + const counter2: number = store.getState().counter2 + }) + + test('string preloaded state when expecting object', () => { + const store = configureStore({ + reducer: { + // @ts-expect-error counter1: counterReducer1, counter2: counterReducer2, - }), - }, - preloadedState: { - group1: { - counter1: 5, }, - }, - }) + preloadedState: 'test', + }) - const group1counter1: number = store.getState().group1.counter1 - const group1counter2: number = store.getState().group1.counter2 - const group2counter1: number = store.getState().group2.counter1 - const group2counter2: number = store.getState().group2.counter2 - } + const counter1: number = store.getState().counter1 + const counter2: number = store.getState().counter2 + }) + + test('nested combineReducers allows partial', () => { + const store = configureStore({ + reducer: { + group1: combineReducers({ + counter1: counterReducer1, + counter2: counterReducer2, + }), + group2: combineReducers({ + counter1: counterReducer1, + counter2: counterReducer2, + }), + }, + preloadedState: { + group1: { + counter1: 5, + }, + }, + }) - /** - * Test: non-nested combineReducers does not allow partial - */ - { - interface GroupState { - counter1: number - counter2: number - } + const group1counter1: number = store.getState().group1.counter1 + const group1counter2: number = store.getState().group1.counter2 + const group2counter1: number = store.getState().group2.counter1 + const group2counter2: number = store.getState().group2.counter2 + }) - const initialState = { counter1: 0, counter2: 0 } + test('non-nested combineReducers does not allow partial', () => { + interface GroupState { + counter1: number + counter2: number + } - const group1Reducer: Reducer = (state = initialState) => state - const group2Reducer: Reducer = (state = initialState) => state + const initialState = { counter1: 0, counter2: 0 } - const store = configureStore({ - reducer: { - // @ts-expect-error - group1: group1Reducer, - group2: group2Reducer, - }, - preloadedState: { - group1: { - counter1: 5, + const group1Reducer: Reducer = (state = initialState) => state + const group2Reducer: Reducer = (state = initialState) => state + + const store = configureStore({ + reducer: { + // @ts-expect-error + group1: group1Reducer, + group2: group2Reducer, }, - }, + preloadedState: { + group1: { + counter1: 5, + }, + }, + }) + + const group1counter1: number = store.getState().group1.counter1 + const group1counter2: number = store.getState().group1.counter2 + const group2counter1: number = store.getState().group2.counter1 + const group2counter2: number = store.getState().group2.counter2 }) + }) - const group1counter1: number = store.getState().group1.counter1 - const group1counter2: number = store.getState().group1.counter2 - const group2counter1: number = store.getState().group2.counter1 - const group2counter2: number = store.getState().group2.counter2 - } -} - -/** - * Test: Dispatch typings - */ -{ - type StateA = number - const reducerA = () => 0 - function thunkA() { - return (() => {}) as any as ThunkAction, StateA, any, any> - } - - type StateB = string - function thunkB() { - return (dispatch: Dispatch, getState: () => StateB) => {} - } - /** - * Test: by default, dispatching Thunks is possible - */ - { - const store = configureStore({ - reducer: reducerA, + test('Dispatch typings', () => { + type StateA = number + const reducerA = () => 0 + function thunkA() { + return (() => {}) as any as ThunkAction, StateA, any, any> + } + + type StateB = string + function thunkB() { + return (dispatch: Dispatch, getState: () => StateB) => {} + } + + test('by default, dispatching Thunks is possible', () => { + const store = configureStore({ + reducer: reducerA, + }) + + store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) + + const res = store.dispatch((dispatch, getState) => { + return 42 + }) + + const action = store.dispatch({ type: 'foo' }) }) - store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - - const res = store.dispatch((dispatch, getState) => { - return 42 - }) - - const action = store.dispatch({ type: 'foo' }) - } - /** - * Test: return type of thunks and actions is inferred correctly - */ - { - const slice = createSlice({ - name: 'counter', - initialState: { - value: 0, - }, - reducers: { - incrementByAmount: (state, action: PayloadAction) => { - state.value += action.payload + test('return type of thunks and actions is inferred correctly', () => { + const slice = createSlice({ + name: 'counter', + initialState: { + value: 0, }, - }, - }) + reducers: { + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload + }, + }, + }) - const store = configureStore({ - reducer: { - counter: slice.reducer, - }, - }) + const store = configureStore({ + reducer: { + counter: slice.reducer, + }, + }) - const action = slice.actions.incrementByAmount(2) + const action = slice.actions.incrementByAmount(2) - const dispatchResult = store.dispatch(action) - expectType<{ type: string; payload: number }>(dispatchResult) + const dispatchResult = store.dispatch(action) - const promiseResult = store.dispatch(async (dispatch) => { - return 42 - }) + expectTypeOf(dispatchResult).toMatchTypeOf<{ + type: string + payload: number + }>() - expectType>(promiseResult) + expectTypeOf(dispatchResult).not.toEqualTypeOf<{ + type: string + payload: number + }>() - const store2 = configureStore({ - reducer: { - counter: slice.reducer, - }, - middleware: (gDM) => - gDM({ - thunk: { - extraArgument: 42, - }, - }), - }) + const promiseResult = store.dispatch(async (dispatch) => { + return 42 + }) - const dispatchResult2 = store2.dispatch(action) - expectType<{ type: string; payload: number }>(dispatchResult2) - } - /** - * Test: removing the Thunk Middleware - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: () => new Tuple(), - }) - // @ts-expect-error - store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } - /** - * Test: adding the thunk middleware by hand - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: () => new Tuple(thunk as ThunkMiddleware), + expectTypeOf(promiseResult).toEqualTypeOf>() + + const store2 = configureStore({ + reducer: { + counter: slice.reducer, + }, + middleware: (gDM) => + gDM({ + thunk: { + extraArgument: 42, + }, + }), + }) + + const dispatchResult2 = store2.dispatch(action) + + expectTypeOf(dispatchResult2).toMatchTypeOf<{ + type: string + payload: number + }>() + + expectTypeOf(dispatchResult2).not.toEqualTypeOf<{ + type: string + payload: number + }>() }) - store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } - /** - * Test: custom middleware - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: () => - new Tuple(0 as unknown as Middleware<(a: StateA) => boolean, StateA>), + + test('removing the Thunk Middleware', () => { + const store = configureStore({ + reducer: reducerA, + middleware: () => new Tuple(), + }) + // @ts-expect-error + store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) }) - const result: boolean = store.dispatch(5) - // @ts-expect-error - const result2: string = store.dispatch(5) - } - /** - * Test: multiple custom middleware - */ - { - const middleware = [] as any as Tuple< - [ - Middleware<(a: 'a') => 'A', StateA>, - Middleware<(b: 'b') => 'B', StateA>, - ThunkMiddleware - ] - > - const store = configureStore({ - reducer: reducerA, - middleware: () => middleware, - }) - - const result: 'A' = store.dispatch('a') - const result2: 'B' = store.dispatch('b') - const result3: Promise<'A'> = store.dispatch(thunkA()) - } - /** - * Accepts thunk with `unknown`, `undefined` or `null` ThunkAction extraArgument per default - */ - { - const store = configureStore({ reducer: {} }) - // undefined is the default value for the ThunkMiddleware extraArgument - store.dispatch(function () {} as ThunkAction< - void, - {}, - undefined, - UnknownAction - >) - // `null` for the `extra` generic was previously documented in the RTK "Advanced Tutorial", but - // is a bad pattern and users should use `unknown` instead - // @ts-expect-error - store.dispatch(function () {} as ThunkAction) - // unknown is the best way to type a ThunkAction if you do not care - // about the value of the extraArgument, as it will always work with every - // ThunkMiddleware, no matter the actual extraArgument type - store.dispatch(function () {} as ThunkAction< - void, - {}, - unknown, - UnknownAction - >) - // @ts-expect-error - store.dispatch(function () {} as ThunkAction< - void, - {}, - boolean, - UnknownAction - >) - } - - /** - * Test: custom middleware and getDefaultMiddleware - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: (gDM) => - gDM().prepend((() => {}) as any as Middleware<(a: 'a') => 'A', StateA>), + + test('adding the thunk middleware by hand', () => { + const store = configureStore({ + reducer: reducerA, + middleware: () => new Tuple(thunk as ThunkMiddleware), + }) + store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } + test('custom middleware', () => { + const store = configureStore({ + reducer: reducerA, + middleware: () => + new Tuple(0 as unknown as Middleware<(a: StateA) => boolean, StateA>), + }) + const result: boolean = store.dispatch(5) + // @ts-expect-error + const result2: string = store.dispatch(5) + }) + + test('multiple custom middleware', () => { + const middleware = [] as any as Tuple< + [ + Middleware<(a: 'a') => 'A', StateA>, + Middleware<(b: 'b') => 'B', StateA>, + ThunkMiddleware + ] + > + const store = configureStore({ + reducer: reducerA, + middleware: () => middleware, + }) - /** - * Test: custom middleware and getDefaultMiddleware, using prepend - */ - { - const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = _anyMiddleware + const result: 'A' = store.dispatch('a') + const result2: 'B' = store.dispatch('b') + const result3: Promise<'A'> = store.dispatch(thunkA()) + }) + + test('Accepts thunk with `unknown`, `undefined` or `null` ThunkAction extraArgument per default', () => { + const store = configureStore({ reducer: {} }) + // undefined is the default value for the ThunkMiddleware extraArgument + store.dispatch(function () {} as ThunkAction< + void, + {}, + undefined, + UnknownAction + >) + // `null` for the `extra` generic was previously documented in the RTK "Advanced Tutorial", but + // is a bad pattern and users should use `unknown` instead + // @ts-expect-error + store.dispatch(function () {} as ThunkAction< + void, + {}, + null, + UnknownAction + >) + // unknown is the best way to type a ThunkAction if you do not care + // about the value of the extraArgument, as it will always work with every + // ThunkMiddleware, no matter the actual extraArgument type + store.dispatch(function () {} as ThunkAction< + void, + {}, + unknown, + UnknownAction + >) + // @ts-expect-error + store.dispatch(function () {} as ThunkAction< + void, + {}, + boolean, + UnknownAction + >) + }) + + test('custom middleware and getDefaultMiddleware', () => { + const store = configureStore({ + reducer: reducerA, + middleware: (gDM) => + gDM().prepend((() => {}) as any as Middleware< + (a: 'a') => 'A', + StateA + >), + }) - const store = configureStore({ - reducer: reducerA, - middleware: (gDM) => { - const concatenated = gDM().prepend(otherMiddleware) - expectType< - ReadonlyArray< - typeof otherMiddleware | ThunkMiddleware | Middleware<{}> - > - >(concatenated) - - return concatenated - }, + const result1: 'A' = store.dispatch('a') + const result2: Promise<'A'> = store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } - /** - * Test: custom middleware and getDefaultMiddleware, using concat - */ - { - const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = _anyMiddleware + test('custom middleware and getDefaultMiddleware, using prepend', () => { + const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = + _anyMiddleware - const store = configureStore({ - reducer: reducerA, - middleware: (gDM) => { - const concatenated = gDM().concat(otherMiddleware) - - expectType< - ReadonlyArray< - typeof otherMiddleware | ThunkMiddleware | Middleware<{}> - > - >(concatenated) - return concatenated - }, - }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } + const store = configureStore({ + reducer: reducerA, + middleware: (gDM) => { + const concatenated = gDM().prepend(otherMiddleware) - /** - * Test: middlewareBuilder notation, getDefaultMiddleware (unconfigured) - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: (getDefaultMiddleware) => - getDefaultMiddleware().prepend((() => {}) as any as Middleware< - (a: 'a') => 'A', - StateA - >), - }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) - } - - /** - * Test: middlewareBuilder notation, getDefaultMiddleware, concat & prepend - */ - { - const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = _anyMiddleware - const otherMiddleware2: Middleware<(a: 'b') => 'B', StateA> = _anyMiddleware - const store = configureStore({ - reducer: reducerA, - middleware: (getDefaultMiddleware) => - getDefaultMiddleware() - .concat(otherMiddleware) - .prepend(otherMiddleware2), - }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - const result3: 'B' = store.dispatch('b') - // @ts-expect-error - store.dispatch(thunkB()) - } + expectTypeOf(concatenated).toMatchTypeOf< + ReadonlyArray< + typeof otherMiddleware | ThunkMiddleware | Middleware<{}> + > + >() - /** - * Test: middlewareBuilder notation, getDefaultMiddleware (thunk: false) - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: (getDefaultMiddleware) => - getDefaultMiddleware({ thunk: false }).prepend( - (() => {}) as any as Middleware<(a: 'a') => 'A', StateA> - ), + expectTypeOf(concatenated).not.toEqualTypeOf< + ReadonlyArray< + typeof otherMiddleware | ThunkMiddleware | Middleware<{}> + > + >() + + return concatenated + }, + }) + const result1: 'A' = store.dispatch('a') + const result2: Promise<'A'> = store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) }) - const result1: 'A' = store.dispatch('a') - // @ts-expect-error - store.dispatch(thunkA()) - } - /** - * Test: badly typed middleware won't make `dispatch` `any` - */ - { - const store = configureStore({ - reducer: reducerA, - middleware: (getDefaultMiddleware) => - getDefaultMiddleware().concat(_anyMiddleware as Middleware), - }) - - expectNotAny(store.dispatch) - } - - /** - * Test: decorated `configureStore` won't make `dispatch` `never` - */ - { - const someSlice = createSlice({ - name: 'something', - initialState: null as any, - reducers: { - set(state) { - return state + test('custom middleware and getDefaultMiddleware, using concat', () => { + const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = + _anyMiddleware + + const store = configureStore({ + reducer: reducerA, + middleware: (gDM) => { + const concatenated = gDM().concat(otherMiddleware) + + expectTypeOf(concatenated).toMatchTypeOf< + ReadonlyArray< + typeof otherMiddleware | ThunkMiddleware | Middleware<{}> + > + >() + + expectTypeOf(concatenated).not.toEqualTypeOf< + ReadonlyArray< + typeof otherMiddleware | ThunkMiddleware | Middleware<{}> + > + >() + + return concatenated }, - }, + }) + const result1: 'A' = store.dispatch('a') + const result2: Promise<'A'> = store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) }) - function configureMyStore( - options: Omit, 'reducer'> - ) { - return configureStore({ - ...options, - reducer: someSlice.reducer, + test('middlewareBuilder notation, getDefaultMiddleware (unconfigured)', () => { + const store = configureStore({ + reducer: reducerA, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().prepend((() => {}) as any as Middleware< + (a: 'a') => 'A', + StateA + >), }) - } + const result1: 'A' = store.dispatch('a') + const result2: Promise<'A'> = store.dispatch(thunkA()) + // @ts-expect-error + store.dispatch(thunkB()) + }) + + test('middlewareBuilder notation, getDefaultMiddleware, concat & prepend', () => { + const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = + _anyMiddleware + const otherMiddleware2: Middleware<(a: 'b') => 'B', StateA> = + _anyMiddleware + const store = configureStore({ + reducer: reducerA, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware() + .concat(otherMiddleware) + .prepend(otherMiddleware2), + }) + const result1: 'A' = store.dispatch('a') + const result2: Promise<'A'> = store.dispatch(thunkA()) + const result3: 'B' = store.dispatch('b') + // @ts-expect-error + store.dispatch(thunkB()) + }) - const store = configureMyStore({}) + test('middlewareBuilder notation, getDefaultMiddleware (thunk: false)', () => { + const store = configureStore({ + reducer: reducerA, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware({ thunk: false }).prepend( + (() => {}) as any as Middleware<(a: 'a') => 'A', StateA> + ), + }) + const result1: 'A' = store.dispatch('a') + // @ts-expect-error + store.dispatch(thunkA()) + }) - expectType(store.dispatch) - } + test("badly typed middleware won't make `dispatch` `any`", () => { + const store = configureStore({ + reducer: reducerA, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().concat(_anyMiddleware as Middleware), + }) - { - interface CounterState { - value: number - } + expectTypeOf(store.dispatch).not.toBeAny() + }) - const counterSlice = createSlice({ - name: 'counter', - initialState: { value: 0 } as CounterState, - reducers: { - increment(state) { - state.value += 1 - }, - decrement(state) { - state.value -= 1 - }, - // Use the PayloadAction type to declare the contents of `action.payload` - incrementByAmount: (state, action: PayloadAction) => { - state.value += action.payload + test("decorated `configureStore` won't make `dispatch` `never`", () => { + const someSlice = createSlice({ + name: 'something', + initialState: null as any, + reducers: { + set(state) { + return state + }, }, - }, - }) + }) - type Unsubscribe = () => void + function configureMyStore( + options: Omit, 'reducer'> + ) { + return configureStore({ + ...options, + reducer: someSlice.reducer, + }) + } - // A fake middleware that tells TS that an unsubscribe callback is being returned for a given action - // This is the same signature that the "listener" middleware uses - const dummyMiddleware: Middleware< - { - (action: Action<'actionListenerMiddleware/add'>): Unsubscribe - }, - CounterState - > = (storeApi) => (next) => (action) => {} + const store = configureMyStore({}) - const store = configureStore({ - reducer: counterSlice.reducer, - middleware: (gDM) => gDM().prepend(dummyMiddleware), + expectTypeOf(store.dispatch).toBeFunction() }) - // Order matters here! We need the listener type to come first, otherwise - // the thunk middleware type kicks in and TS thinks a plain action is being returned - expectType< - ((action: Action<'actionListenerMiddleware/add'>) => Unsubscribe) & - ThunkDispatch & - Dispatch - >(store.dispatch) + { + interface CounterState { + value: number + } + + const counterSlice = createSlice({ + name: 'counter', + initialState: { value: 0 } as CounterState, + reducers: { + increment(state) { + state.value += 1 + }, + decrement(state) { + state.value -= 1 + }, + // Use the PayloadAction type to declare the contents of `action.payload` + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload + }, + }, + }) - const unsubscribe = store.dispatch({ - type: 'actionListenerMiddleware/add', - } as const) + type Unsubscribe = () => void - expectType(unsubscribe) - } -} + // A fake middleware that tells TS that an unsubscribe callback is being returned for a given action + // This is the same signature that the "listener" middleware uses + const dummyMiddleware: Middleware< + { + (action: Action<'actionListenerMiddleware/add'>): Unsubscribe + }, + CounterState + > = (storeApi) => (next) => (action) => {} + + const store = configureStore({ + reducer: counterSlice.reducer, + middleware: (gDM) => gDM().prepend(dummyMiddleware), + }) + + // Order matters here! We need the listener type to come first, otherwise + // the thunk middleware type kicks in and TS thinks a plain action is being returned + expectTypeOf(store.dispatch).toEqualTypeOf< + ((action: Action<'actionListenerMiddleware/add'>) => Unsubscribe) & + ThunkDispatch & + Dispatch + >() + + const unsubscribe = store.dispatch({ + type: 'actionListenerMiddleware/add', + } as const) + + expectTypeOf(unsubscribe).toEqualTypeOf() + } + }) +}) From 6d577adb397f39af64aa0b40da974e36c3b0d8d3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 16:56:21 -0600 Subject: [PATCH 297/368] Rename `src/tests/createAsyncThunk.typetest.ts` to `src/tests/createAsyncThunk.test-d.ts` --- .../{createAsyncThunk.typetest.ts => createAsyncThunk.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{createAsyncThunk.typetest.ts => createAsyncThunk.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/createAsyncThunk.typetest.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/createAsyncThunk.typetest.ts rename to packages/toolkit/src/tests/createAsyncThunk.test-d.ts From f59488435ba7ff581e9346406a538a49953b8dc8 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 22:08:50 -0600 Subject: [PATCH 298/368] Revert Bumping Prettier for codegen --- packages/rtk-query-codegen-openapi/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rtk-query-codegen-openapi/package.json b/packages/rtk-query-codegen-openapi/package.json index b50139d8c4..475c23fc34 100644 --- a/packages/rtk-query-codegen-openapi/package.json +++ b/packages/rtk-query-codegen-openapi/package.json @@ -59,7 +59,7 @@ "@apidevtools/swagger-parser": "^10.0.2", "commander": "^6.2.0", "oazapfts": "^4.8.0", - "prettier": "^3.2.4", + "prettier": "^2.2.1", "semver": "^7.3.5", "swagger2openapi": "^7.0.4", "typescript": "^5.0.0" diff --git a/yarn.lock b/yarn.lock index ea5ccaa3a1..4ff0bafefc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7423,7 +7423,7 @@ __metadata: msw: ^0.40.2 oazapfts: ^4.8.0 openapi-types: ^9.1.0 - prettier: ^3.2.4 + prettier: ^2.2.1 pretty-quick: ^3.1.0 semver: ^7.3.5 swagger2openapi: ^7.0.4 From 293c66919cd36a6d623f0e49bda1db4272286f2c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 23:52:05 -0600 Subject: [PATCH 299/368] Migrate type tests for `src/tests/createAsyncThunk.test-d.ts` to Vitest --- .../src/tests/createAsyncThunk.test-d.ts | 1627 ++++++++++------- 1 file changed, 939 insertions(+), 688 deletions(-) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index 76d1cbb8ca..d4f5ed3f7b 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-lone-blocks */ import type { AsyncThunk, SerializedError, @@ -13,760 +12,1012 @@ import { } from '@reduxjs/toolkit' import type { ThunkDispatch } from 'redux-thunk' -import type { - AsyncThunkFulfilledActionCreator, - AsyncThunkRejectedActionCreator, -} from '@internal/createAsyncThunk' -import type { IsAny, IsUnknown } from '@internal/tsHelpers' import type { TSVersion } from '@phryneas/ts-version' import type { AxiosError } from 'axios' import apiRequest from 'axios' -import { expectExactType, expectType } from './utils/typeTestHelpers' -const ANY = {} as any const defaultDispatch = (() => {}) as ThunkDispatch<{}, any, UnknownAction> const unknownAction = { type: 'foo' } as UnknownAction -// basic usage -;(async function () { - const async = createAsyncThunk('test', (id: number) => - Promise.resolve(id * 2) - ) +describe('type tests', () => { + test('basic usage', () => { + ;(async function () { + const async = createAsyncThunk('test', (id: number) => + Promise.resolve(id * 2) + ) - const reducer = createReducer({}, (builder) => - builder - .addCase(async.pending, (_, action) => { - expectType>(action) - }) - .addCase(async.fulfilled, (_, action) => { - expectType>(action) - expectType(action.payload) - }) - .addCase(async.rejected, (_, action) => { - expectType>(action) - expectType | undefined>(action.error) - }) - ) + const reducer = createReducer({}, (builder) => + builder + .addCase(async.pending, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType + >() + }) + + .addCase(async.fulfilled, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(action.payload).toBeNumber() + }) + + .addCase(async.rejected, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(action.error).toMatchTypeOf< + Partial | undefined + >() + + assertType | undefined>(action.error) + + expectTypeOf(action.error).not.toEqualTypeOf< + Partial | undefined + >() + }) + ) - const promise = defaultDispatch(async(3)) + const promise = defaultDispatch(async(3)) - expectType(promise.requestId) - expectType(promise.arg) - expectType<(reason?: string) => void>(promise.abort) + expectTypeOf(promise.requestId).toBeString() - const result = await promise + expectTypeOf(promise.arg).toBeNumber() - if (async.fulfilled.match(result)) { - expectType>(result) - // @ts-expect-error - expectType>(result) - } else { - expectType>(result) - // @ts-expect-error - expectType>(result) - } + expectTypeOf(promise.abort).toEqualTypeOf<(reason?: string) => void>() + + const result = await promise + + if (async.fulfilled.match(result)) { + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(result).not.toEqualTypeOf< + ReturnType + >() + } else { + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(result).not.toEqualTypeOf< + ReturnType + >() + } + + promise + .then(unwrapResult) + .then((result) => { + expectTypeOf(result).toBeNumber() + + expectTypeOf(result).not.toEqualTypeOf() + }) + .catch((error) => { + // catch is always any-typed, nothing we can do here + expectTypeOf(error).toBeAny() + }) + })() + }) + + test('More complex usage of thunk args', () => { + ;(async function () { + interface BookModel { + id: string + title: string + } + + type BooksState = BookModel[] + + const fakeBooks: BookModel[] = [ + { id: 'b', title: 'Second' }, + { id: 'a', title: 'First' }, + ] - promise - .then(unwrapResult) - .then((result) => { - expectType(result) + const correctDispatch = (() => {}) as ThunkDispatch< + BookModel[], + { userAPI: Function }, + UnknownAction + > + + // Verify that the the first type args to createAsyncThunk line up right + const fetchBooksTAC = createAsyncThunk< + BookModel[], + number, + { + state: BooksState + extra: { userAPI: Function } + } + >( + 'books/fetch', + async (arg, { getState, dispatch, extra, requestId, signal }) => { + const state = getState() + + expectTypeOf(arg).toBeNumber() + + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(extra).toEqualTypeOf<{ userAPI: Function }>() + + return fakeBooks + } + ) + + correctDispatch(fetchBooksTAC(1)) // @ts-expect-error - expectType(result) - }) - .catch((error) => { - // catch is always any-typed, nothing we can do here - }) -})() - -// More complex usage of thunk args -;(async function () { - interface BookModel { - id: string - title: string - } - - type BooksState = BookModel[] - - const fakeBooks: BookModel[] = [ - { id: 'b', title: 'Second' }, - { id: 'a', title: 'First' }, - ] - - const correctDispatch = (() => {}) as ThunkDispatch< - BookModel[], - { userAPI: Function }, - UnknownAction - > - - // Verify that the the first type args to createAsyncThunk line up right - const fetchBooksTAC = createAsyncThunk< - BookModel[], - number, - { - state: BooksState - extra: { userAPI: Function } + defaultDispatch(fetchBooksTAC(1)) + })() + }) + + test('returning a rejected action from the promise creator is possible', () => { + ;(async () => { + type ReturnValue = { data: 'success' } + type RejectValue = { data: 'error' } + + const fetchBooksTAC = createAsyncThunk< + ReturnValue, + number, + { + rejectValue: RejectValue + } + >('books/fetch', async (arg, { rejectWithValue }) => { + return rejectWithValue({ data: 'error' }) + }) + + const returned = await defaultDispatch(fetchBooksTAC(1)) + if (fetchBooksTAC.rejected.match(returned)) { + expectTypeOf(returned.payload).toEqualTypeOf() + + expectTypeOf(returned.payload).toBeNullable() + } else { + expectTypeOf(returned.payload).toEqualTypeOf() + } + + expectTypeOf(unwrapResult(returned)).toEqualTypeOf() + + expectTypeOf(unwrapResult(returned)).not.toEqualTypeOf() + })() + }) + + test('regression #1156: union return values fall back to allowing only single member', () => { + ;(async () => { + const fn = createAsyncThunk('session/isAdmin', async () => { + const response: boolean = false + return response + }) + })() + }) + + test('Should handle reject with value within a try catch block. Note: this is a sample code taken from #1605', () => { + ;(async () => { + type ResultType = { + text: string + } + const demoPromise = async (): Promise => + new Promise((resolve, _) => resolve({ text: '' })) + const thunk = createAsyncThunk('thunk', async (args, thunkAPI) => { + try { + const result = await demoPromise() + return result + } catch (error) { + return thunkAPI.rejectWithValue(error) + } + }) + createReducer({}, (builder) => + builder.addCase(thunk.fulfilled, (s, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + }) + ) + })() + }) + + test('reject with value', () => { + interface Item { + name: string } - >( - 'books/fetch', - async (arg, { getState, dispatch, extra, requestId, signal }) => { - const state = getState() - - expectType(arg) - expectType(state) - expectType<{ userAPI: Function }>(extra) - return fakeBooks + + interface ErrorFromServer { + error: string } - ) - - correctDispatch(fetchBooksTAC(1)) - // @ts-expect-error - defaultDispatch(fetchBooksTAC(1)) -})() -/** - * returning a rejected action from the promise creator is possible - */ -;(async () => { - type ReturnValue = { data: 'success' } - type RejectValue = { data: 'error' } - - const fetchBooksTAC = createAsyncThunk< - ReturnValue, - number, - { - rejectValue: RejectValue + + interface CallsResponse { + data: Item[] } - >('books/fetch', async (arg, { rejectWithValue }) => { - return rejectWithValue({ data: 'error' }) + + const fetchLiveCallsError = createAsyncThunk< + Item[], + string, + { + rejectValue: ErrorFromServer + } + >('calls/fetchLiveCalls', async (organizationId, { rejectWithValue }) => { + try { + const result = await apiRequest.get( + `organizations/${organizationId}/calls/live/iwill404` + ) + return result.data.data + } catch (err) { + const error: AxiosError = err as any // cast for access to AxiosError properties + if (!error.response) { + // let it be handled as any other unknown error + throw err + } + return rejectWithValue(error.response && error.response.data) + } + }) + + defaultDispatch(fetchLiveCallsError('asd')).then((result) => { + if (fetchLiveCallsError.fulfilled.match(result)) { + //success + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(result.payload).toEqualTypeOf() + } else { + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + if (result.payload) { + // rejected with value + expectTypeOf(result.payload).toEqualTypeOf() + } else { + // rejected by throw + expectTypeOf(result.payload).toBeUndefined() + + expectTypeOf(result.error).toEqualTypeOf() + + expectTypeOf(result.error).not.toBeAny() + } + } + defaultDispatch(fetchLiveCallsError('asd')) + .then((result) => { + expectTypeOf(result.payload).toEqualTypeOf< + Item[] | ErrorFromServer | undefined + >() + + return result + }) + .then(unwrapResult) + .then((unwrapped) => { + expectTypeOf(unwrapped).toEqualTypeOf() + + expectTypeOf( + // @ts-expect-error + unwrapResult(unwrapped) + ).not.toEqualTypeOf() + }) + }) }) - const returned = await defaultDispatch(fetchBooksTAC(1)) - if (fetchBooksTAC.rejected.match(returned)) { - expectType(returned.payload) - expectType(returned.payload!) - } else { - expectType(returned.payload) - } - - expectType(unwrapResult(returned)) - // @ts-expect-error - expectType(unwrapResult(returned)) -})() - -/** - * regression #1156: union return values fall back to allowing only single member - */ -;(async () => { - const fn = createAsyncThunk('session/isAdmin', async () => { - const response: boolean = false - return response + describe('payloadCreator first argument type has impact on asyncThunk argument', () => { + test('asyncThunk has no argument', () => { + const asyncThunk = createAsyncThunk('test', () => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() + + assertType<() => any>(asyncThunk) + + expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + + expectTypeOf(asyncThunk).returns.toBeFunction() + }) + + test('one argument, specified as undefined: asyncThunk has no argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: undefined) => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() + + assertType<() => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() + + expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + }) + + test('one argument, specified as void: asyncThunk has no argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: void) => 0) + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() + + assertType<() => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() + + expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + }) + + test('one argument, specified as optional number: asyncThunk has optional number argument', () => { + // this test will fail with strictNullChecks: false, that is to be expected + // in that case, we have to forbid this behaviour or it will make arguments optional everywhere + const asyncThunk = createAsyncThunk('test', (arg?: number) => 0) + + // Per https://github.com/reduxjs/redux-toolkit/issues/3758#issuecomment-1742152774 , this is a bug in + // TS 5.1 and 5.2, that is fixed in 5.3. Conditionally run the TS assertion here. + type IsTS51Or52 = TSVersion.Major extends 5 + ? TSVersion.Minor extends 1 | 2 + ? true + : false + : false + + type expectedType = IsTS51Or52 extends true + ? (arg: number) => any + : (arg?: number) => any + + expectTypeOf(asyncThunk).toMatchTypeOf() + + assertType(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf() + + // We _should_ be able to call this with no arguments, but we run into that error in 5.1 and 5.2. + // Disabling this for now. + // asyncThunk() + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeString() + }) + + test('one argument, specified as number|undefined: asyncThunk has optional number argument', () => { + // this test will fail with strictNullChecks: false, that is to be expected + // in that case, we have to forbid this behaviour or it will make arguments optional everywhere + const asyncThunk = createAsyncThunk( + 'test', + (arg: number | undefined) => 0 + ) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() + + assertType<(arg?: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).toBeCallableWith(undefined) + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeString() + }) + + test('one argument, specified as number|void: asyncThunk has optional number argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: number | void) => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() + + assertType<(arg?: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).toBeCallableWith(undefined) + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeString() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) + + test('one argument, specified as any: asyncThunk has required any argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: any) => 0) + + expectTypeOf(asyncThunk).parameter(0).toBeAny() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) + + test('one argument, specified as unknown: asyncThunk has required unknown argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: unknown) => 0) + + expectTypeOf(asyncThunk).parameter(0).toBeUnknown() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) + + test('one argument, specified as number: asyncThunk has required number argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: number) => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg: number) => any>() + + assertType<(arg: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg: number) => any>() + + expectTypeOf(asyncThunk).parameter(0).toBeNumber() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + }) + + test('two arguments, first specified as undefined: asyncThunk has no argument', () => { + const asyncThunk = createAsyncThunk( + 'test', + (arg: undefined, thunkApi) => 0 + ) + + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() + + assertType<() => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).parameter(0).toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + // @ts-expect-error cannot be called with an argument, even if the argument is `undefined` + expectTypeOf(asyncThunk).toBeCallableWith(undefined) + + // cannot be called with an argument + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + }) + + test('two arguments, first specified as void: asyncThunk has no argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: void, thunkApi) => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() + + assertType<() => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).parameter(0).toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + + // cannot be called with an argument + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + }) + + test('two arguments, first specified as number|undefined: asyncThunk has optional number argument', () => { + // this test will fail with strictNullChecks: false, that is to be expected + // in that case, we have to forbid this behaviour or it will make arguments optional everywhere + const asyncThunk = createAsyncThunk( + 'test', + (arg: number | undefined, thunkApi) => 0 + ) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() + + assertType<(arg?: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).toBeCallableWith(undefined) + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeString() + }) + + test('two arguments, first specified as number|void: asyncThunk has optional number argument', () => { + const asyncThunk = createAsyncThunk( + 'test', + (arg: number | void, thunkApi) => 0 + ) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() + + assertType<(arg?: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() + + expectTypeOf(asyncThunk).toBeCallableWith() + + expectTypeOf(asyncThunk).toBeCallableWith(undefined) + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeString() + }) + + test('two arguments, first specified as any: asyncThunk has required any argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: any, thunkApi) => 0) + + expectTypeOf(asyncThunk).parameter(0).toBeAny() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) + + test('two arguments, first specified as unknown: asyncThunk has required unknown argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: unknown, thunkApi) => 0) + + expectTypeOf(asyncThunk).parameter(0).toBeUnknown() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) + + test('two arguments, first specified as number: asyncThunk has required number argument', () => { + const asyncThunk = createAsyncThunk('test', (arg: number, thunkApi) => 0) + + expectTypeOf(asyncThunk).toMatchTypeOf<(arg: number) => any>() + + assertType<(arg: number) => any>(asyncThunk) + + expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg: number) => any>() + + expectTypeOf(asyncThunk).parameter(0).toBeNumber() + + expectTypeOf(asyncThunk).toBeCallableWith(5) + + expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + + expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() + + expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() + + expectTypeOf(asyncThunk).parameter(0).not.toBeAny() + + expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + + expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + }) }) -})() - -/** - * Should handle reject withvalue within a try catch block - * - * Note: - * this is a sample code taken from #1605 - * - */ -;(async () => { - type ResultType = { - text: string - } - const demoPromise = async (): Promise => - new Promise((resolve, _) => resolve({ text: '' })) - const thunk = createAsyncThunk('thunk', async (args, thunkAPI) => { - try { - const result = await demoPromise() - return result - } catch (error) { - return thunkAPI.rejectWithValue(error) - } + + test('createAsyncThunk without generics', () => { + const thunk = createAsyncThunk('test', () => { + return 'ret' as const + }) + + expectTypeOf(thunk).toEqualTypeOf>() }) - createReducer({}, (builder) => - builder.addCase(thunk.fulfilled, (s, action) => { - expectType(action.payload) + + test('createAsyncThunk without generics, accessing `api` does not break return type', () => { + const thunk = createAsyncThunk('test', (_: void, api) => { + return 'ret' as const }) - ) -})() - -{ - interface Item { - name: string - } - - interface ErrorFromServer { - error: string - } - - interface CallsResponse { - data: Item[] - } - - const fetchLiveCallsError = createAsyncThunk< - Item[], - string, - { - rejectValue: ErrorFromServer - } - >('calls/fetchLiveCalls', async (organizationId, { rejectWithValue }) => { - try { - const result = await apiRequest.get( - `organizations/${organizationId}/calls/live/iwill404` - ) - return result.data.data - } catch (err) { - let error: AxiosError = err as any // cast for access to AxiosError properties - if (!error.response) { - // let it be handled as any other unknown error - throw err - } - return rejectWithValue(error.response && error.response.data) - } + + expectTypeOf(thunk).toEqualTypeOf>() }) - defaultDispatch(fetchLiveCallsError('asd')).then((result) => { - if (fetchLiveCallsError.fulfilled.match(result)) { - //success - expectType>(result) - expectType(result.payload) - } else { - expectType>(result) - if (result.payload) { - // rejected with value - expectType(result.payload) - } else { - // rejected by throw - expectType(result.payload) - expectType(result.error) - // @ts-expect-error - expectType>(true) + test('createAsyncThunk rejectWithValue without generics: Expect correct return type', () => { + const asyncThunk = createAsyncThunk( + 'test', + (_: void, { rejectWithValue }) => { + try { + return Promise.resolve(true) + } catch (e) { + return rejectWithValue(e) + } } - } - defaultDispatch(fetchLiveCallsError('asd')) + ) + + defaultDispatch(asyncThunk()) .then((result) => { - expectType(result.payload) - // @ts-expect-error - expectType(unwrapped) + if (asyncThunk.fulfilled.match(result)) { + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(result.payload).toBeBoolean() + + expectTypeOf(result).not.toHaveProperty('error') + } else { + expectTypeOf(result).toEqualTypeOf< + ReturnType + >() + + expectTypeOf(result.error).toEqualTypeOf() + + expectTypeOf(result.payload).toBeUnknown() + } + return result }) .then(unwrapResult) .then((unwrapped) => { - expectType(unwrapped) - // @ts-expect-error - expectType(unwrapResult(unwrapped)) + expectTypeOf(unwrapped).toBeBoolean() }) }) -} - -/** - * payloadCreator first argument type has impact on asyncThunk argument - */ -{ - // no argument: asyncThunk has no argument - { - const asyncThunk = createAsyncThunk('test', () => 0) - expectType<() => any>(asyncThunk) - // @ts-expect-error cannot be called with an argument - asyncThunk(0 as any) - } - - // one argument, specified as undefined: asyncThunk has no argument - { - const asyncThunk = createAsyncThunk('test', (arg: undefined) => 0) - expectType<() => any>(asyncThunk) - // @ts-expect-error cannot be called with an argument - asyncThunk(0 as any) - } - - // one argument, specified as void: asyncThunk has no argument - { - const asyncThunk = createAsyncThunk('test', (arg: void) => 0) - expectType<() => any>(asyncThunk) - // @ts-expect-error cannot be called with an argument - asyncThunk(0 as any) - } - - // one argument, specified as optional number: asyncThunk has optional number argument - // this test will fail with strictNullChecks: false, that is to be expected - // in that case, we have to forbid this behaviour or it will make arguments optional everywhere - { - const asyncThunk = createAsyncThunk('test', (arg?: number) => 0) - - // Per https://github.com/reduxjs/redux-toolkit/issues/3758#issuecomment-1742152774 , this is a bug in - // TS 5.1 and 5.2, that is fixed in 5.3. Conditionally run the TS assertion here. - type IsTS51Or52 = TSVersion.Major extends 5 - ? TSVersion.Minor extends 1 | 2 - ? true - : false - : false - - type expectedType = IsTS51Or52 extends true - ? (arg: number) => any - : (arg?: number) => any - expectType(asyncThunk) - // We _should_ be able to call this with no arguments, but we run into that error in 5.1 and 5.2. - // Disabling this for now. - // asyncThunk() - asyncThunk(5) - // @ts-expect-error - asyncThunk('string') - } - - // one argument, specified as number|undefined: asyncThunk has optional number argument - // this test will fail with strictNullChecks: false, that is to be expected - // in that case, we have to forbid this behaviour or it will make arguments optional everywhere - { - const asyncThunk = createAsyncThunk('test', (arg: number | undefined) => 0) - expectType<(arg?: number) => any>(asyncThunk) - asyncThunk() - asyncThunk(5) - // @ts-expect-error - asyncThunk('string') - } - - // one argument, specified as number|void: asyncThunk has optional number argument - { - const asyncThunk = createAsyncThunk('test', (arg: number | void) => 0) - expectType<(arg?: number) => any>(asyncThunk) - asyncThunk() - asyncThunk(5) + + test('createAsyncThunk with generics', () => { + type Funky = { somethingElse: 'Funky!' } + function funkySerializeError(err: any): Funky { + return { somethingElse: 'Funky!' } + } + + // has to stay on one line or type tests fail in older TS versions + // prettier-ignore // @ts-expect-error - asyncThunk('string') - } - - // one argument, specified as any: asyncThunk has required any argument - { - const asyncThunk = createAsyncThunk('test', (arg: any) => 0) - expectType[0], true, false>>(true) - asyncThunk(5) + const shouldFail = createAsyncThunk('without generics', () => {}, { serializeError: funkySerializeError }) + + const shouldWork = createAsyncThunk< + any, + void, + { serializedErrorType: Funky } + >('with generics', () => {}, { + serializeError: funkySerializeError, + }) + + if (shouldWork.rejected.match(unknownAction)) { + expectTypeOf(unknownAction.error).toEqualTypeOf() + } + }) + + test('`idGenerator` option takes no arguments, and returns a string', () => { + const returnsNumWithArgs = (foo: any) => 100 + // has to stay on one line or type tests fail in older TS versions + // prettier-ignore // @ts-expect-error - asyncThunk() - } - - // one argument, specified as unknown: asyncThunk has required unknown argument - { - const asyncThunk = createAsyncThunk('test', (arg: unknown) => 0) - expectType[0], true, false>>(true) - asyncThunk(5) + const shouldFailNumWithArgs = createAsyncThunk('foo', () => {}, { idGenerator: returnsNumWithArgs }) + + const returnsNumWithoutArgs = () => 100 + // prettier-ignore // @ts-expect-error - asyncThunk() - } - - // one argument, specified as number: asyncThunk has required number argument - { - const asyncThunk = createAsyncThunk('test', (arg: number) => 0) - expectType<(arg: number) => any>(asyncThunk) - asyncThunk(5) + const shouldFailNumWithoutArgs = createAsyncThunk('foo', () => {}, { idGenerator: returnsNumWithoutArgs }) + + const returnsStrWithNumberArg = (foo: number) => 'foo' + // prettier-ignore // @ts-expect-error - asyncThunk() - } - - // two arguments, first specified as undefined: asyncThunk has no argument - { - const asyncThunk = createAsyncThunk('test', (arg: undefined, thunkApi) => 0) - expectType<() => any>(asyncThunk) - // @ts-expect-error cannot be called with an argument - asyncThunk(0 as any) - } - - // two arguments, first specified as void: asyncThunk has no argument - { - const asyncThunk = createAsyncThunk('test', (arg: void, thunkApi) => 0) - expectType<() => any>(asyncThunk) - // @ts-expect-error cannot be called with an argument - asyncThunk(0 as any) - } - - // two arguments, first specified as number|undefined: asyncThunk has optional number argument - // this test will fail with strictNullChecks: false, that is to be expected - // in that case, we have to forbid this behaviour or it will make arguments optional everywhere - { - const asyncThunk = createAsyncThunk( - 'test', - (arg: number | undefined, thunkApi) => 0 + const shouldFailWrongArgs = createAsyncThunk('foo', (arg: string) => {}, { idGenerator: returnsStrWithNumberArg }) + + const returnsStrWithStringArg = (foo: string) => 'foo' + const shoulducceedCorrectArgs = createAsyncThunk( + 'foo', + (arg: string) => {}, + { + idGenerator: returnsStrWithStringArg, + } ) - expectType<(arg?: number) => any>(asyncThunk) - asyncThunk() - asyncThunk(5) - // @ts-expect-error - asyncThunk('string') - } - // two arguments, first specified as number|void: asyncThunk has optional number argument - { - const asyncThunk = createAsyncThunk( - 'test', - (arg: number | void, thunkApi) => 0 - ) - expectType<(arg?: number) => any>(asyncThunk) - asyncThunk() - asyncThunk(5) - // @ts-expect-error - asyncThunk('string') - } - - // two arguments, first specified as any: asyncThunk has required any argument - { - const asyncThunk = createAsyncThunk('test', (arg: any, thunkApi) => 0) - expectType[0], true, false>>(true) - asyncThunk(5) - // @ts-expect-error - asyncThunk() - } - - // two arguments, first specified as unknown: asyncThunk has required unknown argument - { - const asyncThunk = createAsyncThunk('test', (arg: unknown, thunkApi) => 0) - expectType[0], true, false>>(true) - asyncThunk(5) - // @ts-expect-error - asyncThunk() - } - - // two arguments, first specified as number: asyncThunk has required number argument - { - const asyncThunk = createAsyncThunk('test', (arg: number, thunkApi) => 0) - expectType<(arg: number) => any>(asyncThunk) - asyncThunk(5) - // @ts-expect-error - asyncThunk() - } -} - -{ - // createAsyncThunk without generics - const thunk = createAsyncThunk('test', () => { - return 'ret' as const - }) - expectType>(thunk) -} - -{ - // createAsyncThunk without generics, accessing `api` does not break return type - const thunk = createAsyncThunk('test', (_: void, api) => { - console.log(api) - return 'ret' as const + const returnsStrWithoutArgs = () => 'foo' + const shouldSucceed = createAsyncThunk('foo', () => {}, { + idGenerator: returnsStrWithoutArgs, + }) }) - expectType>(thunk) -} - -// createAsyncThunk rejectWithValue without generics: Expect correct return type -{ - const asyncThunk = createAsyncThunk( - 'test', - (_: void, { rejectWithValue }) => { - try { - return Promise.resolve(true) - } catch (e) { - return rejectWithValue(e) - } + + test('fulfillWithValue should infer return value', () => { + // https://github.com/reduxjs/redux-toolkit/issues/2886 + + const initialState = { + loading: false, + obj: { magic: '' }, } - ) - defaultDispatch(asyncThunk()) - .then((result) => { - if (asyncThunk.fulfilled.match(result)) { - expectType>>( - result - ) - expectType(result.payload) - // @ts-expect-error - expectType(result.error) - } else { - expectType>>( - result - ) - expectType(result.error) - expectType(result.payload) + const getObj = createAsyncThunk( + 'slice/getObj', + async (_: any, { fulfillWithValue, rejectWithValue }) => { + try { + return fulfillWithValue({ magic: 'object' }) + } catch (rejected: any) { + return rejectWithValue(rejected?.response?.error || rejected) + } } + ) - return result - }) - .then(unwrapResult) - .then((unwrapped) => { - expectType(unwrapped) + createSlice({ + name: 'slice', + initialState, + reducers: {}, + extraReducers: (builder) => { + builder.addCase(getObj.fulfilled, (state, action) => { + expectTypeOf(action.payload).toEqualTypeOf<{ magic: string }>() + }) + }, }) -} - -{ - type Funky = { somethingElse: 'Funky!' } - function funkySerializeError(err: any): Funky { - return { somethingElse: 'Funky!' } - } - - // has to stay on one line or type tests fail in older TS versions - // prettier-ignore - // @ts-expect-error - const shouldFail = createAsyncThunk('without generics', () => {}, { serializeError: funkySerializeError }) - - const shouldWork = createAsyncThunk< - any, - void, - { serializedErrorType: Funky } - >('with generics', () => {}, { - serializeError: funkySerializeError, }) - if (shouldWork.rejected.match(unknownAction)) { - expectType(unknownAction.error) - } -} - -/** - * `idGenerator` option takes no arguments, and returns a string - */ -{ - const returnsNumWithArgs = (foo: any) => 100 - // has to stay on one line or type tests fail in older TS versions - // prettier-ignore - // @ts-expect-error - const shouldFailNumWithArgs = createAsyncThunk('foo', () => {}, { idGenerator: returnsNumWithArgs }) - - const returnsNumWithoutArgs = () => 100 - // prettier-ignore - // @ts-expect-error - const shouldFailNumWithoutArgs = createAsyncThunk('foo', () => {}, { idGenerator: returnsNumWithoutArgs }) - - const returnsStrWithNumberArg = (foo: number) => 'foo' - // prettier-ignore - // @ts-expect-error - const shouldFailWrongArgs = createAsyncThunk('foo', (arg: string) => {}, { idGenerator: returnsStrWithNumberArg }) - - const returnsStrWithStringArg = (foo: string) => 'foo' - const shoulducceedCorrectArgs = createAsyncThunk('foo', (arg: string) => {}, { - idGenerator: returnsStrWithStringArg, - }) + test('meta return values', () => { + // return values + createAsyncThunk<'ret', void, {}>('test', (_, api) => 'ret' as const) + createAsyncThunk<'ret', void, {}>('test', async (_, api) => 'ret' as const) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>('test', (_, api) => + api.fulfillWithValue('ret' as const, '') + ) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>( + 'test', + async (_, api) => api.fulfillWithValue('ret' as const, '') + ) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>( + 'test', + // @ts-expect-error has to be a fulfilledWithValue call + (_, api) => 'ret' as const + ) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>( + 'test', + // @ts-expect-error has to be a fulfilledWithValue call + async (_, api) => 'ret' as const + ) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>( + 'test', // @ts-expect-error should only allow returning with 'test' + (_, api) => api.fulfillWithValue(5, '') + ) + createAsyncThunk<'ret', void, { fulfilledMeta: string }>( + 'test', // @ts-expect-error should only allow returning with 'test' + async (_, api) => api.fulfillWithValue(5, '') + ) - const returnsStrWithoutArgs = () => 'foo' - const shouldSucceed = createAsyncThunk('foo', () => {}, { - idGenerator: returnsStrWithoutArgs, + // reject values + createAsyncThunk<'ret', void, { rejectValue: string }>('test', (_, api) => + api.rejectWithValue('ret') + ) + createAsyncThunk<'ret', void, { rejectValue: string }>( + 'test', + async (_, api) => api.rejectWithValue('ret') + ) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >('test', (_, api) => api.rejectWithValue('ret', 5)) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >('test', async (_, api) => api.rejectWithValue('ret', 5)) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >('test', (_, api) => api.rejectWithValue('ret', 5)) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >( + 'test', + // @ts-expect-error wrong rejectedMeta type + (_, api) => api.rejectWithValue('ret', '') + ) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >( + 'test', + // @ts-expect-error wrong rejectedMeta type + async (_, api) => api.rejectWithValue('ret', '') + ) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >( + 'test', + // @ts-expect-error wrong rejectValue type + (_, api) => api.rejectWithValue(5, '') + ) + createAsyncThunk< + 'ret', + void, + { rejectValue: string; rejectedMeta: number } + >( + 'test', + // @ts-expect-error wrong rejectValue type + async (_, api) => api.rejectWithValue(5, '') + ) }) -} -{ - // https://github.com/reduxjs/redux-toolkit/issues/2886 - // fulfillWithValue should infer return value + test('usage with config override generic', () => { + const typedCAT = createAsyncThunk.withTypes<{ + state: RootState + dispatch: AppDispatch + rejectValue: string + extra: { s: string; n: number } + }>() - const initialState = { - loading: false, - obj: { magic: '' }, - } + // inferred usage + const thunk = typedCAT('foo', (arg: number, api) => { + // correct getState Type + const test1: number = api.getState().foo.value + // correct dispatch type + const test2: number = api.dispatch((dispatch, getState) => { + expectTypeOf(dispatch).toEqualTypeOf< + ThunkDispatch<{ foo: { value: number } }, undefined, UnknownAction> + >() - const getObj = createAsyncThunk( - 'slice/getObj', - async (_: any, { fulfillWithValue, rejectWithValue }) => { - try { - return fulfillWithValue({ magic: 'object' }) - } catch (rejected: any) { - return rejectWithValue(rejected?.response?.error || rejected) - } - } - ) - - createSlice({ - name: 'slice', - initialState, - reducers: {}, - extraReducers: (builder) => { - builder.addCase(getObj.fulfilled, (state, action) => { - expectExactType<{ magic: string }>(ANY)(action.payload) + expectTypeOf(getState).toEqualTypeOf<() => { foo: { value: number } }>() + + return getState().foo.value }) - }, - }) -} - -// meta return values -{ - // return values - createAsyncThunk<'ret', void, {}>('test', (_, api) => 'ret' as const) - createAsyncThunk<'ret', void, {}>('test', async (_, api) => 'ret' as const) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>('test', (_, api) => - api.fulfillWithValue('ret' as const, '') - ) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>( - 'test', - async (_, api) => api.fulfillWithValue('ret' as const, '') - ) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>( - 'test', - // @ts-expect-error has to be a fulfilledWithValue call - (_, api) => 'ret' as const - ) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>( - 'test', - // @ts-expect-error has to be a fulfilledWithValue call - async (_, api) => 'ret' as const - ) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>( - 'test', // @ts-expect-error should only allow returning with 'test' - (_, api) => api.fulfillWithValue(5, '') - ) - createAsyncThunk<'ret', void, { fulfilledMeta: string }>( - 'test', // @ts-expect-error should only allow returning with 'test' - async (_, api) => api.fulfillWithValue(5, '') - ) - - // reject values - createAsyncThunk<'ret', void, { rejectValue: string }>('test', (_, api) => - api.rejectWithValue('ret') - ) - createAsyncThunk<'ret', void, { rejectValue: string }>( - 'test', - async (_, api) => api.rejectWithValue('ret') - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - (_, api) => api.rejectWithValue('ret', 5) - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - async (_, api) => api.rejectWithValue('ret', 5) - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - (_, api) => api.rejectWithValue('ret', 5) - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - // @ts-expect-error wrong rejectedMeta type - (_, api) => api.rejectWithValue('ret', '') - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - // @ts-expect-error wrong rejectedMeta type - async (_, api) => api.rejectWithValue('ret', '') - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - // @ts-expect-error wrong rejectValue type - (_, api) => api.rejectWithValue(5, '') - ) - createAsyncThunk<'ret', void, { rejectValue: string; rejectedMeta: number }>( - 'test', - // @ts-expect-error wrong rejectValue type - async (_, api) => api.rejectWithValue(5, '') - ) -} - -{ - const typedCAT = createAsyncThunk.withTypes<{ - state: RootState - dispatch: AppDispatch - rejectValue: string - extra: { s: string; n: number } - }>() - - // inferred usage - const thunk = typedCAT('foo', (arg: number, api) => { - // correct getState Type - const test1: number = api.getState().foo.value - // correct dispatch type - const test2: number = api.dispatch((dispatch, getState) => { - expectExactType< - ThunkDispatch<{ foo: { value: number } }, undefined, UnknownAction> - >(ANY)(dispatch) - expectExactType<() => { foo: { value: number } }>(ANY)(getState) - return getState().foo.value - }) - // correct extra type - const { s, n } = api.extra - expectExactType(ANY)(s) - expectExactType(ANY)(n) + // correct extra type + const { s, n } = api.extra + + expectTypeOf(s).toBeString() - if (1 < 2) - // @ts-expect-error - return api.rejectWithValue(5) - if (1 < 2) return api.rejectWithValue('test') - return test1 + test2 - }) + expectTypeOf(n).toBeNumber() - // usage with two generics - const thunk2 = typedCAT('foo', (arg, api) => { - expectExactType('' as string)(arg) - // correct getState Type - const test1: number = api.getState().foo.value - // correct dispatch type - const test2: number = api.dispatch((dispatch, getState) => { - expectExactType< - ThunkDispatch<{ foo: { value: number } }, undefined, UnknownAction> - >(ANY)(dispatch) - expectExactType<() => { foo: { value: number } }>(ANY)(getState) - return getState().foo.value + if (1 < 2) + // @ts-expect-error + return api.rejectWithValue(5) + if (1 < 2) return api.rejectWithValue('test') + return test1 + test2 }) - // correct extra type - const { s, n } = api.extra - expectExactType(ANY)(s) - expectExactType(ANY)(n) - if (1 < 2) - // @ts-expect-error - return api.rejectWithValue(5) - if (1 < 2) return api.rejectWithValue('test') - return test1 + test2 - }) + // usage with two generics + const thunk2 = typedCAT('foo', (arg, api) => { + expectTypeOf(arg).toBeString() - // usage with config override generic - const thunk3 = typedCAT( - 'foo', - (arg, api) => { - expectExactType('' as string)(arg) // correct getState Type const test1: number = api.getState().foo.value // correct dispatch type const test2: number = api.dispatch((dispatch, getState) => { - expectExactType< + expectTypeOf(dispatch).toEqualTypeOf< ThunkDispatch<{ foo: { value: number } }, undefined, UnknownAction> - >(ANY)(dispatch) - expectExactType<() => { foo: { value: number } }>(ANY)(getState) + >() + + expectTypeOf(getState).toEqualTypeOf<() => { foo: { value: number } }>() + return getState().foo.value }) // correct extra type const { s, n } = api.extra - expectExactType(ANY)(s) - expectExactType(ANY)(n) - if (1 < 2) return api.rejectWithValue(5) - if (1 < 2) - // @ts-expect-error - return api.rejectWithValue('test') - return 5 - } - ) - - const slice = createSlice({ - name: 'foo', - initialState: { value: 0 }, - reducers: {}, - extraReducers(builder) { - builder - .addCase(thunk.fulfilled, (state, action) => { - state.value += action.payload - }) - .addCase(thunk.rejected, (state, action) => { - expectExactType('' as string | undefined)(action.payload) - }) - .addCase(thunk2.fulfilled, (state, action) => { - state.value += action.payload - }) - .addCase(thunk2.rejected, (state, action) => { - expectExactType('' as string | undefined)(action.payload) - }) - .addCase(thunk3.fulfilled, (state, action) => { - state.value += action.payload - }) - .addCase(thunk3.rejected, (state, action) => { - expectExactType(0 as number | undefined)(action.payload) + + expectTypeOf(s).toBeString() + + expectTypeOf(n).toBeNumber() + + if (1 < 2) expectTypeOf(api.rejectWithValue).toBeCallableWith('test') + + expectTypeOf(api.rejectWithValue).parameter(0).not.toBeNumber() + + expectTypeOf(api.rejectWithValue).parameters.toEqualTypeOf<[string]>() + + return api.rejectWithValue('test') + }) + + // usage with config override generic + const thunk3 = typedCAT( + 'foo', + (arg, api) => { + expectTypeOf(arg).toBeString() + + // correct getState Type + const test1: number = api.getState().foo.value + // correct dispatch type + const test2: number = api.dispatch((dispatch, getState) => { + expectTypeOf(dispatch).toEqualTypeOf< + ThunkDispatch<{ foo: { value: number } }, undefined, UnknownAction> + >() + + expectTypeOf(getState).toEqualTypeOf< + () => { foo: { value: number } } + >() + + return getState().foo.value }) - }, - }) + // correct extra type + const { s, n } = api.extra - const store = configureStore({ - reducer: { - foo: slice.reducer, - }, - }) + expectTypeOf(s).toBeString() + + expectTypeOf(n).toBeNumber() - type RootState = ReturnType - type AppDispatch = typeof store.dispatch -} + if (1 < 2) return api.rejectWithValue(5) + if (1 < 2) expectTypeOf(api.rejectWithValue).toBeCallableWith(5) + + expectTypeOf(api.rejectWithValue).parameter(0).not.toBeString() + + expectTypeOf(api.rejectWithValue).parameters.toEqualTypeOf<[number]>() + + return api.rejectWithValue(5) + } + ) + + const slice = createSlice({ + name: 'foo', + initialState: { value: 0 }, + reducers: {}, + extraReducers(builder) { + builder + .addCase(thunk.fulfilled, (state, action) => { + state.value += action.payload + }) + .addCase(thunk.rejected, (state, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + }) + .addCase(thunk2.fulfilled, (state, action) => { + state.value += action.payload + }) + .addCase(thunk2.rejected, (state, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + }) + .addCase(thunk3.fulfilled, (state, action) => { + state.value += action.payload + }) + .addCase(thunk3.rejected, (state, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + }) + }, + }) + + const store = configureStore({ + reducer: { + foo: slice.reducer, + }, + }) + + type RootState = ReturnType + type AppDispatch = typeof store.dispatch + }) +}) From bf09e943dd70d515ab588f4df70e2039d7aa18cf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 26 Jan 2024 23:52:45 -0600 Subject: [PATCH 300/368] Rename `src/tests/createEntityAdapter.typetest.ts` to `src/tests/createEntityAdapter.test-d.ts` --- ...ateEntityAdapter.typetest.ts => createEntityAdapter.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{createEntityAdapter.typetest.ts => createEntityAdapter.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/createEntityAdapter.typetest.ts b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/createEntityAdapter.typetest.ts rename to packages/toolkit/src/tests/createEntityAdapter.test-d.ts From 7a7fc95f3ea833b0c0594ef652838cb73b43311d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 00:16:36 -0600 Subject: [PATCH 301/368] Migrate type tests for `src/tests/createEntityAdapter.test-d.ts` to Vitest --- .../src/tests/createEntityAdapter.test-d.ts | 357 ++++++++++++------ 1 file changed, 236 insertions(+), 121 deletions(-) diff --git a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts index 0e2b9a45ec..732936076e 100644 --- a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts +++ b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts @@ -7,7 +7,6 @@ import type { Update, } from '@reduxjs/toolkit' import { createEntityAdapter, createSlice } from '@reduxjs/toolkit' -import { expectType } from './utils/typeTestHelpers' function extractReducers( adapter: EntityAdapter @@ -17,132 +16,248 @@ function extractReducers( return rest } -/** - * should be usable in a slice, with all the "reducer-like" functions - */ -{ - type Id = string & { readonly __tag: unique symbol } - type Entity = { - id: Id - } - const adapter = createEntityAdapter() - const slice = createSlice({ - name: 'test', - initialState: adapter.getInitialState(), - reducers: { - ...extractReducers(adapter), - }, - }) +describe('type tests', () => { + test('should be usable in a slice, with all the "reducer-like" functions', () => { + type Id = string & { readonly __tag: unique symbol } + type Entity = { + id: Id + } + const adapter = createEntityAdapter() + const slice = createSlice({ + name: 'test', + initialState: adapter.getInitialState(), + reducers: { + ...extractReducers(adapter), + }, + }) - expectType>(slice.actions.addOne) - expectType< - ActionCreatorWithPayload | Record> - >(slice.actions.addMany) - expectType< - ActionCreatorWithPayload | Record> - >(slice.actions.setAll) - expectType>>( - // @ts-expect-error - slice.actions.addMany - ) - expectType>>( - // @ts-expect-error - slice.actions.setAll - ) - expectType>(slice.actions.removeOne) - expectType>>( - slice.actions.removeMany - ) - // @ts-expect-error - expectType>(slice.actions.removeMany) - expectType(slice.actions.removeAll) - expectType>>( - slice.actions.updateOne - ) - expectType[]>>( - // @ts-expect-error - slice.actions.updateMany - ) - expectType>>>( - slice.actions.updateMany - ) - expectType>(slice.actions.upsertOne) - expectType< - ActionCreatorWithPayload | Record> - >(slice.actions.upsertMany) - expectType>>( - // @ts-expect-error - slice.actions.upsertMany - ) -} + expectTypeOf(slice.actions.addOne).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(slice.actions.addOne) + + expectTypeOf(slice.actions.addOne).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(slice.actions.addMany).toMatchTypeOf< + ActionCreatorWithPayload | Record> + >() + + assertType< + ActionCreatorWithPayload | Record> + >(slice.actions.addMany) + + expectTypeOf(slice.actions.addMany).not.toEqualTypeOf< + ActionCreatorWithPayload | Record> + >() + + expectTypeOf(slice.actions.setAll).toMatchTypeOf< + ActionCreatorWithPayload | Record> + >() + + assertType< + ActionCreatorWithPayload | Record> + >(slice.actions.setAll) + + expectTypeOf(slice.actions.setAll).not.toEqualTypeOf< + ActionCreatorWithPayload | Record> + >() + + expectTypeOf(slice.actions.removeOne).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(slice.actions.removeOne) + + expectTypeOf(slice.actions.removeOne).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(slice.actions.addMany).not.toMatchTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.addMany).not.toEqualTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.setAll).not.toMatchTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.setAll).not.toEqualTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.removeOne).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(slice.actions.removeOne) + + expectTypeOf(slice.actions.removeOne).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(slice.actions.removeMany).toMatchTypeOf< + ActionCreatorWithPayload> + >() + + assertType>>( + slice.actions.removeMany + ) + + expectTypeOf(slice.actions.removeMany).not.toEqualTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.removeMany).not.toMatchTypeOf< + ActionCreatorWithPayload + >() -/** - * should not be able to mix with a different EntityAdapter - */ -{ - type Entity = { - id: EntityId - value: string - } - type Entity2 = { - id: EntityId - value2: string - } - const adapter = createEntityAdapter() - const adapter2 = createEntityAdapter() - createSlice({ - name: 'test', - initialState: adapter.getInitialState(), - reducers: { - addOne: adapter.addOne, - // @ts-expect-error - addOne2: adapter2.addOne, - }, + expectTypeOf(slice.actions.removeMany).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf( + slice.actions.removeAll + ).toMatchTypeOf() + + expectTypeOf( + slice.actions.removeAll + ).not.toEqualTypeOf() + + expectTypeOf(slice.actions.updateOne).toMatchTypeOf< + ActionCreatorWithPayload> + >() + + assertType>>( + slice.actions.updateOne + ) + + expectTypeOf(slice.actions.updateOne).not.toEqualTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.updateMany).not.toMatchTypeOf< + ActionCreatorWithPayload[]> + >() + + expectTypeOf(slice.actions.updateMany).not.toEqualTypeOf< + ActionCreatorWithPayload[]> + >() + + expectTypeOf(slice.actions.upsertOne).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(slice.actions.upsertOne) + + expectTypeOf(slice.actions.upsertOne).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(slice.actions.updateMany).toMatchTypeOf< + ActionCreatorWithPayload>> + >() + + assertType>>>( + slice.actions.updateMany + ) + + expectTypeOf(slice.actions.updateMany).not.toEqualTypeOf< + ActionCreatorWithPayload>> + >() + + expectTypeOf(slice.actions.upsertOne).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(slice.actions.upsertOne) + + expectTypeOf(slice.actions.upsertOne).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(slice.actions.upsertMany).toMatchTypeOf< + ActionCreatorWithPayload | Record> + >() + + assertType< + ActionCreatorWithPayload | Record> + >(slice.actions.upsertMany) + + expectTypeOf(slice.actions.upsertMany).not.toEqualTypeOf< + ActionCreatorWithPayload | Record> + >() + + expectTypeOf(slice.actions.upsertMany).not.toMatchTypeOf< + ActionCreatorWithPayload> + >() + + expectTypeOf(slice.actions.upsertMany).not.toEqualTypeOf< + ActionCreatorWithPayload> + >() }) -} -/** - * should be usable in a slice with extra properties - */ -{ - type Entity = { id: EntityId; value: string } - const adapter = createEntityAdapter() - createSlice({ - name: 'test', - initialState: adapter.getInitialState({ extraData: 'test' }), - reducers: { - addOne: adapter.addOne, - }, + test('should not be able to mix with a different EntityAdapter', () => { + type Entity = { + id: EntityId + value: string + } + type Entity2 = { + id: EntityId + value2: string + } + const adapter = createEntityAdapter() + const adapter2 = createEntityAdapter() + createSlice({ + name: 'test', + initialState: adapter.getInitialState(), + reducers: { + addOne: adapter.addOne, + // @ts-expect-error + addOne2: adapter2.addOne, + }, + }) }) -} -/** - * should not be usable in a slice with an unfitting state - */ -{ - type Entity = { id: EntityId; value: string } - const adapter = createEntityAdapter() - createSlice({ - name: 'test', - initialState: { somethingElse: '' }, - reducers: { - // @ts-expect-error - addOne: adapter.addOne, - }, + test('should be usable in a slice with extra properties', () => { + type Entity = { id: EntityId; value: string } + const adapter = createEntityAdapter() + createSlice({ + name: 'test', + initialState: adapter.getInitialState({ extraData: 'test' }), + reducers: { + addOne: adapter.addOne, + }, + }) }) -} -/** - * should not be able to create an adapter unless the type has an Id - * or an idSelector is provided - */ -{ - type Entity = { - value: string - } - // @ts-expect-error - const adapter = createEntityAdapter() - const adapter2: EntityAdapter = createEntityAdapter({ - selectId: (e: Entity) => e.value, + test('should not be usable in a slice with an unfitting state', () => { + type Entity = { id: EntityId; value: string } + const adapter = createEntityAdapter() + createSlice({ + name: 'test', + initialState: { somethingElse: '' }, + reducers: { + // @ts-expect-error + addOne: adapter.addOne, + }, + }) }) -} + + test('should not be able to create an adapter unless the type has an Id or an idSelector is provided', () => { + type Entity = { + value: string + } + // @ts-expect-error + const adapter = createEntityAdapter() + const adapter2: EntityAdapter = + createEntityAdapter({ + selectId: (e: Entity) => e.value, + }) + }) +}) From 1ac69c13512d0fa745661e2881cbbea1776a5648 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 00:17:10 -0600 Subject: [PATCH 302/368] Rename `src/tests/createReducer.typetest.ts` to `src/tests/createReducer.test-d.ts` --- .../tests/{createReducer.typetest.ts => createReducer.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{createReducer.typetest.ts => createReducer.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/createReducer.typetest.ts b/packages/toolkit/src/tests/createReducer.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/createReducer.typetest.ts rename to packages/toolkit/src/tests/createReducer.test-d.ts From 6d309df75381c6594f342d9996515b835ecca5e9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 00:21:50 -0600 Subject: [PATCH 303/368] Migrate type tests for `src/tests/createReducer.test-d.ts` to Vitest --- .../toolkit/src/tests/createReducer.test-d.ts | 119 ++++++++---------- 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/packages/toolkit/src/tests/createReducer.test-d.ts b/packages/toolkit/src/tests/createReducer.test-d.ts index 90228dcedd..c0a1e04f70 100644 --- a/packages/toolkit/src/tests/createReducer.test-d.ts +++ b/packages/toolkit/src/tests/createReducer.test-d.ts @@ -1,84 +1,75 @@ import type { ActionReducerMapBuilder } from '@reduxjs/toolkit' import { createAction, createReducer } from '@reduxjs/toolkit' import type { Reducer } from 'redux' -import { expectType } from './utils/typeTestHelpers' -/* - * Test: createReducer() infers type of returned reducer. - */ -{ - const incrementHandler = ( - state: number, - action: { type: 'increment'; payload: number } - ) => state + 1 - const decrementHandler = ( - state: number, - action: { type: 'decrement'; payload: number } - ) => state - 1 +describe('type tests', () => { + test('createReducer() infers type of returned reducer.', () => { + const incrementHandler = ( + state: number, + action: { type: 'increment'; payload: number } + ) => state + 1 + const decrementHandler = ( + state: number, + action: { type: 'decrement'; payload: number } + ) => state - 1 - const reducer = createReducer(0 as number, (builder) => { - builder - .addCase('increment', incrementHandler) - .addCase('decrement', decrementHandler) - }) + const reducer = createReducer(0 as number, (builder) => { + builder + .addCase('increment', incrementHandler) + .addCase('decrement', decrementHandler) + }) - const numberReducer: Reducer = reducer + const numberReducer: Reducer = reducer - // @ts-expect-error - const stringReducer: Reducer = reducer -} + // @ts-expect-error + const stringReducer: Reducer = reducer + }) -/** - * Test: createReducer() state type can be specified expliclity. - */ -{ - const incrementHandler = ( - state: number, - action: { type: 'increment'; payload: number } - ) => state + action.payload + test('createReducer() state type can be specified expliclity.', () => { + const incrementHandler = ( + state: number, + action: { type: 'increment'; payload: number } + ) => state + action.payload - const decrementHandler = ( - state: number, - action: { type: 'decrement'; payload: number } - ) => state - action.payload + const decrementHandler = ( + state: number, + action: { type: 'decrement'; payload: number } + ) => state - action.payload - createReducer(0 as number, (builder) => { - builder - .addCase('increment', incrementHandler) - .addCase('decrement', decrementHandler) - }) + createReducer(0 as number, (builder) => { + builder + .addCase('increment', incrementHandler) + .addCase('decrement', decrementHandler) + }) - // @ts-expect-error - createReducer(0 as number, (builder) => { // @ts-expect-error - builder - .addCase('increment', incrementHandler) - .addCase('decrement', decrementHandler) + createReducer(0 as number, (builder) => { + // @ts-expect-error + builder + .addCase('increment', incrementHandler) + .addCase('decrement', decrementHandler) + }) }) -} -/* - * Test: createReducer() ensures state type is mutable within a case reducer. - */ -{ - const initialState: { readonly counter: number } = { counter: 0 } + test('createReducer() ensures state type is mutable within a case reducer.', () => { + const initialState: { readonly counter: number } = { counter: 0 } - createReducer(initialState, (builder) => { - builder.addCase('increment', (state) => { - state.counter += 1 + createReducer(initialState, (builder) => { + builder.addCase('increment', (state) => { + state.counter += 1 + }) }) }) -} -/** Test: builder callback for actionMap */ -{ - const increment = createAction('increment') + test('builder callback for actionMap', () => { + const increment = createAction('increment') - const reducer = createReducer(0, (builder) => - expectType>(builder) - ) + const reducer = createReducer(0, (builder) => + expectTypeOf(builder).toEqualTypeOf>() + ) - expectType(reducer(0, increment(5))) - // @ts-expect-error - expectType(reducer(0, increment(5))) -} + expectTypeOf(reducer(0, increment(5))).toBeNumber() + + expectTypeOf(reducer(0, increment(5))).not.toBeString() + }) +}) From c3c7dbf526e94c2c917099ae5edff46c1536f584 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 00:22:33 -0600 Subject: [PATCH 304/368] Rename `src/tests/createSlice.typetest.ts` to `src/tests/createSlice.test-d.ts` --- .../src/tests/{createSlice.typetest.ts => createSlice.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{createSlice.typetest.ts => createSlice.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/createSlice.typetest.ts b/packages/toolkit/src/tests/createSlice.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/createSlice.typetest.ts rename to packages/toolkit/src/tests/createSlice.test-d.ts From cfa84669a29fe610cc2af8c179f075dd06dbf4aa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:32:00 -0600 Subject: [PATCH 305/368] Migrate type tests for `src/tests/createSlice.test-d.ts` to Vitest --- .../toolkit/src/tests/createSlice.test-d.ts | 1730 +++++++++-------- 1 file changed, 963 insertions(+), 767 deletions(-) diff --git a/packages/toolkit/src/tests/createSlice.test-d.ts b/packages/toolkit/src/tests/createSlice.test-d.ts index 9b53b54e46..7afef35d20 100644 --- a/packages/toolkit/src/tests/createSlice.test-d.ts +++ b/packages/toolkit/src/tests/createSlice.test-d.ts @@ -26,854 +26,1050 @@ import { } from '@reduxjs/toolkit' import { castDraft } from 'immer' import type { Action, Reducer, UnknownAction } from 'redux' -import { - expectExactType, - expectType, - expectUnknown, -} from './utils/typeTestHelpers' - -/* - * Test: Slice name is strongly typed. - */ - -const counterSlice = createSlice({ - name: 'counter', - initialState: 0, - reducers: { - increment: (state: number, action) => state + action.payload, - decrement: (state: number, action) => state - action.payload, - }, -}) - -const uiSlice = createSlice({ - name: 'ui', - initialState: 0, - reducers: { - goToNext: (state: number, action) => state + action.payload, - goToPrevious: (state: number, action) => state - action.payload, - }, -}) - -const actionCreators = { - [counterSlice.name]: { ...counterSlice.actions }, - [uiSlice.name]: { ...uiSlice.actions }, -} -expectType(actionCreators.counter) -expectType(actionCreators.ui) - -// @ts-expect-error -const value = actionCreators.anyKey - -/* - * Test: createSlice() infers the returned slice's type. - */ -{ - const firstAction = createAction<{ count: number }>('FIRST_ACTION') - - const slice = createSlice({ +describe('type tests', () => { + const counterSlice = createSlice({ name: 'counter', initialState: 0, reducers: { increment: (state: number, action) => state + action.payload, decrement: (state: number, action) => state - action.payload, }, - extraReducers: (builder) => { - builder.addCase( - firstAction, - (state, action) => state + action.payload.count - ) - }, }) - /* Reducer */ + test('Slice name is strongly typed.', () => { + const uiSlice = createSlice({ + name: 'ui', + initialState: 0, + reducers: { + goToNext: (state: number, action) => state + action.payload, + goToPrevious: (state: number, action) => state - action.payload, + }, + }) - expectType>(slice.reducer) + const actionCreators = { + [counterSlice.name]: { ...counterSlice.actions }, + [uiSlice.name]: { ...uiSlice.actions }, + } - // @ts-expect-error - expectType>(slice.reducer) - // @ts-expect-error - expectType>(slice.reducer) - /* Actions */ + expectTypeOf(counterSlice.actions).toEqualTypeOf(actionCreators.counter) - slice.actions.increment(1) - slice.actions.decrement(1) + expectTypeOf(uiSlice.actions).toEqualTypeOf(actionCreators.ui) - // @ts-expect-error - slice.actions.other(1) -} + expectTypeOf(actionCreators).not.toHaveProperty('anyKey') + }) -/* - * Test: Slice action creator types are inferred. - */ -{ - const counter = createSlice({ - name: 'counter', - initialState: 0, - reducers: { - increment: (state) => state + 1, - decrement: (state, { payload = 1 }: PayloadAction) => - state - payload, - multiply: (state, { payload }: PayloadAction) => - Array.isArray(payload) - ? payload.reduce((acc, val) => acc * val, state) - : state * payload, - addTwo: { - reducer: (s, { payload }: PayloadAction) => s + payload, - prepare: (a: number, b: number) => ({ - payload: a + b, - }), + test("createSlice() infers the returned slice's type.", () => { + const firstAction = createAction<{ count: number }>('FIRST_ACTION') + + const slice = createSlice({ + name: 'counter', + initialState: 0, + reducers: { + increment: (state: number, action) => state + action.payload, + decrement: (state: number, action) => state - action.payload, }, - }, - }) + extraReducers: (builder) => { + builder.addCase( + firstAction, + (state, action) => state + action.payload.count + ) + }, + }) - expectType(counter.actions.increment) - counter.actions.increment() - - expectType>( - counter.actions.decrement - ) - counter.actions.decrement() - counter.actions.decrement(2) - - expectType>( - counter.actions.multiply - ) - counter.actions.multiply(2) - counter.actions.multiply([2, 3, 4]) - - expectType>( - counter.actions.addTwo - ) - counter.actions.addTwo(1, 2) - - // @ts-expect-error - counter.actions.multiply() - - // @ts-expect-error - counter.actions.multiply('2') - - // @ts-expect-error - counter.actions.addTwo(1) -} - -/* - * Test: Slice action creator types properties are "string" - */ -{ - const counter = createSlice({ - name: 'counter', - initialState: 0, - reducers: { - increment: (state) => state + 1, - decrement: (state) => state - 1, - multiply: (state, { payload }: PayloadAction) => - Array.isArray(payload) - ? payload.reduce((acc, val) => acc * val, state) - : state * payload, - }, + test('Reducer', () => { + expectTypeOf(slice.reducer).toMatchTypeOf< + Reducer + >() + + assertType>(slice.reducer) + + expectTypeOf(slice.reducer).not.toEqualTypeOf< + Reducer + >() + + expectTypeOf(slice.reducer).not.toMatchTypeOf< + Reducer + >() + + expectTypeOf(slice.reducer).not.toEqualTypeOf< + Reducer + >() + + expectTypeOf().not.toMatchTypeOf>() + + expectTypeOf().not.toEqualTypeOf>() + }) + + test('Actions', () => { + slice.actions.increment(1) + slice.actions.decrement(1) + + expectTypeOf(slice.actions).not.toHaveProperty('other') + }) }) - const s: 'counter/increment' = counter.actions.increment.type - const sa: 'counter/increment' = counter.actions.increment().type - const t: 'counter/decrement' = counter.actions.decrement.type - const ta: 'counter/decrement' = counter.actions.decrement().type - const u: 'counter/multiply' = counter.actions.multiply.type - const ua: 'counter/multiply' = counter.actions.multiply(1).type - - // @ts-expect-error - const y: 'increment' = counter.actions.increment.type -} - -/* - * Test: Slice action creator types are inferred for enhanced reducers. - */ -{ - const counter = createSlice({ - name: 'test', - initialState: { counter: 0, concat: '' }, - reducers: { - incrementByStrLen: { - reducer: (state, action: PayloadAction) => { - state.counter += action.payload - }, - prepare: (payload: string) => ({ - payload: payload.length, - }), - }, - concatMetaStrLen: { - reducer: (state, action: PayloadAction) => { - state.concat += action.payload + test('Slice action creator types are inferred.', () => { + const counter = createSlice({ + name: 'counter', + initialState: 0, + reducers: { + increment: (state) => state + 1, + decrement: ( + state, + { payload = 1 }: PayloadAction + ) => state - payload, + multiply: (state, { payload }: PayloadAction) => + Array.isArray(payload) + ? payload.reduce((acc, val) => acc * val, state) + : state * payload, + addTwo: { + reducer: (s, { payload }: PayloadAction) => s + payload, + prepare: (a: number, b: number) => ({ + payload: a + b, + }), }, - prepare: (payload: string) => ({ - payload, - meta: payload.length, - }), }, - }, + }) + + expectTypeOf( + counter.actions.increment + ).toMatchTypeOf() + + assertType(counter.actions.increment) + + expectTypeOf( + counter.actions.increment + ).not.toEqualTypeOf() + + counter.actions.increment() + + expectTypeOf(counter.actions.decrement).toMatchTypeOf< + ActionCreatorWithOptionalPayload + >() + + assertType>( + counter.actions.decrement + ) + + expectTypeOf(counter.actions.decrement).not.toEqualTypeOf< + ActionCreatorWithOptionalPayload + >() + + counter.actions.decrement() + counter.actions.decrement(2) + + expectTypeOf(counter.actions.multiply).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>( + counter.actions.multiply + ) + + expectTypeOf(counter.actions.multiply).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + counter.actions.multiply(2) + counter.actions.multiply([2, 3, 4]) + + expectTypeOf(counter.actions.addTwo).toMatchTypeOf< + ActionCreatorWithPreparedPayload<[number, number], number> + >() + + assertType>( + counter.actions.addTwo + ) + + expectTypeOf(counter.actions.addTwo).not.toEqualTypeOf< + ActionCreatorWithPreparedPayload<[number, number], number> + >() + + counter.actions.addTwo(1, 2) + + expectTypeOf(counter.actions.multiply).parameters.not.toEqualTypeOf<[]>() + + expectTypeOf(counter.actions.multiply).parameter(0).not.toBeString() + + expectTypeOf(counter.actions.addTwo).parameters.not.toEqualTypeOf< + [number] + >() + + expectTypeOf(counter.actions.addTwo).parameters.toEqualTypeOf< + [number, number] + >() }) - expectType<'test/incrementByStrLen'>( - counter.actions.incrementByStrLen('test').type - ) - expectType(counter.actions.incrementByStrLen('test').payload) - expectType(counter.actions.concatMetaStrLen('test').payload) - expectType(counter.actions.concatMetaStrLen('test').meta) - - // @ts-expect-error - expectType(counter.actions.incrementByStrLen('test').payload) - - // @ts-expect-error - expectType(counter.actions.concatMetaStrLen('test').meta) -} - -/** - * Test: access meta and error from reducer - */ -{ - const counter = createSlice({ - name: 'test', - initialState: { counter: 0, concat: '' }, - reducers: { - // case: meta and error not used in reducer - testDefaultMetaAndError: { - reducer(_, action: PayloadAction) {}, - prepare: (payload: number) => ({ - payload, - meta: 'meta' as 'meta', - error: 'error' as 'error', - }), - }, - // case: meta and error marked as "unknown" in reducer - testUnknownMetaAndError: { - reducer(_, action: PayloadAction) {}, - prepare: (payload: number) => ({ - payload, - meta: 'meta' as 'meta', - error: 'error' as 'error', - }), - }, - // case: meta and error are typed in the reducer as returned by prepare - testMetaAndError: { - reducer(_, action: PayloadAction) {}, - prepare: (payload: number) => ({ - payload, - meta: 'meta' as 'meta', - error: 'error' as 'error', - }), - }, - // case: meta is typed differently in the reducer than returned from prepare - testErroneousMeta: { - reducer(_, action: PayloadAction) {}, - // @ts-expect-error - prepare: (payload: number) => ({ - payload, - meta: 1, - error: 'error' as 'error', - }), - }, - // case: error is typed differently in the reducer than returned from prepare - testErroneousError: { - reducer(_, action: PayloadAction) {}, - // @ts-expect-error - prepare: (payload: number) => ({ - payload, - meta: 'meta' as 'meta', - error: 1, - }), + test('Slice action creator types properties are "string"', () => { + const counter = createSlice({ + name: 'counter', + initialState: 0, + reducers: { + increment: (state) => state + 1, + decrement: (state) => state - 1, + multiply: (state, { payload }: PayloadAction) => + Array.isArray(payload) + ? payload.reduce((acc, val) => acc * val, state) + : state * payload, }, - }, + }) + + const s: 'counter/increment' = counter.actions.increment.type + const sa: 'counter/increment' = counter.actions.increment().type + const t: 'counter/decrement' = counter.actions.decrement.type + const ta: 'counter/decrement' = counter.actions.decrement().type + const u: 'counter/multiply' = counter.actions.multiply.type + const ua: 'counter/multiply' = counter.actions.multiply(1).type + + // @ts-expect-error + const y: 'increment' = counter.actions.increment.type }) -} -/* - * Test: returned case reducer has the correct type - */ -{ - const counter = createSlice({ - name: 'counter', - initialState: 0, - reducers: { - increment(state, action: PayloadAction) { - return state + action.payload - }, - decrement: { - reducer(state, action: PayloadAction) { - return state - action.payload + test('Slice action creator types are inferred for enhanced reducers.', () => { + const counter = createSlice({ + name: 'test', + initialState: { counter: 0, concat: '' }, + reducers: { + incrementByStrLen: { + reducer: (state, action: PayloadAction) => { + state.counter += action.payload + }, + prepare: (payload: string) => ({ + payload: payload.length, + }), }, - prepare(amount: number) { - return { payload: amount } + concatMetaStrLen: { + reducer: (state, action: PayloadAction) => { + state.concat += action.payload + }, + prepare: (payload: string) => ({ + payload, + meta: payload.length, + }), }, }, - }, - }) - - // Should match positively - expectType<(state: number, action: PayloadAction) => number | void>( - counter.caseReducers.increment - ) + }) - // Should match positively for reducers with prepare callback - expectType<(state: number, action: PayloadAction) => number | void>( - counter.caseReducers.decrement - ) + expectTypeOf( + counter.actions.incrementByStrLen('test').type + ).toEqualTypeOf<'test/incrementByStrLen'>() - // Should not mismatch the payload if it's a simple reducer + expectTypeOf(counter.actions.incrementByStrLen('test').payload).toBeNumber() - expectType<(state: number, action: PayloadAction) => number | void>( - // @ts-expect-error - counter.caseReducers.increment - ) + expectTypeOf(counter.actions.concatMetaStrLen('test').payload).toBeString() - // Should not mismatch the payload if it's a reducer with a prepare callback + expectTypeOf(counter.actions.concatMetaStrLen('test').meta).toBeNumber() - expectType<(state: number, action: PayloadAction) => number | void>( - // @ts-expect-error - counter.caseReducers.decrement - ) + expectTypeOf( + counter.actions.incrementByStrLen('test').payload + ).not.toBeString() - // Should not include entries that don't exist + expectTypeOf(counter.actions.concatMetaStrLen('test').meta).not.toBeString() + }) - expectType<(state: number, action: PayloadAction) => number | void>( - // @ts-expect-error - counter.caseReducers.someThingNonExistant - ) -} - -/* - * Test: prepared payload does not match action payload - should cause an error. - */ -{ - const counter = createSlice({ - name: 'counter', - initialState: { counter: 0 }, - reducers: { - increment: { - reducer(state, action: PayloadAction) { - state.counter += action.payload.length + test('access meta and error from reducer', () => { + const counter = createSlice({ + name: 'test', + initialState: { counter: 0, concat: '' }, + reducers: { + // case: meta and error not used in reducer + testDefaultMetaAndError: { + reducer(_, action: PayloadAction) {}, + prepare: (payload: number) => ({ + payload, + meta: 'meta' as 'meta', + error: 'error' as 'error', + }), }, - // @ts-expect-error - prepare(x: string) { - return { - payload: 6, - } + // case: meta and error marked as "unknown" in reducer + testUnknownMetaAndError: { + reducer( + _, + action: PayloadAction + ) {}, + prepare: (payload: number) => ({ + payload, + meta: 'meta' as 'meta', + error: 'error' as 'error', + }), + }, + // case: meta and error are typed in the reducer as returned by prepare + testMetaAndError: { + reducer(_, action: PayloadAction) {}, + prepare: (payload: number) => ({ + payload, + meta: 'meta' as 'meta', + error: 'error' as 'error', + }), + }, + // case: meta is typed differently in the reducer than returned from prepare + testErroneousMeta: { + reducer(_, action: PayloadAction) {}, + // @ts-expect-error + prepare: (payload: number) => ({ + payload, + meta: 1, + error: 'error' as 'error', + }), + }, + // case: error is typed differently in the reducer than returned from prepare + testErroneousError: { + reducer(_, action: PayloadAction) {}, + // @ts-expect-error + prepare: (payload: number) => ({ + payload, + meta: 'meta' as 'meta', + error: 1, + }), }, }, - }, + }) }) -} - -/* - * Test: if no Payload Type is specified, accept any payload - * see https://github.com/reduxjs/redux-toolkit/issues/165 - */ -{ - const initialState = { - name: null, - } - - const mySlice = createSlice({ - name: 'name', - initialState, - reducers: { - setName: (state, action) => { - state.name = action.payload + + test('returned case reducer has the correct type', () => { + const counter = createSlice({ + name: 'counter', + initialState: 0, + reducers: { + increment(state, action: PayloadAction) { + return state + action.payload + }, + decrement: { + reducer(state, action: PayloadAction) { + return state - action.payload + }, + prepare(amount: number) { + return { payload: amount } + }, + }, }, - }, - }) + }) - expectType(mySlice.actions.setName) + test('Should match positively', () => { + expectTypeOf(counter.caseReducers.increment).toMatchTypeOf< + (state: number, action: PayloadAction) => number | void + >() - const x = mySlice.actions.setName + assertType< + (state: number, action: PayloadAction) => number | void + >(counter.caseReducers.increment) - mySlice.actions.setName(null) - mySlice.actions.setName('asd') - mySlice.actions.setName(5) -} + expectTypeOf(counter.caseReducers.increment).not.toEqualTypeOf< + (state: number, action: PayloadAction) => number | void + >() + }) -/** - * Test: actions.x.match() - */ -{ - const mySlice = createSlice({ - name: 'name', - initialState: { name: 'test' }, - reducers: { - setName: (state, action: PayloadAction) => { - state.name = action.payload - }, - }, + test('Should match positively for reducers with prepare callback', () => { + expectTypeOf(counter.caseReducers.decrement).toMatchTypeOf< + (state: number, action: PayloadAction) => number | void + >() + + assertType< + (state: number, action: PayloadAction) => number | void + >(counter.caseReducers.decrement) + + expectTypeOf(counter.caseReducers.decrement).not.toEqualTypeOf< + (state: number, action: PayloadAction) => number | void + >() + }) + + test("Should not mismatch the payload if it's a simple reducer", () => { + expectTypeOf(counter.caseReducers.increment).not.toMatchTypeOf< + (state: number, action: PayloadAction) => number | void + >() + + expectTypeOf(counter.caseReducers.increment).not.toEqualTypeOf< + (state: number, action: PayloadAction) => number | void + >() + }) + + test("Should not mismatch the payload if it's a reducer with a prepare callback", () => { + expectTypeOf(counter.caseReducers.decrement).not.toMatchTypeOf< + (state: number, action: PayloadAction) => number | void + >() + + expectTypeOf(counter.caseReducers.decrement).not.toEqualTypeOf< + (state: number, action: PayloadAction) => number | void + >() + }) + + test("Should not include entries that don't exist", () => { + expectTypeOf(counter.caseReducers).not.toHaveProperty( + 'someThingNonExistent' + ) + }) }) - const x: Action = {} as any - if (mySlice.actions.setName.match(x)) { - expectType<'name/setName'>(x.type) - expectType(x.payload) - } else { - // @ts-expect-error - expectType<'name/setName'>(x.type) - // @ts-expect-error - expectType(x.payload) - } -} - -/** Test: builder callback for extraReducers */ -{ - createSlice({ - name: 'test', - initialState: 0, - reducers: {}, - extraReducers: (builder) => { - expectType>(builder) - }, + test('prepared payload does not match action payload - should cause an error.', () => { + const counter = createSlice({ + name: 'counter', + initialState: { counter: 0 }, + reducers: { + increment: { + reducer(state, action: PayloadAction) { + state.counter += action.payload.length + }, + // @ts-expect-error + prepare(x: string) { + return { + payload: 6, + } + }, + }, + }, + }) }) -} - -/** Test: wrapping createSlice should be possible */ -{ - interface GenericState { - data?: T - status: 'loading' | 'finished' | 'error' - } - - const createGenericSlice = < - T, - Reducers extends SliceCaseReducers> - >({ - name = '', - initialState, - reducers, - }: { - name: string - initialState: GenericState - reducers: ValidateSliceCaseReducers, Reducers> - }) => { - return createSlice({ - name, + + test('if no Payload Type is specified, accept any payload', () => { + // see https://github.com/reduxjs/redux-toolkit/issues/165 + + const initialState = { + name: null, + } + + const mySlice = createSlice({ + name: 'name', initialState, reducers: { - start(state) { - state.status = 'loading' + setName: (state, action) => { + state.name = action.payload }, - success(state: GenericState, action: PayloadAction) { - state.data = action.payload - state.status = 'finished' - }, - ...reducers, }, }) - } - const wrappedSlice = createGenericSlice({ - name: 'test', - initialState: { status: 'loading' } as GenericState, - reducers: { - magic(state) { - expectType>(state) - // @ts-expect-error - expectType>(state) + expectTypeOf( + mySlice.actions.setName + ).toMatchTypeOf() + + assertType(mySlice.actions.setName) + + expectTypeOf( + mySlice.actions.setName + ).not.toEqualTypeOf() + + const x = mySlice.actions.setName + + mySlice.actions.setName(null) + mySlice.actions.setName('asd') + mySlice.actions.setName(5) + }) - state.status = 'finished' - state.data = 'hocus pocus' + test('actions.x.match()', () => { + const mySlice = createSlice({ + name: 'name', + initialState: { name: 'test' }, + reducers: { + setName: (state, action: PayloadAction) => { + state.name = action.payload + }, }, - }, + }) + + const x: Action = {} as any + if (mySlice.actions.setName.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'name/setName'>() + + expectTypeOf(x.payload).toBeString() + } else { + expectTypeOf(x.type).not.toMatchTypeOf<'name/setName'>() + + expectTypeOf(x.type).not.toEqualTypeOf<'name/setName'>() + + expectTypeOf(x).not.toHaveProperty('payload') + } }) - expectType>(wrappedSlice.actions.success) - expectType>(wrappedSlice.actions.magic) -} - -{ - interface GenericState { - data: T | null - } - - function createDataSlice< - T, - Reducers extends SliceCaseReducers> - >( - name: string, - reducers: ValidateSliceCaseReducers, Reducers>, - initialState: GenericState - ) { - const doNothing = createAction('doNothing') - const setData = createAction('setData') + test('builder callback for extraReducers', () => { + createSlice({ + name: 'test', + initialState: 0, + reducers: {}, + extraReducers: (builder) => { + expectTypeOf(builder).toEqualTypeOf>() + }, + }) + }) - const slice = createSlice({ - name, + test('wrapping createSlice should be possible', () => { + interface GenericState { + data?: T + status: 'loading' | 'finished' | 'error' + } + + const createGenericSlice = < + T, + Reducers extends SliceCaseReducers> + >({ + name = '', initialState, reducers, - extraReducers: (builder) => { - builder.addCase(doNothing, (state) => { - return { ...state } - }) - builder.addCase(setData, (state, { payload }) => { - return { - ...state, - data: payload, - } - }) + }: { + name: string + initialState: GenericState + reducers: ValidateSliceCaseReducers, Reducers> + }) => { + return createSlice({ + name, + initialState, + reducers: { + start(state) { + state.status = 'loading' + }, + success(state: GenericState, action: PayloadAction) { + state.data = action.payload + state.status = 'finished' + }, + ...reducers, + }, + }) + } + + const wrappedSlice = createGenericSlice({ + name: 'test', + initialState: { status: 'loading' } as GenericState, + reducers: { + magic(state) { + expectTypeOf(state).toEqualTypeOf>() + + expectTypeOf(state).not.toMatchTypeOf>() + + expectTypeOf(state).not.toEqualTypeOf>() + + state.status = 'finished' + state.data = 'hocus pocus' + }, }, }) - return { doNothing, setData, slice } - } -} - -/** - * Test: slice selectors - */ - -{ - const sliceWithoutSelectors = createSlice({ - name: '', - initialState: '', - reducers: {}, + + expectTypeOf(wrappedSlice.actions.success).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(wrappedSlice.actions.success) + + expectTypeOf(wrappedSlice.actions.success).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf< + ActionCreatorWithoutPayload + >() + + assertType>(wrappedSlice.actions.magic) + + expectTypeOf(wrappedSlice.actions.magic).not.toEqualTypeOf< + ActionCreatorWithoutPayload + >() }) - // @ts-expect-error - sliceWithoutSelectors.selectors.foo + test('extraReducers', () => { + interface GenericState { + data: T | null + } + + function createDataSlice< + T, + Reducers extends SliceCaseReducers> + >( + name: string, + reducers: ValidateSliceCaseReducers, Reducers>, + initialState: GenericState + ) { + const doNothing = createAction('doNothing') + const setData = createAction('setData') + + const slice = createSlice({ + name, + initialState, + reducers, + extraReducers: (builder) => { + builder.addCase(doNothing, (state) => { + return { ...state } + }) + builder.addCase(setData, (state, { payload }) => { + return { + ...state, + data: payload, + } + }) + }, + }) + return { doNothing, setData, slice } + } + }) - const sliceWithSelectors = createSlice({ - name: 'counter', - initialState: { value: 0 }, - reducers: { - increment: (state) => { - state.value += 1 + test('slice selectors', () => { + const sliceWithoutSelectors = createSlice({ + name: '', + initialState: '', + reducers: {}, + }) + + expectTypeOf(sliceWithoutSelectors.selectors).not.toHaveProperty('foo') + + const sliceWithSelectors = createSlice({ + name: 'counter', + initialState: { value: 0 }, + reducers: { + increment: (state) => { + state.value += 1 + }, }, - }, - selectors: { - selectValue: (state) => state.value, - selectMultiply: (state, multiplier: number) => state.value * multiplier, - selectToFixed: Object.assign( - (state: { value: number }) => state.value.toFixed(2), - { static: true } - ), - }, + selectors: { + selectValue: (state) => state.value, + selectMultiply: (state, multiplier: number) => state.value * multiplier, + selectToFixed: Object.assign( + (state: { value: number }) => state.value.toFixed(2), + { static: true } + ), + }, + }) + + const rootState = { + [sliceWithSelectors.reducerPath]: sliceWithSelectors.getInitialState(), + } + + const { selectValue, selectMultiply, selectToFixed } = + sliceWithSelectors.selectors + + expectTypeOf(selectValue(rootState)).toBeNumber() + + expectTypeOf(selectMultiply(rootState, 2)).toBeNumber() + + expectTypeOf(selectToFixed(rootState)).toBeString() + + expectTypeOf(selectToFixed.unwrapped.static).toBeBoolean() + + const nestedState = { + nested: rootState, + } + + const nestedSelectors = sliceWithSelectors.getSelectors( + (rootState: typeof nestedState) => rootState.nested.counter + ) + + expectTypeOf(nestedSelectors.selectValue(nestedState)).toBeNumber() + + expectTypeOf(nestedSelectors.selectMultiply(nestedState, 2)).toBeNumber() + + expectTypeOf(nestedSelectors.selectToFixed(nestedState)).toBeString() }) - const rootState = { - [sliceWithSelectors.reducerPath]: sliceWithSelectors.getInitialState(), - } - - const { selectValue, selectMultiply, selectToFixed } = - sliceWithSelectors.selectors - - expectType(selectValue(rootState)) - expectType(selectMultiply(rootState, 2)) - expectType(selectToFixed(rootState)) - - expectType(selectToFixed.unwrapped.static) - - const nestedState = { - nested: rootState, - } - - const nestedSelectors = sliceWithSelectors.getSelectors( - (rootState: typeof nestedState) => rootState.nested.counter - ) - - expectType(nestedSelectors.selectValue(nestedState)) - expectType(nestedSelectors.selectMultiply(nestedState, 2)) - expectType(nestedSelectors.selectToFixed(nestedState)) -} - -/** - * Test: reducer callback - */ - -{ - interface TestState { - foo: string - } - - interface TestArg { - test: string - } - - interface TestReturned { - payload: string - } - - interface TestReject { - cause: string - } - - const slice = createSlice({ - name: 'test', - initialState: {} as TestState, - reducers: (create) => { - const pretypedAsyncThunk = - create.asyncThunk.withTypes<{ rejectValue: TestReject }>() - - // @ts-expect-error - create.asyncThunk(() => {}) - - // @ts-expect-error - create.asyncThunk.withTypes<{ - rejectValue: string - dispatch: StoreDispatch - }>() - - return { - normalReducer: create.reducer((state, action) => { - expectType(state) - expectType(action.payload) - }), - optionalReducer: create.reducer((state, action) => { - expectType(state) - expectType(action.payload) - }), - noActionReducer: create.reducer((state) => { - expectType(state) - }), - preparedReducer: create.preparedReducer( - (payload: string) => ({ - payload, - meta: 'meta' as const, - error: 'error' as const, + test('reducer callback', () => { + interface TestState { + foo: string + } + + interface TestArg { + test: string + } + + interface TestReturned { + payload: string + } + + interface TestReject { + cause: string + } + + const slice = createSlice({ + name: 'test', + initialState: {} as TestState, + reducers: (create) => { + const pretypedAsyncThunk = + create.asyncThunk.withTypes<{ rejectValue: TestReject }>() + + // @ts-expect-error + create.asyncThunk(() => {}) + + // @ts-expect-error + create.asyncThunk.withTypes<{ + rejectValue: string + dispatch: StoreDispatch + }>() + + return { + normalReducer: create.reducer((state, action) => { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.payload).toBeString() }), - (state, action) => { - expectType(state) - expectType(action.payload) - expectExactType('meta' as const)(action.meta) - expectExactType('error' as const)(action.error) - } - ), - testInfer: create.asyncThunk( - function payloadCreator(arg: TestArg, api) { - return Promise.resolve({ payload: 'foo' }) - }, - { - pending(state, action) { - expectType(state) - expectType(action.meta.arg) - }, - fulfilled(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.payload) - }, - rejected(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.error) - }, - settled(state, action) { - expectType(state) - expectType(action.meta.arg) - if (isRejected(action)) { - expectType(action.error) - } else { - expectType(action.payload) - } - }, - } - ), - testExplicitType: create.asyncThunk< - TestReturned, - TestArg, - { - rejectValue: TestReject - } - >( - function payloadCreator(arg, api) { - // here would be a circular reference - expectUnknown(api.getState()) - // here would be a circular reference - expectType>(api.dispatch) - // so you need to cast inside instead - const getState = api.getState as () => StoreState - const dispatch = api.dispatch as StoreDispatch - expectType(arg) - expectType<(value: TestReject) => any>(api.rejectWithValue) - return Promise.resolve({ payload: 'foo' }) - }, - { - pending(state, action) { - expectType(state) - expectType(action.meta.arg) - }, - fulfilled(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.payload) - }, - rejected(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.error) - expectType(action.payload) - }, - settled(state, action) { - expectType(state) - expectType(action.meta.arg) - if (isRejected(action)) { - expectType(action.error) - expectType(action.payload) - } else { - expectType(action.payload) - } - }, - } - ), - testPretyped: pretypedAsyncThunk( - function payloadCreator(arg: TestArg, api) { - expectType<(value: TestReject) => any>(api.rejectWithValue) - return Promise.resolve({ payload: 'foo' }) - }, - { - pending(state, action) { - expectType(state) - expectType(action.meta.arg) - }, - fulfilled(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.payload) + optionalReducer: create.reducer( + (state, action) => { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf() + } + ), + noActionReducer: create.reducer((state) => { + expectTypeOf(state).toEqualTypeOf() + }), + preparedReducer: create.preparedReducer( + (payload: string) => ({ + payload, + meta: 'meta' as const, + error: 'error' as const, + }), + (state, action) => { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.payload).toBeString() + + expectTypeOf(action.meta).toEqualTypeOf<'meta'>() + + expectTypeOf(action.error).toEqualTypeOf<'error'>() + } + ), + testInfer: create.asyncThunk( + function payloadCreator(arg: TestArg, api) { + return Promise.resolve({ payload: 'foo' }) }, - rejected(state, action) { - expectType(state) - expectType(action.meta.arg) - expectType(action.error) - expectType(action.payload) + { + pending(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + }, + fulfilled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf() + }, + rejected(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.error).toEqualTypeOf() + }, + settled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + if (isRejected(action)) { + expectTypeOf(action.error).toEqualTypeOf() + } else { + expectTypeOf(action.payload).toEqualTypeOf() + } + }, + } + ), + testExplicitType: create.asyncThunk< + TestReturned, + TestArg, + { + rejectValue: TestReject + } + >( + function payloadCreator(arg, api) { + // here would be a circular reference + expectTypeOf(api.getState()).toBeUnknown() + // here would be a circular reference + expectTypeOf(api.dispatch).toMatchTypeOf< + ThunkDispatch + >() + + assertType>(api.dispatch) + + expectTypeOf(api.dispatch).not.toEqualTypeOf< + ThunkDispatch + >() + + // so you need to cast inside instead + const getState = api.getState as () => StoreState + const dispatch = api.dispatch as StoreDispatch + + expectTypeOf(arg).toEqualTypeOf() + + expectTypeOf(api.rejectWithValue).toMatchTypeOf< + (value: TestReject) => any + >() + + assertType<(value: TestReject) => any>(api.rejectWithValue) + + expectTypeOf(api.rejectWithValue).not.toEqualTypeOf< + (value: TestReject) => any + >() + + return Promise.resolve({ payload: 'foo' }) }, - settled(state, action) { - expectType(state) - expectType(action.meta.arg) - if (isRejected(action)) { - expectType(action.error) - expectType(action.payload) - } else { - expectType(action.payload) - } + { + pending(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + }, + fulfilled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf() + }, + rejected(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.error).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf< + TestReject | undefined + >() + }, + settled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + if (isRejected(action)) { + expectTypeOf(action.error).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf< + TestReject | undefined + >() + } else { + expectTypeOf(action.payload).toEqualTypeOf() + } + }, + } + ), + testPretyped: pretypedAsyncThunk( + function payloadCreator(arg: TestArg, api) { + expectTypeOf(api.rejectWithValue).toMatchTypeOf< + (value: TestReject) => any + >() + + assertType<(value: TestReject) => any>(api.rejectWithValue) + + expectTypeOf(api.rejectWithValue).not.toEqualTypeOf< + (value: TestReject) => any + >() + + return Promise.resolve({ payload: 'foo' }) }, - } - ), - } - }, - }) + { + pending(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + }, + fulfilled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf() + }, + rejected(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + expectTypeOf(action.error).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf< + TestReject | undefined + >() + }, + settled(state, action) { + expectTypeOf(state).toEqualTypeOf() + + expectTypeOf(action.meta.arg).toEqualTypeOf() + + if (isRejected(action)) { + expectTypeOf(action.error).toEqualTypeOf() + + expectTypeOf(action.payload).toEqualTypeOf< + TestReject | undefined + >() + } else { + expectTypeOf(action.payload).toEqualTypeOf() + } + }, + } + ), + } + }, + }) - const store = configureStore({ reducer: { test: slice.reducer } }) - - type StoreState = ReturnType - type StoreDispatch = typeof store.dispatch - - expectType>(slice.actions.normalReducer) - slice.actions.normalReducer('') - // @ts-expect-error - slice.actions.normalReducer() - // @ts-expect-error - slice.actions.normalReducer(0) - expectType>( - slice.actions.optionalReducer - ) - slice.actions.optionalReducer() - slice.actions.optionalReducer('') - // @ts-expect-error - slice.actions.optionalReducer(0) - - expectType(slice.actions.noActionReducer) - slice.actions.noActionReducer() - // @ts-expect-error - slice.actions.noActionReducer('') - expectType< - ActionCreatorWithPreparedPayload< - [string], - string, - 'test/preparedReducer', - 'error', - 'meta' - > - >(slice.actions.preparedReducer) - expectType>(slice.actions.testInfer) - expectType>( - slice.actions.testExplicitType - ) - { - type TestInferThunk = AsyncThunk - expectType>>( - slice.caseReducers.testInfer.pending - ) - expectType>>( - slice.caseReducers.testInfer.fulfilled - ) - expectType>>( - slice.caseReducers.testInfer.rejected + const store = configureStore({ reducer: { test: slice.reducer } }) + + type StoreState = ReturnType + type StoreDispatch = typeof store.dispatch + + expectTypeOf(slice.actions.normalReducer).toMatchTypeOf< + PayloadActionCreator + >() + + assertType>(slice.actions.normalReducer) + + expectTypeOf(slice.actions.normalReducer).not.toEqualTypeOf< + PayloadActionCreator + >() + + expectTypeOf(slice.actions.normalReducer).toBeCallableWith('') + + expectTypeOf(slice.actions.normalReducer).parameters.not.toEqualTypeOf<[]>() + + expectTypeOf(slice.actions.normalReducer).parameters.not.toEqualTypeOf< + [number] + >() + + expectTypeOf(slice.actions.optionalReducer).toMatchTypeOf< + ActionCreatorWithOptionalPayload + >() + + assertType>( + slice.actions.optionalReducer ) - } -} - -/** Test: wrapping createSlice should be possible, with callback */ -{ - interface GenericState { - data?: T - status: 'loading' | 'finished' | 'error' - } - - const createGenericSlice = < - T, - Reducers extends SliceCaseReducers> - >({ - name = '', - initialState, - reducers, - }: { - name: string - initialState: GenericState - reducers: (create: ReducerCreators>) => Reducers - }) => { - return createSlice({ - name, + + expectTypeOf(slice.actions.optionalReducer).not.toEqualTypeOf< + ActionCreatorWithOptionalPayload + >() + + expectTypeOf(slice.actions.optionalReducer).toBeCallableWith() + + expectTypeOf(slice.actions.optionalReducer).toBeCallableWith('') + + expectTypeOf(slice.actions.optionalReducer).parameter(0).not.toBeNumber() + + expectTypeOf( + slice.actions.noActionReducer + ).toMatchTypeOf() + + assertType(slice.actions.noActionReducer) + + expectTypeOf( + slice.actions.noActionReducer + ).not.toEqualTypeOf() + + expectTypeOf(slice.actions.noActionReducer).toBeCallableWith() + + expectTypeOf(slice.actions.noActionReducer).parameter(0).not.toBeString() + + expectTypeOf(slice.actions.preparedReducer).toEqualTypeOf< + ActionCreatorWithPreparedPayload< + [string], + string, + 'test/preparedReducer', + 'error', + 'meta' + > + >() + + expectTypeOf(slice.actions.testInfer).toEqualTypeOf< + AsyncThunk + >() + + expectTypeOf(slice.actions.testExplicitType).toEqualTypeOf< + AsyncThunk + >() + + { + type TestInferThunk = AsyncThunk + + expectTypeOf(slice.caseReducers.testInfer.pending).toEqualTypeOf< + CaseReducer> + >() + + expectTypeOf(slice.caseReducers.testInfer.fulfilled).toEqualTypeOf< + CaseReducer> + >() + + expectTypeOf(slice.caseReducers.testInfer.rejected).toEqualTypeOf< + CaseReducer> + >() + } + }) + + test('wrapping createSlice should be possible, with callback', () => { + interface GenericState { + data?: T + status: 'loading' | 'finished' | 'error' + } + + const createGenericSlice = < + T, + Reducers extends SliceCaseReducers> + >({ + name = '', initialState, - reducers: (create) => ({ - start: create.reducer((state) => { - state.status = 'loading' + reducers, + }: { + name: string + initialState: GenericState + reducers: (create: ReducerCreators>) => Reducers + }) => { + return createSlice({ + name, + initialState, + reducers: (create) => ({ + start: create.reducer((state) => { + state.status = 'loading' + }), + success: create.reducer((state, action) => { + state.data = castDraft(action.payload) + state.status = 'finished' + }), + ...reducers(create), }), - success: create.reducer((state, action) => { - state.data = castDraft(action.payload) + }) + } + + const wrappedSlice = createGenericSlice({ + name: 'test', + initialState: { status: 'loading' } as GenericState, + reducers: (create) => ({ + magic: create.reducer((state) => { + expectTypeOf(state).toEqualTypeOf>() + + expectTypeOf(state).not.toEqualTypeOf>() + state.status = 'finished' + state.data = 'hocus pocus' }), - ...reducers(create), }), }) - } - - const wrappedSlice = createGenericSlice({ - name: 'test', - initialState: { status: 'loading' } as GenericState, - reducers: (create) => ({ - magic: create.reducer((state) => { - expectType>(state) - // @ts-expect-error - expectType>(state) - state.status = 'finished' - state.data = 'hocus pocus' - }), - }), + expectTypeOf(wrappedSlice.actions.success).toMatchTypeOf< + ActionCreatorWithPayload + >() + + assertType>(wrappedSlice.actions.success) + + expectTypeOf(wrappedSlice.actions.success).not.toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf< + ActionCreatorWithoutPayload + >() + + assertType>(wrappedSlice.actions.magic) + + expectTypeOf(wrappedSlice.actions.magic).not.toEqualTypeOf< + ActionCreatorWithoutPayload + >() }) - expectType>(wrappedSlice.actions.success) - expectType>(wrappedSlice.actions.magic) -} - -/** - * Test: selectSlice - */ -{ - expectType(counterSlice.selectSlice({ counter: 0 })) - // @ts-expect-error - counterSlice.selectSlice({}) -} - -/** - * Test: buildCreateSlice - */ -{ - expectExactType(createSlice)(buildCreateSlice()) - buildCreateSlice({ - // @ts-expect-error not possible to recreate shape because symbol is not exported - creators: { asyncThunk: { [Symbol()]: createAsyncThunk } }, + test('selectSlice', () => { + expectTypeOf(counterSlice.selectSlice({ counter: 0 })).toBeNumber() + + expectTypeOf(counterSlice.selectSlice).parameter(0).not.toEqualTypeOf<{}>() }) - buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } }) -} + + test('buildCreateSlice', () => { + expectTypeOf(buildCreateSlice()).toEqualTypeOf(createSlice) + + buildCreateSlice({ + // @ts-expect-error not possible to recreate shape because symbol is not exported + creators: { asyncThunk: { [Symbol()]: createAsyncThunk } }, + }) + buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } }) + }) +}) From 1cdfa795e2735547d88acc0a98a063cadc2904d3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:32:36 -0600 Subject: [PATCH 306/368] Rename `src/tests/getDefaultEnhancers.typetest.ts` to `src/tests/getDefaultEnhancers.test-d.ts` --- ...DefaultEnhancers.typetest.ts => getDefaultEnhancers.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{getDefaultEnhancers.typetest.ts => getDefaultEnhancers.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/getDefaultEnhancers.typetest.ts b/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/getDefaultEnhancers.typetest.ts rename to packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts From 0bd705c00573bd963599d486781dd0d77838c586 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:39:09 -0600 Subject: [PATCH 307/368] Migrate type tests for `src/tests/getDefaultEnhancers.test-d.ts` to Vitest --- .../src/tests/getDefaultEnhancers.test-d.ts | 180 +++++++++--------- 1 file changed, 94 insertions(+), 86 deletions(-) diff --git a/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts b/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts index 7ea38237cc..1d19e470e0 100644 --- a/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts +++ b/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts @@ -1,8 +1,6 @@ import { configureStore } from '@reduxjs/toolkit' import type { StoreEnhancer } from 'redux' -declare const expectType: (t: T) => T - declare const enhancer1: StoreEnhancer< { has1: true @@ -17,119 +15,129 @@ declare const enhancer2: StoreEnhancer< { stateHas2: true } > -{ - // prepend single element - { +describe('type tests', () => { + test('prepend single element', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().prepend(enhancer1), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - // @ts-expect-error - expectType(store.has2) - // @ts-expect-error - expectType(store.getState().stateHas2) - } + expectTypeOf(store.has1).toEqualTypeOf() - // prepend multiple (rest) - { + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has2') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas2') + }) + + test('prepend multiple (rest)', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().prepend(enhancer1, enhancer2), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - expectType(store.has2) - expectType(store.getState().stateHas2) - - // @ts-expect-error - expectType(store.has3) - // @ts-expect-error - expectType(store.getState().stateHas3) - } - - // prepend multiple (array notation) - { + + expectTypeOf(store.has1).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store.has2).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas2).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has3') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas3') + }) + + test('prepend multiple (array notation)', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().prepend([enhancer1, enhancer2] as const), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - expectType(store.has2) - expectType(store.getState().stateHas2) - - // @ts-expect-error - expectType(store.has3) - // @ts-expect-error - expectType(store.getState().stateHas3) - } - - // concat single element - { + + expectTypeOf(store.has1).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store.has2).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas2).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has3') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas3') + }) + + test('concat single element', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().concat(enhancer1), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - // @ts-expect-error - expectType(store.has2) - // @ts-expect-error - expectType(store.getState().stateHas2) - } + expectTypeOf(store.has1).toEqualTypeOf() - // prepend multiple (rest) - { + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has2') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas2') + }) + + test('prepend multiple (rest)', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().concat(enhancer1, enhancer2), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - expectType(store.has2) - expectType(store.getState().stateHas2) - - // @ts-expect-error - expectType(store.has3) - // @ts-expect-error - expectType(store.getState().stateHas3) - } - - // concat multiple (array notation) - { + + expectTypeOf(store.has1).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store.has2).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas2).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has3') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas3') + }) + + test('concat multiple (array notation)', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().concat([enhancer1, enhancer2] as const), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - expectType(store.has2) - expectType(store.getState().stateHas2) - - // @ts-expect-error - expectType(store.has3) - // @ts-expect-error - expectType(store.getState().stateHas3) - } - - // concat and prepend - { + + expectTypeOf(store.has1).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store.has2).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas2).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has3') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas3') + }) + + test('concat and prepend', () => { const store = configureStore({ reducer: () => 0, enhancers: (gDE) => gDE().concat(enhancer1).prepend(enhancer2), }) - expectType(store.has1) - expectType(store.getState().stateHas1) - expectType(store.has2) - expectType(store.getState().stateHas2) - - // @ts-expect-error - expectType(store.has3) - // @ts-expect-error - expectType(store.getState().stateHas3) - } -} + + expectTypeOf(store.has1).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas1).toEqualTypeOf() + + expectTypeOf(store.has2).toEqualTypeOf() + + expectTypeOf(store.getState().stateHas2).toEqualTypeOf() + + expectTypeOf(store).not.toHaveProperty('has3') + + expectTypeOf(store.getState()).not.toHaveProperty('stateHas3') + }) +}) From 10d3add878c568507b3969cc822e875a5208ea40 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:39:45 -0600 Subject: [PATCH 308/368] Rename `src/tests/getDefaultMiddleware.typetest.ts` to `src/tests/getDefaultMiddleware.test-d.ts` --- ...faultMiddleware.typetest.ts => getDefaultMiddleware.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{getDefaultMiddleware.typetest.ts => getDefaultMiddleware.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.typetest.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/getDefaultMiddleware.typetest.ts rename to packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts From 7d7e21964a9ba1abbaef942cc796e83b16c5641f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:45:14 -0600 Subject: [PATCH 309/368] Migrate type tests for `src/tests/getDefaultMiddleware.test-d.ts` to Vitest --- .../src/tests/getDefaultMiddleware.test-d.ts | 114 +++++++++--------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts index 160f1260c4..029cae9e64 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts @@ -1,8 +1,6 @@ import { configureStore } from '@reduxjs/toolkit' import type { Middleware } from 'redux' -declare const expectType: (t: T) => T - declare const middleware1: Middleware<{ (_: string): number }> @@ -14,105 +12,105 @@ declare const middleware2: Middleware<{ type ThunkReturn = Promise<'thunk'> declare const thunkCreator: () => () => ThunkReturn -{ - // prepend single element - { +describe('type tests', () => { + test('prepend single element', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().prepend(middleware1), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(thunkCreator())) - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // prepend multiple (rest) - { + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) + + test('prepend multiple (rest)', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().prepend(middleware1, middleware2), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(5)) - expectType(store.dispatch(thunkCreator())) - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(5)).toBeString() - // prepend multiple (array notation) - { + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() + + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) + + test('prepend multiple (array notation)', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().prepend([middleware1, middleware2] as const), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(5)) - expectType(store.dispatch(thunkCreator())) + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(5)).toBeString() + + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) - // concat single element - { + test('concat single element', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().concat(middleware1), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(thunkCreator())) + expectTypeOf(store.dispatch('foo')).toBeNumber() - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // prepend multiple (rest) - { + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) + + test('prepend multiple (rest)', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().concat(middleware1, middleware2), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(5)) - expectType(store.dispatch(thunkCreator())) + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(5)).toBeString() - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // concat multiple (array notation) - { + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) + + test('concat multiple (array notation)', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().concat([middleware1, middleware2] as const), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(5)) - expectType(store.dispatch(thunkCreator())) + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(5)).toBeString() - // @ts-expect-error - expectType(store.dispatch('foo')) - } + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // concat and prepend - { + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) + + test('concat and prepend', () => { const store = configureStore({ reducer: () => 0, middleware: (gDM) => gDM().concat(middleware1).prepend(middleware2), }) - expectType(store.dispatch('foo')) - expectType(store.dispatch(5)) - expectType(store.dispatch(thunkCreator())) + expectTypeOf(store.dispatch('foo')).toBeNumber() + + expectTypeOf(store.dispatch(5)).toBeString() + + expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf() - // @ts-expect-error - expectType(store.dispatch('foo')) - } -} + expectTypeOf(store.dispatch('foo')).not.toBeString() + }) +}) From 1b6923b4e6fd55d418d3d38799e88e7cf782ded3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:46:14 -0600 Subject: [PATCH 310/368] Rename `src/tests/mapBuilders.typetest.ts` to `src/tests/mapBuilders.test-d.ts` --- .../src/tests/{mapBuilders.typetest.ts => mapBuilders.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{mapBuilders.typetest.ts => mapBuilders.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/mapBuilders.typetest.ts b/packages/toolkit/src/tests/mapBuilders.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/mapBuilders.typetest.ts rename to packages/toolkit/src/tests/mapBuilders.test-d.ts From 4ba50e2da6c139c96d6efbf6c514c376eae3fe53 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:59:25 -0600 Subject: [PATCH 311/368] Migrate type tests for `src/tests/mapBuilders.test-d.ts` to Vitest --- .../toolkit/src/tests/mapBuilders.test-d.ts | 417 ++++++++++-------- 1 file changed, 229 insertions(+), 188 deletions(-) diff --git a/packages/toolkit/src/tests/mapBuilders.test-d.ts b/packages/toolkit/src/tests/mapBuilders.test-d.ts index dec653378e..c7283007ea 100644 --- a/packages/toolkit/src/tests/mapBuilders.test-d.ts +++ b/packages/toolkit/src/tests/mapBuilders.test-d.ts @@ -3,138 +3,245 @@ import { createAsyncThunk } from '@internal/createAsyncThunk' import { executeReducerBuilderCallback } from '@internal/mapBuilders' import type { UnknownAction } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' -import { expectExactType, expectType } from './utils/typeTestHelpers' +import { expectType } from './utils/typeTestHelpers' -/** Test: builder callback for actionMap */ -{ - const increment = createAction('increment') - const decrement = createAction('decrement') +describe('type tests', () => { + test('builder callback for actionMap', () => { + const increment = createAction('increment') + const decrement = createAction('decrement') - executeReducerBuilderCallback((builder) => { - builder.addCase(increment, (state, action) => { - expectType(state) - expectType<{ type: 'increment'; payload: number }>(action) - // @ts-expect-error - expectType(state) - // @ts-expect-error - expectType<{ type: 'increment'; payload: string }>(action) + executeReducerBuilderCallback((builder) => { + builder.addCase(increment, (state, action) => { + expectTypeOf(state).toBeNumber() + + expectTypeOf(action).toEqualTypeOf<{ + type: 'increment' + payload: number + }>() + + expectTypeOf(state).not.toBeString() + + expectTypeOf(action).not.toEqualTypeOf<{ + type: 'increment' + payload: string + }>() + + expectTypeOf(action).not.toEqualTypeOf<{ + type: 'decrement' + payload: number + }>() + }) + + builder.addCase('increment', (state, action) => { + expectTypeOf(state).toBeNumber() + + expectTypeOf(action).toEqualTypeOf<{ type: 'increment' }>() + + expectTypeOf(state).not.toBeString() + + expectTypeOf(action).not.toEqualTypeOf<{ type: 'decrement' }>() + + // this cannot be inferred and has to be manually specified + expectTypeOf(action).not.toEqualTypeOf<{ + type: 'increment' + payload: number + }>() + }) + + builder.addCase( + increment, + (state, action: ReturnType) => state + ) // @ts-expect-error - expectType<{ type: 'decrement'; payload: number }>(action) - }) + builder.addCase( + increment, + (state, action: ReturnType) => state + ) - builder.addCase('increment', (state, action) => { - expectType(state) - expectType<{ type: 'increment' }>(action) + builder.addCase( + 'increment', + (state, action: ReturnType) => state + ) // @ts-expect-error - expectType<{ type: 'decrement' }>(action) - // @ts-expect-error - this cannot be inferred and has to be manually specified - expectType<{ type: 'increment'; payload: number }>(action) - }) + builder.addCase( + 'decrement', + (state, action: ReturnType) => state + ) - builder.addCase( - increment, - (state, action: ReturnType) => state - ) - // @ts-expect-error - builder.addCase( - increment, - (state, action: ReturnType) => state - ) - - builder.addCase( - 'increment', - (state, action: ReturnType) => state - ) - // @ts-expect-error - builder.addCase( - 'decrement', - (state, action: ReturnType) => state - ) - - // action type is inferred - builder.addMatcher(increment.match, (state, action) => { - expectType>(action) - }) + // action type is inferred + builder.addMatcher(increment.match, (state, action) => { + expectType>(action) + }) + + test('action type is inferred when type predicate lacks `type` property', () => { + type PredicateWithoutTypeProperty = { + payload: number + } + + builder.addMatcher( + (action): action is PredicateWithoutTypeProperty => true, + (state, action) => { + expectTypeOf(action).toMatchTypeOf() - { - // action type is inferred when type predicate lacks `type` property - type PredicateWithoutTypeProperty = { - payload: number - } + assertType(action) + + expectTypeOf( + action + ).not.toEqualTypeOf() + + expectTypeOf(action).toMatchTypeOf() + + assertType(action) + + expectTypeOf(action).not.toEqualTypeOf() + } + ) + }) + // action type defaults to UnknownAction if no type predicate matcher is passed builder.addMatcher( - (action): action is PredicateWithoutTypeProperty => true, + () => true, (state, action) => { - expectType(action) - expectType(action) + expectTypeOf(action).toMatchTypeOf() + + assertType(action) + + expectTypeOf(action).not.toEqualTypeOf() } ) - } - - // action type defaults to UnknownAction if no type predicate matcher is passed - builder.addMatcher( - () => true, - (state, action) => { - expectExactType({} as UnknownAction)(action) - } - ) - - // with a boolean checker, action can also be typed by type argument - builder.addMatcher<{ foo: boolean }>( - () => true, - (state, action) => { - expectType<{ foo: boolean }>(action) - expectType(action) - } - ) - - // addCase().addMatcher() is possible, action type inferred correctly - builder - .addCase( - 'increment', - (state, action: ReturnType) => state + + // with a boolean checker, action can also be typed by type argument + builder.addMatcher<{ foo: boolean }>( + () => true, + (state, action) => { + expectTypeOf(action).toMatchTypeOf<{ foo: boolean }>() + + assertType<{ foo: boolean }>(action) + + expectTypeOf(action).not.toEqualTypeOf<{ foo: boolean }>() + + expectTypeOf(action).toMatchTypeOf() + + assertType(action) + + expectTypeOf(action).not.toEqualTypeOf() + } ) - .addMatcher(decrement.match, (state, action) => { - expectType>(action) + + // addCase().addMatcher() is possible, action type inferred correctly + builder + .addCase( + 'increment', + (state, action: ReturnType) => state + ) + .addMatcher(decrement.match, (state, action) => { + expectTypeOf(action).toEqualTypeOf>() + }) + + // addCase().addDefaultCase() is possible, action type is UnknownAction + builder + .addCase( + 'increment', + (state, action: ReturnType) => state + ) + .addDefaultCase((state, action) => { + expectTypeOf(action).toMatchTypeOf() + + assertType(action) + + expectTypeOf(action).not.toEqualTypeOf() + }) + + test('addMatcher() should prevent further calls to addCase()', () => { + const b = builder.addMatcher(increment.match, () => {}) + // @ts-expect-error + b.addCase(increment, () => {}) + b.addMatcher(increment.match, () => {}) + b.addDefaultCase(() => {}) }) - // addCase().addDefaultCase() is possible, action type is UnknownAction - builder - .addCase( - 'increment', - (state, action: ReturnType) => state - ) - .addDefaultCase((state, action) => { - expectType(action) + test('addDefaultCase() should prevent further calls to addCase(), addMatcher() and addDefaultCase', () => { + const b = builder.addDefaultCase(() => {}) + // @ts-expect-error + b.addCase(increment, () => {}) + // @ts-expect-error + b.addMatcher(increment.match, () => {}) + // @ts-expect-error + b.addDefaultCase(() => {}) }) - { - // addMatcher() should prevent further calls to addCase() - const b = builder.addMatcher(increment.match, () => {}) - // @ts-expect-error - b.addCase(increment, () => {}) - b.addMatcher(increment.match, () => {}) - b.addDefaultCase(() => {}) - } - - { - // addDefaultCase() should prevent further calls to addCase(), addMatcher() and addDefaultCase - const b = builder.addDefaultCase(() => {}) - // @ts-expect-error - b.addCase(increment, () => {}) - // @ts-expect-error - b.addMatcher(increment.match, () => {}) - // @ts-expect-error - b.addDefaultCase(() => {}) - } - - // `createAsyncThunk` actions work with `mapBuilder` - { - // case 1: normal `createAsyncThunk` - { - const thunk = createAsyncThunk('test', () => { - return 'ret' as const + describe('`createAsyncThunk` actions work with `mapBuilder`', () => { + test('case 1: normal `createAsyncThunk`', () => { + const thunk = createAsyncThunk('test', () => { + return 'ret' as const + }) + builder.addCase(thunk.pending, (_, action) => { + expectType<{ + payload: undefined + meta: { + arg: void + requestId: string + requestStatus: 'pending' + } + }>(action) + }) + + builder.addCase(thunk.rejected, (_, action) => { + expectType<{ + payload: unknown + error: SerializedError + meta: { + arg: void + requestId: string + requestStatus: 'rejected' + aborted: boolean + condition: boolean + rejectedWithValue: boolean + } + }>(action) + }) + builder.addCase(thunk.fulfilled, (_, action) => { + expectType<{ + payload: 'ret' + meta: { + arg: void + requestId: string + requestStatus: 'fulfilled' + } + }>(action) + }) }) + }) + + test('case 2: `createAsyncThunk` with `meta`', () => { + const thunk = createAsyncThunk< + 'ret', + void, + { + pendingMeta: { startedTimeStamp: number } + fulfilledMeta: { + fulfilledTimeStamp: number + baseQueryMeta: 'meta!' + } + rejectedMeta: { + baseQueryMeta: 'meta!' + } + } + >( + 'test', + (_, api) => { + return api.fulfillWithValue('ret' as const, { + fulfilledTimeStamp: 5, + baseQueryMeta: 'meta!', + }) + }, + { + getPendingMeta() { + return { startedTimeStamp: 0 } + }, + } + ) + builder.addCase(thunk.pending, (_, action) => { expectType<{ payload: undefined @@ -142,6 +249,7 @@ import { expectExactType, expectType } from './utils/typeTestHelpers' arg: void requestId: string requestStatus: 'pending' + startedTimeStamp: number } }>(action) }) @@ -157,8 +265,12 @@ import { expectExactType, expectType } from './utils/typeTestHelpers' aborted: boolean condition: boolean rejectedWithValue: boolean + baseQueryMeta?: 'meta!' } }>(action) + if (action.meta.rejectedWithValue) { + expectType<'meta!'>(action.meta.baseQueryMeta) + } }) builder.addCase(thunk.fulfilled, (_, action) => { expectType<{ @@ -167,82 +279,11 @@ import { expectExactType, expectType } from './utils/typeTestHelpers' arg: void requestId: string requestStatus: 'fulfilled' + baseQueryMeta: 'meta!' } }>(action) }) - } - } - // case 2: `createAsyncThunk` with `meta` - { - const thunk = createAsyncThunk< - 'ret', - void, - { - pendingMeta: { startedTimeStamp: number } - fulfilledMeta: { - fulfilledTimeStamp: number - baseQueryMeta: 'meta!' - } - rejectedMeta: { - baseQueryMeta: 'meta!' - } - } - >( - 'test', - (_, api) => { - return api.fulfillWithValue('ret' as const, { - fulfilledTimeStamp: 5, - baseQueryMeta: 'meta!', - }) - }, - { - getPendingMeta() { - return { startedTimeStamp: 0 } - }, - } - ) - - builder.addCase(thunk.pending, (_, action) => { - expectType<{ - payload: undefined - meta: { - arg: void - requestId: string - requestStatus: 'pending' - startedTimeStamp: number - } - }>(action) }) - - builder.addCase(thunk.rejected, (_, action) => { - expectType<{ - payload: unknown - error: SerializedError - meta: { - arg: void - requestId: string - requestStatus: 'rejected' - aborted: boolean - condition: boolean - rejectedWithValue: boolean - baseQueryMeta?: 'meta!' - } - }>(action) - if (action.meta.rejectedWithValue) { - expectType<'meta!'>(action.meta.baseQueryMeta) - } - }) - builder.addCase(thunk.fulfilled, (_, action) => { - expectType<{ - payload: 'ret' - meta: { - arg: void - requestId: string - requestStatus: 'fulfilled' - baseQueryMeta: 'meta!' - } - }>(action) - }) - } + }) }) -} +}) From 7ffb6140a2ce02b7fd3b9992fb19c15e2bcd1ec5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 01:59:57 -0600 Subject: [PATCH 312/368] Rename `src/tests/matchers.typetest.ts` to `src/tests/matchers.test-d.ts` --- .../src/tests/{matchers.typetest.ts => matchers.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{matchers.typetest.ts => matchers.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/matchers.typetest.ts b/packages/toolkit/src/tests/matchers.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/matchers.typetest.ts rename to packages/toolkit/src/tests/matchers.test-d.ts From efea226cf19e2df9fd7883ee9658b767dfdb88b3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 02:20:13 -0600 Subject: [PATCH 313/368] Migrate type tests for `src/tests/matchers.test-d.ts` to Vitest --- packages/toolkit/src/tests/matchers.test-d.ts | 576 +++++++++--------- 1 file changed, 274 insertions(+), 302 deletions(-) diff --git a/packages/toolkit/src/tests/matchers.test-d.ts b/packages/toolkit/src/tests/matchers.test-d.ts index 2cd8cd31ce..269debcfd8 100644 --- a/packages/toolkit/src/tests/matchers.test-d.ts +++ b/packages/toolkit/src/tests/matchers.test-d.ts @@ -1,4 +1,3 @@ -import { expectExactType, expectUnknown } from './utils/typeTestHelpers' import type { UnknownAction } from 'redux' import type { SerializedError } from '../../src' import { @@ -13,318 +12,291 @@ import { isRejectedWithValue, } from '../../src' -/* isAnyOf */ +const action: UnknownAction = { type: 'foo' } + +describe('type tests', () => { + describe('isAnyOf', () => { + test('isAnyOf correctly narrows types when used with action creators', () => { + const actionA = createAction('a', () => { + return { + payload: { + prop1: 1, + prop3: 2, + }, + } + }) + + const actionB = createAction('b', () => { + return { + payload: { + prop1: 1, + prop2: 2, + }, + } + }) + + if (isAnyOf(actionA, actionB)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + // @ts-expect-error + prop3: action.payload.prop3, + } + } + }) + + test('isAnyOf correctly narrows types when used with async thunks', () => { + const asyncThunk1 = createAsyncThunk<{ prop1: number; prop3: number }>( + 'asyncThunk1', + + async () => { + return { + prop1: 1, + prop3: 3, + } + } + ) + + const asyncThunk2 = createAsyncThunk<{ prop1: number; prop2: number }>( + 'asyncThunk2', + + async () => { + return { + prop1: 1, + prop2: 2, + } + } + ) + + if (isAnyOf(asyncThunk1.fulfilled, asyncThunk2.fulfilled)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + // @ts-expect-error + prop3: action.payload.prop3, + } + } + }) + + test('isAnyOf correctly narrows types when used with type guards', () => { + interface ActionA { + type: 'a' + payload: { + prop1: 1 + prop3: 2 + } + } -/* - * Test: isAnyOf correctly narrows types when used with action creators - */ -function isAnyOfActionTest(action: UnknownAction) { - const actionA = createAction('a', () => { - return { - payload: { - prop1: 1, - prop3: 2, - }, - } + interface ActionB { + type: 'b' + payload: { + prop1: 1 + prop2: 2 + } + } + + const guardA = (v: any): v is ActionA => { + return v.type === 'a' + } + + const guardB = (v: any): v is ActionB => { + return v.type === 'b' + } + + if (isAnyOf(guardA, guardB)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + // @ts-expect-error + prop3: action.payload.prop3, + } + } + }) }) - const actionB = createAction('b', () => { - return { + describe('isAllOf', () => { + interface SpecialAction { payload: { - prop1: 1, - prop2: 2, - }, + special: boolean + } } - }) - if (isAnyOf(actionA, actionB)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - // @ts-expect-error - prop3: action.payload.prop3, + const isSpecialAction = (v: any): v is SpecialAction => { + return v.meta.isSpecial } - } -} - -/* - * Test: isAnyOf correctly narrows types when used with async thunks - */ -function isAnyOfThunkTest(action: UnknownAction) { - const asyncThunk1 = createAsyncThunk<{ prop1: number; prop3: number }>( - 'asyncThunk1', - - async () => { - return { - prop1: 1, - prop3: 3, + + test('isAllOf correctly narrows types when used with action creators and type guards', () => { + const actionA = createAction('a', () => { + return { + payload: { + prop1: 1, + prop3: 2, + }, + } + }) + + if (isAllOf(actionA, isSpecialAction)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + prop3: action.payload.prop3, + special: action.payload.special, + } + } + }) + + test('isAllOf correctly narrows types when used with async thunks and type guards', () => { + const asyncThunk1 = createAsyncThunk<{ prop1: number; prop3: number }>( + 'asyncThunk1', + + async () => { + return { + prop1: 1, + prop3: 3, + } + } + ) + + if (isAllOf(asyncThunk1.fulfilled, isSpecialAction)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + prop3: action.payload.prop3, + special: action.payload.special, + } + } + }) + + test('isAnyOf correctly narrows types when used with type guards', () => { + interface ActionA { + type: 'a' + payload: { + prop1: 1 + prop3: 2 + } } - } - ) - const asyncThunk2 = createAsyncThunk<{ prop1: number; prop2: number }>( - 'asyncThunk2', + const guardA = (v: any): v is ActionA => { + return v.type === 'a' + } - async () => { - return { - prop1: 1, - prop2: 2, + if (isAllOf(guardA, isSpecialAction)(action)) { + return { + prop1: action.payload.prop1, + // @ts-expect-error + prop2: action.payload.prop2, + prop3: action.payload.prop3, + special: action.payload.special, + } } - } - ) - - if (isAnyOf(asyncThunk1.fulfilled, asyncThunk2.fulfilled)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - // @ts-expect-error - prop3: action.payload.prop3, - } - } -} - -/* - * Test: isAnyOf correctly narrows types when used with type guards - */ -function isAnyOfTypeGuardTest(action: UnknownAction) { - interface ActionA { - type: 'a' - payload: { - prop1: 1 - prop3: 2 - } - } + }) - interface ActionB { - type: 'b' - payload: { - prop1: 1 - prop2: 2 - } - } - - const guardA = (v: any): v is ActionA => { - return v.type === 'a' - } - - const guardB = (v: any): v is ActionB => { - return v.type === 'b' - } - - if (isAnyOf(guardA, guardB)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - // @ts-expect-error - prop3: action.payload.prop3, - } - } -} - -/* isAllOf */ - -interface SpecialAction { - payload: { - special: boolean - } -} - -const isSpecialAction = (v: any): v is SpecialAction => { - return v.meta.isSpecial -} - -/* - * Test: isAllOf correctly narrows types when used with action creators - * and type guards - */ -function isAllOfActionTest(action: UnknownAction) { - const actionA = createAction('a', () => { - return { - payload: { - prop1: 1, - prop3: 2, - }, - } - }) + test('isPending correctly narrows types', () => { + if (isPending(action)) { + expectTypeOf(action.payload).toBeUndefined() - if (isAllOf(actionA, isSpecialAction)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - prop3: action.payload.prop3, - special: action.payload.special, - } - } -} - -/* - * Test: isAllOf correctly narrows types when used with async thunks - * and type guards - */ -function isAllOfThunkTest(action: UnknownAction) { - const asyncThunk1 = createAsyncThunk<{ prop1: number; prop3: number }>( - 'asyncThunk1', - - async () => { - return { - prop1: 1, - prop3: 3, + expectTypeOf(action).not.toHaveProperty('error') } - } - ) - - if (isAllOf(asyncThunk1.fulfilled, isSpecialAction)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - prop3: action.payload.prop3, - special: action.payload.special, - } - } -} - -/* - * Test: isAnyOf correctly narrows types when used with type guards - */ -function isAllOfTypeGuardTest(action: UnknownAction) { - interface ActionA { - type: 'a' - payload: { - prop1: 1 - prop3: 2 - } - } - - const guardA = (v: any): v is ActionA => { - return v.type === 'a' - } - - if (isAllOf(guardA, isSpecialAction)(action)) { - return { - prop1: action.payload.prop1, - // @ts-expect-error - prop2: action.payload.prop2, - prop3: action.payload.prop3, - special: action.payload.special, - } - } -} - -/* - * Test: isPending correctly narrows types - */ -function isPendingTest(action: UnknownAction) { - if (isPending(action)) { - expectExactType(action.payload) - // @ts-expect-error - action.error - } - - const thunk = createAsyncThunk('a', () => 'result') - - if (isPending(thunk)(action)) { - expectExactType(action.payload) - // @ts-expect-error - action.error - } -} - -/* - * Test: isRejected correctly narrows types - */ -function isRejectedTest(action: UnknownAction) { - if (isRejected(action)) { - // might be there if rejected with payload - expectUnknown(action.payload) - expectExactType(action.error) - } - - const thunk = createAsyncThunk('a', () => 'result') - - if (isRejected(thunk)(action)) { - // might be there if rejected with payload - expectUnknown(action.payload) - expectExactType(action.error) - } -} - -/* - * Test: isFulfilled correctly narrows types - */ -function isFulfilledTest(action: UnknownAction) { - if (isFulfilled(action)) { - expectUnknown(action.payload) - // @ts-expect-error - action.error - } - - const thunk = createAsyncThunk('a', () => 'result') - if (isFulfilled(thunk)(action)) { - expectExactType('' as string)(action.payload) - // @ts-expect-error - action.error - } -} - -/* - * Test: isAsyncThunkAction correctly narrows types - */ -function isAsyncThunkActionTest(action: UnknownAction) { - if (isAsyncThunkAction(action)) { - expectUnknown(action.payload) - // do not expect an error property because pending/fulfilled lack it - // @ts-expect-error - action.error - } - - const thunk = createAsyncThunk('a', () => 'result') - if (isAsyncThunkAction(thunk)(action)) { - // we should expect the payload to be available, but of unknown type because the action may be pending/rejected - expectUnknown(action.payload) - // do not expect an error property because pending/fulfilled lack it - // @ts-expect-error - action.error - } -} - -/* - * Test: isRejectedWithValue correctly narrows types - */ -function isRejectedWithValueTest(action: UnknownAction) { - if (isRejectedWithValue(action)) { - expectUnknown(action.payload) - expectExactType(action.error) - } - - const thunk = createAsyncThunk< - string, - void, - { rejectValue: { message: string } } - >('a', () => 'result') - if (isRejectedWithValue(thunk)(action)) { - expectExactType({ message: '' as string })(action.payload) - expectExactType(action.error) - } -} - -function matchersAcceptSpreadArguments() { - const thunk1 = createAsyncThunk('a', () => 'a') - const thunk2 = createAsyncThunk('b', () => 'b') - const interestingThunks = [thunk1, thunk2] - const interestingPendingThunks = interestingThunks.map( - (thunk) => thunk.pending - ) - const interestingFulfilledThunks = interestingThunks.map( - (thunk) => thunk.fulfilled - ) - - const isLoading = isAnyOf(...interestingPendingThunks) - const isNotLoading = isAnyOf(...interestingFulfilledThunks) - - const isAllLoading = isAllOf(...interestingPendingThunks) -} + + const thunk = createAsyncThunk('a', () => 'result') + + if (isPending(thunk)(action)) { + expectTypeOf(action.payload).toBeUndefined() + + expectTypeOf(action).not.toHaveProperty('error') + } + }) + + test('isRejected correctly narrows types', () => { + if (isRejected(action)) { + // might be there if rejected with payload + expectTypeOf(action.payload).toBeUnknown() + + expectTypeOf(action.error).toEqualTypeOf() + } + + const thunk = createAsyncThunk('a', () => 'result') + + if (isRejected(thunk)(action)) { + // might be there if rejected with payload + expectTypeOf(action.payload).toBeUnknown() + + expectTypeOf(action.error).toEqualTypeOf() + } + }) + + test('isFulfilled correctly narrows types', () => { + if (isFulfilled(action)) { + expectTypeOf(action.payload).toBeUnknown() + + expectTypeOf(action).not.toHaveProperty('error') + } + + const thunk = createAsyncThunk('a', () => 'result') + if (isFulfilled(thunk)(action)) { + expectTypeOf(action.payload).toBeString() + + expectTypeOf(action).not.toHaveProperty('error') + } + }) + + test('isAsyncThunkAction correctly narrows types', () => { + if (isAsyncThunkAction(action)) { + expectTypeOf(action.payload).toBeUnknown() + + // do not expect an error property because pending/fulfilled lack it + expectTypeOf(action).not.toHaveProperty('error') + } + + const thunk = createAsyncThunk('a', () => 'result') + if (isAsyncThunkAction(thunk)(action)) { + // we should expect the payload to be available, but of unknown type because the action may be pending/rejected + expectTypeOf(action.payload).toBeUnknown() + + // do not expect an error property because pending/fulfilled lack it + expectTypeOf(action).not.toHaveProperty('error') + } + }) + + test('isRejectedWithValue correctly narrows types', () => { + if (isRejectedWithValue(action)) { + expectTypeOf(action.payload).toBeUnknown() + + expectTypeOf(action.error).toEqualTypeOf() + } + + const thunk = createAsyncThunk< + string, + void, + { rejectValue: { message: string } } + >('a', () => 'result') + if (isRejectedWithValue(thunk)(action)) { + expectTypeOf(action.payload).toEqualTypeOf({ message: '' as string }) + + expectTypeOf(action.error).toEqualTypeOf() + } + }) + }) + + test('matchersAcceptSpreadArguments', () => { + const thunk1 = createAsyncThunk('a', () => 'a') + const thunk2 = createAsyncThunk('b', () => 'b') + const interestingThunks = [thunk1, thunk2] + const interestingPendingThunks = interestingThunks.map( + (thunk) => thunk.pending + ) + const interestingFulfilledThunks = interestingThunks.map( + (thunk) => thunk.fulfilled + ) + + const isLoading = isAnyOf(...interestingPendingThunks) + const isNotLoading = isAnyOf(...interestingFulfilledThunks) + + const isAllLoading = isAllOf(...interestingPendingThunks) + }) +}) From bb9aecfb250a584a2aede3e1e1dda0c8e3dc2fbf Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 02:30:08 -0600 Subject: [PATCH 314/368] Rename `src/tests/Tuple.typetest.ts` to `src/tests/Tuple.test-d.ts` --- packages/toolkit/src/tests/{Tuple.typetest.ts => Tuple.test-d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{Tuple.typetest.ts => Tuple.test-d.ts} (100%) diff --git a/packages/toolkit/src/tests/Tuple.typetest.ts b/packages/toolkit/src/tests/Tuple.test-d.ts similarity index 100% rename from packages/toolkit/src/tests/Tuple.typetest.ts rename to packages/toolkit/src/tests/Tuple.test-d.ts From d109c3c476df5edd5d6b331472224d6c19cb019f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 02:40:06 -0600 Subject: [PATCH 315/368] Add `@ts-ignore` to `createAsyncThunk.test-d.ts` TS 4.7 issues --- packages/toolkit/src/tests/createAsyncThunk.test-d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index d4f5ed3f7b..4df60017ca 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -401,6 +401,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() + // @ts-ignore This fails in TS 4.7 only. expectTypeOf(asyncThunk).parameter(0).toBeNullable() expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() @@ -441,6 +442,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + // @ts-ignore This fails in TS 4.7 only. expectTypeOf(asyncThunk).parameter(0).toBeNullable() expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() @@ -605,6 +607,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).parameter(0).not.toBeNull() + // @ts-ignore This fails in TS 4.7 only. expectTypeOf(asyncThunk).parameter(0).toBeNullable() expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() From 008230b0ebe27af27de710c9a19eb4a0a16a4569 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 02:46:42 -0600 Subject: [PATCH 316/368] Migrate type tests for `src/tests/Tuple.test-d.ts` to Vitest --- packages/toolkit/src/tests/Tuple.test-d.ts | 136 ++++++++++++--------- 1 file changed, 80 insertions(+), 56 deletions(-) diff --git a/packages/toolkit/src/tests/Tuple.test-d.ts b/packages/toolkit/src/tests/Tuple.test-d.ts index 102cfd40df..f48588922c 100644 --- a/packages/toolkit/src/tests/Tuple.test-d.ts +++ b/packages/toolkit/src/tests/Tuple.test-d.ts @@ -1,81 +1,105 @@ import { Tuple } from '@reduxjs/toolkit' -import { expectType } from "./utils/typeTestHelpers" -/** - * Test: compatibility is checked between described types - */ -{ - const stringTuple = new Tuple('') +describe('type tests', () => { + test('compatibility is checked between described types', () => { + const stringTuple = new Tuple('') - expectType>(stringTuple) + expectTypeOf(stringTuple).toEqualTypeOf>() - expectType>(stringTuple) + expectTypeOf(stringTuple).toMatchTypeOf>() - // @ts-expect-error - expectType>(stringTuple) + expectTypeOf(stringTuple).not.toEqualTypeOf>() - const numberTuple = new Tuple(0, 1) - // @ts-expect-error - expectType>(numberTuple) -} + expectTypeOf(stringTuple).not.toEqualTypeOf>() -/** - * Test: concat is inferred properly - */ -{ - const singleString = new Tuple('') + const numberTuple = new Tuple(0, 1) - expectType>(singleString) + expectTypeOf(numberTuple).not.toEqualTypeOf>() + }) - expectType>(singleString.concat('')) + test('concat is inferred properly', () => { + const singleString = new Tuple('') - expectType>(singleString.concat([''])) -} + expectTypeOf(singleString).toEqualTypeOf>() -/** - * Test: prepend is inferred properly - */ -{ - const singleString = new Tuple('') + expectTypeOf(singleString.concat('')).toEqualTypeOf< + Tuple<[string, string]> + >() - expectType>(singleString) + expectTypeOf(singleString.concat([''])).not.toMatchTypeOf< + Tuple<[string, string]> + >() - expectType>(singleString.prepend('')) + assertType>(singleString.concat([''])) - expectType>(singleString.prepend([''])) -} + expectTypeOf(singleString.concat([''])).not.toEqualTypeOf< + Tuple<[string, string]> + >() + }) -/** - * Test: push must match existing items - */ -{ - const stringTuple = new Tuple('') + test('prepend is inferred properly', () => { + const singleString = new Tuple('') - stringTuple.push('') + expectTypeOf(singleString).toEqualTypeOf>() - // @ts-expect-error - stringTuple.push(0) -} + expectTypeOf(singleString.prepend('')).toEqualTypeOf< + Tuple<[string, string]> + >() -/** - * Test: Tuples can be combined - */ -{ - const stringTuple = new Tuple('') + expectTypeOf(singleString.prepend([''])).not.toMatchTypeOf< + Tuple<[string, string]> + >() - const numberTuple = new Tuple(0, 1) + assertType>(singleString.prepend([''])) - expectType>(stringTuple.concat(numberTuple)) + expectTypeOf(singleString.prepend([''])).not.toEqualTypeOf< + Tuple<[string, string]> + >() + }) - expectType>(stringTuple.prepend(numberTuple)) + test('push must match existing items', () => { + const stringTuple = new Tuple('') - expectType>(numberTuple.concat(stringTuple)) + expectTypeOf(stringTuple.push).toBeCallableWith('') - expectType>(numberTuple.prepend(stringTuple)) + expectTypeOf(stringTuple.push).parameter(0).not.toBeNumber() + }) - // @ts-expect-error - expectType>(stringTuple.prepend(numberTuple)) + test('Tuples can be combined', () => { + const stringTuple = new Tuple('') - // @ts-expect-error - expectType>(stringTuple.concat(numberTuple)) -} + const numberTuple = new Tuple(0, 1) + + expectTypeOf(stringTuple.concat(numberTuple)).toEqualTypeOf< + Tuple<[string, number, number]> + >() + + expectTypeOf(stringTuple.prepend(numberTuple)).toEqualTypeOf< + Tuple<[number, number, string]> + >() + + expectTypeOf(numberTuple.concat(stringTuple)).toEqualTypeOf< + Tuple<[number, number, string]> + >() + + expectTypeOf(numberTuple.prepend(stringTuple)).toEqualTypeOf< + Tuple<[string, number, number]> + >() + + expectTypeOf(stringTuple.prepend(numberTuple)).not.toEqualTypeOf< + Tuple<[string, number, number]> + >() + + expectTypeOf(stringTuple.prepend(numberTuple)).not.toMatchTypeOf< + Tuple<[string, number, number]> + >() + + expectTypeOf(stringTuple.concat(numberTuple)).not.toMatchTypeOf< + Tuple<[number, number, string]> + >() + + expectTypeOf(stringTuple.concat(numberTuple)).not.toEqualTypeOf< + Tuple<[number, number, string]> + >() + }) +}) From 1b7a714d3f3be95888ea67763e7ff456d8aeb7ee Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 03:35:43 -0600 Subject: [PATCH 317/368] Migrate type tests for `src/query/tests/buildHooks.test-d.tsx` to Vitest --- .../src/query/tests/buildHooks.test-d.tsx | 374 ++++++++++++++++++ .../src/query/tests/buildHooks.test.tsx | 111 +----- 2 files changed, 395 insertions(+), 90 deletions(-) create mode 100644 packages/toolkit/src/query/tests/buildHooks.test-d.tsx diff --git a/packages/toolkit/src/query/tests/buildHooks.test-d.tsx b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx new file mode 100644 index 0000000000..269d2c78fd --- /dev/null +++ b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx @@ -0,0 +1,374 @@ +import type { UseMutation, UseQuery } from '@internal/query/react/buildHooks' +import { waitMs } from '@internal/tests/utils/helpers' +import type { SerializedError } from '@reduxjs/toolkit' +import { createSlice } from '@reduxjs/toolkit' +import type { SubscriptionOptions } from '@reduxjs/toolkit/query/react' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { useState } from 'react' + +let amount = 0 +let nextItemId = 0 + +interface Item { + id: number +} + +const api = createApi({ + baseQuery: async (arg: any) => { + await waitMs(150) + if (arg?.body && 'amount' in arg.body) { + amount += 1 + } + + if (arg?.body && 'forceError' in arg.body) { + return { + error: { + status: 500, + data: null, + }, + } + } + + if (arg?.body && 'listItems' in arg.body) { + const items: Item[] = [] + for (let i = 0; i < 3; i++) { + const item = { id: nextItemId++ } + items.push(item) + } + return { data: items } + } + + return { + data: arg?.body ? { ...arg.body, ...(amount ? { amount } : {}) } : {}, + } + }, + endpoints: (build) => ({ + getUser: build.query<{ name: string }, number>({ + query: () => ({ + body: { name: 'Timmy' }, + }), + }), + getUserAndForceError: build.query<{ name: string }, number>({ + query: () => ({ + body: { + forceError: true, + }, + }), + }), + getIncrementedAmount: build.query<{ amount: number }, void>({ + query: () => ({ + url: '', + body: { + amount, + }, + }), + }), + updateUser: build.mutation<{ name: string }, { name: string }>({ + query: (update) => ({ body: update }), + }), + getError: build.query({ + query: () => '/error', + }), + listItems: build.query({ + serializeQueryArgs: ({ endpointName }) => { + return endpointName + }, + query: ({ pageNumber }) => ({ + url: `items?limit=1&offset=${pageNumber}`, + body: { + listItems: true, + }, + }), + merge: (currentCache, newItems) => { + currentCache.push(...newItems) + }, + forceRefetch: () => { + return true + }, + }), + }), +}) + +const ANY = {} as any + +describe('type tests', () => { + test('useLazyQuery hook callback returns various properties to handle the result', () => { + function User() { + const [getUser] = api.endpoints.getUser.useLazyQuery() + const [{ successMsg, errMsg, isAborted }, setValues] = useState({ + successMsg: '', + errMsg: '', + isAborted: false, + }) + + const handleClick = (abort: boolean) => async () => { + const res = getUser(1) + + // no-op simply for clearer type assertions + res.then((result) => { + if (result.isSuccess) { + expectTypeOf(result).toMatchTypeOf<{ + data: { + name: string + } + }>() + + assertType<{ + data: { + name: string + } + }>(result) + + expectTypeOf(result).not.toEqualTypeOf<{ + data: { + name: string + } + }>() + } + if (result.isError) { + expectTypeOf(result).toMatchTypeOf<{ + error: { status: number; data: unknown } | SerializedError + }>() + + assertType<{ + error: { status: number; data: unknown } | SerializedError + }>(result) + + expectTypeOf(result).not.toEqualTypeOf<{ + error: { status: number; data: unknown } | SerializedError + }>() + } + }) + + expectTypeOf(res.arg).toBeNumber() + + expectTypeOf(res.requestId).toBeString() + + expectTypeOf(res.abort).toEqualTypeOf<() => void>() + + expectTypeOf(res.unwrap).toEqualTypeOf< + () => Promise<{ name: string }> + >() + + expectTypeOf(res.unsubscribe).toEqualTypeOf<() => void>() + + expectTypeOf(res.updateSubscriptionOptions).toEqualTypeOf< + (options: SubscriptionOptions) => void + >() + + expectTypeOf(res.refetch).toMatchTypeOf<() => void>() + + assertType<() => void>(res.refetch) + + expectTypeOf(res.refetch).not.toEqualTypeOf<() => void>() + + // abort the query immediately to force an error + if (abort) res.abort() + res + .unwrap() + .then((result) => { + expectTypeOf(result).toEqualTypeOf<{ name: string }>() + + setValues({ + successMsg: `Successfully fetched user ${result.name}`, + errMsg: '', + isAborted: false, + }) + }) + .catch((err) => { + setValues({ + successMsg: '', + errMsg: `An error has occurred fetching userId: ${res.arg}`, + isAborted: err.name === 'AbortError', + }) + }) + } + + return ( +
+ + +
{successMsg}
+
{errMsg}
+
{isAborted ? 'Request was aborted' : ''}
+
+ ) + } + }) + + test('useMutation hook callback returns various properties to handle the result', async () => { + function User() { + const [updateUser] = api.endpoints.updateUser.useMutation() + const [successMsg, setSuccessMsg] = useState('') + const [errMsg, setErrMsg] = useState('') + const [isAborted, setIsAborted] = useState(false) + + const handleClick = async () => { + const res = updateUser({ name: 'Banana' }) + + // no-op simply for clearer type assertions + res.then((result) => { + expectTypeOf(result).toMatchTypeOf< + | { + error: { status: number; data: unknown } | SerializedError + } + | { + data: { + name: string + } + } + >() + + assertType< + | { error: { status: number; data: unknown } | SerializedError } + | { data: { name: string } } + >(result) + + expectTypeOf(result).not.toEqualTypeOf< + | { + error: { status: number; data: unknown } | SerializedError + } + | { + data: { + name: string + } + } + >() + }) + + expectTypeOf(res.arg).toMatchTypeOf<{ + endpointName: string + originalArgs: { name: string } + track?: boolean + }>() + + assertType<{ + endpointName: string + originalArgs: { name: string } + track?: boolean + }>(res.arg) + + expectTypeOf(res.arg).not.toEqualTypeOf<{ + endpointName: string + originalArgs: { name: string } + track?: boolean + }>() + + expectTypeOf(res.requestId).toBeString() + + expectTypeOf(res.abort).toEqualTypeOf<() => void>() + + expectTypeOf(res.unwrap).toEqualTypeOf< + () => Promise<{ name: string }> + >() + + expectTypeOf(res.reset).toEqualTypeOf<() => void>() + + // abort the mutation immediately to force an error + res.abort() + res + .unwrap() + .then((result) => { + expectTypeOf(result).toEqualTypeOf<{ name: string }>() + + setSuccessMsg(`Successfully updated user ${result.name}`) + }) + .catch((err) => { + setErrMsg( + `An error has occurred updating user ${res.arg.originalArgs.name}` + ) + if (err.name === 'AbortError') { + setIsAborted(true) + } + }) + } + + return ( +
+ +
{successMsg}
+
{errMsg}
+
{isAborted ? 'Request was aborted' : ''}
+
+ ) + } + }) + + test('selectFromResult (query) behaviors', () => { + interface Post { + id: number + name: string + fetched_at: string + } + + type PostsResponse = Post[] + + const api = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com/' }), + tagTypes: ['Posts'], + endpoints: (build) => ({ + getPosts: build.query({ + query: () => ({ url: 'posts' }), + providesTags: (result) => + result ? result.map(({ id }) => ({ type: 'Posts', id })) : [], + }), + updatePost: build.mutation>({ + query: ({ id, ...body }) => ({ + url: `post/${id}`, + method: 'PUT', + body, + }), + invalidatesTags: (result, error, { id }) => [{ type: 'Posts', id }], + }), + addPost: build.mutation>({ + query: (body) => ({ + url: `post`, + method: 'POST', + body, + }), + invalidatesTags: ['Posts'], + }), + }), + }) + + const counterSlice = createSlice({ + name: 'counter', + initialState: { count: 0 }, + reducers: { + increment(state) { + state.count++ + }, + }, + }) + + expectTypeOf(api.useGetPostsQuery).toEqualTypeOf( + api.endpoints.getPosts.useQuery + ) + + expectTypeOf(api.useUpdatePostMutation).toEqualTypeOf( + api.endpoints.updatePost.useMutation + ) + + expectTypeOf(api.useAddPostMutation).toEqualTypeOf( + api.endpoints.addPost.useMutation + ) + }) + + test('UseQuery type can be used to recreate the hook type', () => { + const fakeQuery = ANY as UseQuery< + typeof api.endpoints.getUser.Types.QueryDefinition + > + + expectTypeOf(fakeQuery).toEqualTypeOf(api.endpoints.getUser.useQuery) + }) + + test('UseMutation type can be used to recreate the hook type', () => { + const fakeMutation = ANY as UseMutation< + typeof api.endpoints.updateUser.Types.MutationDefinition + > + + expectTypeOf(fakeMutation).toEqualTypeOf( + api.endpoints.updateUser.useMutation + ) + }) +}) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index 4371e2442f..ad2142f9de 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,20 +1,25 @@ -import type { SerializedError, UnknownAction } from '@reduxjs/toolkit' +import type { SubscriptionSelectors } from '@internal/query/core/buildMiddleware/types'; +import { countObjectKeys } from '@internal/query/utils/countObjectKeys'; +import { + actionsReducer, + setupApiStore, + useRenderCounter, + waitMs, + withProvider, +} from '@internal/tests/utils/helpers'; +import type { UnknownAction } from '@reduxjs/toolkit'; import { configureStore, createListenerMiddleware, createSlice, -} from '@reduxjs/toolkit' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' -import type { - UseMutation, - UseQuery, -} from '@reduxjs/toolkit/dist/query/react/buildHooks' +} from '@reduxjs/toolkit'; +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState'; import { QueryStatus, createApi, fetchBaseQuery, skipToken, -} from '@reduxjs/toolkit/query/react' +} from '@reduxjs/toolkit/query/react'; import { act, fireEvent, @@ -22,22 +27,12 @@ import { renderHook, screen, waitFor, -} from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { HttpResponse, http } from 'msw' -import { useEffect, useState } from 'react' -import type { MockInstance } from 'vitest' -import { - actionsReducer, - setupApiStore, - useRenderCounter, - waitMs, - withProvider, -} from '../../tests/utils/helpers' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -import type { SubscriptionSelectors } from '../core/buildMiddleware/types' -import { countObjectKeys } from '../utils/countObjectKeys' -import { server } from './mocks/server' +} from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { HttpResponse, http } from 'msw'; +import { useEffect, useState } from 'react'; +import type { MockInstance } from 'vitest'; +import { server } from './mocks/server'; // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -1079,35 +1074,16 @@ describe('hooks tests', () => { // no-op simply for clearer type assertions res.then((result) => { if (result.isSuccess) { - expectType<{ - data: { - name: string - } - }>(result) } if (result.isError) { - expectType<{ - error: { status: number; data: unknown } | SerializedError - }>(result) } }) - expectType(res.arg) - expectType(res.requestId) - expectType<() => void>(res.abort) - expectType<() => Promise<{ name: string }>>(res.unwrap) - expectType<() => void>(res.unsubscribe) - expectType<(options: SubscriptionOptions) => void>( - res.updateSubscriptionOptions - ) - expectType<() => void>(res.refetch) - // abort the query immediately to force an error if (abort) res.abort() res .unwrap() .then((result) => { - expectType<{ name: string }>(result) setValues({ successMsg: `Successfully fetched user ${result.name}`, errMsg: '', @@ -1329,35 +1305,13 @@ describe('hooks tests', () => { const res = updateUser({ name: 'Banana' }) // no-op simply for clearer type assertions - res.then((result) => { - expectType< - | { - error: { status: number; data: unknown } | SerializedError - } - | { - data: { - name: string - } - } - >(result) - }) - - expectType<{ - endpointName: string - originalArgs: { name: string } - track?: boolean - }>(res.arg) - expectType(res.requestId) - expectType<() => void>(res.abort) - expectType<() => Promise<{ name: string }>>(res.unwrap) - expectType<() => void>(res.reset) + res.then((result) => {}) // abort the mutation immediately to force an error res.abort() res .unwrap() .then((result) => { - expectType<{ name: string }>(result) setSuccessMsg(`Successfully updated user ${result.name}`) }) .catch((err) => { @@ -2009,7 +1963,7 @@ describe('hooks with createApi defaults set', () => { 'https://example.com/post', async ({ request }) => { const body = await request.json() - let post = body + const post = body startingId += 1 posts.concat({ ...post, @@ -2074,12 +2028,6 @@ describe('hooks with createApi defaults set', () => { counter: counterSlice.reducer, }) - expectExactType(api.useGetPostsQuery)(api.endpoints.getPosts.useQuery) - expectExactType(api.useUpdatePostMutation)( - api.endpoints.updatePost.useMutation - ) - expectExactType(api.useAddPostMutation)(api.endpoints.addPost.useMutation) - test('useQueryState serves a deeply memoized value and does not rerender unnecessarily', async () => { function Posts() { const { data: posts } = api.endpoints.getPosts.useQuery() @@ -2703,20 +2651,3 @@ describe('skip behaviour', () => { }) }) }) - -// type tests: -{ - const ANY = {} as any - - // UseQuery type can be used to recreate the hook type - const fakeQuery = ANY as UseQuery< - typeof api.endpoints.getUser.Types.QueryDefinition - > - expectExactType(fakeQuery)(api.endpoints.getUser.useQuery) - - // UseMutation type can be used to recreate the hook type - const fakeMutation = ANY as UseMutation< - typeof api.endpoints.updateUser.Types.MutationDefinition - > - expectExactType(fakeMutation)(api.endpoints.updateUser.useMutation) -} From 3f0f09739479f2300c6a128988e05b6070b4749f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 18:52:13 -0600 Subject: [PATCH 318/368] Move type tests inside `listenerMiddleware.test.ts` to `listenerMiddleware.test-d.ts` --- .../tests/listenerMiddleware.test-d.ts | 547 ++++++++++++++++++ .../tests/listenerMiddleware.test.ts | 459 +-------------- 2 files changed, 571 insertions(+), 435 deletions(-) create mode 100644 packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts new file mode 100644 index 0000000000..43fc550367 --- /dev/null +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts @@ -0,0 +1,547 @@ +import { createListenerEntry } from '@internal/listenerMiddleware' +import type { + Action, + PayloadAction, + TypedAddListener, + TypedStartListening, + UnknownAction, + UnsubscribeListener, +} from '@reduxjs/toolkit' +import { + addListener, + configureStore, + createAction, + createListenerMiddleware, + createSlice, + isFluxStandardAction, +} from '@reduxjs/toolkit' + +const listenerMiddleware = createListenerMiddleware() +const { startListening } = listenerMiddleware + +const addTypedListenerAction = addListener as TypedAddListener + +interface CounterState { + value: number +} + +const testAction1 = createAction('testAction1') +const testAction2 = createAction('testAction2') + +const counterSlice = createSlice({ + name: 'counter', + initialState: { value: 0 } as CounterState, + reducers: { + increment(state) { + state.value += 1 + }, + decrement(state) { + state.value -= 1 + }, + // Use the PayloadAction type to declare the contents of `action.payload` + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload + }, + }, +}) + +const { increment, decrement, incrementByAmount } = counterSlice.actions + +describe('type tests', () => { + const store = configureStore({ + reducer: () => 42, + middleware: (gDM) => gDM().prepend(createListenerMiddleware().middleware), + }) + + test('Allows passing an extra argument on middleware creation', () => { + const originalExtra = 42 + const listenerMiddleware = createListenerMiddleware({ + extra: originalExtra, + }) + const store = configureStore({ + reducer: counterSlice.reducer, + middleware: (gDM) => gDM().prepend(listenerMiddleware.middleware), + }) + + let foundExtra: number | null = null + + const typedAddListener = + listenerMiddleware.startListening as TypedStartListening< + CounterState, + typeof store.dispatch, + typeof originalExtra + > + + typedAddListener({ + matcher: (action): action is Action => true, + effect: (action, listenerApi) => { + foundExtra = listenerApi.extra + + expectTypeOf(listenerApi.extra).toMatchTypeOf(originalExtra) + }, + }) + + store.dispatch(testAction1('a')) + expect(foundExtra).toBe(originalExtra) + }) + + test('unsubscribing via callback from dispatch', () => { + const unsubscribe = store.dispatch( + addListener({ + actionCreator: testAction1, + effect: () => {}, + }) + ) + + expectTypeOf(unsubscribe).toEqualTypeOf() + + store.dispatch(testAction1('a')) + + unsubscribe() + store.dispatch(testAction2('b')) + store.dispatch(testAction1('c')) + }) + + test('take resolves to `[A, CurrentState, PreviousState] | null` if a possibly undefined timeout parameter is provided', () => { + type ExpectedTakeResultType = + | readonly [ReturnType, CounterState, CounterState] + | null + + let timeout: number | undefined = undefined + let done = false + + const startAppListening = + startListening as TypedStartListening + startAppListening({ + predicate: incrementByAmount.match, + effect: async (_, listenerApi) => { + let takeResult = await listenerApi.take(increment.match, timeout) + + timeout = 1 + takeResult = await listenerApi.take(increment.match, timeout) + expect(takeResult).toBeNull() + + expectTypeOf(takeResult).toMatchTypeOf() + + done = true + }, + }) + + expect(done).toBe(true) + }) + + test('State args default to unknown', () => { + createListenerEntry({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).toBeUnknown() + + expectTypeOf(previousState).toBeUnknown() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toBeUnknown() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = getState() + + expectTypeOf(thunkState).toBeUnknown() + }) + }, + }) + + startListening({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).toBeUnknown() + + expectTypeOf(previousState).toBeUnknown() + + return true + }, + effect: (action, listenerApi) => {}, + }) + + startListening({ + matcher: increment.match, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toBeUnknown() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = getState() + + expectTypeOf(thunkState).toBeUnknown() + }) + }, + }) + + store.dispatch( + addListener({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).toBeUnknown() + + expectTypeOf(previousState).toBeUnknown() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toBeUnknown() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = getState() + + expectTypeOf(thunkState).toBeUnknown() + }) + }, + }) + ) + + store.dispatch( + addListener({ + matcher: increment.match, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toBeUnknown() + + // TODO Can't get the thunk dispatch types to carry through + listenerApi.dispatch((dispatch, getState) => { + const thunkState = getState() + + expectTypeOf(thunkState).toBeUnknown() + }) + }, + }) + ) + }) + + test('Action type is inferred from args', () => { + startListening({ + type: 'abcd', + effect: (action, listenerApi) => { + expectTypeOf(action).toEqualTypeOf<{ type: 'abcd' }>() + }, + }) + + startListening({ + actionCreator: incrementByAmount, + effect: (action, listenerApi) => { + expectTypeOf(action).toMatchTypeOf>() + }, + }) + + startListening({ + matcher: incrementByAmount.match, + effect: (action, listenerApi) => { + expectTypeOf(action).toMatchTypeOf>() + }, + }) + + startListening({ + predicate: ( + action, + currentState, + previousState + ): action is PayloadAction => { + return ( + isFluxStandardAction(action) && typeof action.payload === 'boolean' + ) + }, + effect: (action, listenerApi) => { + expectTypeOf(action).toEqualTypeOf>() + }, + }) + + startListening({ + predicate: (action, currentState) => { + return ( + isFluxStandardAction(action) && typeof action.payload === 'number' + ) + }, + effect: (action, listenerApi) => { + expectTypeOf(action).toEqualTypeOf() + }, + }) + + store.dispatch( + addListener({ + type: 'abcd', + effect: (action, listenerApi) => { + expectTypeOf(action).toEqualTypeOf<{ type: 'abcd' }>() + }, + }) + ) + + store.dispatch( + addListener({ + actionCreator: incrementByAmount, + effect: (action, listenerApi) => { + expectTypeOf(action).toMatchTypeOf>() + }, + }) + ) + + store.dispatch( + addListener({ + matcher: incrementByAmount.match, + effect: (action, listenerApi) => { + expectTypeOf(action).toMatchTypeOf>() + }, + }) + ) + }) + + test('Can create a pre-typed middleware', () => { + const typedMiddleware = createListenerMiddleware() + + typedMiddleware.startListening({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(previousState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + expectTypeOf(previousState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + + // Can pass a predicate function with fewer args + typedMiddleware.startListening({ + // TODO Why won't this infer the listener's `action` with implicit argument types? + predicate: ( + action: UnknownAction, + currentState: CounterState + ): action is PayloadAction => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + expectTypeOf(action).toEqualTypeOf>() + + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + + typedMiddleware.startListening({ + actionCreator: incrementByAmount, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + + store.dispatch( + addTypedListenerAction({ + predicate: ( + action, + currentState, + previousState + ): action is ReturnType => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(previousState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + expectTypeOf(previousState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + ) + + store.dispatch( + addTypedListenerAction({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(previousState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + expectTypeOf(previousState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + ) + }) + + test('Can create pre-typed versions of startListening and addListener', () => { + const typedAddListener = startListening as TypedStartListening + const typedAddListenerAction = addListener as TypedAddListener + + typedAddListener({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(previousState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + expectTypeOf(previousState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + // TODO Can't get the thunk dispatch types to carry through + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + + typedAddListener({ + matcher: incrementByAmount.match, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + // TODO Can't get the thunk dispatch types to carry through + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + + store.dispatch( + typedAddListenerAction({ + predicate: ( + action, + currentState, + previousState + ): action is UnknownAction => { + expectTypeOf(currentState).not.toBeAny() + + expectTypeOf(previousState).not.toBeAny() + + expectTypeOf(currentState).toEqualTypeOf() + + expectTypeOf(previousState).toEqualTypeOf() + + return true + }, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + ) + + store.dispatch( + typedAddListenerAction({ + matcher: incrementByAmount.match, + effect: (action, listenerApi) => { + const listenerState = listenerApi.getState() + + expectTypeOf(listenerState).toEqualTypeOf() + + listenerApi.dispatch((dispatch, getState) => { + const thunkState = listenerApi.getState() + + expectTypeOf(thunkState).toEqualTypeOf() + }) + }, + }) + ) + }) +}) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts index c6af789516..97bfbb50d2 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts @@ -1,38 +1,37 @@ import { + TaskAbortError, + addListener, + clearAllListeners, configureStore, createAction, + createListenerMiddleware, createSlice, isAnyOf, - isFluxStandardAction, + removeListener, } from '@reduxjs/toolkit' import type { Mock } from 'vitest' import { vi } from 'vitest' -import type { Action, UnknownAction, PayloadAction } from '@reduxjs/toolkit' - -import { - createListenerMiddleware, - createListenerEntry, - addListener, - removeListener, - TaskAbortError, - clearAllListeners, -} from '../index' - import type { + Action, ListenerEffect, ListenerEffectAPI, + PayloadAction, TypedAddListener, + TypedRemoveListener, TypedStartListening, - UnsubscribeListener, - ListenerMiddleware, -} from '../index' + UnknownAction, +} from '@reduxjs/toolkit' + +import { + listenerCancelled, + listenerCompleted, +} from '@internal/listenerMiddleware/exceptions' + import type { AbortSignalWithReason, AddListenerOverloads, - TypedRemoveListener, -} from '../types' -import { listenerCancelled, listenerCompleted } from '../exceptions' +} from '@internal/listenerMiddleware/types' const middlewareApi = { getState: expect.any(Function), @@ -76,44 +75,6 @@ export function deferred(): Deferred { return Object.assign(promise, methods) as Deferred } -export declare type IsAny = true | false extends ( - T extends never ? true : false -) - ? True - : False - -export declare type IsUnknown = unknown extends T - ? IsAny - : False - -export function expectType(t: T): T { - return t -} - -type Equals = IsAny< - T, - never, - IsAny -> -export function expectExactType(t: T) { - return >(u: U) => {} -} - -type EnsureUnknown = IsUnknown -export function expectUnknown>(t: T) { - return t -} - -type EnsureAny = IsAny -export function expectExactAny>(t: T) { - return t -} - -type IsNotAny = IsAny -export function expectNotAny>(t: T): T { - return t -} - describe('createListenerMiddleware', () => { let store = configureStore({ reducer: () => 42, @@ -150,16 +111,13 @@ describe('createListenerMiddleware', () => { let listenerMiddleware = createListenerMiddleware() let { middleware, startListening, stopListening, clearListeners } = listenerMiddleware - let addTypedListenerAction = addListener as TypedAddListener - let removeTypedListenerAction = + const removeTypedListenerAction = removeListener as TypedRemoveListener const testAction1 = createAction('testAction1') type TestAction1 = ReturnType const testAction2 = createAction('testAction2') - type TestAction2 = ReturnType const testAction3 = createAction('testAction3') - type TestAction3 = ReturnType beforeAll(() => { vi.spyOn(console, 'error').mockImplementation(noop) @@ -202,7 +160,6 @@ describe('createListenerMiddleware', () => { matcher: (action): action is Action => true, effect: (action, listenerApi) => { foundExtra = listenerApi.extra - expectType(listenerApi.extra) }, }) @@ -223,7 +180,7 @@ describe('createListenerMiddleware', () => { startListening({ actionCreator: testAction1, - effect: effect, + effect, }) store.dispatch(testAction1('a')) @@ -300,7 +257,7 @@ describe('createListenerMiddleware', () => { const unsubscribe = startListening({ matcher: isAction1Or2, - effect: effect, + effect, }) store.dispatch(testAction1('a')) @@ -449,8 +406,6 @@ describe('createListenerMiddleware', () => { }) ) - expectType(unsubscribe) - store.dispatch(testAction1('a')) unsubscribe() @@ -986,8 +941,8 @@ describe('createListenerMiddleware', () => { }) test('listenerApi.delay does not trigger unhandledRejections for completed or cancelled listners', async () => { - let deferredCompletedEvt = deferred() - let deferredCancelledEvt = deferred() + const deferredCompletedEvt = deferred() + const deferredCancelledEvt = deferred() const godotPauseTrigger = deferred() // Unfortunately we cannot test declaratively unhandleRejections in jest: https://github.com/facebook/jest/issues/5620 @@ -1209,10 +1164,6 @@ describe('createListenerMiddleware', () => { middleware: (gDM) => gDM().prepend(middleware), }) - type ExpectedTakeResultType = - | readonly [ReturnType, CounterState, CounterState] - | null - let timeout: number | undefined = undefined let done = false @@ -1231,8 +1182,6 @@ describe('createListenerMiddleware', () => { takeResult = await listenerApi.take(increment.match, timeout) expect(takeResult).toBeNull() - expectType(takeResult) - done = true }, }) @@ -1323,8 +1272,8 @@ describe('createListenerMiddleware', () => { }) test('take does not trigger unhandledRejections for completed or cancelled tasks', async () => { - let deferredCompletedEvt = deferred() - let deferredCancelledEvt = deferred() + const deferredCompletedEvt = deferred() + const deferredCancelledEvt = deferred() const store = configureStore({ reducer: counterSlice.reducer, middleware: (gDM) => gDM().prepend(middleware), @@ -1400,364 +1349,4 @@ describe('createListenerMiddleware', () => { expect(jobsCanceled).toBe(2) }) }) - - describe('Type tests', () => { - const listenerMiddleware = createListenerMiddleware() - const { middleware, startListening } = listenerMiddleware - const store = configureStore({ - reducer: counterSlice.reducer, - middleware: (gDM) => gDM().prepend(middleware), - }) - - test('State args default to unknown', () => { - createListenerEntry({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectUnknown(currentState) - expectUnknown(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectUnknown(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = getState() - expectUnknown(thunkState) - }) - }, - }) - - startListening({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectUnknown(currentState) - expectUnknown(previousState) - return true - }, - effect: (action, listenerApi) => {}, - }) - - startListening({ - matcher: increment.match, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectUnknown(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = getState() - expectUnknown(thunkState) - }) - }, - }) - - store.dispatch( - addListener({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectUnknown(currentState) - expectUnknown(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectUnknown(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = getState() - expectUnknown(thunkState) - }) - }, - }) - ) - - store.dispatch( - addListener({ - matcher: increment.match, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectUnknown(listenerState) - // TODO Can't get the thunk dispatch types to carry through - listenerApi.dispatch((dispatch, getState) => { - const thunkState = getState() - expectUnknown(thunkState) - }) - }, - }) - ) - }) - - test('Action type is inferred from args', () => { - startListening({ - type: 'abcd', - effect: (action, listenerApi) => { - expectType<{ type: 'abcd' }>(action) - }, - }) - - startListening({ - actionCreator: incrementByAmount, - effect: (action, listenerApi) => { - expectType>(action) - }, - }) - - startListening({ - matcher: incrementByAmount.match, - effect: (action, listenerApi) => { - expectType>(action) - }, - }) - - startListening({ - predicate: ( - action, - currentState, - previousState - ): action is PayloadAction => { - return ( - isFluxStandardAction(action) && typeof action.payload === 'boolean' - ) - }, - effect: (action, listenerApi) => { - expectExactType>(action) - }, - }) - - startListening({ - predicate: (action, currentState) => { - return ( - isFluxStandardAction(action) && typeof action.payload === 'number' - ) - }, - effect: (action, listenerApi) => { - expectExactType(action) - }, - }) - - store.dispatch( - addListener({ - type: 'abcd', - effect: (action, listenerApi) => { - expectType<{ type: 'abcd' }>(action) - }, - }) - ) - - store.dispatch( - addListener({ - actionCreator: incrementByAmount, - effect: (action, listenerApi) => { - expectType>(action) - }, - }) - ) - - store.dispatch( - addListener({ - matcher: incrementByAmount.match, - effect: (action, listenerApi) => { - expectType>(action) - }, - }) - ) - }) - - test('Can create a pre-typed middleware', () => { - const typedMiddleware = createListenerMiddleware() - - typedMiddleware.startListening({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectNotAny(currentState) - expectNotAny(previousState) - expectExactType(currentState) - expectExactType(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - - // Can pass a predicate function with fewer args - typedMiddleware.startListening({ - // TODO Why won't this infer the listener's `action` with implicit argument types? - predicate: ( - action: UnknownAction, - currentState: CounterState - ): action is PayloadAction => { - expectNotAny(currentState) - expectExactType(currentState) - return true - }, - effect: (action, listenerApi) => { - expectType>(action) - - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - - typedMiddleware.startListening({ - actionCreator: incrementByAmount, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - - store.dispatch( - addTypedListenerAction({ - predicate: ( - action, - currentState, - previousState - ): action is ReturnType => { - expectNotAny(currentState) - expectNotAny(previousState) - expectExactType(currentState) - expectExactType(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - ) - - store.dispatch( - addTypedListenerAction({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectNotAny(currentState) - expectNotAny(previousState) - expectExactType(currentState) - expectExactType(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - ) - }) - - test('Can create pre-typed versions of startListening and addListener', () => { - const typedAddListener = - startListening as TypedStartListening - const typedAddListenerAction = - addListener as TypedAddListener - - typedAddListener({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectNotAny(currentState) - expectNotAny(previousState) - expectExactType(currentState) - expectExactType(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - // TODO Can't get the thunk dispatch types to carry through - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - - typedAddListener({ - matcher: incrementByAmount.match, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - // TODO Can't get the thunk dispatch types to carry through - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - - store.dispatch( - typedAddListenerAction({ - predicate: ( - action, - currentState, - previousState - ): action is UnknownAction => { - expectNotAny(currentState) - expectNotAny(previousState) - expectExactType(currentState) - expectExactType(previousState) - return true - }, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - ) - - store.dispatch( - typedAddListenerAction({ - matcher: incrementByAmount.match, - effect: (action, listenerApi) => { - const listenerState = listenerApi.getState() - expectExactType(listenerState) - listenerApi.dispatch((dispatch, getState) => { - const thunkState = listenerApi.getState() - expectExactType(thunkState) - }) - }, - }) - ) - }) - }) }) - From 6b02a9100ab61a962a55e3dd95755c3e8910b0eb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 18:56:14 -0600 Subject: [PATCH 319/368] Fix type tests inside `mapBuilders.test-d.ts` --- .../toolkit/src/tests/mapBuilders.test-d.ts | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/toolkit/src/tests/mapBuilders.test-d.ts b/packages/toolkit/src/tests/mapBuilders.test-d.ts index c7283007ea..95a17b69a4 100644 --- a/packages/toolkit/src/tests/mapBuilders.test-d.ts +++ b/packages/toolkit/src/tests/mapBuilders.test-d.ts @@ -3,7 +3,6 @@ import { createAsyncThunk } from '@internal/createAsyncThunk' import { executeReducerBuilderCallback } from '@internal/mapBuilders' import type { UnknownAction } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' -import { expectType } from './utils/typeTestHelpers' describe('type tests', () => { test('builder callback for actionMap', () => { @@ -70,7 +69,7 @@ describe('type tests', () => { // action type is inferred builder.addMatcher(increment.match, (state, action) => { - expectType>(action) + expectTypeOf(action).toEqualTypeOf>() }) test('action type is inferred when type predicate lacks `type` property', () => { @@ -176,18 +175,18 @@ describe('type tests', () => { return 'ret' as const }) builder.addCase(thunk.pending, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: undefined meta: { arg: void requestId: string requestStatus: 'pending' } - }>(action) + }>() }) builder.addCase(thunk.rejected, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: unknown error: SerializedError meta: { @@ -198,17 +197,17 @@ describe('type tests', () => { condition: boolean rejectedWithValue: boolean } - }>(action) + }>() }) builder.addCase(thunk.fulfilled, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: 'ret' meta: { arg: void requestId: string requestStatus: 'fulfilled' } - }>(action) + }>() }) }) }) @@ -243,7 +242,7 @@ describe('type tests', () => { ) builder.addCase(thunk.pending, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: undefined meta: { arg: void @@ -251,11 +250,11 @@ describe('type tests', () => { requestStatus: 'pending' startedTimeStamp: number } - }>(action) + }>() }) builder.addCase(thunk.rejected, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: unknown error: SerializedError meta: { @@ -267,13 +266,14 @@ describe('type tests', () => { rejectedWithValue: boolean baseQueryMeta?: 'meta!' } - }>(action) + }>() + if (action.meta.rejectedWithValue) { - expectType<'meta!'>(action.meta.baseQueryMeta) + expectTypeOf(action.meta.baseQueryMeta).toEqualTypeOf<'meta!'>() } }) builder.addCase(thunk.fulfilled, (_, action) => { - expectType<{ + expectTypeOf(action).toMatchTypeOf<{ payload: 'ret' meta: { arg: void @@ -281,7 +281,7 @@ describe('type tests', () => { requestStatus: 'fulfilled' baseQueryMeta: 'meta!' } - }>(action) + }>() }) }) }) From 59f451d4287196f45cc77a55c6c2f0ca2f9b2195 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 19:35:37 -0600 Subject: [PATCH 320/368] Move the type tests inside `createApi.test.ts` into `createApi.test-d.ts` --- .../src/query/tests/createApi.test-d.ts | 380 ++++++++++++++++++ .../toolkit/src/query/tests/createApi.test.ts | 101 ++--- 2 files changed, 415 insertions(+), 66 deletions(-) create mode 100644 packages/toolkit/src/query/tests/createApi.test-d.ts diff --git a/packages/toolkit/src/query/tests/createApi.test-d.ts b/packages/toolkit/src/query/tests/createApi.test-d.ts new file mode 100644 index 0000000000..aafecaa052 --- /dev/null +++ b/packages/toolkit/src/query/tests/createApi.test-d.ts @@ -0,0 +1,380 @@ +import type { + DefinitionsFromApi, + OverrideResultType, + TagTypesFromApi, +} from '@internal/query/endpointDefinitions' +import { ANY, setupApiStore } from '@internal/tests/utils/helpers' +import type { SerializedError } from '@reduxjs/toolkit' +import { configureStore } from '@reduxjs/toolkit' +import type { + Api, + FetchBaseQueryError, + MutationDefinition, + QueryDefinition, +} from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' + +describe('type tests', () => { + test('sensible defaults', () => { + const api = createApi({ + baseQuery: fetchBaseQuery(), + endpoints: (build) => ({ + getUser: build.query({ + query(id) { + return { url: `user/${id}` } + }, + }), + updateUser: build.mutation({ + query: () => '', + }), + }), + }) + configureStore({ + reducer: { + [api.reducerPath]: api.reducer, + }, + middleware: (gDM) => gDM().concat(api.middleware), + }) + + expectTypeOf(api.reducerPath).toEqualTypeOf<'api'>() + + type TagTypes = typeof api extends Api + ? E + : 'no match' + + assertType(ANY as never) + + expectTypeOf(0).not.toMatchTypeOf() + }) + + describe('endpoint definition typings', () => { + const api = createApi({ + baseQuery: (from: 'From'): { data: 'To' } | Promise<{ data: 'To' }> => ({ + data: 'To', + }), + endpoints: () => ({}), + tagTypes: ['typeA', 'typeB'], + }) + test('query: query & transformResponse types', () => { + api.injectEndpoints({ + endpoints: (build) => ({ + query: build.query<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query1: build.query<'RetVal', 'Arg'>({ + // @ts-expect-error + query: (x: 'Error') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query2: build.query<'RetVal', 'Arg'>({ + // @ts-expect-error + query: (x: 'Arg') => 'Error' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query3: build.query<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + // @ts-expect-error + transformResponse(r: 'Error') { + return 'RetVal' as const + }, + }), + query4: build.query<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + // @ts-expect-error + transformResponse(r: 'To') { + return 'Error' as const + }, + }), + queryInference1: build.query<'RetVal', 'Arg'>({ + query: (x) => { + expectTypeOf(x).toEqualTypeOf<'Arg'>() + + return 'From' + }, + transformResponse(r) { + expectTypeOf(r).toEqualTypeOf<'To'>() + + return 'RetVal' + }, + }), + queryInference2: (() => { + const query = build.query({ + query: (x: 'Arg') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }) + + expectTypeOf(query).toMatchTypeOf< + QueryDefinition<'Arg', any, any, 'RetVal'> + >() + + return query + })(), + }), + }) + }) + test('mutation: query & transformResponse types', () => { + api.injectEndpoints({ + endpoints: (build) => ({ + query: build.mutation<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query1: build.mutation<'RetVal', 'Arg'>({ + // @ts-expect-error + query: (x: 'Error') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query2: build.mutation<'RetVal', 'Arg'>({ + // @ts-expect-error + query: (x: 'Arg') => 'Error' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }), + query3: build.mutation<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + // @ts-expect-error + transformResponse(r: 'Error') { + return 'RetVal' as const + }, + }), + query4: build.mutation<'RetVal', 'Arg'>({ + query: (x: 'Arg') => 'From' as const, + // @ts-expect-error + transformResponse(r: 'To') { + return 'Error' as const + }, + }), + mutationInference1: build.mutation<'RetVal', 'Arg'>({ + query: (x) => { + expectTypeOf(x).toEqualTypeOf<'Arg'>() + + return 'From' + }, + transformResponse(r) { + expectTypeOf(r).toEqualTypeOf<'To'>() + + return 'RetVal' + }, + }), + mutationInference2: (() => { + const query = build.mutation({ + query: (x: 'Arg') => 'From' as const, + transformResponse(r: 'To') { + return 'RetVal' as const + }, + }) + + expectTypeOf(query).toMatchTypeOf< + MutationDefinition<'Arg', any, any, 'RetVal'> + >() + + return query + })(), + }), + }) + }) + + describe('enhancing endpoint definitions', () => { + const baseQuery = (x: string) => ({ data: 'success' }) + function getNewApi() { + return createApi({ + baseQuery, + tagTypes: ['old'], + endpoints: (build) => ({ + query1: build.query<'out1', 'in1'>({ query: (id) => `${id}` }), + query2: build.query<'out2', 'in2'>({ query: (id) => `${id}` }), + mutation1: build.mutation<'out1', 'in1'>({ + query: (id) => `${id}`, + }), + mutation2: build.mutation<'out2', 'in2'>({ + query: (id) => `${id}`, + }), + }), + }) + } + const api = getNewApi() + + test('warn on wrong tagType', () => { + const storeRef = setupApiStore(api, undefined, { + withoutTestLifecycles: true, + }) + // only type-test this part + if (2 > 1) { + api.enhanceEndpoints({ + endpoints: { + query1: { + // @ts-expect-error + providesTags: ['new'], + }, + query2: { + // @ts-expect-error + providesTags: ['missing'], + }, + }, + }) + } + + const enhanced = api.enhanceEndpoints({ + addTagTypes: ['new'], + endpoints: { + query1: { + providesTags: ['new'], + }, + query2: { + // @ts-expect-error + providesTags: ['missing'], + }, + }, + }) + + storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) + + storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) + + // only type-test this part + if (2 > 1) { + enhanced.enhanceEndpoints({ + endpoints: { + query1: { + // returned `enhanced` api contains "new" entityType + providesTags: ['new'], + }, + query2: { + // @ts-expect-error + providesTags: ['missing'], + }, + }, + }) + } + }) + + test('modify', () => { + const storeRef = setupApiStore(api, undefined, { + withoutTestLifecycles: true, + }) + api.enhanceEndpoints({ + endpoints: { + query1: { + query: (x) => { + expectTypeOf(x).toEqualTypeOf<'in1'>() + + return 'modified1' + }, + }, + query2(definition) { + definition.query = (x) => { + expectTypeOf(x).toEqualTypeOf<'in2'>() + + return 'modified2' + } + }, + mutation1: { + query: (x) => { + expectTypeOf(x).toEqualTypeOf<'in1'>() + + return 'modified1' + }, + }, + mutation2(definition) { + definition.query = (x) => { + expectTypeOf(x).toEqualTypeOf<'in2'>() + + return 'modified2' + } + }, + // @ts-expect-error + nonExisting: {}, + }, + }) + + storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) + storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) + storeRef.store.dispatch(api.endpoints.mutation1.initiate('in1')) + storeRef.store.dispatch(api.endpoints.mutation2.initiate('in2')) + }) + + test('updated transform response types', async () => { + const baseApi = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), + tagTypes: ['old'], + endpoints: (build) => ({ + query1: build.query<'out1', void>({ query: () => 'success' }), + mutation1: build.mutation<'out1', void>({ query: () => 'success' }), + }), + }) + + type Transformed = { value: string } + + type Definitions = DefinitionsFromApi + type TagTypes = TagTypesFromApi + + type Q1Definition = OverrideResultType< + Definitions['query1'], + Transformed + > + type M1Definition = OverrideResultType< + Definitions['mutation1'], + Transformed + > + + type UpdatedDefinitions = Omit & { + query1: Q1Definition + mutation1: M1Definition + } + + const enhancedApi = baseApi.enhanceEndpoints< + TagTypes, + UpdatedDefinitions + >({ + endpoints: { + query1: { + transformResponse: (a, b, c) => ({ + value: 'transformed', + }), + }, + mutation1: { + transformResponse: (a, b, c) => ({ + value: 'transformed', + }), + }, + }, + }) + + const storeRef = setupApiStore(enhancedApi, undefined, { + withoutTestLifecycles: true, + }) + + const queryResponse = await storeRef.store.dispatch( + enhancedApi.endpoints.query1.initiate() + ) + + expectTypeOf(queryResponse.data).toMatchTypeOf< + Transformed | undefined + >() + + const mutationResponse = await storeRef.store.dispatch( + enhancedApi.endpoints.mutation1.initiate() + ) + + expectTypeOf(mutationResponse).toMatchTypeOf< + | { data: Transformed } + | { error: FetchBaseQueryError | SerializedError } + >() + }) + }) + }) +}) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 5c0f1e13f7..13fd1782d6 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,13 +1,6 @@ -import type { SerializedError } from '@reduxjs/toolkit' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' import type { - FetchBaseQueryError, FetchBaseQueryMeta, -} from '@reduxjs/toolkit/dist/query/fetchBaseQuery' -import type { - Api, - MutationDefinition, - QueryDefinition, SerializeQueryArgs, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' @@ -17,16 +10,14 @@ import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { HttpResponse, delay, http } from 'msw' -import nodeFetch from 'node-fetch' +} from '@internal/query/endpointDefinitions' +import { server } from '@internal/query/tests/mocks/server' import { - ANY, getSerializedHeaders, setupApiStore, -} from '../../tests/utils/helpers' -import { expectExactType, expectType } from '../../tests/utils/typeTestHelpers' -import { server } from './mocks/server' +} from '@internal/tests/utils/helpers' +import { HttpResponse, delay, http } from 'msw' +import nodeFetch from 'node-fetch' beforeAll(() => { vi.stubEnv('NODE_ENV', 'development') @@ -73,14 +64,6 @@ test('sensible defaults', () => { }) expect(api.reducerPath).toBe('api') - expectType<'api'>(api.reducerPath) - type TagTypes = typeof api extends Api - ? E - : 'no match' - expectType(ANY as never) - // @ts-expect-error - expectType(0) - expect(api.endpoints.getUser.name).toBe('getUser') expect(api.endpoints.updateUser.name).toBe('updateUser') }) @@ -192,7 +175,7 @@ describe('wrong tagTypes log errors', () => { if (shouldError) { expect(spy).toHaveBeenCalledWith( - "Tag type 'Users' was used, but not specified in `tagTypes`!" + "Tag type 'Users' was used, but not specified in `tagTypes`!", ) } else { expect(spy).not.toHaveBeenCalled() @@ -247,11 +230,9 @@ describe('endpoint definition typings', () => { }), queryInference1: build.query<'RetVal', 'Arg'>({ query: (x) => { - expectType<'Arg'>(x) return 'From' }, transformResponse(r) { - expectType<'To'>(r) return 'RetVal' }, }), @@ -262,7 +243,6 @@ describe('endpoint definition typings', () => { return 'RetVal' as const }, }) - expectType>(query) return query })(), }), @@ -307,11 +287,9 @@ describe('endpoint definition typings', () => { }), mutationInference1: build.mutation<'RetVal', 'Arg'>({ query: (x) => { - expectType<'Arg'>(x) return 'From' }, transformResponse(r) { - expectType<'To'>(r) return 'RetVal' }, }), @@ -322,7 +300,6 @@ describe('endpoint definition typings', () => { return 'RetVal' as const }, }) - expectType>(query) return query })(), }), @@ -466,7 +443,7 @@ describe('endpoint definition typings', () => { storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) await delay(1) expect(spy).toHaveBeenCalledWith( - "Tag type 'missing' was used, but not specified in `tagTypes`!" + "Tag type 'missing' was used, but not specified in `tagTypes`!", ) // only type-test this part @@ -494,25 +471,21 @@ describe('endpoint definition typings', () => { endpoints: { query1: { query: (x) => { - expectExactType('in1' as const)(x) return 'modified1' }, }, query2(definition) { definition.query = (x) => { - expectExactType('in2' as const)(x) return 'modified2' } }, mutation1: { query: (x) => { - expectExactType('in1' as const)(x) return 'modified1' }, }, mutation2(definition) { definition.query = (x) => { - expectExactType('in2' as const)(x) return 'modified2' } }, @@ -580,17 +553,13 @@ describe('endpoint definition typings', () => { }) const queryResponse = await storeRef.store.dispatch( - enhancedApi.endpoints.query1.initiate() + enhancedApi.endpoints.query1.initiate(), ) expect(queryResponse.data).toEqual({ value: 'transformed' }) - expectType(queryResponse.data) const mutationResponse = await storeRef.store.dispatch( - enhancedApi.endpoints.mutation1.initiate() + enhancedApi.endpoints.mutation1.initiate(), ) - expectType< - { data: Transformed } | { error: FetchBaseQueryError | SerializedError } - >(mutationResponse) expect('data' in mutationResponse && mutationResponse.data).toEqual({ value: 'transformed', }) @@ -635,7 +604,7 @@ describe('additional transformResponse behaviors', () => { }), transformResponse: ( response: { body: { nested: EchoResponseData } }, - meta + meta, ) => { return { ...response.body.nested, @@ -687,7 +656,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse transforms a response from a mutation', async () => { const result = await storeRef.store.dispatch( - api.endpoints.mutation.initiate({}) + api.endpoints.mutation.initiate({}), ) expect('data' in result && result.data).toEqual({ banana: 'bread' }) @@ -695,7 +664,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse transforms a response from a mutation with an error', async () => { const result = await storeRef.store.dispatch( - api.endpoints.mutationWithError.initiate({}) + api.endpoints.mutationWithError.initiate({}), ) expect('error' in result && result.error).toEqual('error') @@ -703,7 +672,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse can inject baseQuery meta into the end result from a mutation', async () => { const result = await storeRef.store.dispatch( - api.endpoints.mutationWithMeta.initiate({}) + api.endpoints.mutationWithMeta.initiate({}), ) expect('data' in result && result.data).toEqual({ @@ -725,7 +694,7 @@ describe('additional transformResponse behaviors', () => { test('transformResponse can inject baseQuery meta into the end result from a query', async () => { const result = await storeRef.store.dispatch( - api.endpoints.queryWithMeta.initiate() + api.endpoints.queryWithMeta.initiate(), ) expect(result.data).toEqual({ @@ -797,8 +766,8 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { http.get( 'https://example.com/success', () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) expect(storeRef.store.getState().testReducer.count).toBe(null) @@ -809,7 +778,7 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { expect(storeRef.store.getState().testReducer.count).toBe(-1) const successAttempt = storeRef.store.dispatch( - api.endpoints.query.initiate() + api.endpoints.query.initiate(), ) expect(storeRef.store.getState().testReducer.count).toBe(0) await successAttempt @@ -823,20 +792,20 @@ describe('query endpoint lifecycles - onStart, onSuccess, onError', () => { http.post( 'https://example.com/success', () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) expect(storeRef.store.getState().testReducer.count).toBe(null) const failAttempt = storeRef.store.dispatch( - api.endpoints.mutation.initiate() + api.endpoints.mutation.initiate(), ) expect(storeRef.store.getState().testReducer.count).toBe(0) await failAttempt expect(storeRef.store.getState().testReducer.count).toBe(-1) const successAttempt = storeRef.store.dispatch( - api.endpoints.mutation.initiate() + api.endpoints.mutation.initiate(), ) expect(storeRef.store.getState().testReducer.count).toBe(0) await successAttempt @@ -908,7 +877,7 @@ describe('structuralSharing flag behaviors', () => { const firstRef = api.endpoints.enabled.select()(storeRef.store.getState()) await storeRef.store.dispatch( - api.endpoints.enabled.initiate(undefined, { forceRefetch: true }) + api.endpoints.enabled.initiate(undefined, { forceRefetch: true }), ) const secondRef = api.endpoints.enabled.select()(storeRef.store.getState()) @@ -922,7 +891,7 @@ describe('structuralSharing flag behaviors', () => { const firstRef = api.endpoints.disabled.select()(storeRef.store.getState()) await storeRef.store.dispatch( - api.endpoints.disabled.initiate(undefined, { forceRefetch: true }) + api.endpoints.disabled.initiate(undefined, { forceRefetch: true }), ) const secondRef = api.endpoints.disabled.select()(storeRef.store.getState()) @@ -1027,23 +996,23 @@ describe('custom serializeQueryArgs per endpoint', () => { it('Works via createApi', async () => { await storeRef.store.dispatch( - api.endpoints.queryWithNoSerializer.initiate(99) + api.endpoints.queryWithNoSerializer.initiate(99), ) expect(serializer1).toHaveBeenCalledTimes(0) await storeRef.store.dispatch( - api.endpoints.queryWithCustomSerializer.initiate(42) + api.endpoints.queryWithCustomSerializer.initiate(42), ) expect(serializer1).toHaveBeenCalled() expect( - storeRef.store.getState().api.queries['base-queryWithNoSerializer-99'] + storeRef.store.getState().api.queries['base-queryWithNoSerializer-99'], ).toBeTruthy() expect( - storeRef.store.getState().api.queries['queryWithCustomSerializer-42'] + storeRef.store.getState().api.queries['queryWithCustomSerializer-42'], ).toBeTruthy() }) @@ -1062,14 +1031,14 @@ describe('custom serializeQueryArgs per endpoint', () => { expect(serializer2).toHaveBeenCalledTimes(0) await storeRef.store.dispatch( - injectedApi.endpoints.injectedQueryWithCustomSerializer.initiate(5) + injectedApi.endpoints.injectedQueryWithCustomSerializer.initiate(5), ) expect(serializer2).toHaveBeenCalled() expect( storeRef.store.getState().api.queries[ 'injectedQueryWithCustomSerializer-5' - ] + ], ).toBeTruthy() }) @@ -1078,13 +1047,13 @@ describe('custom serializeQueryArgs per endpoint', () => { api.endpoints.queryWithCustomObjectSerializer.initiate({ id: 42, client: dummyClient, - }) + }), ) expect( storeRef.store.getState().api.queries[ 'queryWithCustomObjectSerializer({"id":42})' - ] + ], ).toBeTruthy() }) @@ -1093,13 +1062,13 @@ describe('custom serializeQueryArgs per endpoint', () => { api.endpoints.queryWithCustomNumberSerializer.initiate({ id: 42, client: dummyClient, - }) + }), ) expect( storeRef.store.getState().api.queries[ 'queryWithCustomNumberSerializer(42)' - ] + ], ).toBeTruthy() }) @@ -1115,7 +1084,7 @@ describe('custom serializeQueryArgs per endpoint', () => { const results = paginate(allItems, PAGE_SIZE, pageNum) return HttpResponse.json(results) - }) + }), ) // Page number shouldn't matter here, because the cache key ignores that. @@ -1144,7 +1113,7 @@ describe('custom serializeQueryArgs per endpoint', () => { const results = paginate(allItems, PAGE_SIZE, pageNum) return HttpResponse.json(results) - }) + }), ) const selectListItems = api.endpoints.listItems2.select(0) From 50df02dcd02c837f268195c4a1f390d96c79c3a9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 19:55:17 -0600 Subject: [PATCH 321/368] Move the type tests inside `cacheLifecycle.test.ts` into `cacheLifecycle.test-d.ts` --- .../src/query/tests/cacheLifecycle.test-d.ts | 31 +++++++++++ .../src/query/tests/cacheLifecycle.test.ts | 55 +++++++++---------- 2 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 packages/toolkit/src/query/tests/cacheLifecycle.test-d.ts diff --git a/packages/toolkit/src/query/tests/cacheLifecycle.test-d.ts b/packages/toolkit/src/query/tests/cacheLifecycle.test-d.ts new file mode 100644 index 0000000000..3133bbc879 --- /dev/null +++ b/packages/toolkit/src/query/tests/cacheLifecycle.test-d.ts @@ -0,0 +1,31 @@ +import type { FetchBaseQueryMeta } from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' + +const api = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), + endpoints: () => ({}), +}) + +describe('type tests', () => { + test(`mutation: await cacheDataLoaded, await cacheEntryRemoved (success)`, () => { + const extended = api.injectEndpoints({ + overrideExisting: true, + endpoints: (build) => ({ + injected: build.mutation({ + query: () => '/success', + async onCacheEntryAdded( + arg, + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, + ) { + const firstValue = await cacheDataLoaded + + expectTypeOf(firstValue).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + }), + }), + }) + }) +}) diff --git a/packages/toolkit/src/query/tests/cacheLifecycle.test.ts b/packages/toolkit/src/query/tests/cacheLifecycle.test.ts index e143af311a..7876777857 100644 --- a/packages/toolkit/src/query/tests/cacheLifecycle.test.ts +++ b/packages/toolkit/src/query/tests/cacheLifecycle.test.ts @@ -1,12 +1,10 @@ -import type { FetchBaseQueryMeta } from '@reduxjs/toolkit/query' -import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' import { DEFAULT_DELAY_MS, fakeTimerWaitFor, setupApiStore, -} from '../../tests/utils/helpers' -import { expectType } from '../../tests/utils/typeTestHelpers' -import type { QueryActionCreatorResult } from '../core/buildInitiate' +} from '@internal/tests/utils/helpers' +import type { QueryActionCreatorResult } from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' beforeAll(() => { vi.useFakeTimers() @@ -58,7 +56,7 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/success', async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved } + { dispatch, getState, cacheEntryRemoved }, ) { onNewCacheEntry(arg) await cacheEntryRemoved @@ -68,7 +66,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -98,13 +96,10 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/success', async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved, cacheDataLoaded } + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, ) { onNewCacheEntry(arg) const firstValue = await cacheDataLoaded - expectType<{ data: number; meta?: FetchBaseQueryMeta }>( - firstValue - ) gotFirstValue(firstValue) await cacheEntryRemoved onCleanup() @@ -113,7 +108,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -156,7 +151,7 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/error', // we will initiate only once and that one time will be an error -> cacheDataLoaded will never resolve async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved, cacheDataLoaded } + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, ) { onNewCacheEntry(arg) // this will wait until cacheEntryRemoved, then reject => nothing past that line will execute @@ -171,7 +166,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -196,7 +191,7 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/error', // we will initiate only once and that one time will be an error -> cacheDataLoaded will never resolve async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved, cacheDataLoaded } + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, ) { onNewCacheEntry(arg) @@ -214,7 +209,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -247,7 +242,7 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/error', // we will initiate only once and that one time will be an error -> cacheDataLoaded will never resolve async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved, cacheDataLoaded } + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, ) { onNewCacheEntry(arg) @@ -266,7 +261,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -298,7 +293,7 @@ describe.each([['query'], ['mutation']] as const)( query: () => '/error', // we will initiate only once and that one time will be an error -> cacheDataLoaded will never resolve async onCacheEntryAdded( arg, - { dispatch, getState, cacheEntryRemoved, cacheDataLoaded } + { dispatch, getState, cacheEntryRemoved, cacheDataLoaded }, ) { onNewCacheEntry(arg) @@ -317,7 +312,7 @@ describe.each([['query'], ['mutation']] as const)( }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onNewCacheEntry).toHaveBeenCalledWith('arg') @@ -340,7 +335,7 @@ describe.each([['query'], ['mutation']] as const)( message: 'Promise never resolved before cacheEntryRemoved.', }) }) - } + }, ) test(`query: getCacheEntry`, async () => { @@ -358,7 +353,7 @@ test(`query: getCacheEntry`, async () => { getCacheEntry, cacheEntryRemoved, cacheDataLoaded, - } + }, ) { snapshot(getCacheEntry()) gotFirstValue(await cacheDataLoaded) @@ -370,7 +365,7 @@ test(`query: getCacheEntry`, async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await promise promise.unsubscribe() @@ -432,7 +427,7 @@ test(`mutation: getCacheEntry`, async () => { getCacheEntry, cacheEntryRemoved, cacheDataLoaded, - } + }, ) { snapshot(getCacheEntry()) gotFirstValue(await cacheDataLoaded) @@ -444,7 +439,7 @@ test(`mutation: getCacheEntry`, async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await fakeTimerWaitFor(() => { expect(gotFirstValue).toHaveBeenCalled() @@ -502,7 +497,7 @@ test('updateCachedData', async () => { updateCachedData, cacheEntryRemoved, cacheDataLoaded, - } + }, ) { expect(getCacheEntry().data).toEqual(undefined) // calling `updateCachedData` when there is no data yet should not do anything @@ -540,7 +535,7 @@ test('updateCachedData', async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await promise promise.unsubscribe() @@ -575,7 +570,7 @@ test('dispatching further actions does not trigger another lifecycle', async () expect(onNewCacheEntry).toHaveBeenCalledTimes(1) await storeRef.store.dispatch( - extended.endpoints.injected.initiate(undefined, { forceRefetch: true }) + extended.endpoints.injected.initiate(undefined, { forceRefetch: true }), ) expect(onNewCacheEntry).toHaveBeenCalledTimes(1) }) @@ -593,7 +588,7 @@ test('dispatching a query initializer with `subscribe: false` does also start a }), }) await storeRef.store.dispatch( - extended.endpoints.injected.initiate(undefined, { subscribe: false }) + extended.endpoints.injected.initiate(undefined, { subscribe: false }), ) expect(onNewCacheEntry).toHaveBeenCalledTimes(1) @@ -615,7 +610,7 @@ test('dispatching a mutation initializer with `track: false` does not start a li }), }) await storeRef.store.dispatch( - extended.endpoints.injected.initiate(undefined, { track: false }) + extended.endpoints.injected.initiate(undefined, { track: false }), ) expect(onNewCacheEntry).toHaveBeenCalledTimes(0) From 9f7cf97e47a5ac357fd787177286041253e8cefd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 20:07:08 -0600 Subject: [PATCH 322/368] Move the type tests inside `errorHandling.test.tsx` into `errorHandling.test-d.tsx` --- .../src/query/tests/errorHandling.test-d.tsx | 51 +++++++++++++++++++ .../src/query/tests/errorHandling.test.tsx | 11 ++-- 2 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 packages/toolkit/src/query/tests/errorHandling.test-d.tsx diff --git a/packages/toolkit/src/query/tests/errorHandling.test-d.tsx b/packages/toolkit/src/query/tests/errorHandling.test-d.tsx new file mode 100644 index 0000000000..d546b0cb60 --- /dev/null +++ b/packages/toolkit/src/query/tests/errorHandling.test-d.tsx @@ -0,0 +1,51 @@ +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { useState } from 'react' + +const mockSuccessResponse = { value: 'success' } + +const api = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), + endpoints: (build) => ({ + update: build.mutation({ + query: () => ({ url: 'success' }), + }), + failedUpdate: build.mutation({ + query: () => ({ url: 'error' }), + }), + }), +}) + +describe('type tests', () => { + test('a mutation is unwrappable and has the correct types', () => { + function User() { + const [manualError, setManualError] = useState() + const [update, { isLoading, data, error }] = + api.endpoints.update.useMutation() + + return ( +
+
{String(isLoading)}
+
{JSON.stringify(data)}
+
{JSON.stringify(error)}
+
+ {JSON.stringify(manualError)} +
+ +
+ ) + } + }) +}) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index ae1bbbc296..04ce766fb2 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -1,5 +1,5 @@ import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit' -import type { BaseQueryFn } from '@reduxjs/toolkit/query/react' +import type { BaseQueryFn, BaseQueryApi } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' import { act, @@ -14,10 +14,8 @@ import axios from 'axios' import { HttpResponse, http } from 'msw' import * as React from 'react' import { useDispatch } from 'react-redux' -import { hookWaitFor, setupApiStore } from '../../tests/utils/helpers' -import { expectExactType } from '../../tests/utils/typeTestHelpers' -import type { BaseQueryApi } from '../baseQueryTypes' -import { server } from './mocks/server' +import { hookWaitFor, setupApiStore } from '@internal/tests/utils/helpers' +import { server } from '@internal/query/tests/mocks/server' const baseQuery = fetchBaseQuery({ baseUrl: 'https://example.com' }) @@ -409,7 +407,7 @@ describe('custom axios baseQuery', () => { meta: { request: config, response: result }, } } catch (axiosError) { - let err = axiosError as AxiosError + const err = axiosError as AxiosError return { error: { status: err.response?.status, @@ -517,7 +515,6 @@ describe('error handling in a component', () => { update({ name: 'hello' }) .unwrap() .then((result) => { - expectExactType(mockSuccessResponse)(result) setManualError(undefined) }) .catch((error) => act(() => setManualError(error))) From f7dbd7e0eade0d5ce349ee85cc965430d42b2200 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 20:26:13 -0600 Subject: [PATCH 323/368] Move the type tests inside `getDefaultMiddleware.test.ts` into `getDefaultMiddleware.test-d.ts` --- .../src/tests/getDefaultMiddleware.test-d.ts | 84 ++++++++++++++++++- .../src/tests/getDefaultMiddleware.test.ts | 30 +------ 2 files changed, 84 insertions(+), 30 deletions(-) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts index 029cae9e64..8301ae1594 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts @@ -1,5 +1,14 @@ +import type { + Action, + ThunkAction, + ThunkDispatch, + ThunkMiddleware, + Tuple, + UnknownAction, +} from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' -import type { Middleware } from 'redux' +import type { Dispatch, Middleware } from 'redux' +import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' declare const middleware1: Middleware<{ (_: string): number @@ -12,6 +21,8 @@ declare const middleware2: Middleware<{ type ThunkReturn = Promise<'thunk'> declare const thunkCreator: () => () => ThunkReturn +const getDefaultMiddleware = buildGetDefaultMiddleware() + describe('type tests', () => { test('prepend single element', () => { const store = configureStore({ @@ -113,4 +124,75 @@ describe('type tests', () => { expectTypeOf(store.dispatch('foo')).not.toBeString() }) + + test('allows passing options to thunk', () => { + const extraArgument = 42 as const + + const m2 = getDefaultMiddleware({ + thunk: false, + }) + + expectTypeOf(m2).toEqualTypeOf>() + + const dummyMiddleware: Middleware< + { + (action: Action<'actionListenerMiddleware/add'>): () => void + }, + { counter: number } + > = (storeApi) => (next) => (action) => { + return next(action) + } + + const dummyMiddleware2: Middleware<{}, { counter: number }> = + (storeApi) => (next) => (action) => {} + + const testThunk: ThunkAction< + void, + { counter: number }, + number, + UnknownAction + > = (dispatch, getState, extraArg) => { + expect(extraArg).toBe(extraArgument) + } + + const reducer = () => ({ counter: 123 }) + + const store = configureStore({ + reducer, + middleware: (gDM) => { + const middleware = gDM({ + thunk: { extraArgument }, + immutableCheck: false, + serializableCheck: false, + actionCreatorCheck: false, + }) + + const m3 = middleware.concat(dummyMiddleware, dummyMiddleware2) + + expectTypeOf(m3).toMatchTypeOf< + Tuple< + [ + ThunkMiddleware, + Middleware< + (action: Action<'actionListenerMiddleware/add'>) => () => void, + { + counter: number + }, + Dispatch + >, + Middleware<{}, any, Dispatch>, + ] + > + >() + + return m3 + }, + }) + + expectTypeOf(store.dispatch).toMatchTypeOf< + ThunkDispatch & Dispatch + >() + + store.dispatch(testThunk) + }) }) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts index d32def1019..41d92340e7 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts @@ -1,20 +1,14 @@ import type { Action, - Dispatch, Middleware, ThunkAction, - ThunkDispatch, UnknownAction, } from '@reduxjs/toolkit' -import { configureStore } from '@reduxjs/toolkit' -import type { ThunkMiddleware } from 'redux-thunk' +import { Tuple, configureStore } from '@reduxjs/toolkit' import { thunk } from 'redux-thunk' import { vi } from 'vitest' -import { expectType } from './utils/typeTestHelpers' - import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' -import { Tuple } from '@internal/utils' const getDefaultMiddleware = buildGetDefaultMiddleware() @@ -80,8 +74,6 @@ describe('getDefaultMiddleware', () => { thunk: false, }) - expectType>(m2) - const dummyMiddleware: Middleware< { (action: Action<'actionListenerMiddleware/add'>): () => void @@ -117,30 +109,10 @@ describe('getDefaultMiddleware', () => { const m3 = middleware.concat(dummyMiddleware, dummyMiddleware2) - expectType< - Tuple< - [ - ThunkMiddleware, - Middleware< - (action: Action<'actionListenerMiddleware/add'>) => () => void, - { - counter: number - }, - Dispatch - >, - Middleware<{}, any, Dispatch> - ] - > - >(m3) - return m3 }, }) - expectType & Dispatch>( - store.dispatch - ) - store.dispatch(testThunk) }) From 8025f6134bc93624582f6348f99e6ad7012f77fc Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 20:36:39 -0600 Subject: [PATCH 324/368] Move the type tests inside `createAsyncThunk.test.ts` into `createAsyncThunk.test-d.ts` --- .../src/tests/createAsyncThunk.test-d.ts | 104 +++++++++++------- .../src/tests/createAsyncThunk.test.ts | 10 +- 2 files changed, 71 insertions(+), 43 deletions(-) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index 4df60017ca..de9ec038c5 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -23,20 +23,20 @@ describe('type tests', () => { test('basic usage', () => { ;(async function () { const async = createAsyncThunk('test', (id: number) => - Promise.resolve(id * 2) + Promise.resolve(id * 2), ) const reducer = createReducer({}, (builder) => builder .addCase(async.pending, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['pending']> >() }) .addCase(async.fulfilled, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['fulfilled']> >() expectTypeOf(action.payload).toBeNumber() @@ -44,7 +44,7 @@ describe('type tests', () => { .addCase(async.rejected, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['rejected']> >() expectTypeOf(action.error).toMatchTypeOf< @@ -56,7 +56,7 @@ describe('type tests', () => { expectTypeOf(action.error).not.toEqualTypeOf< Partial | undefined >() - }) + }), ) const promise = defaultDispatch(async(3)) @@ -71,19 +71,19 @@ describe('type tests', () => { if (async.fulfilled.match(result)) { expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['fulfilled']> >() expectTypeOf(result).not.toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['rejected']> >() } else { expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['rejected']> >() expectTypeOf(result).not.toEqualTypeOf< - ReturnType + ReturnType<(typeof async)['fulfilled']> >() } @@ -141,7 +141,7 @@ describe('type tests', () => { expectTypeOf(extra).toEqualTypeOf<{ userAPI: Function }>() return fakeBooks - } + }, ) correctDispatch(fetchBooksTAC(1)) @@ -207,7 +207,7 @@ describe('type tests', () => { createReducer({}, (builder) => builder.addCase(thunk.fulfilled, (s, action) => { expectTypeOf(action.payload).toEqualTypeOf() - }) + }), ) })() }) @@ -234,7 +234,7 @@ describe('type tests', () => { >('calls/fetchLiveCalls', async (organizationId, { rejectWithValue }) => { try { const result = await apiRequest.get( - `organizations/${organizationId}/calls/live/iwill404` + `organizations/${organizationId}/calls/live/iwill404`, ) return result.data.data } catch (err) { @@ -251,13 +251,13 @@ describe('type tests', () => { if (fetchLiveCallsError.fulfilled.match(result)) { //success expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof fetchLiveCallsError)['fulfilled']> >() expectTypeOf(result.payload).toEqualTypeOf() } else { expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof fetchLiveCallsError)['rejected']> >() if (result.payload) { @@ -286,7 +286,7 @@ describe('type tests', () => { expectTypeOf( // @ts-expect-error - unwrapResult(unwrapped) + unwrapResult(unwrapped), ).not.toEqualTypeOf() }) }) @@ -364,7 +364,7 @@ describe('type tests', () => { // in that case, we have to forbid this behaviour or it will make arguments optional everywhere const asyncThunk = createAsyncThunk( 'test', - (arg: number | undefined) => 0 + (arg: number | undefined) => 0, ) expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() @@ -481,7 +481,7 @@ describe('type tests', () => { test('two arguments, first specified as undefined: asyncThunk has no argument', () => { const asyncThunk = createAsyncThunk( 'test', - (arg: undefined, thunkApi) => 0 + (arg: undefined, thunkApi) => 0, ) expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() @@ -537,7 +537,7 @@ describe('type tests', () => { // in that case, we have to forbid this behaviour or it will make arguments optional everywhere const asyncThunk = createAsyncThunk( 'test', - (arg: number | undefined, thunkApi) => 0 + (arg: number | undefined, thunkApi) => 0, ) expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() @@ -558,7 +558,7 @@ describe('type tests', () => { test('two arguments, first specified as number|void: asyncThunk has optional number argument', () => { const asyncThunk = createAsyncThunk( 'test', - (arg: number | void, thunkApi) => 0 + (arg: number | void, thunkApi) => 0, ) expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() @@ -671,14 +671,14 @@ describe('type tests', () => { } catch (e) { return rejectWithValue(e) } - } + }, ) defaultDispatch(asyncThunk()) .then((result) => { if (asyncThunk.fulfilled.match(result)) { expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof asyncThunk)['fulfilled']> >() expectTypeOf(result.payload).toBeBoolean() @@ -686,7 +686,7 @@ describe('type tests', () => { expectTypeOf(result).not.toHaveProperty('error') } else { expectTypeOf(result).toEqualTypeOf< - ReturnType + ReturnType<(typeof asyncThunk)['rejected']> >() expectTypeOf(result.error).toEqualTypeOf() @@ -749,7 +749,7 @@ describe('type tests', () => { (arg: string) => {}, { idGenerator: returnsStrWithStringArg, - } + }, ) const returnsStrWithoutArgs = () => 'foo' @@ -774,7 +774,7 @@ describe('type tests', () => { } catch (rejected: any) { return rejectWithValue(rejected?.response?.error || rejected) } - } + }, ) createSlice({ @@ -794,38 +794,38 @@ describe('type tests', () => { createAsyncThunk<'ret', void, {}>('test', (_, api) => 'ret' as const) createAsyncThunk<'ret', void, {}>('test', async (_, api) => 'ret' as const) createAsyncThunk<'ret', void, { fulfilledMeta: string }>('test', (_, api) => - api.fulfillWithValue('ret' as const, '') + api.fulfillWithValue('ret' as const, ''), ) createAsyncThunk<'ret', void, { fulfilledMeta: string }>( 'test', - async (_, api) => api.fulfillWithValue('ret' as const, '') + async (_, api) => api.fulfillWithValue('ret' as const, ''), ) createAsyncThunk<'ret', void, { fulfilledMeta: string }>( 'test', // @ts-expect-error has to be a fulfilledWithValue call - (_, api) => 'ret' as const + (_, api) => 'ret' as const, ) createAsyncThunk<'ret', void, { fulfilledMeta: string }>( 'test', // @ts-expect-error has to be a fulfilledWithValue call - async (_, api) => 'ret' as const + async (_, api) => 'ret' as const, ) createAsyncThunk<'ret', void, { fulfilledMeta: string }>( 'test', // @ts-expect-error should only allow returning with 'test' - (_, api) => api.fulfillWithValue(5, '') + (_, api) => api.fulfillWithValue(5, ''), ) createAsyncThunk<'ret', void, { fulfilledMeta: string }>( 'test', // @ts-expect-error should only allow returning with 'test' - async (_, api) => api.fulfillWithValue(5, '') + async (_, api) => api.fulfillWithValue(5, ''), ) // reject values createAsyncThunk<'ret', void, { rejectValue: string }>('test', (_, api) => - api.rejectWithValue('ret') + api.rejectWithValue('ret'), ) createAsyncThunk<'ret', void, { rejectValue: string }>( 'test', - async (_, api) => api.rejectWithValue('ret') + async (_, api) => api.rejectWithValue('ret'), ) createAsyncThunk< 'ret', @@ -849,7 +849,7 @@ describe('type tests', () => { >( 'test', // @ts-expect-error wrong rejectedMeta type - (_, api) => api.rejectWithValue('ret', '') + (_, api) => api.rejectWithValue('ret', ''), ) createAsyncThunk< 'ret', @@ -858,7 +858,7 @@ describe('type tests', () => { >( 'test', // @ts-expect-error wrong rejectedMeta type - async (_, api) => api.rejectWithValue('ret', '') + async (_, api) => api.rejectWithValue('ret', ''), ) createAsyncThunk< 'ret', @@ -867,7 +867,7 @@ describe('type tests', () => { >( 'test', // @ts-expect-error wrong rejectValue type - (_, api) => api.rejectWithValue(5, '') + (_, api) => api.rejectWithValue(5, ''), ) createAsyncThunk< 'ret', @@ -876,7 +876,7 @@ describe('type tests', () => { >( 'test', // @ts-expect-error wrong rejectValue type - async (_, api) => api.rejectWithValue(5, '') + async (_, api) => api.rejectWithValue(5, ''), ) }) @@ -984,7 +984,7 @@ describe('type tests', () => { expectTypeOf(api.rejectWithValue).parameters.toEqualTypeOf<[number]>() return api.rejectWithValue(5) - } + }, ) const slice = createSlice({ @@ -1023,4 +1023,34 @@ describe('type tests', () => { type RootState = ReturnType type AppDispatch = typeof store.dispatch }) + + test('rejectedMeta', async () => { + const getNewStore = () => + configureStore({ + reducer(actions = [], action) { + return [...actions, action] + }, + }) + + const store = getNewStore() + + const fulfilledThunk = createAsyncThunk< + string, + string, + { rejectedMeta: { extraProp: string } } + >('test', (arg: string, { rejectWithValue }) => { + return rejectWithValue('damn!', { extraProp: 'baz' }) + }) + + const promise = store.dispatch(fulfilledThunk('testArg')) + + const ret = await promise + + if (ret.meta.requestStatus === 'rejected' && ret.meta.rejectedWithValue) { + expectTypeOf(ret.meta.extraProp).toBeString() + } else { + // could be caused by a `throw`, `abort()` or `condition` - no `rejectedMeta` in that case + expectTypeOf(ret.meta).not.toHaveProperty('extraProp') + } + }) }) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test.ts b/packages/toolkit/src/tests/createAsyncThunk.test.ts index 7134409e7b..cf39d269a9 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test.ts @@ -1,10 +1,10 @@ -import { miniSerializeError } from '@internal/createAsyncThunk' import type { UnknownAction } from '@reduxjs/toolkit' import { configureStore, createAsyncThunk, createReducer, unwrapResult, + miniSerializeError } from '@reduxjs/toolkit' import { vi } from 'vitest' @@ -13,8 +13,7 @@ import { getLog, mockConsole, } from 'console-testing-library/pure' -import { delay } from '../utils' -import { expectType } from './utils/typeTestHelpers' +import { delay } from '@internal/utils' declare global { interface Window { @@ -683,7 +682,7 @@ describe('conditional skipping of asyncThunks', () => { }, meta: { aborted: false, - arg: arg, + arg, rejectedWithValue: false, condition: true, requestId: expect.stringContaining(''), @@ -896,7 +895,7 @@ describe('meta', () => { return [...actions, action] }, }) - let store = getNewStore() + const store = getNewStore() beforeEach(() => { const store = getNewStore() @@ -970,7 +969,6 @@ describe('meta', () => { }) if (ret.meta.requestStatus === 'rejected' && ret.meta.rejectedWithValue) { - expectType(ret.meta.extraProp) } else { // could be caused by a `throw`, `abort()` or `condition` - no `rejectedMeta` in that case // @ts-expect-error From 56c3bc5d8a5a324f7f67d46524c7ac3d71f26a5c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 20:46:49 -0600 Subject: [PATCH 325/368] Move the type tests inside `matchers.test.tsx` into `matchers.test-d.tsx` --- .../src/query/tests/matchers.test-d.tsx | 80 +++++++++++++++++++ .../toolkit/src/query/tests/matchers.test.tsx | 64 +++++++-------- 2 files changed, 107 insertions(+), 37 deletions(-) create mode 100644 packages/toolkit/src/query/tests/matchers.test-d.tsx diff --git a/packages/toolkit/src/query/tests/matchers.test-d.tsx b/packages/toolkit/src/query/tests/matchers.test-d.tsx new file mode 100644 index 0000000000..2d73df12d0 --- /dev/null +++ b/packages/toolkit/src/query/tests/matchers.test-d.tsx @@ -0,0 +1,80 @@ +import type { SerializedError } from '@reduxjs/toolkit' +import { createSlice } from '@reduxjs/toolkit' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' + +interface ResultType { + result: 'complex' +} + +interface ArgType { + foo: 'bar' + count: 3 +} + +const baseQuery = fetchBaseQuery({ baseUrl: 'https://example.com' }) +const api = createApi({ + baseQuery, + endpoints(build) { + return { + querySuccess: build.query({ + query: () => '/success', + }), + querySuccess2: build.query({ query: () => '/success' }), + queryFail: build.query({ query: () => '/error' }), + mutationSuccess: build.mutation({ + query: () => ({ url: '/success', method: 'POST' }), + }), + mutationSuccess2: build.mutation({ + query: () => ({ url: '/success', method: 'POST' }), + }), + mutationFail: build.mutation({ + query: () => ({ url: '/error', method: 'POST' }), + }), + } + }, +}) + +describe('type tests', () => { + test('inferred types', () => { + createSlice({ + name: 'auth', + initialState: {}, + reducers: {}, + extraReducers: (builder) => { + builder + .addMatcher( + api.endpoints.querySuccess.matchPending, + (state, action) => { + expectTypeOf(action.payload).toBeUndefined() + + expectTypeOf( + action.meta.arg.originalArgs, + ).toEqualTypeOf() + }, + ) + .addMatcher( + api.endpoints.querySuccess.matchFulfilled, + (state, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + + expectTypeOf(action.meta.fulfilledTimeStamp).toBeNumber() + + expectTypeOf( + action.meta.arg.originalArgs, + ).toEqualTypeOf() + }, + ) + .addMatcher( + api.endpoints.querySuccess.matchRejected, + (state, action) => { + expectTypeOf(action.error).toEqualTypeOf() + + expectTypeOf( + action.meta.arg.originalArgs, + ).toEqualTypeOf() + }, + ) + }, + }) + }) +}) diff --git a/packages/toolkit/src/query/tests/matchers.test.tsx b/packages/toolkit/src/query/tests/matchers.test.tsx index 2aad352e5c..5b26740e98 100644 --- a/packages/toolkit/src/query/tests/matchers.test.tsx +++ b/packages/toolkit/src/query/tests/matchers.test.tsx @@ -1,13 +1,11 @@ -import type { SerializedError } from '@reduxjs/toolkit' -import { createSlice } from '@reduxjs/toolkit' -import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { act, renderHook } from '@testing-library/react' import { actionsReducer, hookWaitFor, setupApiStore, -} from '../../tests/utils/helpers' -import { expectExactType } from '../../tests/utils/typeTestHelpers' +} from '@internal/tests/utils/helpers' +import { createSlice } from '@reduxjs/toolkit' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { act, renderHook } from '@testing-library/react' interface ResultType { result: 'complex' @@ -65,23 +63,23 @@ test('matches query pending & fulfilled actions for the given endpoint', async ( expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, otherEndpoint.matchPending, - otherEndpoint.matchFulfilled + otherEndpoint.matchFulfilled, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, api.endpoints.mutationSuccess.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) }) test('matches query pending & rejected actions for the given endpoint', async () => { @@ -93,17 +91,17 @@ test('matches query pending & rejected actions for the given endpoint', async () expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) }) @@ -118,18 +116,18 @@ test('matches lazy query pending & fulfilled actions for given endpoint', async expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) }) @@ -144,17 +142,17 @@ test('matches lazy query pending & rejected actions for given endpoint', async ( expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) }) @@ -170,22 +168,22 @@ test('matches mutation pending & fulfilled actions for the given endpoint', asyn expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, otherEndpoint.matchPending, - otherEndpoint.matchFulfilled + otherEndpoint.matchFulfilled, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) }) test('matches mutation pending & rejected actions for the given endpoint', async () => { @@ -199,17 +197,17 @@ test('matches mutation pending & rejected actions for the given endpoint', async expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchFulfilled, - endpoint.matchRejected + endpoint.matchRejected, ) expect(storeRef.store.getState().actions).not.toMatchSequence( api.internalActions.middlewareRegistered.match, endpoint.matchPending, - endpoint.matchFulfilled + endpoint.matchFulfilled, ) }) @@ -223,28 +221,20 @@ test('inferred types', () => { .addMatcher( api.endpoints.querySuccess.matchPending, (state, action) => { - expectExactType(undefined)(action.payload) // @ts-expect-error console.log(action.error) - expectExactType({} as ArgType)(action.meta.arg.originalArgs) - } + }, ) .addMatcher( api.endpoints.querySuccess.matchFulfilled, (state, action) => { - expectExactType({} as ResultType)(action.payload) - expectExactType(0 as number)(action.meta.fulfilledTimeStamp) // @ts-expect-error console.log(action.error) - expectExactType({} as ArgType)(action.meta.arg.originalArgs) - } + }, ) .addMatcher( api.endpoints.querySuccess.matchRejected, - (state, action) => { - expectExactType({} as SerializedError)(action.error) - expectExactType({} as ArgType)(action.meta.arg.originalArgs) - } + (state, action) => {}, ) }, }) From 1a9837837b7f35e33fb4e0b11aeadd2d08ca41ae Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 20:59:56 -0600 Subject: [PATCH 326/368] Move type tests inside `queryLifecycle.test.tsx` into `queryLifecycle.test-d.tsx` --- .../src/query/tests/queryLifecycle.test-d.tsx | 151 +++++++++++++++++ .../src/query/tests/queryLifecycle.test.tsx | 152 +++--------------- 2 files changed, 170 insertions(+), 133 deletions(-) create mode 100644 packages/toolkit/src/query/tests/queryLifecycle.test-d.tsx diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test-d.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test-d.tsx new file mode 100644 index 0000000000..983de884f4 --- /dev/null +++ b/packages/toolkit/src/query/tests/queryLifecycle.test-d.tsx @@ -0,0 +1,151 @@ +import type { + FetchBaseQueryError, + FetchBaseQueryMeta, +} from '@reduxjs/toolkit/query' +import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' + +const api = createApi({ + baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), + endpoints: () => ({}), +}) + +describe('type tests', () => { + test(`mutation: onStart and onSuccess`, async () => { + const extended = api.injectEndpoints({ + overrideExisting: true, + endpoints: (build) => ({ + injected: build.mutation({ + query: () => '/success', + async onQueryStarted(arg, { queryFulfilled }) { + // awaiting without catching like this would result in an `unhandledRejection` exception if there was an error + // unfortunately we cannot test for that in jest. + const result = await queryFulfilled + + expectTypeOf(result).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + }), + }), + }) + }) + + test('query types', () => { + const extended = api.injectEndpoints({ + overrideExisting: true, + endpoints: (build) => ({ + injected: build.query({ + query: () => '/success', + async onQueryStarted(arg, { queryFulfilled }) { + queryFulfilled.then( + (result) => { + expectTypeOf(result).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + (reason) => { + if (reason.isUnhandledError) { + expectTypeOf(reason).toEqualTypeOf<{ + error: unknown + meta?: undefined + isUnhandledError: true + }>() + } else { + expectTypeOf(reason).toEqualTypeOf<{ + error: FetchBaseQueryError + isUnhandledError: false + meta: FetchBaseQueryMeta | undefined + }>() + } + }, + ) + + queryFulfilled.catch((reason) => { + if (reason.isUnhandledError) { + expectTypeOf(reason).toEqualTypeOf<{ + error: unknown + meta?: undefined + isUnhandledError: true + }>() + } else { + expectTypeOf(reason).toEqualTypeOf<{ + error: FetchBaseQueryError + isUnhandledError: false + meta: FetchBaseQueryMeta | undefined + }>() + } + }) + + const result = await queryFulfilled + + expectTypeOf(result).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + }), + }), + }) + }) + + test('mutation types', () => { + const extended = api.injectEndpoints({ + overrideExisting: true, + endpoints: (build) => ({ + injected: build.query({ + query: () => '/success', + async onQueryStarted(arg, { queryFulfilled }) { + queryFulfilled.then( + (result) => { + expectTypeOf(result).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + (reason) => { + if (reason.isUnhandledError) { + expectTypeOf(reason).toEqualTypeOf<{ + error: unknown + meta?: undefined + isUnhandledError: true + }>() + } else { + expectTypeOf(reason).toEqualTypeOf<{ + error: FetchBaseQueryError + isUnhandledError: false + meta: FetchBaseQueryMeta | undefined + }>() + } + }, + ) + + queryFulfilled.catch((reason) => { + if (reason.isUnhandledError) { + expectTypeOf(reason).toEqualTypeOf<{ + error: unknown + meta?: undefined + isUnhandledError: true + }>() + } else { + expectTypeOf(reason).toEqualTypeOf<{ + error: FetchBaseQueryError + isUnhandledError: false + meta: FetchBaseQueryMeta | undefined + }>() + } + }) + + const result = await queryFulfilled + + expectTypeOf(result).toMatchTypeOf<{ + data: number + meta?: FetchBaseQueryMeta + }>() + }, + }), + }), + }) + }) +}) diff --git a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx index ffa9731400..b0396e9b0c 100644 --- a/packages/toolkit/src/query/tests/queryLifecycle.test.tsx +++ b/packages/toolkit/src/query/tests/queryLifecycle.test.tsx @@ -1,14 +1,9 @@ -import type { - FetchBaseQueryError, - FetchBaseQueryMeta, -} from '@reduxjs/toolkit/query' +import { server } from '@internal/query/tests/mocks/server' +import { setupApiStore } from '@internal/tests/utils/helpers' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import { HttpResponse, http } from 'msw' import { waitFor } from '@testing-library/react' +import { HttpResponse, http } from 'msw' import { vi } from 'vitest' -import { setupApiStore } from '../../tests/utils/helpers' -import { expectType } from '../../tests/utils/typeTestHelpers' -import { server } from './mocks/server' const api = createApi({ baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }), @@ -56,7 +51,6 @@ describe.each([['query'], ['mutation']] as const)( // awaiting without catching like this would result in an `unhandledRejection` exception if there was an error // unfortunately we cannot test for that in jest. const result = await queryFulfilled - expectType<{ data: number; meta?: FetchBaseQueryMeta }>(result) onSuccess(result) }, }), @@ -110,7 +104,7 @@ describe.each([['query'], ['mutation']] as const)( }) expect(onSuccess).not.toHaveBeenCalled() }) - } + }, ) test('query: getCacheEntry (success)', async () => { @@ -122,7 +116,7 @@ test('query: getCacheEntry (success)', async () => { query: () => '/success', async onQueryStarted( arg, - { dispatch, getState, getCacheEntry, queryFulfilled } + { dispatch, getState, getCacheEntry, queryFulfilled }, ) { try { snapshot(getCacheEntry()) @@ -138,7 +132,7 @@ test('query: getCacheEntry (success)', async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await waitFor(() => { @@ -183,7 +177,7 @@ test('query: getCacheEntry (error)', async () => { query: () => '/error', async onQueryStarted( arg, - { dispatch, getState, getCacheEntry, queryFulfilled } + { dispatch, getState, getCacheEntry, queryFulfilled }, ) { try { snapshot(getCacheEntry()) @@ -199,7 +193,7 @@ test('query: getCacheEntry (error)', async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await waitFor(() => { @@ -243,7 +237,7 @@ test('mutation: getCacheEntry (success)', async () => { query: () => '/success', async onQueryStarted( arg, - { dispatch, getState, getCacheEntry, queryFulfilled } + { dispatch, getState, getCacheEntry, queryFulfilled }, ) { try { snapshot(getCacheEntry()) @@ -259,7 +253,7 @@ test('mutation: getCacheEntry (success)', async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await waitFor(() => { @@ -300,7 +294,7 @@ test('mutation: getCacheEntry (error)', async () => { query: () => '/error', async onQueryStarted( arg, - { dispatch, getState, getCacheEntry, queryFulfilled } + { dispatch, getState, getCacheEntry, queryFulfilled }, ) { try { snapshot(getCacheEntry()) @@ -316,7 +310,7 @@ test('mutation: getCacheEntry (error)', async () => { }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) await waitFor(() => { @@ -363,7 +357,7 @@ test('query: updateCachedData', async () => { getCacheEntry, updateCachedData, queryFulfilled, - } + }, ) { // calling `updateCachedData` when there is no data yet should not do anything // but if there is a cache value it will be updated & overwritten by the next succesful result @@ -403,11 +397,11 @@ test('query: updateCachedData', async () => { () => { return HttpResponse.json({ value: 'failed' }, { status: 500 }) }, - { once: true } - ) + { once: true }, + ), ) storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg', { forceRefetch: true }) + extended.endpoints.injected.initiate('arg', { forceRefetch: true }), ) await waitFor(() => { @@ -419,7 +413,7 @@ test('query: updateCachedData', async () => { expect(onSuccess).not.toHaveBeenCalled() storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg', { forceRefetch: true }) + extended.endpoints.injected.initiate('arg', { forceRefetch: true }), ) await waitFor(() => { @@ -442,122 +436,14 @@ test('query: will only start lifecycle if query is not skipped due to `condition }), }) const promise = storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg') + extended.endpoints.injected.initiate('arg'), ) expect(onStart).toHaveBeenCalledTimes(1) storeRef.store.dispatch(extended.endpoints.injected.initiate('arg')) expect(onStart).toHaveBeenCalledTimes(1) await promise storeRef.store.dispatch( - extended.endpoints.injected.initiate('arg', { forceRefetch: true }) + extended.endpoints.injected.initiate('arg', { forceRefetch: true }), ) expect(onStart).toHaveBeenCalledTimes(2) }) - -test('query types', () => { - const extended = api.injectEndpoints({ - overrideExisting: true, - endpoints: (build) => ({ - injected: build['query']({ - query: () => '/success', - async onQueryStarted(arg, { queryFulfilled }) { - onStart(arg) - - queryFulfilled.then( - (result) => { - expectType<{ data: number; meta?: FetchBaseQueryMeta }>(result) - }, - (reason) => { - if (reason.isUnhandledError) { - expectType<{ - error: unknown - meta?: undefined - isUnhandledError: true - }>(reason) - } else { - expectType<{ - error: FetchBaseQueryError - isUnhandledError: false - meta: FetchBaseQueryMeta | undefined - }>(reason) - } - } - ) - - queryFulfilled.catch((reason) => { - if (reason.isUnhandledError) { - expectType<{ - error: unknown - meta?: undefined - isUnhandledError: true - }>(reason) - } else { - expectType<{ - error: FetchBaseQueryError - isUnhandledError: false - meta: FetchBaseQueryMeta | undefined - }>(reason) - } - }) - - const result = await queryFulfilled - expectType<{ data: number; meta?: FetchBaseQueryMeta }>(result) - }, - }), - }), - }) -}) - -test('mutation types', () => { - const extended = api.injectEndpoints({ - overrideExisting: true, - endpoints: (build) => ({ - injected: build['query']({ - query: () => '/success', - async onQueryStarted(arg, { queryFulfilled }) { - onStart(arg) - - queryFulfilled.then( - (result) => { - expectType<{ data: number; meta?: FetchBaseQueryMeta }>(result) - }, - (reason) => { - if (reason.isUnhandledError) { - expectType<{ - error: unknown - meta?: undefined - isUnhandledError: true - }>(reason) - } else { - expectType<{ - error: FetchBaseQueryError - isUnhandledError: false - meta: FetchBaseQueryMeta | undefined - }>(reason) - } - } - ) - - queryFulfilled.catch((reason) => { - if (reason.isUnhandledError) { - expectType<{ - error: unknown - meta?: undefined - isUnhandledError: true - }>(reason) - } else { - expectType<{ - error: FetchBaseQueryError - isUnhandledError: false - meta: FetchBaseQueryMeta | undefined - }>(reason) - } - }) - - const result = await queryFulfilled - expectType<{ data: number; meta?: FetchBaseQueryMeta }>(result) - }, - }), - }), - }) -}) From 5e2a47ed70f46a34748e5071c15178a9decd3e3a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 21:09:28 -0600 Subject: [PATCH 327/368] Move type tests from `combineSlices.test.ts` into `combineSlices.test-d.ts` --- .../toolkit/src/tests/combineSlices.test-d.ts | 49 ++++++++++++++----- .../toolkit/src/tests/combineSlices.test.ts | 49 ++++++++++--------- 2 files changed, 63 insertions(+), 35 deletions(-) diff --git a/packages/toolkit/src/tests/combineSlices.test-d.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts index 496b072ab5..8ab4b23931 100644 --- a/packages/toolkit/src/tests/combineSlices.test-d.ts +++ b/packages/toolkit/src/tests/combineSlices.test-d.ts @@ -1,5 +1,6 @@ import type { Reducer, Slice, WithSlice } from '@reduxjs/toolkit' -import { combineSlices } from '@reduxjs/toolkit' +import { combineSlices, createReducer } from '@reduxjs/toolkit' +import type { CombinedState } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' declare const stringSlice: Slice @@ -92,7 +93,7 @@ describe('type tests', () => { const withApi = rootReducer.inject(exampleApi) expectTypeOf( - withApi(undefined, { type: '' }).api + withApi(undefined, { type: '' }).api, ).toEqualTypeOf() }) @@ -104,11 +105,11 @@ describe('type tests', () => { type RootState = ReturnType const withoutInjection = rootReducer.selector( - (state: RootState) => state.number + (state: RootState) => state.number, ) expectTypeOf( - withoutInjection(rootReducer(undefined, { type: '' })) + withoutInjection(rootReducer(undefined, { type: '' })), ).toEqualTypeOf() const withInjection = rootReducer @@ -116,7 +117,7 @@ describe('type tests', () => { .selector((state) => state.number) expectTypeOf( - withInjection(rootReducer(undefined, { type: '' })) + withInjection(rootReducer(undefined, { type: '' })), ).toBeNumber() }) @@ -145,7 +146,7 @@ describe('type tests', () => { const innerSelector = innerReducer.inject(numberSlice).selector( (state) => state.number, - (rootState: RootState) => rootState.inner + (rootState: RootState) => rootState.inner, ) const outerReducer = combineSlices({ inner: innerReducer }) @@ -161,7 +162,7 @@ describe('type tests', () => { }>() expectTypeOf( - innerSelector(outerReducer(undefined, { type: '' })) + innerSelector(outerReducer(undefined, { type: '' })), ).toBeNumber() }) @@ -178,18 +179,18 @@ describe('type tests', () => { combinedReducer.selector( (state) => state.number, // @ts-expect-error wrong state returned - (rootState: RootState) => rootState.inner.number + (rootState: RootState) => rootState.inner.number, ) combinedReducer.selector( (state, num: number) => state.number, // @ts-expect-error wrong arguments - (rootState: RootState, str: string) => rootState.inner + (rootState: RootState, str: string) => rootState.inner, ) combinedReducer.selector( (state, num: number) => state.number, - (rootState: RootState) => rootState.inner + (rootState: RootState) => rootState.inner, ) // TODO: see if there's a way of making this work @@ -197,7 +198,33 @@ describe('type tests', () => { combinedReducer.selector( (state) => state.number, // @ts-ignore - (rootState: RootState, num: number) => rootState.inner + (rootState: RootState, num: number) => rootState.inner, ) }) + + test('CombinedState', () => { + const api = { + reducerPath: 'api' as const, + reducer: createReducer( + assertType>({ + queries: {}, + mutations: {}, + provided: {}, + subscriptions: {}, + config: { + reducerPath: 'api', + invalidationBehavior: 'delayed', + online: false, + focused: false, + keepUnusedDataFor: 60, + middlewareRegistered: false, + refetchOnMountOrArgChange: false, + refetchOnReconnect: false, + refetchOnFocus: false, + }, + }), + () => {}, + ), + } + }) }) diff --git a/packages/toolkit/src/tests/combineSlices.test.ts b/packages/toolkit/src/tests/combineSlices.test.ts index aae58662c6..a74b675c68 100644 --- a/packages/toolkit/src/tests/combineSlices.test.ts +++ b/packages/toolkit/src/tests/combineSlices.test.ts @@ -1,10 +1,10 @@ -import type { WithSlice } from '../combineSlices' -import { combineSlices } from '../combineSlices' -import { createAction } from '../createAction' -import { createReducer } from '../createReducer' -import { createSlice } from '../createSlice' -import type { CombinedState } from '../query/core/apiState' -import { expectType } from './utils/typeTestHelpers' +import type { WithSlice } from '@reduxjs/toolkit' +import { + combineSlices, + createAction, + createReducer, + createSlice, +} from '@reduxjs/toolkit' const dummyAction = createAction('dummy') @@ -26,7 +26,7 @@ const booleanReducer = createReducer(false, () => {}) const api = { reducerPath: 'api' as const, reducer: createReducer( - expectType>({ + { queries: {}, mutations: {}, provided: {}, @@ -42,8 +42,8 @@ const api = { refetchOnReconnect: false, refetchOnFocus: false, }, - }), - () => {} + }, + () => {}, ), } @@ -55,7 +55,7 @@ describe('combineSlices', () => { num: numberSlice.reducer, boolean: booleanReducer, }, - api + api, ) expect(combinedReducer(undefined, dummyAction())).toEqual({ string: stringSlice.getInitialState(), @@ -66,7 +66,6 @@ describe('combineSlices', () => { }) describe('injects', () => { beforeEach(() => { - vi.stubEnv('NODE_ENV', 'development') return vi.unstubAllEnvs @@ -83,13 +82,14 @@ describe('combineSlices', () => { const injectedReducer = combinedReducer.inject(numberSlice) expect(injectedReducer(undefined, dummyAction()).number).toBe( - numberSlice.getInitialState() + numberSlice.getInitialState(), ) }) it('logs error when same name is used for different reducers', () => { const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) - const combinedReducer = - combineSlices(stringSlice).withLazyLoadedSlices<{ boolean: boolean }>() + const combinedReducer = combineSlices(stringSlice).withLazyLoadedSlices<{ + boolean: boolean + }>() combinedReducer.inject({ reducerPath: 'boolean' as const, @@ -110,7 +110,7 @@ describe('combineSlices', () => { }) expect(consoleSpy).toHaveBeenCalledWith( - `called \`inject\` to override already-existing reducer boolean without specifying \`overrideExisting: true\`` + `called \`inject\` to override already-existing reducer boolean without specifying \`overrideExisting: true\``, ) consoleSpy.mockRestore() }) @@ -125,15 +125,16 @@ describe('combineSlices', () => { combinedReducer.inject( { reducerPath: 'number' as const, reducer: () => 0 }, - { overrideExisting: true } + { overrideExisting: true }, ) expect(consoleSpy).not.toHaveBeenCalled() }) }) describe('selector', () => { - const combinedReducer = - combineSlices(stringSlice).withLazyLoadedSlices<{ boolean: boolean }>() + const combinedReducer = combineSlices(stringSlice).withLazyLoadedSlices<{ + boolean: boolean + }>() const uninjectedState = combinedReducer(undefined, dummyAction()) @@ -148,18 +149,18 @@ describe('combineSlices', () => { const selectBoolean = injectedReducer.selector((state) => state.boolean) expect(selectBoolean(uninjectedState)).toBe( - booleanReducer.getInitialState() + booleanReducer.getInitialState(), ) }) it('exposes original to allow for logging', () => { const selectBoolean = injectedReducer.selector( - (state) => injectedReducer.selector.original(state).boolean + (state) => injectedReducer.selector.original(state).boolean, ) expect(selectBoolean(uninjectedState)).toBe(undefined) }) it('throws if original is called on something other than state proxy', () => { expect(() => injectedReducer.selector.original({} as any)).toThrow( - 'original must be used on state Proxy' + 'original must be used on state Proxy', ) }) it('allows passing a selectState selector, to handle nested state', () => { @@ -171,11 +172,11 @@ describe('combineSlices', () => { const selector = injectedReducer.selector( (state) => state.boolean, - (rootState: RootState) => rootState.inner + (rootState: RootState) => rootState.inner, ) expect(selector(wrappedReducer(undefined, dummyAction()))).toBe( - booleanReducer.getInitialState() + booleanReducer.getInitialState(), ) }) }) From 6b533d625d16f04913fc32e5e1aa0b797e635f06 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 21:10:46 -0600 Subject: [PATCH 328/368] Rename `src/tests/createAction.typetest.tsx` to `src/tests/createAction.test-d.tsx` --- .../tests/{createAction.typetest.tsx => createAction.test-d.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/toolkit/src/tests/{createAction.typetest.tsx => createAction.test-d.tsx} (100%) diff --git a/packages/toolkit/src/tests/createAction.typetest.tsx b/packages/toolkit/src/tests/createAction.test-d.tsx similarity index 100% rename from packages/toolkit/src/tests/createAction.typetest.tsx rename to packages/toolkit/src/tests/createAction.test-d.tsx From af3511d83d6c4d37e2a99b150d6065c9cd89e15d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 22:35:24 -0600 Subject: [PATCH 329/368] Migrate type tests for `createAction.test-d.tsx` to Vitest --- .../toolkit/src/tests/createAction.test-d.tsx | 665 +++++++++--------- 1 file changed, 318 insertions(+), 347 deletions(-) diff --git a/packages/toolkit/src/tests/createAction.test-d.tsx b/packages/toolkit/src/tests/createAction.test-d.tsx index a6644d8312..ec132f8edd 100644 --- a/packages/toolkit/src/tests/createAction.test-d.tsx +++ b/packages/toolkit/src/tests/createAction.test-d.tsx @@ -1,5 +1,6 @@ -import type { IsAny } from '@internal/tsHelpers' import type { + Action, + ActionCreator, ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, ActionCreatorWithPayload, @@ -7,352 +8,322 @@ import type { ActionCreatorWithoutPayload, PayloadAction, PayloadActionCreator, + UnknownAction, } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' -import type { Action, ActionCreator, UnknownAction } from 'redux' -import { expectType } from './utils/typeTestHelpers' - -/* PayloadAction */ - -/* - * Test: PayloadAction has type parameter for the payload. - */ -{ - const action: PayloadAction = { type: '', payload: 5 } - const numberPayload: number = action.payload - - // @ts-expect-error - const stringPayload: string = action.payload -} - -/* - * Test: PayloadAction type parameter is required. - */ -{ - // @ts-expect-error - const action: PayloadAction = { type: '', payload: 5 } - // @ts-expect-error - const numberPayload: number = action.payload - // @ts-expect-error - const stringPayload: string = action.payload -} - -/* - * Test: PayloadAction has a string type tag. - */ -{ - const action: PayloadAction = { type: '', payload: 5 } - - // @ts-expect-error - const action2: PayloadAction = { type: 1, payload: 5 } -} - -/* - * Test: PayloadAction is compatible with Action - */ -{ - const action: PayloadAction = { type: '', payload: 5 } - const stringAction: Action = action -} - -/* PayloadActionCreator */ - -/* - * Test: PayloadActionCreator returns correctly typed PayloadAction depending - * on whether a payload is passed. - */ -{ - const actionCreator = Object.assign( - (payload?: number) => ({ - type: 'action', - payload, - }), - { type: 'action' } - ) as PayloadActionCreator - - expectType>(actionCreator(1)) - expectType>(actionCreator()) - expectType>(actionCreator(undefined)) - - // @ts-expect-error - expectType>(actionCreator()) - // @ts-expect-error - expectType>(actionCreator(1)) -} - -/* - * Test: PayloadActionCreator is compatible with ActionCreator. - */ -{ - const payloadActionCreator = Object.assign( - (payload?: number) => ({ - type: 'action', - payload, - }), - { type: 'action' } - ) as PayloadActionCreator - const actionCreator: ActionCreator = payloadActionCreator - - const payloadActionCreator2 = Object.assign( - (payload?: number) => ({ - type: 'action', - payload: payload || 1, - }), - { type: 'action' } - ) as PayloadActionCreator - - const actionCreator2: ActionCreator> = - payloadActionCreator2 -} - -/* createAction() */ - -/* - * Test: createAction() has type parameter for the action payload. - */ -{ - const increment = createAction('increment') - const n: number = increment(1).payload - - // @ts-expect-error - increment('').payload -} - -/* - * Test: createAction() type parameter is required, not inferred (defaults to `void`). - */ -{ - const increment = createAction('increment') - // @ts-expect-error - const n: number = increment(1).payload -} -/* - * Test: createAction().type is a string literal. - */ -{ - const increment = createAction('increment') - const n: string = increment(1).type - const s: 'increment' = increment(1).type - - // @ts-expect-error - const r: 'other' = increment(1).type - // @ts-expect-error - const q: number = increment(1).type -} - -/* - * Test: type still present when using prepareAction - */ -{ - const strLenAction = createAction('strLen', (payload: string) => ({ - payload: payload.length, - })) - - expectType(strLenAction('test').type) -} - -/* - * Test: changing payload type with prepareAction - */ -{ - const strLenAction = createAction('strLen', (payload: string) => ({ - payload: payload.length, - })) - expectType(strLenAction('test').payload) - - // @ts-expect-error - expectType(strLenAction('test').payload) - // @ts-expect-error - const error: any = strLenAction('test').error -} - -/* - * Test: adding metadata with prepareAction - */ -{ - const strLenMetaAction = createAction('strLenMeta', (payload: string) => ({ - payload, - meta: payload.length, - })) - - expectType(strLenMetaAction('test').meta) - - // @ts-expect-error - expectType(strLenMetaAction('test').meta) - // @ts-expect-error - const error: any = strLenMetaAction('test').error -} - -/* - * Test: adding boolean error with prepareAction - */ -{ - const boolErrorAction = createAction('boolError', (payload: string) => ({ - payload, - error: true, - })) - - expectType(boolErrorAction('test').error) - - // @ts-expect-error - expectType(boolErrorAction('test').error) -} - -/* - * Test: adding string error with prepareAction - */ -{ - const strErrorAction = createAction('strError', (payload: string) => ({ - payload, - error: 'this is an error', - })) - - expectType(strErrorAction('test').error) - - // @ts-expect-error - expectType(strErrorAction('test').error) -} - -/* - * regression test for https://github.com/reduxjs/redux-toolkit/issues/214 - */ -{ - const action = createAction<{ input?: string }>('ACTION') - const t: string | undefined = action({ input: '' }).payload.input - - // @ts-expect-error - const u: number = action({ input: '' }).payload.input - // @ts-expect-error - const v: number = action({ input: 3 }).payload.input -} - -/* - * regression test for https://github.com/reduxjs/redux-toolkit/issues/224 - */ -{ - const oops = createAction('oops', (x: any) => ({ - payload: x, - error: x, - meta: x, - })) - - type Ret = ReturnType - - const payload: IsAny = true - const error: IsAny = true - const meta: IsAny = true - - // @ts-expect-error - const payloadNotAny: IsAny = false - // @ts-expect-error - const errorNotAny: IsAny = false - // @ts-expect-error - const metaNotAny: IsAny = false -} - -/** - * Test: createAction.match() - */ -{ - // simple use case - { - const actionCreator = createAction('test') - const x: Action = {} as any - if (actionCreator.match(x)) { - expectType<'test'>(x.type) - expectType(x.payload) - } else { - // @ts-expect-error - expectType<'test'>(x.type) - // @ts-expect-error - expectType(x.payload) - } - } - - // special case: optional argument - { - const actionCreator = createAction('test') - const x: Action = {} as any - if (actionCreator.match(x)) { - expectType<'test'>(x.type) - expectType(x.payload) - } - } - - // special case: without argument - { - const actionCreator = createAction('test') - const x: Action = {} as any - if (actionCreator.match(x)) { - expectType<'test'>(x.type) - // @ts-expect-error - expectType<{}>(x.payload) - } - } - - // special case: with prepareAction - { - const actionCreator = createAction('test', () => ({ - payload: '', - meta: '', - error: false, - })) - const x: Action = {} as any - if (actionCreator.match(x)) { - expectType<'test'>(x.type) - expectType(x.payload) - expectType(x.meta) - expectType(x.error) - // @ts-expect-error - expectType(x.payload) - // @ts-expect-error - expectType(x.meta) - // @ts-expect-error - expectType(x.error) + +describe('type tests', () => { + describe('PayloadAction', () => { + test('PayloadAction has type parameter for the payload.', () => { + const action: PayloadAction = { type: '', payload: 5 } + + expectTypeOf(action.payload).toBeNumber() + + expectTypeOf(action.payload).not.toBeString() + }) + + test('PayloadAction type parameter is required.', () => { + expectTypeOf({ type: '', payload: 5 }).not.toMatchTypeOf() + }) + + test('PayloadAction has a string type tag.', () => { + expectTypeOf({ type: '', payload: 5 }).toEqualTypeOf< + PayloadAction + >() + + expectTypeOf({ type: 1, payload: 5 }).not.toMatchTypeOf() + }) + + test('PayloadAction is compatible with Action', () => { + const action: PayloadAction = { type: '', payload: 5 } + + expectTypeOf(action).toMatchTypeOf>() + }) + }) + + describe('PayloadActionCreator', () => { + test('PayloadActionCreator returns correctly typed PayloadAction depending on whether a payload is passed.', () => { + const actionCreator = Object.assign( + (payload?: number) => ({ + type: 'action', + payload, + }), + { type: 'action' }, + ) as PayloadActionCreator + + expectTypeOf(actionCreator(1)).toEqualTypeOf< + PayloadAction + >() + + expectTypeOf(actionCreator()).toEqualTypeOf< + PayloadAction + >() + + expectTypeOf(actionCreator(undefined)).toEqualTypeOf< + PayloadAction + >() + + expectTypeOf(actionCreator()).not.toMatchTypeOf>() + + expectTypeOf(actionCreator(1)).not.toMatchTypeOf< + PayloadAction + >() + }) + + test('PayloadActionCreator is compatible with ActionCreator.', () => { + const payloadActionCreator = Object.assign( + (payload?: number) => ({ + type: 'action', + payload, + }), + { type: 'action' }, + ) as PayloadActionCreator + const actionCreator: ActionCreator = payloadActionCreator + + const payloadActionCreator2 = Object.assign( + (payload?: number) => ({ + type: 'action', + payload: payload || 1, + }), + { type: 'action' }, + ) as PayloadActionCreator + + const actionCreator2: ActionCreator> = + payloadActionCreator2 + }) + }) + + describe('createAction()', () => { + test('createAction() has type parameter for the action payload.', () => { + const increment = createAction('increment') + + expectTypeOf(increment).parameter(0).toBeNumber() + + expectTypeOf(increment).parameter(0).not.toBeString() + }) + + test('createAction() type parameter is required, not inferred (defaults to `void`).', () => { + const increment = createAction('increment') + expectTypeOf(increment).parameter(0).not.toBeNumber() + + expectTypeOf(increment().payload).not.toBeNumber() + }) + + test('createAction().type is a string literal.', () => { + const increment = createAction('increment') + + expectTypeOf(increment(1).type).toBeString() + + expectTypeOf(increment(1).type).toEqualTypeOf<'increment'>() + + expectTypeOf(increment(1).type).not.toMatchTypeOf<'other'>() + + expectTypeOf(increment(1).type).not.toBeNumber() + }) + + test('type still present when using prepareAction', () => { + const strLenAction = createAction('strLen', (payload: string) => ({ + payload: payload.length, + })) + + expectTypeOf(strLenAction('test').type).toBeString() + }) + + test('changing payload type with prepareAction', () => { + const strLenAction = createAction('strLen', (payload: string) => ({ + payload: payload.length, + })) + + expectTypeOf(strLenAction('test').payload).toBeNumber() + + expectTypeOf(strLenAction('test').payload).not.toBeString() + + expectTypeOf(strLenAction('test')).not.toHaveProperty('error') + }) + + test('adding metadata with prepareAction', () => { + const strLenMetaAction = createAction( + 'strLenMeta', + (payload: string) => ({ + payload, + meta: payload.length, + }), + ) + + expectTypeOf(strLenMetaAction('test').meta).toBeNumber() + + expectTypeOf(strLenMetaAction('test').meta).not.toBeString() + + expectTypeOf(strLenMetaAction('test')).not.toHaveProperty('error') + }) + + test('adding boolean error with prepareAction', () => { + const boolErrorAction = createAction('boolError', (payload: string) => ({ + payload, + error: true, + })) + + expectTypeOf(boolErrorAction('test').error).toBeBoolean() + + expectTypeOf(boolErrorAction('test').error).not.toBeString() + }) + + test('adding string error with prepareAction', () => { + const strErrorAction = createAction('strError', (payload: string) => ({ + payload, + error: 'this is an error', + })) + + expectTypeOf(strErrorAction('test').error).toBeString() + + expectTypeOf(strErrorAction('test').error).not.toBeBoolean() + }) + + test('regression test for https://github.com/reduxjs/redux-toolkit/issues/214', () => { + const action = createAction<{ input?: string }>('ACTION') + + expectTypeOf(action({ input: '' }).payload.input).toEqualTypeOf< + string | undefined + >() + + expectTypeOf(action({ input: '' }).payload.input).not.toBeNumber() + + expectTypeOf(action).parameter(0).not.toMatchTypeOf({ input: 3 }) + }) + + test('regression test for https://github.com/reduxjs/redux-toolkit/issues/224', () => { + const oops = createAction('oops', (x: any) => ({ + payload: x, + error: x, + meta: x, + })) + + expectTypeOf(oops('').payload).toBeAny() + + expectTypeOf(oops('').error).toBeAny() + + expectTypeOf(oops('').meta).toBeAny() + }) + + describe('createAction.match()', () => { + test('simple use case', () => { + const actionCreator = createAction('test') + + const x: Action = {} as any + + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() + + expectTypeOf(x.payload).toBeString() + } else { + expectTypeOf(x.type).not.toMatchTypeOf<'test'>() + + expectTypeOf(x).not.toHaveProperty('payload') + } + }) + + test('special case: optional argument', () => { + const actionCreator = createAction('test') + + const x: Action = {} as any + + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() + + expectTypeOf(x.payload).toEqualTypeOf() + } + }) + + test('special case: without argument', () => { + const actionCreator = createAction('test') + + const x: Action = {} as any + + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() + + expectTypeOf(x.payload).not.toMatchTypeOf<{}>() + } + }) + + test('special case: with prepareAction', () => { + const actionCreator = createAction('test', () => ({ + payload: '', + meta: '', + error: false, + })) + + const x: Action = {} as any + + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() + + expectTypeOf(x.payload).toBeString() + + expectTypeOf(x.meta).toBeString() + + expectTypeOf(x.error).toBeBoolean() + + expectTypeOf(x.payload).not.toBeNumber() + + expectTypeOf(x.meta).not.toBeNumber() + + expectTypeOf(x.error).not.toBeNumber() + } + }) + test('potential use: as array filter', () => { + const actionCreator = createAction('test') + + const x: Action[] = [] + + expectTypeOf(x.filter(actionCreator.match)).toEqualTypeOf< + PayloadAction[] + >() + + expectTypeOf(x.filter(actionCreator.match)).not.toEqualTypeOf< + PayloadAction[] + >() + }) + }) + }) + + test('ActionCreatorWithOptionalPayload', () => { + expectTypeOf(createAction('')).toEqualTypeOf< + ActionCreatorWithOptionalPayload + >() + + expectTypeOf( + createAction(''), + ).toEqualTypeOf() + + assertType(createAction('')) + + expectTypeOf(createAction('')).toEqualTypeOf< + ActionCreatorWithPayload + >() + + expectTypeOf( + createAction('', (_: 0) => ({ + payload: 1 as 1, + error: 2 as 2, + meta: 3 as 3, + })), + ).toEqualTypeOf>() + + const anyCreator = createAction('') + + expectTypeOf(anyCreator).toEqualTypeOf>() + + expectTypeOf(anyCreator({}).payload).toBeAny() + }) + + test("Verify action creators should not be passed directly as arguments to React event handlers if there shouldn't be a payload", () => { + const emptyAction = createAction('empty/action') + function TestComponent() { + // This typically leads to an error like: + // // A non-serializable value was detected in an action, in the path: `payload`. + // @ts-expect-error Should error because `void` and `MouseEvent` aren't compatible + return } - } - // potential use: as array filter - { - const actionCreator = createAction('test') - const x: Array> = [] - expectType>>( - x.filter(actionCreator.match) - ) - - expectType>>( - // @ts-expect-error - x.filter(actionCreator.match) - ) - } -} -{ - expectType>( - createAction('') - ) - expectType(createAction('')) - expectType(createAction('')) - expectType>(createAction('')) - expectType>( - createAction('', (_: 0) => ({ - payload: 1 as 1, - error: 2 as 2, - meta: 3 as 3, - })) - ) - const anyCreator = createAction('') - expectType>(anyCreator) - type AnyPayload = ReturnType['payload'] - expectType>(true) -} - -// Verify action creators should not be passed directly as arguments -// to React event handlers if there shouldn't be a payload -{ - const emptyAction = createAction('empty/action') - function TestComponent() { - // This typically leads to an error like: - // // A non-serializable value was detected in an action, in the path: `payload`. - // @ts-expect-error Should error because `void` and `MouseEvent` aren't compatible - return - } -} + }) +}) From 672cc5ea5e54147ac068a63260d17186ee5e9d1f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 22:36:17 -0600 Subject: [PATCH 330/368] Remove `typeTestHelpers.ts` --- .../src/tests/utils/typeTestHelpers.ts | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 packages/toolkit/src/tests/utils/typeTestHelpers.ts diff --git a/packages/toolkit/src/tests/utils/typeTestHelpers.ts b/packages/toolkit/src/tests/utils/typeTestHelpers.ts deleted file mode 100644 index 4ba7eb8b8a..0000000000 --- a/packages/toolkit/src/tests/utils/typeTestHelpers.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { IsAny, IsUnknown } from '../../tsHelpers' - -export function expectType(t: T): T { - return t -} - -type Equals = IsAny< - T, - never, - IsAny -> -export function expectExactType(t: T) { - return >(u: U) => {} -} - -type EnsureUnknown = IsUnknown -export function expectUnknown>(t: T) { - return t -} - -type EnsureAny = IsAny -export function expectExactAny>(t: T) { - return t -} - -type IsNotAny = IsAny -export function expectNotAny>(t: T): T { - return t -} - -expectType('5' as string) -expectType('5' as const) -expectType('5' as any) -expectExactType('5' as const)('5' as const) -// @ts-expect-error -expectExactType('5' as string)('5' as const) -// @ts-expect-error -expectExactType('5' as any)('5' as const) -expectUnknown('5' as unknown) -// @ts-expect-error -expectUnknown('5' as const) -// @ts-expect-error -expectUnknown('5' as any) -expectExactAny('5' as any) -// @ts-expect-error -expectExactAny('5' as const) -// @ts-expect-error -expectExactAny('5' as unknown) From 209d0d9fef5d0323a2cd41a05c169edf904c2dcb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 22:44:25 -0600 Subject: [PATCH 331/368] Cut excessive assertions in `Tuple.test-d.ts` --- packages/toolkit/src/tests/Tuple.test-d.ts | 30 +++------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/packages/toolkit/src/tests/Tuple.test-d.ts b/packages/toolkit/src/tests/Tuple.test-d.ts index f48588922c..9433634323 100644 --- a/packages/toolkit/src/tests/Tuple.test-d.ts +++ b/packages/toolkit/src/tests/Tuple.test-d.ts @@ -8,13 +8,11 @@ describe('type tests', () => { expectTypeOf(stringTuple).toMatchTypeOf>() - expectTypeOf(stringTuple).not.toEqualTypeOf>() - - expectTypeOf(stringTuple).not.toEqualTypeOf>() + expectTypeOf(stringTuple).not.toMatchTypeOf>() const numberTuple = new Tuple(0, 1) - expectTypeOf(numberTuple).not.toEqualTypeOf>() + expectTypeOf(numberTuple).not.toMatchTypeOf>() }) test('concat is inferred properly', () => { @@ -26,13 +24,7 @@ describe('type tests', () => { Tuple<[string, string]> >() - expectTypeOf(singleString.concat([''])).not.toMatchTypeOf< - Tuple<[string, string]> - >() - - assertType>(singleString.concat([''])) - - expectTypeOf(singleString.concat([''])).not.toEqualTypeOf< + expectTypeOf(singleString.concat([''] as const)).toMatchTypeOf< Tuple<[string, string]> >() }) @@ -46,13 +38,7 @@ describe('type tests', () => { Tuple<[string, string]> >() - expectTypeOf(singleString.prepend([''])).not.toMatchTypeOf< - Tuple<[string, string]> - >() - - assertType>(singleString.prepend([''])) - - expectTypeOf(singleString.prepend([''])).not.toEqualTypeOf< + expectTypeOf(singleString.prepend([''] as const)).toMatchTypeOf< Tuple<[string, string]> >() }) @@ -86,10 +72,6 @@ describe('type tests', () => { Tuple<[string, number, number]> >() - expectTypeOf(stringTuple.prepend(numberTuple)).not.toEqualTypeOf< - Tuple<[string, number, number]> - >() - expectTypeOf(stringTuple.prepend(numberTuple)).not.toMatchTypeOf< Tuple<[string, number, number]> >() @@ -97,9 +79,5 @@ describe('type tests', () => { expectTypeOf(stringTuple.concat(numberTuple)).not.toMatchTypeOf< Tuple<[number, number, string]> >() - - expectTypeOf(stringTuple.concat(numberTuple)).not.toEqualTypeOf< - Tuple<[number, number, string]> - >() }) }) From c2abc20d6a7b0b07fcb424c3383b6eb5952c6521 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 27 Jan 2024 23:00:01 -0600 Subject: [PATCH 332/368] Cut excessive assertions in `combineSlices.test-d.ts` --- .../toolkit/src/tests/combineSlices.test-d.ts | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/packages/toolkit/src/tests/combineSlices.test-d.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts index 8ab4b23931..61be7012bb 100644 --- a/packages/toolkit/src/tests/combineSlices.test-d.ts +++ b/packages/toolkit/src/tests/combineSlices.test-d.ts @@ -20,19 +20,6 @@ const exampleApi = createApi({ type ExampleApiState = ReturnType -declare const wrongNumberSlice: Slice - -declare const wrongBooleanReducer: Reducer - -const wrongApi = createApi({ - baseQuery: fetchBaseQuery(), - endpoints: (build) => ({ - getThing2: build.query({ - query: () => '', - }), - }), -}) - describe('type tests', () => { test('combineSlices correctly combines static state', () => { const rootReducer = combineSlices(stringSlice, numberSlice, exampleApi, { @@ -131,11 +118,14 @@ describe('type tests', () => { .selector((state, num: number) => state.number) const state = rootReducer(undefined, { type: '' }) - // @ts-expect-error required argument - selector(state) - // @ts-expect-error number not string - selector(state, '') - selector(state, 0) + + expectTypeOf(selector).toBeCallableWith(state, 0) + + // required argument + expectTypeOf(selector).parameters.not.toMatchTypeOf([state]) + + // number not string + expectTypeOf(selector).parameters.not.toMatchTypeOf([state, '']) }) test('nested calls inferred correctly', () => { @@ -157,10 +147,6 @@ describe('type tests', () => { inner: { string: string } }>() - expectTypeOf(outerReducer(undefined, { type: '' })).not.toEqualTypeOf<{ - inner: { string: string } - }>() - expectTypeOf( innerSelector(outerReducer(undefined, { type: '' })), ).toBeNumber() From 9e0cb1a1a6ebf78f2fc71a8464fb42bbf7e6c609 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 02:20:01 -0600 Subject: [PATCH 333/368] Cut excessive assertions in `configureStore.test-d.ts` --- .../src/tests/configureStore.test-d.ts | 270 ++++++++---------- 1 file changed, 121 insertions(+), 149 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test-d.ts b/packages/toolkit/src/tests/configureStore.test-d.ts index c03a47d5ea..19ddae6857 100644 --- a/packages/toolkit/src/tests/configureStore.test-d.ts +++ b/packages/toolkit/src/tests/configureStore.test-d.ts @@ -49,14 +49,17 @@ describe('type tests', () => { test('configureStore() infers the store action type.', () => { const reducer: Reducer> = () => 0 + const store = configureStore({ reducer }) - const numberStore: Store> = store - // @ts-expect-error - const stringStore: Store> = store + expectTypeOf(store).toMatchTypeOf>>() + + expectTypeOf(store).not.toMatchTypeOf< + Store> + >() }) - test('configureStore() accepts Tuple, but not plain array.', () => { + test('configureStore() accepts Tuple for middleware, but not plain array.', () => { const middleware: Middleware = (store) => (next) => next configureStore({ @@ -99,7 +102,7 @@ describe('type tests', () => { configureStore({ reducer: () => 0, // @ts-expect-error - devTools: { appname: 'myApp' }, + devTools: { appName: 'myApp' }, }) }) @@ -124,29 +127,23 @@ describe('type tests', () => { expectTypeOf(store.getState()).toEqualTypeOf() }) - test('configureStore() accepts store Tuple, but not plain array', () => { - { - const enhancer = applyMiddleware(() => (next) => next) - - const store = configureStore({ - reducer: () => 0, - enhancers: () => new Tuple(enhancer), - }) + test('configureStore() accepts store Tuple for enhancers, but not plain array', () => { + const enhancer = applyMiddleware(() => (next) => next) - const store2 = configureStore({ - reducer: () => 0, - // @ts-expect-error - enhancers: () => [enhancer], - }) + const store = configureStore({ + reducer: () => 0, + enhancers: () => new Tuple(enhancer), + }) - expectTypeOf(store.dispatch).toMatchTypeOf< - Dispatch & ThunkDispatch - >() + const store2 = configureStore({ + reducer: () => 0, + // @ts-expect-error + enhancers: () => [enhancer], + }) - expectTypeOf(store.dispatch).not.toEqualTypeOf< - Dispatch & ThunkDispatch - >() - } + expectTypeOf(store.dispatch).toMatchTypeOf< + Dispatch & ThunkDispatch + >() configureStore({ reducer: () => 0, @@ -154,127 +151,117 @@ describe('type tests', () => { enhancers: () => new Tuple('not a store enhancer'), }) - { - const somePropertyStoreEnhancer: StoreEnhancer<{ someProperty: string }> = - (next) => { - return (reducer, preloadedState) => { - return { - ...next(reducer, preloadedState), - someProperty: 'some value', - } - } + const somePropertyStoreEnhancer: StoreEnhancer<{ + someProperty: string + }> = (next) => { + return (reducer, preloadedState) => { + return { + ...next(reducer, preloadedState), + someProperty: 'some value', } + } + } - const anotherPropertyStoreEnhancer: StoreEnhancer<{ - anotherProperty: number - }> = (next) => { - return (reducer, preloadedState) => { - return { - ...next(reducer, preloadedState), - anotherProperty: 123, - } + const anotherPropertyStoreEnhancer: StoreEnhancer<{ + anotherProperty: number + }> = (next) => { + return (reducer, preloadedState) => { + return { + ...next(reducer, preloadedState), + anotherProperty: 123, } } + } - const store = configureStore({ - reducer: () => 0, - enhancers: () => - new Tuple(somePropertyStoreEnhancer, anotherPropertyStoreEnhancer), - }) - - expectTypeOf(store.dispatch).toEqualTypeOf() - - expectTypeOf(store.someProperty).toBeString() - - expectTypeOf(store.anotherProperty).toBeNumber() - - const storeWithCallback = configureStore({ - reducer: () => 0, - enhancers: (getDefaultEnhancers) => - getDefaultEnhancers() - .prepend(anotherPropertyStoreEnhancer) - .concat(somePropertyStoreEnhancer), - }) - - expectTypeOf(store.dispatch).toMatchTypeOf< - Dispatch & ThunkDispatch - >() + const store3 = configureStore({ + reducer: () => 0, + enhancers: () => + new Tuple(somePropertyStoreEnhancer, anotherPropertyStoreEnhancer), + }) - expectTypeOf(store.dispatch).not.toEqualTypeOf< - Dispatch & ThunkDispatch - >() + expectTypeOf(store3.dispatch).toEqualTypeOf() - expectTypeOf(store.someProperty).toBeString() + expectTypeOf(store3.someProperty).toBeString() - expectTypeOf(store.anotherProperty).toBeNumber() - } + expectTypeOf(store3.anotherProperty).toBeNumber() - { - const someStateExtendingEnhancer: StoreEnhancer< - {}, - { someProperty: string } - > = - (next) => - (...args) => { - const store = next(...args) - const getState = () => ({ - ...store.getState(), - someProperty: 'some value', - }) - return { - ...store, - getState, - } as any - } + const storeWithCallback = configureStore({ + reducer: () => 0, + enhancers: (getDefaultEnhancers) => + getDefaultEnhancers() + .prepend(anotherPropertyStoreEnhancer) + .concat(somePropertyStoreEnhancer), + }) + + expectTypeOf(store3.dispatch).toMatchTypeOf< + Dispatch & ThunkDispatch + >() + + expectTypeOf(store3.someProperty).toBeString() + + expectTypeOf(store3.anotherProperty).toBeNumber() + + const someStateExtendingEnhancer: StoreEnhancer< + {}, + { someProperty: string } + > = + (next) => + (...args) => { + const store = next(...args) + const getState = () => ({ + ...store.getState(), + someProperty: 'some value', + }) + return { + ...store, + getState, + } as any + } - const anotherStateExtendingEnhancer: StoreEnhancer< - {}, - { anotherProperty: number } - > = - (next) => - (...args) => { - const store = next(...args) - const getState = () => ({ - ...store.getState(), - anotherProperty: 123, - }) - return { - ...store, - getState, - } as any - } + const anotherStateExtendingEnhancer: StoreEnhancer< + {}, + { anotherProperty: number } + > = + (next) => + (...args) => { + const store = next(...args) + const getState = () => ({ + ...store.getState(), + anotherProperty: 123, + }) + return { + ...store, + getState, + } as any + } - const store = configureStore({ - reducer: () => ({ aProperty: 0 }), - enhancers: () => - new Tuple(someStateExtendingEnhancer, anotherStateExtendingEnhancer), - }) + const store4 = configureStore({ + reducer: () => ({ aProperty: 0 }), + enhancers: () => + new Tuple(someStateExtendingEnhancer, anotherStateExtendingEnhancer), + }) - const state = store.getState() + const state = store4.getState() - expectTypeOf(state.aProperty).toBeNumber() + expectTypeOf(state.aProperty).toBeNumber() - expectTypeOf(state.someProperty).toBeString() + expectTypeOf(state.someProperty).toBeString() - expectTypeOf(state.anotherProperty).toBeNumber() + expectTypeOf(state.anotherProperty).toBeNumber() - const storeWithCallback = configureStore({ - reducer: () => ({ aProperty: 0 }), - enhancers: (gDE) => - gDE().concat( - someStateExtendingEnhancer, - anotherStateExtendingEnhancer - ), - }) + const storeWithCallback2 = configureStore({ + reducer: () => ({ aProperty: 0 }), + enhancers: (gDE) => + gDE().concat(someStateExtendingEnhancer, anotherStateExtendingEnhancer), + }) - const stateWithCallback = storeWithCallback.getState() + const stateWithCallback = storeWithCallback2.getState() - expectTypeOf(stateWithCallback.aProperty).toBeNumber() + expectTypeOf(stateWithCallback.aProperty).toBeNumber() - expectTypeOf(stateWithCallback.someProperty).toBeString() + expectTypeOf(stateWithCallback.someProperty).toBeString() - expectTypeOf(stateWithCallback.anotherProperty).toBeNumber() - } + expectTypeOf(stateWithCallback.anotherProperty).toBeNumber() }) test('Preloaded state typings', () => { @@ -468,11 +455,6 @@ describe('type tests', () => { payload: number }>() - expectTypeOf(dispatchResult).not.toEqualTypeOf<{ - type: string - payload: number - }>() - const promiseResult = store.dispatch(async (dispatch) => { return 42 }) @@ -497,11 +479,6 @@ describe('type tests', () => { type: string payload: number }>() - - expectTypeOf(dispatchResult2).not.toEqualTypeOf<{ - type: string - payload: number - }>() }) test('removing the Thunk Middleware', () => { @@ -509,10 +486,10 @@ describe('type tests', () => { reducer: reducerA, middleware: () => new Tuple(), }) - // @ts-expect-error - store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkA()) + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('adding the thunk middleware by hand', () => { @@ -520,6 +497,7 @@ describe('type tests', () => { reducer: reducerA, middleware: () => new Tuple(thunk as ThunkMiddleware), }) + store.dispatch(thunkA()) // @ts-expect-error store.dispatch(thunkB()) @@ -541,7 +519,7 @@ describe('type tests', () => { [ Middleware<(a: 'a') => 'A', StateA>, Middleware<(b: 'b') => 'B', StateA>, - ThunkMiddleware + ThunkMiddleware, ] > const store = configureStore({ @@ -651,12 +629,6 @@ describe('type tests', () => { > >() - expectTypeOf(concatenated).not.toEqualTypeOf< - ReadonlyArray< - typeof otherMiddleware | ThunkMiddleware | Middleware<{}> - > - >() - return concatenated }, }) @@ -705,7 +677,7 @@ describe('type tests', () => { reducer: reducerA, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ thunk: false }).prepend( - (() => {}) as any as Middleware<(a: 'a') => 'A', StateA> + (() => {}) as any as Middleware<(a: 'a') => 'A', StateA>, ), }) const result1: 'A' = store.dispatch('a') @@ -735,7 +707,7 @@ describe('type tests', () => { }) function configureMyStore( - options: Omit, 'reducer'> + options: Omit, 'reducer'>, ) { return configureStore({ ...options, From d5155bdbfbd1c0e342a8f9caff53c864876b59cc Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 03:18:04 -0600 Subject: [PATCH 334/368] Cut excessive assertions in `mapBuilders.test-d.ts` --- .../toolkit/src/tests/mapBuilders.test-d.ts | 54 +++++-------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/packages/toolkit/src/tests/mapBuilders.test-d.ts b/packages/toolkit/src/tests/mapBuilders.test-d.ts index 95a17b69a4..d7377f42ad 100644 --- a/packages/toolkit/src/tests/mapBuilders.test-d.ts +++ b/packages/toolkit/src/tests/mapBuilders.test-d.ts @@ -20,12 +20,12 @@ describe('type tests', () => { expectTypeOf(state).not.toBeString() - expectTypeOf(action).not.toEqualTypeOf<{ + expectTypeOf(action).not.toMatchTypeOf<{ type: 'increment' payload: string }>() - expectTypeOf(action).not.toEqualTypeOf<{ + expectTypeOf(action).not.toMatchTypeOf<{ type: 'decrement' payload: number }>() @@ -38,10 +38,10 @@ describe('type tests', () => { expectTypeOf(state).not.toBeString() - expectTypeOf(action).not.toEqualTypeOf<{ type: 'decrement' }>() + expectTypeOf(action).not.toMatchTypeOf<{ type: 'decrement' }>() // this cannot be inferred and has to be manually specified - expectTypeOf(action).not.toEqualTypeOf<{ + expectTypeOf(action).not.toMatchTypeOf<{ type: 'increment' payload: number }>() @@ -49,22 +49,22 @@ describe('type tests', () => { builder.addCase( increment, - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) // @ts-expect-error builder.addCase( increment, - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) builder.addCase( 'increment', - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) // @ts-expect-error builder.addCase( 'decrement', - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) // action type is inferred @@ -82,18 +82,8 @@ describe('type tests', () => { (state, action) => { expectTypeOf(action).toMatchTypeOf() - assertType(action) - - expectTypeOf( - action - ).not.toEqualTypeOf() - expectTypeOf(action).toMatchTypeOf() - - assertType(action) - - expectTypeOf(action).not.toEqualTypeOf() - } + }, ) }) @@ -102,11 +92,7 @@ describe('type tests', () => { () => true, (state, action) => { expectTypeOf(action).toMatchTypeOf() - - assertType(action) - - expectTypeOf(action).not.toEqualTypeOf() - } + }, ) // with a boolean checker, action can also be typed by type argument @@ -115,23 +101,15 @@ describe('type tests', () => { (state, action) => { expectTypeOf(action).toMatchTypeOf<{ foo: boolean }>() - assertType<{ foo: boolean }>(action) - - expectTypeOf(action).not.toEqualTypeOf<{ foo: boolean }>() - expectTypeOf(action).toMatchTypeOf() - - assertType(action) - - expectTypeOf(action).not.toEqualTypeOf() - } + }, ) // addCase().addMatcher() is possible, action type inferred correctly builder .addCase( 'increment', - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) .addMatcher(decrement.match, (state, action) => { expectTypeOf(action).toEqualTypeOf>() @@ -141,14 +119,10 @@ describe('type tests', () => { builder .addCase( 'increment', - (state, action: ReturnType) => state + (state, action: ReturnType) => state, ) .addDefaultCase((state, action) => { expectTypeOf(action).toMatchTypeOf() - - assertType(action) - - expectTypeOf(action).not.toEqualTypeOf() }) test('addMatcher() should prevent further calls to addCase()', () => { @@ -238,7 +212,7 @@ describe('type tests', () => { getPendingMeta() { return { startedTimeStamp: 0 } }, - } + }, ) builder.addCase(thunk.pending, (_, action) => { From 40425063bf6fdb7a2a2deab29c801edf140fc9af Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 03:30:32 -0600 Subject: [PATCH 335/368] Cut excessive assertions in `buildHooks.test-d.tsx` --- .../src/query/tests/buildHooks.test-d.tsx | 149 +++--------------- 1 file changed, 21 insertions(+), 128 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test-d.tsx b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx index 269d2c78fd..3d21e0c82c 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test-d.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx @@ -1,7 +1,6 @@ import type { UseMutation, UseQuery } from '@internal/query/react/buildHooks' -import { waitMs } from '@internal/tests/utils/helpers' +import { ANY } from '@internal/tests/utils/helpers' import type { SerializedError } from '@reduxjs/toolkit' -import { createSlice } from '@reduxjs/toolkit' import type { SubscriptionOptions } from '@reduxjs/toolkit/query/react' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' import { useState } from 'react' @@ -14,8 +13,7 @@ interface Item { } const api = createApi({ - baseQuery: async (arg: any) => { - await waitMs(150) + baseQuery: (arg: any) => { if (arg?.body && 'amount' in arg.body) { amount += 1 } @@ -89,8 +87,6 @@ const api = createApi({ }), }) -const ANY = {} as any - describe('type tests', () => { test('useLazyQuery hook callback returns various properties to handle the result', () => { function User() { @@ -112,31 +108,12 @@ describe('type tests', () => { name: string } }>() - - assertType<{ - data: { - name: string - } - }>(result) - - expectTypeOf(result).not.toEqualTypeOf<{ - data: { - name: string - } - }>() } + if (result.isError) { expectTypeOf(result).toMatchTypeOf<{ error: { status: number; data: unknown } | SerializedError }>() - - assertType<{ - error: { status: number; data: unknown } | SerializedError - }>(result) - - expectTypeOf(result).not.toEqualTypeOf<{ - error: { status: number; data: unknown } | SerializedError - }>() } }) @@ -146,9 +123,9 @@ describe('type tests', () => { expectTypeOf(res.abort).toEqualTypeOf<() => void>() - expectTypeOf(res.unwrap).toEqualTypeOf< - () => Promise<{ name: string }> - >() + expectTypeOf(res.unwrap).returns.resolves.toEqualTypeOf<{ + name: string + }>() expectTypeOf(res.unsubscribe).toEqualTypeOf<() => void>() @@ -158,30 +135,7 @@ describe('type tests', () => { expectTypeOf(res.refetch).toMatchTypeOf<() => void>() - assertType<() => void>(res.refetch) - - expectTypeOf(res.refetch).not.toEqualTypeOf<() => void>() - - // abort the query immediately to force an error - if (abort) res.abort() - res - .unwrap() - .then((result) => { - expectTypeOf(result).toEqualTypeOf<{ name: string }>() - - setValues({ - successMsg: `Successfully fetched user ${result.name}`, - errMsg: '', - isAborted: false, - }) - }) - .catch((err) => { - setValues({ - successMsg: '', - errMsg: `An error has occurred fetching userId: ${res.arg}`, - isAborted: err.name === 'AbortError', - }) - }) + expectTypeOf(res.unwrap()).resolves.toEqualTypeOf<{ name: string }>() } return ( @@ -206,35 +160,16 @@ describe('type tests', () => { const handleClick = async () => { const res = updateUser({ name: 'Banana' }) - // no-op simply for clearer type assertions - res.then((result) => { - expectTypeOf(result).toMatchTypeOf< - | { - error: { status: number; data: unknown } | SerializedError - } - | { - data: { - name: string - } - } - >() - - assertType< - | { error: { status: number; data: unknown } | SerializedError } - | { data: { name: string } } - >(result) - - expectTypeOf(result).not.toEqualTypeOf< - | { - error: { status: number; data: unknown } | SerializedError - } - | { - data: { - name: string - } + expectTypeOf(res).resolves.toMatchTypeOf< + | { + error: { status: number; data: unknown } | SerializedError + } + | { + data: { + name: string } - >() - }) + } + >() expectTypeOf(res.arg).toMatchTypeOf<{ endpointName: string @@ -242,45 +177,13 @@ describe('type tests', () => { track?: boolean }>() - assertType<{ - endpointName: string - originalArgs: { name: string } - track?: boolean - }>(res.arg) - - expectTypeOf(res.arg).not.toEqualTypeOf<{ - endpointName: string - originalArgs: { name: string } - track?: boolean - }>() - expectTypeOf(res.requestId).toBeString() expectTypeOf(res.abort).toEqualTypeOf<() => void>() - expectTypeOf(res.unwrap).toEqualTypeOf< - () => Promise<{ name: string }> - >() + expectTypeOf(res.unwrap()).resolves.toEqualTypeOf<{ name: string }>() expectTypeOf(res.reset).toEqualTypeOf<() => void>() - - // abort the mutation immediately to force an error - res.abort() - res - .unwrap() - .then((result) => { - expectTypeOf(result).toEqualTypeOf<{ name: string }>() - - setSuccessMsg(`Successfully updated user ${result.name}`) - }) - .catch((err) => { - setErrMsg( - `An error has occurred updating user ${res.arg.originalArgs.name}` - ) - if (err.name === 'AbortError') { - setIsAborted(true) - } - }) } return ( @@ -331,26 +234,16 @@ describe('type tests', () => { }), }) - const counterSlice = createSlice({ - name: 'counter', - initialState: { count: 0 }, - reducers: { - increment(state) { - state.count++ - }, - }, - }) - expectTypeOf(api.useGetPostsQuery).toEqualTypeOf( - api.endpoints.getPosts.useQuery + api.endpoints.getPosts.useQuery, ) expectTypeOf(api.useUpdatePostMutation).toEqualTypeOf( - api.endpoints.updatePost.useMutation + api.endpoints.updatePost.useMutation, ) expectTypeOf(api.useAddPostMutation).toEqualTypeOf( - api.endpoints.addPost.useMutation + api.endpoints.addPost.useMutation, ) }) @@ -368,7 +261,7 @@ describe('type tests', () => { > expectTypeOf(fakeMutation).toEqualTypeOf( - api.endpoints.updateUser.useMutation + api.endpoints.updateUser.useMutation, ) }) }) From 0724a3611fd37fbd64e8b5e2e1de37ab5eb79a54 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 03:38:03 -0600 Subject: [PATCH 336/368] Cut excessive assertions in `createSlice.test-d.ts` --- .../toolkit/src/tests/createSlice.test-d.ts | 258 +++++------------- 1 file changed, 71 insertions(+), 187 deletions(-) diff --git a/packages/toolkit/src/tests/createSlice.test-d.ts b/packages/toolkit/src/tests/createSlice.test-d.ts index 7afef35d20..2cf5801eee 100644 --- a/packages/toolkit/src/tests/createSlice.test-d.ts +++ b/packages/toolkit/src/tests/createSlice.test-d.ts @@ -1,4 +1,5 @@ import type { + Action, ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, ActionCreatorWithPayload, @@ -9,10 +10,12 @@ import type { CaseReducer, PayloadAction, PayloadActionCreator, + Reducer, ReducerCreators, SerializedError, SliceCaseReducers, ThunkDispatch, + UnknownAction, ValidateSliceCaseReducers, } from '@reduxjs/toolkit' import { @@ -25,7 +28,6 @@ import { isRejected, } from '@reduxjs/toolkit' import { castDraft } from 'immer' -import type { Action, Reducer, UnknownAction } from 'redux' describe('type tests', () => { const counterSlice = createSlice({ @@ -72,7 +74,7 @@ describe('type tests', () => { extraReducers: (builder) => { builder.addCase( firstAction, - (state, action) => state + action.payload.count + (state, action) => state + action.payload.count, ) }, }) @@ -82,23 +84,11 @@ describe('type tests', () => { Reducer >() - assertType>(slice.reducer) - - expectTypeOf(slice.reducer).not.toEqualTypeOf< - Reducer - >() - expectTypeOf(slice.reducer).not.toMatchTypeOf< Reducer >() - expectTypeOf(slice.reducer).not.toEqualTypeOf< - Reducer - >() - expectTypeOf().not.toMatchTypeOf>() - - expectTypeOf().not.toEqualTypeOf>() }) test('Actions', () => { @@ -117,7 +107,7 @@ describe('type tests', () => { increment: (state) => state + 1, decrement: ( state, - { payload = 1 }: PayloadAction + { payload = 1 }: PayloadAction, ) => state - payload, multiply: (state, { payload }: PayloadAction) => Array.isArray(payload) @@ -133,29 +123,15 @@ describe('type tests', () => { }) expectTypeOf( - counter.actions.increment + counter.actions.increment, ).toMatchTypeOf() - assertType(counter.actions.increment) - - expectTypeOf( - counter.actions.increment - ).not.toEqualTypeOf() - counter.actions.increment() expectTypeOf(counter.actions.decrement).toMatchTypeOf< ActionCreatorWithOptionalPayload >() - assertType>( - counter.actions.decrement - ) - - expectTypeOf(counter.actions.decrement).not.toEqualTypeOf< - ActionCreatorWithOptionalPayload - >() - counter.actions.decrement() counter.actions.decrement(2) @@ -163,14 +139,6 @@ describe('type tests', () => { ActionCreatorWithPayload >() - assertType>( - counter.actions.multiply - ) - - expectTypeOf(counter.actions.multiply).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - counter.actions.multiply(2) counter.actions.multiply([2, 3, 4]) @@ -178,21 +146,13 @@ describe('type tests', () => { ActionCreatorWithPreparedPayload<[number, number], number> >() - assertType>( - counter.actions.addTwo - ) - - expectTypeOf(counter.actions.addTwo).not.toEqualTypeOf< - ActionCreatorWithPreparedPayload<[number, number], number> - >() - counter.actions.addTwo(1, 2) - expectTypeOf(counter.actions.multiply).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(counter.actions.multiply).parameters.not.toMatchTypeOf<[]>() expectTypeOf(counter.actions.multiply).parameter(0).not.toBeString() - expectTypeOf(counter.actions.addTwo).parameters.not.toEqualTypeOf< + expectTypeOf(counter.actions.addTwo).parameters.not.toMatchTypeOf< [number] >() @@ -215,15 +175,33 @@ describe('type tests', () => { }, }) - const s: 'counter/increment' = counter.actions.increment.type - const sa: 'counter/increment' = counter.actions.increment().type - const t: 'counter/decrement' = counter.actions.decrement.type - const ta: 'counter/decrement' = counter.actions.decrement().type - const u: 'counter/multiply' = counter.actions.multiply.type - const ua: 'counter/multiply' = counter.actions.multiply(1).type + expectTypeOf( + counter.actions.increment.type, + ).toEqualTypeOf<'counter/increment'>() + + expectTypeOf( + counter.actions.increment().type, + ).toEqualTypeOf<'counter/increment'>() + + expectTypeOf( + counter.actions.decrement.type, + ).toEqualTypeOf<'counter/decrement'>() + + expectTypeOf( + counter.actions.decrement().type, + ).toEqualTypeOf<'counter/decrement'>() + + expectTypeOf( + counter.actions.multiply.type, + ).toEqualTypeOf<'counter/multiply'>() + + expectTypeOf( + counter.actions.multiply(1).type, + ).toEqualTypeOf<'counter/multiply'>() - // @ts-expect-error - const y: 'increment' = counter.actions.increment.type + expectTypeOf( + counter.actions.increment.type, + ).not.toMatchTypeOf<'increment'>() }) test('Slice action creator types are inferred for enhanced reducers.', () => { @@ -252,7 +230,7 @@ describe('type tests', () => { }) expectTypeOf( - counter.actions.incrementByStrLen('test').type + counter.actions.incrementByStrLen('test').type, ).toEqualTypeOf<'test/incrementByStrLen'>() expectTypeOf(counter.actions.incrementByStrLen('test').payload).toBeNumber() @@ -262,7 +240,7 @@ describe('type tests', () => { expectTypeOf(counter.actions.concatMetaStrLen('test').meta).toBeNumber() expectTypeOf( - counter.actions.incrementByStrLen('test').payload + counter.actions.incrementByStrLen('test').payload, ).not.toBeString() expectTypeOf(counter.actions.concatMetaStrLen('test').meta).not.toBeString() @@ -286,7 +264,7 @@ describe('type tests', () => { testUnknownMetaAndError: { reducer( _, - action: PayloadAction + action: PayloadAction, ) {}, prepare: (payload: number) => ({ payload, @@ -350,53 +328,29 @@ describe('type tests', () => { expectTypeOf(counter.caseReducers.increment).toMatchTypeOf< (state: number, action: PayloadAction) => number | void >() - - assertType< - (state: number, action: PayloadAction) => number | void - >(counter.caseReducers.increment) - - expectTypeOf(counter.caseReducers.increment).not.toEqualTypeOf< - (state: number, action: PayloadAction) => number | void - >() }) test('Should match positively for reducers with prepare callback', () => { expectTypeOf(counter.caseReducers.decrement).toMatchTypeOf< (state: number, action: PayloadAction) => number | void >() - - assertType< - (state: number, action: PayloadAction) => number | void - >(counter.caseReducers.decrement) - - expectTypeOf(counter.caseReducers.decrement).not.toEqualTypeOf< - (state: number, action: PayloadAction) => number | void - >() }) test("Should not mismatch the payload if it's a simple reducer", () => { expectTypeOf(counter.caseReducers.increment).not.toMatchTypeOf< (state: number, action: PayloadAction) => number | void >() - - expectTypeOf(counter.caseReducers.increment).not.toEqualTypeOf< - (state: number, action: PayloadAction) => number | void - >() }) test("Should not mismatch the payload if it's a reducer with a prepare callback", () => { expectTypeOf(counter.caseReducers.decrement).not.toMatchTypeOf< (state: number, action: PayloadAction) => number | void >() - - expectTypeOf(counter.caseReducers.decrement).not.toEqualTypeOf< - (state: number, action: PayloadAction) => number | void - >() }) test("Should not include entries that don't exist", () => { expectTypeOf(counter.caseReducers).not.toHaveProperty( - 'someThingNonExistent' + 'someThingNonExistent', ) }) }) @@ -439,15 +393,9 @@ describe('type tests', () => { }) expectTypeOf( - mySlice.actions.setName + mySlice.actions.setName, ).toMatchTypeOf() - assertType(mySlice.actions.setName) - - expectTypeOf( - mySlice.actions.setName - ).not.toEqualTypeOf() - const x = mySlice.actions.setName mySlice.actions.setName(null) @@ -474,8 +422,6 @@ describe('type tests', () => { } else { expectTypeOf(x.type).not.toMatchTypeOf<'name/setName'>() - expectTypeOf(x.type).not.toEqualTypeOf<'name/setName'>() - expectTypeOf(x).not.toHaveProperty('payload') } }) @@ -499,7 +445,7 @@ describe('type tests', () => { const createGenericSlice = < T, - Reducers extends SliceCaseReducers> + Reducers extends SliceCaseReducers>, >({ name = '', initialState, @@ -534,8 +480,6 @@ describe('type tests', () => { expectTypeOf(state).not.toMatchTypeOf>() - expectTypeOf(state).not.toEqualTypeOf>() - state.status = 'finished' state.data = 'hocus pocus' }, @@ -546,21 +490,9 @@ describe('type tests', () => { ActionCreatorWithPayload >() - assertType>(wrappedSlice.actions.success) - - expectTypeOf(wrappedSlice.actions.success).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf< ActionCreatorWithoutPayload >() - - assertType>(wrappedSlice.actions.magic) - - expectTypeOf(wrappedSlice.actions.magic).not.toEqualTypeOf< - ActionCreatorWithoutPayload - >() }) test('extraReducers', () => { @@ -570,11 +502,11 @@ describe('type tests', () => { function createDataSlice< T, - Reducers extends SliceCaseReducers> + Reducers extends SliceCaseReducers>, >( name: string, reducers: ValidateSliceCaseReducers, Reducers>, - initialState: GenericState + initialState: GenericState, ) { const doNothing = createAction('doNothing') const setData = createAction('setData') @@ -621,7 +553,7 @@ describe('type tests', () => { selectMultiply: (state, multiplier: number) => state.value * multiplier, selectToFixed: Object.assign( (state: { value: number }) => state.value.toFixed(2), - { static: true } + { static: true }, ), }, }) @@ -646,7 +578,7 @@ describe('type tests', () => { } const nestedSelectors = sliceWithSelectors.getSelectors( - (rootState: typeof nestedState) => rootState.nested.counter + (rootState: typeof nestedState) => rootState.nested.counter, ) expectTypeOf(nestedSelectors.selectValue(nestedState)).toBeNumber() @@ -677,8 +609,9 @@ describe('type tests', () => { name: 'test', initialState: {} as TestState, reducers: (create) => { - const pretypedAsyncThunk = - create.asyncThunk.withTypes<{ rejectValue: TestReject }>() + const preTypedAsyncThunk = create.asyncThunk.withTypes<{ + rejectValue: TestReject + }>() // @ts-expect-error create.asyncThunk(() => {}) @@ -700,7 +633,7 @@ describe('type tests', () => { expectTypeOf(state).toEqualTypeOf() expectTypeOf(action.payload).toEqualTypeOf() - } + }, ), noActionReducer: create.reducer((state) => { expectTypeOf(state).toEqualTypeOf() @@ -719,7 +652,7 @@ describe('type tests', () => { expectTypeOf(action.meta).toEqualTypeOf<'meta'>() expectTypeOf(action.error).toEqualTypeOf<'error'>() - } + }, ), testInfer: create.asyncThunk( function payloadCreator(arg: TestArg, api) { @@ -756,7 +689,7 @@ describe('type tests', () => { expectTypeOf(action.payload).toEqualTypeOf() } }, - } + }, ), testExplicitType: create.asyncThunk< TestReturned, @@ -773,12 +706,6 @@ describe('type tests', () => { ThunkDispatch >() - assertType>(api.dispatch) - - expectTypeOf(api.dispatch).not.toEqualTypeOf< - ThunkDispatch - >() - // so you need to cast inside instead const getState = api.getState as () => StoreState const dispatch = api.dispatch as StoreDispatch @@ -789,12 +716,6 @@ describe('type tests', () => { (value: TestReject) => any >() - assertType<(value: TestReject) => any>(api.rejectWithValue) - - expectTypeOf(api.rejectWithValue).not.toEqualTypeOf< - (value: TestReject) => any - >() - return Promise.resolve({ payload: 'foo' }) }, { @@ -836,20 +757,14 @@ describe('type tests', () => { expectTypeOf(action.payload).toEqualTypeOf() } }, - } + }, ), - testPretyped: pretypedAsyncThunk( + testPreTyped: preTypedAsyncThunk( function payloadCreator(arg: TestArg, api) { expectTypeOf(api.rejectWithValue).toMatchTypeOf< (value: TestReject) => any >() - assertType<(value: TestReject) => any>(api.rejectWithValue) - - expectTypeOf(api.rejectWithValue).not.toEqualTypeOf< - (value: TestReject) => any - >() - return Promise.resolve({ payload: 'foo' }) }, { @@ -891,7 +806,7 @@ describe('type tests', () => { expectTypeOf(action.payload).toEqualTypeOf() } }, - } + }, ), } }, @@ -900,23 +815,18 @@ describe('type tests', () => { const store = configureStore({ reducer: { test: slice.reducer } }) type StoreState = ReturnType + type StoreDispatch = typeof store.dispatch expectTypeOf(slice.actions.normalReducer).toMatchTypeOf< PayloadActionCreator >() - assertType>(slice.actions.normalReducer) - - expectTypeOf(slice.actions.normalReducer).not.toEqualTypeOf< - PayloadActionCreator - >() - expectTypeOf(slice.actions.normalReducer).toBeCallableWith('') - expectTypeOf(slice.actions.normalReducer).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(slice.actions.normalReducer).parameters.not.toMatchTypeOf<[]>() - expectTypeOf(slice.actions.normalReducer).parameters.not.toEqualTypeOf< + expectTypeOf(slice.actions.normalReducer).parameters.not.toMatchTypeOf< [number] >() @@ -924,14 +834,6 @@ describe('type tests', () => { ActionCreatorWithOptionalPayload >() - assertType>( - slice.actions.optionalReducer - ) - - expectTypeOf(slice.actions.optionalReducer).not.toEqualTypeOf< - ActionCreatorWithOptionalPayload - >() - expectTypeOf(slice.actions.optionalReducer).toBeCallableWith() expectTypeOf(slice.actions.optionalReducer).toBeCallableWith('') @@ -939,15 +841,9 @@ describe('type tests', () => { expectTypeOf(slice.actions.optionalReducer).parameter(0).not.toBeNumber() expectTypeOf( - slice.actions.noActionReducer + slice.actions.noActionReducer, ).toMatchTypeOf() - assertType(slice.actions.noActionReducer) - - expectTypeOf( - slice.actions.noActionReducer - ).not.toEqualTypeOf() - expectTypeOf(slice.actions.noActionReducer).toBeCallableWith() expectTypeOf(slice.actions.noActionReducer).parameter(0).not.toBeString() @@ -970,21 +866,19 @@ describe('type tests', () => { AsyncThunk >() - { - type TestInferThunk = AsyncThunk + type TestInferThunk = AsyncThunk - expectTypeOf(slice.caseReducers.testInfer.pending).toEqualTypeOf< - CaseReducer> - >() + expectTypeOf(slice.caseReducers.testInfer.pending).toEqualTypeOf< + CaseReducer> + >() - expectTypeOf(slice.caseReducers.testInfer.fulfilled).toEqualTypeOf< - CaseReducer> - >() + expectTypeOf(slice.caseReducers.testInfer.fulfilled).toEqualTypeOf< + CaseReducer> + >() - expectTypeOf(slice.caseReducers.testInfer.rejected).toEqualTypeOf< - CaseReducer> - >() - } + expectTypeOf(slice.caseReducers.testInfer.rejected).toEqualTypeOf< + CaseReducer> + >() }) test('wrapping createSlice should be possible, with callback', () => { @@ -995,7 +889,7 @@ describe('type tests', () => { const createGenericSlice = < T, - Reducers extends SliceCaseReducers> + Reducers extends SliceCaseReducers>, >({ name = '', initialState, @@ -1028,7 +922,7 @@ describe('type tests', () => { magic: create.reducer((state) => { expectTypeOf(state).toEqualTypeOf>() - expectTypeOf(state).not.toEqualTypeOf>() + expectTypeOf(state).not.toMatchTypeOf>() state.status = 'finished' state.data = 'hocus pocus' @@ -1040,26 +934,16 @@ describe('type tests', () => { ActionCreatorWithPayload >() - assertType>(wrappedSlice.actions.success) - - expectTypeOf(wrappedSlice.actions.success).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf< ActionCreatorWithoutPayload >() - - assertType>(wrappedSlice.actions.magic) - - expectTypeOf(wrappedSlice.actions.magic).not.toEqualTypeOf< - ActionCreatorWithoutPayload - >() }) test('selectSlice', () => { expectTypeOf(counterSlice.selectSlice({ counter: 0 })).toBeNumber() + // We use `not.toEqualTypeOf` instead of `not.toMatchTypeOf` + // because `toMatchTypeOf` allows missing properties expectTypeOf(counterSlice.selectSlice).parameter(0).not.toEqualTypeOf<{}>() }) From 9669753e57aee30466260c36188d9d4c6ae4f57e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 03:40:49 -0600 Subject: [PATCH 337/368] Cut excessive assertions in `createEntityAdapter.test-d.ts` --- .../src/tests/createEntityAdapter.test-d.ts | 106 +----------------- 1 file changed, 2 insertions(+), 104 deletions(-) diff --git a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts index 732936076e..255496f3a6 100644 --- a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts +++ b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts @@ -9,7 +9,7 @@ import type { import { createEntityAdapter, createSlice } from '@reduxjs/toolkit' function extractReducers( - adapter: EntityAdapter + adapter: EntityAdapter, ): Omit, 'map'> { const { selectId, sortComparer, getInitialState, getSelectors, ...rest } = adapter @@ -35,171 +35,69 @@ describe('type tests', () => { ActionCreatorWithPayload >() - assertType>(slice.actions.addOne) - - expectTypeOf(slice.actions.addOne).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(slice.actions.addMany).toMatchTypeOf< ActionCreatorWithPayload | Record> >() - assertType< - ActionCreatorWithPayload | Record> - >(slice.actions.addMany) - - expectTypeOf(slice.actions.addMany).not.toEqualTypeOf< - ActionCreatorWithPayload | Record> - >() - expectTypeOf(slice.actions.setAll).toMatchTypeOf< ActionCreatorWithPayload | Record> >() - assertType< - ActionCreatorWithPayload | Record> - >(slice.actions.setAll) - - expectTypeOf(slice.actions.setAll).not.toEqualTypeOf< - ActionCreatorWithPayload | Record> - >() - expectTypeOf(slice.actions.removeOne).toMatchTypeOf< ActionCreatorWithPayload >() - assertType>(slice.actions.removeOne) - - expectTypeOf(slice.actions.removeOne).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(slice.actions.addMany).not.toMatchTypeOf< ActionCreatorWithPayload> >() - expectTypeOf(slice.actions.addMany).not.toEqualTypeOf< - ActionCreatorWithPayload> - >() - expectTypeOf(slice.actions.setAll).not.toMatchTypeOf< ActionCreatorWithPayload> >() - expectTypeOf(slice.actions.setAll).not.toEqualTypeOf< - ActionCreatorWithPayload> - >() - expectTypeOf(slice.actions.removeOne).toMatchTypeOf< ActionCreatorWithPayload >() - assertType>(slice.actions.removeOne) - - expectTypeOf(slice.actions.removeOne).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(slice.actions.removeMany).toMatchTypeOf< ActionCreatorWithPayload> >() - assertType>>( - slice.actions.removeMany - ) - - expectTypeOf(slice.actions.removeMany).not.toEqualTypeOf< - ActionCreatorWithPayload> - >() - expectTypeOf(slice.actions.removeMany).not.toMatchTypeOf< ActionCreatorWithPayload >() - expectTypeOf(slice.actions.removeMany).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf( - slice.actions.removeAll + slice.actions.removeAll, ).toMatchTypeOf() - expectTypeOf( - slice.actions.removeAll - ).not.toEqualTypeOf() - expectTypeOf(slice.actions.updateOne).toMatchTypeOf< ActionCreatorWithPayload> >() - assertType>>( - slice.actions.updateOne - ) - - expectTypeOf(slice.actions.updateOne).not.toEqualTypeOf< - ActionCreatorWithPayload> - >() - expectTypeOf(slice.actions.updateMany).not.toMatchTypeOf< ActionCreatorWithPayload[]> >() - expectTypeOf(slice.actions.updateMany).not.toEqualTypeOf< - ActionCreatorWithPayload[]> - >() - expectTypeOf(slice.actions.upsertOne).toMatchTypeOf< ActionCreatorWithPayload >() - assertType>(slice.actions.upsertOne) - - expectTypeOf(slice.actions.upsertOne).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(slice.actions.updateMany).toMatchTypeOf< ActionCreatorWithPayload>> >() - assertType>>>( - slice.actions.updateMany - ) - - expectTypeOf(slice.actions.updateMany).not.toEqualTypeOf< - ActionCreatorWithPayload>> - >() - expectTypeOf(slice.actions.upsertOne).toMatchTypeOf< ActionCreatorWithPayload >() - assertType>(slice.actions.upsertOne) - - expectTypeOf(slice.actions.upsertOne).not.toEqualTypeOf< - ActionCreatorWithPayload - >() - expectTypeOf(slice.actions.upsertMany).toMatchTypeOf< ActionCreatorWithPayload | Record> >() - assertType< - ActionCreatorWithPayload | Record> - >(slice.actions.upsertMany) - - expectTypeOf(slice.actions.upsertMany).not.toEqualTypeOf< - ActionCreatorWithPayload | Record> - >() - expectTypeOf(slice.actions.upsertMany).not.toMatchTypeOf< ActionCreatorWithPayload> >() - - expectTypeOf(slice.actions.upsertMany).not.toEqualTypeOf< - ActionCreatorWithPayload> - >() }) test('should not be able to mix with a different EntityAdapter', () => { From ba94b0a170ea5abca8ef0c55e2f2091568b5b7e7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 03:55:11 -0600 Subject: [PATCH 338/368] Cut excessive assertions in `createAsyncThunk.test-d.ts` --- .../src/tests/createAsyncThunk.test-d.ts | 205 +++--------------- 1 file changed, 26 insertions(+), 179 deletions(-) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index de9ec038c5..bfa0b0982f 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -1,6 +1,7 @@ import type { AsyncThunk, SerializedError, + ThunkDispatch, UnknownAction, } from '@reduxjs/toolkit' import { @@ -10,7 +11,6 @@ import { createSlice, unwrapResult, } from '@reduxjs/toolkit' -import type { ThunkDispatch } from 'redux-thunk' import type { TSVersion } from '@phryneas/ts-version' import type { AxiosError } from 'axios' @@ -22,44 +22,38 @@ const unknownAction = { type: 'foo' } as UnknownAction describe('type tests', () => { test('basic usage', () => { ;(async function () { - const async = createAsyncThunk('test', (id: number) => + const asyncThunk = createAsyncThunk('test', (id: number) => Promise.resolve(id * 2), ) const reducer = createReducer({}, (builder) => builder - .addCase(async.pending, (_, action) => { + .addCase(asyncThunk.pending, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof async)['pending']> + ReturnType<(typeof asyncThunk)['pending']> >() }) - .addCase(async.fulfilled, (_, action) => { + .addCase(asyncThunk.fulfilled, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof async)['fulfilled']> + ReturnType<(typeof asyncThunk)['fulfilled']> >() expectTypeOf(action.payload).toBeNumber() }) - .addCase(async.rejected, (_, action) => { + .addCase(asyncThunk.rejected, (_, action) => { expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof async)['rejected']> + ReturnType<(typeof asyncThunk)['rejected']> >() expectTypeOf(action.error).toMatchTypeOf< Partial | undefined >() - - assertType | undefined>(action.error) - - expectTypeOf(action.error).not.toEqualTypeOf< - Partial | undefined - >() }), ) - const promise = defaultDispatch(async(3)) + const promise = defaultDispatch(asyncThunk(3)) expectTypeOf(promise.requestId).toBeString() @@ -69,21 +63,13 @@ describe('type tests', () => { const result = await promise - if (async.fulfilled.match(result)) { + if (asyncThunk.fulfilled.match(result)) { expectTypeOf(result).toEqualTypeOf< - ReturnType<(typeof async)['fulfilled']> - >() - - expectTypeOf(result).not.toEqualTypeOf< - ReturnType<(typeof async)['rejected']> + ReturnType<(typeof asyncThunk)['fulfilled']> >() } else { expectTypeOf(result).toEqualTypeOf< - ReturnType<(typeof async)['rejected']> - >() - - expectTypeOf(result).not.toEqualTypeOf< - ReturnType<(typeof async)['fulfilled']> + ReturnType<(typeof asyncThunk)['rejected']> >() } @@ -92,7 +78,7 @@ describe('type tests', () => { .then((result) => { expectTypeOf(result).toBeNumber() - expectTypeOf(result).not.toEqualTypeOf() + expectTypeOf(result).not.toMatchTypeOf() }) .catch((error) => { // catch is always any-typed, nothing we can do here @@ -176,7 +162,7 @@ describe('type tests', () => { expectTypeOf(unwrapResult(returned)).toEqualTypeOf() - expectTypeOf(unwrapResult(returned)).not.toEqualTypeOf() + expectTypeOf(unwrapResult(returned)).not.toMatchTypeOf() })() }) @@ -284,10 +270,7 @@ describe('type tests', () => { .then((unwrapped) => { expectTypeOf(unwrapped).toEqualTypeOf() - expectTypeOf( - // @ts-expect-error - unwrapResult(unwrapped), - ).not.toEqualTypeOf() + expectTypeOf(unwrapResult).parameter(0).not.toMatchTypeOf(unwrapped) }) }) }) @@ -298,8 +281,6 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() - assertType<() => any>(asyncThunk) - expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() expectTypeOf(asyncThunk).returns.toBeFunction() @@ -310,22 +291,13 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() - assertType<() => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() - expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() }) test('one argument, specified as void: asyncThunk has no argument', () => { const asyncThunk = createAsyncThunk('test', (arg: void) => 0) - expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() - - assertType<() => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() - expectTypeOf(asyncThunk).parameters.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() }) test('one argument, specified as optional number: asyncThunk has optional number argument', () => { @@ -347,16 +319,12 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf() - assertType(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf() - // We _should_ be able to call this with no arguments, but we run into that error in 5.1 and 5.2. // Disabling this for now. // asyncThunk() expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeString() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[string]>() }) test('one argument, specified as number|undefined: asyncThunk has optional number argument', () => { @@ -369,17 +337,13 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() - assertType<(arg?: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() - expectTypeOf(asyncThunk).toBeCallableWith() expectTypeOf(asyncThunk).toBeCallableWith(undefined) expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeString() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[string]>() }) test('one argument, specified as number|void: asyncThunk has optional number argument', () => { @@ -387,48 +351,23 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() - assertType<(arg?: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() - expectTypeOf(asyncThunk).toBeCallableWith() expectTypeOf(asyncThunk).toBeCallableWith(undefined) expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - // @ts-ignore This fails in TS 4.7 only. - expectTypeOf(asyncThunk).parameter(0).toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeString() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[string]>() }) test('one argument, specified as any: asyncThunk has required any argument', () => { const asyncThunk = createAsyncThunk('test', (arg: any) => 0) - expectTypeOf(asyncThunk).parameter(0).toBeAny() + expectTypeOf(asyncThunk).parameters.items.toBeAny() expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) test('one argument, specified as unknown: asyncThunk has required unknown argument', () => { @@ -438,18 +377,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - // @ts-ignore This fails in TS 4.7 only. - expectTypeOf(asyncThunk).parameter(0).toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeAny() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) test('one argument, specified as number: asyncThunk has required number argument', () => { @@ -457,25 +385,9 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg: number) => any>() - assertType<(arg: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg: number) => any>() - - expectTypeOf(asyncThunk).parameter(0).toBeNumber() - expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeAny() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) test('two arguments, first specified as undefined: asyncThunk has no argument', () => { @@ -486,16 +398,8 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() - assertType<() => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() - expectTypeOf(asyncThunk).toBeCallableWith() - expectTypeOf(asyncThunk).parameter(0).toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - // @ts-expect-error cannot be called with an argument, even if the argument is `undefined` expectTypeOf(asyncThunk).toBeCallableWith(undefined) @@ -510,22 +414,10 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<() => any>() - assertType<() => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<() => any>() - expectTypeOf(asyncThunk).toBeCallableWith() expectTypeOf(asyncThunk).parameter(0).toBeVoid() - expectTypeOf(asyncThunk).parameter(0).toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() - // cannot be called with an argument expectTypeOf(asyncThunk).parameter(0).not.toBeAny() @@ -542,10 +434,6 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() - assertType<(arg?: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() - expectTypeOf(asyncThunk).toBeCallableWith() expectTypeOf(asyncThunk).toBeCallableWith(undefined) @@ -563,10 +451,6 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg?: number) => any>() - assertType<(arg?: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg?: number) => any>() - expectTypeOf(asyncThunk).toBeCallableWith() expectTypeOf(asyncThunk).toBeCallableWith(undefined) @@ -583,17 +467,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) test('two arguments, first specified as unknown: asyncThunk has required unknown argument', () => { @@ -603,18 +477,7 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - // @ts-ignore This fails in TS 4.7 only. - expectTypeOf(asyncThunk).parameter(0).toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeAny() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) test('two arguments, first specified as number: asyncThunk has required number argument', () => { @@ -622,27 +485,11 @@ describe('type tests', () => { expectTypeOf(asyncThunk).toMatchTypeOf<(arg: number) => any>() - assertType<(arg: number) => any>(asyncThunk) - - expectTypeOf(asyncThunk).not.toEqualTypeOf<(arg: number) => any>() - expectTypeOf(asyncThunk).parameter(0).toBeNumber() expectTypeOf(asyncThunk).toBeCallableWith(5) - expectTypeOf(asyncThunk).parameter(0).not.toBeUndefined() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNull() - - expectTypeOf(asyncThunk).parameter(0).not.toBeNullable() - - expectTypeOf(asyncThunk).parameter(0).not.toBeVoid() - - expectTypeOf(asyncThunk).parameter(0).not.toBeAny() - - expectTypeOf(asyncThunk).parameter(0).not.toBeUnknown() - - expectTypeOf(asyncThunk).parameters.not.toEqualTypeOf<[]>() + expectTypeOf(asyncThunk).parameters.not.toMatchTypeOf<[]>() }) }) From 2a70d74874e963a51ce1db312598010d5a3fd856 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:01:59 -0600 Subject: [PATCH 339/368] Cut excessive assertions in `unionTypes.test-d.ts` --- .../src/query/tests/unionTypes.test-d.ts | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/packages/toolkit/src/query/tests/unionTypes.test-d.ts b/packages/toolkit/src/query/tests/unionTypes.test-d.ts index 3c25aa969d..d47cdae41b 100644 --- a/packages/toolkit/src/query/tests/unionTypes.test-d.ts +++ b/packages/toolkit/src/query/tests/unionTypes.test-d.ts @@ -35,8 +35,6 @@ describe('union types', () => { } if (result.isLoading) { - expectTypeOf(result.data).toBeNullable() - expectTypeOf(result.data).toEqualTypeOf() expectTypeOf(result.error).toEqualTypeOf< @@ -88,6 +86,7 @@ describe('union types', () => { expectTypeOf(result).toBeNever() } }) + test('useQuery union', () => { const result = api.endpoints.getTest.useQuery() @@ -136,6 +135,7 @@ describe('union types', () => { expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isSuccess) { expectTypeOf(result.data).toBeString() @@ -168,15 +168,11 @@ describe('union types', () => { expectTypeOf(result.currentData).toEqualTypeOf() - expectTypeOf(result.currentData).not.toBeString() - if (result.isSuccess) { if (!result.isFetching) { expectTypeOf(result.currentData).toBeString() } else { expectTypeOf(result.currentData).toEqualTypeOf() - - expectTypeOf(result.currentData).not.toBeString() } } @@ -300,6 +296,7 @@ describe('union types', () => { expectTypeOf(result.isFetching).toEqualTypeOf() } + if (result.isLoading) { expectTypeOf(result.data).toBeUndefined() @@ -469,29 +466,25 @@ describe('union types', () => { test('queryHookResult (without selector) union', async () => { const useQueryStateResult = api.endpoints.getTest.useQueryState() + const useQueryResult = api.endpoints.getTest.useQuery() - const useQueryStateWithSelectFromResult = api.endpoints.getTest.useQueryState( - undefined, - { + + const useQueryStateWithSelectFromResult = + api.endpoints.getTest.useQueryState(undefined, { selectFromResult: () => ({ x: true }), - } - ) + }) const { refetch, ...useQueryResultWithoutMethods } = useQueryResult assertType(useQueryStateResult) expectTypeOf(useQueryStateResult).toMatchTypeOf( - useQueryResultWithoutMethods - ) - - expectTypeOf(useQueryStateResult).not.toEqualTypeOf( - useQueryResultWithoutMethods + useQueryResultWithoutMethods, ) expectTypeOf(useQueryStateWithSelectFromResult) .parameter(0) - .not.toEqualTypeOf(useQueryResultWithoutMethods) + .not.toMatchTypeOf(useQueryResultWithoutMethods) expectTypeOf(api.endpoints.getTest.select).returns.returns.toEqualTypeOf< Awaited> @@ -499,7 +492,6 @@ describe('union types', () => { }) test('useQueryState (with selectFromResult)', () => { - const result = api.endpoints.getTest.useQueryState(undefined, { selectFromResult({ data, @@ -782,12 +774,5 @@ describe('"Typed" helper types', () => { expectTypeOf< TypedUseMutationResult >().toMatchTypeOf(result) - - // TODO: `TypedUseMutationResult` might need a closer look since here the result is assignable to it but they are not of equal types - expectTypeOf< - TypedUseMutationResult - >().not.toEqualTypeOf(result) - - assertType>(result) }) }) From bf6bd488673b91102511c8f445023918175b3376 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:06:47 -0600 Subject: [PATCH 340/368] Cut excessive assertions in `configureStore.test-d.ts` --- .../src/tests/configureStore.test-d.ts | 119 +++++++++--------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test-d.ts b/packages/toolkit/src/tests/configureStore.test-d.ts index 19ddae6857..87866a97be 100644 --- a/packages/toolkit/src/tests/configureStore.test-d.ts +++ b/packages/toolkit/src/tests/configureStore.test-d.ts @@ -1,16 +1,24 @@ -import type { ConfigureStoreOptions, PayloadAction } from '@reduxjs/toolkit' -import { Tuple, configureStore, createSlice } from '@reduxjs/toolkit' import type { Action, + ConfigureStoreOptions, Dispatch, Middleware, + PayloadAction, Reducer, Store, StoreEnhancer, + ThunkAction, + ThunkDispatch, + ThunkMiddleware, UnknownAction, -} from 'redux' -import { applyMiddleware, combineReducers } from 'redux' -import type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk' +} from '@reduxjs/toolkit' +import { + Tuple, + applyMiddleware, + combineReducers, + configureStore, + createSlice, +} from '@reduxjs/toolkit' import { thunk } from 'redux-thunk' const _anyMiddleware: any = () => () => () => {} @@ -40,11 +48,12 @@ describe('type tests', () => { test('configureStore() infers the store state type.', () => { const reducer: Reducer = () => 0 + const store = configureStore({ reducer }) - const numberStore: Store = store - // @ts-expect-error - const stringStore: Store = store + expectTypeOf(store).toMatchTypeOf>() + + expectTypeOf(store).not.toMatchTypeOf>() }) test('configureStore() infers the store action type.', () => { @@ -402,7 +411,7 @@ describe('type tests', () => { test('Dispatch typings', () => { type StateA = number const reducerA = () => 0 - function thunkA() { + const thunkA = () => { return (() => {}) as any as ThunkAction, StateA, any, any> } @@ -599,12 +608,6 @@ describe('type tests', () => { > >() - expectTypeOf(concatenated).not.toEqualTypeOf< - ReadonlyArray< - typeof otherMiddleware | ThunkMiddleware | Middleware<{}> - > - >() - return concatenated }, }) @@ -720,57 +723,55 @@ describe('type tests', () => { expectTypeOf(store.dispatch).toBeFunction() }) - { - interface CounterState { - value: number - } + interface CounterState { + value: number + } - const counterSlice = createSlice({ - name: 'counter', - initialState: { value: 0 } as CounterState, - reducers: { - increment(state) { - state.value += 1 - }, - decrement(state) { - state.value -= 1 - }, - // Use the PayloadAction type to declare the contents of `action.payload` - incrementByAmount: (state, action: PayloadAction) => { - state.value += action.payload - }, + const counterSlice = createSlice({ + name: 'counter', + initialState: { value: 0 } as CounterState, + reducers: { + increment(state) { + state.value += 1 }, - }) + decrement(state) { + state.value -= 1 + }, + // Use the PayloadAction type to declare the contents of `action.payload` + incrementByAmount: (state, action: PayloadAction) => { + state.value += action.payload + }, + }, + }) - type Unsubscribe = () => void + type Unsubscribe = () => void - // A fake middleware that tells TS that an unsubscribe callback is being returned for a given action - // This is the same signature that the "listener" middleware uses - const dummyMiddleware: Middleware< - { - (action: Action<'actionListenerMiddleware/add'>): Unsubscribe - }, - CounterState - > = (storeApi) => (next) => (action) => {} + // A fake middleware that tells TS that an unsubscribe callback is being returned for a given action + // This is the same signature that the "listener" middleware uses + const dummyMiddleware: Middleware< + { + (action: Action<'actionListenerMiddleware/add'>): Unsubscribe + }, + CounterState + > = (storeApi) => (next) => (action) => {} - const store = configureStore({ - reducer: counterSlice.reducer, - middleware: (gDM) => gDM().prepend(dummyMiddleware), - }) + const store = configureStore({ + reducer: counterSlice.reducer, + middleware: (gDM) => gDM().prepend(dummyMiddleware), + }) - // Order matters here! We need the listener type to come first, otherwise - // the thunk middleware type kicks in and TS thinks a plain action is being returned - expectTypeOf(store.dispatch).toEqualTypeOf< - ((action: Action<'actionListenerMiddleware/add'>) => Unsubscribe) & - ThunkDispatch & - Dispatch - >() + // Order matters here! We need the listener type to come first, otherwise + // the thunk middleware type kicks in and TS thinks a plain action is being returned + expectTypeOf(store.dispatch).toEqualTypeOf< + ((action: Action<'actionListenerMiddleware/add'>) => Unsubscribe) & + ThunkDispatch & + Dispatch + >() - const unsubscribe = store.dispatch({ - type: 'actionListenerMiddleware/add', - } as const) + const unsubscribe = store.dispatch({ + type: 'actionListenerMiddleware/add', + } as const) - expectTypeOf(unsubscribe).toEqualTypeOf() - } + expectTypeOf(unsubscribe).toEqualTypeOf() }) }) From 18a6b2a297dfd0333938a9ae9e77d1d14a8aa41c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:10:31 -0600 Subject: [PATCH 341/368] Cut excessive assertions in `createAction.test-d.tsx` --- .../toolkit/src/tests/createAction.test-d.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/toolkit/src/tests/createAction.test-d.tsx b/packages/toolkit/src/tests/createAction.test-d.tsx index ec132f8edd..fe366292ad 100644 --- a/packages/toolkit/src/tests/createAction.test-d.tsx +++ b/packages/toolkit/src/tests/createAction.test-d.tsx @@ -78,7 +78,10 @@ describe('type tests', () => { }), { type: 'action' }, ) as PayloadActionCreator - const actionCreator: ActionCreator = payloadActionCreator + + expectTypeOf(payloadActionCreator).toMatchTypeOf< + ActionCreator + >() const payloadActionCreator2 = Object.assign( (payload?: number) => ({ @@ -88,8 +91,9 @@ describe('type tests', () => { { type: 'action' }, ) as PayloadActionCreator - const actionCreator2: ActionCreator> = - payloadActionCreator2 + expectTypeOf(payloadActionCreator2).toMatchTypeOf< + ActionCreator> + >() }) }) @@ -104,6 +108,7 @@ describe('type tests', () => { test('createAction() type parameter is required, not inferred (defaults to `void`).', () => { const increment = createAction('increment') + expectTypeOf(increment).parameter(0).not.toBeNumber() expectTypeOf(increment().payload).not.toBeNumber() @@ -279,10 +284,6 @@ describe('type tests', () => { expectTypeOf(x.filter(actionCreator.match)).toEqualTypeOf< PayloadAction[] >() - - expectTypeOf(x.filter(actionCreator.match)).not.toEqualTypeOf< - PayloadAction[] - >() }) }) }) @@ -319,6 +320,7 @@ describe('type tests', () => { test("Verify action creators should not be passed directly as arguments to React event handlers if there shouldn't be a payload", () => { const emptyAction = createAction('empty/action') + function TestComponent() { // This typically leads to an error like: // // A non-serializable value was detected in an action, in the path: `payload`. From 77138567118ec9d039c3b6c7517f1c839c8d3893 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:54:23 -0600 Subject: [PATCH 342/368] Fix issue with importing `endpointDefinitions` inside `createApi.test-d.ts` --- .../src/query/tests/createApi.test-d.ts | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test-d.ts b/packages/toolkit/src/query/tests/createApi.test-d.ts index aafecaa052..c7df44d1fc 100644 --- a/packages/toolkit/src/query/tests/createApi.test-d.ts +++ b/packages/toolkit/src/query/tests/createApi.test-d.ts @@ -2,7 +2,7 @@ import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, -} from '@internal/query/endpointDefinitions' +} from '@reduxjs/toolkit/dist/query/endpointDefinitions' import { ANY, setupApiStore } from '@internal/tests/utils/helpers' import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' @@ -29,6 +29,7 @@ describe('type tests', () => { }), }), }) + configureStore({ reducer: { [api.reducerPath]: api.reducer, @@ -38,9 +39,8 @@ describe('type tests', () => { expectTypeOf(api.reducerPath).toEqualTypeOf<'api'>() - type TagTypes = typeof api extends Api - ? E - : 'no match' + type TagTypes = + typeof api extends Api ? E : 'no match' assertType(ANY as never) @@ -55,6 +55,7 @@ describe('type tests', () => { endpoints: () => ({}), tagTypes: ['typeA', 'typeB'], }) + test('query: query & transformResponse types', () => { api.injectEndpoints({ endpoints: (build) => ({ @@ -121,6 +122,7 @@ describe('type tests', () => { }), }) }) + test('mutation: query & transformResponse types', () => { api.injectEndpoints({ endpoints: (build) => ({ @@ -190,6 +192,7 @@ describe('type tests', () => { describe('enhancing endpoint definitions', () => { const baseQuery = (x: string) => ({ data: 'success' }) + function getNewApi() { return createApi({ baseQuery, @@ -206,15 +209,17 @@ describe('type tests', () => { }), }) } - const api = getNewApi() + + const api1 = getNewApi() test('warn on wrong tagType', () => { - const storeRef = setupApiStore(api, undefined, { + const storeRef = setupApiStore(api1, undefined, { withoutTestLifecycles: true, }) + // only type-test this part if (2 > 1) { - api.enhanceEndpoints({ + api1.enhanceEndpoints({ endpoints: { query1: { // @ts-expect-error @@ -228,7 +233,7 @@ describe('type tests', () => { }) } - const enhanced = api.enhanceEndpoints({ + const enhanced = api1.enhanceEndpoints({ addTagTypes: ['new'], endpoints: { query1: { @@ -241,9 +246,9 @@ describe('type tests', () => { }, }) - storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) + storeRef.store.dispatch(api1.endpoints.query1.initiate('in1')) - storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) + storeRef.store.dispatch(api1.endpoints.query2.initiate('in2')) // only type-test this part if (2 > 1) { @@ -263,10 +268,11 @@ describe('type tests', () => { }) test('modify', () => { - const storeRef = setupApiStore(api, undefined, { + const storeRef = setupApiStore(api1, undefined, { withoutTestLifecycles: true, }) - api.enhanceEndpoints({ + + api1.enhanceEndpoints({ endpoints: { query1: { query: (x) => { @@ -301,10 +307,10 @@ describe('type tests', () => { }, }) - storeRef.store.dispatch(api.endpoints.query1.initiate('in1')) - storeRef.store.dispatch(api.endpoints.query2.initiate('in2')) - storeRef.store.dispatch(api.endpoints.mutation1.initiate('in1')) - storeRef.store.dispatch(api.endpoints.mutation2.initiate('in2')) + storeRef.store.dispatch(api1.endpoints.query1.initiate('in1')) + storeRef.store.dispatch(api1.endpoints.query2.initiate('in2')) + storeRef.store.dispatch(api1.endpoints.mutation1.initiate('in1')) + storeRef.store.dispatch(api1.endpoints.mutation2.initiate('in2')) }) test('updated transform response types', async () => { @@ -319,13 +325,15 @@ describe('type tests', () => { type Transformed = { value: string } - type Definitions = DefinitionsFromApi - type TagTypes = TagTypesFromApi + type Definitions = DefinitionsFromApi + + type TagTypes = TagTypesFromApi type Q1Definition = OverrideResultType< Definitions['query1'], Transformed > + type M1Definition = OverrideResultType< Definitions['mutation1'], Transformed @@ -359,7 +367,7 @@ describe('type tests', () => { }) const queryResponse = await storeRef.store.dispatch( - enhancedApi.endpoints.query1.initiate() + enhancedApi.endpoints.query1.initiate(), ) expectTypeOf(queryResponse.data).toMatchTypeOf< @@ -367,7 +375,7 @@ describe('type tests', () => { >() const mutationResponse = await storeRef.store.dispatch( - enhancedApi.endpoints.mutation1.initiate() + enhancedApi.endpoints.mutation1.initiate(), ) expectTypeOf(mutationResponse).toMatchTypeOf< From f6d812c7c570fe8fdc0ba758cc86fb38c31e8dbe Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:59:20 -0600 Subject: [PATCH 343/368] Remove nested `describe` block from `createAction.test-d.tsx` - Resolved an issue where the type checker in Vitest hangs when handling three levels of nested `describe` blocks. https://github.com/vitest-dev/vitest/issues/4964 --- .../toolkit/src/tests/createAction.test-d.tsx | 255 +++++++++--------- 1 file changed, 125 insertions(+), 130 deletions(-) diff --git a/packages/toolkit/src/tests/createAction.test-d.tsx b/packages/toolkit/src/tests/createAction.test-d.tsx index fe366292ad..c7af7ffab2 100644 --- a/packages/toolkit/src/tests/createAction.test-d.tsx +++ b/packages/toolkit/src/tests/createAction.test-d.tsx @@ -97,194 +97,189 @@ describe('type tests', () => { }) }) - describe('createAction()', () => { - test('createAction() has type parameter for the action payload.', () => { - const increment = createAction('increment') + test('createAction() has type parameter for the action payload.', () => { + const increment = createAction('increment') - expectTypeOf(increment).parameter(0).toBeNumber() + expectTypeOf(increment).parameter(0).toBeNumber() - expectTypeOf(increment).parameter(0).not.toBeString() - }) + expectTypeOf(increment).parameter(0).not.toBeString() + }) - test('createAction() type parameter is required, not inferred (defaults to `void`).', () => { - const increment = createAction('increment') + test('createAction() type parameter is required, not inferred (defaults to `void`).', () => { + const increment = createAction('increment') - expectTypeOf(increment).parameter(0).not.toBeNumber() + expectTypeOf(increment).parameter(0).not.toBeNumber() - expectTypeOf(increment().payload).not.toBeNumber() - }) + expectTypeOf(increment().payload).not.toBeNumber() + }) - test('createAction().type is a string literal.', () => { - const increment = createAction('increment') + test('createAction().type is a string literal.', () => { + const increment = createAction('increment') - expectTypeOf(increment(1).type).toBeString() + expectTypeOf(increment(1).type).toBeString() - expectTypeOf(increment(1).type).toEqualTypeOf<'increment'>() + expectTypeOf(increment(1).type).toEqualTypeOf<'increment'>() - expectTypeOf(increment(1).type).not.toMatchTypeOf<'other'>() + expectTypeOf(increment(1).type).not.toMatchTypeOf<'other'>() - expectTypeOf(increment(1).type).not.toBeNumber() - }) + expectTypeOf(increment(1).type).not.toBeNumber() + }) - test('type still present when using prepareAction', () => { - const strLenAction = createAction('strLen', (payload: string) => ({ - payload: payload.length, - })) + test('type still present when using prepareAction', () => { + const strLenAction = createAction('strLen', (payload: string) => ({ + payload: payload.length, + })) - expectTypeOf(strLenAction('test').type).toBeString() - }) + expectTypeOf(strLenAction('test').type).toBeString() + }) - test('changing payload type with prepareAction', () => { - const strLenAction = createAction('strLen', (payload: string) => ({ - payload: payload.length, - })) + test('changing payload type with prepareAction', () => { + const strLenAction = createAction('strLen', (payload: string) => ({ + payload: payload.length, + })) - expectTypeOf(strLenAction('test').payload).toBeNumber() + expectTypeOf(strLenAction('test').payload).toBeNumber() - expectTypeOf(strLenAction('test').payload).not.toBeString() + expectTypeOf(strLenAction('test').payload).not.toBeString() - expectTypeOf(strLenAction('test')).not.toHaveProperty('error') - }) + expectTypeOf(strLenAction('test')).not.toHaveProperty('error') + }) - test('adding metadata with prepareAction', () => { - const strLenMetaAction = createAction( - 'strLenMeta', - (payload: string) => ({ - payload, - meta: payload.length, - }), - ) + test('adding metadata with prepareAction', () => { + const strLenMetaAction = createAction('strLenMeta', (payload: string) => ({ + payload, + meta: payload.length, + })) - expectTypeOf(strLenMetaAction('test').meta).toBeNumber() + expectTypeOf(strLenMetaAction('test').meta).toBeNumber() - expectTypeOf(strLenMetaAction('test').meta).not.toBeString() + expectTypeOf(strLenMetaAction('test').meta).not.toBeString() - expectTypeOf(strLenMetaAction('test')).not.toHaveProperty('error') - }) + expectTypeOf(strLenMetaAction('test')).not.toHaveProperty('error') + }) - test('adding boolean error with prepareAction', () => { - const boolErrorAction = createAction('boolError', (payload: string) => ({ - payload, - error: true, - })) + test('adding boolean error with prepareAction', () => { + const boolErrorAction = createAction('boolError', (payload: string) => ({ + payload, + error: true, + })) - expectTypeOf(boolErrorAction('test').error).toBeBoolean() + expectTypeOf(boolErrorAction('test').error).toBeBoolean() - expectTypeOf(boolErrorAction('test').error).not.toBeString() - }) + expectTypeOf(boolErrorAction('test').error).not.toBeString() + }) - test('adding string error with prepareAction', () => { - const strErrorAction = createAction('strError', (payload: string) => ({ - payload, - error: 'this is an error', - })) + test('adding string error with prepareAction', () => { + const strErrorAction = createAction('strError', (payload: string) => ({ + payload, + error: 'this is an error', + })) - expectTypeOf(strErrorAction('test').error).toBeString() + expectTypeOf(strErrorAction('test').error).toBeString() - expectTypeOf(strErrorAction('test').error).not.toBeBoolean() - }) + expectTypeOf(strErrorAction('test').error).not.toBeBoolean() + }) - test('regression test for https://github.com/reduxjs/redux-toolkit/issues/214', () => { - const action = createAction<{ input?: string }>('ACTION') + test('regression test for https://github.com/reduxjs/redux-toolkit/issues/214', () => { + const action = createAction<{ input?: string }>('ACTION') - expectTypeOf(action({ input: '' }).payload.input).toEqualTypeOf< - string | undefined - >() + expectTypeOf(action({ input: '' }).payload.input).toEqualTypeOf< + string | undefined + >() - expectTypeOf(action({ input: '' }).payload.input).not.toBeNumber() + expectTypeOf(action({ input: '' }).payload.input).not.toBeNumber() - expectTypeOf(action).parameter(0).not.toMatchTypeOf({ input: 3 }) - }) + expectTypeOf(action).parameter(0).not.toMatchTypeOf({ input: 3 }) + }) - test('regression test for https://github.com/reduxjs/redux-toolkit/issues/224', () => { - const oops = createAction('oops', (x: any) => ({ - payload: x, - error: x, - meta: x, - })) + test('regression test for https://github.com/reduxjs/redux-toolkit/issues/224', () => { + const oops = createAction('oops', (x: any) => ({ + payload: x, + error: x, + meta: x, + })) - expectTypeOf(oops('').payload).toBeAny() + expectTypeOf(oops('').payload).toBeAny() - expectTypeOf(oops('').error).toBeAny() + expectTypeOf(oops('').error).toBeAny() - expectTypeOf(oops('').meta).toBeAny() - }) + expectTypeOf(oops('').meta).toBeAny() + }) - describe('createAction.match()', () => { - test('simple use case', () => { - const actionCreator = createAction('test') + describe('createAction.match()', () => { + test('simple use case', () => { + const actionCreator = createAction('test') - const x: Action = {} as any + const x: Action = {} as any - if (actionCreator.match(x)) { - expectTypeOf(x.type).toEqualTypeOf<'test'>() + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() - expectTypeOf(x.payload).toBeString() - } else { - expectTypeOf(x.type).not.toMatchTypeOf<'test'>() + expectTypeOf(x.payload).toBeString() + } else { + expectTypeOf(x.type).not.toMatchTypeOf<'test'>() - expectTypeOf(x).not.toHaveProperty('payload') - } - }) + expectTypeOf(x).not.toHaveProperty('payload') + } + }) - test('special case: optional argument', () => { - const actionCreator = createAction('test') + test('special case: optional argument', () => { + const actionCreator = createAction('test') - const x: Action = {} as any + const x: Action = {} as any - if (actionCreator.match(x)) { - expectTypeOf(x.type).toEqualTypeOf<'test'>() + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() - expectTypeOf(x.payload).toEqualTypeOf() - } - }) + expectTypeOf(x.payload).toEqualTypeOf() + } + }) - test('special case: without argument', () => { - const actionCreator = createAction('test') + test('special case: without argument', () => { + const actionCreator = createAction('test') - const x: Action = {} as any + const x: Action = {} as any - if (actionCreator.match(x)) { - expectTypeOf(x.type).toEqualTypeOf<'test'>() + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() - expectTypeOf(x.payload).not.toMatchTypeOf<{}>() - } - }) + expectTypeOf(x.payload).not.toMatchTypeOf<{}>() + } + }) - test('special case: with prepareAction', () => { - const actionCreator = createAction('test', () => ({ - payload: '', - meta: '', - error: false, - })) + test('special case: with prepareAction', () => { + const actionCreator = createAction('test', () => ({ + payload: '', + meta: '', + error: false, + })) - const x: Action = {} as any + const x: Action = {} as any - if (actionCreator.match(x)) { - expectTypeOf(x.type).toEqualTypeOf<'test'>() + if (actionCreator.match(x)) { + expectTypeOf(x.type).toEqualTypeOf<'test'>() - expectTypeOf(x.payload).toBeString() + expectTypeOf(x.payload).toBeString() - expectTypeOf(x.meta).toBeString() + expectTypeOf(x.meta).toBeString() - expectTypeOf(x.error).toBeBoolean() + expectTypeOf(x.error).toBeBoolean() - expectTypeOf(x.payload).not.toBeNumber() + expectTypeOf(x.payload).not.toBeNumber() - expectTypeOf(x.meta).not.toBeNumber() + expectTypeOf(x.meta).not.toBeNumber() - expectTypeOf(x.error).not.toBeNumber() - } - }) - test('potential use: as array filter', () => { - const actionCreator = createAction('test') + expectTypeOf(x.error).not.toBeNumber() + } + }) + test('potential use: as array filter', () => { + const actionCreator = createAction('test') - const x: Action[] = [] + const x: Action[] = [] - expectTypeOf(x.filter(actionCreator.match)).toEqualTypeOf< - PayloadAction[] - >() - }) + expectTypeOf(x.filter(actionCreator.match)).toEqualTypeOf< + PayloadAction[] + >() }) }) From c76527dde0845d2b1e020d746489ab9820965ba0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 04:59:53 -0600 Subject: [PATCH 344/368] Add missing type import in `retry.test-d.ts` --- packages/toolkit/src/query/tests/retry.test-d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/toolkit/src/query/tests/retry.test-d.ts b/packages/toolkit/src/query/tests/retry.test-d.ts index 93862b41a9..b9476a13c0 100644 --- a/packages/toolkit/src/query/tests/retry.test-d.ts +++ b/packages/toolkit/src/query/tests/retry.test-d.ts @@ -1,10 +1,12 @@ -describe('RetryOptions type tests', () => { +import type { RetryOptions } from '@internal/query/retry' + +describe('type tests', () => { test('RetryOptions only accepts one of maxRetries or retryCondition', () => { - // @ts-expect-error Should complain if both exist at once - const ro: RetryOptions = { + // Should complain if both `maxRetries` and `retryCondition` exist at once + expectTypeOf().not.toMatchTypeOf({ maxRetries: 5, retryCondition: () => false, - } + }) }) }) From 2518b10666198ee44a6dda6c17caef127294478c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 05:00:54 -0600 Subject: [PATCH 345/368] Fix remaining type test issues --- .../src/query/tests/buildSelector.test-d.ts | 10 +++++---- .../src/query/tests/errorHandling.test-d.tsx | 1 + .../toolkit/src/tests/createReducer.test-d.ts | 21 +++++++++---------- .../src/tests/getDefaultEnhancers.test-d.ts | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildSelector.test-d.ts b/packages/toolkit/src/query/tests/buildSelector.test-d.ts index d92936b05f..15bf0c6be2 100644 --- a/packages/toolkit/src/query/tests/buildSelector.test-d.ts +++ b/packages/toolkit/src/query/tests/buildSelector.test-d.ts @@ -2,7 +2,7 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' import { configureStore, createSelector } from '@reduxjs/toolkit' -describe('buildSelector', () => { +describe('type tests', () => { test('buildSelector type test', () => { interface Todo { userId: number @@ -31,11 +31,12 @@ describe('buildSelector', () => { [exampleQuerySelector], (queryState) => { return queryState?.data?.[0] ?? ({} as Todo) - } + }, ) + const firstTodoTitleSelector = createSelector( [todosSelector], - (todo) => todo?.title + (todo) => todo?.title, ) const store = configureStore({ @@ -49,6 +50,7 @@ describe('buildSelector', () => { // This only compiles if we carried the types through const upperTitle = todoTitle.toUpperCase() + expectTypeOf(upperTitle).toBeString() }) @@ -82,7 +84,7 @@ describe('buildSelector', () => { }) expectTypeOf( - exampleApi.util.selectCachedArgsForQuery(store.getState(), 'getTodos') + exampleApi.util.selectCachedArgsForQuery(store.getState(), 'getTodos'), ).toEqualTypeOf() }) }) diff --git a/packages/toolkit/src/query/tests/errorHandling.test-d.tsx b/packages/toolkit/src/query/tests/errorHandling.test-d.tsx index d546b0cb60..544b12a25f 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test-d.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test-d.tsx @@ -19,6 +19,7 @@ describe('type tests', () => { test('a mutation is unwrappable and has the correct types', () => { function User() { const [manualError, setManualError] = useState() + const [update, { isLoading, data, error }] = api.endpoints.update.useMutation() diff --git a/packages/toolkit/src/tests/createReducer.test-d.ts b/packages/toolkit/src/tests/createReducer.test-d.ts index c0a1e04f70..535710a256 100644 --- a/packages/toolkit/src/tests/createReducer.test-d.ts +++ b/packages/toolkit/src/tests/createReducer.test-d.ts @@ -1,16 +1,16 @@ -import type { ActionReducerMapBuilder } from '@reduxjs/toolkit' +import type { ActionReducerMapBuilder, Reducer } from '@reduxjs/toolkit' import { createAction, createReducer } from '@reduxjs/toolkit' -import type { Reducer } from 'redux' describe('type tests', () => { test('createReducer() infers type of returned reducer.', () => { const incrementHandler = ( state: number, - action: { type: 'increment'; payload: number } + action: { type: 'increment'; payload: number }, ) => state + 1 + const decrementHandler = ( state: number, - action: { type: 'decrement'; payload: number } + action: { type: 'decrement'; payload: number }, ) => state - 1 const reducer = createReducer(0 as number, (builder) => { @@ -19,21 +19,20 @@ describe('type tests', () => { .addCase('decrement', decrementHandler) }) - const numberReducer: Reducer = reducer + expectTypeOf(reducer).toMatchTypeOf>() - // @ts-expect-error - const stringReducer: Reducer = reducer + expectTypeOf(reducer).not.toMatchTypeOf>() }) - test('createReducer() state type can be specified expliclity.', () => { + test('createReducer() state type can be specified explicitly.', () => { const incrementHandler = ( state: number, - action: { type: 'increment'; payload: number } + action: { type: 'increment'; payload: number }, ) => state + action.payload const decrementHandler = ( state: number, - action: { type: 'decrement'; payload: number } + action: { type: 'decrement'; payload: number }, ) => state - action.payload createReducer(0 as number, (builder) => { @@ -65,7 +64,7 @@ describe('type tests', () => { const increment = createAction('increment') const reducer = createReducer(0, (builder) => - expectTypeOf(builder).toEqualTypeOf>() + expectTypeOf(builder).toEqualTypeOf>(), ) expectTypeOf(reducer(0, increment(5))).toBeNumber() diff --git a/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts b/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts index 1d19e470e0..67d42e99e6 100644 --- a/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts +++ b/packages/toolkit/src/tests/getDefaultEnhancers.test-d.ts @@ -1,5 +1,5 @@ +import type { StoreEnhancer } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' -import type { StoreEnhancer } from 'redux' declare const enhancer1: StoreEnhancer< { From 50456bac97ed092ed967e9bf6e1dc20d3f7ac547 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 05:11:43 -0600 Subject: [PATCH 346/368] Fix `endpointDefinitions` type imports in `createApi.test.ts` --- packages/toolkit/src/query/tests/createApi.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 13fd1782d6..80ea78fe1b 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -10,7 +10,7 @@ import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, -} from '@internal/query/endpointDefinitions' +} from '@reduxjs/toolkit/dist/query/endpointDefinitions' import { server } from '@internal/query/tests/mocks/server' import { getSerializedHeaders, From 407bcf554a3e446f7812fab07a9f33b9e19f65fe Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 05:27:55 -0600 Subject: [PATCH 347/368] Fix issue with importing `Tuple` in `getDefaultMiddleware.test.ts` --- packages/toolkit/src/tests/getDefaultMiddleware.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts index 41d92340e7..b72a959b0b 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test.ts @@ -1,10 +1,11 @@ +import { Tuple } from '@internal/utils' import type { Action, Middleware, ThunkAction, UnknownAction, } from '@reduxjs/toolkit' -import { Tuple, configureStore } from '@reduxjs/toolkit' +import { configureStore } from '@reduxjs/toolkit' import { thunk } from 'redux-thunk' import { vi } from 'vitest' From ebb0637532625705d6cc455a8bf803b9062e4f87 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 05:40:11 -0600 Subject: [PATCH 348/368] Fix type issue in `getDefaultMiddleware.test-d.ts` --- packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts index 8301ae1594..50680a09ce 100644 --- a/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts +++ b/packages/toolkit/src/tests/getDefaultMiddleware.test-d.ts @@ -1,5 +1,8 @@ +import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' import type { Action, + Dispatch, + Middleware, ThunkAction, ThunkDispatch, ThunkMiddleware, @@ -7,8 +10,6 @@ import type { UnknownAction, } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' -import type { Dispatch, Middleware } from 'redux' -import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware' declare const middleware1: Middleware<{ (_: string): number @@ -132,7 +133,7 @@ describe('type tests', () => { thunk: false, }) - expectTypeOf(m2).toEqualTypeOf>() + expectTypeOf(m2).toMatchTypeOf>() const dummyMiddleware: Middleware< { From b1071f657f676354ae1bd61d156454659c5ba262 Mon Sep 17 00:00:00 2001 From: EskiMojo14 Date: Sun, 28 Jan 2024 18:56:32 +0000 Subject: [PATCH 349/368] remove (now inaccurate) TODOs --- .../tests/listenerMiddleware.test-d.ts | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts index 43fc550367..8ac4c11549 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test-d.ts @@ -90,7 +90,7 @@ describe('type tests', () => { addListener({ actionCreator: testAction1, effect: () => {}, - }) + }), ) expectTypeOf(unsubscribe).toEqualTypeOf() @@ -135,7 +135,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).toBeUnknown() @@ -160,7 +160,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).toBeUnknown() @@ -191,7 +191,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).toBeUnknown() @@ -210,7 +210,7 @@ describe('type tests', () => { expectTypeOf(thunkState).toBeUnknown() }) }, - }) + }), ) store.dispatch( @@ -221,14 +221,13 @@ describe('type tests', () => { expectTypeOf(listenerState).toBeUnknown() - // TODO Can't get the thunk dispatch types to carry through listenerApi.dispatch((dispatch, getState) => { const thunkState = getState() expectTypeOf(thunkState).toBeUnknown() }) }, - }) + }), ) }) @@ -258,7 +257,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is PayloadAction => { return ( isFluxStandardAction(action) && typeof action.payload === 'boolean' @@ -286,7 +285,7 @@ describe('type tests', () => { effect: (action, listenerApi) => { expectTypeOf(action).toEqualTypeOf<{ type: 'abcd' }>() }, - }) + }), ) store.dispatch( @@ -295,7 +294,7 @@ describe('type tests', () => { effect: (action, listenerApi) => { expectTypeOf(action).toMatchTypeOf>() }, - }) + }), ) store.dispatch( @@ -304,7 +303,7 @@ describe('type tests', () => { effect: (action, listenerApi) => { expectTypeOf(action).toMatchTypeOf>() }, - }) + }), ) }) @@ -315,7 +314,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).not.toBeAny() @@ -342,11 +341,7 @@ describe('type tests', () => { // Can pass a predicate function with fewer args typedMiddleware.startListening({ - // TODO Why won't this infer the listener's `action` with implicit argument types? - predicate: ( - action: UnknownAction, - currentState: CounterState - ): action is PayloadAction => { + predicate: (action, currentState): action is PayloadAction => { expectTypeOf(currentState).not.toBeAny() expectTypeOf(currentState).toEqualTypeOf() @@ -388,7 +383,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is ReturnType => { expectTypeOf(currentState).not.toBeAny() @@ -411,7 +406,7 @@ describe('type tests', () => { expectTypeOf(thunkState).toEqualTypeOf() }) }, - }) + }), ) store.dispatch( @@ -419,7 +414,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).not.toBeAny() @@ -442,7 +437,7 @@ describe('type tests', () => { expectTypeOf(thunkState).toEqualTypeOf() }) }, - }) + }), ) }) @@ -454,7 +449,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).not.toBeAny() @@ -471,7 +466,6 @@ describe('type tests', () => { expectTypeOf(listenerState).toEqualTypeOf() - // TODO Can't get the thunk dispatch types to carry through listenerApi.dispatch((dispatch, getState) => { const thunkState = listenerApi.getState() @@ -487,7 +481,6 @@ describe('type tests', () => { expectTypeOf(listenerState).toEqualTypeOf() - // TODO Can't get the thunk dispatch types to carry through listenerApi.dispatch((dispatch, getState) => { const thunkState = listenerApi.getState() @@ -501,7 +494,7 @@ describe('type tests', () => { predicate: ( action, currentState, - previousState + previousState, ): action is UnknownAction => { expectTypeOf(currentState).not.toBeAny() @@ -524,7 +517,7 @@ describe('type tests', () => { expectTypeOf(thunkState).toEqualTypeOf() }) }, - }) + }), ) store.dispatch( @@ -541,7 +534,7 @@ describe('type tests', () => { expectTypeOf(thunkState).toEqualTypeOf() }) }, - }) + }), ) }) }) From 5be62b88fa4443bde4b03e2f165aa935a3dedb41 Mon Sep 17 00:00:00 2001 From: EskiMojo14 Date: Sun, 28 Jan 2024 21:44:43 +0000 Subject: [PATCH 350/368] bump RTK codemods --- packages/rtk-codemods/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rtk-codemods/package.json b/packages/rtk-codemods/package.json index 5754ed4466..54f206cb24 100644 --- a/packages/rtk-codemods/package.json +++ b/packages/rtk-codemods/package.json @@ -1,6 +1,6 @@ { "name": "@reduxjs/rtk-codemods", - "version": "0.1.0", + "version": "0.1.1", "scripts": { "lint": "eslint .", "test": "vitest --run", From c231da406b2df3ec103f3991e71b249dd3b81299 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:50:57 -0600 Subject: [PATCH 351/368] Remove redundant `returns.resolves` assertion --- packages/toolkit/src/query/tests/buildHooks.test-d.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test-d.tsx b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx index 3d21e0c82c..9e15bf68ee 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test-d.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test-d.tsx @@ -123,10 +123,6 @@ describe('type tests', () => { expectTypeOf(res.abort).toEqualTypeOf<() => void>() - expectTypeOf(res.unwrap).returns.resolves.toEqualTypeOf<{ - name: string - }>() - expectTypeOf(res.unsubscribe).toEqualTypeOf<() => void>() expectTypeOf(res.updateSubscriptionOptions).toEqualTypeOf< From 9339d5cf44ef6fd446a2ef44d02bf5514cb656f9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:52:31 -0600 Subject: [PATCH 352/368] Remove unnecessary `.then` blocks --- .../src/query/tests/buildHooks.test.tsx | 319 +++++++++--------- 1 file changed, 153 insertions(+), 166 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index ad2142f9de..bee8401b0d 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,25 +1,25 @@ -import type { SubscriptionSelectors } from '@internal/query/core/buildMiddleware/types'; -import { countObjectKeys } from '@internal/query/utils/countObjectKeys'; +import type { SubscriptionSelectors } from '@internal/query/core/buildMiddleware/types' +import { countObjectKeys } from '@internal/query/utils/countObjectKeys' import { actionsReducer, setupApiStore, useRenderCounter, waitMs, withProvider, -} from '@internal/tests/utils/helpers'; -import type { UnknownAction } from '@reduxjs/toolkit'; +} from '@internal/tests/utils/helpers' +import type { UnknownAction } from '@reduxjs/toolkit' import { configureStore, createListenerMiddleware, createSlice, -} from '@reduxjs/toolkit'; -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState'; +} from '@reduxjs/toolkit' +import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import { QueryStatus, createApi, fetchBaseQuery, skipToken, -} from '@reduxjs/toolkit/query/react'; +} from '@reduxjs/toolkit/query/react' import { act, fireEvent, @@ -27,12 +27,12 @@ import { renderHook, screen, waitFor, -} from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; -import { HttpResponse, http } from 'msw'; -import { useEffect, useState } from 'react'; -import type { MockInstance } from 'vitest'; -import { server } from './mocks/server'; +} from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { HttpResponse, http } from 'msw' +import { useEffect, useState } from 'react' +import type { MockInstance } from 'vitest' +import { server } from './mocks/server' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or @@ -131,7 +131,7 @@ const storeRef = setupApiStore( middleware: { prepend: [listenerMiddleware.middleware], }, - } + }, ) let getSubscriptions: SubscriptionSelectors['getSubscriptions'] @@ -146,7 +146,7 @@ beforeEach(() => { }, }) ;({ getSubscriptions, getSubscriptionCount } = storeRef.store.dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) as unknown as SubscriptionSelectors) }) @@ -177,7 +177,7 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(2) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(3) }) @@ -205,14 +205,14 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(1) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) fireEvent.click(screen.getByText('Increment value')) // setState = 1, perform request = 2 await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(4) @@ -231,7 +231,7 @@ describe('hooks tests', () => { 2, { skip: value < 1, - } + }, )) return (
@@ -248,25 +248,25 @@ describe('hooks tests', () => { // Being that we skipped the initial request on mount, this should be false await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) fireEvent.click(screen.getByText('Increment value')) // Condition is met, should load await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) // Make sure the original loading has completed. fireEvent.click(screen.getByText('Increment value')) // Being that we already have data, isLoading should be false await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) // We call a refetch, should still be `false` act(() => void refetch()) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) expect(screen.getByTestId('isLoading').textContent).toBe('false') }) @@ -356,12 +356,12 @@ describe('hooks tests', () => { let { rerender } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('1') + expect(screen.getByTestId('status').textContent).toBe('1'), ) rerender() await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('2') + expect(screen.getByTestId('status').textContent).toBe('2'), ) expect(loadingHist).toEqual([true, false]) @@ -387,14 +387,14 @@ describe('hooks tests', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -403,14 +403,14 @@ describe('hooks tests', () => { // Let's make sure we actually fetch, and we increment expect(screen.getByTestId('isLoading').textContent).toBe('false') await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -433,14 +433,14 @@ describe('hooks tests', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -450,7 +450,7 @@ describe('hooks tests', () => { // and the condition is set to 10 seconds expect(screen.getByTestId('isFetching').textContent).toBe('false') await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) }) @@ -473,14 +473,14 @@ describe('hooks tests', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -491,14 +491,14 @@ describe('hooks tests', () => { render(, { wrapper: storeRef.wrapper }) // Let's make sure we actually fetch, and we increment await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -533,14 +533,14 @@ describe('hooks tests', () => { fireEvent.click(screen.getByText('change skip')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) }) @@ -579,7 +579,7 @@ describe('hooks tests', () => { fireEvent.click(screen.getByText('change skip')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => { @@ -616,14 +616,14 @@ describe('hooks tests', () => { fireEvent.click(screen.getByText('change skip')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -675,7 +675,7 @@ describe('hooks tests', () => { isUninitialized: false, refetch: expect.any(Function), status: 'pending', - }) + }), ) }) test('with `selectFromResult`', async () => { @@ -684,7 +684,7 @@ describe('hooks tests', () => { () => api.endpoints.getUser.useQuery(5, { selectFromResult }), { wrapper: storeRef.wrapper, - } + }, ) await waitFor(() => expect(result.current.isSuccess).toBe(true)) @@ -707,7 +707,7 @@ describe('hooks tests', () => { () => api.endpoints.getIncrementedAmount.useQuery(), { wrapper: storeRef.wrapper, - } + }, ) await waitFor(() => expect(result.current.isSuccess).toBe(true)) @@ -758,7 +758,7 @@ describe('hooks tests', () => { { wrapper: storeRef.wrapper, initialProps: ['a'], - } + }, ) await act(async () => { @@ -834,12 +834,12 @@ describe('hooks tests', () => { () => api.endpoints.getIncrementedAmount.useQuery(), { wrapper: withProvider(store), - } + }, ) } expect(doRender).toThrowError( - /Warning: Middleware for RTK-Query API at reducerPath "api" has not been added to the store/ + /Warning: Middleware for RTK-Query API at reducerPath "api" has not been added to the store/, ) }) }) @@ -876,7 +876,7 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(1) await waitFor(() => - expect(screen.getByTestId('isUninitialized').textContent).toBe('true') + expect(screen.getByTestId('isUninitialized').textContent).toBe('true'), ) await waitFor(() => expect(data).toBeUndefined()) @@ -884,19 +884,19 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(2) await waitFor(() => - expect(screen.getByTestId('isUninitialized').textContent).toBe('false') + expect(screen.getByTestId('isUninitialized').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(3) fireEvent.click(screen.getByTestId('fetchButton')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(5) }) @@ -937,7 +937,7 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(1) // hook mount await waitFor(() => - expect(screen.getByTestId('isUninitialized').textContent).toBe('true') + expect(screen.getByTestId('isUninitialized').textContent).toBe('true'), ) await waitFor(() => expect(data).toBeUndefined()) @@ -945,10 +945,10 @@ describe('hooks tests', () => { expect(getRenderCount()).toBe(2) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(3) @@ -957,10 +957,10 @@ describe('hooks tests', () => { fireEvent.click(screen.getByTestId('fetchButton')) // perform new request = 2 await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(6) @@ -971,15 +971,15 @@ describe('hooks tests', () => { fireEvent.click(screen.getByTestId('fetchButton')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(9) expect( - actions.filter(api.internalActions.updateSubscriptionOptions.match) + actions.filter(api.internalActions.updateSubscriptionOptions.match), ).toHaveLength(1) }) @@ -1008,54 +1008,54 @@ describe('hooks tests', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isUninitialized').textContent).toBe('true') + expect(screen.getByTestId('isUninitialized').textContent).toBe('true'), ) await waitFor(() => expect(data).toBeUndefined()) fireEvent.click(screen.getByTestId('fetchUser1')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) // Being that there is only the initial query, no unsubscribe should be dispatched expect( - actions.filter(api.internalActions.unsubscribeQueryResult.match) + actions.filter(api.internalActions.unsubscribeQueryResult.match), ).toHaveLength(0) fireEvent.click(screen.getByTestId('fetchUser2')) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect( - actions.filter(api.internalActions.unsubscribeQueryResult.match) + actions.filter(api.internalActions.unsubscribeQueryResult.match), ).toHaveLength(1) fireEvent.click(screen.getByTestId('fetchUser1')) expect( - actions.filter(api.internalActions.unsubscribeQueryResult.match) + actions.filter(api.internalActions.unsubscribeQueryResult.match), ).toHaveLength(2) // we always unsubscribe the original promise and create a new one fireEvent.click(screen.getByTestId('fetchUser1')) expect( - actions.filter(api.internalActions.unsubscribeQueryResult.match) + actions.filter(api.internalActions.unsubscribeQueryResult.match), ).toHaveLength(3) unmount() // We unsubscribe after the component unmounts expect( - actions.filter(api.internalActions.unsubscribeQueryResult.match) + actions.filter(api.internalActions.unsubscribeQueryResult.match), ).toHaveLength(4) }) @@ -1071,14 +1071,6 @@ describe('hooks tests', () => { const handleClick = (abort: boolean) => async () => { const res = getUser(1) - // no-op simply for clearer type assertions - res.then((result) => { - if (result.isSuccess) { - } - if (result.isError) { - } - }) - // abort the query immediately to force an error if (abort) res.abort() res @@ -1118,14 +1110,14 @@ describe('hooks tests', () => { expect(screen.queryByText('Request was aborted')).toBeNull() fireEvent.click( - screen.getByRole('button', { name: 'Fetch User and abort' }) + screen.getByRole('button', { name: 'Fetch User and abort' }), ) await screen.findByText('An error has occurred fetching userId: 1') expect(screen.queryByText(/Successfully fetched user/i)).toBeNull() screen.getByText('Request was aborted') fireEvent.click( - screen.getByRole('button', { name: 'Fetch User successfully' }) + screen.getByRole('button', { name: 'Fetch User successfully' }), ) await screen.findByText('Successfully fetched user Timmy') expect(screen.queryByText(/An error has occurred/i)).toBeNull() @@ -1178,7 +1170,7 @@ describe('hooks tests', () => { data: null, }) expect(JSON.parse(unwrappedErrorResult)).toMatchObject( - JSON.parse(errorResult) + JSON.parse(errorResult), ) } }) @@ -1229,7 +1221,7 @@ describe('hooks tests', () => { name: 'Timmy', }) expect(JSON.parse(unwrappedDataResult)).toMatchObject( - JSON.parse(dataResult) + JSON.parse(dataResult), ) } }) @@ -1257,14 +1249,14 @@ describe('hooks tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) fireEvent.click(screen.getByText('Update User')) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) }) @@ -1289,8 +1281,8 @@ describe('hooks tests', () => { fireEvent.click(screen.getByText('Update User')) await waitFor(() => expect(screen.getByTestId('result').textContent).toBe( - JSON.stringify(result) - ) + JSON.stringify(result), + ), ) }) @@ -1304,9 +1296,6 @@ describe('hooks tests', () => { const handleClick = async () => { const res = updateUser({ name: 'Banana' }) - // no-op simply for clearer type assertions - res.then((result) => {}) - // abort the mutation immediately to force an error res.abort() res @@ -1316,7 +1305,7 @@ describe('hooks tests', () => { }) .catch((err) => { setErrMsg( - `An error has occurred updating user ${res.arg.originalArgs.name}` + `An error has occurred updating user ${res.arg.originalArgs.name}`, ) if (err.name === 'AbortError') { setIsAborted(true) @@ -1340,7 +1329,7 @@ describe('hooks tests', () => { expect(screen.queryByText('Request was aborted')).toBeNull() fireEvent.click( - screen.getByRole('button', { name: 'Update User and abort' }) + screen.getByRole('button', { name: 'Update User and abort' }), ) await screen.findByText('An error has occurred updating user Banana') expect(screen.queryByText(/Successfully updated user/i)).toBeNull() @@ -1352,7 +1341,7 @@ describe('hooks tests', () => { () => api.endpoints.updateUser.useMutation(), { wrapper: storeRef.wrapper, - } + }, ) const arg = { name: 'Foo' } @@ -1373,8 +1362,8 @@ describe('hooks tests', () => { {result.isUninitialized ? 'isUninitialized' : result.isSuccess - ? 'isSuccess' - : 'other'} + ? 'isSuccess' + : 'other'} {result.originalArgs?.name} @@ -1427,12 +1416,12 @@ describe('hooks tests', () => { // Resolve initial query await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) userEvent.hover(screen.getByTestId('highPriority')) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1449,11 +1438,11 @@ describe('hooks tests', () => { }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1495,13 +1484,13 @@ describe('hooks tests', () => { // Let the initial query resolve await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) // Try to prefetch what we just loaded userEvent.hover(screen.getByTestId('lowPriority')) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1519,7 +1508,7 @@ describe('hooks tests', () => { await waitMs() expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1560,7 +1549,7 @@ describe('hooks tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) // Wait 400ms, making it respect ifOlderThan @@ -1569,7 +1558,7 @@ describe('hooks tests', () => { // This should run the query being that we're past the threshold userEvent.hover(screen.getByTestId('lowPriority')) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1585,11 +1574,11 @@ describe('hooks tests', () => { }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ data: { name: 'Timmy' }, endpointName: 'getUser', @@ -1630,19 +1619,19 @@ describe('hooks tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitMs() // Get a snapshot of the last result const latestQueryData = api.endpoints.getUser.select(USER_ID)( - storeRef.store.getState() as any + storeRef.store.getState() as any, ) userEvent.hover(screen.getByTestId('lowPriority')) // Serve up the result from the cache being that the condition wasn't met expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual(latestQueryData) }) @@ -1670,7 +1659,7 @@ describe('hooks tests', () => { userEvent.hover(screen.getByTestId('lowPriority')) expect( - api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any) + api.endpoints.getUser.select(USER_ID)(storeRef.store.getState() as any), ).toEqual({ endpointName: 'getUser', isError: false, @@ -1710,14 +1699,14 @@ describe('hooks tests', () => { () => { return HttpResponse.json(null, { status: 500 }) }, - { once: true } + { once: true }, ), http.get('https://example.com/me', () => { return HttpResponse.json(checkSessionData) }), http.post('https://example.com/login', () => { return HttpResponse.json(null, { status: 200 }) - }) + }), ) let data, isLoading, isError function User() { @@ -1738,34 +1727,34 @@ describe('hooks tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('isError').textContent).toBe('true') + expect(screen.getByTestId('isError').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('user').textContent).toBe('') + expect(screen.getByTestId('user').textContent).toBe(''), ) fireEvent.click(screen.getByRole('button', { name: /Login/i })) await waitFor(() => - expect(screen.getByTestId('loginLoading').textContent).toBe('true') + expect(screen.getByTestId('loginLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('loginLoading').textContent).toBe('false') + expect(screen.getByTestId('loginLoading').textContent).toBe('false'), ) // login mutation will cause the original errored out query to refire, clearing the error and setting the user await waitFor(() => - expect(screen.getByTestId('isError').textContent).toBe('false') + expect(screen.getByTestId('isError').textContent).toBe('false'), ) await waitFor(() => expect(screen.getByTestId('user').textContent).toBe( - JSON.stringify(checkSessionData) - ) + JSON.stringify(checkSessionData), + ), ) const { checkSession, login } = api.endpoints @@ -1776,7 +1765,7 @@ describe('hooks tests', () => { login.matchPending, login.matchFulfilled, checkSession.matchPending, - checkSession.matchFulfilled + checkSession.matchFulfilled, ) }) }) @@ -1826,14 +1815,14 @@ describe('hooks with createApi defaults set', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -1854,14 +1843,14 @@ describe('hooks with createApi defaults set', () => { render(, { wrapper: storeRef.wrapper }) // Let's make sure we actually fetch, and we increment await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -1882,14 +1871,14 @@ describe('hooks with createApi defaults set', () => { let { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -1910,10 +1899,10 @@ describe('hooks with createApi defaults set', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) }) @@ -1952,12 +1941,12 @@ describe('hooks with createApi defaults set', () => { id, name: body?.name || post.name, fetched_at: new Date().toUTCString(), - } + }, ) posts = [...newPosts] return HttpResponse.json(posts) - } + }, ), http.post>( 'https://example.com/post', @@ -1971,7 +1960,7 @@ describe('hooks with createApi defaults set', () => { id: startingId, }) return HttpResponse.json(posts) - } + }, ), ] @@ -2069,7 +2058,7 @@ describe('hooks with createApi defaults set', () => {
, - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) expect(getRenderCount()).toBe(1) @@ -2143,7 +2132,7 @@ describe('hooks with createApi defaults set', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) expect(getRenderCount()).toBe(2) @@ -2195,7 +2184,7 @@ describe('hooks with createApi defaults set', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) expect(getRenderCount()).toBe(1) @@ -2264,7 +2253,7 @@ describe('hooks with createApi defaults set', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) expect(getRenderCount()).toBe(1) @@ -2298,9 +2287,7 @@ describe('hooks with createApi defaults set', () => { return (
- {posts?.map((post) => ( -
{post.name}
- ))} + {posts?.map((post) =>
{post.name}
)}
) } @@ -2323,7 +2310,7 @@ describe('hooks with createApi defaults set', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) await waitFor(() => expect(getRenderCount()).toBe(2)) @@ -2351,7 +2338,7 @@ describe('hooks with createApi defaults set', () => {
, - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) expect(screen.getByTestId('size2').textContent).toBe('0') @@ -2425,7 +2412,7 @@ describe('hooks with createApi defaults set', () => { increment.matchFulfilled, increment.matchPending, api.internalActions.removeMutationResult.match, - increment.matchFulfilled + increment.matchFulfilled, ) }) @@ -2454,16 +2441,16 @@ describe('hooks with createApi defaults set', () => { fireEvent.click(screen.getByTestId('incrementButton')) await waitFor(() => expect(screen.getByTestId('data').textContent).toBe( - JSON.stringify({ amount: 1 }) - ) + JSON.stringify({ amount: 1 }), + ), ) expect(getRenderCount()).toBe(3) fireEvent.click(screen.getByTestId('incrementButton')) await waitFor(() => expect(screen.getByTestId('data').textContent).toBe( - JSON.stringify({ amount: 2 }) - ) + JSON.stringify({ amount: 2 }), + ), ) expect(getRenderCount()).toBe(5) }) @@ -2492,19 +2479,19 @@ describe('hooks with createApi defaults set', () => { expect(getRenderCount()).toBe(2) // will be pending, isLoading: true, await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('pending') + expect(screen.getByTestId('status').textContent).toBe('pending'), ) await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('fulfilled') + expect(screen.getByTestId('status').textContent).toBe('fulfilled'), ) expect(getRenderCount()).toBe(3) fireEvent.click(screen.getByTestId('incrementButton')) await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('pending') + expect(screen.getByTestId('status').textContent).toBe('pending'), ) await waitFor(() => - expect(screen.getByTestId('status').textContent).toBe('fulfilled') + expect(screen.getByTestId('status').textContent).toBe('fulfilled'), ) expect(getRenderCount()).toBe(5) }) @@ -2551,7 +2538,7 @@ describe('skip behaviour', () => { { wrapper: storeRef.wrapper, initialProps: [1, { skip: true }], - } + }, ) expect(result.current).toEqual(uninitialized) @@ -2584,7 +2571,7 @@ describe('skip behaviour', () => { { wrapper: storeRef.wrapper, initialProps: [skipToken], - } + }, ) expect(result.current).toEqual(uninitialized) @@ -2621,7 +2608,7 @@ describe('skip behaviour', () => { { wrapper: storeRef.wrapper, initialProps: [1], - } + }, ) await act(async () => { From 50e96401dc230c5e5d77fbb29d936975612e89ff Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:53:55 -0600 Subject: [PATCH 353/368] Remove unnecessary `if` blocks --- .../src/query/tests/createApi.test-d.ts | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test-d.ts b/packages/toolkit/src/query/tests/createApi.test-d.ts index c7df44d1fc..15efff7728 100644 --- a/packages/toolkit/src/query/tests/createApi.test-d.ts +++ b/packages/toolkit/src/query/tests/createApi.test-d.ts @@ -217,21 +217,18 @@ describe('type tests', () => { withoutTestLifecycles: true, }) - // only type-test this part - if (2 > 1) { - api1.enhanceEndpoints({ - endpoints: { - query1: { - // @ts-expect-error - providesTags: ['new'], - }, - query2: { - // @ts-expect-error - providesTags: ['missing'], - }, + api1.enhanceEndpoints({ + endpoints: { + query1: { + // @ts-expect-error + providesTags: ['new'], }, - }) - } + query2: { + // @ts-expect-error + providesTags: ['missing'], + }, + }, + }) const enhanced = api1.enhanceEndpoints({ addTagTypes: ['new'], @@ -250,21 +247,18 @@ describe('type tests', () => { storeRef.store.dispatch(api1.endpoints.query2.initiate('in2')) - // only type-test this part - if (2 > 1) { - enhanced.enhanceEndpoints({ - endpoints: { - query1: { - // returned `enhanced` api contains "new" entityType - providesTags: ['new'], - }, - query2: { - // @ts-expect-error - providesTags: ['missing'], - }, + enhanced.enhanceEndpoints({ + endpoints: { + query1: { + // returned `enhanced` api contains "new" entityType + providesTags: ['new'], }, - }) - } + query2: { + // @ts-expect-error + providesTags: ['missing'], + }, + }, + }) }) test('modify', () => { From a6a750436e8241ab7a603a3f7036664ff3792c21 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:54:39 -0600 Subject: [PATCH 354/368] Fix broken assertion --- .../toolkit/src/query/tests/createApi.test-d.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test-d.ts b/packages/toolkit/src/query/tests/createApi.test-d.ts index 15efff7728..c2f10dfffc 100644 --- a/packages/toolkit/src/query/tests/createApi.test-d.ts +++ b/packages/toolkit/src/query/tests/createApi.test-d.ts @@ -1,16 +1,16 @@ +import { setupApiStore } from '@internal/tests/utils/helpers' +import type { SerializedError } from '@reduxjs/toolkit' +import { configureStore } from '@reduxjs/toolkit' import type { DefinitionsFromApi, OverrideResultType, TagTypesFromApi, } from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { ANY, setupApiStore } from '@internal/tests/utils/helpers' -import type { SerializedError } from '@reduxjs/toolkit' -import { configureStore } from '@reduxjs/toolkit' import type { - Api, FetchBaseQueryError, MutationDefinition, QueryDefinition, + TagDescription, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' @@ -39,12 +39,9 @@ describe('type tests', () => { expectTypeOf(api.reducerPath).toEqualTypeOf<'api'>() - type TagTypes = - typeof api extends Api ? E : 'no match' - - assertType(ANY as never) - - expectTypeOf(0).not.toMatchTypeOf() + expectTypeOf(api.util.invalidateTags) + .parameter(0) + .toEqualTypeOf[]>() }) describe('endpoint definition typings', () => { From 8577395e81c394864d176b1d708426576d1ce723 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:55:30 -0600 Subject: [PATCH 355/368] Remove unnecessary `test` block --- .../toolkit/src/tests/combineSlices.test-d.ts | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/packages/toolkit/src/tests/combineSlices.test-d.ts b/packages/toolkit/src/tests/combineSlices.test-d.ts index 61be7012bb..6b773a5d54 100644 --- a/packages/toolkit/src/tests/combineSlices.test-d.ts +++ b/packages/toolkit/src/tests/combineSlices.test-d.ts @@ -1,6 +1,5 @@ import type { Reducer, Slice, WithSlice } from '@reduxjs/toolkit' -import { combineSlices, createReducer } from '@reduxjs/toolkit' -import type { CombinedState } from '@reduxjs/toolkit/query' +import { combineSlices } from '@reduxjs/toolkit' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' declare const stringSlice: Slice @@ -187,30 +186,4 @@ describe('type tests', () => { (rootState: RootState, num: number) => rootState.inner, ) }) - - test('CombinedState', () => { - const api = { - reducerPath: 'api' as const, - reducer: createReducer( - assertType>({ - queries: {}, - mutations: {}, - provided: {}, - subscriptions: {}, - config: { - reducerPath: 'api', - invalidationBehavior: 'delayed', - online: false, - focused: false, - keepUnusedDataFor: 60, - middlewareRegistered: false, - refetchOnMountOrArgChange: false, - refetchOnReconnect: false, - refetchOnFocus: false, - }, - }), - () => {}, - ), - } - }) }) From d98757ff96503177f683f1612d5f64c74108aaed Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:56:57 -0600 Subject: [PATCH 356/368] Remove IIFE's --- .../src/tests/createAsyncThunk.test-d.ts | 268 +++++++++--------- 1 file changed, 128 insertions(+), 140 deletions(-) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index bfa0b0982f..be24a31817 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -20,182 +20,170 @@ const defaultDispatch = (() => {}) as ThunkDispatch<{}, any, UnknownAction> const unknownAction = { type: 'foo' } as UnknownAction describe('type tests', () => { - test('basic usage', () => { - ;(async function () { - const asyncThunk = createAsyncThunk('test', (id: number) => - Promise.resolve(id * 2), - ) + test('basic usage', async () => { + const asyncThunk = createAsyncThunk('test', (id: number) => + Promise.resolve(id * 2), + ) - const reducer = createReducer({}, (builder) => - builder - .addCase(asyncThunk.pending, (_, action) => { - expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof asyncThunk)['pending']> - >() - }) + const reducer = createReducer({}, (builder) => + builder + .addCase(asyncThunk.pending, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType<(typeof asyncThunk)['pending']> + >() + }) - .addCase(asyncThunk.fulfilled, (_, action) => { - expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof asyncThunk)['fulfilled']> - >() + .addCase(asyncThunk.fulfilled, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType<(typeof asyncThunk)['fulfilled']> + >() - expectTypeOf(action.payload).toBeNumber() - }) + expectTypeOf(action.payload).toBeNumber() + }) - .addCase(asyncThunk.rejected, (_, action) => { - expectTypeOf(action).toEqualTypeOf< - ReturnType<(typeof asyncThunk)['rejected']> - >() + .addCase(asyncThunk.rejected, (_, action) => { + expectTypeOf(action).toEqualTypeOf< + ReturnType<(typeof asyncThunk)['rejected']> + >() - expectTypeOf(action.error).toMatchTypeOf< - Partial | undefined - >() - }), - ) + expectTypeOf(action.error).toMatchTypeOf | undefined>() + }), + ) - const promise = defaultDispatch(asyncThunk(3)) + const promise = defaultDispatch(asyncThunk(3)) - expectTypeOf(promise.requestId).toBeString() + expectTypeOf(promise.requestId).toBeString() - expectTypeOf(promise.arg).toBeNumber() + expectTypeOf(promise.arg).toBeNumber() - expectTypeOf(promise.abort).toEqualTypeOf<(reason?: string) => void>() + expectTypeOf(promise.abort).toEqualTypeOf<(reason?: string) => void>() - const result = await promise + const result = await promise - if (asyncThunk.fulfilled.match(result)) { - expectTypeOf(result).toEqualTypeOf< - ReturnType<(typeof asyncThunk)['fulfilled']> - >() - } else { - expectTypeOf(result).toEqualTypeOf< - ReturnType<(typeof asyncThunk)['rejected']> - >() - } + if (asyncThunk.fulfilled.match(result)) { + expectTypeOf(result).toEqualTypeOf< + ReturnType<(typeof asyncThunk)['fulfilled']> + >() + } else { + expectTypeOf(result).toEqualTypeOf< + ReturnType<(typeof asyncThunk)['rejected']> + >() + } - promise - .then(unwrapResult) - .then((result) => { - expectTypeOf(result).toBeNumber() + promise + .then(unwrapResult) + .then((result) => { + expectTypeOf(result).toBeNumber() - expectTypeOf(result).not.toMatchTypeOf() - }) - .catch((error) => { - // catch is always any-typed, nothing we can do here - expectTypeOf(error).toBeAny() - }) - })() + expectTypeOf(result).not.toMatchTypeOf() + }) + .catch((error) => { + // catch is always any-typed, nothing we can do here + expectTypeOf(error).toBeAny() + }) }) test('More complex usage of thunk args', () => { - ;(async function () { - interface BookModel { - id: string - title: string - } + interface BookModel { + id: string + title: string + } - type BooksState = BookModel[] - - const fakeBooks: BookModel[] = [ - { id: 'b', title: 'Second' }, - { id: 'a', title: 'First' }, - ] - - const correctDispatch = (() => {}) as ThunkDispatch< - BookModel[], - { userAPI: Function }, - UnknownAction - > - - // Verify that the the first type args to createAsyncThunk line up right - const fetchBooksTAC = createAsyncThunk< - BookModel[], - number, - { - state: BooksState - extra: { userAPI: Function } - } - >( - 'books/fetch', - async (arg, { getState, dispatch, extra, requestId, signal }) => { - const state = getState() + type BooksState = BookModel[] - expectTypeOf(arg).toBeNumber() + const fakeBooks: BookModel[] = [ + { id: 'b', title: 'Second' }, + { id: 'a', title: 'First' }, + ] - expectTypeOf(state).toEqualTypeOf() + const correctDispatch = (() => {}) as ThunkDispatch< + BookModel[], + { userAPI: Function }, + UnknownAction + > - expectTypeOf(extra).toEqualTypeOf<{ userAPI: Function }>() + // Verify that the the first type args to createAsyncThunk line up right + const fetchBooksTAC = createAsyncThunk< + BookModel[], + number, + { + state: BooksState + extra: { userAPI: Function } + } + >( + 'books/fetch', + async (arg, { getState, dispatch, extra, requestId, signal }) => { + const state = getState() - return fakeBooks - }, - ) + expectTypeOf(arg).toBeNumber() - correctDispatch(fetchBooksTAC(1)) - // @ts-expect-error - defaultDispatch(fetchBooksTAC(1)) - })() - }) + expectTypeOf(state).toEqualTypeOf() - test('returning a rejected action from the promise creator is possible', () => { - ;(async () => { - type ReturnValue = { data: 'success' } - type RejectValue = { data: 'error' } + expectTypeOf(extra).toEqualTypeOf<{ userAPI: Function }>() - const fetchBooksTAC = createAsyncThunk< - ReturnValue, - number, - { - rejectValue: RejectValue - } - >('books/fetch', async (arg, { rejectWithValue }) => { - return rejectWithValue({ data: 'error' }) - }) + return fakeBooks + }, + ) - const returned = await defaultDispatch(fetchBooksTAC(1)) - if (fetchBooksTAC.rejected.match(returned)) { - expectTypeOf(returned.payload).toEqualTypeOf() + correctDispatch(fetchBooksTAC(1)) + // @ts-expect-error + defaultDispatch(fetchBooksTAC(1)) + }) - expectTypeOf(returned.payload).toBeNullable() - } else { - expectTypeOf(returned.payload).toEqualTypeOf() + test('returning a rejected action from the promise creator is possible', async () => { + type ReturnValue = { data: 'success' } + type RejectValue = { data: 'error' } + + const fetchBooksTAC = createAsyncThunk< + ReturnValue, + number, + { + rejectValue: RejectValue } + >('books/fetch', async (arg, { rejectWithValue }) => { + return rejectWithValue({ data: 'error' }) + }) - expectTypeOf(unwrapResult(returned)).toEqualTypeOf() + const returned = await defaultDispatch(fetchBooksTAC(1)) + if (fetchBooksTAC.rejected.match(returned)) { + expectTypeOf(returned.payload).toEqualTypeOf() - expectTypeOf(unwrapResult(returned)).not.toMatchTypeOf() - })() + expectTypeOf(returned.payload).toBeNullable() + } else { + expectTypeOf(returned.payload).toEqualTypeOf() + } + + expectTypeOf(unwrapResult(returned)).toEqualTypeOf() + + expectTypeOf(unwrapResult(returned)).not.toMatchTypeOf() }) test('regression #1156: union return values fall back to allowing only single member', () => { - ;(async () => { - const fn = createAsyncThunk('session/isAdmin', async () => { - const response: boolean = false - return response - }) - })() + const fn = createAsyncThunk('session/isAdmin', async () => { + const response: boolean = false + return response + }) }) test('Should handle reject with value within a try catch block. Note: this is a sample code taken from #1605', () => { - ;(async () => { - type ResultType = { - text: string + type ResultType = { + text: string + } + const demoPromise = async (): Promise => + new Promise((resolve, _) => resolve({ text: '' })) + const thunk = createAsyncThunk('thunk', async (args, thunkAPI) => { + try { + const result = await demoPromise() + return result + } catch (error) { + return thunkAPI.rejectWithValue(error) } - const demoPromise = async (): Promise => - new Promise((resolve, _) => resolve({ text: '' })) - const thunk = createAsyncThunk('thunk', async (args, thunkAPI) => { - try { - const result = await demoPromise() - return result - } catch (error) { - return thunkAPI.rejectWithValue(error) - } - }) - createReducer({}, (builder) => - builder.addCase(thunk.fulfilled, (s, action) => { - expectTypeOf(action.payload).toEqualTypeOf() - }), - ) - })() + }) + createReducer({}, (builder) => + builder.addCase(thunk.fulfilled, (s, action) => { + expectTypeOf(action.payload).toEqualTypeOf() + }), + ) }) test('reject with value', () => { From 8bba2ee0ed234c8b771ffe00bacae2f0666cd002 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:57:38 -0600 Subject: [PATCH 357/368] Replace `parameters.items` with `parameter(0)` --- packages/toolkit/src/tests/createAsyncThunk.test-d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts index be24a31817..7f961666e9 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test-d.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test-d.ts @@ -351,7 +351,7 @@ describe('type tests', () => { test('one argument, specified as any: asyncThunk has required any argument', () => { const asyncThunk = createAsyncThunk('test', (arg: any) => 0) - expectTypeOf(asyncThunk).parameters.items.toBeAny() + expectTypeOf(asyncThunk).parameter(0).toBeAny() expectTypeOf(asyncThunk).toBeCallableWith(5) From 8b331bae84a5e939f384d9f47dda4a0a8207925e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:58:04 -0600 Subject: [PATCH 358/368] Fix type annotation --- packages/toolkit/src/tests/createEntityAdapter.test-d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts index 255496f3a6..0e8a4c54f4 100644 --- a/packages/toolkit/src/tests/createEntityAdapter.test-d.ts +++ b/packages/toolkit/src/tests/createEntityAdapter.test-d.ts @@ -10,7 +10,7 @@ import { createEntityAdapter, createSlice } from '@reduxjs/toolkit' function extractReducers( adapter: EntityAdapter, -): Omit, 'map'> { +): EntityStateAdapter { const { selectId, sortComparer, getInitialState, getSelectors, ...rest } = adapter return rest From 38eff96a941580822885edc8665f023729f1ec6f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:58:55 -0600 Subject: [PATCH 359/368] Replace `@ts-expect-error`s with `expectTypeOf` assertions --- .../toolkit/src/tests/mapBuilders.test-d.ts | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/toolkit/src/tests/mapBuilders.test-d.ts b/packages/toolkit/src/tests/mapBuilders.test-d.ts index d7377f42ad..63aece1c18 100644 --- a/packages/toolkit/src/tests/mapBuilders.test-d.ts +++ b/packages/toolkit/src/tests/mapBuilders.test-d.ts @@ -7,6 +7,7 @@ import { createAction } from '@reduxjs/toolkit' describe('type tests', () => { test('builder callback for actionMap', () => { const increment = createAction('increment') + const decrement = createAction('decrement') executeReducerBuilderCallback((builder) => { @@ -51,6 +52,7 @@ describe('type tests', () => { increment, (state, action: ReturnType) => state, ) + // @ts-expect-error builder.addCase( increment, @@ -61,6 +63,7 @@ describe('type tests', () => { 'increment', (state, action: ReturnType) => state, ) + // @ts-expect-error builder.addCase( 'decrement', @@ -127,20 +130,22 @@ describe('type tests', () => { test('addMatcher() should prevent further calls to addCase()', () => { const b = builder.addMatcher(increment.match, () => {}) - // @ts-expect-error - b.addCase(increment, () => {}) - b.addMatcher(increment.match, () => {}) - b.addDefaultCase(() => {}) + + expectTypeOf(b).not.toHaveProperty('addCase') + + expectTypeOf(b.addMatcher).toBeCallableWith(increment.match, () => {}) + + expectTypeOf(b.addDefaultCase).toBeCallableWith(() => {}) }) test('addDefaultCase() should prevent further calls to addCase(), addMatcher() and addDefaultCase', () => { const b = builder.addDefaultCase(() => {}) - // @ts-expect-error - b.addCase(increment, () => {}) - // @ts-expect-error - b.addMatcher(increment.match, () => {}) - // @ts-expect-error - b.addDefaultCase(() => {}) + + expectTypeOf(b).not.toHaveProperty('addCase') + + expectTypeOf(b).not.toHaveProperty('addMatcher') + + expectTypeOf(b).not.toHaveProperty('addDefaultCase') }) describe('`createAsyncThunk` actions work with `mapBuilder`', () => { From a5781ee5b6ba1bce188ce987cd8194f3f274f6c0 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 21:59:36 -0600 Subject: [PATCH 360/368] Remove redundant assertion --- packages/toolkit/src/tests/createSlice.test-d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/toolkit/src/tests/createSlice.test-d.ts b/packages/toolkit/src/tests/createSlice.test-d.ts index 2cf5801eee..d76d8fa5ee 100644 --- a/packages/toolkit/src/tests/createSlice.test-d.ts +++ b/packages/toolkit/src/tests/createSlice.test-d.ts @@ -87,8 +87,6 @@ describe('type tests', () => { expectTypeOf(slice.reducer).not.toMatchTypeOf< Reducer >() - - expectTypeOf().not.toMatchTypeOf>() }) test('Actions', () => { @@ -161,7 +159,7 @@ describe('type tests', () => { >() }) - test('Slice action creator types properties are "string"', () => { + test('Slice action creator types properties are strongly typed', () => { const counter = createSlice({ name: 'counter', initialState: 0, From 3c2afe00cb9156cceb76f749e1517f339f04bf9b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 23:03:39 -0600 Subject: [PATCH 361/368] Convert some expressions and statements to type test assertions in `configureStore.test-d.ts` --- .../src/tests/configureStore.test-d.ts | 126 +++++++++++------- 1 file changed, 77 insertions(+), 49 deletions(-) diff --git a/packages/toolkit/src/tests/configureStore.test-d.ts b/packages/toolkit/src/tests/configureStore.test-d.ts index 87866a97be..2bf27f4bdc 100644 --- a/packages/toolkit/src/tests/configureStore.test-d.ts +++ b/packages/toolkit/src/tests/configureStore.test-d.ts @@ -288,8 +288,9 @@ describe('type tests', () => { }, }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 + expectTypeOf(store.getState().counter1).toBeNumber() + + expectTypeOf(store.getState().counter2).toBeNumber() }) test('empty preloaded state', () => { @@ -301,8 +302,9 @@ describe('type tests', () => { preloadedState: {}, }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 + expectTypeOf(store.getState().counter1).toBeNumber() + + expectTypeOf(store.getState().counter2).toBeNumber() }) test('excess properties in preloaded state', () => { @@ -318,8 +320,9 @@ describe('type tests', () => { }, }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 + expectTypeOf(store.getState().counter1).toBeNumber() + + expectTypeOf(store.getState().counter2).toBeNumber() }) test('mismatching properties in preloaded state', () => { @@ -334,8 +337,9 @@ describe('type tests', () => { }, }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 + expectTypeOf(store.getState().counter1).toBeNumber() + + expectTypeOf(store.getState().counter2).toBeNumber() }) test('string preloaded state when expecting object', () => { @@ -348,8 +352,9 @@ describe('type tests', () => { preloadedState: 'test', }) - const counter1: number = store.getState().counter1 - const counter2: number = store.getState().counter2 + expectTypeOf(store.getState().counter1).toBeNumber() + + expectTypeOf(store.getState().counter2).toBeNumber() }) test('nested combineReducers allows partial', () => { @@ -371,10 +376,13 @@ describe('type tests', () => { }, }) - const group1counter1: number = store.getState().group1.counter1 - const group1counter2: number = store.getState().group1.counter2 - const group2counter1: number = store.getState().group2.counter1 - const group2counter2: number = store.getState().group2.counter2 + expectTypeOf(store.getState().group1.counter1).toBeNumber() + + expectTypeOf(store.getState().group1.counter2).toBeNumber() + + expectTypeOf(store.getState().group2.counter1).toBeNumber() + + expectTypeOf(store.getState().group2.counter2).toBeNumber() }) test('non-nested combineReducers does not allow partial', () => { @@ -401,10 +409,13 @@ describe('type tests', () => { }, }) - const group1counter1: number = store.getState().group1.counter1 - const group1counter2: number = store.getState().group1.counter2 - const group2counter1: number = store.getState().group2.counter1 - const group2counter2: number = store.getState().group2.counter2 + expectTypeOf(store.getState().group1.counter1).toBeNumber() + + expectTypeOf(store.getState().group1.counter2).toBeNumber() + + expectTypeOf(store.getState().group2.counter1).toBeNumber() + + expectTypeOf(store.getState().group2.counter2).toBeNumber() }) }) @@ -416,7 +427,7 @@ describe('type tests', () => { } type StateB = string - function thunkB() { + const thunkB = () => { return (dispatch: Dispatch, getState: () => StateB) => {} } @@ -518,9 +529,10 @@ describe('type tests', () => { middleware: () => new Tuple(0 as unknown as Middleware<(a: StateA) => boolean, StateA>), }) - const result: boolean = store.dispatch(5) - // @ts-expect-error - const result2: string = store.dispatch(5) + + expectTypeOf(store.dispatch(5)).toBeBoolean() + + expectTypeOf(store.dispatch(5)).not.toBeString() }) test('multiple custom middleware', () => { @@ -531,14 +543,17 @@ describe('type tests', () => { ThunkMiddleware, ] > + const store = configureStore({ reducer: reducerA, middleware: () => middleware, }) - const result: 'A' = store.dispatch('a') - const result2: 'B' = store.dispatch('b') - const result3: Promise<'A'> = store.dispatch(thunkA()) + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch('b')).toEqualTypeOf<'B'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() }) test('Accepts thunk with `unknown`, `undefined` or `null` ThunkAction extraArgument per default', () => { @@ -587,10 +602,11 @@ describe('type tests', () => { >), }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('custom middleware and getDefaultMiddleware, using prepend', () => { @@ -611,10 +627,12 @@ describe('type tests', () => { return concatenated }, }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) + + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('custom middleware and getDefaultMiddleware, using concat', () => { @@ -635,10 +653,12 @@ describe('type tests', () => { return concatenated }, }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) + + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('middlewareBuilder notation, getDefaultMiddleware (unconfigured)', () => { @@ -650,17 +670,21 @@ describe('type tests', () => { StateA >), }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - // @ts-expect-error - store.dispatch(thunkB()) + + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('middlewareBuilder notation, getDefaultMiddleware, concat & prepend', () => { const otherMiddleware: Middleware<(a: 'a') => 'A', StateA> = _anyMiddleware + const otherMiddleware2: Middleware<(a: 'b') => 'B', StateA> = _anyMiddleware + const store = configureStore({ reducer: reducerA, middleware: (getDefaultMiddleware) => @@ -668,11 +692,14 @@ describe('type tests', () => { .concat(otherMiddleware) .prepend(otherMiddleware2), }) - const result1: 'A' = store.dispatch('a') - const result2: Promise<'A'> = store.dispatch(thunkA()) - const result3: 'B' = store.dispatch('b') - // @ts-expect-error - store.dispatch(thunkB()) + + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch(thunkA())).toEqualTypeOf>() + + expectTypeOf(store.dispatch('b')).toEqualTypeOf<'B'>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkB()) }) test('middlewareBuilder notation, getDefaultMiddleware (thunk: false)', () => { @@ -683,9 +710,10 @@ describe('type tests', () => { (() => {}) as any as Middleware<(a: 'a') => 'A', StateA>, ), }) - const result1: 'A' = store.dispatch('a') - // @ts-expect-error - store.dispatch(thunkA()) + + expectTypeOf(store.dispatch('a')).toEqualTypeOf<'A'>() + + expectTypeOf(store.dispatch).parameter(0).not.toMatchTypeOf(thunkA()) }) test("badly typed middleware won't make `dispatch` `any`", () => { From 5ecd98472bb3a25d0f9272711b7c7b22deb1e7be Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sun, 28 Jan 2024 23:04:32 -0600 Subject: [PATCH 362/368] Add `tsconfig.vitest-temp.json` to `.gitignore` --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e8e2cc51d3..a8309316f0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ typesversions !.yarn/versions .pnp.* *.tgz + +tsconfig.vitest-temp.json \ No newline at end of file From 8e7fa672d7b96570115357d561c1501ede7b4de9 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 29 Jan 2024 05:27:07 -0600 Subject: [PATCH 363/368] Export types related to overriding the result types --- packages/toolkit/src/query/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/toolkit/src/query/index.ts b/packages/toolkit/src/query/index.ts index b509bac8f0..2c4f11e0a9 100644 --- a/packages/toolkit/src/query/index.ts +++ b/packages/toolkit/src/query/index.ts @@ -28,6 +28,9 @@ export type { QueryArgFrom, ResultTypeFrom, DefinitionType, + DefinitionsFromApi, + OverrideResultType, + TagTypesFromApi, } from './endpointDefinitions' export { fetchBaseQuery } from './fetchBaseQuery' export type { From 3418c5a1e8f678376ed49f10c511d052ac50400b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 29 Jan 2024 05:38:58 -0600 Subject: [PATCH 364/368] Fix `OverrideResultType` imports in test files --- .../src/query/tests/createApi.test-d.ts | 6 ++---- .../toolkit/src/query/tests/createApi.test.ts | 21 ++++++++----------- .../src/query/tests/invalidation.test.tsx | 14 ++++++------- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/packages/toolkit/src/query/tests/createApi.test-d.ts b/packages/toolkit/src/query/tests/createApi.test-d.ts index c2f10dfffc..b33ced1f6e 100644 --- a/packages/toolkit/src/query/tests/createApi.test-d.ts +++ b/packages/toolkit/src/query/tests/createApi.test-d.ts @@ -3,14 +3,12 @@ import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import type { DefinitionsFromApi, - OverrideResultType, - TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import type { FetchBaseQueryError, MutationDefinition, + OverrideResultType, QueryDefinition, TagDescription, + TagTypesFromApi, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' diff --git a/packages/toolkit/src/query/tests/createApi.test.ts b/packages/toolkit/src/query/tests/createApi.test.ts index 80ea78fe1b..e1c3fad253 100644 --- a/packages/toolkit/src/query/tests/createApi.test.ts +++ b/packages/toolkit/src/query/tests/createApi.test.ts @@ -1,23 +1,20 @@ +import { server } from '@internal/query/tests/mocks/server' +import { + getSerializedHeaders, + setupApiStore, +} from '@internal/tests/utils/helpers' import { configureStore, createAction, createReducer } from '@reduxjs/toolkit' import type { + DefinitionsFromApi, FetchBaseQueryMeta, + OverrideResultType, SerializeQueryArgs, + TagTypesFromApi, } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { MockInstance } from 'vitest' - -import type { - DefinitionsFromApi, - OverrideResultType, - TagTypesFromApi, -} from '@reduxjs/toolkit/dist/query/endpointDefinitions' -import { server } from '@internal/query/tests/mocks/server' -import { - getSerializedHeaders, - setupApiStore, -} from '@internal/tests/utils/helpers' import { HttpResponse, delay, http } from 'msw' import nodeFetch from 'node-fetch' +import type { MockInstance } from 'vitest' beforeAll(() => { vi.stubEnv('NODE_ENV', 'development') diff --git a/packages/toolkit/src/query/tests/invalidation.test.tsx b/packages/toolkit/src/query/tests/invalidation.test.tsx index 1b3ad924b9..773b7cc0a6 100644 --- a/packages/toolkit/src/query/tests/invalidation.test.tsx +++ b/packages/toolkit/src/query/tests/invalidation.test.tsx @@ -1,4 +1,4 @@ -import type { TagDescription } from '@reduxjs/toolkit/dist/query/endpointDefinitions' +import type { TagDescription } from '@reduxjs/toolkit/query' import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query' import { waitFor } from '@testing-library/react' import { delay } from 'msw' @@ -13,7 +13,7 @@ const tagTypes = [ 'dog', 'giraffe', ] as const -type TagTypes = typeof tagTypes[number] +type TagTypes = (typeof tagTypes)[number] type Tags = TagDescription[] /** providesTags, invalidatesTags, shouldInvalidate */ @@ -103,7 +103,7 @@ test.each(caseMatrix)( }), }), undefined, - { withoutTestLifecycles: true } + { withoutTestLifecycles: true }, ) store.dispatch(providing.initiate()) @@ -111,15 +111,15 @@ test.each(caseMatrix)( expect(queryCount).toBe(1) await waitFor(() => { expect(api.endpoints.providing.select()(store.getState()).status).toBe( - 'fulfilled' + 'fulfilled', ) expect(api.endpoints.unrelated.select()(store.getState()).status).toBe( - 'fulfilled' + 'fulfilled', ) }) const toInvalidate = api.util.selectInvalidatedBy( store.getState(), - invalidatesTags + invalidatesTags, ) if (shouldInvalidate) { @@ -138,5 +138,5 @@ test.each(caseMatrix)( expect(queryCount).toBe(1) await delay(2) expect(queryCount).toBe(shouldInvalidate ? 2 : 1) - } + }, ) From 77511c32b3dab0a8ceb223e899e42182f64106da Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 29 Jan 2024 06:18:35 -0600 Subject: [PATCH 365/368] Replace `dist` imports with `@internal` imports --- .../src/query/tests/buildHooks.test.tsx | 4 +- .../toolkit/src/query/tests/queryFn.test.tsx | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/toolkit/src/query/tests/buildHooks.test.tsx b/packages/toolkit/src/query/tests/buildHooks.test.tsx index bee8401b0d..868cd6647a 100644 --- a/packages/toolkit/src/query/tests/buildHooks.test.tsx +++ b/packages/toolkit/src/query/tests/buildHooks.test.tsx @@ -1,4 +1,6 @@ +import type { SubscriptionOptions } from '@internal/query/core/apiState' import type { SubscriptionSelectors } from '@internal/query/core/buildMiddleware/types' +import { server } from '@internal/query/tests/mocks/server' import { countObjectKeys } from '@internal/query/utils/countObjectKeys' import { actionsReducer, @@ -13,7 +15,6 @@ import { createListenerMiddleware, createSlice, } from '@reduxjs/toolkit' -import type { SubscriptionOptions } from '@reduxjs/toolkit/dist/query/core/apiState' import { QueryStatus, createApi, @@ -32,7 +33,6 @@ import userEvent from '@testing-library/user-event' import { HttpResponse, http } from 'msw' import { useEffect, useState } from 'react' import type { MockInstance } from 'vitest' -import { server } from './mocks/server' // Just setup a temporary in-memory counter for tests that `getIncrementedAmount`. // This can be used to test how many renders happen due to data changes or diff --git a/packages/toolkit/src/query/tests/queryFn.test.tsx b/packages/toolkit/src/query/tests/queryFn.test.tsx index 0114f7cff2..4b292f9983 100644 --- a/packages/toolkit/src/query/tests/queryFn.test.tsx +++ b/packages/toolkit/src/query/tests/queryFn.test.tsx @@ -1,18 +1,18 @@ +import type { QuerySubState } from '@internal/query/core/apiState' +import type { Post } from '@internal/query/tests/mocks/handlers' +import { posts } from '@internal/query/tests/mocks/handlers' +import { actionsReducer, setupApiStore } from '@internal/tests/utils/helpers' import type { SerializedError } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import type { BaseQueryFn, FetchBaseQueryError } from '@reduxjs/toolkit/query' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' -import type { Post } from './mocks/handlers' -import { posts } from './mocks/handlers' -import { actionsReducer, setupApiStore } from '../../tests/utils/helpers' -import type { QuerySubState } from '@reduxjs/toolkit/dist/query/core/apiState' describe('queryFn base implementation tests', () => { const baseQuery: BaseQueryFn = vi.fn((arg: string) => arg.includes('withErrorQuery') ? { error: `cut${arg}` } - : { data: { wrappedByBaseQuery: arg } } + : { data: { wrappedByBaseQuery: arg } }, ) const api = createApi({ @@ -193,19 +193,19 @@ describe('queryFn base implementation tests', () => { endpointName.includes('Throw') ? `An unhandled error occurred processing a request for the endpoint "${endpointName}". In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: resultFrom(${endpointName})]` - : '' + : '', ) if (expectedResult === 'data') { expect(result).toEqual( expect.objectContaining({ data: `resultFrom(${endpointName})`, - }) + }), ) } else if (expectedResult === 'error') { expect(result).toEqual( expect.objectContaining({ error: `resultFrom(${endpointName})`, - }) + }), ) } else { expect(result).toEqual( @@ -213,7 +213,7 @@ describe('queryFn base implementation tests', () => { error: expect.objectContaining({ message: `resultFrom(${endpointName})`, }), - }) + }), ) } }) @@ -241,20 +241,20 @@ describe('queryFn base implementation tests', () => { endpointName.includes('Throw') ? `An unhandled error occurred processing a request for the endpoint "${endpointName}". In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: resultFrom(${endpointName})]` - : '' + : '', ) if (expectedResult === 'data') { expect(result).toEqual( expect.objectContaining({ data: `resultFrom(${endpointName})`, - }) + }), ) } else if (expectedResult === 'error') { expect(result).toEqual( expect.objectContaining({ error: `resultFrom(${endpointName})`, - }) + }), ) } else { expect(result).toEqual( @@ -262,7 +262,7 @@ describe('queryFn base implementation tests', () => { error: expect.objectContaining({ message: `resultFrom(${endpointName})`, }), - }) + }), ) } }) @@ -275,12 +275,12 @@ describe('queryFn base implementation tests', () => { result = await store.dispatch(thunk) }).toHaveConsoleOutput( `An unhandled error occurred processing a request for the endpoint "withNeither". - In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]` + In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]`, ) expect(result!.error).toEqual( expect.objectContaining({ message: 'endpointDefinition.queryFn is not a function', - }) + }), ) } { @@ -293,12 +293,12 @@ describe('queryFn base implementation tests', () => { result = await store.dispatch(thunk) }).toHaveConsoleOutput( `An unhandled error occurred processing a request for the endpoint "mutationWithNeither". - In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]` + In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]`, ) expect((result as any).error).toEqual( expect.objectContaining({ message: 'endpointDefinition.queryFn is not a function', - }) + }), ) } }) @@ -372,14 +372,14 @@ describe('usage scenario tests', () => { it('can chain multiple queries together', async () => { const result = await storeRef.store.dispatch( - api.endpoints.getRandomUser.initiate() + api.endpoints.getRandomUser.initiate(), ) expect(result.data).toEqual(posts[1]) }) it('can wrap a service like Firebase', async () => { const result = await storeRef.store.dispatch( - api.endpoints.getFirebaseUser.initiate(1) + api.endpoints.getFirebaseUser.initiate(1), ) expect(result.data).toEqual(mockData) }) @@ -388,7 +388,7 @@ describe('usage scenario tests', () => { let result: QuerySubState await expect(async () => { result = await storeRef.store.dispatch( - api.endpoints.getMissingFirebaseUser.initiate(1) + api.endpoints.getMissingFirebaseUser.initiate(1), ) }) .toHaveConsoleOutput(`An unhandled error occurred processing a request for the endpoint "getMissingFirebaseUser". @@ -399,7 +399,7 @@ describe('usage scenario tests', () => { expect.objectContaining({ message: 'Missing user', name: 'Error', - }) + }), ) }) }) From 770a39476a428ccc062ec47bda7a1e61d8d8bf1b Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 29 Jan 2024 07:12:10 -0600 Subject: [PATCH 366/368] Format all files --- packages/toolkit/.size-limit.js | 22 +-- packages/toolkit/etc/redux-toolkit.api.md | 181 +++++++++--------- packages/toolkit/etc/rtk-query-react.api.md | 40 ++-- packages/toolkit/etc/rtk-query.api.md | 40 ++-- packages/toolkit/scripts/mangleErrors.cjs | 18 +- .../src/actionCreatorInvariantMiddleware.ts | 2 +- packages/toolkit/src/autoBatchEnhancer.ts | 8 +- packages/toolkit/src/combineSlices.ts | 56 +++--- packages/toolkit/src/configureStore.ts | 16 +- packages/toolkit/src/createAction.ts | 55 +++--- packages/toolkit/src/createAsyncThunk.ts | 110 ++++++----- .../toolkit/src/createDraftSafeSelector.ts | 2 +- packages/toolkit/src/createReducer.ts | 8 +- packages/toolkit/src/createSlice.ts | 179 +++++++++-------- .../toolkit/src/dynamicMiddleware/index.ts | 16 +- .../src/dynamicMiddleware/react/index.ts | 20 +- .../dynamicMiddleware/tests/index.test-d.ts | 14 +- .../src/dynamicMiddleware/tests/index.test.ts | 4 +- .../dynamicMiddleware/tests/react.test-d.ts | 8 +- .../dynamicMiddleware/tests/react.test.tsx | 6 +- .../toolkit/src/dynamicMiddleware/types.ts | 12 +- .../toolkit/src/entities/create_adapter.ts | 2 +- packages/toolkit/src/entities/entity_state.ts | 2 +- packages/toolkit/src/entities/models.ts | 58 +++--- .../src/entities/sorted_state_adapter.ts | 24 +-- .../toolkit/src/entities/state_adapter.ts | 20 +- .../toolkit/src/entities/state_selectors.ts | 16 +- .../tests/entity_slice_enhancer.test.ts | 34 ++-- .../tests/sorted_state_adapter.test.ts | 2 +- .../entities/tests/state_selectors.test.ts | 2 +- .../src/entities/unsorted_state_adapter.ts | 34 ++-- packages/toolkit/src/entities/utils.ts | 15 +- packages/toolkit/src/getDefaultEnhancers.ts | 8 +- packages/toolkit/src/getDefaultMiddleware.ts | 16 +- .../src/immutableStateInvariantMiddleware.ts | 24 +-- packages/toolkit/src/index.ts | 5 +- .../toolkit/src/listenerMiddleware/index.ts | 163 ++++++++-------- .../toolkit/src/listenerMiddleware/task.ts | 6 +- .../src/listenerMiddleware/tests/fork.test.ts | 16 +- .../tests/listenerMiddleware.test.ts | 56 +++--- .../listenerMiddleware.withTypes.test-d.ts | 6 +- .../listenerMiddleware.withTypes.test.ts | 8 +- .../listenerMiddleware/tests/useCases.test.ts | 2 +- .../toolkit/src/listenerMiddleware/types.ts | 88 +++++---- .../toolkit/src/listenerMiddleware/utils.ts | 10 +- packages/toolkit/src/mapBuilders.ts | 24 +-- packages/toolkit/src/matchers.ts | 60 +++--- packages/toolkit/src/query/HandledError.ts | 2 +- packages/toolkit/src/query/apiTypes.ts | 16 +- packages/toolkit/src/query/baseQueryTypes.ts | 19 +- packages/toolkit/src/query/core/apiState.ts | 4 +- .../toolkit/src/query/core/buildInitiate.ts | 54 +++--- .../core/buildMiddleware/batchActions.ts | 14 +- .../core/buildMiddleware/cacheCollection.ts | 12 +- .../core/buildMiddleware/cacheLifecycle.ts | 34 ++-- .../src/query/core/buildMiddleware/index.ts | 4 +- .../buildMiddleware/invalidationByTags.ts | 31 +-- .../src/query/core/buildMiddleware/polling.ts | 6 +- .../core/buildMiddleware/queryLifecycle.ts | 20 +- .../src/query/core/buildMiddleware/types.ts | 18 +- .../buildMiddleware/windowEventHandling.ts | 8 +- .../toolkit/src/query/core/buildSelectors.ts | 38 ++-- packages/toolkit/src/query/core/buildSlice.ts | 42 ++-- .../toolkit/src/query/core/buildThunks.ts | 122 ++++++------ packages/toolkit/src/query/core/module.ts | 28 +-- .../toolkit/src/query/core/setupListeners.ts | 6 +- packages/toolkit/src/query/createApi.ts | 30 +-- .../src/query/defaultSerializeQueryArgs.ts | 2 +- .../toolkit/src/query/endpointDefinitions.ts | 129 ++++++------- packages/toolkit/src/query/fakeBaseQuery.ts | 2 +- packages/toolkit/src/query/fetchBaseQuery.ts | 12 +- .../toolkit/src/query/react/ApiProvider.tsx | 6 +- .../toolkit/src/query/react/buildHooks.ts | 126 ++++++------ packages/toolkit/src/query/react/index.ts | 2 +- packages/toolkit/src/query/react/module.ts | 16 +- .../query/react/useSerializedStableValue.ts | 4 +- packages/toolkit/src/query/retry.ts | 4 +- .../src/query/tests/apiProvider.test.tsx | 14 +- .../src/query/tests/buildCreateApi.test.tsx | 12 +- .../src/query/tests/buildInitiate.test.tsx | 24 +-- .../src/query/tests/buildMiddleware.test.tsx | 4 +- .../src/query/tests/buildSlice.test.ts | 10 +- .../src/query/tests/buildThunks.test.tsx | 8 +- .../src/query/tests/cacheCollection.test.ts | 12 +- .../toolkit/src/query/tests/cleanup.test.tsx | 10 +- .../tests/defaultSerializeQueryArgs.test.ts | 12 +- .../src/query/tests/devWarnings.test.tsx | 18 +- .../src/query/tests/errorHandling.test.tsx | 116 +++++------ .../src/query/tests/fakeBaseQuery.test.tsx | 2 +- .../src/query/tests/fetchBaseQuery.test.tsx | 132 ++++++------- .../toolkit/src/query/tests/mocks/handlers.ts | 22 +-- .../query/tests/optimisticUpdates.test.tsx | 34 ++-- .../query/tests/optimisticUpserts.test.tsx | 48 ++--- .../toolkit/src/query/tests/polling.test.tsx | 26 +-- .../query/tests/refetchingBehaviors.test.tsx | 88 ++++----- .../toolkit/src/query/tests/retry.test.ts | 2 +- .../tests/useMutation-fixedCacheKey.test.tsx | 24 +-- .../toolkit/src/query/tests/utils.test.ts | 16 +- packages/toolkit/src/query/tsHelpers.ts | 5 +- packages/toolkit/src/query/utils/isOnline.ts | 4 +- packages/toolkit/src/query/utils/joinUrls.ts | 2 +- .../serializableStateInvariantMiddleware.ts | 16 +- .../actionCreatorInvariantMiddleware.test.ts | 6 +- .../toolkit/src/tests/combinedTest.test.ts | 2 +- .../toolkit/src/tests/configureStore.test.ts | 52 ++--- .../toolkit/src/tests/createAction.test.ts | 2 +- .../src/tests/createAsyncThunk.test.ts | 78 ++++---- .../src/tests/createDraftSafeSelector.test.ts | 2 +- .../createDraftSafeSelector.withTypes.test.ts | 4 +- .../toolkit/src/tests/createReducer.test.ts | 112 +++++------ .../toolkit/src/tests/createSlice.test.ts | 97 +++++----- .../immutableStateInvariantMiddleware.test.ts | 2 +- packages/toolkit/src/tests/matchers.test-d.ts | 10 +- packages/toolkit/src/tests/matchers.test.ts | 36 ++-- ...rializableStateInvariantMiddleware.test.ts | 14 +- .../src/tests/utils/CustomMatchers.d.ts | 6 +- packages/toolkit/src/tests/utils/helpers.tsx | 6 +- packages/toolkit/src/tsHelpers.ts | 78 ++++---- packages/toolkit/src/utils.ts | 16 +- packages/toolkit/tsconfig.json | 4 +- packages/toolkit/tsup.config.ts | 6 +- 121 files changed, 1778 insertions(+), 1745 deletions(-) diff --git a/packages/toolkit/.size-limit.js b/packages/toolkit/.size-limit.js index 70f8386b54..f53d057bea 100644 --- a/packages/toolkit/.size-limit.js +++ b/packages/toolkit/.size-limit.js @@ -8,15 +8,15 @@ function withRtkPath(suffix) { config.plugins.push( new webpack.NormalModuleReplacementPlugin( /@reduxjs\/toolkit\/query\/react/, - join(__dirname, `query/react`) + join(__dirname, `query/react`), ), new webpack.NormalModuleReplacementPlugin( /@reduxjs\/toolkit\/query/, - join(__dirname, `query`) + join(__dirname, `query`), ), new webpack.NormalModuleReplacementPlugin( /@reduxjs\/toolkit/, - join(__dirname) + join(__dirname), ), new webpack.NormalModuleReplacementPlugin( /rtk-query-react.modern.js/, @@ -24,16 +24,16 @@ function withRtkPath(suffix) { const old = r.request r.request = r.request.replace( /rtk-query-react.modern.js$/, - `rtk-query-react.${suffix}` + `rtk-query-react.${suffix}`, ) // console.log(old, '=>', r.request) - } + }, ), new webpack.NormalModuleReplacementPlugin(/rtk-query.modern.js/, (r) => { const old = r.request r.request = r.request.replace( /rtk-query.modern.js$/, - `rtk-query.${suffix}` + `rtk-query.${suffix}`, ) // console.log(old, '=>', r.request) }), @@ -43,11 +43,11 @@ function withRtkPath(suffix) { const old = r.request r.request = r.request.replace( /redux-toolkit.modern.js$/, - `redux-toolkit.${suffix}` + `redux-toolkit.${suffix}`, ) // console.log(old, '=>', r.request) - } - ) + }, + ), ) if (suffix === 'cjs.production.min.js') { config.resolve.mainFields = ['main', 'module'] @@ -100,7 +100,7 @@ module.exports = [ ...e, name: e.name + ` (${suffix})`, modifyWebpackConfig: withRtkPath(suffix), - })) + })), ) .concat( ...[ @@ -140,5 +140,5 @@ module.exports = [ ...e, name: e.name + ` (esm.js)`, modifyWebpackConfig: withRtkPath('esm.js'), - })) + })), ) diff --git a/packages/toolkit/etc/redux-toolkit.api.md b/packages/toolkit/etc/redux-toolkit.api.md index 8628682b33..dcfe7462b0 100644 --- a/packages/toolkit/etc/redux-toolkit.api.md +++ b/packages/toolkit/etc/redux-toolkit.api.md @@ -31,7 +31,7 @@ import type { ThunkMiddleware } from 'redux-thunk' // @public export interface ActionCreatorWithNonInferrablePayload< - T extends string = string + T extends string = string, > extends BaseActionCreator { (payload: PT): PayloadAction } @@ -60,35 +60,35 @@ export interface ActionCreatorWithPreparedPayload< P, T extends string = string, E = never, - M = never + M = never, > extends BaseActionCreator { (...args: Args): PayloadAction } // @public (undocumented) export type ActionMatchingAllOf< - Matchers extends [Matcher, ...Matcher[]] + Matchers extends [Matcher, ...Matcher[]], > = UnionToIntersection> // @public (undocumented) export type ActionMatchingAnyOf< - Matchers extends [Matcher, ...Matcher[]] + Matchers extends [Matcher, ...Matcher[]], > = ActionFromMatcher // @public export interface ActionReducerMapBuilder { addCase>( actionCreator: ActionCreator, - reducer: CaseReducer> + reducer: CaseReducer>, ): ActionReducerMapBuilder addCase>( type: Type, - reducer: CaseReducer + reducer: CaseReducer, ): ActionReducerMapBuilder addDefaultCase(reducer: CaseReducer): {} addMatcher( matcher: TypeGuard | ((action: any) => boolean), - reducer: CaseReducer + reducer: CaseReducer, ): Omit, 'addCase'> } @@ -99,7 +99,7 @@ export type Actions = Record export type AsyncThunk< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = AsyncThunkActionCreator & { pending: AsyncThunkPendingActionCreator rejected: AsyncThunkRejectedActionCreator @@ -115,11 +115,11 @@ export type AsyncThunk< export type AsyncThunkAction< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = ( dispatch: GetDispatch, getState: () => GetState, - extra: GetExtra + extra: GetExtra, ) => Promise< | ReturnType> | ReturnType> @@ -133,11 +133,11 @@ export type AsyncThunkAction< // @public export type AsyncThunkOptions< ThunkArg = void, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > = { condition?( arg: ThunkArg, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): MaybePromise dispatchConditionRejection?: boolean serializeError?: (x: unknown) => GetSerializedErrorType @@ -150,7 +150,7 @@ export type AsyncThunkOptions< arg: ThunkArg requestId: string }, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): GetPendingMeta }, { @@ -159,7 +159,7 @@ export type AsyncThunkOptions< arg: ThunkArg requestId: string }, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): GetPendingMeta } > @@ -168,16 +168,16 @@ export type AsyncThunkOptions< export type AsyncThunkPayloadCreator< Returned, ThunkArg = void, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > = ( arg: ThunkArg, - thunkAPI: GetThunkAPI + thunkAPI: GetThunkAPI, ) => AsyncThunkPayloadCreatorReturnValue // @public export type AsyncThunkPayloadCreatorReturnValue< Returned, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = MaybePromise< | IsUnknown< GetFulfilledMeta, @@ -193,7 +193,7 @@ export type AsyncThunkPayloadCreatorReturnValue< // @public export type CaseReducer = ( state: Draft, - action: A + action: A, ) => S | void | Draft // @public @@ -221,21 +221,21 @@ export type Comparer = (a: T, b: T) => number // @public export type ConfigureEnhancersCallback = ( - defaultEnhancers: readonly StoreEnhancer[] + defaultEnhancers: readonly StoreEnhancer[], ) => StoreEnhancer[] // @public export function configureStore< S = any, A extends Action = UnknownAction, - M extends Middlewares = [ThunkMiddlewareFor] + M extends Middlewares = [ThunkMiddlewareFor], >(options: ConfigureStoreOptions): EnhancedStore // @public export interface ConfigureStoreOptions< S = any, A extends Action = UnknownAction, - M extends Middlewares = Middlewares + M extends Middlewares = Middlewares, > { devTools?: boolean | EnhancerOptions enhancers?: StoreEnhancer[] | ConfigureEnhancersCallback @@ -246,34 +246,34 @@ export interface ConfigureStoreOptions< // @public export function createAction

| void = void + PA extends PrepareAction

| void = void, > = IfPrepareActionMethodProvided< PA, _ActionCreatorWithPreparedPayload, @@ -786,7 +786,7 @@ export interface SerializedError { export interface Slice< State = any, CaseReducers extends SliceCaseReducers = SliceCaseReducers, - Name extends string = string + Name extends string = string, > { actions: CaseReducerActions caseReducers: SliceDefinedCaseReducers @@ -811,7 +811,7 @@ export { ThunkDispatch } // @public (undocumented) export function unwrapResult( - action: R + action: R, ): UnwrappedActionPayload // @public (undocumented) @@ -823,17 +823,16 @@ export type Update = { // @public export type ValidateSliceCaseReducers< S, - ACR extends SliceCaseReducers -> = ACR & - { - [T in keyof ACR]: ACR[T] extends { - reducer(s: S, action?: infer A): any - } - ? { - prepare(...a: never[]): Omit - } - : {} + ACR extends SliceCaseReducers, +> = ACR & { + [T in keyof ACR]: ACR[T] extends { + reducer(s: S, action?: infer A): any } + ? { + prepare(...a: never[]): Omit + } + : {} +} export * from 'redux' diff --git a/packages/toolkit/etc/rtk-query-react.api.md b/packages/toolkit/etc/rtk-query-react.api.md index a4e1079965..d50f544427 100644 --- a/packages/toolkit/etc/rtk-query-react.api.md +++ b/packages/toolkit/etc/rtk-query-react.api.md @@ -18,7 +18,7 @@ export type Api< Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string, - Enhancers extends ModuleName = CoreModule + Enhancers extends ModuleName = CoreModule, > = Id< Id< UnionToIntersection< @@ -27,7 +27,7 @@ export type Api< > & { injectEndpoints(_: { endpoints: ( - build: EndpointBuilder + build: EndpointBuilder, ) => NewDefinitions overrideExisting?: boolean }): Api< @@ -64,7 +64,7 @@ export interface ApiModules< BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, > {} // @public @@ -80,7 +80,7 @@ export type ApiWithInjectedEndpoints< ApiDefinition extends Api, Injections extends ApiDefinition extends Api ? [Api, ...Api[]] - : never + : never, > = Omit & Omit & { endpoints: ApiDefinition['endpoints'] & @@ -91,10 +91,10 @@ export type ApiWithInjectedEndpoints< export type BaseQueryEnhancer< AdditionalArgs = unknown, AdditionalDefinitionExtraOptions = unknown, - Config = void + Config = void, > = ( baseQuery: BaseQuery, - config: Config + config: Config, ) => BaseQueryFn< BaseQueryArg & AdditionalArgs, BaseQueryResult, @@ -108,11 +108,11 @@ export type BaseQueryFn< Result = unknown, Error = unknown, DefinitionExtraOptions = {}, - Meta = {} + Meta = {}, > = ( args: Args, api: BaseQueryApi, - extraOptions: DefinitionExtraOptions + extraOptions: DefinitionExtraOptions, ) => MaybePromise> // @public @@ -132,9 +132,9 @@ export type CreateApi = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, >( - options: CreateApiOptions + options: CreateApiOptions, ): Api } @@ -148,11 +148,11 @@ export interface CreateApiOptions< BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, > { baseQuery: BaseQuery endpoints( - build: EndpointBuilder + build: EndpointBuilder, ): Definitions keepUnusedDataFor?: number reducerPath?: ReducerPath @@ -169,7 +169,7 @@ export type EndpointDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = | QueryDefinition | MutationDefinition @@ -231,17 +231,17 @@ export type Module = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, >( api: Api, options: Required< CreateApiOptions >, - context: ApiContext + context: ApiContext, ): { injectEndpoint( endpointName: string, - definition: EndpointDefinition + definition: EndpointDefinition, ): void } } @@ -252,7 +252,7 @@ export type MutationDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & MutationExtraOptions @@ -262,7 +262,7 @@ export type QueryDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & QueryExtraOptions @@ -305,8 +305,8 @@ export function setupListeners( onFocusLost: typeof onFocusLost onOnline: typeof onOnline onOffline: typeof onOffline - } - ) => () => void + }, + ) => () => void, ): () => void // @public (undocumented) diff --git a/packages/toolkit/etc/rtk-query.api.md b/packages/toolkit/etc/rtk-query.api.md index dea69f7421..160ec14fe7 100644 --- a/packages/toolkit/etc/rtk-query.api.md +++ b/packages/toolkit/etc/rtk-query.api.md @@ -14,13 +14,13 @@ export type Api< Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string, - Enhancers extends ModuleName = CoreModule + Enhancers extends ModuleName = CoreModule, > = UnionToIntersection< ApiModules[Enhancers] > & { injectEndpoints(_: { endpoints: ( - build: EndpointBuilder + build: EndpointBuilder, ) => NewDefinitions overrideExisting?: boolean }): Api< @@ -56,17 +56,17 @@ export interface ApiModules< BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, > {} // @public (undocumented) export type BaseQueryEnhancer< AdditionalArgs = unknown, AdditionalDefinitionExtraOptions = unknown, - Config = void + Config = void, > = ( baseQuery: BaseQuery, - config: Config + config: Config, ) => BaseQueryFn< BaseQueryArg & AdditionalArgs, BaseQueryResult, @@ -82,11 +82,11 @@ export type BaseQueryFn< DefinitionExtraOptions = { copyWithStructuralSharing?: boolean }, - Meta = {} + Meta = {}, > = ( args: Args, api: BaseQueryApi, - extraOptions: DefinitionExtraOptions + extraOptions: DefinitionExtraOptions, ) => MaybePromise> // @public @@ -106,9 +106,9 @@ export type CreateApi = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, >( - options: CreateApiOptions + options: CreateApiOptions, ): Api } @@ -120,11 +120,11 @@ export interface CreateApiOptions< BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, > { baseQuery: BaseQuery endpoints( - build: EndpointBuilder + build: EndpointBuilder, ): Definitions extractRehydrationInfo?: ( action: UnknownAction, @@ -132,7 +132,7 @@ export interface CreateApiOptions< reducerPath, }: { reducerPath: ReducerPath - } + }, ) => | undefined | CombinedState< @@ -156,7 +156,7 @@ export type EndpointDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = | QueryDefinition | MutationDefinition @@ -240,7 +240,7 @@ export type Module = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, >( api: Api, options: WithRequiredProp< @@ -254,11 +254,11 @@ export type Module = { | 'tagTypes' | 'structuralSharing' >, - context: ApiContext + context: ApiContext, ): { injectEndpoint( endpointName: string, - definition: EndpointDefinition + definition: EndpointDefinition, ): void } } @@ -269,7 +269,7 @@ export type MutationDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & MutationExtraOptions @@ -279,7 +279,7 @@ export type QueryDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & QueryExtraOptions @@ -314,8 +314,8 @@ export function setupListeners( onFocusLost: typeof onFocusLost onOnline: typeof onOnline onOffline: typeof onOffline - } - ) => () => void + }, + ) => () => void, ): () => void // @public @deprecated (undocumented) diff --git a/packages/toolkit/scripts/mangleErrors.cjs b/packages/toolkit/scripts/mangleErrors.cjs index 96581df353..f777995f13 100644 --- a/packages/toolkit/scripts/mangleErrors.cjs +++ b/packages/toolkit/scripts/mangleErrors.cjs @@ -22,7 +22,7 @@ const evalToString = (ast) => { return ast.quasis.reduce( (concatenatedValue, templateElement) => concatenatedValue + templateElement.value.raw, - '' + '', ) case 'Identifier': return ast.name @@ -114,20 +114,20 @@ module.exports = (babel) => { path, 'formatProdErrorMessage', '@reduxjs/toolkit', - { nameHint: 'formatProdErrorMessage' } + { nameHint: 'formatProdErrorMessage' }, ) // Creates a function call to output the message to the error code page on the website const prodMessage = t.callExpression( formatProdErrorMessageIdentifier, - [t.numericLiteral(errorIndex)] + [t.numericLiteral(errorIndex)], ) if (minify) { path.replaceWith( t.throwStatement( - t.newExpression(t.identifier('Error'), [prodMessage]) - ) + t.newExpression(t.identifier('Error'), [prodMessage]), + ), ) } else { path.replaceWith( @@ -137,13 +137,13 @@ module.exports = (babel) => { t.binaryExpression( '===', t.identifier('process.env.NODE_ENV'), - t.stringLiteral('production') + t.stringLiteral('production'), ), prodMessage, - path.node.argument.arguments[0] + path.node.argument.arguments[0], ), - ]) - ) + ]), + ), ) } } diff --git a/packages/toolkit/src/actionCreatorInvariantMiddleware.ts b/packages/toolkit/src/actionCreatorInvariantMiddleware.ts index 1f3a47e0d4..4b95495cbe 100644 --- a/packages/toolkit/src/actionCreatorInvariantMiddleware.ts +++ b/packages/toolkit/src/actionCreatorInvariantMiddleware.ts @@ -19,7 +19,7 @@ Make sure you're calling the action creator before dispatching, i.e. \`dispatch( } export function createActionCreatorInvariantMiddleware( - options: ActionCreatorInvariantMiddlewareOptions = {} + options: ActionCreatorInvariantMiddlewareOptions = {}, ): Middleware { if (process.env.NODE_ENV === 'production') { return () => (next) => (action) => next(action) diff --git a/packages/toolkit/src/autoBatchEnhancer.ts b/packages/toolkit/src/autoBatchEnhancer.ts index eb4dd8ca56..560cb49e18 100644 --- a/packages/toolkit/src/autoBatchEnhancer.ts +++ b/packages/toolkit/src/autoBatchEnhancer.ts @@ -66,10 +66,10 @@ export const autoBatchEnhancer = options.type === 'tick' ? queueMicrotask : options.type === 'raf' - ? rAF - : options.type === 'callback' - ? options.queueNotification - : createQueueWithTimer(options.timeout) + ? rAF + : options.type === 'callback' + ? options.queueNotification + : createQueueWithTimer(options.timeout) const notifyListeners = () => { // We're running at the end of the event loop tick. diff --git a/packages/toolkit/src/combineSlices.ts b/packages/toolkit/src/combineSlices.ts index 1a10538cd8..f045f14f17 100644 --- a/packages/toolkit/src/combineSlices.ts +++ b/packages/toolkit/src/combineSlices.ts @@ -17,19 +17,11 @@ type SliceLike = { type AnySliceLike = SliceLike -type SliceLikeReducerPath = A extends SliceLike< - infer ReducerPath, - any -> - ? ReducerPath - : never - -type SliceLikeState = A extends SliceLike< - any, - infer State -> - ? State - : never +type SliceLikeReducerPath = + A extends SliceLike ? ReducerPath : never + +type SliceLikeState = + A extends SliceLike ? State : never export type WithSlice = { [Path in SliceLikeReducerPath]: SliceLikeState @@ -56,7 +48,7 @@ export type InjectConfig = { */ export interface CombinedSliceReducer< InitialState, - DeclaredState = InitialState + DeclaredState = InitialState, > extends Reducer> { /** * Provide a type for slices that will be injected lazily. @@ -106,7 +98,7 @@ export interface CombinedSliceReducer< */ inject>>( slice: Sl, - config?: InjectConfig + config?: InjectConfig, ): CombinedSliceReducer>> /** @@ -126,7 +118,7 @@ export interface CombinedSliceReducer< ReducerPath, State & (ReducerPath extends keyof DeclaredState ? never : State) >, - config?: InjectConfig + config?: InjectConfig, ): CombinedSliceReducer< InitialState, Id>> @@ -212,7 +204,7 @@ export interface CombinedSliceReducer< * ``` */ unknown>( - selectorFn: Selector + selectorFn: Selector, ): ( state: WithOptionalProp< Parameters[0], @@ -276,7 +268,7 @@ export interface CombinedSliceReducer< */ < Selector extends (state: DeclaredState, ...args: any[]) => unknown, - RootState + RootState, >( selectorFn: Selector, selectState: ( @@ -285,7 +277,7 @@ export interface CombinedSliceReducer< ) => WithOptionalProp< Parameters[0], Exclude - > + >, ): ( state: RootState, ...args: Tail> @@ -310,7 +302,7 @@ type InitialState> = > const isSliceLike = ( - maybeSliceLike: AnySliceLike | ReducerMap + maybeSliceLike: AnySliceLike | ReducerMap, ): maybeSliceLike is AnySliceLike => 'reducerPath' in maybeSliceLike && typeof maybeSliceLike.reducerPath === 'string' @@ -319,7 +311,7 @@ const getReducers = (slices: Array) => slices.flatMap((sliceOrMap) => isSliceLike(sliceOrMap) ? [[sliceOrMap.reducerPath, sliceOrMap.reducer] as const] - : Object.entries(sliceOrMap) + : Object.entries(sliceOrMap), ) const ORIGINAL_STATE = Symbol.for('rtk-state-proxy-original') @@ -330,7 +322,7 @@ const stateProxyMap = new WeakMap() const createStateProxy = ( state: State, - reducerMap: Partial> + reducerMap: Partial>, ) => emplace(stateProxyMap, state, { insert: () => @@ -349,7 +341,7 @@ const createStateProxy = ( `If the state passed to the reducer is undefined, you must ` + `explicitly return the initial state. The initial state may ` + `not be undefined. If you don't want to set a value for this reducer, ` + - `you can use null instead of undefined.` + `you can use null instead of undefined.`, ) } return reducerResult @@ -370,8 +362,8 @@ const original = (state: any) => { export function combineSlices< Slices extends [ AnySliceLike | ReducerMap, - ...Array - ] + ...Array, + ], >(...slices: Slices): CombinedSliceReducer>> { const reducerMap = Object.fromEntries(getReducers(slices)) @@ -381,7 +373,7 @@ export function combineSlices< function combinedReducer( state: Record, - action: UnknownAction + action: UnknownAction, ) { return reducer(state, action) } @@ -390,7 +382,7 @@ export function combineSlices< const inject = ( slice: AnySliceLike, - config: InjectConfig = {} + config: InjectConfig = {}, ): typeof combinedReducer => { const { reducerPath, reducer: reducerToInject } = slice @@ -405,7 +397,7 @@ export function combineSlices< process.env.NODE_ENV === 'development' ) { console.error( - `called \`inject\` to override already-existing reducer ${reducerPath} without specifying \`overrideExisting: true\`` + `called \`inject\` to override already-existing reducer ${reducerPath} without specifying \`overrideExisting: true\``, ) } @@ -422,19 +414,19 @@ export function combineSlices< const selector = Object.assign( function makeSelector( selectorFn: (state: State, ...args: Args) => any, - selectState?: (rootState: RootState, ...args: Args) => State + selectState?: (rootState: RootState, ...args: Args) => State, ) { return function selector(state: State, ...args: Args) { return selectorFn( createStateProxy( selectState ? selectState(state as any, ...args) : state, - reducerMap + reducerMap, ), - ...args + ...args, ) } }, - { original } + { original }, ) return Object.assign(combinedReducer, { inject, selector }) as any diff --git a/packages/toolkit/src/configureStore.ts b/packages/toolkit/src/configureStore.ts index e1b1a491e1..05b3bb8914 100644 --- a/packages/toolkit/src/configureStore.ts +++ b/packages/toolkit/src/configureStore.ts @@ -44,7 +44,7 @@ export interface ConfigureStoreOptions< A extends Action = UnknownAction, M extends Tuple> = Tuple>, E extends Tuple = Tuple, - P = S + P = S, > { /** * A single reducer function that will be used as the root reducer, or an @@ -103,7 +103,7 @@ type Enhancers = ReadonlyArray export type EnhancedStore< S = any, A extends Action = UnknownAction, - E extends Enhancers = Enhancers + E extends Enhancers = Enhancers, > = ExtractStoreExtensions & Store>> @@ -122,7 +122,7 @@ export function configureStore< E extends Tuple = Tuple< [StoreEnhancer<{ dispatch: ExtractDispatchExtensions }>, StoreEnhancer] >, - P = S + P = S, >(options: ConfigureStoreOptions): EnhancedStore { const getDefaultMiddleware = buildGetDefaultMiddleware() @@ -142,7 +142,7 @@ export function configureStore< rootReducer = combineReducers(reducer) as unknown as Reducer } else { throw new Error( - '`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers' + '`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers', ) } @@ -156,7 +156,7 @@ export function configureStore< if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { throw new Error( - 'when using a middleware builder function, an array of middleware must be returned' + 'when using a middleware builder function, an array of middleware must be returned', ) } } else { @@ -167,7 +167,7 @@ export function configureStore< finalMiddleware.some((item: any) => typeof item !== 'function') ) { throw new Error( - 'each middleware provided to configureStore must be a function' + 'each middleware provided to configureStore must be a function', ) } @@ -202,7 +202,7 @@ export function configureStore< storeEnhancers.some((item: any) => typeof item !== 'function') ) { throw new Error( - 'each enhancer provided to configureStore must be a function' + 'each enhancer provided to configureStore must be a function', ) } if ( @@ -211,7 +211,7 @@ export function configureStore< !storeEnhancers.includes(middlewareEnhancer) ) { console.error( - 'middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`' + 'middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`', ) } diff --git a/packages/toolkit/src/createAction.ts b/packages/toolkit/src/createAction.ts index 7e347c0472..ea8958288d 100644 --- a/packages/toolkit/src/createAction.ts +++ b/packages/toolkit/src/createAction.ts @@ -22,7 +22,7 @@ export type PayloadAction< P = void, T extends string = string, M = never, - E = never + E = never, > = { payload: P type: T @@ -57,24 +57,25 @@ export type PrepareAction

= */ export type _ActionCreatorWithPreparedPayload< PA extends PrepareAction | void, - T extends string = string -> = PA extends PrepareAction - ? ActionCreatorWithPreparedPayload< - Parameters, - P, - T, - ReturnType extends { - error: infer E - } - ? E - : never, - ReturnType extends { - meta: infer M - } - ? M - : never - > - : void + T extends string = string, +> = + PA extends PrepareAction + ? ActionCreatorWithPreparedPayload< + Parameters, + P, + T, + ReturnType extends { + error: infer E + } + ? E + : never, + ReturnType extends { + meta: infer M + } + ? M + : never + > + : void /** * Basic type for all action creators. @@ -104,7 +105,7 @@ export interface ActionCreatorWithPreparedPayload< P, T extends string = string, E = never, - M = never + M = never, > extends BaseActionCreator { /** * Calling this {@link redux#ActionCreator} with `Args` will return @@ -171,7 +172,7 @@ export interface ActionCreatorWithPayload * @public */ export interface ActionCreatorWithNonInferrablePayload< - T extends string = string + T extends string = string, > extends BaseActionCreator { /** * Calling this {@link redux#ActionCreator} with an argument will @@ -193,7 +194,7 @@ export interface ActionCreatorWithNonInferrablePayload< export type PayloadActionCreator< P = void, T extends string = string, - PA extends PrepareAction

| void = void + PA extends PrepareAction

| void = void, > = IfPrepareActionMethodProvided< PA, _ActionCreatorWithPreparedPayload, @@ -233,7 +234,7 @@ export type PayloadActionCreator< * @public */ export function createAction

( - type: T + type: T, ): PayloadActionCreator /** @@ -250,10 +251,10 @@ export function createAction

( */ export function createAction< PA extends PrepareAction, - T extends string = string + T extends string = string, >( type: T, - prepareAction: PA + prepareAction: PA, ): PayloadActionCreator['payload'], T, PA> export function createAction(type: string, prepareAction?: Function): any { @@ -288,7 +289,7 @@ export function createAction(type: string, prepareAction?: Function): any { * Returns true if value is an RTK-like action creator, with a static type property and match method. */ export function isActionCreator( - action: unknown + action: unknown, ): action is BaseActionCreator & Function { return ( typeof action === 'function' && @@ -319,5 +320,5 @@ function isValidKey(key: string) { type IfPrepareActionMethodProvided< PA extends PrepareAction | void, True, - False + False, > = PA extends (...args: any[]) => any ? True : False diff --git a/packages/toolkit/src/createAsyncThunk.ts b/packages/toolkit/src/createAsyncThunk.ts index c6b1517b3b..f384ab9af2 100644 --- a/packages/toolkit/src/createAsyncThunk.ts +++ b/packages/toolkit/src/createAsyncThunk.ts @@ -26,7 +26,7 @@ export type BaseThunkAPI< D extends Dispatch = Dispatch, RejectedValue = unknown, RejectedMeta = unknown, - FulfilledMeta = unknown + FulfilledMeta = unknown, > = { dispatch: D getState: () => S @@ -39,7 +39,7 @@ export type BaseThunkAPI< (value: RejectedValue) => RejectWithValue, ( value: RejectedValue, - meta: RejectedMeta + meta: RejectedMeta, ) => RejectWithValue > fulfillWithValue: IsUnknown< @@ -47,7 +47,7 @@ export type BaseThunkAPI< (value: FulfilledValue) => FulfilledValue, ( value: FulfilledValue, - meta: FulfilledMeta + meta: FulfilledMeta, ) => FulfillWithMeta > } @@ -77,7 +77,7 @@ class RejectWithValue { private readonly _type!: 'RejectWithValue' constructor( public readonly payload: Payload, - public readonly meta: RejectedMeta + public readonly meta: RejectedMeta, ) {} } @@ -89,7 +89,7 @@ class FulfillWithMeta { private readonly _type!: 'FulfillWithMeta' constructor( public readonly payload: Payload, - public readonly meta: FulfilledMeta + public readonly meta: FulfilledMeta, ) {} } @@ -199,7 +199,7 @@ type MaybePromise = T | Promise | (T extends any ? Promise : never) */ export type AsyncThunkPayloadCreatorReturnValue< Returned, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = MaybePromise< | IsUnknown< GetFulfilledMeta, @@ -220,10 +220,10 @@ export type AsyncThunkPayloadCreatorReturnValue< export type AsyncThunkPayloadCreator< Returned, ThunkArg = void, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > = ( arg: ThunkArg, - thunkAPI: GetThunkAPI + thunkAPI: GetThunkAPI, ) => AsyncThunkPayloadCreatorReturnValue /** @@ -238,11 +238,11 @@ export type AsyncThunkPayloadCreator< export type AsyncThunkAction< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = ( dispatch: GetDispatch, getState: () => GetState, - extra: GetExtra + extra: GetExtra, ) => SafePromise< | ReturnType> | ReturnType> @@ -256,7 +256,7 @@ export type AsyncThunkAction< type AsyncThunkActionCreator< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = IsAny< ThunkArg, // any handling @@ -265,19 +265,25 @@ type AsyncThunkActionCreator< unknown extends ThunkArg ? (arg: ThunkArg) => AsyncThunkAction // argument not specified or specified as void or undefined : [ThunkArg] extends [void] | [undefined] - ? () => AsyncThunkAction // argument contains void - : [void] extends [ThunkArg] // make optional - ? (arg?: ThunkArg) => AsyncThunkAction // argument contains undefined - : [undefined] extends [ThunkArg] - ? WithStrictNullChecks< - // with strict nullChecks: make optional - ( - arg?: ThunkArg - ) => AsyncThunkAction, - // without strict null checks this will match everything, so don't make it optional - (arg: ThunkArg) => AsyncThunkAction - > // default case: normal argument - : (arg: ThunkArg) => AsyncThunkAction + ? () => AsyncThunkAction // argument contains void + : [void] extends [ThunkArg] // make optional + ? ( + arg?: ThunkArg, + ) => AsyncThunkAction // argument contains undefined + : [undefined] extends [ThunkArg] + ? WithStrictNullChecks< + // with strict nullChecks: make optional + ( + arg?: ThunkArg, + ) => AsyncThunkAction, + // without strict null checks this will match everything, so don't make it optional + ( + arg: ThunkArg, + ) => AsyncThunkAction + > // default case: normal argument + : ( + arg: ThunkArg, + ) => AsyncThunkAction > /** @@ -287,7 +293,7 @@ type AsyncThunkActionCreator< */ export type AsyncThunkOptions< ThunkArg = void, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > = { /** * A method to control whether the asyncThunk should be executed. Has access to the @@ -297,7 +303,7 @@ export type AsyncThunkOptions< */ condition?( arg: ThunkArg, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): MaybePromise /** * If `condition` returns `false`, the asyncThunk will be skipped. @@ -330,7 +336,7 @@ export type AsyncThunkOptions< arg: ThunkArg requestId: string }, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): GetPendingMeta }, { @@ -342,14 +348,14 @@ export type AsyncThunkOptions< arg: ThunkArg requestId: string }, - api: Pick, 'getState' | 'extra'> + api: Pick, 'getState' | 'extra'>, ): GetPendingMeta } > export type AsyncThunkPendingActionCreator< ThunkArg, - ThunkApiConfig = {} + ThunkApiConfig = {}, > = ActionCreatorWithPreparedPayload< [string, ThunkArg, GetPendingMeta?], undefined, @@ -364,14 +370,14 @@ export type AsyncThunkPendingActionCreator< export type AsyncThunkRejectedActionCreator< ThunkArg, - ThunkApiConfig = {} + ThunkApiConfig = {}, > = ActionCreatorWithPreparedPayload< [ Error | null, string, ThunkArg, GetRejectValue?, - GetRejectedMeta? + GetRejectedMeta?, ], GetRejectValue | undefined, string, @@ -393,7 +399,7 @@ export type AsyncThunkRejectedActionCreator< export type AsyncThunkFulfilledActionCreator< Returned, ThunkArg, - ThunkApiConfig = {} + ThunkApiConfig = {}, > = ActionCreatorWithPreparedPayload< [Returned, string, ThunkArg, GetFulfilledMeta?], Returned, @@ -415,7 +421,7 @@ export type AsyncThunkFulfilledActionCreator< export type AsyncThunk< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, > = AsyncThunkActionCreator & { pending: AsyncThunkPendingActionCreator rejected: AsyncThunkRejectedActionCreator @@ -426,7 +432,7 @@ export type AsyncThunk< > // matchSettled? settled: ( - action: any + action: any, ) => action is ReturnType< | AsyncThunkRejectedActionCreator | AsyncThunkFulfilledActionCreator @@ -455,7 +461,7 @@ type CreateAsyncThunk = { ThunkArg, CurriedThunkApiConfig >, - options?: AsyncThunkOptions + options?: AsyncThunkOptions, ): AsyncThunk /** @@ -476,7 +482,7 @@ type CreateAsyncThunk = { options?: AsyncThunkOptions< ThunkArg, OverrideThunkApiConfigs - > + >, ): AsyncThunk< Returned, ThunkArg, @@ -492,7 +498,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { function createAsyncThunk< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, >( typePrefix: string, payloadCreator: AsyncThunkPayloadCreator< @@ -500,7 +506,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { ThunkArg, ThunkApiConfig >, - options?: AsyncThunkOptions + options?: AsyncThunkOptions, ): AsyncThunk { type RejectedValue = GetRejectValue type PendingMeta = GetPendingMeta @@ -517,7 +523,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { payload: Returned, requestId: string, arg: ThunkArg, - meta?: FulfilledMeta + meta?: FulfilledMeta, ) => ({ payload, meta: { @@ -526,7 +532,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { requestId, requestStatus: 'fulfilled' as const, }, - }) + }), ) const pending: AsyncThunkPendingActionCreator = @@ -540,7 +546,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { requestId, requestStatus: 'pending' as const, }, - }) + }), ) const rejected: AsyncThunkRejectedActionCreator = @@ -551,11 +557,11 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { requestId: string, arg: ThunkArg, payload?: RejectedValue, - meta?: RejectedMeta + meta?: RejectedMeta, ) => ({ payload, error: ((options && options.serializeError) || miniSerializeError)( - error || 'Rejected' + error || 'Rejected', ) as GetSerializedErrorType, meta: { ...((meta as any) || {}), @@ -566,11 +572,11 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { aborted: error?.name === 'AbortError', condition: error?.name === 'ConditionError', }, - }) + }), ) function actionCreator( - arg: ThunkArg + arg: ThunkArg, ): AsyncThunkAction { return (dispatch, getState, extra) => { const requestId = options?.idGenerator @@ -617,9 +623,9 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { arg, options?.getPendingMeta?.( { requestId, arg }, - { getState, extra } - ) - ) as any + { getState, extra }, + ), + ) as any, ) finalAction = await Promise.race([ abortedPromise, @@ -633,14 +639,14 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { abort, rejectWithValue: (( value: RejectedValue, - meta?: RejectedMeta + meta?: RejectedMeta, ) => { return new RejectWithValue(value, meta) }) as any, fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => { return new FulfillWithMeta(value, meta) }) as any, - }) + }), ).then((result) => { if (result instanceof RejectWithValue) { throw result @@ -700,7 +706,7 @@ export const createAsyncThunk = /* @__PURE__ */ (() => { fulfilled, settled: isAnyOf(rejected, fulfilled), typePrefix, - } + }, ) } createAsyncThunk.withTypes = () => createAsyncThunk @@ -723,7 +729,7 @@ type UnwrappedActionPayload = Exclude< * @public */ export function unwrapResult( - action: R + action: R, ): UnwrappedActionPayload { if (action.meta && action.meta.rejectedWithValue) { throw action.payload diff --git a/packages/toolkit/src/createDraftSafeSelector.ts b/packages/toolkit/src/createDraftSafeSelector.ts index 67b5465687..825fc0db32 100644 --- a/packages/toolkit/src/createDraftSafeSelector.ts +++ b/packages/toolkit/src/createDraftSafeSelector.ts @@ -13,7 +13,7 @@ export const createDraftSafeSelectorCreator: typeof createSelectorCreator = ( Object.assign(wrappedSelector, selector) return wrappedSelector as any }, - { withTypes: () => createDraftSafeSelector } + { withTypes: () => createDraftSafeSelector }, ) return createDraftSafeSelector } diff --git a/packages/toolkit/src/createReducer.ts b/packages/toolkit/src/createReducer.ts index f0f2ac50be..564a1f13b0 100644 --- a/packages/toolkit/src/createReducer.ts +++ b/packages/toolkit/src/createReducer.ts @@ -47,7 +47,7 @@ export type ActionMatcherDescriptionCollection = Array< */ export type CaseReducer = ( state: Draft, - action: A + action: A, ) => NoInfer | void | Draft> /** @@ -139,12 +139,12 @@ const reducer = createReducer( */ export function createReducer>( initialState: S | (() => S), - mapOrBuilderCallback: (builder: ActionReducerMapBuilder) => void + mapOrBuilderCallback: (builder: ActionReducerMapBuilder) => void, ): ReducerWithInitialState { if (process.env.NODE_ENV !== 'production') { if (typeof mapOrBuilderCallback === 'object') { throw new Error( - "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer" + "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer", ) } } @@ -196,7 +196,7 @@ export function createReducer>( return previousState } throw Error( - 'A case reducer on a non-draftable value must not return undefined' + 'A case reducer on a non-draftable value must not return undefined', ) } diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 3bbe4e98c5..441fbbcc6a 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -50,7 +50,7 @@ export interface Slice< CaseReducers extends SliceCaseReducers = SliceCaseReducers, Name extends string = string, ReducerPath extends string = Name, - Selectors extends SliceSelectors = SliceSelectors + Selectors extends SliceSelectors = SliceSelectors, > { /** * The slice name. @@ -94,7 +94,7 @@ export interface Slice< * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state) */ getSelectors( - selectState: (rootState: RootState) => State + selectState: (rootState: RootState) => State, ): Id> /** @@ -114,10 +114,10 @@ export interface Slice< injectable: { inject: ( slice: { reducerPath: string; reducer: Reducer }, - config?: InjectConfig + config?: InjectConfig, ) => void }, - config?: InjectIntoConfig + config?: InjectIntoConfig, ): InjectedSlice /** @@ -138,7 +138,7 @@ interface InjectedSlice< CaseReducers extends SliceCaseReducers = SliceCaseReducers, Name extends string = string, ReducerPath extends string = Name, - Selectors extends SliceSelectors = SliceSelectors + Selectors extends SliceSelectors = SliceSelectors, > extends Omit< Slice, 'getSelectors' | 'selectors' @@ -152,7 +152,7 @@ interface InjectedSlice< * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state) */ getSelectors( - selectState: (rootState: RootState) => State | undefined + selectState: (rootState: RootState) => State | undefined, ): Id> /** @@ -186,7 +186,7 @@ export interface CreateSliceOptions< CR extends SliceCaseReducers = SliceCaseReducers, Name extends string = string, ReducerPath extends string = Name, - Selectors extends SliceSelectors = SliceSelectors + Selectors extends SliceSelectors = SliceSelectors, > { /** * The slice's name. Used to namespace the generated action types. @@ -274,7 +274,7 @@ interface ReducerDefinition { export interface CaseReducerDefinition< S = any, - A extends Action = UnknownAction + A extends Action = UnknownAction, > extends CaseReducer, ReducerDefinition {} @@ -290,7 +290,7 @@ export type CaseReducerWithPrepare = { export interface CaseReducerWithPrepareDefinition< State, - Action extends PayloadAction + Action extends PayloadAction, > extends CaseReducerWithPrepare, ReducerDefinition {} @@ -298,7 +298,7 @@ export interface AsyncThunkSliceReducerConfig< State, ThunkArg extends any, Returned = unknown, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > { pending?: CaseReducer< State, @@ -325,7 +325,7 @@ export interface AsyncThunkSliceReducerDefinition< State, ThunkArg extends any, Returned = unknown, - ThunkApiConfig extends AsyncThunkConfig = {} + ThunkApiConfig extends AsyncThunkConfig = {}, > extends AsyncThunkSliceReducerConfig< State, ThunkArg, @@ -347,7 +347,8 @@ type PreventCircular = { interface AsyncThunkCreator< State, - CurriedThunkApiConfig extends PreventCircular = PreventCircular + CurriedThunkApiConfig extends + PreventCircular = PreventCircular, > { ( payloadCreator: AsyncThunkPayloadCreator< @@ -360,7 +361,7 @@ interface AsyncThunkCreator< ThunkArg, Returned, CurriedThunkApiConfig - > + >, ): AsyncThunkSliceReducerDefinition< State, ThunkArg, @@ -370,7 +371,7 @@ interface AsyncThunkCreator< < Returned, ThunkArg, - ThunkApiConfig extends PreventCircular = {} + ThunkApiConfig extends PreventCircular = {}, >( payloadCreator: AsyncThunkPayloadCreator< Returned, @@ -382,10 +383,10 @@ interface AsyncThunkCreator< ThunkArg, Returned, ThunkApiConfig - > + >, ): AsyncThunkSliceReducerDefinition withTypes< - ThunkApiConfig extends PreventCircular + ThunkApiConfig extends PreventCircular, >(): AsyncThunkCreator< State, OverrideThunkApiConfigs @@ -394,10 +395,10 @@ interface AsyncThunkCreator< export interface ReducerCreators { reducer( - caseReducer: CaseReducer + caseReducer: CaseReducer, ): CaseReducerDefinition reducer( - caseReducer: CaseReducer> + caseReducer: CaseReducer>, ): CaseReducerDefinition> asyncThunk: AsyncThunkCreator @@ -407,7 +408,7 @@ export interface ReducerCreators { reducer: CaseReducer< State, ReturnType<_ActionCreatorWithPreparedPayload> - > + >, ): { _reducerDefinitionType: ReducerType.reducerWithPrepare prepare: Prepare @@ -448,7 +449,7 @@ export type SliceSelectors = { type SliceActionType< SliceName extends string, - ActionName extends keyof any + ActionName extends keyof any, > = ActionName extends string | number ? `${SliceName}/${ActionName}` : string /** @@ -458,7 +459,7 @@ type SliceActionType< */ export type CaseReducerActions< CaseReducers extends SliceCaseReducers, - SliceName extends string + SliceName extends string, > = { [Type in keyof CaseReducers]: CaseReducers[Type] extends infer Definition ? Definition extends { prepare: any } @@ -467,21 +468,21 @@ export type CaseReducerActions< SliceActionType > : Definition extends AsyncThunkSliceReducerDefinition< - any, - infer ThunkArg, - infer Returned, - infer ThunkApiConfig - > - ? AsyncThunk - : Definition extends { reducer: any } - ? ActionCreatorForCaseReducer< - Definition['reducer'], - SliceActionType - > - : ActionCreatorForCaseReducer< - Definition, - SliceActionType - > + any, + infer ThunkArg, + infer Returned, + infer ThunkApiConfig + > + ? AsyncThunk + : Definition extends { reducer: any } + ? ActionCreatorForCaseReducer< + Definition['reducer'], + SliceActionType + > + : ActionCreatorForCaseReducer< + Definition, + SliceActionType + > : never } @@ -492,7 +493,7 @@ export type CaseReducerActions< */ type ActionCreatorForCaseReducerWithPrepare< CR extends { prepare: any }, - Type extends string + Type extends string, > = _ActionCreatorWithPreparedPayload /** @@ -502,7 +503,7 @@ type ActionCreatorForCaseReducerWithPrepare< */ type ActionCreatorForCaseReducer = CR extends ( state: any, - action: infer Action + action: infer Action, ) => any ? Action extends { payload: infer P } ? PayloadActionCreator @@ -525,20 +526,17 @@ type SliceDefinedCaseReducers> = { > > : Definition extends { - reducer: infer Reducer - } - ? Reducer - : Definition + reducer: infer Reducer + } + ? Reducer + : Definition : never } -type RemappedSelector = S extends Selector< - any, - infer R, - infer P -> - ? Selector & { unwrapped: S } - : never +type RemappedSelector = + S extends Selector + ? Selector & { unwrapped: S } + : never /** * Extracts the final selector type from the `selectors` object. @@ -548,7 +546,7 @@ type RemappedSelector = S extends Selector< type SliceDefinedSelectors< State, Selectors extends SliceSelectors, - RootState + RootState, > = { [K in keyof Selectors as string extends K ? never : K]: RemappedSelector< Selectors[K], @@ -570,17 +568,16 @@ type SliceDefinedSelectors< */ export type ValidateSliceCaseReducers< S, - ACR extends SliceCaseReducers -> = ACR & - { - [T in keyof ACR]: ACR[T] extends { - reducer(s: S, action?: infer A): any - } - ? { - prepare(...a: never[]): Omit - } - : {} + ACR extends SliceCaseReducers, +> = ACR & { + [T in keyof ACR]: ACR[T] extends { + reducer(s: S, action?: infer A): any } + ? { + prepare(...a: never[]): Omit + } + : {} +} function getType(slice: string, actionKey: string): string { return `${slice}/${actionKey}` @@ -599,7 +596,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { CaseReducers extends SliceCaseReducers, Name extends string, Selectors extends SliceSelectors, - ReducerPath extends string = Name + ReducerPath extends string = Name, >( options: CreateSliceOptions< State, @@ -607,7 +604,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { Name, ReducerPath, Selectors - > + >, ): Slice { const { name, reducerPath = name as unknown as ReducerPath } = options if (!name) { @@ -620,7 +617,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { ) { if (options.initialState === undefined) { console.error( - 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`' + 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`', ) } } @@ -642,7 +639,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { const contextMethods: ReducerHandlingContextMethods = { addCase( typeOrActionCreator: string | TypedActionCreator, - reducer: CaseReducer + reducer: CaseReducer, ) { const type = typeof typeOrActionCreator === 'string' @@ -650,13 +647,13 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { : typeOrActionCreator.type if (!type) { throw new Error( - '`context.addCase` cannot be called with an empty action type' + '`context.addCase` cannot be called with an empty action type', ) } if (type in context.sliceCaseReducersByType) { throw new Error( '`context.addCase` cannot be called with two reducers for the same action type: ' + - type + type, ) } context.sliceCaseReducersByType[type] = reducer @@ -688,13 +685,13 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { reducerDetails, reducerDefinition, contextMethods, - cAT + cAT, ) } else { handleNormalReducerDefinition( reducerDetails, reducerDefinition, - contextMethods + contextMethods, ) } }) @@ -703,7 +700,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { if (process.env.NODE_ENV !== 'production') { if (typeof options.extraReducers === 'object') { throw new Error( - "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice" + "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice", ) } } @@ -763,7 +760,7 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { function makeSelectorProps( reducerPath: CurrentReducerPath, - injected = false + injected = false, ): Pick< Slice, 'getSelectors' | 'selectors' | 'selectSlice' | 'reducerPath' @@ -775,14 +772,14 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { sliceState = getInitialState() } else if (process.env.NODE_ENV !== 'production') { throw new Error( - 'selectSlice returned undefined for an uninjected slice reducer' + 'selectSlice returned undefined for an uninjected slice reducer', ) } } return sliceState } function getSelectors( - selectState: (rootState: any) => State = selectSelf + selectState: (rootState: any) => State = selectSelf, ) { const selectorCache = emplace(injectedSelectorCache, injected, { insert: () => new WeakMap(), @@ -792,13 +789,13 @@ export function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) { insert: () => { const map: Record> = {} for (const [name, selector] of Object.entries( - options.selectors ?? {} + options.selectors ?? {}, )) { map[name] = wrapSelector( selector, selectState, getInitialState, - injected + injected, ) } return map @@ -839,7 +836,7 @@ function wrapSelector>( selector: S, selectState: Selector, getInitialState: () => State, - injected?: boolean + injected?: boolean, ) { function wrapper(rootState: NewState, ...args: any[]) { let sliceState = selectState(rootState) @@ -848,7 +845,7 @@ function wrapSelector>( sliceState = getInitialState() } else if (process.env.NODE_ENV !== 'production') { throw new Error( - 'selectState returned undefined for an uninjected slice reducer' + 'selectState returned undefined for an uninjected slice reducer', ) } } @@ -890,7 +887,7 @@ interface ReducerHandlingContextMethods { */ addCase>( actionCreator: ActionCreator, - reducer: CaseReducer> + reducer: CaseReducer>, ): ReducerHandlingContextMethods /** * Adds a case reducer to handle a single action type. @@ -899,7 +896,7 @@ interface ReducerHandlingContextMethods { */ addCase>( type: Type, - reducer: CaseReducer + reducer: CaseReducer, ): ReducerHandlingContextMethods /** @@ -915,7 +912,7 @@ interface ReducerHandlingContextMethods { */ addMatcher( matcher: TypeGuard, - reducer: CaseReducer + reducer: CaseReducer, ): ReducerHandlingContextMethods /** * Add an action to be exposed under the final `slice.actions` key. @@ -930,7 +927,7 @@ interface ReducerHandlingContextMethods { */ exposeAction( name: string, - actionCreator: Function + actionCreator: Function, ): ReducerHandlingContextMethods /** * Add a case reducer to be exposed under the final `slice.caseReducers` key. @@ -950,7 +947,7 @@ interface ReducerHandlingContextMethods { | Pick< AsyncThunkSliceReducerDefinition, 'fulfilled' | 'rejected' | 'pending' | 'settled' - > + >, ): ReducerHandlingContextMethods } @@ -966,7 +963,7 @@ interface ReducerDetails { function buildReducerCreators(): ReducerCreators { function asyncThunk( payloadCreator: AsyncThunkPayloadCreator, - config: AsyncThunkSliceReducerConfig + config: AsyncThunkSliceReducerConfig, ): AsyncThunkSliceReducerDefinition { return { _reducerDefinitionType: ReducerType.asyncThunk, @@ -987,7 +984,7 @@ function buildReducerCreators(): ReducerCreators { }[caseReducer.name], { _reducerDefinitionType: ReducerType.reducer, - } as const + } as const, ) }, preparedReducer(prepare, reducer) { @@ -1006,7 +1003,7 @@ function handleNormalReducerDefinition( maybeReducerWithPrepare: | CaseReducer | CaseReducerWithPrepare>, - context: ReducerHandlingContextMethods + context: ReducerHandlingContextMethods, ) { let caseReducer: CaseReducer let prepareCallback: PrepareAction | undefined @@ -1016,7 +1013,7 @@ function handleNormalReducerDefinition( !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare) ) { throw new Error( - 'Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.' + 'Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.', ) } caseReducer = maybeReducerWithPrepare.reducer @@ -1029,18 +1026,20 @@ function handleNormalReducerDefinition( .exposeCaseReducer(reducerName, caseReducer) .exposeAction( reducerName, - prepareCallback ? createAction(type, prepareCallback) : createAction(type) + prepareCallback + ? createAction(type, prepareCallback) + : createAction(type), ) } function isAsyncThunkSliceReducerDefinition( - reducerDefinition: any + reducerDefinition: any, ): reducerDefinition is AsyncThunkSliceReducerDefinition { return reducerDefinition._reducerDefinitionType === ReducerType.asyncThunk } function isCaseReducerWithPrepareDefinition( - reducerDefinition: any + reducerDefinition: any, ): reducerDefinition is CaseReducerWithPrepareDefinition { return ( reducerDefinition._reducerDefinitionType === ReducerType.reducerWithPrepare @@ -1051,12 +1050,12 @@ function handleThunkCaseReducerDefinition( { type, reducerName }: ReducerDetails, reducerDefinition: AsyncThunkSliceReducerDefinition, context: ReducerHandlingContextMethods, - cAT: typeof _createAsyncThunk | undefined + cAT: typeof _createAsyncThunk | undefined, ) { if (!cAT) { throw new Error( 'Cannot use `create.asyncThunk` in the built-in `createSlice`. ' + - 'Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.' + 'Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.', ) } const { payloadCreator, fulfilled, pending, rejected, settled, options } = diff --git a/packages/toolkit/src/dynamicMiddleware/index.ts b/packages/toolkit/src/dynamicMiddleware/index.ts index 556998d142..2ad15b6c3e 100644 --- a/packages/toolkit/src/dynamicMiddleware/index.ts +++ b/packages/toolkit/src/dynamicMiddleware/index.ts @@ -18,9 +18,9 @@ import type { const createMiddlewareEntry = < State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, >( - middleware: Middleware + middleware: Middleware, ): MiddlewareEntry => ({ id: nanoid(), middleware, @@ -34,7 +34,7 @@ const matchInstance = export const createDynamicMiddleware = < State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, >(): DynamicMiddlewareInstance => { const instanceId = nanoid() const middlewareMap = new Map>() @@ -47,9 +47,9 @@ export const createDynamicMiddleware = < meta: { instanceId, }, - }) + }), ), - { withTypes: () => withMiddleware } + { withTypes: () => withMiddleware }, ) as WithMiddleware const addMiddleware = Object.assign( @@ -57,7 +57,7 @@ export const createDynamicMiddleware = < middlewares.forEach((middleware) => { let entry = find( Array.from(middlewareMap.values()), - (entry) => entry.middleware === middleware + (entry) => entry.middleware === middleware, ) if (!entry) { entry = createMiddlewareEntry(middleware) @@ -65,12 +65,12 @@ export const createDynamicMiddleware = < middlewareMap.set(entry.id, entry) }) }, - { withTypes: () => addMiddleware } + { withTypes: () => addMiddleware }, ) as AddMiddleware const getFinalMiddleware: Middleware<{}, State, Dispatch> = (api) => { const appliedMiddleware = Array.from(middlewareMap.values()).map((entry) => - emplace(entry.applied, api, { insert: () => entry.middleware(api) }) + emplace(entry.applied, api, { insert: () => entry.middleware(api) }), ) return compose(...appliedMiddleware) } diff --git a/packages/toolkit/src/dynamicMiddleware/react/index.ts b/packages/toolkit/src/dynamicMiddleware/react/index.ts index ed2c4d9fe3..83a8194606 100644 --- a/packages/toolkit/src/dynamicMiddleware/react/index.ts +++ b/packages/toolkit/src/dynamicMiddleware/react/index.ts @@ -23,23 +23,23 @@ import type { export type UseDispatchWithMiddlewareHook< Middlewares extends Middleware[] = [], State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = () => TSHelpersExtractDispatchExtensions & Dispatch export type CreateDispatchWithMiddlewareHook< State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { < Middlewares extends [ Middleware, - ...Middleware[] - ] + ...Middleware[], + ], >( ...middlewares: Middlewares ): UseDispatchWithMiddlewareHook withTypes< - MiddlewareConfig extends MiddlewareApiConfig + MiddlewareConfig extends MiddlewareApiConfig, >(): CreateDispatchWithMiddlewareHook< GetState, GetDispatch @@ -51,12 +51,12 @@ type ActionFromDispatch> = interface ReactDynamicMiddlewareInstance< State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > extends DynamicMiddlewareInstance { createDispatchWithMiddlewareHookFactory: ( context?: Context< ReactReduxContextValue> - > + >, ) => CreateDispatchWithMiddlewareHook createDispatchWithMiddlewareHook: CreateDispatchWithMiddlewareHook< State, @@ -66,14 +66,14 @@ interface ReactDynamicMiddlewareInstance< export const createDynamicMiddleware = < State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, >(): ReactDynamicMiddlewareInstance => { const instance = cDM() const createDispatchWithMiddlewareHookFactory = ( // @ts-ignore context: Context< ReactReduxContextValue> - > = ReactReduxContext + > = ReactReduxContext, ) => { const useDispatch = // @ts-ignore @@ -81,7 +81,7 @@ export const createDynamicMiddleware = < ? useDefaultDispatch : createDispatchHook(context) function createDispatchWithMiddlewareHook< - Middlewares extends Middleware[] + Middlewares extends Middleware[], >(...middlewares: Middlewares) { instance.addMiddleware(...middlewares) return useDispatch diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts index c34bc364b7..7273273530 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.test-d.ts @@ -37,15 +37,15 @@ describe('type tests', () => { typedInstance.addMiddleware( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) const dispatch = store.dispatch( typedInstance.withMiddleware( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware - ) + incompatibleMiddleware, + ), ) }) @@ -58,7 +58,7 @@ describe('type tests', () => { addMiddleware( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) const withMiddleware = untypedInstance.withMiddleware.withTypes<{ @@ -70,14 +70,14 @@ describe('type tests', () => { withMiddleware( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware - ) + incompatibleMiddleware, + ), ) }) test('withMiddleware returns typed dispatch, with any applicable extensions', () => { const dispatch = store.dispatch( - typedInstance.withMiddleware(addedMiddleware) + typedInstance.withMiddleware(addedMiddleware), ) // standard diff --git a/packages/toolkit/src/dynamicMiddleware/tests/index.test.ts b/packages/toolkit/src/dynamicMiddleware/tests/index.test.ts index 7f3e0885a2..5c97d834d3 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/index.test.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/index.test.ts @@ -20,7 +20,7 @@ const matchId = action.payload === id export const makeProbeableMiddleware = ( - id: Id + id: Id, ): Middleware<{ (action: PayloadAction): Id }> => { @@ -65,7 +65,7 @@ describe('createDynamicMiddleware', () => { expect(store.dispatch(probeMiddleware(2))).toEqual(probeMiddleware(2)) const dispatch = store.dispatch( - dynamicInstance.withMiddleware(makeProbeableMiddleware(2)) + dynamicInstance.withMiddleware(makeProbeableMiddleware(2)), ) expect(dispatch).toEqual(expect.any(Function)) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts index f7c8d6645a..ed8955fd2d 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts +++ b/packages/toolkit/src/dynamicMiddleware/tests/react.test-d.ts @@ -24,7 +24,7 @@ describe('type tests', () => { const useDispatch = typedInstance.createDispatchWithMiddlewareHook( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) const createDispatchWithMiddlewareHook = @@ -32,7 +32,7 @@ describe('type tests', () => { const useDispatchWithContext = createDispatchWithMiddlewareHook( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) }) @@ -45,7 +45,7 @@ describe('type tests', () => { const useDispatch = createDispatchWithMiddlewareHook( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) const createCustomDispatchWithMiddlewareHook = untypedInstance @@ -57,7 +57,7 @@ describe('type tests', () => { const useCustomDispatch = createCustomDispatchWithMiddlewareHook( compatibleMiddleware, // @ts-expect-error - incompatibleMiddleware + incompatibleMiddleware, ) }) diff --git a/packages/toolkit/src/dynamicMiddleware/tests/react.test.tsx b/packages/toolkit/src/dynamicMiddleware/tests/react.test.tsx index 86581586d2..546c1077f5 100644 --- a/packages/toolkit/src/dynamicMiddleware/tests/react.test.tsx +++ b/packages/toolkit/src/dynamicMiddleware/tests/react.test.tsx @@ -24,7 +24,7 @@ describe('createReactDynamicMiddleware', () => { expect(store.dispatch(probeMiddleware(1))).toBe(1) const useDispatch = dynamicInstance.createDispatchWithMiddlewareHook( - makeProbeableMiddleware(2) + makeProbeableMiddleware(2), ) // injected @@ -40,7 +40,7 @@ describe('createReactDynamicMiddleware', () => { }) const useDispatch = dynamicInstance.createDispatchWithMiddlewareHook( - makeProbeableMiddleware(2) + makeProbeableMiddleware(2), ) let dispatch: Dispatch | undefined @@ -77,7 +77,7 @@ describe('createReactDynamicMiddleware', () => { dynamicInstance.createDispatchWithMiddlewareHookFactory(context) const useDispatch = createDispatchWithMiddlewareHook( - makeProbeableMiddleware(2) + makeProbeableMiddleware(2), ) let dispatch: Dispatch | undefined diff --git a/packages/toolkit/src/dynamicMiddleware/types.ts b/packages/toolkit/src/dynamicMiddleware/types.ts index dc3d563c3c..70590afbcb 100644 --- a/packages/toolkit/src/dynamicMiddleware/types.ts +++ b/packages/toolkit/src/dynamicMiddleware/types.ts @@ -32,7 +32,7 @@ export type GetDispatch = MiddlewareApiConfig extends { export type AddMiddleware< State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { (...middlewares: Middleware[]): void withTypes(): AddMiddleware< @@ -43,7 +43,7 @@ export type AddMiddleware< export interface WithMiddleware< State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > extends BaseActionCreator< Middleware[], 'dynamicMiddleware/add', @@ -61,13 +61,13 @@ export interface WithMiddleware< export interface DynamicDispatch { // return a version of dispatch that knows about middleware []>( - action: PayloadAction + action: PayloadAction, ): ExtractDispatchExtensions & this } export type MiddlewareEntry< State = unknown, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { id: string middleware: Middleware @@ -79,12 +79,12 @@ export type MiddlewareEntry< export type DynamicMiddleware< State = unknown, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = Middleware export type DynamicMiddlewareInstance< State = unknown, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { middleware: DynamicMiddleware addMiddleware: AddMiddleware diff --git a/packages/toolkit/src/entities/create_adapter.ts b/packages/toolkit/src/entities/create_adapter.ts index 83ad6c6515..726ad82c32 100644 --- a/packages/toolkit/src/entities/create_adapter.ts +++ b/packages/toolkit/src/entities/create_adapter.ts @@ -34,7 +34,7 @@ export function createEntityAdapter( options: { selectId?: IdSelector sortComparer?: false | Comparer - } = {} + } = {}, ): EntityAdapter { const { selectId, sortComparer }: EntityDefinition = { sortComparer: false, diff --git a/packages/toolkit/src/entities/entity_state.ts b/packages/toolkit/src/entities/entity_state.ts index 62ab918442..6b0744cdee 100644 --- a/packages/toolkit/src/entities/entity_state.ts +++ b/packages/toolkit/src/entities/entity_state.ts @@ -13,7 +13,7 @@ export function getInitialEntityState(): EntityState< export function createInitialStateFactory() { function getInitialState(): EntityState function getInitialState( - additionalState: S + additionalState: S, ): EntityState & S function getInitialState(additionalState: any = {}): any { return Object.assign(getInitialEntityState(), additionalState) diff --git a/packages/toolkit/src/entities/models.ts b/packages/toolkit/src/entities/models.ts index 068dfc227d..a7ec0238d9 100644 --- a/packages/toolkit/src/entities/models.ts +++ b/packages/toolkit/src/entities/models.ts @@ -43,9 +43,11 @@ export interface EntityDefinition { export type PreventAny = CastAny< S, EntityState - > +> -export type DraftableEntityState = EntityState | Draft> +export type DraftableEntityState = + | EntityState + | Draft> /** * @public @@ -53,101 +55,103 @@ export type DraftableEntityState = EntityState | export interface EntityStateAdapter { addOne>( state: PreventAny, - entity: T + entity: T, ): S addOne>( state: PreventAny, - action: PayloadAction + action: PayloadAction, ): S addMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S addMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S setOne>( state: PreventAny, - entity: T + entity: T, ): S setOne>( state: PreventAny, - action: PayloadAction + action: PayloadAction, ): S setMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S setMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S setAll>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S setAll>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S removeOne>( state: PreventAny, - key: Id + key: Id, ): S removeOne>( state: PreventAny, - key: PayloadAction + key: PayloadAction, ): S removeMany>( state: PreventAny, - keys: readonly Id[] + keys: readonly Id[], ): S removeMany>( state: PreventAny, - keys: PayloadAction + keys: PayloadAction, ): S - removeAll>(state: PreventAny): S + removeAll>( + state: PreventAny, + ): S updateOne>( state: PreventAny, - update: Update + update: Update, ): S updateOne>( state: PreventAny, - update: PayloadAction> + update: PayloadAction>, ): S updateMany>( state: PreventAny, - updates: ReadonlyArray> + updates: ReadonlyArray>, ): S updateMany>( state: PreventAny, - updates: PayloadAction>> + updates: PayloadAction>>, ): S upsertOne>( state: PreventAny, - entity: T + entity: T, ): S upsertOne>( state: PreventAny, - entity: PayloadAction + entity: PayloadAction, ): S upsertMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S upsertMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S } @@ -173,10 +177,10 @@ export interface EntityAdapter getInitialState(state: S): EntityState & S getSelectors( selectState?: undefined, - options?: GetSelectorsOptions + options?: GetSelectorsOptions, ): EntitySelectors, Id> getSelectors( selectState: (state: V) => EntityState, - options?: GetSelectorsOptions + options?: GetSelectorsOptions, ): EntitySelectors } diff --git a/packages/toolkit/src/entities/sorted_state_adapter.ts b/packages/toolkit/src/entities/sorted_state_adapter.ts index 91645d1af0..1a2af5c527 100644 --- a/packages/toolkit/src/entities/sorted_state_adapter.ts +++ b/packages/toolkit/src/entities/sorted_state_adapter.ts @@ -4,7 +4,7 @@ import type { EntityStateAdapter, Update, EntityId, - DraftableEntityState + DraftableEntityState, } from './models' import { createStateOperator } from './state_adapter' import { createUnsortedStateAdapter } from './unsorted_state_adapter' @@ -16,7 +16,7 @@ import { export function createSortedStateAdapter( selectId: IdSelector, - sort: Comparer + sort: Comparer, ): EntityStateAdapter { type R = DraftableEntityState @@ -29,12 +29,12 @@ export function createSortedStateAdapter( function addManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) const models = newEntities.filter( - (model) => !(selectIdValue(model, selectId) in state.entities) + (model) => !(selectIdValue(model, selectId) in state.entities), ) if (models.length !== 0) { @@ -48,7 +48,7 @@ export function createSortedStateAdapter( function setManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) if (newEntities.length !== 0) { @@ -58,7 +58,7 @@ export function createSortedStateAdapter( function setAllMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) state.entities = {} as Record @@ -73,7 +73,7 @@ export function createSortedStateAdapter( function updateManyMutably( updates: ReadonlyArray>, - state: R + state: R, ): void { let appliedUpdates = false @@ -88,8 +88,8 @@ export function createSortedStateAdapter( Object.assign(entity, update.changes) const newId = selectId(entity) if (update.id !== newId) { - delete (state.entities as Record)[update.id]; - (state.entities as Record)[newId] = entity + delete (state.entities as Record)[update.id] + ;(state.entities as Record)[newId] = entity } } @@ -104,12 +104,12 @@ export function createSortedStateAdapter( function upsertManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { const [added, updated] = splitAddedUpdatedEntities( newEntities, selectId, - state + state, ) updateManyMutably(updated, state) @@ -133,7 +133,7 @@ export function createSortedStateAdapter( function merge(models: readonly T[], state: R): void { // Insert/overwrite all new/updated models.forEach((model) => { - (state.entities as Record)[selectId(model)] = model + ;(state.entities as Record)[selectId(model)] = model }) resortEntities(state) diff --git a/packages/toolkit/src/entities/state_adapter.ts b/packages/toolkit/src/entities/state_adapter.ts index 93738d21c2..f13d3e3c90 100644 --- a/packages/toolkit/src/entities/state_adapter.ts +++ b/packages/toolkit/src/entities/state_adapter.ts @@ -1,34 +1,36 @@ import { produce as createNextState, isDraft } from 'immer' -import type { Draft } from 'immer' +import type { Draft } from 'immer' import type { EntityId, DraftableEntityState, PreventAny } from './models' import type { PayloadAction } from '../createAction' import { isFSA } from '../createAction' -export const isDraftTyped = isDraft as (value: T | Draft) => value is Draft +export const isDraftTyped = isDraft as ( + value: T | Draft, +) => value is Draft export function createSingleArgumentStateOperator( - mutator: (state: DraftableEntityState) => void + mutator: (state: DraftableEntityState) => void, ) { const operator = createStateOperator( - (_: undefined, state: DraftableEntityState) => mutator(state) + (_: undefined, state: DraftableEntityState) => mutator(state), ) return function operation>( - state: PreventAny + state: PreventAny, ): S { return operator(state as S, undefined) } } export function createStateOperator( - mutator: (arg: R, state: DraftableEntityState) => void + mutator: (arg: R, state: DraftableEntityState) => void, ) { return function operation>( state: S, - arg: R | PayloadAction + arg: R | PayloadAction, ): S { function isPayloadActionArgument( - arg: R | PayloadAction + arg: R | PayloadAction, ): arg is PayloadAction { return isFSA(arg) } @@ -50,7 +52,7 @@ export function createStateOperator( // since it's a draft, we'll just return it return state } - + return createNextState(state, runMutator) } } diff --git a/packages/toolkit/src/entities/state_selectors.ts b/packages/toolkit/src/entities/state_selectors.ts index f8f04449df..bd64cf001b 100644 --- a/packages/toolkit/src/entities/state_selectors.ts +++ b/packages/toolkit/src/entities/state_selectors.ts @@ -15,17 +15,19 @@ export interface GetSelectorsOptions { export function createSelectorsFactory() { function getSelectors( selectState?: undefined, - options?: GetSelectorsOptions + options?: GetSelectorsOptions, ): EntitySelectors, Id> function getSelectors( selectState: (state: V) => EntityState, - options?: GetSelectorsOptions + options?: GetSelectorsOptions, ): EntitySelectors function getSelectors( selectState?: (state: V) => EntityState, - options: GetSelectorsOptions = {} + options: GetSelectorsOptions = {}, ): EntitySelectors { - const { createSelector = createDraftSafeSelector as AnyCreateSelectorFunction } = options + const { + createSelector = createDraftSafeSelector as AnyCreateSelectorFunction, + } = options const selectIds = (state: EntityState) => state.ids @@ -34,7 +36,7 @@ export function createSelectorsFactory() { const selectAll = createSelector( selectIds, selectEntities, - (ids, entities): T[] => ids.map((id) => entities[id]!) + (ids, entities): T[] => ids.map((id) => entities[id]!), ) const selectId = (_: unknown, id: Id) => id @@ -55,7 +57,7 @@ export function createSelectorsFactory() { const selectGlobalizedEntities = createSelector( selectState as Selector>, - selectEntities + selectEntities, ) return { @@ -66,7 +68,7 @@ export function createSelectorsFactory() { selectById: createSelector( selectGlobalizedEntities, selectId, - selectById + selectById, ), } } diff --git a/packages/toolkit/src/entities/tests/entity_slice_enhancer.test.ts b/packages/toolkit/src/entities/tests/entity_slice_enhancer.test.ts index 9e8e380815..0842a20505 100644 --- a/packages/toolkit/src/entities/tests/entity_slice_enhancer.test.ts +++ b/packages/toolkit/src/entities/tests/entity_slice_enhancer.test.ts @@ -1,15 +1,20 @@ -import { createEntityAdapter, createSlice } from "../.."; -import type { PayloadAction, Slice, SliceCaseReducers, UnknownAction } from "../.."; -import type { EntityId, EntityState, IdSelector } from "../models"; -import type { BookModel } from "./fixtures/book"; +import { createEntityAdapter, createSlice } from '../..' +import type { + PayloadAction, + Slice, + SliceCaseReducers, + UnknownAction, +} from '../..' +import type { EntityId, EntityState, IdSelector } from '../models' +import type { BookModel } from './fixtures/book' describe('Entity Slice Enhancer', () => { - let slice: Slice>; + let slice: Slice> beforeEach(() => { const indieSlice = entitySliceEnhancer({ name: 'book', - selectId: (book: BookModel) => book.id + selectId: (book: BookModel) => book.id, }) slice = indieSlice }) @@ -18,7 +23,7 @@ describe('Entity Slice Enhancer', () => { const book = { id: '0', title: 'Der Steppenwolf', - author: 'Herman Hesse' + author: 'Herman Hesse', } const action = slice.actions.oneAdded(book) const oneAdded = slice.reducer(undefined, action as UnknownAction) @@ -35,23 +40,20 @@ interface EntitySliceArgs { function entitySliceEnhancer({ name, selectId, - modelReducer + modelReducer, }: EntitySliceArgs) { const modelAdapter = createEntityAdapter({ - selectId - }); + selectId, + }) return createSlice({ name, initialState: modelAdapter.getInitialState(), reducers: { oneAdded(state, action: PayloadAction) { - modelAdapter.addOne( - state, - action.payload - ) + modelAdapter.addOne(state, action.payload) }, - ...modelReducer - } + ...modelReducer, + }, }) } diff --git a/packages/toolkit/src/entities/tests/sorted_state_adapter.test.ts b/packages/toolkit/src/entities/tests/sorted_state_adapter.test.ts index ff691a8326..9683715fb8 100644 --- a/packages/toolkit/src/entities/tests/sorted_state_adapter.test.ts +++ b/packages/toolkit/src/entities/tests/sorted_state_adapter.test.ts @@ -360,7 +360,7 @@ describe('Sorted State Adapter', () => { { id: 'C', order: 3, ts: 0 }, { id: 'D', order: 3, ts: 0 }, { id: 'E', order: 3, ts: 0 }, - ] + ], ) const updated = sortedItemsAdapter.updateOne(withInitialItems, { diff --git a/packages/toolkit/src/entities/tests/state_selectors.test.ts b/packages/toolkit/src/entities/tests/state_selectors.test.ts index f581965be3..3afba41ac6 100644 --- a/packages/toolkit/src/entities/tests/state_selectors.test.ts +++ b/packages/toolkit/src/entities/tests/state_selectors.test.ts @@ -132,7 +132,7 @@ describe('Entity State Selectors', () => { it('should use the custom createSelector function if provided', () => { const memoizeSpy = vi.fn( // test that we're allowed to pass memoizers with different options, as long as they're optional - any>(fn: F, param?: boolean) => fn + any>(fn: F, param?: boolean) => fn, ) const createCustomSelector = createDraftSafeSelectorCreator(memoizeSpy) diff --git a/packages/toolkit/src/entities/unsorted_state_adapter.ts b/packages/toolkit/src/entities/unsorted_state_adapter.ts index 1b74a01479..e2d6c31357 100644 --- a/packages/toolkit/src/entities/unsorted_state_adapter.ts +++ b/packages/toolkit/src/entities/unsorted_state_adapter.ts @@ -4,7 +4,7 @@ import type { IdSelector, Update, EntityId, - DraftableEntityState + DraftableEntityState, } from './models' import { createStateOperator, @@ -17,7 +17,7 @@ import { } from './utils' export function createUnsortedStateAdapter( - selectId: IdSelector + selectId: IdSelector, ): EntityStateAdapter { type R = DraftableEntityState @@ -28,13 +28,13 @@ export function createUnsortedStateAdapter( return } - state.ids.push(key as Id & Draft); - (state.entities as Record)[key] = entity + state.ids.push(key as Id & Draft) + ;(state.entities as Record)[key] = entity } function addManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) @@ -46,14 +46,14 @@ export function createUnsortedStateAdapter( function setOneMutably(entity: T, state: R): void { const key = selectIdValue(entity, selectId) if (!(key in state.entities)) { - state.ids.push(key as Id & Draft); + state.ids.push(key as Id & Draft) } - (state.entities as Record)[key] = entity + ;(state.entities as Record)[key] = entity } function setManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) for (const entity of newEntities) { @@ -63,7 +63,7 @@ export function createUnsortedStateAdapter( function setAllMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { newEntities = ensureEntitiesArray(newEntities) @@ -88,7 +88,9 @@ export function createUnsortedStateAdapter( }) if (didMutate) { - state.ids = (state.ids as Id[]).filter((id) => id in state.entities) as Id[] | Draft + state.ids = (state.ids as Id[]).filter((id) => id in state.entities) as + | Id[] + | Draft } } @@ -102,7 +104,7 @@ export function createUnsortedStateAdapter( function takeNewKey( keys: { [id: string]: Id }, update: Update, - state: R + state: R, ): boolean { const original: T | undefined = (state.entities as Record)[update.id] if (original === undefined) { @@ -117,7 +119,7 @@ export function createUnsortedStateAdapter( delete (state.entities as Record)[update.id] } - (state.entities as Record)[newKey] = updated + ;(state.entities as Record)[newKey] = updated return hasNewKey } @@ -128,7 +130,7 @@ export function createUnsortedStateAdapter( function updateManyMutably( updates: ReadonlyArray>, - state: R + state: R, ): void { const newKeys: { [id: string]: Id } = {} @@ -163,7 +165,7 @@ export function createUnsortedStateAdapter( if (didMutateIds) { state.ids = Object.values(state.entities).map((e) => - selectIdValue(e as T, selectId) + selectIdValue(e as T, selectId), ) } } @@ -175,12 +177,12 @@ export function createUnsortedStateAdapter( function upsertManyMutably( newEntities: readonly T[] | Record, - state: R + state: R, ): void { const [added, updated] = splitAddedUpdatedEntities( newEntities, selectId, - state + state, ) updateManyMutably(updated, state) diff --git a/packages/toolkit/src/entities/utils.ts b/packages/toolkit/src/entities/utils.ts index 71435e3a01..5e3fb92fc1 100644 --- a/packages/toolkit/src/entities/utils.ts +++ b/packages/toolkit/src/entities/utils.ts @@ -1,8 +1,13 @@ -import type { IdSelector, Update, EntityId, DraftableEntityState } from './models' +import type { + IdSelector, + Update, + EntityId, + DraftableEntityState, +} from './models' export function selectIdValue( entity: T, - selectId: IdSelector + selectId: IdSelector, ) { const key = selectId(entity) @@ -13,7 +18,7 @@ export function selectIdValue( 'The entity that was passed:', entity, 'The `selectId` implementation:', - selectId.toString() + selectId.toString(), ) } @@ -21,7 +26,7 @@ export function selectIdValue( } export function ensureEntitiesArray( - entities: readonly T[] | Record + entities: readonly T[] | Record, ): readonly T[] { if (!Array.isArray(entities)) { entities = Object.values(entities) @@ -33,7 +38,7 @@ export function ensureEntitiesArray( export function splitAddedUpdatedEntities( newEntities: readonly T[] | Record, selectId: IdSelector, - state: DraftableEntityState + state: DraftableEntityState, ): [T[], Update[]] { newEntities = ensureEntitiesArray(newEntities) diff --git a/packages/toolkit/src/getDefaultEnhancers.ts b/packages/toolkit/src/getDefaultEnhancers.ts index 6d13646482..bfc3a3aa57 100644 --- a/packages/toolkit/src/getDefaultEnhancers.ts +++ b/packages/toolkit/src/getDefaultEnhancers.ts @@ -10,11 +10,11 @@ type GetDefaultEnhancersOptions = { } export type GetDefaultEnhancers> = ( - options?: GetDefaultEnhancersOptions + options?: GetDefaultEnhancersOptions, ) => Tuple<[StoreEnhancer<{ dispatch: ExtractDispatchExtensions }>]> export const buildGetDefaultEnhancers = >( - middlewareEnhancer: StoreEnhancer<{ dispatch: ExtractDispatchExtensions }> + middlewareEnhancer: StoreEnhancer<{ dispatch: ExtractDispatchExtensions }>, ): GetDefaultEnhancers => function getDefaultEnhancers(options) { const { autoBatch = true } = options ?? {} @@ -22,7 +22,9 @@ export const buildGetDefaultEnhancers = >( let enhancerArray = new Tuple(middlewareEnhancer) if (autoBatch) { enhancerArray.push( - autoBatchEnhancer(typeof autoBatch === 'object' ? autoBatch : undefined) + autoBatchEnhancer( + typeof autoBatch === 'object' ? autoBatch : undefined, + ), ) } return enhancerArray as any diff --git a/packages/toolkit/src/getDefaultMiddleware.ts b/packages/toolkit/src/getDefaultMiddleware.ts index 6ec507b4ce..95464ceb98 100644 --- a/packages/toolkit/src/getDefaultMiddleware.ts +++ b/packages/toolkit/src/getDefaultMiddleware.ts @@ -30,14 +30,14 @@ interface GetDefaultMiddlewareOptions { export type ThunkMiddlewareFor< S, - O extends GetDefaultMiddlewareOptions = {} + O extends GetDefaultMiddlewareOptions = {}, > = O extends { thunk: false } ? never : O extends { thunk: { extraArgument: infer E } } - ? ThunkMiddleware - : ThunkMiddleware + ? ThunkMiddleware + : ThunkMiddleware export type GetDefaultMiddleware = < O extends GetDefaultMiddlewareOptions = { @@ -45,9 +45,9 @@ export type GetDefaultMiddleware = < immutableCheck: true serializableCheck: true actionCreatorCheck: true - } + }, >( - options?: O + options?: O, ) => Tuple], never>> export const buildGetDefaultMiddleware = (): GetDefaultMiddleware => @@ -79,7 +79,7 @@ export const buildGetDefaultMiddleware = (): GetDefaultMiddleware => } middlewareArray.unshift( - createImmutableStateInvariantMiddleware(immutableOptions) + createImmutableStateInvariantMiddleware(immutableOptions), ) /* PROD_STOP_REMOVE_UMD */ } @@ -93,7 +93,7 @@ export const buildGetDefaultMiddleware = (): GetDefaultMiddleware => } middlewareArray.push( - createSerializableStateInvariantMiddleware(serializableOptions) + createSerializableStateInvariantMiddleware(serializableOptions), ) } if (actionCreatorCheck) { @@ -104,7 +104,7 @@ export const buildGetDefaultMiddleware = (): GetDefaultMiddleware => } middlewareArray.unshift( - createActionCreatorInvariantMiddleware(actionCreatorOptions) + createActionCreatorInvariantMiddleware(actionCreatorOptions), ) } } diff --git a/packages/toolkit/src/immutableStateInvariantMiddleware.ts b/packages/toolkit/src/immutableStateInvariantMiddleware.ts index 90f3a8ebe1..84fc782f56 100644 --- a/packages/toolkit/src/immutableStateInvariantMiddleware.ts +++ b/packages/toolkit/src/immutableStateInvariantMiddleware.ts @@ -15,7 +15,7 @@ export function isImmutableDefault(value: unknown): boolean { export function trackForMutations( isImmutable: IsImmutableFunc, ignorePaths: IgnorePaths | undefined, - obj: any + obj: any, ) { const trackedProperties = trackProperties(isImmutable, ignorePaths, obj) return { @@ -35,7 +35,7 @@ function trackProperties( ignorePaths: IgnorePaths = [], obj: Record, path: string = '', - checkedObjects: Set> = new Set() + checkedObjects: Set> = new Set(), ) { const tracked: Partial = { value: obj } @@ -53,7 +53,7 @@ function trackProperties( isImmutable, ignorePaths, obj[key], - childPath + childPath, ) } } @@ -68,7 +68,7 @@ function detectMutations( trackedProperty: TrackedProperty, obj: any, sameParentRef: boolean = false, - path: string = '' + path: string = '', ): { wasMutated: boolean; path?: string } { const prevObj = trackedProperty ? trackedProperty.value : undefined @@ -114,7 +114,7 @@ function detectMutations( trackedProperty.children[key], obj[key], sameRef, - nestedPath + nestedPath, ) if (result.wasMutated) { @@ -159,7 +159,7 @@ export interface ImmutableStateInvariantMiddlewareOptions { * @public */ export function createImmutableStateInvariantMiddleware( - options: ImmutableStateInvariantMiddlewareOptions = {} + options: ImmutableStateInvariantMiddlewareOptions = {}, ): Middleware { if (process.env.NODE_ENV === 'production') { return () => (next) => (action) => next(action) @@ -168,14 +168,14 @@ export function createImmutableStateInvariantMiddleware( obj: any, serializer?: EntryProcessor, indent?: string | number, - decycler?: EntryProcessor + decycler?: EntryProcessor, ): string { return JSON.stringify(obj, getSerialize(serializer, decycler), indent) } function getSerialize( serializer?: EntryProcessor, - decycler?: EntryProcessor + decycler?: EntryProcessor, ): EntryProcessor { let stack: any[] = [], keys: any[] = [] @@ -216,7 +216,7 @@ export function createImmutableStateInvariantMiddleware( return (next) => (action) => { const measureUtils = getTimeMeasureUtils( warnAfter, - 'ImmutableStateInvariantMiddleware' + 'ImmutableStateInvariantMiddleware', ) measureUtils.measureTime(() => { @@ -230,7 +230,7 @@ export function createImmutableStateInvariantMiddleware( throw new Error( `A state mutation was detected between dispatches, in the path '${ result.path || '' - }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)` + }'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`, ) } }) @@ -249,8 +249,8 @@ export function createImmutableStateInvariantMiddleware( `A state mutation was detected inside a dispatch, in the path: ${ result.path || '' }. Take a look at the reducer(s) handling the action ${stringify( - action - )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)` + action, + )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`, ) } }) diff --git a/packages/toolkit/src/index.ts b/packages/toolkit/src/index.ts index 1c8d41af43..6c94d1df0c 100644 --- a/packages/toolkit/src/index.ts +++ b/packages/toolkit/src/index.ts @@ -203,6 +203,9 @@ export { combineSlices } from './combineSlices' export type { WithSlice } from './combineSlices' -export type { ExtractDispatchExtensions as TSHelpersExtractDispatchExtensions, SafePromise } from './tsHelpers' +export type { + ExtractDispatchExtensions as TSHelpersExtractDispatchExtensions, + SafePromise, +} from './tsHelpers' export { formatProdErrorMessage } from './formatProdErrorMessage' diff --git a/packages/toolkit/src/listenerMiddleware/index.ts b/packages/toolkit/src/listenerMiddleware/index.ts index e87a53f256..03d68eba0d 100644 --- a/packages/toolkit/src/listenerMiddleware/index.ts +++ b/packages/toolkit/src/listenerMiddleware/index.ts @@ -84,16 +84,16 @@ const alm = 'listenerMiddleware' as const const createFork = ( parentAbortSignal: AbortSignalWithReason, - parentBlockingPromises: Promise[] + parentBlockingPromises: Promise[], ) => { const linkControllers = (controller: AbortController) => addAbortSignalListener(parentAbortSignal, () => - abortControllerWithReason(controller, parentAbortSignal.reason) + abortControllerWithReason(controller, parentAbortSignal.reason), ) return ( taskExecutor: ForkedTaskExecutor, - opts?: ForkOptions + opts?: ForkOptions, ): ForkedTask => { assertFunction(taskExecutor, 'taskExecutor') const childAbortController = new AbortController() @@ -112,7 +112,7 @@ const createFork = ( validateActive(childAbortController.signal) return result }, - () => abortControllerWithReason(childAbortController, taskCompleted) + () => abortControllerWithReason(childAbortController, taskCompleted), ) if (opts?.autoJoin) { @@ -130,7 +130,7 @@ const createFork = ( const createTakePattern = ( startListening: AddListenerOverloads, - signal: AbortSignal + signal: AbortSignal, ): TakePattern => { /** * A function that takes a ListenerPredicate and an optional timeout, @@ -141,7 +141,7 @@ const createTakePattern = ( */ const take = async

>( predicate: P, - timeout: number | undefined + timeout: number | undefined, ) => { validateActive(signal) @@ -173,7 +173,7 @@ const createTakePattern = ( if (timeout != null) { promises.push( - new Promise((resolve) => setTimeout(resolve, timeout, null)) + new Promise((resolve) => setTimeout(resolve, timeout, null)), ) } @@ -206,7 +206,7 @@ const getListenerEntryPropsFrom = (options: FallbackAddListenerOptions) => { // pass } else { throw new Error( - 'Creating or removing a listener requires one of the known fields for matching an action' + 'Creating or removing a listener requires one of the known fields for matching an action', ) } @@ -235,11 +235,11 @@ export const createListenerEntry: TypedCreateListenerEntry = return entry }, - { withTypes: () => createListenerEntry } + { withTypes: () => createListenerEntry }, ) as unknown as TypedCreateListenerEntry const cancelActiveListeners = ( - entry: ListenerEntry> + entry: ListenerEntry>, ) => { entry.pending.forEach((controller) => { abortControllerWithReason(controller, listenerCancelled) @@ -247,7 +247,7 @@ const cancelActiveListeners = ( } const createClearListenerMiddleware = ( - listenerMap: Map + listenerMap: Map, ) => { return () => { listenerMap.forEach(cancelActiveListeners) @@ -266,7 +266,7 @@ const createClearListenerMiddleware = ( const safelyNotifyError = ( errorHandler: ListenerErrorHandler, errorToNotify: unknown, - errorInfo: ListenerErrorInfo + errorInfo: ListenerErrorInfo, ): void => { try { errorHandler(errorToNotify, errorInfo) @@ -312,9 +312,9 @@ export const createListenerMiddleware = < unknown, UnknownAction >, - ExtraArgument = unknown + ExtraArgument = unknown, >( - middlewareOptions: CreateListenerMiddlewareOptions = {} + middlewareOptions: CreateListenerMiddlewareOptions = {}, ) => { const listenerMap = new Map() const { extra, onError = defaultErrorHandler } = middlewareOptions @@ -336,7 +336,7 @@ export const createListenerMiddleware = < const startListening = ((options: FallbackAddListenerOptions) => { let entry = find( Array.from(listenerMap.values()), - (existingEntry) => existingEntry.effect === options.effect + (existingEntry) => existingEntry.effect === options.effect, ) if (!entry) { @@ -351,7 +351,7 @@ export const createListenerMiddleware = < }) const stopListening = ( - options: FallbackAddListenerOptions & UnsubscribeListenerOptions + options: FallbackAddListenerOptions & UnsubscribeListenerOptions, ): boolean => { const { type, effect, predicate } = getListenerEntryPropsFrom(options) @@ -382,12 +382,12 @@ export const createListenerMiddleware = < entry: ListenerEntry>, action: unknown, api: MiddlewareAPI, - getOriginalState: () => StateType + getOriginalState: () => StateType, ) => { const internalTaskController = new AbortController() const take = createTakePattern( startListening as AddListenerOverloads, - internalTaskController.signal + internalTaskController.signal, ) const autoJoinPromises: Promise[] = [] @@ -401,7 +401,7 @@ export const createListenerMiddleware = < getOriginalState, condition: ( predicate: AnyListenerPredicate, - timeout?: number + timeout?: number, ) => take(predicate, timeout).then(Boolean), take, delay: createDelay(internalTaskController.signal), @@ -424,15 +424,15 @@ export const createListenerMiddleware = < cancel: () => { abortControllerWithReason( internalTaskController, - listenerCancelled + listenerCancelled, ) entry.pending.delete(internalTaskController) }, throwIfCancelled: () => { validateActive(internalTaskController.signal) }, - }) - ) + }), + ), ) } catch (listenerError) { if (!(listenerError instanceof TaskAbortError)) { @@ -450,79 +450,82 @@ export const createListenerMiddleware = < const clearListenerMiddleware = createClearListenerMiddleware(listenerMap) - const middleware: ListenerMiddleware = - (api) => (next) => (action) => { - if (!isAction(action)) { - // we only want to notify listeners for action objects - return next(action) - } - - if (addListener.match(action)) { - return startListening(action.payload as any) - } + const middleware: ListenerMiddleware< + StateType, + DispatchType, + ExtraArgument + > = (api) => (next) => (action) => { + if (!isAction(action)) { + // we only want to notify listeners for action objects + return next(action) + } - if (clearAllListeners.match(action)) { - clearListenerMiddleware() - return - } + if (addListener.match(action)) { + return startListening(action.payload as any) + } - if (removeListener.match(action)) { - return stopListening(action.payload) - } + if (clearAllListeners.match(action)) { + clearListenerMiddleware() + return + } - // Need to get this state _before_ the reducer processes the action - let originalState: StateType | typeof INTERNAL_NIL_TOKEN = api.getState() + if (removeListener.match(action)) { + return stopListening(action.payload) + } - // `getOriginalState` can only be called synchronously. - // @see https://github.com/reduxjs/redux-toolkit/discussions/1648#discussioncomment-1932820 - const getOriginalState = (): StateType => { - if (originalState === INTERNAL_NIL_TOKEN) { - throw new Error( - `${alm}: getOriginalState can only be called synchronously` - ) - } + // Need to get this state _before_ the reducer processes the action + let originalState: StateType | typeof INTERNAL_NIL_TOKEN = api.getState() - return originalState as StateType + // `getOriginalState` can only be called synchronously. + // @see https://github.com/reduxjs/redux-toolkit/discussions/1648#discussioncomment-1932820 + const getOriginalState = (): StateType => { + if (originalState === INTERNAL_NIL_TOKEN) { + throw new Error( + `${alm}: getOriginalState can only be called synchronously`, + ) } - let result: unknown - - try { - // Actually forward the action to the reducer before we handle listeners - result = next(action) - - if (listenerMap.size > 0) { - const currentState = api.getState() - // Work around ESBuild+TS transpilation issue - const listenerEntries = Array.from(listenerMap.values()) - for (const entry of listenerEntries) { - let runListener = false - - try { - runListener = entry.predicate(action, currentState, originalState) - } catch (predicateError) { - runListener = false + return originalState as StateType + } - safelyNotifyError(onError, predicateError, { - raisedBy: 'predicate', - }) - } + let result: unknown - if (!runListener) { - continue - } + try { + // Actually forward the action to the reducer before we handle listeners + result = next(action) + + if (listenerMap.size > 0) { + const currentState = api.getState() + // Work around ESBuild+TS transpilation issue + const listenerEntries = Array.from(listenerMap.values()) + for (const entry of listenerEntries) { + let runListener = false + + try { + runListener = entry.predicate(action, currentState, originalState) + } catch (predicateError) { + runListener = false + + safelyNotifyError(onError, predicateError, { + raisedBy: 'predicate', + }) + } - notifyListener(entry, action, api, getOriginalState) + if (!runListener) { + continue } + + notifyListener(entry, action, api, getOriginalState) } - } finally { - // Remove `originalState` store from this scope. - originalState = INTERNAL_NIL_TOKEN } - - return result + } finally { + // Remove `originalState` store from this scope. + originalState = INTERNAL_NIL_TOKEN } + return result + } + return { middleware, startListening, diff --git a/packages/toolkit/src/listenerMiddleware/task.ts b/packages/toolkit/src/listenerMiddleware/task.ts index 01f20a72c2..a2fffce0d9 100644 --- a/packages/toolkit/src/listenerMiddleware/task.ts +++ b/packages/toolkit/src/listenerMiddleware/task.ts @@ -22,7 +22,7 @@ export const validateActive = (signal: AbortSignal): void => { */ export function raceWithSignal( signal: AbortSignalWithReason, - promise: Promise + promise: Promise, ): Promise { let cleanup = noop return new Promise((resolve, reject) => { @@ -50,7 +50,7 @@ export function raceWithSignal( */ export const runTask = async ( task: () => Promise, - cleanUp?: () => void + cleanUp?: () => void, ): Promise> => { try { await Promise.resolve() @@ -82,7 +82,7 @@ export const createPause = (signal: AbortSignal) => { raceWithSignal(signal, promise).then((output) => { validateActive(signal) return output - }) + }), ) } } diff --git a/packages/toolkit/src/listenerMiddleware/tests/fork.test.ts b/packages/toolkit/src/listenerMiddleware/tests/fork.test.ts index 41a5df123f..98e0c68461 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/fork.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/fork.test.ts @@ -123,7 +123,7 @@ describe('fork', () => { }) .result.then( deferredForkedTaskError.resolve, - deferredForkedTaskError.resolve + deferredForkedTaskError.resolve, ) }, }) @@ -132,7 +132,7 @@ describe('fork', () => { store.dispatch(increment()) expect(await deferredForkedTaskError).toEqual( - new TaskAbortError(listenerCancelled) + new TaskAbortError(listenerCancelled), ) }) @@ -346,7 +346,7 @@ describe('fork', () => { store.dispatch(increment()) expect(await deferredResult).toEqual( - new TaskAbortError(listenerCancelled) + new TaskAbortError(listenerCancelled), ) }) @@ -383,13 +383,13 @@ describe('fork', () => { async (forkApi) => { forkApi.signal.addEventListener('abort', () => { deferredResult.resolve( - (forkApi.signal as AbortSignalWithReason).reason + (forkApi.signal as AbortSignalWithReason).reason, ) }) await forkApi.delay(10) }, - { autoJoin } + { autoJoin }, ) }, }) @@ -402,7 +402,7 @@ describe('fork', () => { if (cancelListener) unsubscribe({ cancelActive: true }) expect(await deferredResult).toBe(expectedAbortReason) - } + }, ) test('fork.delay does not trigger unhandledRejections for completed or cancelled tasks', async () => { @@ -418,7 +418,7 @@ describe('fork', () => { forkApi.signal.addEventListener( 'abort', deferredCompletedEvt.resolve, - { once: true } + { once: true }, ) forkApi.delay(100) // missing await @@ -433,7 +433,7 @@ describe('fork', () => { forkApi.signal.addEventListener( 'abort', deferredCompletedEvt.resolve, - { once: true } + { once: true }, ) forkApi.delay(1_000) // missing await await forkApi.pause(godotPauseTrigger) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts index 97bfbb50d2..56939af639 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.test.ts @@ -218,16 +218,16 @@ describe('createListenerMiddleware', () => { removeTypedListenerAction({ actionCreator: testAction2, effect, - }) - ) + }), + ), ).toBe(false) expect( store.dispatch( removeTypedListenerAction({ actionCreator: testAction1, effect, - }) - ) + }), + ), ).toBe(true) }) @@ -238,7 +238,7 @@ describe('createListenerMiddleware', () => { addListener({ type: testAction2.type, effect, - }) + }), ) store.dispatch(testAction2('b')) @@ -383,7 +383,7 @@ describe('createListenerMiddleware', () => { addListener({ actionCreator: testAction1, effect, - }) + }), ) store.dispatch(testAction1('a')) @@ -403,7 +403,7 @@ describe('createListenerMiddleware', () => { addListener({ actionCreator: testAction1, effect, - }) + }), ) store.dispatch(testAction1('a')) @@ -504,7 +504,7 @@ describe('createListenerMiddleware', () => { actionCreator: testAction1, effect, cancelActive: true, - }) + }), ) expect(wasCancelled).toBe(false) await delay(10) @@ -520,7 +520,7 @@ describe('createListenerMiddleware', () => { typeof store.dispatch >, 'effect' | 'withTypes' - > + >, ][] = [ ['predicate', { predicate: () => true }], ['actionCreator', { actionCreator: testAction1 }], @@ -546,7 +546,7 @@ describe('createListenerMiddleware', () => { store.dispatch(testAction1('b')) expect(effect).toBeCalledTimes(1) - } + }, ) const unforwardedActions: [string, UnknownAction][] = [ @@ -572,7 +572,7 @@ describe('createListenerMiddleware', () => { [{}, testAction1('a')], [{}, testAction2('b')], ]) - } + }, ) test('listenerApi.signal has correct reason when listener is cancelled or completes', async () => { @@ -586,7 +586,7 @@ describe('createListenerMiddleware', () => { () => { payload.resolve((signal as AbortSignalWithReason).reason) }, - { once: true } + { once: true }, ) cancelActiveListeners() @@ -595,10 +595,10 @@ describe('createListenerMiddleware', () => { }) const deferredCancelledSignalReason = store.dispatch( - notifyDeferred(deferred()) + notifyDeferred(deferred()), ).payload const deferredCompletedSignalReason = store.dispatch( - notifyDeferred(deferred()) + notifyDeferred(deferred()), ).payload expect(await deferredCancelledSignalReason).toBe(listenerCancelled) @@ -616,7 +616,7 @@ describe('createListenerMiddleware', () => { () => { payload.resolve((signal as AbortSignalWithReason).reason) }, - { once: true } + { once: true }, ) cancel() @@ -624,7 +624,7 @@ describe('createListenerMiddleware', () => { }) const deferredCancelledSignalReason = store.dispatch( - notifyDeferred(deferred()) + notifyDeferred(deferred()), ).payload expect(await deferredCancelledSignalReason).toBe(listenerCancelled) @@ -672,7 +672,7 @@ describe('createListenerMiddleware', () => { expect(listenerCompleted).toBe(false) expect(listenerCancelled).toBe(true) expect((error as any)?.message).toBe( - 'task cancelled (reason: listener-cancelled)' + 'task cancelled (reason: listener-cancelled)', ) }) @@ -682,7 +682,7 @@ describe('createListenerMiddleware', () => { if (action.payload === 'b') { api.unsubscribe() } - } + }, ) startListening({ @@ -745,7 +745,7 @@ describe('createListenerMiddleware', () => { listenerApi.signal.addEventListener( 'abort', () => listener1Test.resolve(listener1Calls), - { once: true } + { once: true }, ) await listenerApi.condition(() => true) listener1Test.reject(new Error('unreachable: listener1Test')) @@ -788,7 +788,7 @@ describe('createListenerMiddleware', () => { listenerApi.signal.addEventListener( 'abort', () => listener1Test.resolve(listener1Calls), - { once: true } + { once: true }, ) await listenerApi.condition(() => true) listener1Test.reject(new Error('unreachable: listener1Test')) @@ -895,8 +895,8 @@ describe('createListenerMiddleware', () => { const runIncrementBy = () => { listenerApi.dispatch( counterSlice.actions.incrementByAmount( - listenerApi.getOriginalState().value + 2 - ) + listenerApi.getOriginalState().value + 2, + ), ) } @@ -918,9 +918,9 @@ describe('createListenerMiddleware', () => { expect(onError).toBeCalledWith( new Error( - 'listenerMiddleware: getOriginalState can only be called synchronously' + 'listenerMiddleware: getOriginalState can only be called synchronously', ), - { raisedBy: 'effect' } + { raisedBy: 'effect' }, ) expect(store.getState()).toEqual({ value: 3 }) }) @@ -954,7 +954,7 @@ describe('createListenerMiddleware', () => { listenerApi.signal.addEventListener( 'abort', deferredCompletedEvt.resolve, - { once: true } + { once: true }, ) listenerApi.delay(100) // missing await }, @@ -967,7 +967,7 @@ describe('createListenerMiddleware', () => { listenerApi.signal.addEventListener( 'abort', deferredCancelledEvt.resolve, - { once: true } + { once: true }, ) listenerApi.delay(100) // missing await listenerApi.pause(godotPauseTrigger) @@ -1286,7 +1286,7 @@ describe('createListenerMiddleware', () => { listenerApi.unsubscribe() // run once listenerApi.signal.addEventListener( 'abort', - deferredCompletedEvt.resolve + deferredCompletedEvt.resolve, ) listenerApi.take(() => true) // missing await }, @@ -1298,7 +1298,7 @@ describe('createListenerMiddleware', () => { listenerApi.cancelActiveListeners() listenerApi.signal.addEventListener( 'abort', - deferredCancelledEvt.resolve + deferredCancelledEvt.resolve, ) listenerApi.take(() => true) // missing await await listenerApi.pause(godotPauseTrigger) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts index 3d6a3d1775..6756144579 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test-d.ts @@ -36,7 +36,7 @@ export const counterSlice = createSlice({ export function fetchCount(amount = 1) { return new Promise<{ data: number }>((resolve) => - setTimeout(() => resolve({ data: amount }), 500) + setTimeout(() => resolve({ data: amount }), 500), ) } @@ -46,7 +46,7 @@ export const incrementAsync = createAsyncThunk( const response = await fetchCount(amount) // The value we return becomes the `fulfilled` action payload return response.data - } + }, ) const { increment } = counterSlice.actions @@ -127,7 +127,7 @@ describe('listenerMiddleware.withTypes()', () => { expectTypeOf(listenerApi.dispatch).toEqualTypeOf() }, - }) + }), ) }) diff --git a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts index c962aa0274..84bcf1ff2c 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/listenerMiddleware.withTypes.test.ts @@ -26,7 +26,7 @@ export const counterSlice = createSlice({ export function fetchCount(amount = 1) { return new Promise<{ data: number }>((resolve) => - setTimeout(() => resolve({ data: amount }), 500) + setTimeout(() => resolve({ data: amount }), 500), ) } @@ -36,7 +36,7 @@ export const incrementAsync = createAsyncThunk( const response = await fetchCount(amount) // The value we return becomes the `fulfilled` action payload return response.data - } + }, ) const { increment } = counterSlice.actions @@ -76,7 +76,7 @@ describe('startAppListening.withTypes', () => { expect(startAppListening.withTypes).toEqual(expect.any(Function)) expect(startAppListening.withTypes().withTypes).toEqual( - expect.any(Function) + expect.any(Function), ) expect(startAppListening).toBe(listenerMiddleware.startListening) @@ -108,7 +108,7 @@ describe('removeAppListener.withTypes', () => { expect(removeAppListener.withTypes).toEqual(expect.any(Function)) expect(removeAppListener.withTypes().withTypes).toEqual( - expect.any(Function) + expect.any(Function), ) expect(removeAppListener).toBe(removeListener) diff --git a/packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts b/packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts index 0bd4a13a7d..7517f9071d 100644 --- a/packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts +++ b/packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts @@ -87,7 +87,7 @@ describe('Saga-style Effects Scenarios', () => { ;(this.events[event] = this.events[event] || []).push(cb) return () => (this.events[event] = (this.events[event] || []).filter( - (l: any) => l !== cb + (l: any) => l !== cb, )) }, }) diff --git a/packages/toolkit/src/listenerMiddleware/types.ts b/packages/toolkit/src/listenerMiddleware/types.ts index fc6a304224..73a7ef1c0e 100644 --- a/packages/toolkit/src/listenerMiddleware/types.ts +++ b/packages/toolkit/src/listenerMiddleware/types.ts @@ -30,14 +30,14 @@ export interface TypedActionCreator { export type AnyListenerPredicate = ( action: UnknownAction, currentState: State, - originalState: State + originalState: State, ) => boolean /** @public */ export type ListenerPredicate = ( action: UnknownAction, currentState: State, - originalState: State + originalState: State, ) => action is Action /** @public */ @@ -144,7 +144,7 @@ export interface ForkOptions { export interface ListenerEffectAPI< State, Dispatch extends ReduxDispatch, - ExtraArgument = unknown + ExtraArgument = unknown, > extends MiddlewareAPI { /** * Returns the store state as it existed when the action was originally dispatched, _before_ the reducers ran. @@ -272,10 +272,10 @@ export type ListenerEffect< Action extends ReduxAction, State, Dispatch extends ReduxDispatch, - ExtraArgument = unknown + ExtraArgument = unknown, > = ( action: Action, - api: ListenerEffectAPI + api: ListenerEffectAPI, ) => void | Promise /** @@ -316,7 +316,7 @@ export type ListenerMiddleware< unknown, UnknownAction >, - ExtraArgument = unknown + ExtraArgument = unknown, > = Middleware< { (action: ReduxAction<'listenerMiddleware/add'>): UnsubscribeListener @@ -333,7 +333,7 @@ export interface ListenerMiddlewareInstance< unknown, ReduxAction > = ThunkDispatch, - ExtraArgument = unknown + ExtraArgument = unknown, > { middleware: ListenerMiddleware @@ -361,31 +361,33 @@ export interface ListenerMiddlewareInstance< /** @public */ export type TakePatternOutputWithoutTimeout< State, - Predicate extends AnyListenerPredicate -> = Predicate extends MatchFunction - ? Promise<[Action, State, State]> - : Promise<[UnknownAction, State, State]> + Predicate extends AnyListenerPredicate, +> = + Predicate extends MatchFunction + ? Promise<[Action, State, State]> + : Promise<[UnknownAction, State, State]> /** @public */ export type TakePatternOutputWithTimeout< State, - Predicate extends AnyListenerPredicate -> = Predicate extends MatchFunction - ? Promise<[Action, State, State] | null> - : Promise<[UnknownAction, State, State] | null> + Predicate extends AnyListenerPredicate, +> = + Predicate extends MatchFunction + ? Promise<[Action, State, State] | null> + : Promise<[UnknownAction, State, State] | null> /** @public */ export interface TakePattern { >( - predicate: Predicate + predicate: Predicate, ): TakePatternOutputWithoutTimeout >( predicate: Predicate, - timeout: number + timeout: number, ): TakePatternOutputWithTimeout >( predicate: Predicate, - timeout?: number | undefined + timeout?: number | undefined, ): TakePatternOutputWithTimeout } @@ -396,7 +398,7 @@ export interface UnsubscribeListenerOptions { /** @public */ export type UnsubscribeListener = ( - unsubscribeOptions?: UnsubscribeListenerOptions + unsubscribeOptions?: UnsubscribeListenerOptions, ) => void /** @@ -412,7 +414,7 @@ export interface AddListenerOverloads< UnknownAction >, ExtraArgument = unknown, - AdditionalOptions = unknown + AdditionalOptions = unknown, > { /** Accepts a "listener predicate" that is also a TS type predicate for the action*/ < @@ -420,7 +422,7 @@ export interface AddListenerOverloads< ListenerPredicateType extends ListenerPredicate< MiddlewareActionType, StateType - > + >, >( options: { actionCreator?: never @@ -433,7 +435,7 @@ export interface AddListenerOverloads< DispatchType, ExtraArgument > - } & AdditionalOptions + } & AdditionalOptions, ): Return /** Accepts an RTK action creator, like `incrementByAmount` */ @@ -449,7 +451,7 @@ export interface AddListenerOverloads< DispatchType, ExtraArgument > - } & AdditionalOptions + } & AdditionalOptions, ): Return /** Accepts a specific action type string */ @@ -465,7 +467,7 @@ export interface AddListenerOverloads< DispatchType, ExtraArgument > - } & AdditionalOptions + } & AdditionalOptions, ): Return /** Accepts an RTK matcher function, such as `incrementByAmount.match` */ @@ -481,7 +483,7 @@ export interface AddListenerOverloads< DispatchType, ExtraArgument > - } & AdditionalOptions + } & AdditionalOptions, ): Return /** Accepts a "listener predicate" that just returns a boolean, no type assertion */ @@ -497,7 +499,7 @@ export interface AddListenerOverloads< DispatchType, ExtraArgument > - } & AdditionalOptions + } & AdditionalOptions, ): Return } @@ -508,7 +510,7 @@ export type RemoveListenerOverloads< StateType, unknown, UnknownAction - > + >, > = AddListenerOverloads< boolean, StateType, @@ -521,7 +523,7 @@ export type RemoveListenerOverloads< export interface RemoveListenerAction< Action extends UnknownAction, State, - Dispatch extends ReduxDispatch + Dispatch extends ReduxDispatch, > { type: 'listenerMiddleware/remove' payload: { @@ -544,7 +546,7 @@ export type TypedAddListener< >, ExtraArgument = unknown, Payload = ListenerEntry, - T extends string = 'listenerMiddleware/add' + T extends string = 'listenerMiddleware/add', > = BaseActionCreator & AddListenerOverloads< PayloadAction, @@ -579,7 +581,7 @@ export type TypedAddListener< OverrideStateType, unknown, UnknownAction - > + >, >() => TypedAddListener } @@ -596,7 +598,7 @@ export type TypedRemoveListener< UnknownAction >, Payload = ListenerEntry, - T extends string = 'listenerMiddleware/remove' + T extends string = 'listenerMiddleware/remove', > = BaseActionCreator & AddListenerOverloads< PayloadAction, @@ -632,7 +634,7 @@ export type TypedRemoveListener< OverrideStateType, unknown, UnknownAction - > + >, >() => TypedRemoveListener } @@ -648,7 +650,7 @@ export type TypedStartListening< unknown, UnknownAction >, - ExtraArgument = unknown + ExtraArgument = unknown, > = AddListenerOverloads< UnsubscribeListener, StateType, @@ -689,7 +691,7 @@ export type TypedStartListening< OverrideStateType, unknown, UnknownAction - > + >, >() => TypedStartListening } @@ -704,7 +706,7 @@ export type TypedStopListening< StateType, unknown, UnknownAction - > + >, > = RemoveListenerOverloads & { /** * Creates a "pre-typed" version of @@ -740,7 +742,7 @@ export type TypedStopListening< OverrideStateType, unknown, UnknownAction - > + >, >() => TypedStopListening } @@ -755,7 +757,7 @@ export type TypedCreateListenerEntry< StateType, unknown, UnknownAction - > + >, > = AddListenerOverloads< ListenerEntry, StateType, @@ -791,7 +793,7 @@ export type TypedCreateListenerEntry< OverrideStateType, unknown, UnknownAction - > + >, >() => TypedStopListening } @@ -802,7 +804,7 @@ export type TypedCreateListenerEntry< /** @internal An single listener entry */ export type ListenerEntry< State = unknown, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { id: string effect: ListenerEffect @@ -833,9 +835,5 @@ export type GuardedType = T extends (x: any, ...args: any[]) => x is infer T : never /** @public */ -export type ListenerPredicateGuardedActionType = T extends ListenerPredicate< - infer Action, - any -> - ? Action - : never +export type ListenerPredicateGuardedActionType = + T extends ListenerPredicate ? Action : never diff --git a/packages/toolkit/src/listenerMiddleware/utils.ts b/packages/toolkit/src/listenerMiddleware/utils.ts index f52e49b154..dd9480eb1f 100644 --- a/packages/toolkit/src/listenerMiddleware/utils.ts +++ b/packages/toolkit/src/listenerMiddleware/utils.ts @@ -2,10 +2,10 @@ import type { AbortSignalWithReason } from './types' export const assertFunction: ( func: unknown, - expected: string + expected: string, ) => asserts func is (...args: unknown[]) => unknown = ( func: unknown, - expected: string + expected: string, ) => { if (typeof func !== 'function') { throw new TypeError(`${expected} is not a function`) @@ -16,7 +16,7 @@ export const noop = () => {} export const catchRejection = ( promise: Promise, - onError = noop + onError = noop, ): Promise => { promise.catch(onError) @@ -25,7 +25,7 @@ export const catchRejection = ( export const addAbortSignalListener = ( abortSignal: AbortSignal, - callback: (evt: Event) => void + callback: (evt: Event) => void, ) => { abortSignal.addEventListener('abort', callback, { once: true }) return () => abortSignal.removeEventListener('abort', callback) @@ -43,7 +43,7 @@ export const addAbortSignalListener = ( */ export const abortControllerWithReason = ( abortController: AbortController, - reason: T + reason: T, ): void => { type Consumer = (val: T) => void diff --git a/packages/toolkit/src/mapBuilders.ts b/packages/toolkit/src/mapBuilders.ts index 5c6ac60010..560d640888 100644 --- a/packages/toolkit/src/mapBuilders.ts +++ b/packages/toolkit/src/mapBuilders.ts @@ -26,7 +26,7 @@ export interface ActionReducerMapBuilder { */ addCase>( actionCreator: ActionCreator, - reducer: CaseReducer> + reducer: CaseReducer>, ): ActionReducerMapBuilder /** * Adds a case reducer to handle a single exact action type. @@ -37,7 +37,7 @@ export interface ActionReducerMapBuilder { */ addCase>( type: Type, - reducer: CaseReducer + reducer: CaseReducer, ): ActionReducerMapBuilder /** @@ -98,7 +98,7 @@ const reducer = createReducer(initialState, (builder) => { */ addMatcher( matcher: TypeGuard | ((action: any) => boolean), - reducer: CaseReducer + reducer: CaseReducer, ): Omit, 'addCase'> /** @@ -124,11 +124,11 @@ const reducer = createReducer(initialState, builder => { } export function executeReducerBuilderCallback( - builderCallback: (builder: ActionReducerMapBuilder) => void + builderCallback: (builder: ActionReducerMapBuilder) => void, ): [ CaseReducers, ActionMatcherDescriptionCollection, - CaseReducer | undefined + CaseReducer | undefined, ] { const actionsMap: CaseReducers = {} const actionMatchers: ActionMatcherDescriptionCollection = [] @@ -136,7 +136,7 @@ export function executeReducerBuilderCallback( const builder = { addCase( typeOrActionCreator: string | TypedActionCreator, - reducer: CaseReducer + reducer: CaseReducer, ) { if (process.env.NODE_ENV !== 'production') { /* @@ -146,12 +146,12 @@ export function executeReducerBuilderCallback( */ if (actionMatchers.length > 0) { throw new Error( - '`builder.addCase` should only be called before calling `builder.addMatcher`' + '`builder.addCase` should only be called before calling `builder.addMatcher`', ) } if (defaultCaseReducer) { throw new Error( - '`builder.addCase` should only be called before calling `builder.addDefaultCase`' + '`builder.addCase` should only be called before calling `builder.addDefaultCase`', ) } } @@ -161,13 +161,13 @@ export function executeReducerBuilderCallback( : typeOrActionCreator.type if (!type) { throw new Error( - '`builder.addCase` cannot be called with an empty action type' + '`builder.addCase` cannot be called with an empty action type', ) } if (type in actionsMap) { throw new Error( '`builder.addCase` cannot be called with two reducers for the same action type ' + - `'${type}'` + `'${type}'`, ) } actionsMap[type] = reducer @@ -175,12 +175,12 @@ export function executeReducerBuilderCallback( }, addMatcher( matcher: TypeGuard, - reducer: CaseReducer + reducer: CaseReducer, ) { if (process.env.NODE_ENV !== 'production') { if (defaultCaseReducer) { throw new Error( - '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`' + '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`', ) } } diff --git a/packages/toolkit/src/matchers.ts b/packages/toolkit/src/matchers.ts index e8ca651077..6a5ccea09f 100644 --- a/packages/toolkit/src/matchers.ts +++ b/packages/toolkit/src/matchers.ts @@ -69,7 +69,7 @@ export function isAllOf[]]>( */ export function hasExpectedRequestMetadata( action: any, - validStatus: readonly string[] + validStatus: readonly string[], ) { if (!action || !action.meta) return false @@ -104,7 +104,7 @@ export type PendingActionFromAsyncThunk = * @public */ export function isPending(): ( - action: any + action: any, ) => action is UnknownAsyncThunkPendingAction /** * A higher-order function that returns a function that may be used to check @@ -116,7 +116,7 @@ export function isPending(): ( * @public */ export function isPending< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is PendingActionFromAsyncThunk @@ -126,7 +126,7 @@ export function isPending< */ export function isPending(action: any): action is UnknownAsyncThunkPendingAction export function isPending< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >(...asyncThunks: AsyncThunks | [any]) { if (asyncThunks.length === 0) { return (action: any) => hasExpectedRequestMetadata(action, ['pending']) @@ -137,11 +137,11 @@ export function isPending< } return ( - action: any + action: any, ): action is PendingActionFromAsyncThunk => { // note: this type will be correct because we have at least 1 asyncThunk const matchers: [Matcher, ...Matcher[]] = asyncThunks.map( - (asyncThunk) => asyncThunk.pending + (asyncThunk) => asyncThunk.pending, ) as any const combinedMatcher = isAnyOf(...matchers) @@ -165,7 +165,7 @@ export type RejectedActionFromAsyncThunk = * @public */ export function isRejected(): ( - action: any + action: any, ) => action is UnknownAsyncThunkRejectedAction /** * A higher-order function that returns a function that may be used to check @@ -177,7 +177,7 @@ export function isRejected(): ( * @public */ export function isRejected< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is RejectedActionFromAsyncThunk @@ -186,10 +186,10 @@ export function isRejected< * @public */ export function isRejected( - action: any + action: any, ): action is UnknownAsyncThunkRejectedAction export function isRejected< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >(...asyncThunks: AsyncThunks | [any]) { if (asyncThunks.length === 0) { return (action: any) => hasExpectedRequestMetadata(action, ['rejected']) @@ -200,11 +200,11 @@ export function isRejected< } return ( - action: any + action: any, ): action is RejectedActionFromAsyncThunk => { // note: this type will be correct because we have at least 1 asyncThunk const matchers: [Matcher, ...Matcher[]] = asyncThunks.map( - (asyncThunk) => asyncThunk.rejected + (asyncThunk) => asyncThunk.rejected, ) as any const combinedMatcher = isAnyOf(...matchers) @@ -231,7 +231,7 @@ export type RejectedWithValueActionFromAsyncThunk = * @public */ export function isRejectedWithValue(): ( - action: any + action: any, ) => action is UnknownAsyncThunkRejectedAction /** * A higher-order function that returns a function that may be used to check @@ -243,21 +243,21 @@ export function isRejectedWithValue(): ( * @public */ export function isRejectedWithValue< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): ( - action: any + action: any, ) => action is RejectedWithValueActionFromAsyncThunk /** * Tests if `action` is a rejected thunk action with value * @public */ export function isRejectedWithValue( - action: any + action: any, ): action is UnknownAsyncThunkRejectedAction export function isRejectedWithValue< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >(...asyncThunks: AsyncThunks | [any]) { const hasFlag = (action: any): action is any => { return action && action.meta && action.meta.rejectedWithValue @@ -276,7 +276,7 @@ export function isRejectedWithValue< } return ( - action: any + action: any, ): action is RejectedActionFromAsyncThunk => { const combinedMatcher = isAllOf(isRejected(...asyncThunks), hasFlag) @@ -299,7 +299,7 @@ export type FulfilledActionFromAsyncThunk = * @public */ export function isFulfilled(): ( - action: any + action: any, ) => action is UnknownAsyncThunkFulfilledAction /** * A higher-order function that returns a function that may be used to check @@ -311,7 +311,7 @@ export function isFulfilled(): ( * @public */ export function isFulfilled< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is FulfilledActionFromAsyncThunk @@ -320,10 +320,10 @@ export function isFulfilled< * @public */ export function isFulfilled( - action: any + action: any, ): action is UnknownAsyncThunkFulfilledAction export function isFulfilled< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >(...asyncThunks: AsyncThunks | [any]) { if (asyncThunks.length === 0) { return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled']) @@ -334,11 +334,11 @@ export function isFulfilled< } return ( - action: any + action: any, ): action is FulfilledActionFromAsyncThunk => { // note: this type will be correct because we have at least 1 asyncThunk const matchers: [Matcher, ...Matcher[]] = asyncThunks.map( - (asyncThunk) => asyncThunk.fulfilled + (asyncThunk) => asyncThunk.fulfilled, ) as any const combinedMatcher = isAnyOf(...matchers) @@ -370,7 +370,7 @@ export type ActionsFromAsyncThunk = * @public */ export function isAsyncThunkAction(): ( - action: any + action: any, ) => action is UnknownAsyncThunkAction /** * A higher-order function that returns a function that may be used to check @@ -381,7 +381,7 @@ export function isAsyncThunkAction(): ( * @public */ export function isAsyncThunkAction< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is ActionsFromAsyncThunk @@ -390,10 +390,10 @@ export function isAsyncThunkAction< * @public */ export function isAsyncThunkAction( - action: any + action: any, ): action is UnknownAsyncThunkAction export function isAsyncThunkAction< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >(...asyncThunks: AsyncThunks | [any]) { if (asyncThunks.length === 0) { return (action: any) => @@ -405,7 +405,7 @@ export function isAsyncThunkAction< } return ( - action: any + action: any, ): action is ActionsFromAsyncThunk => { // note: this type will be correct because we have at least 1 asyncThunk const matchers: [Matcher, ...Matcher[]] = [] as any @@ -414,7 +414,7 @@ export function isAsyncThunkAction< matchers.push( asyncThunk.pending, asyncThunk.rejected, - asyncThunk.fulfilled + asyncThunk.fulfilled, ) } diff --git a/packages/toolkit/src/query/HandledError.ts b/packages/toolkit/src/query/HandledError.ts index dcbf936b3b..c95791bd1d 100644 --- a/packages/toolkit/src/query/HandledError.ts +++ b/packages/toolkit/src/query/HandledError.ts @@ -1,6 +1,6 @@ export class HandledError { constructor( public readonly value: any, - public readonly meta: any = undefined + public readonly meta: any = undefined, ) {} } diff --git a/packages/toolkit/src/query/apiTypes.ts b/packages/toolkit/src/query/apiTypes.ts index 2aa7992999..e7d2332119 100644 --- a/packages/toolkit/src/query/apiTypes.ts +++ b/packages/toolkit/src/query/apiTypes.ts @@ -23,7 +23,7 @@ export interface ApiModules< // eslint-disable-next-line @typescript-eslint/no-unused-vars ReducerPath extends string, // eslint-disable-next-line @typescript-eslint/no-unused-vars - TagTypes extends string + TagTypes extends string, > {} export type ModuleName = keyof ApiModules @@ -34,7 +34,7 @@ export type Module = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, >( api: Api, options: WithRequiredProp< @@ -48,11 +48,11 @@ export type Module = { | 'invalidationBehavior' | 'tagTypes' >, - context: ApiContext + context: ApiContext, ): { injectEndpoint( endpointName: string, - definition: EndpointDefinition + definition: EndpointDefinition, ): void } } @@ -62,7 +62,7 @@ export interface ApiContext { endpointDefinitions: Definitions batch(cb: () => void): void extractRehydrationInfo: ( - action: UnknownAction + action: UnknownAction, ) => CombinedState | undefined hasRehydrationInfo: (action: UnknownAction) => boolean } @@ -72,7 +72,7 @@ export type Api< Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string, - Enhancers extends ModuleName = CoreModule + Enhancers extends ModuleName = CoreModule, > = UnionToIntersection< ApiModules[Enhancers] > & { @@ -81,7 +81,7 @@ export type Api< */ injectEndpoints(_: { endpoints: ( - build: EndpointBuilder + build: EndpointBuilder, ) => NewDefinitions overrideExisting?: boolean }): Api< @@ -96,7 +96,7 @@ export type Api< */ enhanceEndpoints< NewTagTypes extends string = never, - NewDefinitions extends EndpointDefinitions = never + NewDefinitions extends EndpointDefinitions = never, >(_: { addTagTypes?: readonly NewTagTypes[] endpoints?: UpdateDefinitions< diff --git a/packages/toolkit/src/query/baseQueryTypes.ts b/packages/toolkit/src/query/baseQueryTypes.ts index ed6a693c10..9af22a3f7e 100644 --- a/packages/toolkit/src/query/baseQueryTypes.ts +++ b/packages/toolkit/src/query/baseQueryTypes.ts @@ -37,20 +37,20 @@ export type BaseQueryFn< Result = unknown, Error = unknown, DefinitionExtraOptions = {}, - Meta = {} + Meta = {}, > = ( args: Args, api: BaseQueryApi, - extraOptions: DefinitionExtraOptions + extraOptions: DefinitionExtraOptions, ) => MaybePromise> export type BaseQueryEnhancer< AdditionalArgs = unknown, AdditionalDefinitionExtraOptions = unknown, - Config = void + Config = void, > = ( baseQuery: BaseQuery, - config: Config + config: Config, ) => BaseQueryFn< BaseQueryArg & AdditionalArgs, BaseQueryResult, @@ -59,13 +59,12 @@ export type BaseQueryEnhancer< NonNullable> > -export type BaseQueryResult = UnwrapPromise< - ReturnType -> extends infer Unwrapped - ? Unwrapped extends { data: any } - ? Unwrapped['data'] +export type BaseQueryResult = + UnwrapPromise> extends infer Unwrapped + ? Unwrapped extends { data: any } + ? Unwrapped['data'] + : never : never - : never export type BaseQueryMeta = UnwrapPromise< ReturnType diff --git a/packages/toolkit/src/query/core/apiState.ts b/packages/toolkit/src/query/core/apiState.ts index 71ca4856e4..cdf6831d2b 100644 --- a/packages/toolkit/src/query/core/apiState.ts +++ b/packages/toolkit/src/query/core/apiState.ts @@ -229,7 +229,7 @@ export type MutationSubState> = export type CombinedState< D extends EndpointDefinitions, E extends string, - ReducerPath extends string + ReducerPath extends string, > = { queries: QueryState mutations: MutationState @@ -272,7 +272,7 @@ export type MutationState = { export type RootState< Definitions extends EndpointDefinitions, TagTypes extends string, - ReducerPath extends string + ReducerPath extends string, > = { [P in ReducerPath]: CombinedState } diff --git a/packages/toolkit/src/query/core/buildInitiate.ts b/packages/toolkit/src/query/core/buildInitiate.ts index ae761f3855..384d10c50e 100644 --- a/packages/toolkit/src/query/core/buildInitiate.ts +++ b/packages/toolkit/src/query/core/buildInitiate.ts @@ -28,7 +28,7 @@ declare module './module' { export interface ApiEndpointQuery< Definition extends QueryDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { initiate: StartQueryActionCreator } @@ -36,7 +36,7 @@ declare module './module' { export interface ApiEndpointMutation< Definition extends MutationDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { initiate: StartMutationActionCreator } @@ -54,14 +54,14 @@ export interface StartQueryActionCreatorOptions { } type StartQueryActionCreator< - D extends QueryDefinition + D extends QueryDefinition, > = ( arg: QueryArgFrom, - options?: StartQueryActionCreatorOptions + options?: StartQueryActionCreatorOptions, ) => ThunkAction, any, any, UnknownAction> export type QueryActionCreatorResult< - D extends QueryDefinition + D extends QueryDefinition, > = SafePromise> & { arg: QueryArgFrom requestId: string @@ -75,7 +75,7 @@ export type QueryActionCreatorResult< } type StartMutationActionCreator< - D extends MutationDefinition + D extends MutationDefinition, > = ( arg: QueryArgFrom, options?: { @@ -87,11 +87,11 @@ type StartMutationActionCreator< */ track?: boolean fixedCacheKey?: string - } + }, ) => ThunkAction, any, any, UnknownAction> export type MutationActionCreatorResult< - D extends MutationDefinition + D extends MutationDefinition, > = SafePromise< | { data: ResultTypeFrom } | { @@ -246,7 +246,7 @@ export function buildInitiate({ * we could use it to validate the result, but it's probably not necessary */ _endpointName: string, - fixedCacheKeyOrRequestId: string + fixedCacheKeyOrRequestId: string, ) { return (dispatch: Dispatch) => { return runningMutations.get(dispatch)?.[fixedCacheKeyOrRequestId] as @@ -269,7 +269,7 @@ export function buildInitiate({ if (process.env.NODE_ENV !== 'production') { if ((middlewareWarning as any).triggered) return const returnedValue = dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) ;(middlewareWarning as any).triggered = true @@ -283,7 +283,7 @@ export function buildInitiate({ // Otherwise, must not have been added throw new Error( `Warning: Middleware for RTK-Query API at reducerPath "${api.reducerPath}" has not been added to the store. -You must add the middleware for RTK-Query to function correctly!` +You must add the middleware for RTK-Query to function correctly!`, ) } } @@ -291,7 +291,7 @@ You must add the middleware for RTK-Query to function correctly!` function buildInitiateQuery( endpointName: string, - endpointDefinition: QueryDefinition + endpointDefinition: QueryDefinition, ) { const queryAction: StartQueryActionCreator = ( @@ -301,7 +301,7 @@ You must add the middleware for RTK-Query to function correctly!` forceRefetch, subscriptionOptions, [forceQueryFnSymbol]: forceQueryFn, - } = {} + } = {}, ) => (dispatch, getState) => { const queryCacheKey = serializeQueryArgs({ @@ -342,14 +342,14 @@ You must add the middleware for RTK-Query to function correctly!` // -> we want to resolve it once data has been written with the data that will be written thunkResult.then(selectFromState) : skippedSynchronously && !runningQuery - ? // a query has been skipped due to a condition and we do not have any currently running query - // -> we want to resolve it immediately with the current data - Promise.resolve(stateAfter) - : // query just started or one is already in flight - // -> wait for the running query, then resolve with data from after that - Promise.all([runningQuery, thunkResult]).then( - selectFromState - )) as SafePromise, + ? // a query has been skipped due to a condition and we do not have any currently running query + // -> we want to resolve it immediately with the current data + Promise.resolve(stateAfter) + : // query just started or one is already in flight + // -> wait for the running query, then resolve with data from after that + Promise.all([runningQuery, thunkResult]).then( + selectFromState, + )) as SafePromise, { arg, requestId, @@ -367,7 +367,7 @@ You must add the middleware for RTK-Query to function correctly!` }, refetch: () => dispatch( - queryAction(arg, { subscribe: false, forceRefetch: true }) + queryAction(arg, { subscribe: false, forceRefetch: true }), ), unsubscribe() { if (subscribe) @@ -375,7 +375,7 @@ You must add the middleware for RTK-Query to function correctly!` unsubscribeQueryResult({ queryCacheKey, requestId, - }) + }), ) }, updateSubscriptionOptions(options: SubscriptionOptions) { @@ -386,10 +386,10 @@ You must add the middleware for RTK-Query to function correctly!` requestId, queryCacheKey, options, - }) + }), ) }, - } + }, ) if (!runningQuery && !skippedSynchronously && !forceQueryFn) { @@ -411,7 +411,7 @@ You must add the middleware for RTK-Query to function correctly!` } function buildInitiateMutation( - endpointName: string + endpointName: string, ): StartMutationActionCreator { return (arg, { track = true, fixedCacheKey } = {}) => (dispatch, getState) => { @@ -427,7 +427,7 @@ You must add the middleware for RTK-Query to function correctly!` const { requestId, abort, unwrap } = thunkResult const returnValuePromise = asSafePromise( thunkResult.unwrap().then((data) => ({ data })), - (error) => ({ error }) + (error) => ({ error }), ) const reset = () => { diff --git a/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts b/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts index f941bcd544..b847dee01a 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts @@ -21,7 +21,7 @@ export const buildBatchedActionsHandler: InternalHandlerBuilder< // This is done to speed up perf when loading many components const actuallyMutateSubscriptions = ( mutableState: SubscriptionState, - action: Action + action: Action, ) => { if (updateSubscriptionOptions.match(action)) { const { queryCacheKey, requestId, options } = action.payload @@ -99,15 +99,15 @@ export const buildBatchedActionsHandler: InternalHandlerBuilder< return ( action, - mwApi + mwApi, ): [ actionShouldContinue: boolean, - result: SubscriptionSelectors | boolean + result: SubscriptionSelectors | boolean, ] => { if (!previousSubscriptions) { // Initialize it the first time this handler runs previousSubscriptions = JSON.parse( - JSON.stringify(internalState.currentSubscriptions) + JSON.stringify(internalState.currentSubscriptions), ) } @@ -128,7 +128,7 @@ export const buildBatchedActionsHandler: InternalHandlerBuilder< // Update subscription data based on this action const didMutate = actuallyMutateSubscriptions( internalState.currentSubscriptions, - action + action, ) let actionShouldContinue = true @@ -143,12 +143,12 @@ export const buildBatchedActionsHandler: InternalHandlerBuilder< updateSyncTimer = setTimeout(() => { // Deep clone the current subscription data const newSubscriptions: SubscriptionState = JSON.parse( - JSON.stringify(internalState.currentSubscriptions) + JSON.stringify(internalState.currentSubscriptions), ) // Figure out a smaller diff between original and current const [, patches] = produceWithPatches( previousSubscriptions, - () => newSubscriptions + () => newSubscriptions, ) // Sync the store state for visibility diff --git a/packages/toolkit/src/query/core/buildMiddleware/cacheCollection.ts b/packages/toolkit/src/query/core/buildMiddleware/cacheCollection.ts index becf6b8d1f..2d2ffeccf3 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/cacheCollection.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/cacheCollection.ts @@ -28,7 +28,7 @@ declare module '../../endpointDefinitions' { ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { /** * Overrides the api-wide definition of `keepUnusedDataFor` for this endpoint only. _(This value is in seconds.)_ @@ -64,7 +64,7 @@ export const buildCacheCollectionHandler: InternalHandlerBuilder = ({ const handler: ApiMiddlewareInternalHandler = ( action, mwApi, - internalState + internalState, ) => { if (unsubscribeQueryResult.match(action)) { const state = mwApi.getState()[reducerPath] @@ -74,7 +74,7 @@ export const buildCacheCollectionHandler: InternalHandlerBuilder = ({ queryCacheKey, state.queries[queryCacheKey]?.endpointName, mwApi, - state.config + state.config, ) } @@ -96,7 +96,7 @@ export const buildCacheCollectionHandler: InternalHandlerBuilder = ({ queryCacheKey as QueryCacheKey, queryState?.endpointName, mwApi, - state.config + state.config, ) } } @@ -106,7 +106,7 @@ export const buildCacheCollectionHandler: InternalHandlerBuilder = ({ queryCacheKey: QueryCacheKey, endpointName: string | undefined, api: SubMiddlewareApi, - config: ConfigState + config: ConfigState, ) { const endpointDefinition = context.endpointDefinitions[ endpointName! @@ -124,7 +124,7 @@ export const buildCacheCollectionHandler: InternalHandlerBuilder = ({ // Also avoid negative values too. const finalKeepUnusedDataFor = Math.max( 0, - Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS) + Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS), ) if (!anySubscriptionsRemainingForKey(queryCacheKey)) { diff --git a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts index f4a8e9bd64..0a41e0174f 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts @@ -24,7 +24,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends LifecycleApi { /** * Gets the current value of this cache entry. @@ -47,7 +47,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends LifecycleApi { /** * Gets the current value of this cache entry. @@ -82,7 +82,7 @@ declare module '../../endpointDefinitions' { export interface CacheLifecyclePromises< ResultType = unknown, - MetaType = unknown + MetaType = unknown, > { /** * Promise that will resolve with the first value for this cache key. @@ -122,7 +122,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends QueryBaseLifecycleApi, CacheLifecyclePromises> {} @@ -130,7 +130,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends MutationBaseLifecycleApi< QueryArg, BaseQuery, @@ -144,11 +144,11 @@ declare module '../../endpointDefinitions' { ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { onCacheEntryAdded?( arg: QueryArg, - api: QueryCacheLifecycleApi + api: QueryCacheLifecycleApi, ): Promise | void } @@ -157,7 +157,7 @@ declare module '../../endpointDefinitions' { ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { onCacheEntryAdded?( arg: QueryArg, @@ -166,13 +166,13 @@ declare module '../../endpointDefinitions' { BaseQuery, ResultType, ReducerPath - > + >, ): Promise | void } } const neverResolvedError = new Error( - 'Promise never resolved before cacheEntryRemoved.' + 'Promise never resolved before cacheEntryRemoved.', ) as Error & { message: 'Promise never resolved before cacheEntryRemoved.' } @@ -198,7 +198,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ const handler: ApiMiddlewareInternalHandler = ( action, mwApi, - stateBefore + stateBefore, ) => { const cacheKey = getCacheKey(action) @@ -211,7 +211,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ action.meta.arg.originalArgs, cacheKey, mwApi, - action.meta.requestId + action.meta.requestId, ) } } else if (mutationThunk.pending.match(action)) { @@ -222,7 +222,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ action.meta.arg.originalArgs, cacheKey, mwApi, - action.meta.requestId + action.meta.requestId, ) } } else if (isFulfilledThunk(action)) { @@ -268,7 +268,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ originalArgs: any, queryCacheKey: string, mwApi: SubMiddlewareApi, - requestId: string + requestId: string, ) { const endpointDefinition = context.endpointDefinitions[endpointName] const onCacheEntryAdded = endpointDefinition?.onCacheEntryAdded @@ -297,7 +297,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ const selector = (api.endpoints[endpointName] as any).select( endpointDefinition.type === DefinitionType.query ? originalArgs - : queryCacheKey + : queryCacheKey, ) const extra = mwApi.dispatch((_, __, extra) => extra) @@ -312,8 +312,8 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({ api.util.updateQueryData( endpointName as never, originalArgs, - updateRecipe - ) + updateRecipe, + ), ) : undefined) as any, diff --git a/packages/toolkit/src/query/core/buildMiddleware/index.ts b/packages/toolkit/src/query/core/buildMiddleware/index.ts index eecd189e84..4c44107368 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/index.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/index.ts @@ -29,7 +29,7 @@ import { buildBatchedActionsHandler } from './batchActions' export function buildMiddleware< Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, >(input: BuildMiddlewareInput) { const { reducerPath, queryThunk, api, context } = input const { apiUid } = context @@ -136,7 +136,7 @@ export function buildMiddleware< { status: QueryStatus.uninitialized } >, queryCacheKey: string, - override: Partial = {} + override: Partial = {}, ) { return queryThunk({ type: 'query', diff --git a/packages/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts b/packages/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts index 4334d4f813..150406a863 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts @@ -35,12 +35,12 @@ export const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({ const { removeQueryResult } = api.internalActions const isThunkActionWithTags = isAnyOf( isFulfilled(mutationThunk), - isRejectedWithValue(mutationThunk) + isRejectedWithValue(mutationThunk), ) const isQueryEnd = isAnyOf( isFulfilled(mutationThunk, queryThunk), - isRejected(mutationThunk, queryThunk) + isRejected(mutationThunk, queryThunk), ) let pendingTagInvalidations: FullTagDescription[] = [] @@ -52,9 +52,9 @@ export const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({ action, 'invalidatesTags', endpointDefinitions, - assertTagType + assertTagType, ), - mwApi + mwApi, ) } else if (isQueryEnd(action)) { invalidateTags([], mwApi) @@ -66,33 +66,38 @@ export const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({ undefined, undefined, undefined, - assertTagType + assertTagType, ), - mwApi + mwApi, ) } } - function hasPendingRequests(state: CombinedState) { + function hasPendingRequests( + state: CombinedState, + ) { for (const key in state.queries) { - if (state.queries[key]?.status === QueryStatus.pending) return true; + if (state.queries[key]?.status === QueryStatus.pending) return true } for (const key in state.mutations) { - if (state.mutations[key]?.status === QueryStatus.pending) return true; + if (state.mutations[key]?.status === QueryStatus.pending) return true } - return false; + return false } function invalidateTags( newTags: readonly FullTagDescription[], - mwApi: SubMiddlewareApi + mwApi: SubMiddlewareApi, ) { const rootState = mwApi.getState() const state = rootState[reducerPath] pendingTagInvalidations.push(...newTags) - if (state.config.invalidationBehavior === 'delayed' && hasPendingRequests(state)) { + if ( + state.config.invalidationBehavior === 'delayed' && + hasPendingRequests(state) + ) { return } @@ -114,7 +119,7 @@ export const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({ mwApi.dispatch( removeQueryResult({ queryCacheKey: queryCacheKey as QueryCacheKey, - }) + }), ) } else if (querySubState.status !== QueryStatus.uninitialized) { mwApi.dispatch(refetchQuery(querySubState, queryCacheKey)) diff --git a/packages/toolkit/src/query/core/buildMiddleware/polling.ts b/packages/toolkit/src/query/core/buildMiddleware/polling.ts index 2870d43443..6bee83fae4 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/polling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/polling.ts @@ -51,7 +51,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ function startNextPoll( { queryCacheKey }: QuerySubstateIdentifier, - api: SubMiddlewareApi + api: SubMiddlewareApi, ) { const state = api.getState()[reducerPath] const querySubState = state.queries[queryCacheKey] @@ -87,7 +87,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ function updatePollingInterval( { queryCacheKey }: QuerySubstateIdentifier, - api: SubMiddlewareApi + api: SubMiddlewareApi, ) { const state = api.getState()[reducerPath] const querySubState = state.queries[queryCacheKey] @@ -133,7 +133,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({ if (!!subscribers[key].pollingInterval) { lowestPollingInterval = Math.min( subscribers[key].pollingInterval!, - lowestPollingInterval + lowestPollingInterval, ) skipPollingIfUnfocused = subscribers[key].skipPollingIfUnfocused || skipPollingIfUnfocused diff --git a/packages/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts b/packages/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts index 580581238c..ebb47b771c 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts @@ -19,7 +19,7 @@ export type ReferenceQueryLifecycle = never declare module '../../endpointDefinitions' { export interface QueryLifecyclePromises< ResultType, - BaseQuery extends BaseQueryFn + BaseQuery extends BaseQueryFn, > { /** * Promise that will resolve with the (transformed) query result. @@ -72,7 +72,7 @@ declare module '../../endpointDefinitions' { ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { /** * A function that is called when the individual query is started. The function is called with a lifecycle api object containing properties such as `queryFulfilled`, allowing code to be run when a query is started, when it succeeds, and when it fails (i.e. throughout the lifecycle of an individual query/mutation call). @@ -114,7 +114,7 @@ declare module '../../endpointDefinitions' { */ onQueryStarted?( arg: QueryArg, - api: QueryLifecycleApi + api: QueryLifecycleApi, ): Promise | void } @@ -123,7 +123,7 @@ declare module '../../endpointDefinitions' { ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { /** * A function that is called when the individual mutation is started. The function is called with a lifecycle api object containing properties such as `queryFulfilled`, allowing code to be run when a query is started, when it succeeds, and when it fails (i.e. throughout the lifecycle of an individual query/mutation call). @@ -175,7 +175,7 @@ declare module '../../endpointDefinitions' { */ onQueryStarted?( arg: QueryArg, - api: MutationLifecycleApi + api: MutationLifecycleApi, ): Promise | void } @@ -183,7 +183,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends QueryBaseLifecycleApi, QueryLifecyclePromises {} @@ -191,7 +191,7 @@ declare module '../../endpointDefinitions' { QueryArg, BaseQuery extends BaseQueryFn, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends MutationBaseLifecycleApi< QueryArg, BaseQuery, @@ -242,7 +242,7 @@ export const buildQueryLifecycleHandler: InternalHandlerBuilder = ({ const selector = (api.endpoints[endpointName] as any).select( endpointDefinition.type === DefinitionType.query ? originalArgs - : requestId + : requestId, ) const extra = mwApi.dispatch((_, __, extra) => extra) @@ -257,8 +257,8 @@ export const buildQueryLifecycleHandler: InternalHandlerBuilder = ({ api.util.updateQueryData( endpointName as never, originalArgs, - updateRecipe - ) + updateRecipe, + ), ) : undefined) as any, queryFulfilled, diff --git a/packages/toolkit/src/query/core/buildMiddleware/types.ts b/packages/toolkit/src/query/core/buildMiddleware/types.ts index 2e41e095f7..e2ab377b6c 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/types.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/types.ts @@ -41,7 +41,7 @@ export interface SubscriptionSelectors { export interface BuildMiddlewareInput< Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, > { reducerPath: ReducerPath context: ApiContext @@ -65,13 +65,13 @@ export interface BuildSubMiddlewareInput { status: QueryStatus.uninitialized } >, queryCacheKey: string, - override?: Partial + override?: Partial, ): AsyncThunkAction isThisApiSliceAction: (action: Action) => boolean } export type SubMiddlewareBuilder = ( - input: BuildSubMiddlewareInput + input: BuildSubMiddlewareInput, ) => Middleware< {}, RootState, @@ -83,11 +83,11 @@ type MwNext = Parameters>[0] export type ApiMiddlewareInternalHandler = ( action: Action, mwApi: SubMiddlewareApi & { next: MwNext }, - prevState: RootState + prevState: RootState, ) => Return export type InternalHandlerBuilder = ( - input: BuildSubMiddlewareInput + input: BuildSubMiddlewareInput, ) => ApiMiddlewareInternalHandler export interface PromiseConstructorWithKnownReason { @@ -100,8 +100,8 @@ export interface PromiseConstructorWithKnownReason { new ( executor: ( resolve: (value: T | PromiseLike) => void, - reject: (reason?: R) => void - ) => void + reject: (reason?: R) => void, + ) => void, ): PromiseWithKnownReason } @@ -121,7 +121,7 @@ export interface PromiseWithKnownReason onrejected?: | ((reason: R) => TResult2 | PromiseLike) | undefined - | null + | null, ): Promise /** @@ -133,6 +133,6 @@ export interface PromiseWithKnownReason onrejected?: | ((reason: R) => TResult | PromiseLike) | undefined - | null + | null, ): Promise } diff --git a/packages/toolkit/src/query/core/buildMiddleware/windowEventHandling.ts b/packages/toolkit/src/query/core/buildMiddleware/windowEventHandling.ts index 409bc56e08..d59df2eaa5 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/windowEventHandling.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/windowEventHandling.ts @@ -28,7 +28,7 @@ export const buildWindowEventHandler: InternalHandlerBuilder = ({ function refetchValidQueries( api: SubMiddlewareApi, - type: 'refetchOnFocus' | 'refetchOnReconnect' + type: 'refetchOnFocus' | 'refetchOnReconnect', ) { const state = api.getState()[reducerPath] const queries = state.queries @@ -43,10 +43,10 @@ export const buildWindowEventHandler: InternalHandlerBuilder = ({ const shouldRefetch = Object.values(subscriptionSubState).some( - (sub) => sub[type] === true + (sub) => sub[type] === true, ) || (Object.values(subscriptionSubState).every( - (sub) => sub[type] === undefined + (sub) => sub[type] === undefined, ) && state.config[type]) @@ -55,7 +55,7 @@ export const buildWindowEventHandler: InternalHandlerBuilder = ({ api.dispatch( removeQueryResult({ queryCacheKey: queryCacheKey as QueryCacheKey, - }) + }), ) } else if (querySubState.status !== QueryStatus.uninitialized) { api.dispatch(refetchQuery(querySubState, queryCacheKey)) diff --git a/packages/toolkit/src/query/core/buildSelectors.ts b/packages/toolkit/src/query/core/buildSelectors.ts index 8e151f809b..4ca49fc3e4 100644 --- a/packages/toolkit/src/query/core/buildSelectors.ts +++ b/packages/toolkit/src/query/core/buildSelectors.ts @@ -52,7 +52,7 @@ export const skipToken = /* @__PURE__ */ Symbol.for('RTKQ/skipToken') declare module './module' { export interface ApiEndpointQuery< Definition extends QueryDefinition, - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { select: QueryResultSelectorFactory< Definition, @@ -66,7 +66,7 @@ declare module './module' { export interface ApiEndpointMutation< Definition extends MutationDefinition, - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { select: MutationResultSelectorFactory< Definition, @@ -81,27 +81,27 @@ declare module './module' { type QueryResultSelectorFactory< Definition extends QueryDefinition, - RootState + RootState, > = ( - queryArg: QueryArgFrom | SkipToken + queryArg: QueryArgFrom | SkipToken, ) => (state: RootState) => QueryResultSelectorResult export type QueryResultSelectorResult< - Definition extends QueryDefinition + Definition extends QueryDefinition, > = QuerySubState & RequestStatusFlags type MutationResultSelectorFactory< Definition extends MutationDefinition, - RootState + RootState, > = ( requestId: | string | { requestId: string | undefined; fixedCacheKey: string | undefined } - | SkipToken + | SkipToken, ) => (state: RootState) => MutationResultSelectorResult export type MutationResultSelectorResult< - Definition extends MutationDefinition + Definition extends MutationDefinition, > = MutationSubState & RequestStatusFlags const initialSubState: QuerySubState = { @@ -111,16 +111,16 @@ const initialSubState: QuerySubState = { // abuse immer to freeze default states const defaultQuerySubState = /* @__PURE__ */ createNextState( initialSubState, - () => {} + () => {}, ) const defaultMutationSubState = /* @__PURE__ */ createNextState( initialSubState as MutationSubState, - () => {} + () => {}, ) export function buildSelectors< Definitions extends EndpointDefinitions, - ReducerPath extends string + ReducerPath extends string, >({ serializeQueryArgs, reducerPath, @@ -143,7 +143,7 @@ export function buildSelectors< } function withRequestFlags( - substate: T + substate: T, ): T & RequestStatusFlags { return { ...substate, @@ -158,7 +158,7 @@ export function buildSelectors< if ((selectInternalState as any).triggered) return state ;(selectInternalState as any).triggered = true console.error( - `Error: No data found at \`state.${reducerPath}\`. Did you forget to add the reducer to the store?` + `Error: No data found at \`state.${reducerPath}\`. Did you forget to add the reducer to the store?`, ) } } @@ -167,7 +167,7 @@ export function buildSelectors< function buildQuerySelector( endpointName: string, - endpointDefinition: QueryDefinition + endpointDefinition: QueryDefinition, ) { return ((queryArgs: any) => { const serializedArgs = serializeQueryArgs({ @@ -207,7 +207,7 @@ export function buildSelectors< function selectInvalidatedBy( state: RootState, - tags: ReadonlyArray> + tags: ReadonlyArray>, ): Array<{ endpointName: string originalArgs: any @@ -245,24 +245,24 @@ export function buildSelectors< }, ] : [] - }) + }), ) } function selectCachedArgsForQuery>( state: RootState, - queryName: QueryName + queryName: QueryName, ): Array> { return Object.values(state[reducerPath].queries as QueryState) .filter( ( - entry + entry, ): entry is Exclude< QuerySubState, { status: QueryStatus.uninitialized } > => entry?.endpointName === queryName && - entry.status !== QueryStatus.uninitialized + entry.status !== QueryStatus.uninitialized, ) .map((entry) => entry.originalArgs) } diff --git a/packages/toolkit/src/query/core/buildSlice.ts b/packages/toolkit/src/query/core/buildSlice.ts index bb712281a9..f609e3a989 100644 --- a/packages/toolkit/src/query/core/buildSlice.ts +++ b/packages/toolkit/src/query/core/buildSlice.ts @@ -46,7 +46,7 @@ import { isUpsertQuery } from './buildInitiate' function updateQuerySubstateIfExists( state: QueryState, queryCacheKey: QueryCacheKey, - update: (substate: QuerySubState) => void + update: (substate: QuerySubState) => void, ) { const substate = state[queryCacheKey] if (substate) { @@ -57,7 +57,7 @@ function updateQuerySubstateIfExists( export function getMutationCacheKey( id: | MutationSubstateIdentifier - | { requestId: string; arg: { fixedCacheKey?: string | undefined } } + | { requestId: string; arg: { fixedCacheKey?: string | undefined } }, ): string export function getMutationCacheKey(id: { fixedCacheKey?: string @@ -68,7 +68,7 @@ export function getMutationCacheKey( id: | { fixedCacheKey?: string; requestId?: string } | MutationSubstateIdentifier - | { requestId: string; arg: { fixedCacheKey?: string | undefined } } + | { requestId: string; arg: { fixedCacheKey?: string | undefined } }, ): string | undefined { return ('arg' in id ? id.arg.fixedCacheKey : id.fixedCacheKey) ?? id.requestId } @@ -78,7 +78,7 @@ function updateMutationSubstateIfExists( id: | MutationSubstateIdentifier | { requestId: string; arg: { fixedCacheKey?: string | undefined } }, - update: (substate: MutationSubState) => void + update: (substate: MutationSubState) => void, ) { const substate = state[getMutationCacheKey(id)] if (substate) { @@ -119,7 +119,9 @@ export function buildSlice({ removeQueryResult: { reducer( draft, - { payload: { queryCacheKey } }: PayloadAction + { + payload: { queryCacheKey }, + }: PayloadAction, ) { delete draft[queryCacheKey] }, @@ -132,7 +134,7 @@ export function buildSlice({ payload: { queryCacheKey, patches }, }: PayloadAction< QuerySubstateIdentifier & { patches: readonly Patch[] } - > + >, ) { updateQuerySubstateIfExists(draft, queryCacheKey, (substate) => { substate.data = applyPatches(substate.data as any, patches.concat()) @@ -200,7 +202,7 @@ export function buildSlice({ fulfilledTimeStamp, requestId, }) - } + }, ) substate.data = newData } else { @@ -215,14 +217,14 @@ export function buildSlice({ isDraft(substate.data) ? original(substate.data) : substate.data, - payload + payload, ) : payload } delete substate.error substate.fulfilledTimeStamp = meta.fulfilledTimeStamp - } + }, ) }) .addCase( @@ -240,9 +242,9 @@ export function buildSlice({ substate.status = QueryStatus.rejected substate.error = (payload ?? error) as any } - } + }, ) - } + }, ) .addMatcher(hasRehydrationInfo, (draft, action) => { const { queries } = extractRehydrationInfo(action)! @@ -285,7 +287,7 @@ export function buildSlice({ endpointName: arg.endpointName, startedTimeStamp, } - } + }, ) .addCase(mutationThunk.fulfilled, (draft, { payload, meta }) => { if (!meta.arg.track) return @@ -334,7 +336,7 @@ export function buildSlice({ action: PayloadAction<{ queryCacheKey: QueryCacheKey providedTags: readonly FullTagDescription[] - }> + }>, ) { const { queryCacheKey, providedTags } = action.payload @@ -370,7 +372,7 @@ export function buildSlice({ (draft, { payload: { queryCacheKey } }) => { for (const tagTypeSubscriptions of Object.values(draft)) { for (const idSubscriptions of Object.values( - tagTypeSubscriptions + tagTypeSubscriptions, )) { const foundAt = idSubscriptions.indexOf(queryCacheKey) if (foundAt !== -1) { @@ -378,7 +380,7 @@ export function buildSlice({ } } } - } + }, ) .addMatcher(hasRehydrationInfo, (draft, action) => { const { provided } = extractRehydrationInfo(action)! @@ -404,7 +406,7 @@ export function buildSlice({ action, 'providesTags', definitions, - assertTagType + assertTagType, ) const { queryCacheKey } = action.meta.arg @@ -413,9 +415,9 @@ export function buildSlice({ invalidationSlice.actions.updateProvidedBy({ queryCacheKey, providedTags, - }) + }), ) - } + }, ) }, }) @@ -433,13 +435,13 @@ export function buildSlice({ requestId: string options: Subscribers[number] } & QuerySubstateIdentifier - > + >, ) { // Dummy }, unsubscribeQueryResult( d, - a: PayloadAction<{ requestId: string } & QuerySubstateIdentifier> + a: PayloadAction<{ requestId: string } & QuerySubstateIdentifier>, ) { // Dummy }, diff --git a/packages/toolkit/src/query/core/buildThunks.ts b/packages/toolkit/src/query/core/buildThunks.ts index 70627228c4..2fe616bb7d 100644 --- a/packages/toolkit/src/query/core/buildThunks.ts +++ b/packages/toolkit/src/query/core/buildThunks.ts @@ -51,54 +51,55 @@ declare module './module' { export interface ApiEndpointQuery< Definition extends QueryDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > extends Matchers {} export interface ApiEndpointMutation< Definition extends MutationDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > extends Matchers {} } type EndpointThunk< Thunk extends QueryThunk | MutationThunk, - Definition extends EndpointDefinition -> = Definition extends EndpointDefinition< - infer QueryArg, - infer BaseQueryFn, - any, - infer ResultType -> - ? Thunk extends AsyncThunk - ? AsyncThunk< - ResultType, - ATArg & { originalArgs: QueryArg }, - ATConfig & { rejectValue: BaseQueryError } - > + Definition extends EndpointDefinition, +> = + Definition extends EndpointDefinition< + infer QueryArg, + infer BaseQueryFn, + any, + infer ResultType + > + ? Thunk extends AsyncThunk + ? AsyncThunk< + ResultType, + ATArg & { originalArgs: QueryArg }, + ATConfig & { rejectValue: BaseQueryError } + > + : never : never - : never export type PendingAction< Thunk extends QueryThunk | MutationThunk, - Definition extends EndpointDefinition + Definition extends EndpointDefinition, > = ReturnType['pending']> export type FulfilledAction< Thunk extends QueryThunk | MutationThunk, - Definition extends EndpointDefinition + Definition extends EndpointDefinition, > = ReturnType['fulfilled']> export type RejectedAction< Thunk extends QueryThunk | MutationThunk, - Definition extends EndpointDefinition + Definition extends EndpointDefinition, > = ReturnType['rejected']> export type Matcher = (value: any) => value is M export interface Matchers< Thunk extends QueryThunk | MutationThunk, - Definition extends EndpointDefinition + Definition extends EndpointDefinition, > { matchPending: Matcher> matchFulfilled: Matcher> @@ -156,36 +157,36 @@ function defaultTransformResponse(baseQueryReturnValue: unknown) { export type MaybeDrafted = T | Draft export type Recipe = (data: MaybeDrafted) => void | MaybeDrafted export type UpsertRecipe = ( - data: MaybeDrafted | undefined + data: MaybeDrafted | undefined, ) => void | MaybeDrafted export type PatchQueryDataThunk< Definitions extends EndpointDefinitions, - PartialState + PartialState, > = >( endpointName: EndpointName, args: QueryArgFrom, patches: readonly Patch[], - updateProvided?: boolean + updateProvided?: boolean, ) => ThunkAction export type UpdateQueryDataThunk< Definitions extends EndpointDefinitions, - PartialState + PartialState, > = >( endpointName: EndpointName, args: QueryArgFrom, updateRecipe: Recipe>, - updateProvided?: boolean + updateProvided?: boolean, ) => ThunkAction export type UpsertQueryDataThunk< Definitions extends EndpointDefinitions, - PartialState + PartialState, > = >( endpointName: EndpointName, args: QueryArgFrom, - value: ResultTypeFrom + value: ResultTypeFrom, ) => ThunkAction< QueryActionCreatorResult< Definitions[EndpointName] extends QueryDefinition @@ -218,7 +219,7 @@ export type PatchCollection = { export function buildThunks< BaseQuery extends BaseQueryFn, ReducerPath extends string, - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, >({ reducerPath, baseQuery, @@ -247,7 +248,7 @@ export function buildThunks< }) dispatch( - api.internalActions.queryResultPatched({ queryCacheKey, patches }) + api.internalActions.queryResultPatched({ queryCacheKey, patches }), ) if (!updateProvided) { @@ -256,7 +257,7 @@ export function buildThunks< const newValue = api.endpoints[endpointName].select(args)( // Work around TS 4.1 mismatch - getState() as RootState + getState() as RootState, ) const providedTags = calculateProvidedBy( @@ -265,11 +266,11 @@ export function buildThunks< undefined, args, {}, - assertTagType + assertTagType, ) dispatch( - api.internalActions.updateProvidedBy({ queryCacheKey, providedTags }) + api.internalActions.updateProvidedBy({ queryCacheKey, providedTags }), ) } @@ -280,7 +281,7 @@ export function buildThunks< const currentState = endpointDefinition.select(args)( // Work around TS 4.1 mismatch - getState() as RootState + getState() as RootState, ) let ret: PatchCollection = { @@ -292,8 +293,8 @@ export function buildThunks< endpointName, args, ret.inversePatches, - updateProvided - ) + updateProvided, + ), ), } if (currentState.status === QueryStatus.uninitialized) { @@ -304,7 +305,7 @@ export function buildThunks< if (isDraftable(currentState.data)) { const [value, patches, inversePatches] = produceWithPatches( currentState.data, - updateRecipe + updateRecipe, ) ret.patches.push(...patches) ret.inversePatches.push(...inversePatches) @@ -321,7 +322,12 @@ export function buildThunks< } dispatch( - api.util.patchQueryData(endpointName, args, ret.patches, updateProvided) + api.util.patchQueryData( + endpointName, + args, + ret.patches, + updateProvided, + ), ) return ret @@ -341,7 +347,7 @@ export function buildThunks< [forceQueryFnSymbol]: () => ({ data: value, }), - }) + }), ) } @@ -359,7 +365,7 @@ export function buildThunks< dispatch, getState, extra, - } + }, ) => { const endpointDefinition = endpointDefinitions[arg.endpointName] @@ -367,7 +373,7 @@ export function buildThunks< let transformResponse: ( baseQueryReturnValue: any, meta: any, - arg: any + arg: any, ) => any = defaultTransformResponse let result: QueryReturnValue const baseQueryApi = { @@ -390,7 +396,7 @@ export function buildThunks< result = await baseQuery( endpointDefinition.query(arg.originalArgs), baseQueryApi, - endpointDefinition.extraOptions as any + endpointDefinition.extraOptions as any, ) if (endpointDefinition.transformResponse) { @@ -402,7 +408,11 @@ export function buildThunks< baseQueryApi, endpointDefinition.extraOptions as any, (arg) => - baseQuery(arg, baseQueryApi, endpointDefinition.extraOptions as any) + baseQuery( + arg, + baseQueryApi, + endpointDefinition.extraOptions as any, + ), ) } if ( @@ -433,7 +443,7 @@ export function buildThunks< ${err} It needs to return an object with either the shape \`{ data: }\` or \`{ error: }\` that may contain an optional \`meta\` property. Object returned was:`, - result + result, ) } } @@ -446,7 +456,7 @@ export function buildThunks< fulfilledTimeStamp: Date.now(), baseQueryMeta: result.meta, [SHOULD_AUTOBATCH]: true, - } + }, ) } catch (error) { let catchedError = error @@ -454,7 +464,7 @@ export function buildThunks< let transformErrorResponse: ( baseQueryReturnValue: any, meta: any, - arg: any + arg: any, ) => any = defaultTransformResponse if ( @@ -468,9 +478,9 @@ export function buildThunks< await transformErrorResponse( catchedError.value, catchedError.meta, - arg.originalArgs + arg.originalArgs, ), - { baseQueryMeta: catchedError.meta, [SHOULD_AUTOBATCH]: true } + { baseQueryMeta: catchedError.meta, [SHOULD_AUTOBATCH]: true }, ) } catch (e) { catchedError = e @@ -483,7 +493,7 @@ export function buildThunks< console.error( `An unhandled error occurred processing a request for the endpoint "${arg.endpointName}". In the case of an unhandled error, no tags will be "provided" or "invalidated".`, - catchedError + catchedError, ) } else { console.error(catchedError) @@ -494,7 +504,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".` function isForcedQuery( arg: QueryThunkArg, - state: RootState + state: RootState, ) { const requestState = state[reducerPath]?.queries?.[arg.queryCacheKey] const baseFetchOnMountOrArgChange = @@ -586,14 +596,14 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".` const hasTheForce = (options: any): options is { force: boolean } => 'force' in options const hasMaxAge = ( - options: any + options: any, ): options is { ifOlderThan: false | number } => 'ifOlderThan' in options const prefetch = >( endpointName: EndpointName, arg: any, - options: PrefetchOptions + options: PrefetchOptions, ): ThunkAction => (dispatch: ThunkDispatch, getState: () => any) => { const force = hasTheForce(options) && options.force @@ -602,7 +612,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".` const queryAction = (force: boolean = true) => (api.endpoints[endpointName] as ApiEndpointQuery).initiate( arg, - { forceRefetch: force } + { forceRefetch: force }, ) const latestStateValue = ( api.endpoints[endpointName] as ApiEndpointQuery @@ -636,13 +646,13 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".` function buildMatchThunkActions< Thunk extends | AsyncThunk - | AsyncThunk + | AsyncThunk, >(thunk: Thunk, endpointName: string) { return { matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)), matchFulfilled: isAllOf( isFulfilled(thunk), - matchesEndpoint(endpointName) + matchesEndpoint(endpointName), ), matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName)), } as Matchers @@ -665,7 +675,7 @@ export function calculateProvidedByThunk( >, type: 'providesTags' | 'invalidatesTags', endpointDefinitions: EndpointDefinitions, - assertTagType: AssertTagTypes + assertTagType: AssertTagTypes, ) { return calculateProvidedBy( endpointDefinitions[action.meta.arg.endpointName][type], @@ -673,6 +683,6 @@ export function calculateProvidedByThunk( isRejectedWithValue(action) ? action.payload : undefined, action.meta.arg.originalArgs, 'baseQueryMeta' in action.meta ? action.meta.baseQueryMeta : undefined, - assertTagType + assertTagType, ) } diff --git a/packages/toolkit/src/query/core/module.ts b/packages/toolkit/src/query/core/module.ts index 8d8ab6b117..c237c7b298 100644 --- a/packages/toolkit/src/query/core/module.ts +++ b/packages/toolkit/src/query/core/module.ts @@ -81,7 +81,7 @@ declare module '../apiTypes' { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, > { [coreModuleName]: { /** @@ -153,7 +153,7 @@ declare module '../apiTypes' { */ getRunningQueryThunk>( endpointName: EndpointName, - args: QueryArgFrom + args: QueryArgFrom, ): ThunkWithReturnValue< | QueryActionCreatorResult< Definitions[EndpointName] & { type: 'query' } @@ -173,7 +173,7 @@ declare module '../apiTypes' { */ getRunningMutationThunk>( endpointName: EndpointName, - fixedCacheKeyOrRequestId: string + fixedCacheKeyOrRequestId: string, ): ThunkWithReturnValue< | MutationActionCreatorResult< Definitions[EndpointName] & { type: 'mutation' } @@ -221,7 +221,7 @@ declare module '../apiTypes' { prefetch>( endpointName: EndpointName, arg: QueryArgFrom, - options: PrefetchOptions + options: PrefetchOptions, ): ThunkAction /** * A Redux thunk action creator that, when dispatched, creates and applies a set of JSON diff/patch objects to the current state. This immediately updates the Redux state with those changes. @@ -351,7 +351,7 @@ declare module '../apiTypes' { */ selectInvalidatedBy: ( state: RootState, - tags: ReadonlyArray> + tags: ReadonlyArray>, ) => Array<{ endpointName: string originalArgs: any @@ -365,7 +365,7 @@ declare module '../apiTypes' { */ selectCachedArgsForQuery: >( state: RootState, - queryName: QueryName + queryName: QueryName, ) => Array> } /** @@ -381,8 +381,8 @@ declare module '../apiTypes' { > ? ApiEndpointQuery : Definitions[K] extends MutationDefinition - ? ApiEndpointMutation - : never + ? ApiEndpointMutation + : never } } } @@ -392,7 +392,7 @@ export interface ApiEndpointQuery< // eslint-disable-next-line @typescript-eslint/no-unused-vars Definition extends QueryDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { name: string /** @@ -406,7 +406,7 @@ export interface ApiEndpointMutation< // eslint-disable-next-line @typescript-eslint/no-unused-vars Definition extends MutationDefinition, // eslint-disable-next-line @typescript-eslint/no-unused-vars - Definitions extends EndpointDefinitions + Definitions extends EndpointDefinitions, > { name: string /** @@ -464,7 +464,7 @@ export const coreModule = ({ refetchOnReconnect, invalidationBehavior, }, - context + context, ) { enablePatches() @@ -477,7 +477,7 @@ export const coreModule = ({ ) { if (!tagTypes.includes(tag.type as any)) { console.error( - `Tag type '${tag.type}' was used, but not specified in \`tagTypes\`!` + `Tag type '${tag.type}' was used, but not specified in \`tagTypes\`!`, ) } } @@ -604,7 +604,7 @@ export const coreModule = ({ select: buildQuerySelector(endpointName, definition), initiate: buildInitiateQuery(endpointName, definition), }, - buildMatchThunkActions(queryThunk, endpointName) + buildMatchThunkActions(queryThunk, endpointName), ) } else if (isMutationDefinition(definition)) { safeAssign( @@ -614,7 +614,7 @@ export const coreModule = ({ select: buildMutationSelector(), initiate: buildInitiateMutation(endpointName), }, - buildMatchThunkActions(mutationThunk, endpointName) + buildMatchThunkActions(mutationThunk, endpointName), ) } }, diff --git a/packages/toolkit/src/query/core/setupListeners.ts b/packages/toolkit/src/query/core/setupListeners.ts index 01df593906..1c52042738 100644 --- a/packages/toolkit/src/query/core/setupListeners.ts +++ b/packages/toolkit/src/query/core/setupListeners.ts @@ -36,8 +36,8 @@ export function setupListeners( onFocusLost: typeof onFocusLost onOnline: typeof onOnline onOffline: typeof onOffline - } - ) => () => void + }, + ) => () => void, ) { function defaultHandler() { const handleFocus = () => dispatch(onFocus()) @@ -58,7 +58,7 @@ export function setupListeners( window.addEventListener( 'visibilitychange', handleVisibilityChange, - false + false, ) window.addEventListener('focus', handleFocus, false) diff --git a/packages/toolkit/src/query/createApi.ts b/packages/toolkit/src/query/createApi.ts index ed22f4ec9e..2a9eb4e9a2 100644 --- a/packages/toolkit/src/query/createApi.ts +++ b/packages/toolkit/src/query/createApi.ts @@ -17,7 +17,7 @@ export interface CreateApiOptions< BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, > { /** * The base query used by each endpoint if no `queryFn` option is specified. RTK Query exports a utility called [fetchBaseQuery](./fetchBaseQuery) as a lightweight wrapper around `fetch` for common use-cases. See [Customizing Queries](../../rtk-query/usage/customizing-queries) if `fetchBaseQuery` does not handle your requirements. @@ -97,7 +97,7 @@ export interface CreateApiOptions< * Endpoints are just a set of operations that you want to perform against your server. You define them as an object using the builder syntax. There are two basic endpoint types: [`query`](../../rtk-query/usage/queries) and [`mutation`](../../rtk-query/usage/mutations). */ endpoints( - build: EndpointBuilder + build: EndpointBuilder, ): Definitions /** * Defaults to `60` _(this value is in seconds)_. This is how long RTK Query will keep your data cached for **after** the last component unsubscribes. For example, if you query an endpoint, then unmount the component, then mount another component that makes the same request within the given time frame, the most recent value will be served from the cache. @@ -200,7 +200,7 @@ export interface CreateApiOptions< reducerPath, }: { reducerPath: ReducerPath - } + }, ) => | undefined | CombinedState< @@ -220,9 +220,9 @@ export type CreateApi = { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string = 'api', - TagTypes extends string = never + TagTypes extends string = never, >( - options: CreateApiOptions + options: CreateApiOptions, ): Api } @@ -256,7 +256,7 @@ export function buildCreateApi, ...Module[]]>( const extractRehydrationInfo = weakMapMemoize((action: UnknownAction) => options.extractRehydrationInfo?.(action, { reducerPath: (options.reducerPath ?? 'api') as any, - }) + }), ) const optionsWithDefaults: CreateApiOptions = { @@ -305,7 +305,7 @@ export function buildCreateApi, ...Module[]]>( apiUid: nanoid(), extractRehydrationInfo, hasRehydrationInfo: weakMapMemoize( - (action) => extractRehydrationInfo(action) != null + (action) => extractRehydrationInfo(action) != null, ), } @@ -321,14 +321,14 @@ export function buildCreateApi, ...Module[]]>( } if (endpoints) { for (const [endpointName, partialDefinition] of Object.entries( - endpoints + endpoints, )) { if (typeof partialDefinition === 'function') { partialDefinition(context.endpointDefinitions[endpointName]) } else { Object.assign( context.endpointDefinitions[endpointName] || {}, - partialDefinition + partialDefinition, ) } } @@ -338,19 +338,19 @@ export function buildCreateApi, ...Module[]]>( } as Api const initializedModules = modules.map((m) => - m.init(api as any, optionsWithDefaults as any, context) + m.init(api as any, optionsWithDefaults as any, context), ) function injectEndpoints( - inject: Parameters[0] + inject: Parameters[0], ) { const evaluatedEndpoints = inject.endpoints({ - query: (x) => ({ ...x, type: DefinitionType.query } as any), - mutation: (x) => ({ ...x, type: DefinitionType.mutation } as any), + query: (x) => ({ ...x, type: DefinitionType.query }) as any, + mutation: (x) => ({ ...x, type: DefinitionType.mutation }) as any, }) for (const [endpointName, definition] of Object.entries( - evaluatedEndpoints + evaluatedEndpoints, )) { if ( !inject.overrideExisting && @@ -361,7 +361,7 @@ export function buildCreateApi, ...Module[]]>( process.env.NODE_ENV === 'development' ) { console.error( - `called \`injectEndpoints\` to override already-existing endpointName ${endpointName} without specifying \`overrideExisting: true\`` + `called \`injectEndpoints\` to override already-existing endpointName ${endpointName} without specifying \`overrideExisting: true\``, ) } diff --git a/packages/toolkit/src/query/defaultSerializeQueryArgs.ts b/packages/toolkit/src/query/defaultSerializeQueryArgs.ts index e3fe011b44..fcfd63aeb9 100644 --- a/packages/toolkit/src/query/defaultSerializeQueryArgs.ts +++ b/packages/toolkit/src/query/defaultSerializeQueryArgs.ts @@ -25,7 +25,7 @@ export const defaultSerializeQueryArgs: SerializeQueryArgs = ({ acc[key] = (value as any)[key] return acc }, {}) - : value + : value, ) if (isPlainObject(queryArgs)) { cache?.set(queryArgs, stringified) diff --git a/packages/toolkit/src/query/endpointDefinitions.ts b/packages/toolkit/src/query/endpointDefinitions.ts index 42f844cfe2..1a552fae94 100644 --- a/packages/toolkit/src/query/endpointDefinitions.ts +++ b/packages/toolkit/src/query/endpointDefinitions.ts @@ -27,7 +27,7 @@ const baseQuery = /* @__PURE__ */ Symbol() interface EndpointDefinitionWithQuery< QueryArg, BaseQuery extends BaseQueryFn, - ResultType + ResultType, > { /** * `query` can be a function that returns either a `string` or an `object` which is passed to your `baseQuery`. If you are using [fetchBaseQuery](./fetchBaseQuery), this can return either a `string` or an `object` of properties in `FetchArgs`. If you use your own custom [`baseQuery`](../../rtk-query/usage/customizing-queries), you can customize this behavior to your liking. @@ -75,7 +75,7 @@ interface EndpointDefinitionWithQuery< transformResponse?( baseQueryReturnValue: BaseQueryResult, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): ResultType | Promise /** * A function to manipulate the data returned by a failed query or mutation. @@ -83,7 +83,7 @@ interface EndpointDefinitionWithQuery< transformErrorResponse?( baseQueryReturnValue: BaseQueryError, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): unknown /** * Defaults to `true`. @@ -103,7 +103,7 @@ interface EndpointDefinitionWithQuery< interface EndpointDefinitionWithQueryFn< QueryArg, BaseQuery extends BaseQueryFn, - ResultType + ResultType, > { /** * Can be used in place of `query` as an inline function that bypasses `baseQuery` completely for the endpoint. @@ -147,7 +147,7 @@ interface EndpointDefinitionWithQueryFn< arg: QueryArg, api: BaseQueryApi, extraOptions: BaseQueryExtraOptions, - baseQuery: (arg: Parameters[0]) => ReturnType + baseQuery: (arg: Parameters[0]) => ReturnType, ): MaybePromise< QueryReturnValue< ResultType, @@ -176,7 +176,7 @@ interface EndpointDefinitionWithQueryFn< export interface BaseEndpointTypes< QueryArg, BaseQuery extends BaseQueryFn, - ResultType + ResultType, > { QueryArg: QueryArg BaseQuery: BaseQuery @@ -186,7 +186,7 @@ export interface BaseEndpointTypes< export type BaseEndpointDefinition< QueryArg, BaseQuery extends BaseQueryFn, - ResultType + ResultType, > = ( | ([CastAny, {}>] extends [NEVER] ? never @@ -213,12 +213,12 @@ export type GetResultDescriptionFn< ResultType, QueryArg, ErrorType, - MetaType + MetaType, > = ( result: ResultType | undefined, error: ErrorType | undefined, arg: QueryArg, - meta: MetaType + meta: MetaType, ) => ReadonlyArray> export type FullTagDescription = { @@ -231,7 +231,7 @@ export type ResultDescription< ResultType, QueryArg, ErrorType, - MetaType + MetaType, > = | ReadonlyArray> | GetResultDescriptionFn @@ -241,7 +241,7 @@ export interface QueryTypes< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends BaseEndpointTypes { /** * The endpoint definition type. To be used with some internal generic types. @@ -266,7 +266,7 @@ export interface QueryExtraOptions< ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { type: DefinitionType.query /** @@ -445,7 +445,7 @@ export interface QueryExtraOptions< baseQueryMeta: BaseQueryMeta requestId: string fulfilledTimeStamp: number - } + }, ): ResultType | void /** @@ -506,7 +506,7 @@ export type QueryDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & QueryExtraOptions @@ -515,7 +515,7 @@ export interface MutationTypes< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > extends BaseEndpointTypes { /** * The endpoint definition type. To be used with some internal generic types. @@ -540,7 +540,7 @@ export interface MutationExtraOptions< ResultType, QueryArg, BaseQuery extends BaseQueryFn, - ReducerPath extends string = string + ReducerPath extends string = string, > { type: DefinitionType.mutation /** @@ -611,7 +611,7 @@ export type MutationDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = BaseEndpointDefinition & MutationExtraOptions @@ -620,7 +620,7 @@ export type EndpointDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = | QueryDefinition | MutationDefinition @@ -631,13 +631,13 @@ export type EndpointDefinitions = Record< > export function isQueryDefinition( - e: EndpointDefinition + e: EndpointDefinition, ): e is QueryDefinition { return e.type === DefinitionType.query } export function isMutationDefinition( - e: EndpointDefinition + e: EndpointDefinition, ): e is MutationDefinition { return e.type === DefinitionType.mutation } @@ -645,7 +645,7 @@ export function isMutationDefinition( export type EndpointBuilder< BaseQuery extends BaseQueryFn, TagTypes extends string, - ReducerPath extends string + ReducerPath extends string, > = { /** * An endpoint definition that retrieves data, and may provide tags to the cache. @@ -677,7 +677,7 @@ export type EndpointBuilder< definition: OmitFromUnion< QueryDefinition, 'type' - > + >, ): QueryDefinition /** * An endpoint definition that alters data on the server or will possibly invalidate the cache. @@ -715,7 +715,7 @@ export type EndpointBuilder< ReducerPath >, 'type' - > + >, ): MutationDefinition } @@ -729,14 +729,14 @@ export function calculateProvidedBy( error: ErrorType | undefined, queryArg: QueryArg, meta: MetaType | undefined, - assertTagTypes: AssertTagTypes + assertTagTypes: AssertTagTypes, ): readonly FullTagDescription[] { if (isFunction(description)) { return description( result as ResultType, error as undefined, queryArg, - meta as MetaType + meta as MetaType, ) .map(expandTagDescription) .map(assertTagTypes) @@ -752,7 +752,7 @@ function isFunction(t: T): t is Extract { } export function expandTagDescription( - description: TagDescription + description: TagDescription, ): FullTagDescription { return typeof description === 'string' ? { type: description } : description } @@ -763,29 +763,22 @@ export type ResultTypeFrom> = D extends BaseEndpointDefinition ? RT : unknown export type ReducerPathFrom< - D extends EndpointDefinition + D extends EndpointDefinition, > = D extends EndpointDefinition ? RP : unknown export type TagTypesFrom> = D extends EndpointDefinition ? RP : unknown -export type TagTypesFromApi = T extends Api - ? TagTypes - : never +export type TagTypesFromApi = + T extends Api ? TagTypes : never -export type DefinitionsFromApi = T extends Api< - any, - infer Definitions, - any, - any -> - ? Definitions - : never +export type DefinitionsFromApi = + T extends Api ? Definitions : never export type TransformedResponse< NewDefinitions extends EndpointDefinitions, K, - ResultType + ResultType, > = K extends keyof NewDefinitions ? NewDefinitions[K]['transformResponse'] extends undefined ? ResultType @@ -804,25 +797,25 @@ export type OverrideResultType = > ? QueryDefinition : Definition extends MutationDefinition< - infer QueryArg, - infer BaseQuery, - infer TagTypes, - any, - infer ReducerPath - > - ? MutationDefinition< - QueryArg, - BaseQuery, - TagTypes, - NewResultType, - ReducerPath - > - : never + infer QueryArg, + infer BaseQuery, + infer TagTypes, + any, + infer ReducerPath + > + ? MutationDefinition< + QueryArg, + BaseQuery, + TagTypes, + NewResultType, + ReducerPath + > + : never export type UpdateDefinitions< Definitions extends EndpointDefinitions, NewTagTypes extends string, - NewDefinitions extends EndpointDefinitions + NewDefinitions extends EndpointDefinitions, > = { [K in keyof Definitions]: Definitions[K] extends QueryDefinition< infer QueryArg, @@ -839,18 +832,18 @@ export type UpdateDefinitions< ReducerPath > : Definitions[K] extends MutationDefinition< - infer QueryArg, - infer BaseQuery, - any, - infer ResultType, - infer ReducerPath - > - ? MutationDefinition< - QueryArg, - BaseQuery, - NewTagTypes, - TransformedResponse, - ReducerPath - > - : never + infer QueryArg, + infer BaseQuery, + any, + infer ResultType, + infer ReducerPath + > + ? MutationDefinition< + QueryArg, + BaseQuery, + NewTagTypes, + TransformedResponse, + ReducerPath + > + : never } diff --git a/packages/toolkit/src/query/fakeBaseQuery.ts b/packages/toolkit/src/query/fakeBaseQuery.ts index 54def42b33..4e1c4f2270 100644 --- a/packages/toolkit/src/query/fakeBaseQuery.ts +++ b/packages/toolkit/src/query/fakeBaseQuery.ts @@ -15,7 +15,7 @@ export function fakeBaseQuery(): BaseQueryFn< > { return function () { throw new Error( - 'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.' + 'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.', ) } } diff --git a/packages/toolkit/src/query/fetchBaseQuery.ts b/packages/toolkit/src/query/fetchBaseQuery.ts index 055bf6f47b..00cf6e54ab 100644 --- a/packages/toolkit/src/query/fetchBaseQuery.ts +++ b/packages/toolkit/src/query/fetchBaseQuery.ts @@ -112,11 +112,11 @@ export type FetchBaseQueryArgs = { api: Pick< BaseQueryApi, 'getState' | 'extra' | 'endpoint' | 'type' | 'forced' - > + >, ) => MaybePromise fetchFn?: ( input: RequestInfo, - init?: RequestInit | undefined + init?: RequestInit | undefined, ) => Promise paramsSerializer?: (params: Record) => string /** @@ -209,7 +209,7 @@ export function fetchBaseQuery({ > { if (typeof fetch === 'undefined' && fetchFn === defaultFetchFn) { console.warn( - 'Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.' + 'Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.', ) } return async (arg, api) => { @@ -301,13 +301,13 @@ export function fetchBaseQuery({ await Promise.all([ handleResponse(response, responseHandler).then( (r) => (resultData = r), - (e) => (handleResponseError = e) + (e) => (handleResponseError = e), ), // see https://github.com/node-fetch/node-fetch/issues/665#issuecomment-538995182 // we *have* to "use up" both streams at the same time or they will stop running in node-fetch scenarios responseClone.text().then( (r) => (responseText = r), - () => {} + () => {}, ), ]) if (handleResponseError) throw handleResponseError @@ -339,7 +339,7 @@ export function fetchBaseQuery({ async function handleResponse( response: Response, - responseHandler: ResponseHandler + responseHandler: ResponseHandler, ) { if (typeof responseHandler === 'function') { return responseHandler(response) diff --git a/packages/toolkit/src/query/react/ApiProvider.tsx b/packages/toolkit/src/query/react/ApiProvider.tsx index 4c9f7acf23..a2d56f3ae2 100644 --- a/packages/toolkit/src/query/react/ApiProvider.tsx +++ b/packages/toolkit/src/query/react/ApiProvider.tsx @@ -42,7 +42,7 @@ export function ApiProvider>(props: { const existingContext = useContext(context) if (existingContext) { throw new Error( - 'Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup.' + 'Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup.', ) } const [store] = React.useState(() => @@ -51,7 +51,7 @@ export function ApiProvider>(props: { [props.api.reducerPath]: props.api.reducer, }, middleware: (gDM) => gDM().concat(props.api.middleware), - }) + }), ) // Adds the event listeners for online/offline/focus/etc useEffect( @@ -59,7 +59,7 @@ export function ApiProvider>(props: { props.setupListeners === false ? undefined : setupListeners(store.dispatch, props.setupListeners), - [props.setupListeners, store.dispatch] + [props.setupListeners, store.dispatch], ) return ( diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index 5a524719cf..b6d611b778 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -61,7 +61,7 @@ export const useIsomorphicLayoutEffect = : useEffect export interface QueryHooks< - Definition extends QueryDefinition + Definition extends QueryDefinition, > { useQuery: UseQuery useLazyQuery: UseLazyQuery @@ -71,7 +71,7 @@ export interface QueryHooks< } export interface MutationHooks< - Definition extends MutationDefinition + Definition extends MutationDefinition, > { useMutation: UseMutation } @@ -92,15 +92,15 @@ export interface MutationHooks< * - Re-renders as the request status changes and data becomes available */ export type UseQuery> = < - R extends Record = UseQueryStateDefaultResult + R extends Record = UseQueryStateDefaultResult, >( arg: QueryArgFrom | SkipToken, - options?: UseQuerySubscriptionOptions & UseQueryStateOptions + options?: UseQuerySubscriptionOptions & UseQueryStateOptions, ) => UseQueryHookResult export type UseQueryHookResult< D extends QueryDefinition, - R = UseQueryStateDefaultResult + R = UseQueryStateDefaultResult, > = UseQueryStateResult & UseQuerySubscriptionResult /** @@ -113,7 +113,7 @@ export type TypedUseQueryHookResult< BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult< QueryDefinition - > + >, > = TypedUseQueryStateResult & TypedUseQuerySubscriptionResult @@ -176,14 +176,14 @@ interface UseQuerySubscriptionOptions extends SubscriptionOptions { * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met */ export type UseQuerySubscription< - D extends QueryDefinition + D extends QueryDefinition, > = ( arg: QueryArgFrom | SkipToken, - options?: UseQuerySubscriptionOptions + options?: UseQuerySubscriptionOptions, ) => UseQuerySubscriptionResult export type UseQuerySubscriptionResult< - D extends QueryDefinition + D extends QueryDefinition, > = Pick, 'refetch'> /** @@ -193,13 +193,13 @@ export type UseQuerySubscriptionResult< export type TypedUseQuerySubscriptionResult< ResultType, QueryArg, - BaseQuery extends BaseQueryFn + BaseQuery extends BaseQueryFn, > = UseQuerySubscriptionResult< QueryDefinition > export type UseLazyQueryLastPromiseInfo< - D extends QueryDefinition + D extends QueryDefinition, > = { lastArg: QueryArgFrom } @@ -222,13 +222,13 @@ export type UseLazyQueryLastPromiseInfo< * When the trigger function returned from a LazyQuery is called, it always initiates a new request to the server even if there is cached data. Set `preferCacheValue`(the second argument to the function) as `true` if you want it to immediately return a cached value if one exists. */ export type UseLazyQuery> = < - R extends Record = UseQueryStateDefaultResult + R extends Record = UseQueryStateDefaultResult, >( - options?: SubscriptionOptions & Omit, 'skip'> + options?: SubscriptionOptions & Omit, 'skip'>, ) => [ LazyQueryTrigger, UseQueryStateResult, - UseLazyQueryLastPromiseInfo + UseLazyQueryLastPromiseInfo, ] export type LazyQueryTrigger> = { @@ -254,7 +254,7 @@ export type LazyQueryTrigger> = { */ ( arg: QueryArgFrom, - preferCacheValue?: boolean + preferCacheValue?: boolean, ): QueryActionCreatorResult } @@ -270,14 +270,14 @@ export type LazyQueryTrigger> = { * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met and the fetch has been manually called at least once */ export type UseLazyQuerySubscription< - D extends QueryDefinition + D extends QueryDefinition, > = ( - options?: SubscriptionOptions + options?: SubscriptionOptions, ) => readonly [LazyQueryTrigger, QueryArgFrom | UninitializedValue] export type QueryStateSelector< R extends Record, - D extends QueryDefinition + D extends QueryDefinition, > = (state: UseQueryStateDefaultResult) => R /** @@ -291,15 +291,15 @@ export type QueryStateSelector< * - Re-renders as the request status changes and data becomes available */ export type UseQueryState> = < - R extends Record = UseQueryStateDefaultResult + R extends Record = UseQueryStateDefaultResult, >( arg: QueryArgFrom | SkipToken, - options?: UseQueryStateOptions + options?: UseQueryStateOptions, ) => UseQueryStateResult export type UseQueryStateOptions< D extends QueryDefinition, - R extends Record + R extends Record, > = { /** * Prevents a query from automatically running. @@ -369,7 +369,7 @@ export type UseQueryStateOptions< export type UseQueryStateResult< _ extends QueryDefinition, - R + R, > = TSHelpersNoInfer /** @@ -382,7 +382,7 @@ export type TypedUseQueryStateResult< BaseQuery extends BaseQueryFn, R = UseQueryStateDefaultResult< QueryDefinition - > + >, > = TSHelpersNoInfer type UseQueryStateBaseResult> = @@ -459,12 +459,12 @@ type UseQueryStateDefaultResult> = export type MutationStateSelector< R extends Record, - D extends MutationDefinition + D extends MutationDefinition, > = (state: MutationResultSelectorResult) => R export type UseMutationStateOptions< D extends MutationDefinition, - R extends Record + R extends Record, > = { selectFromResult?: MutationStateSelector fixedCacheKey?: string @@ -472,7 +472,7 @@ export type UseMutationStateOptions< export type UseMutationStateResult< D extends MutationDefinition, - R + R, > = TSHelpersNoInfer & { originalArgs?: QueryArgFrom /** @@ -492,7 +492,7 @@ export type TypedUseMutationResult< BaseQuery extends BaseQueryFn, R = MutationResultSelectorResult< MutationDefinition - > + >, > = UseMutationStateResult< MutationDefinition, R @@ -509,9 +509,9 @@ export type TypedUseMutationResult< * - Re-renders as the request status changes and data becomes available */ export type UseMutation> = < - R extends Record = MutationResultSelectorResult + R extends Record = MutationResultSelectorResult, >( - options?: UseMutationStateOptions + options?: UseMutationStateOptions, ) => readonly [MutationTrigger, UseMutationStateResult] export type MutationTrigger> = @@ -542,7 +542,7 @@ export type MutationTrigger> = * to prevent that the library user has to do an additional check for `isUninitialized`/ */ const noPendingQueryStateSelector: QueryStateSelector = ( - selected + selected, ) => { if (selected.isUninitialized) { return { @@ -559,7 +559,7 @@ const noPendingQueryStateSelector: QueryStateSelector = ( type GenericPrefetchThunk = ( endpointName: any, arg: any, - options: PrefetchOptions + options: PrefetchOptions, ) => ThunkAction /** @@ -588,7 +588,7 @@ export function buildHooks({ }) { const usePossiblyImmediateEffect: ( effect: () => void | undefined, - deps?: DependencyList + deps?: DependencyList, ) => void = unstable__sideEffectsInRender ? (cb) => cb() : useEffect return { buildQueryHooks, buildMutationHook, usePrefetch } @@ -596,7 +596,7 @@ export function buildHooks({ function queryStatePreSelector( currentState: QueryResultSelectorResult, lastResult: UseQueryStateDefaultResult | undefined, - queryArgs: any + queryArgs: any, ): UseQueryStateDefaultResult { // if we had a last result and the current result is uninitialized, // we might have called `api.util.resetApiState` @@ -644,7 +644,7 @@ export function buildHooks({ function usePrefetch>( endpointName: EndpointName, - defaultOptions?: PrefetchOptions + defaultOptions?: PrefetchOptions, ) { const dispatch = useDispatch>() const stableDefaultOptions = useShallowStableValue(defaultOptions) @@ -655,9 +655,9 @@ export function buildHooks({ (api.util.prefetch as GenericPrefetchThunk)(endpointName, arg, { ...stableDefaultOptions, ...options, - }) + }), ), - [endpointName, dispatch, stableDefaultOptions] + [endpointName, dispatch, stableDefaultOptions], ) } @@ -671,7 +671,7 @@ export function buildHooks({ skip = false, pollingInterval = 0, skipPollingIfUnfocused = false, - } = {} + } = {}, ) => { const { initiate } = api.endpoints[name] as ApiEndpointQuery< QueryDefinition, @@ -681,7 +681,7 @@ export function buildHooks({ const subscriptionSelectorsRef = useRef() if (!subscriptionSelectorsRef.current) { const returnedValue = dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) if (process.env.NODE_ENV !== 'production') { @@ -691,7 +691,7 @@ export function buildHooks({ ) { throw new Error( `Warning: Middleware for RTK-Query API at reducerPath "${api.reducerPath}" has not been added to the store. - You must add the middleware for RTK-Query to function correctly!` + You must add the middleware for RTK-Query to function correctly!`, ) } } @@ -708,7 +708,7 @@ export function buildHooks({ // and then we never try to initiate a refetch. defaultSerializeQueryArgs, context.endpointDefinitions[name], - name + name, ) const stableSubscriptionOptions = useShallowStableValue({ refetchOnReconnect, @@ -730,7 +730,7 @@ export function buildHooks({ currentRenderHasSubscription = subscriptionSelectorsRef.current.isRequestSubscribed( queryCacheKey, - requestId + requestId, ) } @@ -771,7 +771,7 @@ export function buildHooks({ initiate(stableArg, { subscriptionOptions: stableSubscriptionOptions, forceRefetch: refetchOnMountOrArgChange, - }) + }), ) promiseRef.current = promise @@ -802,12 +802,12 @@ export function buildHooks({ refetch: () => { if (!promiseRef.current) throw new Error( - 'Cannot refetch a query that has not been started yet.' + 'Cannot refetch a query that has not been started yet.', ) return promiseRef.current?.refetch() }, }), - [] + [], ) } @@ -838,7 +838,7 @@ export function buildHooks({ if (stableSubscriptionOptions !== lastSubscriptionOptions) { promiseRef.current?.updateSubscriptionOptions( - stableSubscriptionOptions + stableSubscriptionOptions, ) } }, [stableSubscriptionOptions]) @@ -859,7 +859,7 @@ export function buildHooks({ initiate(arg, { subscriptionOptions: subscriptionOptionsRef.current, forceRefetch: !preferCacheValue, - }) + }), ) setArg(arg) @@ -867,7 +867,7 @@ export function buildHooks({ return promise! }, - [dispatch, initiate] + [dispatch, initiate], ) /* cleanup on unmount */ @@ -889,7 +889,7 @@ export function buildHooks({ const useQueryState: UseQueryState = ( arg: any, - { skip = false, selectFromResult } = {} + { skip = false, selectFromResult } = {}, ) => { const { select } = api.endpoints[name] as ApiEndpointQuery< QueryDefinition, @@ -899,7 +899,7 @@ export function buildHooks({ skip ? skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name], - name + name, ) type ApiRootState = Parameters>[0] @@ -919,9 +919,9 @@ export function buildHooks({ memoizeOptions: { resultEqualityCheck: shallowEqual, }, - } + }, ), - [select, stableArg] + [select, stableArg], ) const querySelector: Selector = useMemo( @@ -931,19 +931,19 @@ export function buildHooks({ devModeChecks: { identityFunctionCheck: 'never' }, }) : selectDefaultResult, - [selectDefaultResult, selectFromResult] + [selectDefaultResult, selectFromResult], ) const currentState = useSelector( (state: RootState) => querySelector(state, lastValue.current), - shallowEqual + shallowEqual, ) const store = useStore>() const newLastValue = selectDefaultResult( store.getState(), - lastValue.current + lastValue.current, ) useIsomorphicLayoutEffect(() => { lastValue.current = newLastValue @@ -966,7 +966,7 @@ export function buildHooks({ const info = useMemo(() => ({ lastArg: arg }), [arg]) return useMemo( () => [trigger, queryStateResults, info], - [trigger, queryStateResults, info] + [trigger, queryStateResults, info], ) }, useQuery(arg, options) { @@ -985,7 +985,7 @@ export function buildHooks({ return useMemo( () => ({ ...queryStateResults, ...querySubscriptionResults }), - [queryStateResults, querySubscriptionResults] + [queryStateResults, querySubscriptionResults], ) }, } @@ -1006,7 +1006,7 @@ export function buildHooks({ promise?.reset() } }, - [promise] + [promise], ) const triggerMutation = useCallback( @@ -1015,20 +1015,20 @@ export function buildHooks({ setPromise(promise) return promise }, - [dispatch, initiate, fixedCacheKey] + [dispatch, initiate, fixedCacheKey], ) const { requestId } = promise || {} const selectDefaultResult = useMemo( () => select({ fixedCacheKey, requestId: promise?.requestId }), - [fixedCacheKey, promise, select] + [fixedCacheKey, promise, select], ) const mutationSelector = useMemo( (): Selector, any> => selectFromResult ? createSelector([selectDefaultResult], selectFromResult) : selectDefaultResult, - [selectFromResult, selectDefaultResult] + [selectFromResult, selectDefaultResult], ) const currentState = useSelector(mutationSelector, shallowEqual) @@ -1044,7 +1044,7 @@ export function buildHooks({ api.internalActions.removeMutationResult({ requestId, fixedCacheKey, - }) + }), ) } }) @@ -1071,12 +1071,12 @@ export function buildHooks({ const finalState = useMemo( () => ({ ...currentState, originalArgs, reset }), - [currentState, originalArgs, reset] + [currentState, originalArgs, reset], ) return useMemo( () => [triggerMutation, finalState] as const, - [triggerMutation, finalState] + [triggerMutation, finalState], ) } } diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index 437fc4287c..b9acba6b6b 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -10,7 +10,7 @@ export { ApiProvider } from './ApiProvider' const createApi = /* @__PURE__ */ buildCreateApi( coreModule(), - reactHooksModule() + reactHooksModule(), ) export type { diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index 68bcddb253..fed0b3d7a9 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -37,7 +37,7 @@ declare module '@reduxjs/toolkit/query' { // eslint-disable-next-line @typescript-eslint/no-unused-vars ReducerPath extends string, // eslint-disable-next-line @typescript-eslint/no-unused-vars - TagTypes extends string + TagTypes extends string, > { [reactHooksModuleName]: { /** @@ -53,18 +53,18 @@ declare module '@reduxjs/toolkit/query' { > ? QueryHooks : Definitions[K] extends MutationDefinition - ? MutationHooks - : never + ? MutationHooks + : never } /** * A hook that accepts a string endpoint name, and provides a callback that when called, pre-fetches the data for that endpoint. */ usePrefetch>( endpointName: EndpointName, - options?: PrefetchOptions + options?: PrefetchOptions, ): ( arg: QueryArgFrom, - options?: PrefetchOptions + options?: PrefetchOptions, ) => void } & HooksWithUniqueNames } @@ -160,7 +160,7 @@ export const reactHooksModule = ({ if (!warned) { console.warn( 'As of RTK 2.0, the hooks now need to be specified as one object, provided under a `hooks` key:' + - '\n`reactHooksModule({ hooks: { useDispatch, useSelector, useStore } })`' + '\n`reactHooksModule({ hooks: { useDispatch, useSelector, useStore } })`', ) warned = true } @@ -175,8 +175,8 @@ export const reactHooksModule = ({ `When using custom hooks for context, all ${ hookNames.length } hooks need to be provided: ${hookNames.join( - ', ' - )}.\nHook ${hookName} was either not provided or not a function.` + ', ', + )}.\nHook ${hookName} was either not provided or not a function.`, ) } } diff --git a/packages/toolkit/src/query/react/useSerializedStableValue.ts b/packages/toolkit/src/query/react/useSerializedStableValue.ts index 52f87d7158..95bc62af78 100644 --- a/packages/toolkit/src/query/react/useSerializedStableValue.ts +++ b/packages/toolkit/src/query/react/useSerializedStableValue.ts @@ -6,7 +6,7 @@ export function useStableQueryArgs( queryArgs: T, serialize: SerializeQueryArgs, endpointDefinition: EndpointDefinition, - endpointName: string + endpointName: string, ) { const incoming = useMemo( () => ({ @@ -16,7 +16,7 @@ export function useStableQueryArgs( ? serialize({ queryArgs, endpointDefinition, endpointName }) : queryArgs, }), - [queryArgs, serialize, endpointDefinition, endpointName] + [queryArgs, serialize, endpointDefinition, endpointName], ) const cache = useRef(incoming) useEffect(() => { diff --git a/packages/toolkit/src/query/retry.ts b/packages/toolkit/src/query/retry.ts index 7bd960c699..3e5015d858 100644 --- a/packages/toolkit/src/query/retry.ts +++ b/packages/toolkit/src/query/retry.ts @@ -26,7 +26,7 @@ async function defaultBackoff(attempt: number = 0, maxRetries: number = 5) { const timeout = ~~((Math.random() + 0.4) * (300 << attempts)) // Force a positive int in the case we make this an option await new Promise((resolve) => - setTimeout((res: any) => resolve(res), timeout) + setTimeout((res: any) => resolve(res), timeout), ) } @@ -37,7 +37,7 @@ type RetryConditionFunction = ( attempt: number baseQueryApi: BaseQueryApi extraOptions: BaseQueryExtraOptions & RetryOptions - } + }, ) => boolean export type RetryOptions = { diff --git a/packages/toolkit/src/query/tests/apiProvider.test.tsx b/packages/toolkit/src/query/tests/apiProvider.test.tsx index 5b10573877..80101a8386 100644 --- a/packages/toolkit/src/query/tests/apiProvider.test.tsx +++ b/packages/toolkit/src/query/tests/apiProvider.test.tsx @@ -42,18 +42,18 @@ describe('ApiProvider', () => { const { getByText, getByTestId } = render( - + , ) await waitFor(() => - expect(getByTestId('isFetching').textContent).toBe('false') + expect(getByTestId('isFetching').textContent).toBe('false'), ) fireEvent.click(getByText('Increment value')) await waitFor(() => - expect(getByTestId('isFetching').textContent).toBe('true') + expect(getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(getByTestId('isFetching').textContent).toBe('false') + expect(getByTestId('isFetching').textContent).toBe('false'), ) fireEvent.click(getByText('Increment value')) // Being that nothing has changed in the args, this should never fire. @@ -64,10 +64,10 @@ describe('ApiProvider', () => { render( null })}> child - - ) + , + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup.]` + `[Error: Existing Redux context detected. If you already have a store set up, please use the traditional Redux setup.]`, ) }) }) diff --git a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx index 9149d9c3b1..9a443c9350 100644 --- a/packages/toolkit/src/query/tests/buildCreateApi.test.tsx +++ b/packages/toolkit/src/query/tests/buildCreateApi.test.tsx @@ -28,7 +28,7 @@ describe('buildCreateApi', () => { useSelector: createSelectorHook(MyContext), useStore: createStoreHook(MyContext), }, - }) + }), ) const api = customCreateApi({ @@ -78,7 +78,7 @@ describe('buildCreateApi', () => { expect(getRenderCount()).toBe(2) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) expect(getRenderCount()).toBe(3) }) @@ -93,7 +93,7 @@ describe('buildCreateApi', () => { useDispatch: createDispatchHook(MyContext), useSelector: createSelectorHook(MyContext), }, - }) + }), ) } @@ -101,7 +101,7 @@ describe('buildCreateApi', () => { ` [Error: When using custom hooks for context, all 3 hooks need to be provided: useDispatch, useSelector, useStore. Hook useStore was either not provided or not a function.] - ` + `, ) }) test('allows passing createSelector instance', async () => { @@ -109,7 +109,7 @@ describe('buildCreateApi', () => { const createSelector = createSelectorCreator(memoize) const createApi = buildCreateApi( coreModule({ createSelector }), - reactHooksModule({ createSelector }) + reactHooksModule({ createSelector }), ) const api = createApi({ baseQuery: async (arg: any) => { @@ -159,7 +159,7 @@ describe('buildCreateApi', () => { render(, { wrapper: Wrapper }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) // select() + selectFromResult diff --git a/packages/toolkit/src/query/tests/buildInitiate.test.tsx b/packages/toolkit/src/query/tests/buildInitiate.test.tsx index 3ac8184995..f7022acf30 100644 --- a/packages/toolkit/src/query/tests/buildInitiate.test.tsx +++ b/packages/toolkit/src/query/tests/buildInitiate.test.tsx @@ -30,7 +30,7 @@ let isRequestSubscribed: SubscriptionSelectors['isRequestSubscribed'] beforeEach(() => { ;({ getSubscriptions, isRequestSubscribed } = storeRef.store.dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) as unknown as SubscriptionSelectors) }) @@ -45,7 +45,7 @@ test('multiple synchonrous initiate calls with pre-existing cache entry', async const secondValuePromise = store.dispatch(api.endpoints.increment.initiate()) // and one with a forced refresh const thirdValuePromise = store.dispatch( - api.endpoints.increment.initiate(undefined, { forceRefetch: true }) + api.endpoints.increment.initiate(undefined, { forceRefetch: true }), ) // and another increment const fourthValuePromise = store.dispatch(api.endpoints.increment.initiate()) @@ -74,16 +74,16 @@ describe('calling initiate without a cache entry, with subscribe: false still re const { store, api } = storeRef calls = 0 const promise = store.dispatch( - api.endpoints.increment.initiate(undefined, { subscribe: false }) + api.endpoints.increment.initiate(undefined, { subscribe: false }), ) expect(isRequestSubscribed('increment(undefined)', promise.requestId)).toBe( - false + false, ) expect( isRequestSubscribed( 'increment(undefined)', - `${promise.requestId}_running` - ) + `${promise.requestId}_running`, + ), ).toBe(true) await expect(promise).resolves.toMatchObject({ @@ -93,8 +93,8 @@ describe('calling initiate without a cache entry, with subscribe: false still re expect( isRequestSubscribed( 'increment(undefined)', - `${promise.requestId}_running` - ) + `${promise.requestId}_running`, + ), ).toBe(false) }) @@ -102,20 +102,20 @@ describe('calling initiate without a cache entry, with subscribe: false still re const { store, api } = storeRef calls = 0 const promise = store.dispatch( - api.endpoints.failing.initiate(undefined, { subscribe: false }) + api.endpoints.failing.initiate(undefined, { subscribe: false }), ) expect(isRequestSubscribed('failing(undefined)', promise.requestId)).toBe( - false + false, ) expect( - isRequestSubscribed('failing(undefined)', `${promise.requestId}_running`) + isRequestSubscribed('failing(undefined)', `${promise.requestId}_running`), ).toBe(true) await expect(promise).resolves.toMatchObject({ status: 'rejected', }) expect( - isRequestSubscribed('failing(undefined)', `${promise.requestId}_running`) + isRequestSubscribed('failing(undefined)', `${promise.requestId}_running`), ).toBe(false) }) }) diff --git a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx index 2ba752d3c0..0e52cb0cd1 100644 --- a/packages/toolkit/src/query/tests/buildMiddleware.test.tsx +++ b/packages/toolkit/src/query/tests/buildMiddleware.test.tsx @@ -38,7 +38,7 @@ it('invalidates the specified tags', async () => { expect(storeRef.store.getState().actions).toMatchSequence( api.internalActions.middlewareRegistered.match, getBanana.matchPending, - getBanana.matchFulfilled + getBanana.matchFulfilled, ) await storeRef.store.dispatch(api.util.invalidateTags(['Banana', 'Bread'])) @@ -67,6 +67,6 @@ it('invalidates the specified tags', async () => { getBread.matchFulfilled, api.util.invalidateTags.match, getBread.matchPending, - getBread.matchFulfilled + getBread.matchFulfilled, ) }) diff --git a/packages/toolkit/src/query/tests/buildSlice.test.ts b/packages/toolkit/src/query/tests/buildSlice.test.ts index 3b5efe268f..72ac45b7a2 100644 --- a/packages/toolkit/src/query/tests/buildSlice.test.ts +++ b/packages/toolkit/src/query/tests/buildSlice.test.ts @@ -44,7 +44,7 @@ describe('buildSlice', () => { const initialState = storeRef.store.getState() await storeRef.store.dispatch( - getUser.initiate(1, { subscriptionOptions: { pollingInterval: 10 } }) + getUser.initiate(1, { subscriptionOptions: { pollingInterval: 10 } }), ) const initialQueryState = { @@ -95,10 +95,10 @@ describe('buildSlice', () => { await storeRef.store.dispatch(getUser.initiate(1)) expect( - api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED']) + api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED']), ).toHaveLength(1) expect( - api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED']) + api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED']), ).toHaveLength(0) shouldApiResponseSuccess = false @@ -108,10 +108,10 @@ describe('buildSlice', () => { await delay(10) expect( - api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED']) + api.util.selectInvalidatedBy(storeRef.store.getState(), ['SUCCEED']), ).toHaveLength(0) expect( - api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED']) + api.util.selectInvalidatedBy(storeRef.store.getState(), ['FAILED']), ).toHaveLength(1) }) }) diff --git a/packages/toolkit/src/query/tests/buildThunks.test.tsx b/packages/toolkit/src/query/tests/buildThunks.test.tsx index aa4afebd51..d68a0e9800 100644 --- a/packages/toolkit/src/query/tests/buildThunks.test.tsx +++ b/packages/toolkit/src/query/tests/buildThunks.test.tsx @@ -95,7 +95,7 @@ describe('re-triggering behavior on arg change', () => { { wrapper: withProvider(store), initialProps: 5, - } + }, ) await waitFor(() => { @@ -127,7 +127,7 @@ describe('re-triggering behavior on arg change', () => { { wrapper: withProvider(store), initialProps: { name: 'Bob', likes: 'iceCream' }, - } + }, ) await waitFor(() => { @@ -160,7 +160,7 @@ describe('re-triggering behavior on arg change', () => { { wrapper: withProvider(store), initialProps: { person: { name } }, - } + }, ) await waitFor(() => { @@ -183,7 +183,7 @@ describe('re-triggering behavior on arg change', () => { { wrapper: withProvider(store), initialProps: { name: 'Tim', likes: 'Bananas' }, - } + }, ) await waitFor(() => { diff --git a/packages/toolkit/src/query/tests/cacheCollection.test.ts b/packages/toolkit/src/query/tests/cacheCollection.test.ts index 28e090a4b4..936ae82044 100644 --- a/packages/toolkit/src/query/tests/cacheCollection.test.ts +++ b/packages/toolkit/src/query/tests/cacheCollection.test.ts @@ -27,7 +27,7 @@ test(`query: await cleanup, defaults`, async () => { query: () => '/success', }), }), - }) + }), ) const promise = store.dispatch(api.endpoints.query.initiate('arg')) @@ -49,7 +49,7 @@ test(`query: await cleanup, keepUnusedDataFor set`, async () => { }), }), keepUnusedDataFor: 29, - }) + }), ) const promise = store.dispatch(api.endpoints.query.initiate('arg')) @@ -71,7 +71,7 @@ test(`query: handles large keepUnuseDataFor values over 32-bit ms`, async () => }), }), keepUnusedDataFor: THIRTY_TWO_BIT_MAX_TIMER_SECONDS - 10, - }) + }), ) const promise = store.dispatch(api.endpoints.query.initiate('arg')) @@ -113,7 +113,7 @@ describe(`query: await cleanup, keepUnusedDataFor set`, () => { }), }), keepUnusedDataFor: 29, - }) + }), ) test('global keepUnusedDataFor', async () => { @@ -162,13 +162,13 @@ function storeForApi< reducer: Reducer middleware: Middleware util: { resetApiState(): any } - } + }, >(api: A) { const store = configureStore({ reducer: { api: api.reducer }, middleware: (gdm) => gdm({ serializableCheck: false, immutableCheck: false }).concat( - api.middleware + api.middleware, ), enhancers: (gde) => gde({ diff --git a/packages/toolkit/src/query/tests/cleanup.test.tsx b/packages/toolkit/src/query/tests/cleanup.test.tsx index eff34b400d..dc3d8fcbe1 100644 --- a/packages/toolkit/src/query/tests/cleanup.test.tsx +++ b/packages/toolkit/src/query/tests/cleanup.test.tsx @@ -51,7 +51,7 @@ test('data stays in store when component stays rendered', async () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) + expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled), ) vi.advanceTimersByTime(120_000) @@ -64,7 +64,7 @@ test('data is removed from store after 60 seconds', async () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) + expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled), ) unmount() @@ -87,7 +87,7 @@ test('data stays in store when component stays rendered while data for another c , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) await waitFor(() => { expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) @@ -117,7 +117,7 @@ test('data stays in store when one component requiring the data stays in the sto , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) await waitFor(() => { expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled) @@ -168,7 +168,7 @@ test('Minimizes the number of subscription dispatches when multiple components a }) const { getSubscriptionCount } = storeRef.store.dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) as unknown as SubscriptionSelectors const NUM_LIST_ITEMS = 1000 diff --git a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts index 45bd57cbb8..fa9ad3b72b 100644 --- a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts +++ b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts @@ -9,7 +9,7 @@ test('string arg', () => { endpointDefinition, endpointName, queryArgs: 'arg', - }) + }), ).toMatchInlineSnapshot(`"test("arg")"`) }) @@ -19,7 +19,7 @@ test('number arg', () => { endpointDefinition, endpointName, queryArgs: 5, - }) + }), ).toMatchInlineSnapshot(`"test(5)"`) }) @@ -29,7 +29,7 @@ test('simple object arg is sorted', () => { endpointDefinition, endpointName, queryArgs: { name: 'arg', age: 5 }, - }) + }), ).toMatchInlineSnapshot(`"test({"age":5,"name":"arg"})"`) }) @@ -39,9 +39,9 @@ test('nested object arg is sorted recursively', () => { endpointDefinition, endpointName, queryArgs: { name: { last: 'Split', first: 'Banana' }, age: 5 }, - }) + }), ).toMatchInlineSnapshot( - `"test({"age":5,"name":{"first":"Banana","last":"Split"}})"` + `"test({"age":5,"name":{"first":"Banana","last":"Split"}})"`, ) }) @@ -70,7 +70,7 @@ test('Fully serializes a deeply nested object', () => { queryArgs: nestedObj, }) expect(res).toMatchInlineSnapshot( - `"test({"a":{"a1":{"a11":{"a111":1}}},"b":{"b1":{"b11":2},"b2":{"b21":3}}})"` + `"test({"a":{"a1":{"a11":{"a111":1}}},"b":{"b1":{"b11":2},"b2":{"b21":3}}})"`, ) }) diff --git a/packages/toolkit/src/query/tests/devWarnings.test.tsx b/packages/toolkit/src/query/tests/devWarnings.test.tsx index df8339f5f3..f0b61d3518 100644 --- a/packages/toolkit/src/query/tests/devWarnings.test.tsx +++ b/packages/toolkit/src/query/tests/devWarnings.test.tsx @@ -110,7 +110,7 @@ describe('missing middleware', () => { } expect(doDispatch1).toThrowError(reMatchMissingMiddlewareError) expect(doDispatch2).toThrowError( - /Warning: Middleware for RTK-Query API at reducerPath "api2" has not been added to the store/ + /Warning: Middleware for RTK-Query API at reducerPath "api2" has not been added to the store/, ) }) }) @@ -141,7 +141,7 @@ describe('missing reducer', () => { expect(getLog().log).toBe( shouldWarn ? 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?' - : '' + : '', ) }) }) @@ -166,7 +166,7 @@ describe('missing reducer', () => { // @ts-expect-error api1.endpoints.q1.select(undefined)(store.getState()) expect(getLog().log).toBe( - 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?' + 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?', ) }) @@ -181,7 +181,7 @@ describe('missing reducer', () => { // @ts-expect-error api2.endpoints.q1.select(undefined)(store.getState()) expect(getLog().log).toBe( - 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?\nError: No data found at `state.api2`. Did you forget to add the reducer to the store?' + 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?\nError: No data found at `state.api2`. Did you forget to add the reducer to the store?', ) }) }) @@ -197,7 +197,7 @@ test('warns for reducer and also throws error if everything is missing', async ( } expect(doDispatch).toThrowError(reMatchMissingMiddlewareError) expect(getLog().log).toBe( - 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?' + 'Error: No data found at `state.api`. Did you forget to add the reducer to the store?', ) }) @@ -218,7 +218,7 @@ describe('warns on multiple apis using the same `reducerPath`', () => { expect(getLog().log).toBe( `There is a mismatch between slice and middleware for the reducerPath "api". You can only have one api per reducer path, this will lead to crashes in various situations! -If you have multiple apis, you *have* to specify the reducerPath option when using createApi!` +If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`, ) }) @@ -240,7 +240,7 @@ You can only have one api per reducer path, this will lead to crashes in various If you have multiple apis, you *have* to specify the reducerPath option when using createApi! There is a mismatch between slice and middleware for the reducerPath "api". You can only have one api per reducer path, this will lead to crashes in various situations! -If you have multiple apis, you *have* to specify the reducerPath option when using createApi!` +If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`, ) }) @@ -259,7 +259,7 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi expect(getLog().log).toBe( `There is a mismatch between slice and middleware for the reducerPath "api". You can only have one api per reducer path, this will lead to crashes in various situations! -If you have multiple apis, you *have* to specify the reducerPath option when using createApi!` +If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`, ) }) @@ -285,7 +285,7 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi expect(getLog().log).toBe( `There is a mismatch between slice and middleware for the reducerPath "api". You can only have one api per reducer path, this will lead to crashes in various situations! -If you have multiple apis, you *have* to specify the reducerPath option when using createApi!` +If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`, ) }) }) diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index 04ce766fb2..83338ec722 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -36,7 +36,7 @@ const storeRef = setupApiStore(api) const failQueryOnce = http.get( '/query', () => HttpResponse.json({ value: 'failed' }, { status: 500 }), - { once: true } + { once: true }, ) describe('fetchBaseQuery', () => { @@ -57,7 +57,7 @@ describe('fetchBaseQuery', () => { }) test('success', async () => { await expect( - baseQuery('/success', commonBaseQueryApiArgs, {}) + baseQuery('/success', commonBaseQueryApiArgs, {}), ).resolves.toEqual({ data: { value: 'success' }, meta: { @@ -69,7 +69,7 @@ describe('fetchBaseQuery', () => { test('error', async () => { server.use(failQueryOnce) await expect( - baseQuery('/error', commonBaseQueryApiArgs, {}) + baseQuery('/error', commonBaseQueryApiArgs, {}), ).resolves.toEqual({ error: { data: { value: 'error' }, @@ -87,8 +87,8 @@ describe('query error handling', () => { test('success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { wrapper: storeRef.wrapper, @@ -101,15 +101,15 @@ describe('query error handling', () => { isError: false, isSuccess: true, data: { value: 'success' }, - }) + }), ) }) test('error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ) + HttpResponse.json({ value: 'error' }, { status: 500 }), + ), ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { wrapper: storeRef.wrapper, @@ -125,15 +125,15 @@ describe('query error handling', () => { status: 500, data: { value: 'error' }, }, - }) + }), ) }) test('success -> error', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { wrapper: storeRef.wrapper, @@ -146,15 +146,15 @@ describe('query error handling', () => { isError: false, isSuccess: true, data: { value: 'success' }, - }) + }), ) server.use( http.get( 'https://example.com/query', () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) act(() => void result.current.refetch()) @@ -171,22 +171,22 @@ describe('query error handling', () => { }, // last data will stay available data: { value: 'success' }, - }) + }), ) }) test('error -> success', async () => { server.use( http.get('https://example.com/query', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) server.use( http.get( 'https://example.com/query', () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) const { result } = renderHook(() => api.endpoints.query.useQuery({}), { wrapper: storeRef.wrapper, @@ -202,7 +202,7 @@ describe('query error handling', () => { status: 500, data: { value: 'error' }, }, - }) + }), ) act(() => void result.current.refetch()) @@ -214,7 +214,7 @@ describe('query error handling', () => { isError: false, isSuccess: true, data: { value: 'success' }, - }) + }), ) }) }) @@ -223,8 +223,8 @@ describe('mutation error handling', () => { test('success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { wrapper: storeRef.wrapper, @@ -241,15 +241,15 @@ describe('mutation error handling', () => { isError: false, isSuccess: true, data: { value: 'success' }, - }) + }), ) }) test('error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ) + HttpResponse.json({ value: 'error' }, { status: 500 }), + ), ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { wrapper: storeRef.wrapper, @@ -269,15 +269,15 @@ describe('mutation error handling', () => { status: 500, data: { value: 'error' }, }, - }) + }), ) }) test('success -> error', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { wrapper: storeRef.wrapper, @@ -295,7 +295,7 @@ describe('mutation error handling', () => { isError: false, isSuccess: true, data: { value: 'success' }, - }) + }), ) } @@ -303,8 +303,8 @@ describe('mutation error handling', () => { http.post( 'https://example.com/mutation', () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) { @@ -322,7 +322,7 @@ describe('mutation error handling', () => { status: 500, data: { value: 'error' }, }, - }) + }), ) expect(result.current[1].data).toBeUndefined() } @@ -331,15 +331,15 @@ describe('mutation error handling', () => { test('error -> success', async () => { server.use( http.post('https://example.com/mutation', () => - HttpResponse.json({ value: 'success' }) - ) + HttpResponse.json({ value: 'success' }), + ), ) server.use( http.post( 'https://example.com/mutation', () => HttpResponse.json({ value: 'error' }, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) const { result } = renderHook(() => api.endpoints.mutation.useMutation(), { @@ -361,7 +361,7 @@ describe('mutation error handling', () => { status: 500, data: { value: 'error' }, }, - }) + }), ) } @@ -376,7 +376,7 @@ describe('mutation error handling', () => { isLoading: false, isError: false, isSuccess: true, - }) + }), ) expect(result.current[1].error).toBeUndefined() } @@ -386,7 +386,7 @@ describe('mutation error handling', () => { describe('custom axios baseQuery', () => { const axiosBaseQuery = ( - { baseUrl }: { baseUrl: string } = { baseUrl: '' } + { baseUrl }: { baseUrl: string } = { baseUrl: '' }, ): BaseQueryFn< { url: string @@ -452,8 +452,8 @@ describe('custom axios baseQuery', () => { test('axios errors behave as expected', async () => { server.use( http.get('https://example.com/success', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) - ) + HttpResponse.json({ value: 'error' }, { status: 500 }), + ), ) const { result } = renderHook(() => api.endpoints.query.useQuery(), { wrapper: storeRef.wrapper, @@ -466,7 +466,7 @@ describe('custom axios baseQuery', () => { isError: true, isSuccess: false, error: { status: 500, data: { value: 'error' } }, - }) + }), ) }) }) @@ -493,8 +493,8 @@ describe('error handling in a component', () => { http.get( 'https://example.com/success', () => HttpResponse.json(mockErrorResponse, { status: 500 }), - { once: true } - ) + { once: true }, + ), ) function User() { @@ -529,36 +529,36 @@ describe('error handling in a component', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) fireEvent.click(screen.getByText('Update User')) expect(screen.getByTestId('isLoading').textContent).toBe('true') await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) // Make sure the hook and the unwrapped action return the same things in an error state await waitFor(() => expect(screen.getByTestId('error').textContent).toEqual( - screen.getByTestId('manuallySetError').textContent - ) + screen.getByTestId('manuallySetError').textContent, + ), ) fireEvent.click(screen.getByText('Update User')) expect(screen.getByTestId('isLoading').textContent).toBe('true') await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('error').textContent).toBeFalsy() + expect(screen.getByTestId('error').textContent).toBeFalsy(), ) await waitFor(() => - expect(screen.getByTestId('manuallySetError').textContent).toBeFalsy() + expect(screen.getByTestId('manuallySetError').textContent).toBeFalsy(), ) await waitFor(() => expect(screen.getByTestId('data').textContent).toEqual( - JSON.stringify(mockSuccessResponse) - ) + JSON.stringify(mockSuccessResponse), + ), ) }) @@ -576,7 +576,7 @@ describe('error handling in a component', () => { > act(() => { mutationqueryFulfilled = dispatch( - api.endpoints.update.initiate({}, { track }) + api.endpoints.update.initiate({}, { track }), ) }) const result = await mutationqueryFulfilled! @@ -598,7 +598,7 @@ describe('error handling in a component', () => { > act(() => { mutationqueryFulfilled = dispatch( - api.endpoints.failedUpdate.initiate({}, { track }) + api.endpoints.failedUpdate.initiate({}, { track }), ) }) const result = await mutationqueryFulfilled! @@ -622,7 +622,7 @@ describe('error handling in a component', () => { > act(() => { mutationqueryFulfilled = dispatch( - api.endpoints.update.initiate({}, { track }) + api.endpoints.update.initiate({}, { track }), ) }) const result = await mutationqueryFulfilled!.unwrap() @@ -644,7 +644,7 @@ describe('error handling in a component', () => { > act(() => { mutationqueryFulfilled = dispatch( - api.endpoints.failedUpdate.initiate({}, { track }) + api.endpoints.failedUpdate.initiate({}, { track }), ) }) const unwrappedPromise = mutationqueryFulfilled!.unwrap() diff --git a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx index f049e970c0..cddf0c051f 100644 --- a/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx @@ -128,7 +128,7 @@ test('fakeBaseQuery throws when invoking query', async () => { result = await store.dispatch(thunk) }).toHaveConsoleOutput( `An unhandled error occurred processing a request for the endpoint "withQuery". - In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: When using \`fakeBaseQuery\`, all queries & mutations must use the \`queryFn\` definition syntax.]` + In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: When using \`fakeBaseQuery\`, all queries & mutations must use the \`queryFn\` definition syntax.]`, ) expect(result!.error).toEqual({ diff --git a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx index 08e9d6a8f1..07bda8f612 100644 --- a/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx +++ b/packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx @@ -146,14 +146,14 @@ describe('fetchBaseQuery', () => { http.get( 'https://example.com/success', () => HttpResponse.text(`this is not json!`), - { once: true } - ) + { once: true }, + ), ) const req = baseQuery( { url: '/success', responseHandler: 'text' }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req @@ -168,8 +168,8 @@ describe('fetchBaseQuery', () => { http.get( 'https://example.com/success', () => HttpResponse.text(`this is not json!`), - { once: true } - ) + { once: true }, + ), ) const req = baseQuery('/success', commonBaseQueryApi, {}) @@ -191,8 +191,8 @@ describe('fetchBaseQuery', () => { http.get( 'https://example.com/success', () => HttpResponse.text(`this is not json!`), - { once: true } - ) + { once: true }, + ), ) const req = baseQuery( @@ -201,13 +201,13 @@ describe('fetchBaseQuery', () => { responseHandler: 'content-type', }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req expect(res).toBeInstanceOf(Object) expect(res.meta?.response?.headers.get('content-type')).toEqual( - 'text/plain' + 'text/plain', ) expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) @@ -219,8 +219,8 @@ describe('fetchBaseQuery', () => { http.get( 'https://example.com/success', () => HttpResponse.json(`this will become json!`), - { once: true } - ) + { once: true }, + ), ) const req = baseQuery( @@ -229,13 +229,13 @@ describe('fetchBaseQuery', () => { responseHandler: 'content-type', }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req expect(res).toBeInstanceOf(Object) expect(res.meta?.response?.headers.get('content-type')).toEqual( - 'application/json' + 'application/json', ) expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) @@ -245,14 +245,14 @@ describe('fetchBaseQuery', () => { it('server error: should fail normally with a 500 status ("text" responseHandler)', async () => { server.use( http.get('https://example.com/error', () => - HttpResponse.text(`this is not json!`, { status: 500 }) - ) + HttpResponse.text(`this is not json!`, { status: 500 }), + ), ) const req = baseQuery( { url: '/error', responseHandler: 'text' }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req @@ -269,14 +269,14 @@ describe('fetchBaseQuery', () => { const serverResponse = 'Internal Server Error' server.use( http.get('https://example.com/error', () => - HttpResponse.text(serverResponse, { status: 500 }) - ) + HttpResponse.text(serverResponse, { status: 500 }), + ), ) const req = baseQuery( { url: '/error', responseHandler: 'content-type' }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req @@ -284,7 +284,7 @@ describe('fetchBaseQuery', () => { expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) expect(res.meta?.response?.headers.get('content-type')).toEqual( - 'text/plain' + 'text/plain', ) expect(res.error).toEqual({ status: 500, @@ -298,14 +298,14 @@ describe('fetchBaseQuery', () => { } server.use( http.get('https://example.com/error', () => - HttpResponse.json(serverResponse, { status: 500 }) - ) + HttpResponse.json(serverResponse, { status: 500 }), + ), ) const req = baseQuery( { url: '/error', responseHandler: 'content-type' }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req @@ -313,7 +313,7 @@ describe('fetchBaseQuery', () => { expect(res.meta?.request).toBeInstanceOf(Request) expect(res.meta?.response).toBeInstanceOf(Object) expect(res.meta?.response?.headers.get('content-type')).toEqual( - 'application/json' + 'application/json', ) expect(res.error).toEqual({ status: 500, @@ -324,8 +324,8 @@ describe('fetchBaseQuery', () => { it('server error: should fail gracefully (default="json" responseHandler)', async () => { server.use( http.get('https://example.com/error', () => - HttpResponse.text(`this is not json!`, { status: 500 }) - ) + HttpResponse.text(`this is not json!`, { status: 500 }), + ), ) const req = baseQuery('/error', commonBaseQueryApi, {}) @@ -353,7 +353,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', body: data, method: 'POST' }, { ...commonBaseQueryApi, type: 'mutation' }, - {} + {}, )) expect(request.headers['content-type']).toBe('application/json') @@ -367,7 +367,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', body: data, method: 'POST' }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('application/json') @@ -388,7 +388,7 @@ describe('fetchBaseQuery', () => { headers: { 'content-type': 'text/html' }, }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('text/html') @@ -407,7 +407,7 @@ describe('fetchBaseQuery', () => { headers: { 'content-type': 'text/html' }, }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('text/html') @@ -429,7 +429,7 @@ describe('fetchBaseQuery', () => { method: 'POST', }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('application/vnd.api+json') @@ -448,7 +448,7 @@ describe('fetchBaseQuery', () => { method: 'POST', }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('application/json') @@ -469,7 +469,7 @@ describe('fetchBaseQuery', () => { method: 'POST', }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['content-type']).toBe('application/json') @@ -483,7 +483,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo' }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo`) @@ -496,7 +496,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo?a=1&b=true`) @@ -509,7 +509,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo?banana=pudding', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo?banana=pudding&a=1&b=true`) @@ -522,7 +522,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo?apple=fruit`) @@ -535,7 +535,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo?apple=fruit&randy=null`) @@ -575,11 +575,11 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual( - `${baseUrl}/echo?someArray[]=a&someArray[]=b&someArray[]=c` + `${baseUrl}/echo?someArray[]=a&someArray[]=b&someArray[]=c`, ) }) @@ -607,7 +607,7 @@ describe('fetchBaseQuery', () => { headers: { 'content-type': 'application/vnd.hal+json' }, }, commonBaseQueryApi, - {} + {}, )) expect(request.body).toMatchObject(testBody) @@ -624,7 +624,7 @@ describe('fetchBaseQuery', () => { response.status === 200 && body.success === false ? false : true, }, commonBaseQueryApi, - {} + {}, ) expect(res.error).toEqual({ @@ -643,7 +643,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo' }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['fake']).toBe(defaultHeaders['fake']) @@ -656,7 +656,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', headers: { authorization: 'Bearer banana' } }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['authorization']).toBe('Bearer banana') @@ -676,7 +676,7 @@ describe('fetchBaseQuery', () => { }, }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['authorization']).toBe('Bearer banana') @@ -693,7 +693,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', headers: { fake, delete: '', delete2: '' } }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['fake']).toBe(fake) @@ -782,7 +782,7 @@ describe('fetchBaseQuery', () => { type: 'query', endpoint: '', }, - {} + {}, ) } @@ -806,7 +806,7 @@ describe('fetchBaseQuery', () => { fetchFn: fetchFn as any, prepareHeaders: ( headers, - { getState, extra, endpoint, type, forced } + { getState, extra, endpoint, type, forced }, ) => { _getState = getState _endpoint = endpoint @@ -838,7 +838,7 @@ describe('fetchBaseQuery', () => { forced: true, endpoint: 'someEndpointName', }, - {} + {}, ) } @@ -875,7 +875,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', headers: undefined }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['fake']).toBe(defaultHeaders['fake']) @@ -889,7 +889,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', headers: { banana } }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['banana']).toBe('1') @@ -904,7 +904,7 @@ describe('fetchBaseQuery', () => { ;({ data: request } = await baseQuery( { url: '/echo', headers: { banana } }, commonBaseQueryApi, - {} + {}, )) expect(request.headers['banana']).toBeUndefined() @@ -919,8 +919,8 @@ describe('fetchBaseQuery', () => { http.get( 'https://example.com/success', () => HttpResponse.text(`this is not json!`), - { once: true } - ) + { once: true }, + ), ) const globalizedBaseQuery = fetchBaseQuery({ @@ -932,7 +932,7 @@ describe('fetchBaseQuery', () => { const req = globalizedBaseQuery( { url: '/success' }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) const res = await req @@ -957,7 +957,7 @@ describe('fetchBaseQuery', () => { url: '/nonstandard-error', }, commonBaseQueryApi, - {} + {}, ) expect(res.error).toEqual({ @@ -985,8 +985,8 @@ describe('fetchBaseQuery', () => { headers: headersToObject(request.headers), }) }, - { once: true } - ) + { once: true }, + ), ) const globalizedBaseQuery = fetchBaseQuery({ @@ -998,7 +998,7 @@ describe('fetchBaseQuery', () => { const result = await globalizedBaseQuery( { url: '/empty1' }, commonBaseQueryApi, - {} + {}, ) expect(result?.error).toEqual({ @@ -1022,7 +1022,7 @@ describe('fetchFn', () => { ;({ data: request } = await baseQuery( { url: '/echo', params }, commonBaseQueryApi, - {} + {}, )) expect(request.url).toEqual(`${baseUrl}/echo?apple=fruit`) @@ -1059,13 +1059,13 @@ describe('FormData', () => { 'file', new Blob([JSON.stringify({ hello: 'there' }, null, 2)], { type: 'application/json', - }) + }), ) const res = await baseQuery( { url: '/echo', method: 'POST', body }, commonBaseQueryApi, - {} + {}, ) const request: any = res.data @@ -1085,7 +1085,7 @@ describe('still throws on completely unexpected errors', () => { }, }, commonBaseQueryApi, - {} + {}, ) expect(req).toBeInstanceOf(Promise) await expect(req).rejects.toBe(error) @@ -1109,14 +1109,14 @@ describe('timeout', () => { headers: headersToObject(request.headers), }) }, - { once: true } - ) + { once: true }, + ), ) const result = await baseQuery( { url: '/empty2', timeout: 200 }, commonBaseQueryApi, - {} + {}, ) expect(result?.error).toEqual({ diff --git a/packages/toolkit/src/query/tests/mocks/handlers.ts b/packages/toolkit/src/query/tests/mocks/handlers.ts index 17f707f743..3fe044fdf0 100644 --- a/packages/toolkit/src/query/tests/mocks/handlers.ts +++ b/packages/toolkit/src/query/tests/mocks/handlers.ts @@ -23,7 +23,7 @@ export const handlers = [ url: new URL(request.url), headers: headersToObject(request.headers), }) - } + }, ), http.post( @@ -49,25 +49,25 @@ export const handlers = [ url: new URL(request.url), headers: headersToObject(request.headers), }) - } + }, ), http.get('https://example.com/success', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }), ), http.post('https://example.com/success', () => - HttpResponse.json({ value: 'success' }) + HttpResponse.json({ value: 'success' }), ), http.get('https://example.com/empty', () => new HttpResponse('')), http.get('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }), ), http.post('https://example.com/error', () => - HttpResponse.json({ value: 'error' }, { status: 500 }) + HttpResponse.json({ value: 'error' }, { status: 500 }), ), http.get('https://example.com/nonstandard-error', () => @@ -76,16 +76,16 @@ export const handlers = [ success: false, message: 'This returns a 200 but is really an error', }, - { status: 200 } - ) + { status: 200 }, + ), ), http.get('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) + HttpResponse.json(params), ), http.post('https://example.com/mirror', ({ params }) => - HttpResponse.json(params) + HttpResponse.json(params), ), http.get('https://example.com/posts/random', () => { @@ -96,6 +96,6 @@ export const handlers = [ http.get<{ id: string }, any, Pick>( 'https://example.com/post/:id', - ({ params }) => HttpResponse.json(posts[params.id]) + ({ params }) => HttpResponse.json(posts[params.id]), ), ] diff --git a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx index afad253eb8..eb9893a3be 100644 --- a/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpdates.test.tsx @@ -51,7 +51,7 @@ const api = createApi({ const { undo } = dispatch( api.util.updateQueryData('post', id, (draft) => { Object.assign(draft, patch) - }) + }), ) queryFulfilled.catch(undo) }, @@ -98,7 +98,7 @@ describe('basic lifecycle', () => { () => extendedApi.endpoints.test.useMutation(), { wrapper: storeRef.wrapper, - } + }, ) baseQuery.mockResolvedValue('success') @@ -121,7 +121,7 @@ describe('basic lifecycle', () => { () => extendedApi.endpoints.test.useMutation(), { wrapper: storeRef.wrapper, - } + }, ) baseQuery.mockRejectedValueOnce('error') @@ -172,7 +172,7 @@ describe('updateQueryData', () => { returnValue = storeRef.store.dispatch( api.util.updateQueryData('post', '3', (draft) => { draft.contents = 'I love cheese!' - }) + }), ) }) @@ -191,7 +191,7 @@ describe('updateQueryData', () => { act(() => { storeRef.store.dispatch( - api.util.patchQueryData('post', '3', returnValue.inversePatches) + api.util.patchQueryData('post', '3', returnValue.inversePatches), ) }) @@ -233,8 +233,8 @@ describe('updateQueryData', () => { contents: 'TODO', }) }, - true - ) + true, + ), ) }) @@ -292,8 +292,8 @@ describe('updateQueryData', () => { contents: 'TODO', }) }, - false - ) + false, + ), ) }) @@ -344,7 +344,7 @@ describe('updateQueryData', () => { returnValue = storeRef.store.dispatch( api.util.updateQueryData('post', '4', (draft) => { draft.contents = 'I love cheese!' - }) + }), ) }) @@ -384,7 +384,7 @@ describe('full integration', () => { }), { wrapper: storeRef.wrapper, - } + }, ) await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy()) @@ -409,7 +409,7 @@ describe('full integration', () => { id: '3', title: 'Meanwhile, this changed server-side.', contents: 'Delicious cheese!', - }) + }), ) }) @@ -435,7 +435,7 @@ describe('full integration', () => { }), { wrapper: storeRef.wrapper, - } + }, ) await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy()) @@ -462,7 +462,7 @@ describe('full integration', () => { id: '3', title: 'All about cheese.', contents: 'TODO', - }) + }), ) // mutation failed - will not invalidate query and not refetch data from the server @@ -474,8 +474,8 @@ describe('full integration', () => { title: 'Meanwhile, this changed server-side.', contents: 'TODO', }), - 50 - ) + 50, + ), ).rejects.toBeTruthy() act(() => void result.current.query.refetch()) @@ -488,7 +488,7 @@ describe('full integration', () => { title: 'Meanwhile, this changed server-side.', contents: 'TODO', }), - 50 + 50, ) }) }) diff --git a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx index 8ff782620b..2902b84ccb 100644 --- a/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx +++ b/packages/toolkit/src/query/tests/optimisticUpserts.test.tsx @@ -1,7 +1,11 @@ import { createApi } from '@reduxjs/toolkit/query/react' -import { actionsReducer, hookWaitFor, setupApiStore } from '../../tests/utils/helpers' +import { + actionsReducer, + hookWaitFor, + setupApiStore, +} from '../../tests/utils/helpers' import { renderHook, act, waitFor } from '@testing-library/react' -import { delay } from "msw" +import { delay } from 'msw' interface Post { id: string @@ -40,7 +44,7 @@ const api = createApi({ api.util.upsertQueryData('post', arg.id, { ...currentItem.data, ...arg, - }) + }), ) } }, @@ -101,7 +105,7 @@ describe('basic lifecycle', () => { title: 'Inserted title', } const insertPromise = storeRef.store.dispatch( - api.util.upsertQueryData('post', newPost.id, newPost) + api.util.upsertQueryData('post', newPost.id, newPost), ) await insertPromise @@ -118,7 +122,7 @@ describe('basic lifecycle', () => { } const updatePromise = storeRef.store.dispatch( - api.util.upsertQueryData('post', updatedPost.id, updatedPost) + api.util.upsertQueryData('post', updatedPost.id, updatedPost), ) await updatePromise @@ -134,7 +138,7 @@ describe('basic lifecycle', () => { () => extendedApi.endpoints.test.useMutation(), { wrapper: storeRef.wrapper, - } + }, ) baseQuery.mockResolvedValue('success') @@ -157,7 +161,7 @@ describe('basic lifecycle', () => { () => extendedApi.endpoints.test.useMutation(), { wrapper: storeRef.wrapper, - } + }, ) baseQuery.mockRejectedValueOnce('error') @@ -210,7 +214,7 @@ describe('upsertQueryData', () => { id: '3', title: 'All about cheese.', contents: 'I love cheese!', - }) + }), ) }) @@ -238,7 +242,7 @@ describe('upsertQueryData', () => { () => api.endpoints.post.useQuery('4'), { wrapper: storeRef.wrapper, - } + }, ) await hookWaitFor(() => expect(result.current.isError).toBeTruthy()) @@ -249,7 +253,7 @@ describe('upsertQueryData', () => { id: '4', title: 'All about cheese', contents: 'I love cheese!', - }) + }), ) }) @@ -282,7 +286,7 @@ describe('upsertQueryData', () => { const selector = api.endpoints.post.select('3') const fetchRes = storeRef.store.dispatch(api.endpoints.post.initiate('3')) const upsertRes = storeRef.store.dispatch( - api.util.upsertQueryData('post', '3', upsertedData) + api.util.upsertQueryData('post', '3', upsertedData), ) await upsertRes @@ -308,7 +312,7 @@ describe('upsertQueryData', () => { const selector = api.endpoints.post.select('3') const fetchRes = storeRef.store.dispatch(api.endpoints.post.initiate('3')) const upsertRes = storeRef.store.dispatch( - api.util.upsertQueryData('post', '3', upsertedData) + api.util.upsertQueryData('post', '3', upsertedData), ) await upsertRes @@ -349,7 +353,7 @@ describe('full integration', () => { }), { wrapper: storeRef.wrapper, - } + }, ) await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy()) @@ -377,7 +381,7 @@ describe('full integration', () => { id: '3', title: 'Meanwhile, this changed server-side.', contents: 'Delicious cheese!', - }) + }), ) }) @@ -403,7 +407,7 @@ describe('full integration', () => { }), { wrapper: storeRef.wrapper, - } + }, ) await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy()) @@ -436,8 +440,8 @@ describe('full integration', () => { title: 'Meanwhile, this changed server-side.', contents: 'TODO', }), - 50 - ) + 50, + ), ).rejects.toBeTruthy() act(() => void result.current.query.refetch()) @@ -450,14 +454,14 @@ describe('full integration', () => { title: 'Meanwhile, this changed server-side.', contents: 'TODO', }), - 50 + 50, ) }) test('Interop with in-flight requests', async () => { await act(async () => { const fetchRes = storeRef.store.dispatch( - api.endpoints.post2.initiate('3') + api.endpoints.post2.initiate('3'), ) const upsertRes = storeRef.store.dispatch( @@ -465,7 +469,7 @@ describe('full integration', () => { id: '3', title: 'Upserted title', contents: 'Upserted contents', - }) + }), ) const selectEntry = api.endpoints.post2.select('3') @@ -478,7 +482,7 @@ describe('full integration', () => { contents: 'Upserted contents', }) }, - { interval: 1, timeout: 15 } + { interval: 1, timeout: 15 }, ) await waitFor( () => { @@ -489,7 +493,7 @@ describe('full integration', () => { contents: 'TODO', }) }, - { interval: 1 } + { interval: 1 }, ) }) }) diff --git a/packages/toolkit/src/query/tests/polling.test.tsx b/packages/toolkit/src/query/tests/polling.test.tsx index bda59f4880..431b9ff1bb 100644 --- a/packages/toolkit/src/query/tests/polling.test.tsx +++ b/packages/toolkit/src/query/tests/polling.test.tsx @@ -27,7 +27,7 @@ let getSubscriptions: SubscriptionSelectors['getSubscriptions'] beforeEach(() => { ;({ getSubscriptions } = storeRef.store.dispatch( - api.internalActions.internal_getRTKQSubscriptions() + api.internalActions.internal_getRTKQSubscriptions(), ) as unknown as SubscriptionSelectors) }) @@ -42,7 +42,7 @@ describe('polling tests', () => { getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10 }, subscribe: true, - }) + }), ) expect(mockBaseQuery).toHaveBeenCalledTimes(1) @@ -60,7 +60,7 @@ describe('polling tests', () => { getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10 }, subscribe: true, - }) + }), ) const getSubs = createSubscriptionGetter(queryCacheKey) @@ -81,14 +81,14 @@ describe('polling tests', () => { getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10 }, subscribe: true, - }) + }), ) storeRef.store.dispatch( getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10 }, subscribe: true, - }) + }), ) await delay(10) @@ -108,14 +108,14 @@ describe('polling tests', () => { getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 30000 }, subscribe: true, - }) + }), ) storeRef.store.dispatch( getPosts.initiate(1, { subscriptionOptions: { pollingInterval: 10 }, subscribe: true, - }) + }), ) await delay(20) @@ -132,7 +132,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: true, }, subscribe: true, - }) + }), ) storeRef.store.dispatch(api.internalActions?.onFocusLost()) @@ -146,7 +146,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: false, }, subscribe: true, - }) + }), ) storeRef.store.dispatch(api.internalActions?.onFocus()) @@ -168,7 +168,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: false, }, subscribe: true, - }) + }), ) await delay(50) @@ -181,7 +181,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: true, }, subscribe: true, - }) + }), ) storeRef.store.dispatch( @@ -191,7 +191,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: false, }, subscribe: true, - }) + }), ) storeRef.store.dispatch(api.internalActions?.onFocusLost()) @@ -212,7 +212,7 @@ describe('polling tests', () => { skipPollingIfUnfocused: false, }, subscribe: true, - }) + }), ) const getSubs = createSubscriptionGetter(queryCacheKey) diff --git a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx index 06b7fbccd9..be27d08d9f 100644 --- a/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx +++ b/packages/toolkit/src/query/tests/refetchingBehaviors.test.tsx @@ -62,13 +62,13 @@ describe('refetchOnFocus tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) await act(async () => { @@ -78,7 +78,7 @@ describe('refetchOnFocus tests', () => { await delay(150) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -102,13 +102,13 @@ describe('refetchOnFocus tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -118,7 +118,7 @@ describe('refetchOnFocus tests', () => { await delay(150) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) }) @@ -152,17 +152,17 @@ describe('refetchOnFocus tests', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -170,13 +170,13 @@ describe('refetchOnFocus tests', () => { }) expect(screen.getByTestId('isLoading').textContent).toBe('false') await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -200,13 +200,13 @@ describe('refetchOnFocus tests', () => { const { unmount } = render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) unmount() @@ -241,13 +241,13 @@ describe('refetchOnReconnect tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -256,13 +256,13 @@ describe('refetchOnReconnect tests', () => { }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) @@ -286,13 +286,13 @@ describe('refetchOnReconnect tests', () => { render(, { wrapper: storeRef.wrapper }) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -301,7 +301,7 @@ describe('refetchOnReconnect tests', () => { }) expect(screen.getByTestId('isFetching').textContent).toBe('false') await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) }) @@ -335,17 +335,17 @@ describe('refetchOnReconnect tests', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -354,13 +354,13 @@ describe('refetchOnReconnect tests', () => { }) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) }) }) @@ -389,7 +389,7 @@ describe('customListenersHandler', () => { window.removeEventListener('online', handleOnline) console.log('cleanup!') } - } + }, ) await delay(150) @@ -415,13 +415,13 @@ describe('customListenersHandler', () => { expect(consoleSpy).toHaveBeenCalledWith('setup!') await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('true') + expect(screen.getByTestId('isLoading').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isLoading').textContent).toBe('false') + expect(screen.getByTestId('isLoading').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('1') + expect(screen.getByTestId('amount').textContent).toBe('1'), ) act(() => { @@ -439,18 +439,18 @@ describe('customListenersHandler', () => { expect( defaultApi.internalActions.onOnline.match( - mockCallsWithoutInternals[1][0] as any - ) + mockCallsWithoutInternals[1][0] as any, + ), ).toBe(true) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('true') + expect(screen.getByTestId('isFetching').textContent).toBe('true'), ) await waitFor(() => - expect(screen.getByTestId('isFetching').textContent).toBe('false') + expect(screen.getByTestId('isFetching').textContent).toBe('false'), ) await waitFor(() => - expect(screen.getByTestId('amount').textContent).toBe('2') + expect(screen.getByTestId('amount').textContent).toBe('2'), ) unsubscribe() diff --git a/packages/toolkit/src/query/tests/retry.test.ts b/packages/toolkit/src/query/tests/retry.test.ts index de71e1f644..dcc3ac8415 100644 --- a/packages/toolkit/src/query/tests/retry.test.ts +++ b/packages/toolkit/src/query/tests/retry.test.ts @@ -317,7 +317,7 @@ describe('configuration', () => { const attempts = Math.min(attempt, maxRetries) const timeout = attempts * 300 // Scale up by 300ms per request, ex: 300ms, 600ms, 900ms, 1200ms... await new Promise((resolve) => - setTimeout((res: any) => resolve(res), timeout) + setTimeout((res: any) => resolve(res), timeout), ) }, }) diff --git a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx index 3a7609fb80..5ab0d8f215 100644 --- a/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx +++ b/packages/toolkit/src/query/tests/useMutation-fixedCacheKey.test.tsx @@ -57,7 +57,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') @@ -69,7 +69,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c1, 'status').textContent).toBe('fulfilled'), ) expect(getByTestId(c1, 'data').textContent).toBe('C1') expect(getByTestId(c2, 'status').textContent).toBe('uninitialized') @@ -81,7 +81,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') @@ -119,7 +119,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') @@ -137,7 +137,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c1, 'status').textContent).toBe('fulfilled'), ) // the components with the first cache key should be affected @@ -159,7 +159,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c3, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c3, 'status').textContent).toBe('fulfilled'), ) // the components with the first cache key should be unaffected @@ -203,7 +203,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') @@ -215,7 +215,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c1, 'status').textContent).toBe('fulfilled'), ) expect(getByTestId(c1, 'data').textContent).toBe('C1') expect(getByTestId(c2, 'status').textContent).toBe('uninitialized') @@ -233,7 +233,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c1, 'status').textContent).toBe('fulfilled'), ) expect(getByTestId(c1, 'data').textContent).toBe('C1') @@ -252,7 +252,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') @@ -264,7 +264,7 @@ describe('fixedCacheKey', () => { }) await waitFor(() => - expect(getByTestId(c1, 'status').textContent).toBe('fulfilled') + expect(getByTestId(c1, 'status').textContent).toBe('fulfilled'), ) expect(getByTestId(c1, 'data').textContent).toBe('C1') expect(getByTestId(c2, 'status').textContent).toBe('fulfilled') @@ -315,7 +315,7 @@ describe('fixedCacheKey', () => { , - { wrapper: storeRef.wrapper } + { wrapper: storeRef.wrapper }, ) const c1 = screen.getByTestId('C1') const c2 = screen.getByTestId('C2') diff --git a/packages/toolkit/src/query/tests/utils.test.ts b/packages/toolkit/src/query/tests/utils.test.ts index 1124f0294b..859865c6d7 100644 --- a/packages/toolkit/src/query/tests/utils.test.ts +++ b/packages/toolkit/src/query/tests/utils.test.ts @@ -13,7 +13,7 @@ afterAll(() => { describe('isOnline', () => { test('Assumes online=true in a node env', () => { vi.spyOn(window, 'navigator', 'get').mockImplementation( - () => undefined as any + () => undefined as any, ) expect(navigator).toBeUndefined() @@ -22,14 +22,14 @@ describe('isOnline', () => { test('Returns false if navigator isOnline=false', () => { vi.spyOn(window, 'navigator', 'get').mockImplementation( - () => ({ onLine: false } as any) + () => ({ onLine: false }) as any, ) expect(isOnline()).toBe(false) }) test('Returns true if navigator isOnline=true', () => { vi.spyOn(window, 'navigator', 'get').mockImplementation( - () => ({ onLine: true } as any) + () => ({ onLine: true }) as any, ) expect(isOnline()).toBe(true) }) @@ -38,7 +38,7 @@ describe('isOnline', () => { describe('isDocumentVisible', () => { test('Assumes true when in a non-browser env', () => { vi.spyOn(window, 'document', 'get').mockImplementation( - () => undefined as any + () => undefined as any, ) expect(window.document).toBeUndefined() expect(isDocumentVisible()).toBe(true) @@ -46,28 +46,28 @@ describe('isDocumentVisible', () => { test('Returns false when hidden=true', () => { vi.spyOn(window, 'document', 'get').mockImplementation( - () => ({ visibilityState: 'hidden' } as any) + () => ({ visibilityState: 'hidden' }) as any, ) expect(isDocumentVisible()).toBe(false) }) test('Returns true when visibilityState=prerender', () => { vi.spyOn(window, 'document', 'get').mockImplementation( - () => ({ visibilityState: 'prerender' } as any) + () => ({ visibilityState: 'prerender' }) as any, ) expect(document.visibilityState).toBe('prerender') expect(isDocumentVisible()).toBe(true) }) test('Returns true when visibilityState=visible', () => { vi.spyOn(window, 'document', 'get').mockImplementation( - () => ({ visibilityState: 'visible' } as any) + () => ({ visibilityState: 'visible' }) as any, ) expect(document.visibilityState).toBe('visible') expect(isDocumentVisible()).toBe(true) }) test('Returns true when visibilityState=undefined', () => { vi.spyOn(window, 'document', 'get').mockImplementation( - () => ({ visibilityState: undefined } as any) + () => ({ visibilityState: undefined }) as any, ) expect(document.visibilityState).toBeUndefined() expect(isDocumentVisible()).toBe(true) diff --git a/packages/toolkit/src/query/tsHelpers.ts b/packages/toolkit/src/query/tsHelpers.ts index 7c2734b448..f663e9965b 100644 --- a/packages/toolkit/src/query/tsHelpers.ts +++ b/packages/toolkit/src/query/tsHelpers.ts @@ -24,9 +24,8 @@ export type NonOptionalKeys = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T] -export type HasRequiredProps = NonOptionalKeys extends never - ? False - : True +export type HasRequiredProps = + NonOptionalKeys extends never ? False : True export type OptionalIfAllPropsOptional = HasRequiredProps diff --git a/packages/toolkit/src/query/utils/isOnline.ts b/packages/toolkit/src/query/utils/isOnline.ts index af34850c9b..0dcb65b97a 100644 --- a/packages/toolkit/src/query/utils/isOnline.ts +++ b/packages/toolkit/src/query/utils/isOnline.ts @@ -7,6 +7,6 @@ export function isOnline() { return typeof navigator === 'undefined' ? true : navigator.onLine === undefined - ? true - : navigator.onLine + ? true + : navigator.onLine } diff --git a/packages/toolkit/src/query/utils/joinUrls.ts b/packages/toolkit/src/query/utils/joinUrls.ts index afcf1ad2e1..31e5e24953 100644 --- a/packages/toolkit/src/query/utils/joinUrls.ts +++ b/packages/toolkit/src/query/utils/joinUrls.ts @@ -5,7 +5,7 @@ const withoutLeadingSlash = (url: string) => url.replace(/^\//, '') export function joinUrls( base: string | undefined, - url: string | undefined + url: string | undefined, ): string { if (!base) { return url! diff --git a/packages/toolkit/src/serializableStateInvariantMiddleware.ts b/packages/toolkit/src/serializableStateInvariantMiddleware.ts index 118d3f50ec..a4dba23562 100644 --- a/packages/toolkit/src/serializableStateInvariantMiddleware.ts +++ b/packages/toolkit/src/serializableStateInvariantMiddleware.ts @@ -39,7 +39,7 @@ export function findNonSerializableValue( isSerializable: (value: unknown) => boolean = isPlain, getEntries?: (value: unknown) => [string, any][], ignoredPaths: IgnorePaths = [], - cache?: WeakSet + cache?: WeakSet, ): NonSerializableValue | false { let foundNestedSerializable: NonSerializableValue | false @@ -89,7 +89,7 @@ export function findNonSerializableValue( isSerializable, getEntries, ignoredPaths, - cache + cache, ) if (foundNestedSerializable) { @@ -186,7 +186,7 @@ export interface SerializableStateInvariantMiddlewareOptions { * @public */ export function createSerializableStateInvariantMiddleware( - options: SerializableStateInvariantMiddlewareOptions = {} + options: SerializableStateInvariantMiddlewareOptions = {}, ): Middleware { if (process.env.NODE_ENV === 'production') { return () => (next) => (action) => next(action) @@ -215,7 +215,7 @@ export function createSerializableStateInvariantMiddleware( const measureUtils = getTimeMeasureUtils( warnAfter, - 'SerializableStateInvariantMiddleware' + 'SerializableStateInvariantMiddleware', ) if ( @@ -232,7 +232,7 @@ export function createSerializableStateInvariantMiddleware( isSerializable, getEntries, ignoredActionPaths, - cache + cache, ) if (foundActionNonSerializableValue) { @@ -244,7 +244,7 @@ export function createSerializableStateInvariantMiddleware( '\nTake a look at the logic that dispatched this action: ', action, '\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)', - '\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)' + '\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)', ) } }) @@ -260,7 +260,7 @@ export function createSerializableStateInvariantMiddleware( isSerializable, getEntries, ignoredPaths, - cache + cache, ) if (foundStateNonSerializableValue) { @@ -271,7 +271,7 @@ export function createSerializableStateInvariantMiddleware( value, ` Take a look at the reducer(s) handling this action type: ${action.type}. -(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)` +(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`, ) } }) diff --git a/packages/toolkit/src/tests/actionCreatorInvariantMiddleware.test.ts b/packages/toolkit/src/tests/actionCreatorInvariantMiddleware.test.ts index 65f83ee063..25d5df9568 100644 --- a/packages/toolkit/src/tests/actionCreatorInvariantMiddleware.test.ts +++ b/packages/toolkit/src/tests/actionCreatorInvariantMiddleware.test.ts @@ -19,7 +19,7 @@ describe('createActionCreatorInvariantMiddleware', () => { it('sends the action through the middleware chain', () => { const next = vi.fn() const dispatch = createActionCreatorInvariantMiddleware()( - {} as MiddlewareAPI + {} as MiddlewareAPI, )(next) dispatch({ type: 'SOME_ACTION' }) @@ -29,10 +29,10 @@ describe('createActionCreatorInvariantMiddleware', () => { }) const makeActionTester = ( - options?: ActionCreatorInvariantMiddlewareOptions + options?: ActionCreatorInvariantMiddlewareOptions, ) => createActionCreatorInvariantMiddleware(options)({} as MiddlewareAPI)( - (action) => action + (action) => action, ) it('logs a warning to console if an action creator is mistakenly dispatched', () => { diff --git a/packages/toolkit/src/tests/combinedTest.test.ts b/packages/toolkit/src/tests/combinedTest.test.ts index 7f906d8182..a130df7a1d 100644 --- a/packages/toolkit/src/tests/combinedTest.test.ts +++ b/packages/toolkit/src/tests/combinedTest.test.ts @@ -48,7 +48,7 @@ describe('Combined entity slice', () => { async (arg, { getState, dispatch, extra, requestId, signal }) => { const state = getState() return fakeBooks - } + }, ) const booksSlice = createSlice({ diff --git a/packages/toolkit/src/tests/configureStore.test.ts b/packages/toolkit/src/tests/configureStore.test.ts index 19ad7ee371..3d78068919 100644 --- a/packages/toolkit/src/tests/configureStore.test.ts +++ b/packages/toolkit/src/tests/configureStore.test.ts @@ -36,7 +36,7 @@ describe('configureStore', async () => { expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) expect(redux.applyMiddleware).toHaveBeenCalled() expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line @@ -57,7 +57,7 @@ describe('configureStore', async () => { expect(redux.createStore).toHaveBeenCalledWith( expect.any(Function), undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -65,7 +65,7 @@ describe('configureStore', async () => { describe('given no reducer', () => { it('throws', () => { expect(configureStore).toThrow( - '`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers' + '`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers', ) }) }) @@ -73,14 +73,14 @@ describe('configureStore', async () => { describe('given no middleware', () => { it('calls createStore without any middleware', () => { expect( - configureStore({ middleware: () => new Tuple(), reducer }) + configureStore({ middleware: () => new Tuple(), reducer }), ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith() expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -89,7 +89,7 @@ describe('configureStore', async () => { it('throws an error requiring a callback', () => { // @ts-expect-error expect(() => configureStore({ middleware: [], reducer })).toThrow( - '`middleware` field must be a callback' + '`middleware` field must be a callback', ) }) }) @@ -97,19 +97,19 @@ describe('configureStore', async () => { describe('given undefined middleware', () => { it('calls createStore with default middleware', () => { expect(configureStore({ middleware: undefined, reducer })).toBeInstanceOf( - Object + Object, ) expect(redux.applyMiddleware).toHaveBeenCalledWith( expect.any(Function), // immutableCheck expect.any(Function), // thunk expect.any(Function), // serializableCheck - expect.any(Function) // actionCreatorCheck + expect.any(Function), // actionCreatorCheck ) expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -118,9 +118,9 @@ describe('configureStore', async () => { it('throws an error', () => { const invalidBuilder = vi.fn((getDefaultMiddleware) => undefined as any) expect(() => - configureStore({ middleware: invalidBuilder, reducer }) + configureStore({ middleware: invalidBuilder, reducer }), ).toThrow( - 'when using a middleware builder function, an array of middleware must be returned' + 'when using a middleware builder function, an array of middleware must be returned', ) }) }) @@ -129,7 +129,7 @@ describe('configureStore', async () => { it('throws an error', () => { const invalidBuilder = vi.fn((getDefaultMiddleware) => [true] as any) expect(() => - configureStore({ middleware: invalidBuilder, reducer }) + configureStore({ middleware: invalidBuilder, reducer }), ).toThrow('each middleware provided to configureStore must be a function') }) }) @@ -139,14 +139,14 @@ describe('configureStore', async () => { const thank: Redux.Middleware = (_store) => (next) => (action) => next(action) expect( - configureStore({ middleware: () => new Tuple(thank), reducer }) + configureStore({ middleware: () => new Tuple(thank), reducer }), ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalledWith(thank) expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -154,7 +154,7 @@ describe('configureStore', async () => { describe('middleware builder notation', () => { it('calls builder, passes getDefaultMiddleware and uses returned middlewares', () => { const thank = vi.fn( - ((_store) => (next) => (action) => 'foobar') as Redux.Middleware + ((_store) => (next) => (action) => 'foobar') as Redux.Middleware, ) const builder = vi.fn((getDefaultMiddleware) => { @@ -175,14 +175,14 @@ describe('configureStore', async () => { describe('with devTools disabled', () => { it('calls createStore without devTools enhancer', () => { expect(configureStore({ devTools: false, reducer })).toBeInstanceOf( - Object + Object, ) expect(redux.applyMiddleware).toHaveBeenCalled() expect(redux.compose).toHaveBeenCalled() expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -194,14 +194,14 @@ describe('configureStore', async () => { trace: true, } expect(configureStore({ devTools: options, reducer })).toBeInstanceOf( - Object + Object, ) expect(redux.applyMiddleware).toHaveBeenCalled() expect(composeWithDevToolsSpy).toHaveBeenCalledWith(options) // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -214,7 +214,7 @@ describe('configureStore', async () => { expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) }) }) @@ -238,14 +238,14 @@ describe('configureStore', async () => { configureStore({ enhancers: (gDE) => gDE().concat(dummyEnhancer), reducer, - }) + }), ).toBeInstanceOf(Object) expect(redux.applyMiddleware).toHaveBeenCalled() expect(composeWithDevToolsSpy).toHaveBeenCalled() // @remap-prod-remove-line expect(redux.createStore).toHaveBeenCalledWith( reducer, undefined, - expect.any(Function) + expect.any(Function), ) expect(dummyEnhancerCalled).toBe(true) @@ -254,19 +254,19 @@ describe('configureStore', async () => { describe('invalid arguments', () => { test('enhancers is not a callback', () => { expect(() => configureStore({ reducer, enhancers: [] as any })).toThrow( - '`enhancers` field must be a callback' + '`enhancers` field must be a callback', ) }) test('callback fails to return array', () => { expect(() => - configureStore({ reducer, enhancers: (() => {}) as any }) + configureStore({ reducer, enhancers: (() => {}) as any }), ).toThrow('`enhancers` callback must return an array') }) test('array contains non-function', () => { expect(() => - configureStore({ reducer, enhancers: (() => ['']) as any }) + configureStore({ reducer, enhancers: (() => ['']) as any }), ).toThrow('each enhancer provided to configureStore must be a function') }) }) @@ -288,7 +288,7 @@ describe('configureStore', async () => { expect(dummyEnhancerCalled).toBe(true) expect(consoleSpy).toHaveBeenCalledWith( - 'middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`' + 'middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`', ) }) it("doesn't warn when middleware enhancer is excluded if no middlewares provided", () => { diff --git a/packages/toolkit/src/tests/createAction.test.ts b/packages/toolkit/src/tests/createAction.test.ts index 2c4a80e13d..74e02e17cd 100644 --- a/packages/toolkit/src/tests/createAction.test.ts +++ b/packages/toolkit/src/tests/createAction.test.ts @@ -98,7 +98,7 @@ describe('createAction', () => { 'A_TYPE', (a: string, b: string, c: string) => ({ payload: a + b + c, - }) + }), ) expect(actionCreator('1', '2', '3').payload).toBe('123') }) diff --git a/packages/toolkit/src/tests/createAsyncThunk.test.ts b/packages/toolkit/src/tests/createAsyncThunk.test.ts index cf39d269a9..ef6ae71838 100644 --- a/packages/toolkit/src/tests/createAsyncThunk.test.ts +++ b/packages/toolkit/src/tests/createAsyncThunk.test.ts @@ -4,7 +4,7 @@ import { createAsyncThunk, createReducer, unwrapResult, - miniSerializeError + miniSerializeError, } from '@reduxjs/toolkit' import { vi } from 'vitest' @@ -40,13 +40,13 @@ describe('createAsyncThunk', () => { const thunkActionCreator = createAsyncThunk('testType', async () => 42) expect(thunkActionCreator.settled).toEqual(expect.any(Function)) expect(thunkActionCreator.settled(thunkActionCreator.pending(''))).toBe( - false + false, ) expect( - thunkActionCreator.settled(thunkActionCreator.rejected(null, '')) + thunkActionCreator.settled(thunkActionCreator.rejected(null, '')), ).toBe(true) expect( - thunkActionCreator.settled(thunkActionCreator.fulfilled(42, '')) + thunkActionCreator.settled(thunkActionCreator.fulfilled(42, '')), ).toBe(true) }) @@ -86,7 +86,7 @@ describe('createAsyncThunk', () => { passedArg = arg generatedRequestId = requestId return result - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -102,12 +102,12 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenNthCalledWith( 2, - thunkActionCreator.fulfilled(result, generatedRequestId, args) + thunkActionCreator.fulfilled(result, generatedRequestId, args), ) }) @@ -124,7 +124,7 @@ describe('createAsyncThunk', () => { async (args: number, { requestId }) => { generatedRequestId = requestId throw error - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -135,7 +135,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -160,7 +160,7 @@ describe('createAsyncThunk', () => { async (args: number, { requestId }) => { generatedRequestId = requestId throw errorObject - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -171,7 +171,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -199,7 +199,7 @@ describe('createAsyncThunk', () => { async (args: number, { requestId }) => { generatedRequestId = requestId throw errorObject - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -210,7 +210,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -244,7 +244,7 @@ describe('createAsyncThunk', () => { generatedRequestId = requestId return rejectWithValue(errorPayload) - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -255,7 +255,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -289,7 +289,7 @@ describe('createAsyncThunk', () => { generatedRequestId = requestId throw rejectWithValue(errorPayload) - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -300,7 +300,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -343,7 +343,7 @@ describe('createAsyncThunk', () => { } return rejectWithValue(errorPayload) } - } + }, ) const thunkFunction = thunkActionCreator(args) @@ -354,7 +354,7 @@ describe('createAsyncThunk', () => { expect(dispatch).toHaveBeenNthCalledWith( 1, - thunkActionCreator.pending(generatedRequestId, args) + thunkActionCreator.pending(generatedRequestId, args), ) expect(dispatch).toHaveBeenCalledTimes(2) @@ -377,8 +377,8 @@ describe('createAsyncThunk with abortController', () => { reject( new DOMException( 'This should never be reached as it should already be handled.', - 'AbortError' - ) + 'AbortError', + ), ) } signal.addEventListener('abort', () => { @@ -386,7 +386,7 @@ describe('createAsyncThunk with abortController', () => { }) setTimeout(resolve, 100) }) - } + }, ) let store = configureStore({ @@ -437,7 +437,7 @@ describe('createAsyncThunk with abortController', () => { // calling unwrapResult on the returned object re-throws the error from the abortablePayloadCreator expect(() => unwrapResult(result)).toThrowError( - expect.objectContaining(expectedAbortedAction.error) + expect.objectContaining(expectedAbortedAction.error), ) }) @@ -471,7 +471,7 @@ describe('createAsyncThunk with abortController', () => { // calling unwrapResult on the returned object re-throws the error from the abortablePayloadCreator expect(() => unwrapResult(result)).toThrowError( - expect.objectContaining(expectedAbortedAction.error) + expect.objectContaining(expectedAbortedAction.error), ) }) @@ -496,7 +496,7 @@ describe('createAsyncThunk with abortController', () => { }) describe('behaviour with missing AbortController', () => { - let keepAbortController: typeof window['AbortController'] + let keepAbortController: (typeof window)['AbortController'] let freshlyLoadedModule: typeof import('../createAsyncThunk') let restore: () => void = () => {} let nodeEnv: string @@ -523,7 +523,7 @@ describe('createAsyncThunk with abortController', () => { 'longRunning', async () => { await new Promise((resolve) => setTimeout(resolve, 30000)) - } + }, ) expect(longRunningAsyncThunk()).toThrow('AbortController is not defined') @@ -599,7 +599,7 @@ describe('conditional skipping of asyncThunks', () => { expect(condition).toHaveBeenCalledTimes(1) expect(condition).toHaveBeenLastCalledWith( arg, - expect.objectContaining({ getState, extra }) + expect.objectContaining({ getState, extra }), ) }) @@ -625,7 +625,7 @@ describe('conditional skipping of asyncThunks', () => { await asyncThunk(arg)(dispatch, getState, extra) expect(dispatch).toHaveBeenCalledTimes(1) expect(dispatch).toHaveBeenLastCalledWith( - expect.objectContaining({ type: 'test/rejected' }) + expect.objectContaining({ type: 'test/rejected' }), ) }) @@ -662,7 +662,7 @@ describe('conditional skipping of asyncThunks', () => { }) const promise = asyncThunk(arg)(dispatch, getState, extra) promise.abort( - `If the promise was 1. somehow canceled, 2. in a 'started' state and 3. we attempted to abort, this would crash the tests` + `If the promise was 1. somehow canceled, 2. in a 'started' state and 3. we attempted to abort, this would crash the tests`, ) }) @@ -690,7 +690,7 @@ describe('conditional skipping of asyncThunks', () => { }, payload: undefined, type: 'test/rejected', - }) + }), ) }) }) @@ -736,7 +736,7 @@ describe('unwrapResult', () => { }) const unwrapPromise = asyncThunk()(dispatch, getState, extra).then( - unwrapResult + unwrapResult, ) await expect(unwrapPromise).resolves.toBe('fulfilled!') @@ -752,14 +752,14 @@ describe('unwrapResult', () => { }) const unwrapPromise = asyncThunk()(dispatch, getState, extra).then( - unwrapResult + unwrapResult, ) await expect(unwrapPromise).rejects.toEqual(miniSerializeError(error)) const unwrapPromise2 = asyncThunk()(dispatch, getState, extra) await expect(unwrapPromise2.unwrap()).rejects.toEqual( - miniSerializeError(error) + miniSerializeError(error), ) }) test('rejectWithValue case', async () => { @@ -768,7 +768,7 @@ describe('unwrapResult', () => { }) const unwrapPromise = asyncThunk()(dispatch, getState, extra).then( - unwrapResult + unwrapResult, ) await expect(unwrapPromise).rejects.toBe('rejectWithValue!') @@ -800,7 +800,7 @@ describe('idGenerator option', () => { async (args: void, { requestId }) => { generatedRequestId = requestId }, - { idGenerator } + { idGenerator }, ) // dispatching the thunks should be using the custom id generator @@ -824,7 +824,7 @@ describe('idGenerator option', () => { 'test', async (args: void, { requestId }) => { generatedRequestId = requestId - } + }, ) // dispatching the default options thunk should still generate an id, // but not using the custom id generator @@ -832,10 +832,10 @@ describe('idGenerator option', () => { expect(generatedRequestId).toEqual(promise3.requestId) expect(promise3.requestId).not.toEqual('') expect(promise3.requestId).not.toEqual( - expect.stringContaining('fake-random-id') + expect.stringContaining('fake-random-id'), ) expect((await promise3).meta.requestId).not.toEqual( - expect.stringContaining('fake-fandom-id') + expect.stringContaining('fake-fandom-id'), ) }) @@ -847,7 +847,7 @@ describe('idGenerator option', () => { async (args: any, { requestId }) => { generatedRequestId = requestId }, - { idGenerator: customIdGenerator } + { idGenerator: customIdGenerator }, ) const thunkArg = 1 diff --git a/packages/toolkit/src/tests/createDraftSafeSelector.test.ts b/packages/toolkit/src/tests/createDraftSafeSelector.test.ts index ab95fc48d8..e25ac95d5e 100644 --- a/packages/toolkit/src/tests/createDraftSafeSelector.test.ts +++ b/packages/toolkit/src/tests/createDraftSafeSelector.test.ts @@ -28,7 +28,7 @@ test('handles drafts correctly', () => { const unsafeSelector = createSelector(selectSelf, (state) => state.value) const draftSafeSelector = createDraftSafeSelector( selectSelf, - (state) => state.value + (state) => state.value, ) produce({ value: 1 }, (state) => { diff --git a/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts b/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts index cb70812d46..cc7ec2f1d8 100644 --- a/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts +++ b/packages/toolkit/src/tests/createDraftSafeSelector.withTypes.test.ts @@ -34,14 +34,14 @@ describe(createDraftSafeSelector.withTypes, () => { expect(createTypedDraftSafeSelector.withTypes).toEqual(expect.any(Function)) expect(createTypedDraftSafeSelector.withTypes().withTypes).toEqual( - expect.any(Function) + expect.any(Function), ) expect(createTypedDraftSafeSelector).toBe(createDraftSafeSelector) const selectTodoIds = createTypedDraftSafeSelector( [(state) => state.todos], - (todos) => todos.map(({ id }) => id) + (todos) => todos.map(({ id }) => id), ) expect(selectTodoIds(rootState)).to.be.an('array').that.is.not.empty diff --git a/packages/toolkit/src/tests/createReducer.test.ts b/packages/toolkit/src/tests/createReducer.test.ts index 5d794c78b7..e5ea7365a3 100644 --- a/packages/toolkit/src/tests/createReducer.test.ts +++ b/packages/toolkit/src/tests/createReducer.test.ts @@ -89,11 +89,11 @@ describe('createReducer', () => { } expect(wrapper).toThrowError( - /The object notation for `createReducer` has been removed/ + /The object notation for `createReducer` has been removed/, ) expect(wrapper).toThrowError( - /The object notation for `createReducer` has been removed/ + /The object notation for `createReducer` has been removed/, ) }) @@ -145,7 +145,7 @@ describe('createReducer', () => { const mutateStateOutsideReducer = () => (result[0].text = 'edited') expect(mutateStateOutsideReducer).toThrowError( - 'Cannot add property text, object is not extensible' + 'Cannot add property text, object is not extensible', ) }) @@ -157,12 +157,12 @@ describe('createReducer', () => { const mutateStateOutsideReducer = () => (frozenInitialState[0].text = 'edited') expect(mutateStateOutsideReducer).toThrowError( - /Cannot assign to read only property/ + /Cannot assign to read only property/, ) }) test('does not throw error if initial state is not draftable', () => { expect(() => - createReducer(new URLSearchParams(), () => {}) + createReducer(new URLSearchParams(), () => {}), ).not.toThrowError() }) }) @@ -263,7 +263,7 @@ describe('createReducer', () => { const reducer = createReducer(0, (builder) => builder .addCase(increment, (state, action) => state + action.payload) - .addCase(decrement, (state, action) => state - action.payload) + .addCase(decrement, (state, action) => state - action.payload), ) expect(reducer(0, increment(5))).toBe(5) expect(reducer(5, decrement(5))).toBe(0) @@ -274,13 +274,13 @@ describe('createReducer', () => { .addCase( 'increment', (state, action: { type: 'increment'; payload: number }) => - state + action.payload + state + action.payload, ) .addCase( 'decrement', (state, action: { type: 'decrement'; payload: number }) => - state - action.payload - ) + state - action.payload, + ), ) expect(reducer(0, increment(5))).toBe(5) expect(reducer(5, decrement(5))).toBe(0) @@ -292,8 +292,8 @@ describe('createReducer', () => { .addCase( 'decrement', (state, action: { type: 'decrement'; payload: number }) => - state - action.payload - ) + state - action.payload, + ), ) expect(reducer(0, increment(5))).toBe(5) expect(reducer(5, decrement(5))).toBe(0) @@ -302,11 +302,11 @@ describe('createReducer', () => { const reducer = createReducer(0, (builder) => builder.addCase( 'decrement', - (state, action: { type: 'decrement'; payload: number }) => {} - ) + (state, action: { type: 'decrement'; payload: number }) => {}, + ), ) expect(() => reducer(5, decrement(5))).toThrowErrorMatchingInlineSnapshot( - `[Error: A case reducer on a non-draftable value must not return undefined]` + `[Error: A case reducer on a non-draftable value must not return undefined]`, ) }) test('allows you to return undefined if the state was null, thus skipping an update', () => { @@ -318,8 +318,8 @@ describe('createReducer', () => { return state - action.payload } return undefined - } - ) + }, + ), ) expect(reducer(0, decrement(5))).toBe(-5) expect(reducer(null, decrement(5))).toBe(null) @@ -330,8 +330,8 @@ describe('createReducer', () => { 'decrement', (state, action: { type: 'decrement'; payload: number }) => { return null - } - ) + }, + ), ) expect(reducer(5, decrement(5))).toBe(null) }) @@ -340,8 +340,8 @@ describe('createReducer', () => { builder.addCase( 'decrement', (state, action: { type: 'decrement'; payload: number }) => - state - action.payload - ) + state - action.payload, + ), ) expect(reducer(5, decrement(5))).toBe(0) }) @@ -351,20 +351,20 @@ describe('createReducer', () => { builder .addCase(increment, (state, action) => state + action.payload) .addCase(increment, (state, action) => state + action.payload) - .addCase(decrement, (state, action) => state - action.payload) - ) + .addCase(decrement, (state, action) => state - action.payload), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']`, ) expect(() => createReducer(0, (builder) => builder .addCase(increment, (state, action) => state + action.payload) .addCase('increment', (state) => state + 1) - .addCase(decrement, (state, action) => state - action.payload) - ) + .addCase(decrement, (state, action) => state - action.payload), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']`, ) }) @@ -373,16 +373,16 @@ describe('createReducer', () => { type: 'custom_action', payload, }) - customActionCreator.type = "" + customActionCreator.type = '' expect(() => createReducer(0, (builder) => builder.addCase( customActionCreator, - (state, action) => state + action.payload - ) - ) + (state, action) => state + action.payload, + ), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` cannot be called with an empty action type]` + `[Error: \`builder.addCase\` cannot be called with an empty action type]`, ) }) }) @@ -398,14 +398,14 @@ describe('createReducer', () => { }) const numberActionMatcher = ( - a: UnknownAction + a: UnknownAction, ): a is PayloadAction => isPlainObject(a.meta) && 'type' in a.meta && (a.meta as Record<'type', unknown>).type === 'number_action' const stringActionMatcher = ( - a: UnknownAction + a: UnknownAction, ): a is PayloadAction => isPlainObject(a.meta) && 'type' in a.meta && @@ -425,7 +425,7 @@ describe('createReducer', () => { }) .addMatcher(stringActionMatcher, (state) => { state.stringActions += 1 - }) + }), ) expect(reducer(undefined, incrementBy(1))).toEqual({ numberActions: 1, @@ -452,7 +452,7 @@ describe('createReducer', () => { .addDefaultCase((state) => { state.numberActions = -1 state.stringActions = -1 - }) + }), ) expect(reducer(undefined, { type: 'somethingElse' })).toEqual({ numberActions: -1, @@ -473,7 +473,7 @@ describe('createReducer', () => { }) .addMatcher(numberActionMatcher, (state) => { state.numberActions = state.numberActions * 10 + 3 - }) + }), ) expect(reducer(undefined, incrementBy(1))).toEqual({ numberActions: 123, @@ -492,7 +492,7 @@ describe('createReducer', () => { const reducer = createReducer(initialState, (builder) => builder.addMatcher(incrementBy.match, (state) => { state.numberActions += 100 - }) + }), ) expect(reducer(undefined, incrementBy(1))).toEqual({ numberActions: 100, @@ -504,33 +504,33 @@ describe('createReducer', () => { createReducer(initialState, (builder: any) => builder .addMatcher(numberActionMatcher, () => {}) - .addCase(incrementBy, () => {}) - ) + .addCase(incrementBy, () => {}), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` should only be called before calling \`builder.addMatcher\`]` + `[Error: \`builder.addCase\` should only be called before calling \`builder.addMatcher\`]`, ) expect(() => createReducer(initialState, (builder: any) => - builder.addDefaultCase(() => {}).addCase(incrementBy, () => {}) - ) + builder.addDefaultCase(() => {}).addCase(incrementBy, () => {}), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` should only be called before calling \`builder.addDefaultCase\`]` + `[Error: \`builder.addCase\` should only be called before calling \`builder.addDefaultCase\`]`, ) expect(() => createReducer(initialState, (builder: any) => builder .addDefaultCase(() => {}) - .addMatcher(numberActionMatcher, () => {}) - ) + .addMatcher(numberActionMatcher, () => {}), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addMatcher\` should only be called before calling \`builder.addDefaultCase\`]` + `[Error: \`builder.addMatcher\` should only be called before calling \`builder.addDefaultCase\`]`, ) expect(() => createReducer(initialState, (builder: any) => - builder.addDefaultCase(() => {}).addDefaultCase(() => {}) - ) + builder.addDefaultCase(() => {}).addDefaultCase(() => {}), + ), ).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addDefaultCase\` can only be called once]` + `[Error: \`builder.addDefaultCase\` can only be called once]`, ) }) }) @@ -547,7 +547,7 @@ function behavesLikeReducer(todosReducer: TodosReducer) { todosReducer([], { type: 'ADD_TODO', payload: { newTodo: { text: 'Run the tests' } }, - }) + }), ).toEqual([ { text: 'Run the tests', @@ -566,8 +566,8 @@ function behavesLikeReducer(todosReducer: TodosReducer) { { type: 'ADD_TODO', payload: { newTodo: { text: 'Use Redux' } }, - } - ) + }, + ), ).toEqual([ { text: 'Run the tests', @@ -594,8 +594,8 @@ function behavesLikeReducer(todosReducer: TodosReducer) { { type: 'ADD_TODO', payload: { newTodo: { text: 'Fix the tests' } }, - } - ) + }, + ), ).toEqual([ { text: 'Run the tests', @@ -628,8 +628,8 @@ function behavesLikeReducer(todosReducer: TodosReducer) { { type: 'TOGGLE_TODO', payload: { index: 0 }, - } - ) + }, + ), ).toEqual([ { text: 'Run the tests', diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 94b67126e1..3f6bdc5d90 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -33,7 +33,7 @@ describe('createSlice', () => { state * action.payload, }, initialState: 0, - }) + }), ).toThrowError() }) }) @@ -49,7 +49,7 @@ describe('createSlice', () => { state * action.payload, }, initialState: 0, - }) + }), ).toThrowError() }) }) @@ -69,7 +69,7 @@ describe('createSlice', () => { }) expect(getLog().log).toBe( - 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`' + 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`', ) }) }) @@ -121,7 +121,7 @@ describe('createSlice', () => { name: 'params', initialState: new URLSearchParams(), reducers: {}, - }) + }), ).not.toThrowError() }) }) @@ -162,7 +162,7 @@ describe('createSlice', () => { name: 'params', initialState: () => new URLSearchParams(), reducers: {}, - }) + }), ).not.toThrowError() }) }) @@ -199,7 +199,7 @@ describe('createSlice', () => { extraReducers: (builder) => { builder.addCase( addMore, - (state, action) => state + action.payload.amount + (state, action) => state + action.payload.amount, ) }, @@ -223,7 +223,7 @@ describe('createSlice', () => { extraReducers: (builder) => builder.addCase( increment, - (state, action) => state + action.payload + (state, action) => state + action.payload, ), }) expect(slice.reducer(0, increment(5))).toBe(5) @@ -238,7 +238,7 @@ describe('createSlice', () => { builder.addCase( 'increment', (state, action: { type: 'increment'; payload: number }) => - state + action.payload + state + action.payload, ), }) expect(slice.reducer(0, increment(5))).toBe(5) @@ -257,7 +257,7 @@ describe('createSlice', () => { }) slice.reducer(undefined, { type: 'unrelated' }) }).toThrowErrorMatchingInlineSnapshot( - `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']` + `[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']`, ) }) @@ -270,7 +270,7 @@ describe('createSlice', () => { builder.addMatcher( increment.match, (state, action: { type: 'increment'; payload: number }) => - state + action.payload + state + action.payload, ), }) expect(slice.reducer(0, increment(5))).toBe(5) @@ -284,7 +284,7 @@ describe('createSlice', () => { extraReducers: (builder) => builder.addDefaultCase( (state, action) => - state + (action as PayloadAction).payload + state + (action as PayloadAction).payload, ), }) expect(slice.reducer(0, increment(5))).toBe(5) @@ -333,7 +333,7 @@ describe('createSlice', () => { testSlice.reducer(0, testSlice.actions.testReducer('testPayload')) expect(reducer).toHaveBeenCalledWith( 0, - expect.objectContaining({ payload: 'testPayload' }) + expect.objectContaining({ payload: 'testPayload' }), ) }) }) @@ -371,23 +371,23 @@ describe('createSlice', () => { }) expect(first.reducer(undefined, { type: 'unrelated' })).toBe( - 'firstInitial' + 'firstInitial', ) expect(first.reducer(undefined, first.actions.something())).toBe( - 'firstSomething' + 'firstSomething', ) expect(first.reducer(undefined, second.actions.other())).toBe( - 'firstOther' + 'firstOther', ) expect(second.reducer(undefined, { type: 'unrelated' })).toBe( - 'secondInitial' + 'secondInitial', ) expect(second.reducer(undefined, first.actions.something())).toBe( - 'secondSomething' + 'secondSomething', ) expect(second.reducer(undefined, second.actions.other())).toBe( - 'secondOther' + 'secondOther', ) }) }) @@ -425,7 +425,7 @@ describe('createSlice', () => { } expect(wrapper).toThrowError( - /The object notation for `createSlice.extraReducers` has been removed/ + /The object notation for `createSlice.extraReducers` has been removed/, ) dummySlice = (createSlice as CreateSlice)({ @@ -438,7 +438,7 @@ describe('createSlice', () => { }, }) expect(wrapper).toThrowError( - /The object notation for `createSlice.extraReducers` has been removed/ + /The object notation for `createSlice.extraReducers` has been removed/, ) }) @@ -461,7 +461,7 @@ describe('createSlice', () => { } expect(wrapper).toThrowError( - /The object notation for `createSlice.extraReducers` has been removed/ + /The object notation for `createSlice.extraReducers` has been removed/, ) vi.unstubAllEnvs() @@ -476,7 +476,7 @@ describe('createSlice', () => { selectSlice: (state) => state, selectMultiple: Object.assign( (state: number, multiplier: number) => state * multiplier, - { test: 0 } + { test: 0 }, ), }, }) @@ -493,7 +493,7 @@ describe('createSlice', () => { number: slice.getInitialState(), } const { selectSlice, selectMultiple } = slice.getSelectors( - (state: typeof customState) => state.number + (state: typeof customState) => state.number, ) expect(selectSlice(customState)).toBe(slice.getInitialState()) expect(selectMultiple(customState, 2)).toBe(slice.getInitialState() * 2) @@ -539,22 +539,22 @@ describe('createSlice', () => { // selector returns initial state if undefined in real state expect(injectedSlice.selectSlice(uninjectedState)).toBe( - slice.getInitialState() + slice.getInitialState(), ) expect(injectedSlice.selectors.selectMultiple({}, 1)).toBe( - slice.getInitialState() + slice.getInitialState(), ) expect(injectedSlice.getSelectors().selectMultiple(undefined, 1)).toBe( - slice.getInitialState() + slice.getInitialState(), ) const injectedState = combinedReducer(undefined, increment()) expect(injectedSlice.selectSlice(injectedState)).toBe( - slice.getInitialState() + 1 + slice.getInitialState() + 1, ) expect(injectedSlice.selectors.selectMultiple(injectedState, 1)).toBe( - slice.getInitialState() + 1 + slice.getInitialState() + 1, ) }) it('allows providing a custom name to inject under', () => { @@ -585,10 +585,10 @@ describe('createSlice', () => { const injectedState = combinedReducer(undefined, increment()) expect(injected.selectSlice(injectedState)).toBe( - slice.getInitialState() + 1 + slice.getInitialState() + 1, ) expect(injected.selectors.selectMultiple(injectedState, 2)).toBe( - (slice.getInitialState() + 1) * 2 + (slice.getInitialState() + 1) * 2, ) const injected2 = slice.injectInto(combinedReducer, { @@ -598,10 +598,10 @@ describe('createSlice', () => { const injected2State = combinedReducer(undefined, increment()) expect(injected2.selectSlice(injected2State)).toBe( - slice.getInitialState() + 1 + slice.getInitialState() + 1, ) expect(injected2.selectors.selectMultiple(injected2State, 2)).toBe( - (slice.getInitialState() + 1) * 2 + (slice.getInitialState() + 1) * 2, ) }) it('avoids incorrectly caching selectors', () => { @@ -629,9 +629,9 @@ describe('createSlice', () => { expect(() => // @ts-expect-error - slice.getSelectors().selectMultiple(undefined, 1) + slice.getSelectors().selectMultiple(undefined, 1), ).toThrowErrorMatchingInlineSnapshot( - `[Error: selectState returned undefined for an uninjected slice reducer]` + `[Error: selectState returned undefined for an uninjected slice reducer]`, ) const injected2 = slice.injectInto(combinedReducer, { @@ -651,9 +651,9 @@ describe('createSlice', () => { name: 'test', initialState: [] as any[], reducers: (create) => ({ thunk: create.asyncThunk(() => {}) }), - }) + }), ).toThrowErrorMatchingInlineSnapshot( - `[Error: Cannot use \`create.asyncThunk\` in the built-in \`createSlice\`. Use \`buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })\` to create a customised version of \`createSlice\`.]` + `[Error: Cannot use \`create.asyncThunk\` in the built-in \`createSlice\`. Use \`buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })\` to create a customised version of \`createSlice\`.]`, ) }) const createAppSlice = buildCreateSlice({ @@ -681,7 +681,7 @@ describe('createSlice', () => { function payloadCreator(arg, api) { return Promise.resolve('resolved payload') }, - { pending, fulfilled, rejected, settled } + { pending, fulfilled, rejected, settled }, ), }), }) @@ -725,7 +725,7 @@ describe('createSlice', () => { function payloadCreator(arg, api): any { throw new Error('') }, - { pending, fulfilled, rejected, settled } + { pending, fulfilled, rejected, settled }, ), }), }) @@ -779,7 +779,7 @@ describe('createSlice', () => { fulfilled, rejected, settled, - } + }, ), }), }) @@ -817,7 +817,7 @@ describe('createSlice', () => { function payloadCreator(arg, api) { return Promise.resolve('resolved payload') }, - { pending, fulfilled, settled } + { pending, fulfilled, settled }, ), }), }) @@ -833,9 +833,9 @@ describe('createSlice', () => { slice.actions.thunkReducers.rejected( new Error('test'), 'fakeRequestId', - {} - ) - ) + {}, + ), + ), ).not.toThrow() }) @@ -852,13 +852,16 @@ describe('createSlice', () => { }), (state, action) => { state.push(action) - } + }, ), }), }) expect( - slice.reducer([], slice.actions.prepared('test', 1, { message: 'err' })) + slice.reducer( + [], + slice.actions.prepared('test', 1, { message: 'err' }), + ), ).toMatchInlineSnapshot(` [ { @@ -890,9 +893,9 @@ describe('createSlice', () => { }, }, }), - }) + }), ).toThrowErrorMatchingInlineSnapshot( - `[Error: Please use the \`create.preparedReducer\` notation for prepared action creators with the \`create\` notation.]` + `[Error: Please use the \`create.preparedReducer\` notation for prepared action creators with the \`create\` notation.]`, ) }) }) diff --git a/packages/toolkit/src/tests/immutableStateInvariantMiddleware.test.ts b/packages/toolkit/src/tests/immutableStateInvariantMiddleware.test.ts index dec7789032..63679ba0d8 100644 --- a/packages/toolkit/src/tests/immutableStateInvariantMiddleware.test.ts +++ b/packages/toolkit/src/tests/immutableStateInvariantMiddleware.test.ts @@ -151,7 +151,7 @@ describe('createImmutableStateInvariantMiddleware', () => { try { dispatch({ type: 'SOME_ACTION' }) expect(getLog().log).toMatch( - /^ImmutableStateInvariantMiddleware took \d*ms, which is more than the warning threshold of 4ms./ + /^ImmutableStateInvariantMiddleware took \d*ms, which is more than the warning threshold of 4ms./, ) } finally { restore() diff --git a/packages/toolkit/src/tests/matchers.test-d.ts b/packages/toolkit/src/tests/matchers.test-d.ts index 269debcfd8..12d3246eec 100644 --- a/packages/toolkit/src/tests/matchers.test-d.ts +++ b/packages/toolkit/src/tests/matchers.test-d.ts @@ -55,7 +55,7 @@ describe('type tests', () => { prop1: 1, prop3: 3, } - } + }, ) const asyncThunk2 = createAsyncThunk<{ prop1: number; prop2: number }>( @@ -66,7 +66,7 @@ describe('type tests', () => { prop1: 1, prop2: 2, } - } + }, ) if (isAnyOf(asyncThunk1.fulfilled, asyncThunk2.fulfilled)(action)) { @@ -158,7 +158,7 @@ describe('type tests', () => { prop1: 1, prop3: 3, } - } + }, ) if (isAllOf(asyncThunk1.fulfilled, isSpecialAction)(action)) { @@ -288,10 +288,10 @@ describe('type tests', () => { const thunk2 = createAsyncThunk('b', () => 'b') const interestingThunks = [thunk1, thunk2] const interestingPendingThunks = interestingThunks.map( - (thunk) => thunk.pending + (thunk) => thunk.pending, ) const interestingFulfilledThunks = interestingThunks.map( - (thunk) => thunk.fulfilled + (thunk) => thunk.fulfilled, ) const isLoading = isAnyOf(...interestingPendingThunks) diff --git a/packages/toolkit/src/tests/matchers.test.ts b/packages/toolkit/src/tests/matchers.test.ts index 54dbbed37e..11a6fdb8cd 100644 --- a/packages/toolkit/src/tests/matchers.test.ts +++ b/packages/toolkit/src/tests/matchers.test.ts @@ -70,7 +70,7 @@ describe('isAnyOf', () => { expect(isAnyOf(thunkA.fulfilled, thunkB.fulfilled)(action)).toEqual(true) expect( - isAnyOf(thunkA.pending, thunkA.rejected, thunkB.fulfilled)(action) + isAnyOf(thunkA.pending, thunkA.rejected, thunkB.fulfilled)(action), ).toEqual(false) }) @@ -133,13 +133,13 @@ describe('isAllOf', () => { const specialThunkAction = thunkA.fulfilled('SPECIAL', 'fakeRequestId') expect(isAllOf(thunkA.fulfilled, isActionSpecial)(specialThunkAction)).toBe( - true + true, ) const ordinaryThunkAction = thunkA.fulfilled('ORDINARY', 'fakeRequestId') expect( - isAllOf(thunkA.fulfilled, isActionSpecial)(ordinaryThunkAction) + isAllOf(thunkA.fulfilled, isActionSpecial)(ordinaryThunkAction), ).toBe(false) }) }) @@ -162,7 +162,7 @@ describe('isPending', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(isPending()(rejectedAction)).toBe(false) @@ -180,7 +180,7 @@ describe('isPending', () => { function testPendingAction( thunk: typeof thunkA | typeof thunkB | typeof thunkC, - expected: boolean + expected: boolean, ) { const pendingAction = thunk.pending('fakeRequestId') expect(matchAC(pendingAction)).toBe(expected) @@ -188,7 +188,7 @@ describe('isPending', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(matchAC(rejectedAction)).toBe(false) @@ -219,7 +219,7 @@ describe('isRejected', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(isRejected()(rejectedAction)).toBe(true) expect(isRejected(rejectedAction)).toBe(true) @@ -238,14 +238,14 @@ describe('isRejected', () => { function testRejectedAction( thunk: typeof thunkA | typeof thunkB | typeof thunkC, - expected: boolean + expected: boolean, ) { const pendingAction = thunk.pending('fakeRequestId') expect(matchAC(pendingAction)).toBe(false) const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(matchAC(rejectedAction)).toBe(expected) expect(matchB(rejectedAction)).toBe(!expected) @@ -279,7 +279,7 @@ describe('isRejectedWithValue', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(isRejectedWithValue()(rejectedAction)).toBe(false) @@ -310,14 +310,14 @@ describe('isRejectedWithValue', () => { async function testRejectedAction( thunk: typeof thunkA | typeof thunkB | typeof thunkC, - expected: boolean + expected: boolean, ) { const pendingAction = thunk.pending('fakeRequestId') expect(matchAC(pendingAction)).toBe(false) const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) // rejected-with-value is a narrower requirement than rejected expect(matchAC(rejectedAction)).toBe(false) @@ -359,7 +359,7 @@ describe('isFulfilled', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(isFulfilled()(rejectedAction)).toBe(false) @@ -378,14 +378,14 @@ describe('isFulfilled', () => { function testFulfilledAction( thunk: typeof thunkA | typeof thunkB | typeof thunkC, - expected: boolean + expected: boolean, ) { const pendingAction = thunk.pending('fakeRequestId') expect(matchAC(pendingAction)).toBe(false) const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(matchAC(rejectedAction)).toBe(false) @@ -418,7 +418,7 @@ describe('isAsyncThunkAction', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(matcher(rejectedAction)).toBe(true) @@ -436,7 +436,7 @@ describe('isAsyncThunkAction', () => { function testAllActions( thunk: typeof thunkA | typeof thunkB | typeof thunkC, - expected: boolean + expected: boolean, ) { const pendingAction = thunk.pending('fakeRequestId') expect(matchAC(pendingAction)).toBe(expected) @@ -444,7 +444,7 @@ describe('isAsyncThunkAction', () => { const rejectedAction = thunk.rejected( new Error('rejected'), - 'fakeRequestId' + 'fakeRequestId', ) expect(matchAC(rejectedAction)).toBe(expected) expect(matchB(rejectedAction)).toBe(!expected) diff --git a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts index d9413671ed..0d0ffd7630 100644 --- a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts +++ b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts @@ -362,7 +362,7 @@ describe('serializableStateInvariantMiddleware', () => { new Tuple( createSerializableStateInvariantMiddleware({ ignoredActionPaths: [], - }) + }), ), }).dispatch({ type: 'test', meta: { arg: nonSerializableValue } }) @@ -386,7 +386,7 @@ describe('serializableStateInvariantMiddleware', () => { new Tuple( createSerializableStateInvariantMiddleware({ ignoredActionPaths: ['payload', 'meta.arg'], - }) + }), ), }).dispatch({ type: 'test', @@ -404,7 +404,7 @@ describe('serializableStateInvariantMiddleware', () => { new Tuple( createSerializableStateInvariantMiddleware({ ignoredActionPaths: [/^payload\..*$/], - }) + }), ), }).dispatch({ type: 'test', @@ -519,7 +519,7 @@ describe('serializableStateInvariantMiddleware', () => { return true }, ignoreState: true, - }) + }), ), }) @@ -548,7 +548,7 @@ describe('serializableStateInvariantMiddleware', () => { }, ignoreState: true, ignoreActions: true, - }) + }), ), }) @@ -580,7 +580,7 @@ describe('serializableStateInvariantMiddleware', () => { payload: new Array(10000).fill({ value: 'more' }), }) expect(getLog().log).toMatch( - /^SerializableStateInvariantMiddleware took \d*ms, which is more than the warning threshold of 4ms./ + /^SerializableStateInvariantMiddleware took \d*ms, which is more than the warning threshold of 4ms./, ) }) @@ -626,7 +626,7 @@ describe('serializableStateInvariantMiddleware', () => { }) const state = createNextState([], () => - new Array(50).fill(0).map((x, i) => ({ i })) + new Array(50).fill(0).map((x, i) => ({ i })), ) expect(isNestedFrozen(state)).toBe(true) diff --git a/packages/toolkit/src/tests/utils/CustomMatchers.d.ts b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts index 46a58c74d0..955e51db36 100644 --- a/packages/toolkit/src/tests/utils/CustomMatchers.d.ts +++ b/packages/toolkit/src/tests/utils/CustomMatchers.d.ts @@ -1,11 +1,11 @@ -import type { Assertion, AsymmetricMatchersContaining } from "vitest" +import type { Assertion, AsymmetricMatchersContaining } from 'vitest' interface CustomMatchers { toHaveConsoleOutput(expectedOutput: string): Promise toMatchSequence(...matchers: Array<(arg: any) => boolean>): R } -declare module "vitest" { +declare module 'vitest' { interface Assertion extends CustomMatchers {} interface AsymmetricMatchersContaining extends CustomMatchers {} } @@ -14,4 +14,4 @@ declare global { namespace jest { interface Matchers extends CustomMatchers {} } -} \ No newline at end of file +} diff --git a/packages/toolkit/src/tests/utils/helpers.tsx b/packages/toolkit/src/tests/utils/helpers.tsx index 76fb1bb6a5..5ccedc434d 100644 --- a/packages/toolkit/src/tests/utils/helpers.tsx +++ b/packages/toolkit/src/tests/utils/helpers.tsx @@ -142,7 +142,7 @@ function normalize(str: string) { expect.extend({ async toHaveConsoleOutput( fn: () => void | Promise, - expectedOutput: string + expectedOutput: string, ) { const restore = mockConsole(createConsole()) await fn() @@ -190,7 +190,7 @@ export function setupApiStore< middleware: Middleware util: { resetApiState(): any } }, - R extends Record> = Record + R extends Record> = Record, >( api: A, extraReducers?: R, @@ -201,7 +201,7 @@ export function setupApiStore< prepend?: Middleware[] concat?: Middleware[] } - } = {} + } = {}, ) { const { middleware } = options const getStore = () => diff --git a/packages/toolkit/src/tsHelpers.ts b/packages/toolkit/src/tsHelpers.ts index d4d6a2f3e0..45c90aeaef 100644 --- a/packages/toolkit/src/tsHelpers.ts +++ b/packages/toolkit/src/tsHelpers.ts @@ -87,14 +87,14 @@ export type UnionToIntersection = ( // Appears to have a convenient side effect of ignoring `never` even if that's not what you specified export type ExcludeFromTuple = T extends [ infer Head, - ...infer Tail + ...infer Tail, ] ? ExcludeFromTuple : Acc type ExtractDispatchFromMiddlewareTuple< MiddlewareTuple extends readonly any[], - Acc extends {} + Acc extends {}, > = MiddlewareTuple extends [infer Head, ...infer Tail] ? ExtractDispatchFromMiddlewareTuple< Tail, @@ -102,17 +102,16 @@ type ExtractDispatchFromMiddlewareTuple< > : Acc -export type ExtractDispatchExtensions = M extends Tuple< - infer MiddlewareTuple -> - ? ExtractDispatchFromMiddlewareTuple - : M extends ReadonlyArray - ? ExtractDispatchFromMiddlewareTuple<[...M], {}> - : never +export type ExtractDispatchExtensions = + M extends Tuple + ? ExtractDispatchFromMiddlewareTuple + : M extends ReadonlyArray + ? ExtractDispatchFromMiddlewareTuple<[...M], {}> + : never type ExtractStoreExtensionsFromEnhancerTuple< EnhancerTuple extends readonly any[], - Acc extends {} + Acc extends {}, > = EnhancerTuple extends [infer Head, ...infer Tail] ? ExtractStoreExtensionsFromEnhancerTuple< Tail, @@ -120,21 +119,22 @@ type ExtractStoreExtensionsFromEnhancerTuple< > : Acc -export type ExtractStoreExtensions = E extends Tuple - ? ExtractStoreExtensionsFromEnhancerTuple - : E extends ReadonlyArray - ? UnionToIntersection< - E[number] extends StoreEnhancer - ? Ext extends {} - ? IsAny - : {} - : {} - > - : never +export type ExtractStoreExtensions = + E extends Tuple + ? ExtractStoreExtensionsFromEnhancerTuple + : E extends ReadonlyArray + ? UnionToIntersection< + E[number] extends StoreEnhancer + ? Ext extends {} + ? IsAny + : {} + : {} + > + : never type ExtractStateExtensionsFromEnhancerTuple< EnhancerTuple extends readonly any[], - Acc extends {} + Acc extends {}, > = EnhancerTuple extends [infer Head, ...infer Tail] ? ExtractStateExtensionsFromEnhancerTuple< Tail, @@ -145,17 +145,18 @@ type ExtractStateExtensionsFromEnhancerTuple< > : Acc -export type ExtractStateExtensions = E extends Tuple - ? ExtractStateExtensionsFromEnhancerTuple - : E extends ReadonlyArray - ? UnionToIntersection< - E[number] extends StoreEnhancer - ? StateExt extends {} - ? IsAny - : {} - : {} - > - : never +export type ExtractStateExtensions = + E extends Tuple + ? ExtractStateExtensionsFromEnhancerTuple + : E extends ReadonlyArray + ? UnionToIntersection< + E[number] extends StoreEnhancer + ? StateExt extends {} + ? IsAny + : {} + : {} + > + : never /** * Helper type. Passes T out again, but boxes it in a way that it cannot @@ -185,7 +186,7 @@ export interface HasMatchFunction { } export const hasMatchFunction = ( - v: Matcher + v: Matcher, ): v is HasMatchFunction => { return v && typeof (v as HasMatchFunction).match === 'function' } @@ -194,11 +195,8 @@ export const hasMatchFunction = ( export type Matcher = HasMatchFunction | TypeGuard /** @public */ -export type ActionFromMatcher> = M extends Matcher< - infer T -> - ? T - : never +export type ActionFromMatcher> = + M extends Matcher ? T : never export type Id = { [K in keyof T]: T[K] } & {} @@ -221,7 +219,7 @@ export type SafePromise = Promise & { */ export function asSafePromise( promise: Promise, - fallback: (error: unknown) => Rejected + fallback: (error: unknown) => Rejected, ) { return promise.catch(fallback) as SafePromise } diff --git a/packages/toolkit/src/utils.ts b/packages/toolkit/src/utils.ts index 7dfe43dc3a..11c04ab83c 100644 --- a/packages/toolkit/src/utils.ts +++ b/packages/toolkit/src/utils.ts @@ -29,7 +29,7 @@ export function delay(ms: number) { export function find( iterable: Iterable, - comparator: (item: T) => boolean + comparator: (item: T) => boolean, ): T | undefined { for (const entry of iterable) { if (comparator(entry)) { @@ -55,10 +55,10 @@ export class Tuple = []> extends Array< } concat>( - items: Tuple + items: Tuple, ): Tuple<[...Items, ...AdditionalItems]> concat>( - items: AdditionalItems + items: AdditionalItems, ): Tuple<[...Items, ...AdditionalItems]> concat>( ...items: AdditionalItems @@ -68,10 +68,10 @@ export class Tuple = []> extends Array< } prepend>( - items: Tuple + items: Tuple, ): Tuple<[...AdditionalItems, ...Items]> prepend>( - items: AdditionalItems + items: AdditionalItems, ): Tuple<[...AdditionalItems, ...Items]> prepend>( ...items: AdditionalItems @@ -113,12 +113,12 @@ interface MapEmplaceHandler { export function emplace( map: Map, key: K, - handler: MapEmplaceHandler + handler: MapEmplaceHandler, ): V export function emplace( map: WeakMap, key: K, - handler: WeakMapEmplaceHandler + handler: WeakMapEmplaceHandler, ): V /** * Allow inserting a new value, or updating an existing one @@ -150,7 +150,7 @@ export function emplace( export function emplace( map: WeakMap, key: K, - handler: WeakMapEmplaceHandler + handler: WeakMapEmplaceHandler, ): V { if (map.has(key)) { let value = map.get(key) as V diff --git a/packages/toolkit/tsconfig.json b/packages/toolkit/tsconfig.json index 2c4a93a02e..f485db8fd3 100644 --- a/packages/toolkit/tsconfig.json +++ b/packages/toolkit/tsconfig.json @@ -5,7 +5,7 @@ "extends": "./tsconfig.test.json", "compilerOptions": { "skipLibCheck": true, - "rootDir": "." + "rootDir": ".", }, - "include": ["."] + "include": ["."], } diff --git a/packages/toolkit/tsup.config.ts b/packages/toolkit/tsup.config.ts index 5e43c847b2..a2726e030a 100644 --- a/packages/toolkit/tsup.config.ts +++ b/packages/toolkit/tsup.config.ts @@ -123,7 +123,7 @@ if (process.env.NODE_ENV === 'production') { module.exports = require('./${prefix}.production.min.cjs') } else { module.exports = require('./${prefix}.development.cjs') -}` +}`, ) } @@ -155,7 +155,7 @@ const mangleErrorsTransform: Plugin = { const tsconfig: NonNullable = path.join( __dirname, - './tsconfig.build.json' + './tsconfig.build.json', ) export default defineConfig((options) => { @@ -218,7 +218,7 @@ export default defineConfig((options) => { fs.copyFileSync( 'src/uncheckedindexed.ts', - path.join(outputFolder, 'uncheckedindexed.ts') + path.join(outputFolder, 'uncheckedindexed.ts'), ) } // TODO Copy/generate `.d.mts` files? From b0ce4df6e34832e57095cf3476f225d5680b1a27 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 29 Jan 2024 07:24:33 -0600 Subject: [PATCH 367/368] Format all other files at the root level --- .github/workflows/tests.yml | 12 +- .prettierrc.json | 1 - .yarn/releases/yarn-3.2.4.cjs | 2 +- docs/api/actionCreatorMiddleware.mdx | 2 +- docs/api/combineSlices.mdx | 14 +- docs/api/createAction.mdx | 2 +- docs/api/createAsyncThunk.mdx | 24 +-- docs/api/createDynamicMiddleware.mdx | 10 +- docs/api/createEntityAdapter.mdx | 17 +- docs/api/createListenerMiddleware.mdx | 24 +-- docs/api/createReducer.mdx | 4 +- docs/api/createSelector.mdx | 4 +- docs/api/createSlice.mdx | 21 ++- docs/api/getDefaultEnhancers.mdx | 2 +- docs/api/getDefaultMiddleware.mdx | 2 +- docs/api/matching-utilities.mdx | 12 +- docs/components/DetailedExplanation.jsx | 2 +- docs/rtk-query/api/createApi.mdx | 38 ++-- .../api/created-api/api-slice-utils.mdx | 48 +++-- docs/rtk-query/api/created-api/endpoints.mdx | 12 +- docs/rtk-query/api/created-api/hooks.mdx | 14 +- docs/rtk-query/api/created-api/overview.mdx | 8 +- docs/rtk-query/api/fetchBaseQuery.mdx | 10 +- docs/rtk-query/api/setupListeners.mdx | 6 +- docs/rtk-query/usage-with-typescript.mdx | 8 +- docs/rtk-query/usage/automated-refetching.mdx | 6 +- docs/rtk-query/usage/cache-behavior.mdx | 6 +- docs/rtk-query/usage/code-generation.mdx | 2 +- .../usage/customizing-create-api.mdx | 6 +- docs/rtk-query/usage/customizing-queries.mdx | 53 +++--- docs/rtk-query/usage/manual-cache-updates.mdx | 16 +- .../usage/migrating-to-rtk-query.mdx | 8 +- docs/rtk-query/usage/mutations.mdx | 8 +- docs/rtk-query/usage/polling.mdx | 2 +- docs/rtk-query/usage/prefetching.mdx | 6 +- docs/rtk-query/usage/queries.mdx | 12 +- docs/rtk-query/usage/streaming-updates.mdx | 6 +- .../usage/usage-without-react-hooks.mdx | 4 +- docs/tsconfig.json | 44 ++--- docs/tutorials/rtk-query.mdx | 2 +- docs/usage/migrating-rtk-2.md | 34 ++-- docs/usage/migrating-to-modern-redux.mdx | 6 +- docs/usage/usage-guide.md | 8 +- docs/usage/usage-with-typescript.md | 21 ++- docs/virtual/matchers/index.ts | 14 +- .../action-listener/counter/public/index.html | 16 +- .../ChangeThemeForm/ChangeThemeForm.tsx | 4 +- .../src/components/Counter/Counter.tsx | 4 +- .../components/CounterList/CounterList.tsx | 2 +- .../counter/src/services/counter/listeners.ts | 8 +- .../counter/src/services/counter/slice.ts | 12 +- .../services/counter/tests/listener.test.ts | 22 +-- .../counter/src/services/theme/listeners.ts | 4 +- .../action-listener/counter/tsconfig.json | 12 +- examples/publish-ci/cra4/public/index.html | 2 +- .../src/features/counter/Counter.module.css | 8 +- .../cra4/src/features/counter/counterAPI.ts | 2 +- .../cra4/src/features/counter/counterSlice.ts | 2 +- examples/publish-ci/cra4/src/index.css | 6 +- examples/publish-ci/cra4/src/index.tsx | 4 +- .../publish-ci/cra4/src/mocks/handlers.ts | 2 +- examples/publish-ci/cra4/tsconfig.json | 12 +- examples/publish-ci/cra5/public/index.html | 2 +- .../src/features/counter/Counter.module.css | 8 +- .../cra5/src/features/counter/counterAPI.ts | 2 +- .../cra5/src/features/counter/counterSlice.ts | 2 +- examples/publish-ci/cra5/src/index.css | 6 +- examples/publish-ci/cra5/src/index.tsx | 4 +- .../publish-ci/cra5/src/mocks/handlers.ts | 2 +- examples/publish-ci/cra5/tsconfig.json | 12 +- examples/publish-ci/expo/app.json | 4 +- examples/publish-ci/expo/tsconfig.json | 4 +- .../src/features/counter/Counter.module.css | 8 +- .../next/src/features/counter/counterAPI.ts | 2 +- .../next/src/features/counter/counterSlice.ts | 2 +- .../publish-ci/next/src/mocks/handlers.ts | 2 +- .../publish-ci/next/src/styles/globals.css | 14 +- examples/publish-ci/next/tsconfig.json | 18 +- examples/publish-ci/node-esm/test-cjs.cjs | 2 +- examples/publish-ci/node-esm/test-esm.mjs | 2 +- examples/publish-ci/node-standard/test-cjs.js | 2 +- .../publish-ci/node-standard/test-esm.mjs | 2 +- .../publish-ci/react-native/tsconfig.json | 2 +- examples/publish-ci/vite/index.html | 2 +- .../src/features/counter/Counter.module.css | 8 +- .../vite/src/features/counter/counterAPI.ts | 2 +- .../vite/src/features/counter/counterSlice.ts | 2 +- examples/publish-ci/vite/src/index.css | 6 +- examples/publish-ci/vite/src/main.tsx | 4 +- .../publish-ci/vite/src/mocks/handlers.ts | 2 +- examples/publish-ci/vite/tsconfig.json | 4 +- examples/publish-ci/vite/vite.config.ts | 4 +- .../query/react/advanced/public/index.html | 41 ++-- examples/query/react/advanced/src/Pokemon.tsx | 2 +- examples/query/react/advanced/src/index.tsx | 2 +- examples/query/react/advanced/tsconfig.json | 43 ++--- .../public/index.html | 3 +- .../src/features/auth/authSlice.tsx | 2 +- .../src/index.tsx | 4 +- .../src/mocks/handlers.ts | 6 +- .../tsconfig.json | 13 +- .../react/authentication/public/index.html | 3 +- .../src/features/auth/authSlice.tsx | 4 +- .../query/react/authentication/src/index.tsx | 4 +- .../authentication/src/mocks/handlers.ts | 6 +- .../query/react/authentication/tsconfig.json | 13 +- examples/query/react/basic/public/index.html | 41 ++-- examples/query/react/basic/src/App.test.tsx | 6 +- examples/query/react/basic/src/index.tsx | 4 +- .../query/react/basic/src/test/test-utils.tsx | 2 +- examples/query/react/basic/tsconfig.json | 43 ++--- .../conditional-fetching/public/index.html | 41 ++-- .../conditional-fetching/src/Pokemon.tsx | 2 +- .../react/conditional-fetching/src/index.tsx | 4 +- .../conditional-fetching/src/pokemon.data.ts | 2 +- .../react/conditional-fetching/tsconfig.json | 43 ++--- .../react/deduping-queries/public/index.html | 41 ++-- .../react/deduping-queries/src/Pokemon.tsx | 9 +- .../react/deduping-queries/src/index.tsx | 4 +- .../react/deduping-queries/tsconfig.json | 43 ++--- .../react/graphql-codegen/.introspection.json | 18 +- .../react/graphql-codegen/public/index.html | 3 +- .../src/app/services/types.generated.ts | 177 +++++++++--------- .../src/features/posts/GetPost.generated.ts | 37 ++-- .../src/features/posts/GetPosts.generated.ts | 45 +++-- .../src/features/posts/PostsManager.tsx | 4 +- .../query/react/graphql-codegen/src/index.tsx | 4 +- .../react/graphql-codegen/src/mocks/db.ts | 2 +- .../query/react/graphql-codegen/tsconfig.json | 13 +- .../query/react/graphql/public/index.html | 3 +- .../react/graphql/src/app/services/posts.ts | 6 +- .../src/features/posts/PostsManager.tsx | 4 +- examples/query/react/graphql/src/index.tsx | 4 +- examples/query/react/graphql/src/mocks/db.ts | 9 +- examples/query/react/graphql/tsconfig.json | 13 +- .../react/kitchen-sink/public/index.html | 41 ++-- .../kitchen-sink/src/app/services/api.ts | 2 +- .../kitchen-sink/src/app/services/posts.ts | 2 +- .../query/react/kitchen-sink/src/app/store.ts | 2 +- .../src/features/bundleSplitting/Post.tsx | 5 +- .../features/bundleSplitting/PostsList.tsx | 16 +- .../src/features/counter/Counter.module.css | 8 +- .../src/features/counter/Counter.tsx | 44 +++-- .../src/features/counter/CounterList.tsx | 30 +-- .../src/features/polling/PollingToggles.tsx | 44 +++-- .../src/features/polling/pollingSlice.ts | 50 ++--- .../src/features/time/TimeList.tsx | 102 ++++++---- .../query/react/kitchen-sink/src/index.tsx | 4 +- .../react/kitchen-sink/src/mocks/handlers.ts | 100 +++++----- .../kitchen-sink/src/mocks/setupTests.tsx | 4 +- .../react/kitchen-sink/src/setupTests.ts | 2 +- .../query/react/kitchen-sink/tsconfig.json | 43 ++--- .../query/react/mutations/public/index.html | 41 ++-- examples/query/react/mutations/src/index.tsx | 4 +- .../query/react/mutations/src/mocks/db.ts | 4 +- examples/query/react/mutations/tsconfig.json | 43 ++--- .../react/optimistic-update/public/index.html | 3 +- .../src/app/services/posts.ts | 2 +- .../react/optimistic-update/src/index.tsx | 4 +- .../react/optimistic-update/src/mocks/db.ts | 2 +- .../react/optimistic-update/tsconfig.json | 13 +- .../query/react/pagination/public/index.html | 3 +- .../pagination/src/app/services/posts.ts | 2 +- .../src/features/posts/PostsManager.tsx | 4 +- examples/query/react/pagination/src/index.tsx | 4 +- .../query/react/pagination/src/mocks/db.ts | 2 +- examples/query/react/pagination/tsconfig.json | 13 +- .../query/react/polling/public/index.html | 41 ++-- examples/query/react/polling/src/Pokemon.tsx | 15 +- examples/query/react/polling/src/index.tsx | 2 +- .../query/react/polling/src/pokemon.data.ts | 2 +- examples/query/react/polling/tsconfig.json | 43 ++--- .../public/index.html | 3 +- .../src/app/services/posts.ts | 2 +- .../src/features/posts/PostsManager.tsx | 4 +- .../src/index.tsx | 4 +- .../src/mocks/db.ts | 2 +- .../tsconfig.json | 13 +- .../prefetching-automatic/public/index.html | 3 +- .../src/app/services/posts.ts | 2 +- .../src/features/posts/PostsManager.tsx | 4 +- .../react/prefetching-automatic/src/index.tsx | 4 +- .../prefetching-automatic/src/mocks/db.ts | 2 +- .../react/prefetching-automatic/tsconfig.json | 13 +- .../query/react/prefetching/public/index.html | 3 +- .../prefetching/src/app/services/posts.ts | 2 +- .../src/features/posts/PostsManager.tsx | 4 +- .../query/react/prefetching/src/index.tsx | 4 +- .../query/react/prefetching/src/mocks/db.ts | 2 +- .../query/react/prefetching/tsconfig.json | 13 +- .../react/with-apiprovider/public/index.html | 41 ++-- .../query/react/with-apiprovider/src/App.tsx | 5 +- .../react/with-apiprovider/tsconfig.json | 43 ++--- .../rtk-codemods/.github/workflows/ci.yml | 50 ++--- .../transforms/createReducerBuilder/README.md | 60 +++--- .../transforms/createSliceBuilder/README.md | 76 ++++---- .../rtk-query-codegen-openapi/ChangeLog.md | 10 +- .../rtk-query-codegen-openapi/src/generate.ts | 104 +++++----- .../rtk-query-codegen-openapi/src/types.ts | 2 +- .../src/utils/getOperationDefinitions.ts | 2 +- .../src/utils/isQuery.ts | 2 +- .../test/generateEndpoints.test.ts | 2 +- .../test/tsconfig.json | 6 +- .../rtk-query-codegen-openapi/tsconfig.json | 4 +- .../src/GraphqlBaseQueryTypes.ts | 19 +- .../src/index.ts | 4 +- .../tsconfig.json | 16 +- website/src/css/custom.css | 8 +- website/src/js/monokaiTheme.js | 42 ++--- website/src/pages/styles.module.css | 1 - 210 files changed, 1442 insertions(+), 1479 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ad30e6a04..ee522ce49c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -149,7 +149,17 @@ jobs: fail-fast: false matrix: node: ['18.x'] - example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm', 'react-native', 'expo'] + example: + [ + 'cra4', + 'cra5', + 'next', + 'vite', + 'node-standard', + 'node-esm', + 'react-native', + 'expo', + ] defaults: run: working-directory: ./examples/publish-ci/${{ matrix.example }} diff --git a/.prettierrc.json b/.prettierrc.json index 61ca55dbb6..6ef9e41d05 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,4 +3,3 @@ "singleQuote": true, "endOfLine": "auto" } - \ No newline at end of file diff --git a/.yarn/releases/yarn-3.2.4.cjs b/.yarn/releases/yarn-3.2.4.cjs index 38f17fd49e..f607954682 100644 --- a/.yarn/releases/yarn-3.2.4.cjs +++ b/.yarn/releases/yarn-3.2.4.cjs @@ -1,7 +1,7 @@ #!/usr/bin/env node /* eslint-disable */ //prettier-ignore -(()=>{var nfe=Object.create;var HS=Object.defineProperty;var sfe=Object.getOwnPropertyDescriptor;var ofe=Object.getOwnPropertyNames;var afe=Object.getPrototypeOf,Afe=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)HS(r,t,{get:e[t],enumerable:!0})},lfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ofe(e))!Afe.call(r,n)&&n!==t&&HS(r,n,{get:()=>e[n],enumerable:!(i=sfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?nfe(afe(r)):{},lfe(e||!r||!r.__esModule?HS(t,"default",{value:r,enumerable:!0}):t,r));var ZU=y(($_e,_U)=>{_U.exports=XU;XU.sync=Dfe;var zU=J("fs");function Pfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{r1.exports=e1;e1.sync=kfe;var $U=J("fs");function e1(r,e,t){$U.stat(r,function(i,n){t(i,i?!1:t1(n,e))})}function kfe(r,e){return t1($U.statSync(r),e)}function t1(r,e){return r.isFile()&&Rfe(r,e)}function Rfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var s1=y((rZe,n1)=>{var tZe=J("fs"),RI;process.platform==="win32"||global.TESTING_WINDOWS?RI=ZU():RI=i1();n1.exports=nv;nv.sync=Ffe;function nv(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){nv(r,e||{},function(s,o){s?n(s):i(o)})})}RI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function Ffe(r,e){try{return RI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var g1=y((iZe,u1)=>{var Xg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",o1=J("path"),Nfe=Xg?";":":",a1=s1(),A1=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),l1=(r,e)=>{let t=e.colon||Nfe,i=r.match(/\//)||Xg&&r.match(/\\/)?[""]:[...Xg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xg?n.split(t):[""];return Xg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},c1=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=l1(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(A1(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=o1.join(h,r),m=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(m,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];a1(c+p,{pathExt:s},(m,w)=>{if(!m&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Lfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=l1(r,e),s=[];for(let o=0;o{"use strict";var f1=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};sv.exports=f1;sv.exports.default=f1});var m1=y((sZe,C1)=>{"use strict";var p1=J("path"),Tfe=g1(),Ofe=h1();function d1(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Tfe.sync(r.command,{path:t[Ofe({env:t})],pathExt:e?p1.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=p1.resolve(n?r.options.cwd:"",o)),o}function Mfe(r){return d1(r)||d1(r,!0)}C1.exports=Mfe});var E1=y((oZe,av)=>{"use strict";var ov=/([()\][%!^"`<>&|;, *?])/g;function Kfe(r){return r=r.replace(ov,"^$1"),r}function Ufe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(ov,"^$1"),e&&(r=r.replace(ov,"^$1")),r}av.exports.command=Kfe;av.exports.argument=Ufe});var y1=y((aZe,I1)=>{"use strict";I1.exports=/^#!(.*)/});var B1=y((AZe,w1)=>{"use strict";var Hfe=y1();w1.exports=(r="")=>{let e=r.match(Hfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var b1=y((lZe,Q1)=>{"use strict";var Av=J("fs"),Gfe=B1();function Yfe(r){let t=Buffer.alloc(150),i;try{i=Av.openSync(r,"r"),Av.readSync(i,t,0,150,0),Av.closeSync(i)}catch{}return Gfe(t.toString())}Q1.exports=Yfe});var P1=y((cZe,x1)=>{"use strict";var jfe=J("path"),S1=m1(),v1=E1(),qfe=b1(),Jfe=process.platform==="win32",Wfe=/\.(?:com|exe)$/i,zfe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vfe(r){r.file=S1(r);let e=r.file&&qfe(r.file);return e?(r.args.unshift(r.file),r.command=e,S1(r)):r.file}function Xfe(r){if(!Jfe)return r;let e=Vfe(r),t=!Wfe.test(e);if(r.options.forceShell||t){let i=zfe.test(e);r.command=jfe.normalize(r.command),r.command=v1.command(r.command),r.args=r.args.map(s=>v1.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function _fe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Xfe(i)}x1.exports=_fe});var R1=y((uZe,k1)=>{"use strict";var lv=process.platform==="win32";function cv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Zfe(r,e){if(!lv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=D1(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function D1(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawn"):null}function $fe(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawnSync"):null}k1.exports={hookChildProcess:Zfe,verifyENOENT:D1,verifyENOENTSync:$fe,notFoundError:cv}});var fv=y((gZe,_g)=>{"use strict";var F1=J("child_process"),uv=P1(),gv=R1();function N1(r,e,t){let i=uv(r,e,t),n=F1.spawn(i.command,i.args,i.options);return gv.hookChildProcess(n,i),n}function ehe(r,e,t){let i=uv(r,e,t),n=F1.spawnSync(i.command,i.args,i.options);return n.error=n.error||gv.verifyENOENTSync(n.status,i),n}_g.exports=N1;_g.exports.spawn=N1;_g.exports.sync=ehe;_g.exports._parse=uv;_g.exports._enoent=gv});var T1=y((fZe,L1)=>{"use strict";function the(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function cc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cc)}the(cc,Error);cc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",te=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Kr="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(C){return{type:"argument",segments:[].concat(...C)}},dr=function(C){return C},Bi="$'",_n=de("$'",!1),ga="'",CA=de("'",!1),Dg=function(C){return[{type:"text",text:C}]},Zn='""',mA=de('""',!1),fa=function(){return{type:"text",text:""}},jp='"',EA=de('"',!1),IA=function(C){return C},wr=function(C){return{type:"arithmetic",arithmetic:C,quoted:!0}},zl=function(C){return{type:"shell",shell:C,quoted:!0}},kg=function(C){return{type:"variable",...C,quoted:!0}},mo=function(C){return{type:"text",text:C}},Rg=function(C){return{type:"arithmetic",arithmetic:C,quoted:!1}},qp=function(C){return{type:"shell",shell:C,quoted:!1}},Jp=function(C){return{type:"variable",...C,quoted:!1}},xr=function(C){return{type:"glob",pattern:C}},oe=/^[^']/,Eo=Ye(["'"],!0,!1),Dn=function(C){return C.join("")},Fg=/^[^$"]/,Qt=Ye(["$",'"'],!0,!1),Vl=`\\ +;(()=>{var nfe=Object.create;var HS=Object.defineProperty;var sfe=Object.getOwnPropertyDescriptor;var ofe=Object.getOwnPropertyNames;var afe=Object.getPrototypeOf,Afe=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)HS(r,t,{get:e[t],enumerable:!0})},lfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ofe(e))!Afe.call(r,n)&&n!==t&&HS(r,n,{get:()=>e[n],enumerable:!(i=sfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?nfe(afe(r)):{},lfe(e||!r||!r.__esModule?HS(t,"default",{value:r,enumerable:!0}):t,r));var ZU=y(($_e,_U)=>{_U.exports=XU;XU.sync=Dfe;var zU=J("fs");function Pfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{r1.exports=e1;e1.sync=kfe;var $U=J("fs");function e1(r,e,t){$U.stat(r,function(i,n){t(i,i?!1:t1(n,e))})}function kfe(r,e){return t1($U.statSync(r),e)}function t1(r,e){return r.isFile()&&Rfe(r,e)}function Rfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var s1=y((rZe,n1)=>{var tZe=J("fs"),RI;process.platform==="win32"||global.TESTING_WINDOWS?RI=ZU():RI=i1();n1.exports=nv;nv.sync=Ffe;function nv(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){nv(r,e||{},function(s,o){s?n(s):i(o)})})}RI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function Ffe(r,e){try{return RI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var g1=y((iZe,u1)=>{var Xg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",o1=J("path"),Nfe=Xg?";":":",a1=s1(),A1=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),l1=(r,e)=>{let t=e.colon||Nfe,i=r.match(/\//)||Xg&&r.match(/\\/)?[""]:[...Xg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xg?n.split(t):[""];return Xg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},c1=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=l1(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(A1(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=o1.join(h,r),m=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(m,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];a1(c+p,{pathExt:s},(m,w)=>{if(!m&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Lfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=l1(r,e),s=[];for(let o=0;o{"use strict";var f1=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};sv.exports=f1;sv.exports.default=f1});var m1=y((sZe,C1)=>{"use strict";var p1=J("path"),Tfe=g1(),Ofe=h1();function d1(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Tfe.sync(r.command,{path:t[Ofe({env:t})],pathExt:e?p1.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=p1.resolve(n?r.options.cwd:"",o)),o}function Mfe(r){return d1(r)||d1(r,!0)}C1.exports=Mfe});var E1=y((oZe,av)=>{"use strict";var ov=/([()\][%!^"`<>&|;, *?])/g;function Kfe(r){return r=r.replace(ov,"^$1"),r}function Ufe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(ov,"^$1"),e&&(r=r.replace(ov,"^$1")),r}av.exports.command=Kfe;av.exports.argument=Ufe});var y1=y((aZe,I1)=>{"use strict";I1.exports=/^#!(.*)/});var B1=y((AZe,w1)=>{"use strict";var Hfe=y1();w1.exports=(r="")=>{let e=r.match(Hfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var b1=y((lZe,Q1)=>{"use strict";var Av=J("fs"),Gfe=B1();function Yfe(r){let t=Buffer.alloc(150),i;try{i=Av.openSync(r,"r"),Av.readSync(i,t,0,150,0),Av.closeSync(i)}catch{}return Gfe(t.toString())}Q1.exports=Yfe});var P1=y((cZe,x1)=>{"use strict";var jfe=J("path"),S1=m1(),v1=E1(),qfe=b1(),Jfe=process.platform==="win32",Wfe=/\.(?:com|exe)$/i,zfe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vfe(r){r.file=S1(r);let e=r.file&&qfe(r.file);return e?(r.args.unshift(r.file),r.command=e,S1(r)):r.file}function Xfe(r){if(!Jfe)return r;let e=Vfe(r),t=!Wfe.test(e);if(r.options.forceShell||t){let i=zfe.test(e);r.command=jfe.normalize(r.command),r.command=v1.command(r.command),r.args=r.args.map(s=>v1.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function _fe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Xfe(i)}x1.exports=_fe});var R1=y((uZe,k1)=>{"use strict";var lv=process.platform==="win32";function cv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Zfe(r,e){if(!lv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=D1(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function D1(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawn"):null}function $fe(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawnSync"):null}k1.exports={hookChildProcess:Zfe,verifyENOENT:D1,verifyENOENTSync:$fe,notFoundError:cv}});var fv=y((gZe,_g)=>{"use strict";var F1=J("child_process"),uv=P1(),gv=R1();function N1(r,e,t){let i=uv(r,e,t),n=F1.spawn(i.command,i.args,i.options);return gv.hookChildProcess(n,i),n}function ehe(r,e,t){let i=uv(r,e,t),n=F1.spawnSync(i.command,i.args,i.options);return n.error=n.error||gv.verifyENOENTSync(n.status,i),n}_g.exports=N1;_g.exports.spawn=N1;_g.exports.sync=ehe;_g.exports._parse=uv;_g.exports._enoent=gv});var T1=y((fZe,L1)=>{"use strict";function the(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function cc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cc)}the(cc,Error);cc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",te=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Kr="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(C){return{type:"argument",segments:[].concat(...C)}},dr=function(C){return C},Bi="$'",_n=de("$'",!1),ga="'",CA=de("'",!1),Dg=function(C){return[{type:"text",text:C}]},Zn='""',mA=de('""',!1),fa=function(){return{type:"text",text:""}},jp='"',EA=de('"',!1),IA=function(C){return C},wr=function(C){return{type:"arithmetic",arithmetic:C,quoted:!0}},zl=function(C){return{type:"shell",shell:C,quoted:!0}},kg=function(C){return{type:"variable",...C,quoted:!0}},mo=function(C){return{type:"text",text:C}},Rg=function(C){return{type:"arithmetic",arithmetic:C,quoted:!1}},qp=function(C){return{type:"shell",shell:C,quoted:!1}},Jp=function(C){return{type:"variable",...C,quoted:!1}},xr=function(C){return{type:"glob",pattern:C}},oe=/^[^']/,Eo=Ye(["'"],!0,!1),Dn=function(C){return C.join("")},Fg=/^[^$"]/,Qt=Ye(["$",'"'],!0,!1),Vl=`\\ `,kn=de(`\\ `,!1),$n=function(){return""},es="\\",ut=de("\\",!1),Io=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(C){return C},S="\\a",Tt=de("\\a",!1),Ng=function(){return"a"},Xl="\\b",Wp=de("\\b",!1),zp=function(){return"\b"},Vp=/^[Ee]/,Xp=Ye(["E","e"],!1,!1),_p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),yA=function(){return"\f"},Wi="\\n",_l=de("\\n",!1),We=function(){return` `},ha="\\r",Lg=de("\\r",!1),oI=function(){return"\r"},Zp="\\t",aI=de("\\t",!1),ar=function(){return" "},Rn="\\v",Zl=de("\\v",!1),$p=function(){return"\v"},Ms=/^[\\'"?]/,pa=Ye(["\\","'",'"',"?"],!1,!1),cn=function(C){return String.fromCharCode(parseInt(C,16))},De="\\x",Tg=de("\\x",!1),$l="\\u",Ks=de("\\u",!1),ec="\\U",wA=de("\\U",!1),Og=function(C){return String.fromCodePoint(parseInt(C,16))},Mg=/^[0-7]/,da=Ye([["0","7"]],!1,!1),Ca=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),yo=rt(),BA="-",tc=de("-",!1),Us="+",rc=de("+",!1),AI=".",ed=de(".",!1),Kg=function(C,b,N){return{type:"number",value:(C==="-"?-1:1)*parseFloat(b.join("")+"."+N.join(""))}},td=function(C,b){return{type:"number",value:(C==="-"?-1:1)*parseInt(b.join(""))}},lI=function(C){return{type:"variable",...C}},ic=function(C){return{type:"variable",name:C}},cI=function(C){return C},Ug="*",QA=de("*",!1),Rr="/",uI=de("/",!1),Hs=function(C,b,N){return{type:b==="*"?"multiplication":"division",right:N}},Gs=function(C,b){return b.reduce((N,U)=>({left:N,...U}),C)},Hg=function(C,b,N){return{type:b==="+"?"addition":"subtraction",right:N}},bA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(C){return C},xe="$(",qe=de("$(",!1),dt=function(C){return C},Ft="${",Fn=de("${",!1),QS=":-",tU=de(":-",!1),rU=function(C,b){return{name:C,defaultValue:b}},bS=":-}",iU=de(":-}",!1),nU=function(C){return{name:C,defaultValue:[]}},SS=":+",sU=de(":+",!1),oU=function(C,b){return{name:C,alternativeValue:b}},vS=":+}",aU=de(":+}",!1),AU=function(C){return{name:C,alternativeValue:[]}},xS=function(C){return{name:C}},lU="$",cU=de("$",!1),uU=function(C){return e.isGlobPattern(C)},gU=function(C){return C},PS=/^[a-zA-Z0-9_]/,DS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),kS=function(){return O()},RS=/^[$@*?#a-zA-Z0-9_\-]/,FS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),fU=/^[(){}<>$|&; \t"']/,Gg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),NS=/^[<>&; \t"']/,LS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),gI=/^[ \t]/,fI=Ye([" "," "],!1,!1),Q=0,Re=0,SA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Re,Q)}function X(){return Et(Re,Q)}function ee(C,b){throw b=b!==void 0?b:Et(Re,Q),Fi([At(C)],r.substring(Re,Q),b)}function ye(C,b){throw b=b!==void 0?b:Et(Re,Q),Nn(C,b)}function de(C,b){return{type:"literal",text:C,ignoreCase:b}}function Ye(C,b,N){return{type:"class",parts:C,inverted:b,ignoreCase:N}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(C){return{type:"other",description:C}}function et(C){var b=SA[C],N;if(b)return b;for(N=C-1;!SA[N];)N--;for(b=SA[N],b={line:b.line,column:b.column};Nd&&(d=Q,E=[]),E.push(C))}function Nn(C,b){return new cc(C,null,null,b)}function Fi(C,b,N){return new cc(cc.buildMessage(C,b),C,b,N)}function vA(){var C,b;return C=Q,b=Ur(),b===t&&(b=null),b!==t&&(Re=C,b=s(b)),C=b,C}function Ur(){var C,b,N,U,ce;if(C=Q,b=Hr(),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();N!==t?(U=ma(),U!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Re=C,b=o(b,U,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;if(C===t)if(C=Q,b=Hr(),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();N!==t?(U=ma(),U===t&&(U=null),U!==t?(Re=C,b=a(b,U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;return C}function ts(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=Ur(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=l(N),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;return C}function ma(){var C;return r.charCodeAt(Q)===59?(C=c,Q++):(C=t,I===0&&Be(u)),C===t&&(r.charCodeAt(Q)===38?(C=g,Q++):(C=t,I===0&&Be(f))),C}function Hr(){var C,b,N;return C=Q,b=hU(),b!==t?(N=Hge(),N===t&&(N=null),N!==t?(Re=C,b=h(b,N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function Hge(){var C,b,N,U,ce,be,ft;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=Gge(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Hr(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=p(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;return C}function Gge(){var C;return r.substr(Q,2)===m?(C=m,Q+=2):(C=t,I===0&&Be(w)),C===t&&(r.substr(Q,2)===B?(C=B,Q+=2):(C=t,I===0&&Be(v))),C}function hU(){var C,b,N;return C=Q,b=qge(),b!==t?(N=Yge(),N===t&&(N=null),N!==t?(Re=C,b=D(b,N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function Yge(){var C,b,N,U,ce,be,ft;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=jge(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=hU(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=F(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;return C}function jge(){var C;return r.substr(Q,2)===H?(C=H,Q+=2):(C=t,I===0&&Be(j)),C===t&&(r.charCodeAt(Q)===124?(C=$,Q++):(C=t,I===0&&Be(z))),C}function hI(){var C,b,N,U,ce,be;if(C=Q,b=SU(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Be(Z)),N!==t)if(U=CU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(Re=C,b=A(b,U),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;else Q=C,C=t;if(C===t)if(C=Q,b=SU(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Be(Z)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=ae(b),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;return C}function qge(){var C,b,N,U,ce,be,ft,Bt,Vr,Ci,rs;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(r.charCodeAt(Q)===40?(N=ue,Q++):(N=t,I===0&&Be(_)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===41?(ft=T,Q++):(ft=t,I===0&&Be(L)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=C,b=ge(ce,Vr),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(r.charCodeAt(Q)===123?(N=we,Q++):(N=t,I===0&&Be(Le)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===125?(ft=Pe,Q++):(ft=t,I===0&&Be(Te)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=C,b=se(ce,Vr),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){for(N=[],U=hI();U!==t;)N.push(U),U=hI();if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t){if(ce=[],be=dU(),be!==t)for(;be!==t;)ce.push(be),be=dU();else ce=t;if(ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=Ae(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){if(N=[],U=hI(),U!==t)for(;U!==t;)N.push(U),U=hI();else N=t;if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=Qe(N),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}}}return C}function pU(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){if(N=[],U=pI(),U!==t)for(;U!==t;)N.push(U),U=pI();else N=t;if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=fe(N),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t;return C}function dU(){var C,b,N;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t?(N=rd(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();b!==t?(N=pI(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t)}return C}function rd(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();return b!==t?(Ge.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(ie)),N===t&&(N=null),N!==t?(U=Jge(),U!==t?(ce=pI(),ce!==t?(Re=C,b=Y(N,U,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function Jge(){var C;return r.substr(Q,2)===he?(C=he,Q+=2):(C=t,I===0&&Be(te)),C===t&&(r.substr(Q,2)===me?(C=me,Q+=2):(C=t,I===0&&Be(tt)),C===t&&(r.charCodeAt(Q)===62?(C=Rt,Q++):(C=t,I===0&&Be(It)),C===t&&(r.substr(Q,3)===Kr?(C=Kr,Q+=3):(C=t,I===0&&Be(oi)),C===t&&(r.substr(Q,2)===pi?(C=pi,Q+=2):(C=t,I===0&&Be(pr)),C===t&&(r.charCodeAt(Q)===60?(C=di,Q++):(C=t,I===0&&Be(ai))))))),C}function pI(){var C,b,N;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();return b!==t?(N=CU(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function CU(){var C,b,N;if(C=Q,b=[],N=mU(),N!==t)for(;N!==t;)b.push(N),N=mU();else b=t;return b!==t&&(Re=C,b=Os(b)),C=b,C}function mU(){var C,b;return C=Q,b=Wge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=zge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=Vge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=Xge(),b!==t&&(Re=C,b=dr(b)),C=b))),C}function Wge(){var C,b,N,U;return C=Q,r.substr(Q,2)===Bi?(b=Bi,Q+=2):(b=t,I===0&&Be(_n)),b!==t?(N=$ge(),N!==t?(r.charCodeAt(Q)===39?(U=ga,Q++):(U=t,I===0&&Be(CA)),U!==t?(Re=C,b=Dg(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function zge(){var C,b,N,U;return C=Q,r.charCodeAt(Q)===39?(b=ga,Q++):(b=t,I===0&&Be(CA)),b!==t?(N=_ge(),N!==t?(r.charCodeAt(Q)===39?(U=ga,Q++):(U=t,I===0&&Be(CA)),U!==t?(Re=C,b=Dg(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function Vge(){var C,b,N,U;if(C=Q,r.substr(Q,2)===Zn?(b=Zn,Q+=2):(b=t,I===0&&Be(mA)),b!==t&&(Re=C,b=fa()),C=b,C===t)if(C=Q,r.charCodeAt(Q)===34?(b=jp,Q++):(b=t,I===0&&Be(EA)),b!==t){for(N=[],U=EU();U!==t;)N.push(U),U=EU();N!==t?(r.charCodeAt(Q)===34?(U=jp,Q++):(U=t,I===0&&Be(EA)),U!==t?(Re=C,b=IA(N),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;return C}function Xge(){var C,b,N;if(C=Q,b=[],N=IU(),N!==t)for(;N!==t;)b.push(N),N=IU();else b=t;return b!==t&&(Re=C,b=IA(b)),C=b,C}function EU(){var C,b;return C=Q,b=QU(),b!==t&&(Re=C,b=wr(b)),C=b,C===t&&(C=Q,b=bU(),b!==t&&(Re=C,b=zl(b)),C=b,C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=kg(b)),C=b,C===t&&(C=Q,b=Zge(),b!==t&&(Re=C,b=mo(b)),C=b))),C}function IU(){var C,b;return C=Q,b=QU(),b!==t&&(Re=C,b=Rg(b)),C=b,C===t&&(C=Q,b=bU(),b!==t&&(Re=C,b=qp(b)),C=b,C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=Jp(b)),C=b,C===t&&(C=Q,b=rfe(),b!==t&&(Re=C,b=xr(b)),C=b,C===t&&(C=Q,b=tfe(),b!==t&&(Re=C,b=mo(b)),C=b)))),C}function _ge(){var C,b,N;for(C=Q,b=[],oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo));N!==t;)b.push(N),oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo));return b!==t&&(Re=C,b=Dn(b)),C=b,C}function Zge(){var C,b,N;if(C=Q,b=[],N=yU(),N===t&&(Fg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Qt))),N!==t)for(;N!==t;)b.push(N),N=yU(),N===t&&(Fg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Qt)));else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function yU(){var C,b,N;return C=Q,r.substr(Q,2)===Vl?(b=Vl,Q+=2):(b=t,I===0&&Be(kn)),b!==t&&(Re=C,b=$n()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Io.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(at)),N!==t?(Re=C,b=ln(N),C=b):(Q=C,C=t)):(Q=C,C=t)),C}function $ge(){var C,b,N;for(C=Q,b=[],N=wU(),N===t&&(oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo)));N!==t;)b.push(N),N=wU(),N===t&&(oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo)));return b!==t&&(Re=C,b=Dn(b)),C=b,C}function wU(){var C,b,N;return C=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Be(Tt)),b!==t&&(Re=C,b=Ng()),C=b,C===t&&(C=Q,r.substr(Q,2)===Xl?(b=Xl,Q+=2):(b=t,I===0&&Be(Wp)),b!==t&&(Re=C,b=zp()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Vp.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Xp)),N!==t?(Re=C,b=_p(),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Be(yt)),b!==t&&(Re=C,b=yA()),C=b,C===t&&(C=Q,r.substr(Q,2)===Wi?(b=Wi,Q+=2):(b=t,I===0&&Be(_l)),b!==t&&(Re=C,b=We()),C=b,C===t&&(C=Q,r.substr(Q,2)===ha?(b=ha,Q+=2):(b=t,I===0&&Be(Lg)),b!==t&&(Re=C,b=oI()),C=b,C===t&&(C=Q,r.substr(Q,2)===Zp?(b=Zp,Q+=2):(b=t,I===0&&Be(aI)),b!==t&&(Re=C,b=ar()),C=b,C===t&&(C=Q,r.substr(Q,2)===Rn?(b=Rn,Q+=2):(b=t,I===0&&Be(Zl)),b!==t&&(Re=C,b=$p()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Ms.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(pa)),N!==t?(Re=C,b=ln(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=efe()))))))))),C}function efe(){var C,b,N,U,ce,be,ft,Bt,Vr,Ci,rs,US;return C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(N=TS(),N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===De?(b=De,Q+=2):(b=t,I===0&&Be(Tg)),b!==t?(N=Q,U=Q,ce=TS(),ce!==t?(be=Ln(),be!==t?(ce=[ce,be],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=TS()),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===$l?(b=$l,Q+=2):(b=t,I===0&&Be(Ks)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(be=Ln(),be!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(ce=[ce,be,ft,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===ec?(b=ec,Q+=2):(b=t,I===0&&Be(wA)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(be=Ln(),be!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(Vr=Ln(),Vr!==t?(Ci=Ln(),Ci!==t?(rs=Ln(),rs!==t?(US=Ln(),US!==t?(ce=[ce,be,ft,Bt,Vr,Ci,rs,US],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=Og(N),C=b):(Q=C,C=t)):(Q=C,C=t)))),C}function TS(){var C;return Mg.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(da)),C}function Ln(){var C;return Ca.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be($e)),C}function tfe(){var C,b,N,U,ce;if(C=Q,b=[],N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=vU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t)),N!==t)for(;N!==t;)b.push(N),N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=vU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t));else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function OS(){var C,b,N,U,ce,be;if(C=Q,r.charCodeAt(Q)===45?(b=BA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(N=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)N.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else N=t;if(N!==t)if(r.charCodeAt(Q)===46?(U=AI,Q++):(U=t,I===0&&Be(ed)),U!==t){if(ce=[],Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie)),be!==t)for(;be!==t;)ce.push(be),Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie));else ce=t;ce!==t?(Re=C,b=Kg(b,N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;if(C===t){if(C=Q,r.charCodeAt(Q)===45?(b=BA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(N=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)N.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else N=t;N!==t?(Re=C,b=td(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;if(C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=lI(b)),C=b,C===t&&(C=Q,b=nc(),b!==t&&(Re=C,b=ic(b)),C=b,C===t)))if(C=Q,r.charCodeAt(Q)===40?(b=ue,Q++):(b=t,I===0&&Be(_)),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();if(N!==t)if(U=BU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.charCodeAt(Q)===41?(be=T,Q++):(be=t,I===0&&Be(L)),be!==t?(Re=C,b=cI(U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t}return C}function MS(){var C,b,N,U,ce,be,ft,Bt;if(C=Q,b=OS(),b!==t){for(N=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(QA)),be===t&&(r.charCodeAt(Q)===47?(be=Rr,Q++):(be=t,I===0&&Be(uI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=OS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(QA)),be===t&&(r.charCodeAt(Q)===47?(be=Rr,Q++):(be=t,I===0&&Be(uI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=OS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Re=C,b=Gs(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;return C}function BU(){var C,b,N,U,ce,be,ft,Bt;if(C=Q,b=MS(),b!==t){for(N=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=BA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=BA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Re=C,b=Gs(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;return C}function QU(){var C,b,N,U,ce,be;if(C=Q,r.substr(Q,3)===bA?(b=bA,Q+=3):(b=t,I===0&&Be(R)),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();if(N!==t)if(U=BU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.substr(Q,2)===q?(be=q,Q+=2):(be=t,I===0&&Be(pe)),be!==t?(Re=C,b=Ne(U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;return C}function bU(){var C,b,N,U;return C=Q,r.substr(Q,2)===xe?(b=xe,Q+=2):(b=t,I===0&&Be(qe)),b!==t?(N=Ur(),N!==t?(r.charCodeAt(Q)===41?(U=T,Q++):(U=t,I===0&&Be(L)),U!==t?(Re=C,b=dt(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function KS(){var C,b,N,U,ce,be;return C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,2)===QS?(U=QS,Q+=2):(U=t,I===0&&Be(tU)),U!==t?(ce=pU(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=C,b=rU(N,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,3)===bS?(U=bS,Q+=3):(U=t,I===0&&Be(iU)),U!==t?(Re=C,b=nU(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,2)===SS?(U=SS,Q+=2):(U=t,I===0&&Be(sU)),U!==t?(ce=pU(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=C,b=oU(N,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,3)===vS?(U=vS,Q+=3):(U=t,I===0&&Be(aU)),U!==t?(Re=C,b=AU(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.charCodeAt(Q)===125?(U=Pe,Q++):(U=t,I===0&&Be(Te)),U!==t?(Re=C,b=xS(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.charCodeAt(Q)===36?(b=lU,Q++):(b=t,I===0&&Be(cU)),b!==t?(N=nc(),N!==t?(Re=C,b=xS(N),C=b):(Q=C,C=t)):(Q=C,C=t)))))),C}function rfe(){var C,b,N;return C=Q,b=ife(),b!==t?(Re=Q,N=uU(b),N?N=void 0:N=t,N!==t?(Re=C,b=gU(b),C=b):(Q=C,C=t)):(Q=C,C=t),C}function ife(){var C,b,N,U,ce;if(C=Q,b=[],N=Q,U=Q,I++,ce=xU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N!==t)for(;N!==t;)b.push(N),N=Q,U=Q,I++,ce=xU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t);else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function SU(){var C,b,N;if(C=Q,b=[],PS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(DS)),N!==t)for(;N!==t;)b.push(N),PS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(DS));else b=t;return b!==t&&(Re=C,b=kS()),C=b,C}function nc(){var C,b,N;if(C=Q,b=[],RS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(FS)),N!==t)for(;N!==t;)b.push(N),RS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(FS));else b=t;return b!==t&&(Re=C,b=kS()),C=b,C}function vU(){var C;return fU.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(Gg)),C}function xU(){var C;return NS.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(LS)),C}function Me(){var C,b;if(C=[],gI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(fI)),b!==t)for(;b!==t;)C.push(b),gI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(fI));else C=t;return C}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function ihe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function gc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}ihe(gc,Error);gc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Te(ie,Y){return new gc(ie,null,null,Y)}function se(ie,Y,he){return new gc(gc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,te;return ie=v,Y=Qe(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(te=Qe(),te!==t?(D=ie,Y=a(Y,te),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=Qe(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function Qe(){var ie,Y,he,te;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(te=Ge(),te!==t?(D=ie,Y=g(Y,te),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,te,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(te=s,v++):(te=t,$===0&&Pe(o)),te!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(m)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(m));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(z=n(),z!==t&&v===r.length)return z;throw z!==t&&v{"use strict";function H1(r){return typeof r>"u"||r===null}function she(r){return typeof r=="object"&&r!==null}function ohe(r){return Array.isArray(r)?r:H1(r)?[]:[r]}function ahe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function dd(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}dd.prototype=Object.create(Error.prototype);dd.prototype.constructor=dd;dd.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};G1.exports=dd});var q1=y((kZe,j1)=>{"use strict";var Y1=hc();function Ev(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}Ev.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r diff --git a/docs/api/actionCreatorMiddleware.mdx b/docs/api/actionCreatorMiddleware.mdx index 50570ae109..7378947a1e 100644 --- a/docs/api/actionCreatorMiddleware.mdx +++ b/docs/api/actionCreatorMiddleware.mdx @@ -53,7 +53,7 @@ import reducer from './reducer' // Augment middleware to consider all functions with a static type property to be action creators const isActionCreator = ( - action: unknown + action: unknown, ): action is Function & { type: unknown } => typeof action === 'function' && 'type' in action diff --git a/docs/api/combineSlices.mdx b/docs/api/combineSlices.mdx index b308a0e36f..81f8cb168a 100644 --- a/docs/api/combineSlices.mdx +++ b/docs/api/combineSlices.mdx @@ -235,7 +235,7 @@ declare module '.' { const withInjected = rootReducer.inject( { reducerPath: 'removable', reducer: removableReducer }, - { overrideExisting: true } + { overrideExisting: true }, ) const emptyReducer = () => null @@ -243,7 +243,7 @@ const emptyReducer = () => null const removeReducer = () => rootReducer.inject( { reducerPath: 'removable', reducer: emptyReducer }, - { overrideExisting: true } + { overrideExisting: true }, ) ``` @@ -273,14 +273,14 @@ const withCounter = rootReducer.inject(counterSlice) const selectCounterValue = (rootState: RootState) => rootState.counter?.value // number | undefined const wrappedSelectCounterValue = withCounter.selector( - (rootState) => rootState.counter.value // number + (rootState) => rootState.counter.value, // number ) console.log( selectCounterValue({}), // undefined selectCounterValue({ counter: { value: 2 } }), // 2 wrappedSelectCounterValue({}), // 0 - wrappedSelectCounterValue({ counter: { value: 2 } }) // 2 + wrappedSelectCounterValue({ counter: { value: 2 } }), // 2 ) ``` @@ -303,7 +303,7 @@ interface RootState { const selectCounterValue = withCounter.selector( (combinedState) => combinedState.counter.value, - (rootState: RootState) => rootState.innerCombined + (rootState: RootState) => rootState.innerCombined, ) console.log( @@ -316,7 +316,7 @@ console.log( value: 2, }, }, - }) // 2 + }), // 2 ) ``` @@ -365,6 +365,6 @@ If the slice state is undefined in the store state passed, the selector will ins console.log( injectedCounterSlice.selectors.selectValue({}), // 0 injectedCounterSlice.selectors.selectValue({ counter: { value: 2 } }), // 2 - aCounterSlice.selectors.selectValue({ aCounter: { value: 2 } }) // 2 + aCounterSlice.selectors.selectValue({ aCounter: { value: 2 } }), // 2 ) ``` diff --git a/docs/api/createAction.mdx b/docs/api/createAction.mdx index 15776024ae..6fbec5d955 100644 --- a/docs/api/createAction.mdx +++ b/docs/api/createAction.mdx @@ -148,6 +148,6 @@ export const epic = (actions$: Observable) => map((action) => { // action.payload can be safely used as number here (and will also be correctly inferred by TypeScript) // ... - }) + }), ) ``` diff --git a/docs/api/createAsyncThunk.mdx b/docs/api/createAsyncThunk.mdx index e837148300..67cdd33984 100644 --- a/docs/api/createAsyncThunk.mdx +++ b/docs/api/createAsyncThunk.mdx @@ -35,7 +35,7 @@ const fetchUserById = createAsyncThunk( async (userId: number, thunkAPI) => { const response = await userAPI.fetchById(userId) return response.data - } + }, ) interface UsersState { @@ -190,23 +190,23 @@ interface RejectedWithValueAction { type Pending = ( requestId: string, - arg: ThunkArg + arg: ThunkArg, ) => PendingAction type Fulfilled = ( payload: PromiseResult, requestId: string, - arg: ThunkArg + arg: ThunkArg, ) => FulfilledAction type Rejected = ( requestId: string, - arg: ThunkArg + arg: ThunkArg, ) => RejectedAction type RejectedWithValue = ( requestId: string, - arg: ThunkArg + arg: ThunkArg, ) => RejectedWithValueAction ``` @@ -365,7 +365,7 @@ const updateUser = createAsyncThunk( // by explicitly returning it using the `rejectWithValue()` utility return rejectWithValue(err.response.data) } - } + }, ) ``` @@ -391,7 +391,7 @@ const fetchUserById = createAsyncThunk( return false } }, - } + }, ) ``` @@ -419,7 +419,7 @@ export const fetchUserById = createAsyncThunk( 'fetchUserById', (userId: string) => { /* ... */ - } + }, ) // file: MyComponent.ts @@ -456,7 +456,7 @@ const fetchUserById = createAsyncThunk( signal: thunkAPI.signal, }) return await response.json() - } + }, ) ``` @@ -486,7 +486,7 @@ const readStream = createAsyncThunk( done = read.done } return result - } + }, ) ``` @@ -510,7 +510,7 @@ const fetchUserById = createAsyncThunk( cancelToken: source.token, }) return response.data - } + }, ) ``` @@ -749,7 +749,7 @@ const UsersComponent = (props: { id: string }) => { // This is an example of an onSubmit handler using Formik meant to demonstrate accessing the payload of the rejected action const handleUpdateUser = async ( values: FormValues, - formikHelpers: FormikHelpers + formikHelpers: FormikHelpers, ) => { const resultAction = await dispatch(updateUser({ id: props.id, ...values })) if (updateUser.fulfilled.match(resultAction)) { diff --git a/docs/api/createDynamicMiddleware.mdx b/docs/api/createDynamicMiddleware.mdx index 2f2150f2b6..199e8418a4 100644 --- a/docs/api/createDynamicMiddleware.mdx +++ b/docs/api/createDynamicMiddleware.mdx @@ -80,7 +80,7 @@ The "dynamic middleware instance" returned from `createDynamicMiddleware` is an ```ts no-transpile export type DynamicMiddlewareInstance< State = unknown, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > = { middleware: DynamicMiddleware addMiddleware: AddMiddleware @@ -116,7 +116,7 @@ Accepts a set of middleware, and creates an action. When dispatched, it injects ```ts no-transpile const listenerDispatch = store.dispatch( - withMiddleware(listenerMiddleware.middleware) + withMiddleware(listenerMiddleware.middleware), ) const unsubscribe = listenerDispatch(addListener({ type, effect })) @@ -131,7 +131,7 @@ _These depend on having `react-redux` installed._ ```ts no-transpile interface ReactDynamicMiddlewareInstance< State = any, - Dispatch extends ReduxDispatch = ReduxDispatch + Dispatch extends ReduxDispatch = ReduxDispatch, > extends DynamicMiddlewareInstance { createDispatchWithMiddlewareHook: CreateDispatchWithMiddlewareHook< State, @@ -140,7 +140,7 @@ interface ReactDynamicMiddlewareInstance< createDispatchWithMiddlewareHookFactory: ( context?: Context< ReactReduxContextValue> - > + >, ) => CreateDispatchWithMiddlewareHook } ``` @@ -151,7 +151,7 @@ Accepts a set of middleware, and returns a [`useDispatch`](https://react-redux.j ```ts no-transpile const useListenerDispatch = createDispatchWithMiddlewareHook( - listenerInstance.middleware + listenerInstance.middleware, ) const Component = () => { diff --git a/docs/api/createEntityAdapter.mdx b/docs/api/createEntityAdapter.mdx index 4b9cbc4134..ffd7d19ede 100644 --- a/docs/api/createEntityAdapter.mdx +++ b/docs/api/createEntityAdapter.mdx @@ -82,7 +82,7 @@ console.log(store.getState().books) // Can create a set of memoized selectors based on the location of this entity state const booksSelectors = booksAdapter.getSelectors( - (state) => state.books + (state) => state.books, ) // And then use the selectors to retrieve values @@ -148,7 +148,7 @@ export interface EntityStateAdapter { removeMany>(state: S, keys: EntityId[]): S removeMany>( state: S, - keys: PayloadAction + keys: PayloadAction, ): S removeAll>(state: S): S @@ -156,13 +156,13 @@ export interface EntityStateAdapter { updateOne>(state: S, update: Update): S updateOne>( state: S, - update: PayloadAction> + update: PayloadAction>, ): S updateMany>(state: S, updates: Update[]): S updateMany>( state: S, - updates: PayloadAction[]> + updates: PayloadAction[]>, ): S upsertOne>(state: S, entity: T): S @@ -171,7 +171,7 @@ export interface EntityStateAdapter { upsertMany>(state: S, entities: T[]): S upsertMany>( state: S, - entities: PayloadAction + entities: PayloadAction, ): S } @@ -190,7 +190,7 @@ export interface EntityAdapter extends EntityStateAdapter { getInitialState(state: S): EntityState & S getSelectors(): EntitySelectors> getSelectors( - selectState: (state: V) => EntityState + selectState: (state: V) => EntityState, ): EntitySelectors } ``` @@ -225,7 +225,8 @@ All three options will insert _new_ entities into the list. However they differ Each method has a signature that looks like: ```ts no-transpile -(state: EntityState, argument: TypeOrPayloadAction>) => EntityState +;(state: EntityState, argument: TypeOrPayloadAction>) => + EntityState ``` In other words, they accept a state that looks like `{ids: [], entities: {}}`, and calculate and return a new state. @@ -407,7 +408,7 @@ store.dispatch( booksReceived([ { id: 'b', title: 'Book 3' }, { id: 'c', title: 'Book 2' }, - ]) + ]), ) console.log(booksSelectors.selectIds(store.getState())) diff --git a/docs/api/createListenerMiddleware.mdx b/docs/api/createListenerMiddleware.mdx index 7c626174c4..050fbd20b9 100644 --- a/docs/api/createListenerMiddleware.mdx +++ b/docs/api/createListenerMiddleware.mdx @@ -100,7 +100,7 @@ interface CreateListenerMiddlewareOptions { type ListenerErrorHandler = ( error: unknown, - errorInfo: ListenerErrorInfo + errorInfo: ListenerErrorInfo, ) => void interface ListenerErrorInfo { @@ -125,12 +125,12 @@ interface ListenerMiddlewareInstance< unknown, UnknownAction >, - ExtraArgument = unknown + ExtraArgument = unknown, > { middleware: ListenerMiddleware startListening: (options: AddListenerOptions) => Unsubscribe stopListening: ( - options: AddListenerOptions & UnsubscribeListenerOptions + options: AddListenerOptions & UnsubscribeListenerOptions, ) => boolean clearListeners: () => void } @@ -184,11 +184,11 @@ interface AddListenerOptions { type ListenerPredicate = ( action: Action, currentState?: State, - originalState?: State + originalState?: State, ) => boolean type UnsubscribeListener = ( - unsubscribeOptions?: UnsubscribeListenerOptions + unsubscribeOptions?: UnsubscribeListenerOptions, ) => void interface UnsubscribeListenerOptions { @@ -241,7 +241,7 @@ By default, this does _not_ cancel any active running instances. However, you ma ```ts no-transpile const stopListening = ( - options: AddListenerOptions & UnsubscribeListenerOptions + options: AddListenerOptions & UnsubscribeListenerOptions, ) => boolean interface UnsubscribeListenerOptions { @@ -302,7 +302,7 @@ Returns `true` if the listener entry has been removed, `false` if no subscriptio ```js const wasRemoved = store.dispatch( - removeListener({ predicate, effect, cancelActive: true }) + removeListener({ predicate, effect, cancelActive: true }), ) ``` @@ -322,7 +322,7 @@ The `listenerApi` object is the second argument to each listener callback. It co export interface ListenerEffectAPI< State, Dispatch extends ReduxDispatch, - ExtraArgument = unknown + ExtraArgument = unknown, > extends MiddlewareAPI { // NOTE: MiddlewareAPI contains `dispatch` and `getState` already @@ -579,12 +579,12 @@ The signatures are: ```ts no-transpile type ConditionFunction = ( predicate: ListenerPredicate | (() => boolean), - timeout?: number + timeout?: number, ) => Promise type TakeFunction = ( predicate: ListenerPredicate | (() => boolean), - timeout?: number + timeout?: number, ) => Promise<[Action, State, State] | null> ``` @@ -612,7 +612,7 @@ test('condition method resolves promise when there is a timeout', async () => { (action, currentState: CounterState) => { return currentState.value === 3 }, - 50 + 50, ) // In this test, we expect the timeout to happen first @@ -818,7 +818,7 @@ useEffect(() => { effect: (action, listenerApi) => { // do some useful logic here }, - }) + }), ) return unsubscribe }, []) diff --git a/docs/api/createReducer.mdx b/docs/api/createReducer.mdx index 2526b9a3d9..13a17e00ec 100644 --- a/docs/api/createReducer.mdx +++ b/docs/api/createReducer.mdx @@ -243,11 +243,11 @@ const reducer = createReducer(0, (builder) => { .addCase('increment', (state) => state + 1) .addMatcher( (action) => action.type.startsWith('i'), - (state) => state * 5 + (state) => state * 5, ) .addMatcher( (action) => action.type.endsWith('t'), - (state) => state + 2 + (state) => state + 2, ) }) diff --git a/docs/api/createSelector.mdx b/docs/api/createSelector.mdx index b0679f1ad0..f18410dae8 100644 --- a/docs/api/createSelector.mdx +++ b/docs/api/createSelector.mdx @@ -44,7 +44,7 @@ const selectSelf = (state: State) => state const unsafeSelector = createSelector(selectSelf, (state) => state.value) const draftSafeSelector = createDraftSafeSelector( selectSelf, - (state) => state.value + (state) => state.value, ) // in your reducer: @@ -81,7 +81,7 @@ const createWeakMapDraftSafeSelector = const selectSelf = (state: State) => state const draftSafeSelector = createWeakMapDraftSafeSelector( selectSelf, - (state) => state.value + (state) => state.value, ) ``` diff --git a/docs/api/createSlice.mdx b/docs/api/createSlice.mdx index 45786f3d51..577f34d75d 100644 --- a/docs/api/createSlice.mdx +++ b/docs/api/createSlice.mdx @@ -171,7 +171,7 @@ const todosSlice = createSlice({ // action type is inferred from prepare callback (state, action) => { state.todos.push(action.payload) - } + }, ), fetchTodo: create.asyncThunk( async (id: string, thunkApi) => { @@ -189,7 +189,7 @@ const todosSlice = createSlice({ state.loading = false state.todos.push(action.payload) }, - } + }, ), }), }) @@ -232,7 +232,7 @@ create.preparedReducer( }, (state, action) => { state.todos.push(action.payload) - } + }, ) ``` @@ -322,7 +322,7 @@ create.asyncThunk( error: 'Oh no!', }) } - } + }, ) ``` @@ -330,8 +330,9 @@ For common thunk API configuration options, a [`withTypes` helper](../usage/usag ```ts no-transpile reducers: (create) => { - const createAThunk = - create.asyncThunk.withTypes<{ rejectValue: { error: string } }>() + const createAThunk = create.asyncThunk.withTypes<{ + rejectValue: { error: string } + }>() return { fetchTodo: createAThunk(async (id, thunkApi) => { @@ -432,7 +433,7 @@ const counterSlice = createSlice({ reducers: (create) => ({ getCountData: create.asyncThunk(async (_arg, { getState }) => { const currentCount = counterSlice.selectors.selectValue( - getState() as RootState + getState() as RootState, ) // highlight-start // this would cause a circular type, but the type annotation breaks the circle @@ -548,7 +549,7 @@ const counterSlice = createSlice({ selectors: { selectDouble: createSelector( (sliceState: CounterState) => sliceState.value, - (value) => value * 2 + (value) => value * 2, ), }, }) @@ -568,7 +569,7 @@ console.log(selectDouble.unwrapped.recomputations) // 2 ```ts no-transpile const { selectValue } = counterSlice.getSelectors( - (rootState: RootState) => rootState.aCounter + (rootState: RootState) => rootState.aCounter, ) console.log(selectValue({ aCounter: { value: 2 } })) // 2 @@ -589,7 +590,7 @@ The [`slice.selectors`](#selectors-2) object is the equivalent of calling const { selectValue } = counterSlice.getSelectors(counterSlice.selectSlice) // or const { selectValue } = counterSlice.getSelectors( - (state: RootState) => state[counterSlice.reducerPath] + (state: RootState) => state[counterSlice.reducerPath], ) ``` diff --git a/docs/api/getDefaultEnhancers.mdx b/docs/api/getDefaultEnhancers.mdx index 6863d4168e..075e0d85fb 100644 --- a/docs/api/getDefaultEnhancers.mdx +++ b/docs/api/getDefaultEnhancers.mdx @@ -109,6 +109,6 @@ interface GetDefaultEnhancersOptions { } function getDefaultEnhancers>( - options: GetDefaultEnhancersOptions = {} + options: GetDefaultEnhancersOptions = {}, ): EnhancerArray<[StoreEnhancer<{ dispatch: ExtractDispatchExtensions }>]> ``` diff --git a/docs/api/getDefaultMiddleware.mdx b/docs/api/getDefaultMiddleware.mdx index 7e51cf618f..921c27c2fa 100644 --- a/docs/api/getDefaultMiddleware.mdx +++ b/docs/api/getDefaultMiddleware.mdx @@ -166,6 +166,6 @@ interface GetDefaultMiddlewareOptions { } function getDefaultMiddleware( - options: GetDefaultMiddlewareOptions = {} + options: GetDefaultMiddlewareOptions = {}, ): Middleware<{}, S>[] ``` diff --git a/docs/api/matching-utilities.mdx b/docs/api/matching-utilities.mdx index 12808beecc..2c928f86a4 100644 --- a/docs/api/matching-utilities.mdx +++ b/docs/api/matching-utilities.mdx @@ -126,7 +126,7 @@ import { requestThunk1, requestThunk2 } from '@virtual/matchers' const isARejectedWithValueAction = isRejectedWithValue( requestThunk1, - requestThunk2 + requestThunk2, ) function handleRejectedWithValueAction(action: UnknownAction) { @@ -162,13 +162,13 @@ interface Interesting extends Data { } function isSpecial( - action: PayloadAction + action: PayloadAction, ): action is PayloadAction { return action.payload.isSpecial } function isInteresting( - action: PayloadAction + action: PayloadAction, ): action is PayloadAction { return action.payload.isInteresting } @@ -190,7 +190,7 @@ export const isSpecialAndInterestingThunk = createAsyncThunk( isSpecial: true, isInteresting: true, } - } + }, ) // This has unnecessary complexity @@ -224,13 +224,13 @@ const loadingReducer = createReducer(initialState, (builder) => { isAllOf(isSpecialAndInterestingThunk.fulfilled, isSpecial), (state, action) => { state.isSpecial = true - } + }, ) .addMatcher( isAllOf(isSpecialAndInterestingThunk.fulfilled, isInteresting), (state, action) => { state.isInteresting = true - } + }, ) }) ``` diff --git a/docs/components/DetailedExplanation.jsx b/docs/components/DetailedExplanation.jsx index b3701555ee..da47f48a28 100644 --- a/docs/components/DetailedExplanation.jsx +++ b/docs/components/DetailedExplanation.jsx @@ -2,7 +2,7 @@ import React from 'react' export const DetailedExplanation = ({ children, - title = 'Detailed Explanation' + title = 'Detailed Explanation', }) => { return (
diff --git a/docs/rtk-query/api/createApi.mdx b/docs/rtk-query/api/createApi.mdx index dc76754f4d..24b205556d 100644 --- a/docs/rtk-query/api/createApi.mdx +++ b/docs/rtk-query/api/createApi.mdx @@ -101,11 +101,11 @@ export type BaseQueryFn< Result = unknown, Error = unknown, DefinitionExtraOptions = {}, - Meta = {} + Meta = {}, > = ( args: Args, api: BaseQueryApi, - extraOptions: DefinitionExtraOptions + extraOptions: DefinitionExtraOptions, ) => MaybePromise> export interface BaseQueryApi { @@ -148,7 +148,7 @@ export type QueryDefinition< BaseQuery extends BaseQueryFn, TagTypes extends string, ResultType, - ReducerPath extends string = string + ReducerPath extends string = string, > = { query(arg: QueryArg): BaseQueryArg @@ -157,21 +157,21 @@ export type QueryDefinition< arg: QueryArg, api: BaseQueryApi, extraOptions: BaseQueryExtraOptions, - baseQuery: (arg: Parameters[0]) => ReturnType + baseQuery: (arg: Parameters[0]) => ReturnType, ): MaybePromise>> /* transformResponse only available with `query`, not `queryFn` */ transformResponse?( baseQueryReturnValue: BaseQueryResult, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): ResultType | Promise /* transformErrorResponse only available with `query`, not `queryFn` */ transformErrorResponse?( baseQueryReturnValue: BaseQueryError, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): unknown extraOptions?: BaseQueryExtraOptions @@ -195,7 +195,7 @@ export type QueryDefinition< queryFulfilled, getCacheEntry, updateCachedData, // available for query endpoints only - }: QueryLifecycleApi + }: QueryLifecycleApi, ): Promise onCacheEntryAdded?( @@ -209,7 +209,7 @@ export type QueryDefinition< cacheDataLoaded, getCacheEntry, updateCachedData, // available for query endpoints only - }: QueryCacheLifecycleApi + }: QueryCacheLifecycleApi, ): Promise } ``` @@ -223,7 +223,7 @@ export type MutationDefinition< TagTypes extends string, ResultType, ReducerPath extends string = string, - Context = Record + Context = Record, > = { query(arg: QueryArg): BaseQueryArg @@ -232,21 +232,21 @@ export type MutationDefinition< arg: QueryArg, api: BaseQueryApi, extraOptions: BaseQueryExtraOptions, - baseQuery: (arg: Parameters[0]) => ReturnType + baseQuery: (arg: Parameters[0]) => ReturnType, ): MaybePromise>> /* transformResponse only available with `query`, not `queryFn` */ transformResponse?( baseQueryReturnValue: BaseQueryResult, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): ResultType | Promise /* transformErrorResponse only available with `query`, not `queryFn` */ transformErrorResponse?( baseQueryReturnValue: BaseQueryError, meta: BaseQueryMeta, - arg: QueryArg + arg: QueryArg, ): unknown extraOptions?: BaseQueryExtraOptions @@ -262,7 +262,7 @@ export type MutationDefinition< requestId, queryFulfilled, getCacheEntry, - }: MutationLifecycleApi + }: MutationLifecycleApi, ): Promise onCacheEntryAdded?( @@ -275,7 +275,7 @@ export type MutationDefinition< cacheEntryRemoved, cacheDataLoaded, getCacheEntry, - }: MutationCacheLifecycleApi + }: MutationCacheLifecycleApi, ): Promise } ``` @@ -391,7 +391,7 @@ _(required if no `queryFn` provided)_ ```ts title="query signature" no-transpile export type query = ( - arg: QueryArg + arg: QueryArg, ) => string | Record // with `fetchBaseQuery` @@ -579,7 +579,7 @@ async function onQueryStarted( requestId, queryFulfilled, getCacheEntry, - }: MutationLifecycleApi + }: MutationLifecycleApi, ): Promise ``` @@ -594,7 +594,7 @@ async function onQueryStarted( queryFulfilled, getCacheEntry, updateCachedData, // available for query endpoints only - }: QueryLifecycleApi + }: QueryLifecycleApi, ): Promise ``` @@ -671,7 +671,7 @@ async function onCacheEntryAdded( cacheEntryRemoved, cacheDataLoaded, getCacheEntry, - }: MutationCacheLifecycleApi + }: MutationCacheLifecycleApi, ): Promise ``` @@ -687,7 +687,7 @@ async function onCacheEntryAdded( cacheDataLoaded, getCacheEntry, updateCachedData, // available for query endpoints only - }: QueryCacheLifecycleApi + }: QueryCacheLifecycleApi, ): Promise ``` diff --git a/docs/rtk-query/api/created-api/api-slice-utils.mdx b/docs/rtk-query/api/created-api/api-slice-utils.mdx index 816d5298a2..5ce2f72e07 100644 --- a/docs/rtk-query/api/created-api/api-slice-utils.mdx +++ b/docs/rtk-query/api/created-api/api-slice-utils.mdx @@ -30,13 +30,13 @@ const updateQueryData = ( endpointName: string, args: any, updateRecipe: (draft: Draft) => void, - updateProvided?: boolean -) => ThunkAction; + updateProvided?: boolean, +) => ThunkAction interface PatchCollection { - patches: Patch[]; - inversePatches: Patch[]; - undo: () => void; + patches: Patch[] + inversePatches: Patch[] + undo: () => void } ``` @@ -64,7 +64,7 @@ Note that the first two arguments (`endpointName` and `args`) are used to determ const patchCollection = dispatch( api.util.updateQueryData('getPosts', undefined, (draftPosts) => { draftPosts.push({ id: 1, name: 'Teddy' }) - }) + }), ) ``` @@ -91,7 +91,7 @@ dispatch(api.endpoints.getPosts.initiate(undefined, { ...options })) const patchCollection = dispatch( api.util.updateQueryData('getPostById', 1, (draftPost) => { draftPost.name = 'Lilly' - }) + }), ) ``` @@ -117,11 +117,8 @@ dispatch(api.endpoints.getPostById.initiate(1, { ...options })) #### Signature ```ts no-transpile -const upsertQueryData = ( - endpointName: string, - args: any, - newEntryData: T -) => ThunkAction>, PartialState, any, UnknownAction>; +const upsertQueryData = (endpointName: string, args: any, newEntryData: T) => + ThunkAction>, PartialState, any, UnknownAction> ``` - **Parameters** @@ -145,7 +142,7 @@ If dispatched while an actual request is in progress, both the upsert and reques ```ts no-transpile await dispatch( - api.util.upsertQueryData('getPost', { id: 1 }, { id: 1, text: 'Hello!' }) + api.util.upsertQueryData('getPost', { id: 1 }, { id: 1, text: 'Hello!' }), ) ``` @@ -184,12 +181,16 @@ In cases where it is desired to simply revert the previous changes, it may be pr const patchCollection = dispatch( api.util.updateQueryData('getPosts', undefined, (draftPosts) => { draftPosts.push({ id: 1, name: 'Teddy' }) - }) + }), ) // later dispatch( - api.util.patchQueryData('getPosts', undefined, patchCollection.inversePatches) + api.util.patchQueryData( + 'getPosts', + undefined, + patchCollection.inversePatches, + ), ) // or @@ -201,13 +202,10 @@ patchCollection.undo() #### Signature ```ts no-transpile -type PrefetchOptions = { ifOlderThan?: false | number } | { force?: boolean }; +type PrefetchOptions = { ifOlderThan?: false | number } | { force?: boolean } -const prefetch = ( - endpointName: string, - arg: any, - options: PrefetchOptions -) => ThunkAction; +const prefetch = (endpointName: string, arg: any, options: PrefetchOptions) => + ThunkAction ``` - **Parameters** @@ -239,7 +237,7 @@ dispatch(api.util.prefetch('getPosts', undefined, { force: true })) ```ts no-transpile function selectInvalidatedBy( state: RootState, - tags: ReadonlyArray> + tags: ReadonlyArray>, ): Array<{ endpointName: string originalArgs: any @@ -286,7 +284,7 @@ const entries = api.util.selectInvalidatedBy(state, [ ```ts no-transpile const invalidateTags = ( - tags: Array> + tags: Array>, ) => ({ type: string, payload: tags, @@ -316,7 +314,7 @@ dispatch( api.util.invalidateTags([ { type: 'Post', id: 1 }, { type: 'Post', id: 'LIST' }, - ]) + ]), ) ``` @@ -327,7 +325,7 @@ dispatch( ```ts no-transpile function selectCachedArgsForQuery( state: RootState, - queryName: QueryName + queryName: QueryName, ): Array ``` diff --git a/docs/rtk-query/api/created-api/endpoints.mdx b/docs/rtk-query/api/created-api/endpoints.mdx index ed4178467d..c57cc783fd 100644 --- a/docs/rtk-query/api/created-api/endpoints.mdx +++ b/docs/rtk-query/api/created-api/endpoints.mdx @@ -156,14 +156,14 @@ type CreateCacheSelectorFactory = | MutationResultSelectorFactory type QueryResultSelectorFactory = ( - queryArg: QueryArg | SkipToken + queryArg: QueryArg | SkipToken, ) => (state: RootState) => QueryResultSelectorResult type MutationResultSelectorFactory< Definition extends MutationDefinition, - RootState + RootState, > = ( - requestId: string | SkipToken + requestId: string | SkipToken, ) => (state: RootState) => MutationSubState & RequestStatusFlags type SkipToken = typeof Symbol @@ -200,7 +200,7 @@ function App() { // Each call will create a new selector function instance const selectPost = useMemo( () => api.endpoints.getPost.select(postId), - [postId] + [postId], ) const { data, isLoading } = useAppSelector(selectPost) // highlight-end @@ -234,14 +234,14 @@ function App() { const dispatch = useAppDispatch() const [newPost, setNewPost] = useState({ name: 'Ash' }) const [requestId, setRequestId] = useState( - skipToken + skipToken, ) // highlight-start // useMemo is used to only call `.select(..)` when required. // Each call will create a new selector function instance const selectMutationResult = useMemo( () => api.endpoints.addPost.select(requestId), - [requestId] + [requestId], ) const { isLoading } = useAppSelector(selectMutationResult) // highlight-end diff --git a/docs/rtk-query/api/created-api/hooks.mdx b/docs/rtk-query/api/created-api/hooks.mdx index d6a9426466..cd45e4951c 100644 --- a/docs/rtk-query/api/created-api/hooks.mdx +++ b/docs/rtk-query/api/created-api/hooks.mdx @@ -246,7 +246,7 @@ const useQueryResult = api.useGetPostsQuery(arg, options) ```ts no-transpile type UseQuery = ( arg: any | SkipToken, - options?: UseQueryOptions + options?: UseQueryOptions, ) => UseQueryResult type UseQueryOptions = { @@ -309,7 +309,7 @@ const useMutationResult = api.useUpdatePostMutation(options) ```ts no-transpile type UseMutation = ( - options?: UseMutationStateOptions + options?: UseMutationStateOptions, ) => [UseMutationTrigger, UseMutationResult | SelectedUseMutationResult] type UseMutationStateOptions = { @@ -387,7 +387,7 @@ const useQueryStateResult = api.endpoints.getPosts.useQueryState(arg, options) ```ts no-transpile type UseQueryState = ( arg: any | SkipToken, - options?: UseQueryStateOptions + options?: UseQueryStateOptions, ) => UseQueryStateResult | SelectedQueryStateResult type UseQueryStateOptions = { @@ -438,7 +438,7 @@ const { refetch } = api.endpoints.getPosts.useQuerySubscription(arg, options) ```ts no-transpile type UseQuerySubscription = ( arg: any | SkipToken, - options?: UseQuerySubscriptionOptions + options?: UseQuerySubscriptionOptions, ) => UseQuerySubscriptionResult type UseQuerySubscriptionOptions = { @@ -550,7 +550,7 @@ const [trigger, lastArg] = ```ts no-transpile type UseLazyQuerySubscription = ( - options?: UseLazyQuerySubscriptionOptions + options?: UseLazyQuerySubscriptionOptions, ) => [UseLazyQuerySubscriptionTrigger, LastArg] type UseLazyQuerySubscriptionOptions = { @@ -561,7 +561,7 @@ type UseLazyQuerySubscriptionOptions = { type UseLazyQuerySubscriptionTrigger = ( arg: any, - preferCacheValue?: boolean + preferCacheValue?: boolean, ) => void ``` @@ -588,7 +588,7 @@ const prefetchCallback = api.usePrefetch(endpointName, options) ```ts no-transpile type UsePrefetch = ( endpointName: string, - options?: UsePrefetchOptions + options?: UsePrefetchOptions, ) => PrefetchCallback type UsePrefetchOptions = diff --git a/docs/rtk-query/api/created-api/overview.mdx b/docs/rtk-query/api/created-api/overview.mdx index b515a2f5c8..5db80993b2 100644 --- a/docs/rtk-query/api/created-api/overview.mdx +++ b/docs/rtk-query/api/created-api/overview.mdx @@ -55,7 +55,7 @@ type Api = { > selectInvalidatedBy: ( state: FullState, - tags: Array> + tags: Array>, ) => Array<{ endpointName: string originalArgs: any @@ -63,16 +63,16 @@ type Api = { }> selectCachedArgsForQuery: ( state: FullState, - endpointName: EndpointName + endpointName: EndpointName, ) => Array resetApiState: ActionCreator getRunningQueryThunk( endpointName: EndpointName, - args: QueryArg + args: QueryArg, ): ThunkWithReturnValue getRunningMutationThunk( endpointName: EndpointName, - fixedCacheKeyOrRequestId: string + fixedCacheKeyOrRequestId: string, ): ThunkWithReturnValue getRunningQueriesThunk(): ThunkWithReturnValue< Array> diff --git a/docs/rtk-query/api/fetchBaseQuery.mdx b/docs/rtk-query/api/fetchBaseQuery.mdx index eea7ad4f37..0f668ea145 100644 --- a/docs/rtk-query/api/fetchBaseQuery.mdx +++ b/docs/rtk-query/api/fetchBaseQuery.mdx @@ -50,11 +50,11 @@ export const pokemonApi = createApi({ ```ts title="fetchBaseQuery signature" no-transpile type FetchBaseQuery = ( - args: FetchBaseQueryArgs + args: FetchBaseQueryArgs, ) => ( args: string | FetchArgs, api: BaseQueryApi, - extraOptions: ExtraOptions + extraOptions: ExtraOptions, ) => FetchBaseQueryResult type FetchBaseQueryArgs = { @@ -64,11 +64,11 @@ type FetchBaseQueryArgs = { api: Pick< BaseQueryApi, 'getState' | 'extra' | 'endpoint' | 'type' | 'forced' - > + >, ) => MaybePromise fetchFn?: ( input: RequestInfo, - init?: RequestInit | undefined + init?: RequestInit | undefined, ) => Promise paramsSerializer?: (params: Record) => string isJsonContentType?: (headers: Headers) => boolean @@ -118,7 +118,7 @@ type prepareHeaders = ( endpoint: string type: 'query' | 'mutation' forced: boolean | undefined - } + }, ) => Headers | void ``` diff --git a/docs/rtk-query/api/setupListeners.mdx b/docs/rtk-query/api/setupListeners.mdx index 5e9fe04bef..feb44c12e0 100644 --- a/docs/rtk-query/api/setupListeners.mdx +++ b/docs/rtk-query/api/setupListeners.mdx @@ -24,8 +24,8 @@ export function setupListeners( onFocusLost: typeof onFocusLost onOnline: typeof onOnline onOffline: typeof onOffline - } - ) => () => void + }, + ) => () => void, ) { function defaultHandler() { const handleFocus = () => dispatch(onFocus()) @@ -46,7 +46,7 @@ export function setupListeners( window.addEventListener( 'visibilitychange', handleVisibilityChange, - false + false, ) window.addEventListener('focus', handleFocus, false) diff --git a/docs/rtk-query/usage-with-typescript.mdx b/docs/rtk-query/usage-with-typescript.mdx index 366da13818..178a50495e 100644 --- a/docs/rtk-query/usage-with-typescript.mdx +++ b/docs/rtk-query/usage-with-typescript.mdx @@ -103,11 +103,11 @@ export type BaseQueryFn< Result = unknown, Error = unknown, DefinitionExtraOptions = {}, - Meta = {} + Meta = {}, > = ( args: Args, api: BaseQueryApi, - extraOptions: DefinitionExtraOptions + extraOptions: DefinitionExtraOptions, ) => MaybePromise> export interface BaseQueryApi { @@ -649,7 +649,7 @@ import { FetchBaseQueryError } from '@reduxjs/toolkit/query' * Type predicate to narrow an unknown error to `FetchBaseQueryError` */ export function isFetchBaseQueryError( - error: unknown + error: unknown, ): error is FetchBaseQueryError { return typeof error === 'object' && error != null && 'status' in error } @@ -658,7 +658,7 @@ export function isFetchBaseQueryError( * Type predicate to narrow an unknown error to an object with a string 'message' property */ export function isErrorWithMessage( - error: unknown + error: unknown, ): error is { message: string } { return ( typeof error === 'object' && diff --git a/docs/rtk-query/usage/automated-refetching.mdx b/docs/rtk-query/usage/automated-refetching.mdx index 5d589934cf..846b32598d 100644 --- a/docs/rtk-query/usage/automated-refetching.mdx +++ b/docs/rtk-query/usage/automated-refetching.mdx @@ -809,8 +809,8 @@ const api = createApi({ result ? [{ type: 'Post', id }] : error?.status === 401 - ? ['UNAUTHORIZED'] - : ['UNKNOWN_ERROR'], + ? ['UNAUTHORIZED'] + : ['UNKNOWN_ERROR'], }), login: build.mutation({ query: () => '/login', @@ -908,7 +908,7 @@ import type { Post, User } from './types' // highlight-start function providesList( resultsWithIds: R | undefined, - tagType: T + tagType: T, ) { return resultsWithIds ? [ diff --git a/docs/rtk-query/usage/cache-behavior.mdx b/docs/rtk-query/usage/cache-behavior.mdx index e6815b5271..caa8774f08 100644 --- a/docs/rtk-query/usage/cache-behavior.mdx +++ b/docs/rtk-query/usage/cache-behavior.mdx @@ -138,8 +138,8 @@ const Component = () => { dispatch( api.endpoints.getPosts.initiate( { count: 5 }, - { subscribe: false, forceRefetch: true } - ) + { subscribe: false, forceRefetch: true }, + ), ) } @@ -206,7 +206,7 @@ const Component = () => { // highlight-start // this overrules the api definition setting, // forcing the query to always fetch when this component is mounted - { refetchOnMountOrArgChange: true } + { refetchOnMountOrArgChange: true }, // highlight-end ) diff --git a/docs/rtk-query/usage/code-generation.mdx b/docs/rtk-query/usage/code-generation.mdx index efd4551e05..4ee69e0d34 100644 --- a/docs/rtk-query/usage/code-generation.mdx +++ b/docs/rtk-query/usage/code-generation.mdx @@ -112,7 +112,7 @@ interface SimpleUsage { export type EndpointMatcherFunction = ( operationName: string, - operationDefinition: OperationDefinition + operationDefinition: OperationDefinition, ) => boolean ``` diff --git a/docs/rtk-query/usage/customizing-create-api.mdx b/docs/rtk-query/usage/customizing-create-api.mdx index bb1ccf4e1c..cce3b8f339 100644 --- a/docs/rtk-query/usage/customizing-create-api.mdx +++ b/docs/rtk-query/usage/customizing-create-api.mdx @@ -44,7 +44,7 @@ const customCreateApi = buildCreateApi( useSelector: createSelectorHook(MyContext), useStore: createStoreHook(MyContext), }, - }) + }), ) ``` @@ -65,7 +65,7 @@ const createLruSelector = createSelectorCreator(lruMemoize) const customCreateApi = buildCreateApi( coreModule({ createSelector: createLruSelector }), - reactHooksModule({ createSelector: createLruSelector }) + reactHooksModule({ createSelector: createLruSelector }), ) ``` @@ -94,7 +94,7 @@ declare module '../apiTypes' { BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, - TagTypes extends string + TagTypes extends string, > { [customModuleName]: { endpoints: { diff --git a/docs/rtk-query/usage/customizing-queries.mdx b/docs/rtk-query/usage/customizing-queries.mdx index 8734cc8d2e..8532ecf26c 100644 --- a/docs/rtk-query/usage/customizing-queries.mdx +++ b/docs/rtk-query/usage/customizing-queries.mdx @@ -57,7 +57,7 @@ const customBaseQuery = ( // highlight-start args, { signal, dispatch, getState }, - extraOptions + extraOptions, // highlight-end ) => { // omitted @@ -77,7 +77,7 @@ const customBaseQuery = ( const customBaseQuery = ( args, { signal, dispatch, getState }, - extraOptions + extraOptions, ) => { // highlight-start if (Math.random() > 0.5) return { error: 'Too high!' } @@ -97,18 +97,21 @@ At its core, a `baseQuery` function only needs to have the minimum return value For [`fetchBaseQuery`](../api/fetchBaseQuery) specifically, the return type is as follows: ```ts title="Return types of fetchBaseQuery" no-transpile -Promise<{ - data: any; - error?: undefined; - meta?: { request: Request; response: Response }; -} | { - error: { - status: number; - data: any; - }; - data?: undefined; - meta?: { request: Request; response: Response }; -}> +Promise< + | { + data: any + error?: undefined + meta?: { request: Request; response: Response } + } + | { + error: { + status: number + data: any + } + data?: undefined + meta?: { request: Request; response: Response } + } +> ``` 1. ```ts title="Expected success result format with fetchBaseQuery" no-transpile @@ -130,7 +133,7 @@ By default, the payload from the server is returned directly. function defaultTransformResponse( baseQueryReturnValue: unknown, meta: unknown, - arg: unknown + arg: unknown, ) { return baseQueryReturnValue } @@ -211,7 +214,7 @@ By default, the payload from the server is returned directly. function defaultTransformResponse( baseQueryReturnValue: unknown, meta: unknown, - arg: unknown + arg: unknown, ) { return baseQueryReturnValue } @@ -232,7 +235,7 @@ dependent on the `baseQuery` used. transformErrorResponse: ( response: { data: { sideA: Tracks; sideB: Tracks } }, meta, - arg + arg, ) => { if (meta?.coinFlip === 'heads') { return response.data.sideA @@ -317,7 +320,7 @@ const queryFn = ( args, { signal, dispatch, getState }, extraOptions, - baseQuery + baseQuery, // highlight-end ) => { // omitted @@ -338,7 +341,7 @@ const queryFn = ( args, { signal, dispatch, getState }, extraOptions, - baseQuery + baseQuery, ) => { // highlight-start if (Math.random() > 0.5) return { error: 'Too high!' } @@ -362,7 +365,7 @@ import type { AxiosRequestConfig, AxiosError } from 'axios' // highlight-start const axiosBaseQuery = ( - { baseUrl }: { baseUrl: string } = { baseUrl: '' } + { baseUrl }: { baseUrl: string } = { baseUrl: '' }, ): BaseQueryFn< { url: string @@ -565,7 +568,7 @@ const baseQueryWithReauth: BaseQueryFn< const refreshResult = await baseQuery( '/refreshToken', api, - extraOptions + extraOptions, ) if (refreshResult.data) { api.dispatch(tokenReceived(refreshResult.data)) @@ -627,7 +630,7 @@ const staggeredBaseQueryWithBailOut = retry( const result = await fetchBaseQuery({ baseUrl: '/api/' })( args, api, - extraOptions + extraOptions, ) // bail out of re-tries immediately if unauthorized, @@ -640,7 +643,7 @@ const staggeredBaseQueryWithBailOut = retry( }, { maxRetries: 5, - } + }, ) // highlight-end @@ -711,7 +714,7 @@ const metaBaseQuery: BaseQueryFn< const baseResult = await fetchBaseQuery({ baseUrl: '/' })( args, api, - extraOptions + extraOptions, ) return { @@ -746,7 +749,7 @@ const api = createApi({ // These properties can be used to transform the response as desired. if (!meta) return [] return returnValue.filter( - (post) => post.timestamp >= meta.timestamp - DAY_MS + (post) => post.timestamp >= meta.timestamp - DAY_MS, ) }, // highlight-end diff --git a/docs/rtk-query/usage/manual-cache-updates.mdx b/docs/rtk-query/usage/manual-cache-updates.mdx index ac6cb96bab..7f05b88a1e 100644 --- a/docs/rtk-query/usage/manual-cache-updates.mdx +++ b/docs/rtk-query/usage/manual-cache-updates.mdx @@ -12,7 +12,7 @@ description: 'RTK Query > Usage > Manual Cache Updates: Updating and creating ca ## Overview -For most cases, in order to receive up to date data after a triggering a change in the backend, you can take advantage of cache tag invalidation to perform [automated re-fetching](./automated-refetching). This will cause a query to re-fetch its data when it has been told that a mutation has occurred which would cause its data to become out of date. +For most cases, in order to receive up to date data after a triggering a change in the backend, you can take advantage of cache tag invalidation to perform [automated re-fetching](./automated-refetching). This will cause a query to re-fetch its data when it has been told that a mutation has occurred which would cause its data to become out of date. We recommend using automated re-fetching as a preference over manual cache updates in most situations. @@ -20,7 +20,7 @@ However, there _are_ use cases when manual cache updates are necessary, such as RTK Query exports thunks for these use cases, attached to `api.utils`: -- [`updateQueryData`](../api/created-api/api-slice-utils.mdx#updatequerydata): updates an already existing cache entry +- [`updateQueryData`](../api/created-api/api-slice-utils.mdx#updatequerydata): updates an already existing cache entry - [`upsertQueryData`](../api/created-api/api-slice-utils.mdx#upsertquerydata): creates or replaces cache entries Since these are thunks, you can dispatch them anywhere you have access to `dispatch`. @@ -32,6 +32,7 @@ For updates of existing cache entries, use [`updateQueryData`](../api/created-ap `updateQueryData` is strictly intended to perform _updates_ to existing cache entries, not create new entries. If an `updateQueryData` thunk action is dispatched and the `endpointName` + `args` combination that does not match any existing cache entry, the provided `recipe` callback will not be called, and no `patches` or `inversePatches` will be returned. Use cases for manual update of cache entries: + - Providing immediate feedback to the user when a mutation is attempted - After a mutation, updating a single item in a large list of items that is already cached, rather than re-fetching the whole list - Debouncing a large number of mutations with immediate feedback as though they are being applied, followed by a single request sent to the server to update the debounced attempts @@ -42,8 +43,7 @@ To create or replace existing cache entries, use [`upsertQueryData`](../api/crea `upsertQueryData` is intended to perform _replacements_ to existing cache entries or _creation_ of new ones. Since `upsertQueryData` does not have access to the previous state of the cache entry, the update may be performed only as a replacement. In comparison, `updateQueryData` allows patching of the existing cache entry, but cannot create a new one. - -One example use case is [pessimistic updates](../usage/manual-cache-updates.mdx#pessimistic-updates). If the client makes an API call to create a `Post`, the backend could return its complete data including the `id`. Then we can use `upsertQueryData` to create a new cache entry for the `getPostById(id)` query, preventing an extra fetch to retrieve the item later. +One example use case is [pessimistic updates](../usage/manual-cache-updates.mdx#pessimistic-updates). If the client makes an API call to create a `Post`, the backend could return its complete data including the `id`. Then we can use `upsertQueryData` to create a new cache entry for the `getPostById(id)` query, preventing an extra fetch to retrieve the item later. ## Recipes @@ -102,7 +102,7 @@ const api = createApi({ const patchResult = dispatch( api.util.updateQueryData('getPost', id, (draft) => { Object.assign(draft, patch) - }) + }), ) try { await queryFulfilled @@ -197,7 +197,7 @@ const api = createApi({ const patchResult = dispatch( api.util.updateQueryData('getPost', id, (draft) => { Object.assign(draft, updatedPost) - }) + }), ) } catch {} }, @@ -214,7 +214,7 @@ const api = createApi({ try { const { data: createdPost } = await queryFulfilled const patchResult = dispatch( - api.util.upsertQueryData('getPost', id, createdPost) + api.util.upsertQueryData('getPost', id, createdPost), ) } catch {} }, @@ -253,7 +253,7 @@ function App() { const patchCollection = dispatch( api.util.updateQueryData('getPosts', undefined, (draftPosts) => { draftPosts.push({ id: 1, name: 'Teddy' }) - }) + }), ) } diff --git a/docs/rtk-query/usage/migrating-to-rtk-query.mdx b/docs/rtk-query/usage/migrating-to-rtk-query.mdx index 11b993c78b..e5f2a655bc 100644 --- a/docs/rtk-query/usage/migrating-to-rtk-query.mdx +++ b/docs/rtk-query/usage/migrating-to-rtk-query.mdx @@ -72,7 +72,7 @@ export const fetchPokemonByName = createAsyncThunk( return rejectWithValue(data) } return data - } + }, ) // highlight-end @@ -187,7 +187,7 @@ render( , // highlight-end - rootElement + rootElement, ) ``` @@ -201,7 +201,7 @@ import { AsyncThunkAction } from '@reduxjs/toolkit' import { RootState } from '../store' interface Pokemon {} export declare const fetchPokemonByName: ( - arg: string + arg: string, ) => AsyncThunkAction export const selectStatusByName = (state: RootState, name: string) => @@ -243,7 +243,7 @@ export function useGetPokemonByNameQuery(name: string) { const dispatch = useAppDispatch() // select the current status from the store state for the provided name const status = useSelector((state: RootState) => - selectStatusByName(state, name) + selectStatusByName(state, name), ) // select the current data from the store state for the provided name const data = useSelector((state: RootState) => selectDataByName(state, name)) diff --git a/docs/rtk-query/usage/mutations.mdx b/docs/rtk-query/usage/mutations.mdx index c018056832..3dd4f73f53 100644 --- a/docs/rtk-query/usage/mutations.mdx +++ b/docs/rtk-query/usage/mutations.mdx @@ -58,14 +58,14 @@ const api = createApi({ transformErrorResponse: ( response: { status: string | number }, meta, - arg + arg, ) => response.status, invalidatesTags: ['Post'], // onQueryStarted is useful for optimistic updates // The 2nd parameter is the destructured `MutationLifecycleApi` async onQueryStarted( arg, - { dispatch, getState, queryFulfilled, requestId, extra, getCacheEntry } + { dispatch, getState, queryFulfilled, requestId, extra, getCacheEntry }, ) {}, // The 2nd parameter is the destructured `MutationCacheLifecycleApi` async onCacheEntryAdded( @@ -78,7 +78,7 @@ const api = createApi({ cacheEntryRemoved, cacheDataLoaded, getCacheEntry, - } + }, ) {}, // highlight-end }), @@ -256,7 +256,7 @@ export const postApi = createApi({ result ? // successful query [ - ...result.map(({ id }) => ({ type: 'Posts', id } as const)), + ...result.map(({ id }) => ({ type: 'Posts', id }) as const), { type: 'Posts', id: 'LIST' }, ] : // an error occurred, but we still want to refetch this query when `{ type: 'Posts', id: 'LIST' }` is invalidated diff --git a/docs/rtk-query/usage/polling.mdx b/docs/rtk-query/usage/polling.mdx index 2e85c1ed6d..8a59db5ca8 100644 --- a/docs/rtk-query/usage/polling.mdx +++ b/docs/rtk-query/usage/polling.mdx @@ -34,7 +34,7 @@ In an action creator without React Hooks: const { data, status, error, refetch } = store.dispatch( endpoints.getCountById.initiate(id, { subscriptionOptions: { pollingInterval: 3000 }, - }) + }), ) ``` diff --git a/docs/rtk-query/usage/prefetching.mdx b/docs/rtk-query/usage/prefetching.mdx index fbdc3b21fb..405109fb9c 100644 --- a/docs/rtk-query/usage/prefetching.mdx +++ b/docs/rtk-query/usage/prefetching.mdx @@ -86,8 +86,8 @@ type EndpointNames = keyof typeof api.endpoints export function usePrefetchImmediately( endpoint: T, - arg: Parameters[0], - options: PrefetchOptions = {} + arg: Parameters<(typeof api.endpoints)[T]['initiate']>[0], + options: PrefetchOptions = {}, ) { const dispatch = useAppDispatch() useEffect(() => { @@ -107,7 +107,7 @@ When dispatching the `prefetch` thunk as shown below you will see the same exact ```ts title="Non-hook prefetching example" no-transpile store.dispatch( - api.util.prefetch(endpointName, arg, { force: false, ifOlderThan: 10 }) + api.util.prefetch(endpointName, arg, { force: false, ifOlderThan: 10 }), ) ``` diff --git a/docs/rtk-query/usage/queries.mdx b/docs/rtk-query/usage/queries.mdx index 1eca72047e..b0568e3047 100644 --- a/docs/rtk-query/usage/queries.mdx +++ b/docs/rtk-query/usage/queries.mdx @@ -65,7 +65,7 @@ const api = createApi({ transformErrorResponse: ( response: { status: string | number }, meta, - arg + arg, ) => response.status, providesTags: (result, error, id) => [{ type: 'Post', id }], // The 2nd parameter is the destructured `QueryLifecycleApi` @@ -79,7 +79,7 @@ const api = createApi({ queryFulfilled, getCacheEntry, updateCachedData, - } + }, ) {}, // The 2nd parameter is the destructured `QueryCacheLifecycleApi` async onCacheEntryAdded( @@ -93,7 +93,7 @@ const api = createApi({ cacheDataLoaded, getCacheEntry, updateCachedData, - } + }, ) {}, // highlight-end }), @@ -287,9 +287,7 @@ function PostsList() { return (
    - {posts?.data?.map((post) => ( - - ))} + {posts?.data?.map((post) => )}
) } @@ -346,7 +344,7 @@ If you're not using React Hooks, you can access `refetch` like this: ```ts no-transpile const { status, data, error, refetch } = dispatch( - pokemonApi.endpoints.getPokemon.initiate('bulbasaur') + pokemonApi.endpoints.getPokemon.initiate('bulbasaur'), ) ``` diff --git a/docs/rtk-query/usage/streaming-updates.mdx b/docs/rtk-query/usage/streaming-updates.mdx index 88ed09082e..880a78bfd6 100644 --- a/docs/rtk-query/usage/streaming-updates.mdx +++ b/docs/rtk-query/usage/streaming-updates.mdx @@ -78,7 +78,7 @@ export const api = createApi({ // highlight-start async onCacheEntryAdded( arg, - { updateCachedData, cacheDataLoaded, cacheEntryRemoved } + { updateCachedData, cacheDataLoaded, cacheEntryRemoved }, ) { // create a websocket connection when the cache subscription starts const ws = new WebSocket('ws://localhost:8080') @@ -165,13 +165,13 @@ export const api = createApi({ transformResponse(response: Message[]) { return messagesAdapter.addMany( messagesAdapter.getInitialState(), - response + response, ) }, // highlight-end async onCacheEntryAdded( arg, - { updateCachedData, cacheDataLoaded, cacheEntryRemoved } + { updateCachedData, cacheDataLoaded, cacheEntryRemoved }, ) { const ws = new WebSocket('ws://localhost:8080') try { diff --git a/docs/rtk-query/usage/usage-without-react-hooks.mdx b/docs/rtk-query/usage/usage-without-react-hooks.mdx index 319e4a0f95..45617d383a 100644 --- a/docs/rtk-query/usage/usage-without-react-hooks.mdx +++ b/docs/rtk-query/usage/usage-without-react-hooks.mdx @@ -71,13 +71,13 @@ Because the `endpoint.select(arg)` function returns a new selector each time it' ```ts title="Creating a memoized selector creator" no-transpile const createGetPostSelector = createSelector( (id: string) => id, - (id) => api.endpoints.getPost.select(id) + (id) => api.endpoints.getPost.select(id), ) const selectGetPostError = createSelector( (state: RootState) => state, (state: RootState, id: string) => createGetPostSelector(id), - (state, selectGetPost) => selectGetPost(state).error + (state, selectGetPost) => selectGetPost(state).error, ) ``` diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 80bf4d4a7d..200ffa3ffe 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -18,36 +18,20 @@ "baseUrl": "..", "jsx": "preserve", "paths": { - "react": [ - "../node_modules/@types/react" - ], - "react-dom": [ - "../node_modules/@types/react-dom" - ], - "@reduxjs/toolkit": [ - "packages/toolkit/src/index.ts" - ], - "@reduxjs/toolkit/query": [ - "packages/toolkit/src/query/index.ts" - ], + "react": ["../node_modules/@types/react"], + "react-dom": ["../node_modules/@types/react-dom"], + "@reduxjs/toolkit": ["packages/toolkit/src/index.ts"], + "@reduxjs/toolkit/query": ["packages/toolkit/src/query/index.ts"], "@reduxjs/toolkit/query/react": [ - "packages/toolkit/src/query/react/index.ts" - ], - "@reduxjs/toolkit/dist/query/*": [ - "packages/toolkit/src/query/*" - ], - "@virtual/*": [ - "docs/virtual/*" - ], - "your-cool-library": [ - "docs/virtual/your-cool-library/index.ts" - ], - "redux-logger": [ - "docs/virtual/redux-logger/index.ts" + "packages/toolkit/src/query/react/index.ts", ], + "@reduxjs/toolkit/dist/query/*": ["packages/toolkit/src/query/*"], + "@virtual/*": ["docs/virtual/*"], + "your-cool-library": ["docs/virtual/your-cool-library/index.ts"], + "redux-logger": ["docs/virtual/redux-logger/index.ts"], "petstore-api.generated": [ - "docs/virtual/petstore-api.generated/index.ts" - ] - } - } -} \ No newline at end of file + "docs/virtual/petstore-api.generated/index.ts", + ], + }, + }, +} diff --git a/docs/tutorials/rtk-query.mdx b/docs/tutorials/rtk-query.mdx index 8f2c97962e..17dcbae065 100644 --- a/docs/tutorials/rtk-query.mdx +++ b/docs/tutorials/rtk-query.mdx @@ -23,7 +23,7 @@ hide_title: true ## Introduction -Welcome to the Redux Toolkit Query tutorial! **This tutorial will briefly introduce you to Redux Toolkit's "RTK Query" data fetching capability and teach you how to start using it correctly**. +Welcome to the Redux Toolkit Query tutorial! **This tutorial will briefly introduce you to Redux Toolkit's "RTK Query" data fetching capability and teach you how to start using it correctly**. :::info diff --git a/docs/usage/migrating-rtk-2.md b/docs/usage/migrating-rtk-2.md index b537ec9d41..bbdedaa9bf 100644 --- a/docs/usage/migrating-rtk-2.md +++ b/docs/usage/migrating-rtk-2.md @@ -145,7 +145,7 @@ First, the `Reducer` type now has a `PreloadedState` possible generic: ```ts type Reducer = ( state: S | PreloadedState | undefined, - action: A + action: A, ) => S ``` @@ -319,7 +319,7 @@ const customCreateApi = buildCreateApi( useDispatch: createDispatchHook(MyContext), useSelector: createSelectorHook(MyContext), useStore: createStoreHook(MyContext), - }) + }), ) // now @@ -331,7 +331,7 @@ const customCreateApi = buildCreateApi( useSelector: createSelectorHook(MyContext), useStore: createStoreHook(MyContext), }, - }) + }), ) ``` @@ -406,7 +406,7 @@ const addNumbers = createSelector( // this input selector will always return a new reference when run // so cache will never be used (a, b) => ({ a, b }), - ({ a, b }) => ({ total: a + b }) + ({ a, b }) => ({ total: a + b }), ) // instead, you should have an input selector for each stable piece of data const addNumbersStable = createSelector( @@ -414,7 +414,7 @@ const addNumbersStable = createSelector( (a, b) => b, (a, b) => ({ total: a + b, - }) + }), ) ``` @@ -537,7 +537,7 @@ const combinedReducer = combineSlices( num: numberSlice.reducer, boolean: booleanReducer, }, - api + api, ) expect(combinedReducer(undefined, dummyAction())).toEqual({ string: stringSlice.getInitialState(), @@ -564,12 +564,12 @@ const injectedReducer = combinedReducer.inject(numberSlice) // `state.number` now exists, and injectedReducer's type no longer marks it as optional expect(injectedReducer(undefined, dummyAction()).number).toBe( - numberSlice.getInitialState() + numberSlice.getInitialState(), ) // original reducer has also been changed (type is still optional) expect(combinedReducer(undefined, dummyAction()).number).toBe( - numberSlice.getInitialState() + numberSlice.getInitialState(), ) ``` @@ -603,7 +603,7 @@ const customState = { number: slice.getInitialState(), } const { selectSlice, selectMultiple } = slice.getSelectors( - (state: typeof customState) => state.number + (state: typeof customState) => state.number, ) expect(selectSlice(customState)).toBe(slice.getInitialState()) expect(selectMultiple(customState, 2)).toBe(slice.getInitialState() * 2) @@ -620,7 +620,7 @@ const fetchUserById = createAsyncThunk( async (userId: number, thunkAPI) => { const response = await userAPI.fetchById(userId) return response.data - } + }, ) const usersSlice = createSlice({ @@ -682,7 +682,7 @@ const todosSlice = createAppSlice({ // action type is inferred from prepare callback (state, action) => { state.todos.push(action.payload) - } + }, ), // An async thunk fetchTodo: create.asyncThunk( @@ -706,7 +706,7 @@ const todosSlice = createAppSlice({ settled: (state, action) => { state.loading = false }, - } + }, ), }), }) @@ -872,7 +872,7 @@ For example, with `redux-observable`: const epic = (action$: Observable) => action$.pipe( ofType(todoAdded), - map((action) => action) + map((action) => action), // ^? still Action ) @@ -880,7 +880,7 @@ const epic = (action$: Observable) => const epic = (action$: Observable) => action$.pipe( filter(todoAdded.match), - map((action) => action) + map((action) => action), // ^? now PayloadAction ) ``` @@ -931,7 +931,7 @@ const asyncThunkCreator = { // the definition from define() definition, // methods to modify slice - context + context, ) { const { payloadCreator, options, pending, fulfilled, rejected, settled } = definition @@ -976,7 +976,7 @@ const todoSlice = createSlice({ selectTodosByAuthor = createSelector( (state: TodoState) => state.todos, (state: TodoState, author: string) => author, - (todos, author) => todos.filter((todo) => todo.author === author) + (todos, author) => todos.filter((todo) => todo.author === author), ), }, }) @@ -991,7 +991,7 @@ export const makeSelectTodosByAuthor = () => createSelector( (state: RootState) => state.todos.todos, (state: RootState, author: string) => author, - (todos, author) => todos.filter((todo) => todo.author === author) + (todos, author) => todos.filter((todo) => todo.author === author), ) function AuthorTodos({ author }: { author: string }) { diff --git a/docs/usage/migrating-to-modern-redux.mdx b/docs/usage/migrating-to-modern-redux.mdx index 57c4758b31..4241f2d22f 100644 --- a/docs/usage/migrating-to-modern-redux.mdx +++ b/docs/usage/migrating-to-modern-redux.mdx @@ -298,7 +298,7 @@ const todosSlice = createSlice({ // In this case, `action.payload` is the default field in the action, // and can hold the `id` value - no need for `action.id` separately const matchingTodo = state.todos.find( - (todo) => todo.id === action.payload + (todo) => todo.id === action.payload, ) if (matchingTodo) { @@ -796,7 +796,7 @@ const initialState: TodosState = [] export default function todosReducer( state = initialState, - action: TodoActions + action: TodoActions, ) { switch (action.type) { // omit reducer logic @@ -944,7 +944,7 @@ const mapDispatchToProps2 = (dispatch) => { todoDeleted, todoToggled, }, - dispatch + dispatch, ) } diff --git a/docs/usage/usage-guide.md b/docs/usage/usage-guide.md index 8baf6c938a..113c732a54 100644 --- a/docs/usage/usage-guide.md +++ b/docs/usage/usage-guide.md @@ -651,7 +651,7 @@ const fetchUserById = createAsyncThunk( async (userId, thunkAPI) => { const response = await userAPI.fetchById(userId) return response.data - } + }, ) // Then, handle actions in your reducers: @@ -1084,7 +1084,7 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ) ``` @@ -1137,10 +1137,10 @@ const store = configureStore({ ignoredActions: [ // just ignore every redux-firebase and react-redux-firebase action type ...Object.keys(rfConstants.actionTypes).map( - (type) => `${rfConstants.actionsPrefix}/${type}` + (type) => `${rfConstants.actionsPrefix}/${type}`, ), ...Object.keys(rrfActionTypes).map( - (type) => `@@reactReduxFirebase/${type}` + (type) => `@@reactReduxFirebase/${type}`, ), ], ignoredPaths: ['firebase', 'firestore'], diff --git a/docs/usage/usage-with-typescript.md b/docs/usage/usage-with-typescript.md index aadec00ccd..0194fd787e 100644 --- a/docs/usage/usage-with-typescript.md +++ b/docs/usage/usage-with-typescript.md @@ -122,7 +122,7 @@ const store = configureStore({ untypedMiddleware as Middleware< (action: Action<'specialAction'>) => number, RootState - > + >, ) // prepend and concat calls can be chained .concat(logger), @@ -213,7 +213,7 @@ createReducer(0, (builder) => }) .addCase(decrement, (state, action: PayloadAction) => { // this would error out - }) + }), ) ``` @@ -311,7 +311,7 @@ const blogSlice = createSlice({ receivedAll: { reducer( state, - action: PayloadAction + action: PayloadAction, ) { state.all = action.payload state.meta = action.meta @@ -364,7 +364,7 @@ const fetchUserById = createAsyncThunk( async (userId: number) => { const response = await fetch(`https://reqres.in/api/users/${userId}`) return (await response.json()) as Returned - } + }, ) interface UsersState { @@ -438,7 +438,7 @@ create.asyncThunk( error: 'Oh no!', }) } - } + }, ) ``` @@ -446,8 +446,9 @@ For common thunk API configuration options, a [`withTypes` helper](../usage/usag ```ts no-transpile reducers: (create) => { - const createAThunk = - create.asyncThunk.withTypes<{ rejectValue: { error: string } }>() + const createAThunk = create.asyncThunk.withTypes<{ + rejectValue: { error: string } + }>() return { fetchTodo: createAThunk(async (id, thunkApi) => { @@ -478,7 +479,7 @@ interface GenericState { const createGenericSlice = < T, - Reducers extends SliceCaseReducers> + Reducers extends SliceCaseReducers>, >({ name = '', initialState, @@ -547,7 +548,7 @@ const fetchUserById = createAsyncThunk( // Inferred return type: Promise // highlight-next-line return (await response.json()) as MyData - } + }, ) // the parameter of `fetchUserById` is automatically inferred to `number` here @@ -791,7 +792,7 @@ export const fetchArticle = createAsyncThunk( } >(data, articleEntity) return normalized.entities - } + }, ) export const slice = createSlice({ diff --git a/docs/virtual/matchers/index.ts b/docs/virtual/matchers/index.ts index 501de36c1f..ff1e4fdba5 100644 --- a/docs/virtual/matchers/index.ts +++ b/docs/virtual/matchers/index.ts @@ -1,7 +1,7 @@ import { createAsyncThunk, createReducer, - PayloadAction + PayloadAction, } from '@reduxjs/toolkit' export interface Data { @@ -18,13 +18,13 @@ export interface Interesting extends Data { } export function isSpecial( - action: PayloadAction + action: PayloadAction, ): action is PayloadAction { return action.payload.isSpecial } export function isInteresting( - action: PayloadAction + action: PayloadAction, ): action is PayloadAction { return action.payload.isInteresting } @@ -36,7 +36,7 @@ export interface ExampleState { export const initialState = { isSpecial: false, - isInteresting: false + isInteresting: false, } as ExampleState export const isSpecialAndInterestingThunk = createAsyncThunk( @@ -44,16 +44,16 @@ export const isSpecialAndInterestingThunk = createAsyncThunk( () => { return { isSpecial: true, - isInteresting: true + isInteresting: true, } - } + }, ) export const requestThunk1 = createAsyncThunk('requestThunk1', () => ({})) export const requestThunk2 = createAsyncThunk('requestThunk2', () => ({})) -export const loadingReducer = createReducer(initialState, builder => { +export const loadingReducer = createReducer(initialState, (builder) => { builder.addCase(isSpecialAndInterestingThunk.fulfilled, (state, action) => { if (isSpecial(action)) { state.isSpecial = true diff --git a/examples/action-listener/counter/public/index.html b/examples/action-listener/counter/public/index.html index c1b40227ed..5e1a99228a 100644 --- a/examples/action-listener/counter/public/index.html +++ b/examples/action-listener/counter/public/index.html @@ -1,26 +1,28 @@ - + - + Counter Example - Action Middleware -
- - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/advanced/src/Pokemon.tsx b/examples/query/react/advanced/src/Pokemon.tsx index 0506e6c79a..4e848e960b 100644 --- a/examples/query/react/advanced/src/Pokemon.tsx +++ b/examples/query/react/advanced/src/Pokemon.tsx @@ -11,7 +11,7 @@ export const Pokemon = ({ name, { pollingInterval, - } + }, ) return ( diff --git a/examples/query/react/advanced/src/index.tsx b/examples/query/react/advanced/src/index.tsx index b5a9e97285..568f62e54d 100644 --- a/examples/query/react/advanced/src/index.tsx +++ b/examples/query/react/advanced/src/index.tsx @@ -10,5 +10,5 @@ const reactRoot = ReactDOM.createRoot(rootElement as HTMLElement) reactRoot.render( - + , ) diff --git a/examples/query/react/advanced/tsconfig.json b/examples/query/react/advanced/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/advanced/tsconfig.json +++ b/examples/query/react/advanced/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/authentication-with-extrareducers/public/index.html b/examples/query/react/authentication-with-extrareducers/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/authentication-with-extrareducers/public/index.html +++ b/examples/query/react/authentication-with-extrareducers/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/authentication-with-extrareducers/src/features/auth/authSlice.tsx b/examples/query/react/authentication-with-extrareducers/src/features/auth/authSlice.tsx index 3c854bedad..dfbc2182ec 100644 --- a/examples/query/react/authentication-with-extrareducers/src/features/auth/authSlice.tsx +++ b/examples/query/react/authentication-with-extrareducers/src/features/auth/authSlice.tsx @@ -17,7 +17,7 @@ const slice = createSlice({ (state, { payload }) => { state.token = payload.token state.user = payload.user - } + }, ) }, }) diff --git a/examples/query/react/authentication-with-extrareducers/src/index.tsx b/examples/query/react/authentication-with-extrareducers/src/index.tsx index 2bf5b85aa3..2b302a9654 100644 --- a/examples/query/react/authentication-with-extrareducers/src/index.tsx +++ b/examples/query/react/authentication-with-extrareducers/src/index.tsx @@ -20,6 +20,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/authentication-with-extrareducers/src/mocks/handlers.ts b/examples/query/react/authentication-with-extrareducers/src/mocks/handlers.ts index 7415cb72fd..4efb7fdf88 100644 --- a/examples/query/react/authentication-with-extrareducers/src/mocks/handlers.ts +++ b/examples/query/react/authentication-with-extrareducers/src/mocks/handlers.ts @@ -11,14 +11,14 @@ export const handlers = [ ctx.json({ message: 'You shall not pass. Please login first.', }), - ctx.status(401) + ctx.status(401), ) } return res( ctx.json({ message: 'Join us on the Reactiflux Discord server in #redux if you have any questions.', - }) + }), ) }), rest.post('/login', (req, res, ctx) => { @@ -30,7 +30,7 @@ export const handlers = [ last_name: 'User', }, token, - }) + }), ) }), ] diff --git a/examples/query/react/authentication-with-extrareducers/tsconfig.json b/examples/query/react/authentication-with-extrareducers/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/authentication-with-extrareducers/tsconfig.json +++ b/examples/query/react/authentication-with-extrareducers/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/authentication/public/index.html b/examples/query/react/authentication/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/authentication/public/index.html +++ b/examples/query/react/authentication/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/authentication/src/features/auth/authSlice.tsx b/examples/query/react/authentication/src/features/auth/authSlice.tsx index 76fde9f03c..c7d17c0bd5 100644 --- a/examples/query/react/authentication/src/features/auth/authSlice.tsx +++ b/examples/query/react/authentication/src/features/auth/authSlice.tsx @@ -14,7 +14,9 @@ const slice = createSlice({ reducers: { setCredentials: ( state, - { payload: { user, token } }: PayloadAction<{ user: User; token: string }> + { + payload: { user, token }, + }: PayloadAction<{ user: User; token: string }>, ) => { state.user = user state.token = token diff --git a/examples/query/react/authentication/src/index.tsx b/examples/query/react/authentication/src/index.tsx index b55e344e50..25df0f6d58 100644 --- a/examples/query/react/authentication/src/index.tsx +++ b/examples/query/react/authentication/src/index.tsx @@ -12,7 +12,7 @@ worker .start({ quiet: true }) .then(() => { const rootNode = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ) return rootNode.render( @@ -24,7 +24,7 @@ worker - + , ) }) .catch(console.error) diff --git a/examples/query/react/authentication/src/mocks/handlers.ts b/examples/query/react/authentication/src/mocks/handlers.ts index 7415cb72fd..4efb7fdf88 100644 --- a/examples/query/react/authentication/src/mocks/handlers.ts +++ b/examples/query/react/authentication/src/mocks/handlers.ts @@ -11,14 +11,14 @@ export const handlers = [ ctx.json({ message: 'You shall not pass. Please login first.', }), - ctx.status(401) + ctx.status(401), ) } return res( ctx.json({ message: 'Join us on the Reactiflux Discord server in #redux if you have any questions.', - }) + }), ) }), rest.post('/login', (req, res, ctx) => { @@ -30,7 +30,7 @@ export const handlers = [ last_name: 'User', }, token, - }) + }), ) }), ] diff --git a/examples/query/react/authentication/tsconfig.json b/examples/query/react/authentication/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/authentication/tsconfig.json +++ b/examples/query/react/authentication/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/basic/public/index.html b/examples/query/react/basic/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/basic/public/index.html +++ b/examples/query/react/basic/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/basic/src/App.test.tsx b/examples/query/react/basic/src/App.test.tsx index 3225b3e090..4fd1a19675 100644 --- a/examples/query/react/basic/src/App.test.tsx +++ b/examples/query/react/basic/src/App.test.tsx @@ -18,7 +18,7 @@ describe('App', () => { }) as HTMLImageElement expect(img.src).toBe( - 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/1.png' + 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/1.png', ) }) @@ -29,8 +29,8 @@ describe('App', () => { 'https://pokeapi.co/api/v2/pokemon/bulbasaur', (req, res, ctx) => { return res(ctx.status(500)) - } - ) + }, + ), ) renderWithProviders() diff --git a/examples/query/react/basic/src/index.tsx b/examples/query/react/basic/src/index.tsx index 970d6ba2b4..589c537b24 100644 --- a/examples/query/react/basic/src/index.tsx +++ b/examples/query/react/basic/src/index.tsx @@ -7,10 +7,10 @@ import { setupStore } from './store' const store = setupStore() const reactRoot = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ) reactRoot.render( - + , ) diff --git a/examples/query/react/basic/src/test/test-utils.tsx b/examples/query/react/basic/src/test/test-utils.tsx index cf36650812..1e90c11a87 100644 --- a/examples/query/react/basic/src/test/test-utils.tsx +++ b/examples/query/react/basic/src/test/test-utils.tsx @@ -21,7 +21,7 @@ function renderWithProviders( preloadedState = {}, store = setupStore(preloadedState), ...renderOptions - }: ExtendedRenderOptions = {} + }: ExtendedRenderOptions = {}, ) { function Wrapper({ children }: PropsWithChildren<{}>): JSX.Element { return {children} diff --git a/examples/query/react/basic/tsconfig.json b/examples/query/react/basic/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/basic/tsconfig.json +++ b/examples/query/react/basic/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/conditional-fetching/public/index.html b/examples/query/react/conditional-fetching/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/conditional-fetching/public/index.html +++ b/examples/query/react/conditional-fetching/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/conditional-fetching/src/Pokemon.tsx b/examples/query/react/conditional-fetching/src/Pokemon.tsx index 2e2b9549a9..077d11a4b5 100644 --- a/examples/query/react/conditional-fetching/src/Pokemon.tsx +++ b/examples/query/react/conditional-fetching/src/Pokemon.tsx @@ -8,7 +8,7 @@ export const Pokemon = ({ name }: { name: PokemonName }) => { name, { skip, - } + }, ) const SkipToggle = () => ( diff --git a/examples/query/react/conditional-fetching/src/index.tsx b/examples/query/react/conditional-fetching/src/index.tsx index 1af4cef9e5..b455864950 100644 --- a/examples/query/react/conditional-fetching/src/index.tsx +++ b/examples/query/react/conditional-fetching/src/index.tsx @@ -5,10 +5,10 @@ import App from './App' import { store } from './store' const reactRoot = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ) reactRoot.render( - + , ) diff --git a/examples/query/react/conditional-fetching/src/pokemon.data.ts b/examples/query/react/conditional-fetching/src/pokemon.data.ts index 1617ce9e50..22eb3a0547 100644 --- a/examples/query/react/conditional-fetching/src/pokemon.data.ts +++ b/examples/query/react/conditional-fetching/src/pokemon.data.ts @@ -152,4 +152,4 @@ export const POKEMON_NAMES = [ 'mew', ] as const -export type PokemonName = typeof POKEMON_NAMES[number] +export type PokemonName = (typeof POKEMON_NAMES)[number] diff --git a/examples/query/react/conditional-fetching/tsconfig.json b/examples/query/react/conditional-fetching/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/conditional-fetching/tsconfig.json +++ b/examples/query/react/conditional-fetching/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/deduping-queries/public/index.html b/examples/query/react/deduping-queries/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/deduping-queries/public/index.html +++ b/examples/query/react/deduping-queries/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/deduping-queries/src/Pokemon.tsx b/examples/query/react/deduping-queries/src/Pokemon.tsx index 624602f3a9..73e71925bd 100644 --- a/examples/query/react/deduping-queries/src/Pokemon.tsx +++ b/examples/query/react/deduping-queries/src/Pokemon.tsx @@ -1,13 +1,8 @@ import { useGetPokemonByNameQuery } from './services/pokemon' export const Pokemon = ({ name }: { name: string }) => { - const { - data, - error, - isLoading, - isFetching, - refetch, - } = useGetPokemonByNameQuery(name) + const { data, error, isLoading, isFetching, refetch } = + useGetPokemonByNameQuery(name) return (
diff --git a/examples/query/react/deduping-queries/src/index.tsx b/examples/query/react/deduping-queries/src/index.tsx index 0924558a7d..b36d809053 100644 --- a/examples/query/react/deduping-queries/src/index.tsx +++ b/examples/query/react/deduping-queries/src/index.tsx @@ -5,11 +5,11 @@ import App from './App' import { store } from './store' const reactRoot = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ) reactRoot.render( - + , ) diff --git a/examples/query/react/deduping-queries/tsconfig.json b/examples/query/react/deduping-queries/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/deduping-queries/tsconfig.json +++ b/examples/query/react/deduping-queries/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/graphql-codegen/.introspection.json b/examples/query/react/graphql-codegen/.introspection.json index 00aa67088e..732fa070df 100644 --- a/examples/query/react/graphql-codegen/.introspection.json +++ b/examples/query/react/graphql-codegen/.introspection.json @@ -1704,11 +1704,7 @@ "name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -1732,11 +1728,7 @@ "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -1785,9 +1777,7 @@ "name": "specifiedBy", "description": "Exposes a URL that specifies the behaviour of this scalar.", "isRepeatable": false, - "locations": [ - "SCALAR" - ], + "locations": ["SCALAR"], "args": [ { "name": "url", @@ -1809,4 +1799,4 @@ } ] } -} \ No newline at end of file +} diff --git a/examples/query/react/graphql-codegen/public/index.html b/examples/query/react/graphql-codegen/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/graphql-codegen/public/index.html +++ b/examples/query/react/graphql-codegen/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/graphql-codegen/src/app/services/types.generated.ts b/examples/query/react/graphql-codegen/src/app/services/types.generated.ts index f1f88bfc20..399ebbd2c9 100644 --- a/examples/query/react/graphql-codegen/src/app/services/types.generated.ts +++ b/examples/query/react/graphql-codegen/src/app/services/types.generated.ts @@ -1,119 +1,118 @@ -export type Maybe = T; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type Maybe = T +export type Exact = { + [K in keyof T]: T[K] +} +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe +} +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe +} /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; -}; + ID: string + String: string + Boolean: boolean + Int: number + Float: number +} export type IdQueryType = { - equals?: Maybe; - notEquals?: Maybe; - contains?: Maybe; - notContains?: Maybe; - in?: Maybe; - notIn?: Maybe; -}; + equals?: Maybe + notEquals?: Maybe + contains?: Maybe + notContains?: Maybe + in?: Maybe + notIn?: Maybe +} export type Mutation = { - __typename?: 'Mutation'; - createPost?: Maybe; - updatePost?: Maybe; - updatePosts?: Maybe>>; - deletePost?: Maybe; - deletePosts?: Maybe>>; -}; - + __typename?: 'Mutation' + createPost?: Maybe + updatePost?: Maybe + updatePosts?: Maybe>> + deletePost?: Maybe + deletePosts?: Maybe>> +} export type MutationCreatePostArgs = { - data?: Maybe; -}; - + data?: Maybe +} export type MutationUpdatePostArgs = { - where?: Maybe; - data?: Maybe; -}; - + where?: Maybe + data?: Maybe +} export type MutationUpdatePostsArgs = { - where?: Maybe; - data?: Maybe; -}; - + where?: Maybe + data?: Maybe +} export type MutationDeletePostArgs = { - where?: Maybe; -}; - + where?: Maybe +} export type MutationDeletePostsArgs = { - where?: Maybe; -}; + where?: Maybe +} export type Post = { - __typename?: 'Post'; - id?: Maybe; - name?: Maybe; - title?: Maybe; - author?: Maybe; - content?: Maybe; - status?: Maybe; - created_at?: Maybe; - updated_at?: Maybe; -}; + __typename?: 'Post' + id?: Maybe + name?: Maybe + title?: Maybe + author?: Maybe + content?: Maybe + status?: Maybe + created_at?: Maybe + updated_at?: Maybe +} export type PostInput = { - id?: Maybe; - name?: Maybe; - title?: Maybe; - author?: Maybe; - content?: Maybe; - status?: Maybe; - created_at?: Maybe; - updated_at?: Maybe; -}; + id?: Maybe + name?: Maybe + title?: Maybe + author?: Maybe + content?: Maybe + status?: Maybe + created_at?: Maybe + updated_at?: Maybe +} export type PostQueryInput = { - id?: Maybe; - name?: Maybe; - title?: Maybe; - author?: Maybe; - content?: Maybe; - status?: Maybe; - created_at?: Maybe; - updated_at?: Maybe; -}; + id?: Maybe + name?: Maybe + title?: Maybe + author?: Maybe + content?: Maybe + status?: Maybe + created_at?: Maybe + updated_at?: Maybe +} export type Query = { - __typename?: 'Query'; - post?: Maybe; - posts?: Maybe>>; -}; - + __typename?: 'Query' + post?: Maybe + posts?: Maybe>> +} export type QueryPostArgs = { - where?: Maybe; -}; - + where?: Maybe +} export type QueryPostsArgs = { - take?: Maybe; - skip?: Maybe; - cursor?: Maybe; - where?: Maybe; -}; + take?: Maybe + skip?: Maybe + cursor?: Maybe + where?: Maybe +} export type StringQueryType = { - equals?: Maybe; - notEquals?: Maybe; - contains?: Maybe; - notContains?: Maybe; - in?: Maybe; - notIn?: Maybe; -}; + equals?: Maybe + notEquals?: Maybe + contains?: Maybe + notContains?: Maybe + in?: Maybe + notIn?: Maybe +} diff --git a/examples/query/react/graphql-codegen/src/features/posts/GetPost.generated.ts b/examples/query/react/graphql-codegen/src/features/posts/GetPost.generated.ts index 17a3fd7999..0ed9677e3c 100644 --- a/examples/query/react/graphql-codegen/src/features/posts/GetPost.generated.ts +++ b/examples/query/react/graphql-codegen/src/features/posts/GetPost.generated.ts @@ -9,23 +9,19 @@ * for this file to be re-created */ -import * as Types from '../../app/services/types.generated'; +import * as Types from '../../app/services/types.generated' -import { api } from 'app/services/baseApi'; -module.hot?.accept(); +import { api } from 'app/services/baseApi' +module.hot?.accept() export type GetPostQueryVariables = Types.Exact<{ - id: Types.Scalars['ID']; -}>; - - -export type GetPostQuery = ( - { __typename?: 'Query' } - & { post?: Types.Maybe<( - { __typename?: 'Post' } - & Pick - )> } -); + id: Types.Scalars['ID'] +}> +export type GetPostQuery = { __typename?: 'Query' } & { + post?: Types.Maybe< + { __typename?: 'Post' } & Pick + > +} export const GetPostDocument = ` query GetPost($id: ID!) { @@ -35,17 +31,16 @@ export const GetPostDocument = ` content } } - `; + ` const injectedRtkApi = api.injectEndpoints({ - overrideExisting: module.hot?.status() === "apply", + overrideExisting: module.hot?.status() === 'apply', endpoints: (build) => ({ GetPost: build.query({ - query: (variables) => ({ document: GetPostDocument, variables }) + query: (variables) => ({ document: GetPostDocument, variables }), }), }), -}); - -export { injectedRtkApi as api }; -export const { useGetPostQuery, useLazyGetPostQuery } = injectedRtkApi; +}) +export { injectedRtkApi as api } +export const { useGetPostQuery, useLazyGetPostQuery } = injectedRtkApi diff --git a/examples/query/react/graphql-codegen/src/features/posts/GetPosts.generated.ts b/examples/query/react/graphql-codegen/src/features/posts/GetPosts.generated.ts index 79c42956e0..6efed203a6 100644 --- a/examples/query/react/graphql-codegen/src/features/posts/GetPosts.generated.ts +++ b/examples/query/react/graphql-codegen/src/features/posts/GetPosts.generated.ts @@ -9,24 +9,24 @@ * for this file to be re-created */ -import * as Types from '../../app/services/types.generated'; +import * as Types from '../../app/services/types.generated' -import { api } from 'app/services/baseApi'; -module.hot?.accept(); +import { api } from 'app/services/baseApi' +module.hot?.accept() export type GetPostsQueryVariables = Types.Exact<{ - skip?: Types.Maybe; - take?: Types.Maybe; -}>; - - -export type GetPostsQuery = ( - { __typename?: 'Query' } - & { posts?: Types.Maybe - )>>> } -); - + skip?: Types.Maybe + take?: Types.Maybe +}> + +export type GetPostsQuery = { __typename?: 'Query' } & { + posts?: Types.Maybe< + Array< + Types.Maybe< + { __typename?: 'Post' } & Pick + > + > + > +} export const GetPostsDocument = ` query GetPosts($skip: Int = 0, $take: Int = 10) { @@ -36,17 +36,16 @@ export const GetPostsDocument = ` status } } - `; + ` const injectedRtkApi = api.injectEndpoints({ - overrideExisting: module.hot?.status() === "apply", + overrideExisting: module.hot?.status() === 'apply', endpoints: (build) => ({ GetPosts: build.query({ - query: (variables) => ({ document: GetPostsDocument, variables }) + query: (variables) => ({ document: GetPostsDocument, variables }), }), }), -}); - -export { injectedRtkApi as api }; -export const { useGetPostsQuery, useLazyGetPostsQuery } = injectedRtkApi; +}) +export { injectedRtkApi as api } +export const { useGetPostsQuery, useLazyGetPostsQuery } = injectedRtkApi diff --git a/examples/query/react/graphql-codegen/src/features/posts/PostsManager.tsx b/examples/query/react/graphql-codegen/src/features/posts/PostsManager.tsx index 907d412679..9eefa7bf48 100644 --- a/examples/query/react/graphql-codegen/src/features/posts/PostsManager.tsx +++ b/examples/query/react/graphql-codegen/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: string | undefined) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/graphql-codegen/src/index.tsx b/examples/query/react/graphql-codegen/src/index.tsx index 88e4ff607c..a3f9271c5c 100644 --- a/examples/query/react/graphql-codegen/src/index.tsx +++ b/examples/query/react/graphql-codegen/src/index.tsx @@ -11,7 +11,7 @@ import { ApiProvider } from '@reduxjs/toolkit/query/react' // Initialize the msw worker, wait for the service worker registration to resolve, then mount worker.start({ quiet: true }).then(() => { return ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ).render( @@ -21,6 +21,6 @@ worker.start({ quiet: true }).then(() => { - + , ) }) diff --git a/examples/query/react/graphql-codegen/src/mocks/db.ts b/examples/query/react/graphql-codegen/src/mocks/db.ts index fededb9d62..78341ab30a 100644 --- a/examples/query/react/graphql-codegen/src/mocks/db.ts +++ b/examples/query/react/graphql-codegen/src/mocks/db.ts @@ -9,7 +9,7 @@ interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/graphql-codegen/tsconfig.json b/examples/query/react/graphql-codegen/tsconfig.json index 93e52d5db1..16a99dca49 100644 --- a/examples/query/react/graphql-codegen/tsconfig.json +++ b/examples/query/react/graphql-codegen/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -21,6 +16,6 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "baseUrl": "src" - } + "baseUrl": "src", + }, } diff --git a/examples/query/react/graphql/public/index.html b/examples/query/react/graphql/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/graphql/public/index.html +++ b/examples/query/react/graphql/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/graphql/src/app/services/posts.ts b/examples/query/react/graphql/src/app/services/posts.ts index fbbcf0de02..0d84c75f2c 100644 --- a/examples/query/react/graphql/src/app/services/posts.ts +++ b/examples/query/react/graphql/src/app/services/posts.ts @@ -1,6 +1,6 @@ -import { createApi } from '@reduxjs/toolkit/query/react' +import { createApi } from '@reduxjs/toolkit/query/react' import { gql } from 'graphql-request' -import {graphqlRequestBaseQuery} from '@rtk-query/graphql-request-base-query' +import { graphqlRequestBaseQuery } from '@rtk-query/graphql-request-base-query' export const postStatuses = ['draft', 'published', 'pending_review'] as const @@ -9,7 +9,7 @@ export interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/graphql/src/features/posts/PostsManager.tsx b/examples/query/react/graphql/src/features/posts/PostsManager.tsx index e16e6ac46c..8203ed4b3b 100644 --- a/examples/query/react/graphql/src/features/posts/PostsManager.tsx +++ b/examples/query/react/graphql/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: Post['status']) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/graphql/src/index.tsx b/examples/query/react/graphql/src/index.tsx index a7429fe087..db33bb49a1 100644 --- a/examples/query/react/graphql/src/index.tsx +++ b/examples/query/react/graphql/src/index.tsx @@ -11,7 +11,7 @@ import { ApiProvider } from '@reduxjs/toolkit/query/react' // Initialize the msw worker, wait for the service worker registration to resolve, then mount worker.start({ quiet: true }).then(() => { return ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ).render( @@ -21,6 +21,6 @@ worker.start({ quiet: true }).then(() => { - + , ) }) diff --git a/examples/query/react/graphql/src/mocks/db.ts b/examples/query/react/graphql/src/mocks/db.ts index 0aa6a3c2a4..2ba757e6fe 100644 --- a/examples/query/react/graphql/src/mocks/db.ts +++ b/examples/query/react/graphql/src/mocks/db.ts @@ -37,7 +37,8 @@ const createPostData = (): Post => { ;[...new Array(50)].forEach((_) => db.post.create(createPostData())) type PaginationOptions = { - page: number; per_page: number + page: number + per_page: number } interface Posts extends Pagination { @@ -52,19 +53,19 @@ export const handlers = [ const posts = db.post.findMany({ take: per_page, - skip: Math.max(per_page * (page - 1), 0) + skip: Math.max(per_page * (page - 1), 0), }) return res( ctx.data({ data: { - posts + posts, } as { posts: Post[] }, per_page, page, total_pages: Math.ceil(db.post.count() / per_page), total: db.post.count(), - }) + }), ) }), ...db.post.toHandlers('graphql'), diff --git a/examples/query/react/graphql/tsconfig.json b/examples/query/react/graphql/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/graphql/tsconfig.json +++ b/examples/query/react/graphql/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/kitchen-sink/public/index.html b/examples/query/react/kitchen-sink/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/kitchen-sink/public/index.html +++ b/examples/query/react/kitchen-sink/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/kitchen-sink/src/app/services/api.ts b/examples/query/react/kitchen-sink/src/app/services/api.ts index e9c9ab0c56..0cd4e2e692 100644 --- a/examples/query/react/kitchen-sink/src/app/services/api.ts +++ b/examples/query/react/kitchen-sink/src/app/services/api.ts @@ -20,7 +20,7 @@ const baseQueryWithRetry = retry(baseQuery, { maxRetries: 6 }) * Create a base API to inject endpoints into elsewhere. * Components using this API should import from the injected site, * in order to get the appropriate types, - * and to ensure that the file injecting the endpoints is loaded + * and to ensure that the file injecting the endpoints is loaded */ export const api = createApi({ /** diff --git a/examples/query/react/kitchen-sink/src/app/services/posts.ts b/examples/query/react/kitchen-sink/src/app/services/posts.ts index 08204d0062..04293c4237 100644 --- a/examples/query/react/kitchen-sink/src/app/services/posts.ts +++ b/examples/query/react/kitchen-sink/src/app/services/posts.ts @@ -34,7 +34,7 @@ export const postsApi = api.injectEndpoints({ getPosts: build.query({ query: () => ({ url: 'posts' }), providesTags: (result = []) => [ - ...result.map(({ id }) => ({ type: 'Posts', id } as const)), + ...result.map(({ id }) => ({ type: 'Posts', id }) as const), { type: 'Posts' as const, id: 'LIST' }, ], }), diff --git a/examples/query/react/kitchen-sink/src/app/store.ts b/examples/query/react/kitchen-sink/src/app/store.ts index 82232113dc..e814615c9f 100644 --- a/examples/query/react/kitchen-sink/src/app/store.ts +++ b/examples/query/react/kitchen-sink/src/app/store.ts @@ -5,7 +5,7 @@ import polling from '../features/polling/pollingSlice' import auth from '../features/auth/authSlice' export const createStore = ( - options?: ConfigureStoreOptions['preloadedState'] | undefined + options?: ConfigureStoreOptions['preloadedState'] | undefined, ) => configureStore({ reducer: { diff --git a/examples/query/react/kitchen-sink/src/features/bundleSplitting/Post.tsx b/examples/query/react/kitchen-sink/src/features/bundleSplitting/Post.tsx index ececa81173..fe7de3c6cb 100644 --- a/examples/query/react/kitchen-sink/src/features/bundleSplitting/Post.tsx +++ b/examples/query/react/kitchen-sink/src/features/bundleSplitting/Post.tsx @@ -16,10 +16,7 @@ const Post = ({ id }: { id: number }) => { * This missing would be a programming error that you should * catch early anyways. */ - assert( - postApi.endpoints.getPost?.useQuery, - 'Endpoint `getPost` not loaded!' - ) + assert(postApi.endpoints.getPost?.useQuery, 'Endpoint `getPost` not loaded!') const { data, error } = postApi.endpoints.getPost.useQuery(id) return error ? ( <>there was an error diff --git a/examples/query/react/kitchen-sink/src/features/bundleSplitting/PostsList.tsx b/examples/query/react/kitchen-sink/src/features/bundleSplitting/PostsList.tsx index fc9452a7c5..2c8539fe9a 100644 --- a/examples/query/react/kitchen-sink/src/features/bundleSplitting/PostsList.tsx +++ b/examples/query/react/kitchen-sink/src/features/bundleSplitting/PostsList.tsx @@ -1,7 +1,7 @@ -import * as React from 'react'; +import * as React from 'react' -import { Post } from '.'; -import { postsApi } from '../../app/services/posts'; +import { Post } from '.' +import { postsApi } from '../../app/services/posts' const PostsList = () => { /** @@ -13,8 +13,8 @@ const PostsList = () => { * injected though. */ - const { data, error } = postsApi.endpoints.getPosts.useQuery(); - const [selected, select] = React.useState(); + const { data, error } = postsApi.endpoints.getPosts.useQuery() + const [selected, select] = React.useState() return error ? ( <>there was an error ) : !data ? ( @@ -30,6 +30,6 @@ const PostsList = () => { ))} - ); -}; -export default PostsList; + ) +} +export default PostsList diff --git a/examples/query/react/kitchen-sink/src/features/counter/Counter.module.css b/examples/query/react/kitchen-sink/src/features/counter/Counter.module.css index 2ba30ae792..7e60ca1c7f 100644 --- a/examples/query/react/kitchen-sink/src/features/counter/Counter.module.css +++ b/examples/query/react/kitchen-sink/src/features/counter/Counter.module.css @@ -13,7 +13,7 @@ padding-left: 16px; padding-right: 16px; margin-top: 2px; - font-family: "Courier New", Courier, monospace; + font-family: 'Courier New', Courier, monospace; } .button { @@ -56,7 +56,7 @@ } .asyncButton:after { - content: ""; + content: ''; background-color: rgba(112, 76, 182, 0.15); display: block; position: absolute; @@ -65,7 +65,9 @@ left: 0; top: 0; opacity: 0; - transition: width 1s linear, opacity 0.5s ease 1s; + transition: + width 1s linear, + opacity 0.5s ease 1s; } .asyncButton:active:after { diff --git a/examples/query/react/kitchen-sink/src/features/counter/Counter.tsx b/examples/query/react/kitchen-sink/src/features/counter/Counter.tsx index c192e40ca2..ed8c5bf357 100644 --- a/examples/query/react/kitchen-sink/src/features/counter/Counter.tsx +++ b/examples/query/react/kitchen-sink/src/features/counter/Counter.tsx @@ -1,32 +1,52 @@ -import React, { useState } from 'react'; -import styles from './Counter.module.css'; -import { useDecrementCountMutation, useGetCountQuery, useIncrementCountMutation } from '../../app/services/counter'; +import React, { useState } from 'react' +import styles from './Counter.module.css' +import { + useDecrementCountMutation, + useGetCountQuery, + useIncrementCountMutation, +} from '../../app/services/counter' -export function Counter({ id, onRemove }: { id?: string; onRemove?: () => void }) { - const [pollingInterval, setPollingInterval] = useState(10000); - const { data } = useGetCountQuery(undefined, { pollingInterval }); - const [increment] = useIncrementCountMutation(); +export function Counter({ + id, + onRemove, +}: { + id?: string + onRemove?: () => void +}) { + const [pollingInterval, setPollingInterval] = useState(10000) + const { data } = useGetCountQuery(undefined, { pollingInterval }) + const [increment] = useIncrementCountMutation() - const [decrement] = useDecrementCountMutation(); + const [decrement] = useDecrementCountMutation() return (
- {data?.count || 0} - setPollingInterval(valueAsNumber)} + onChange={({ target: { valueAsNumber } }) => + setPollingInterval(valueAsNumber) + } /> {onRemove && }
- ); + ) } diff --git a/examples/query/react/kitchen-sink/src/features/counter/CounterList.tsx b/examples/query/react/kitchen-sink/src/features/counter/CounterList.tsx index e917b72140..acf946b93b 100644 --- a/examples/query/react/kitchen-sink/src/features/counter/CounterList.tsx +++ b/examples/query/react/kitchen-sink/src/features/counter/CounterList.tsx @@ -1,30 +1,38 @@ -import * as React from 'react'; -import { nanoid } from '@reduxjs/toolkit'; -import { Container } from '../common/Container'; -import { Counter } from './Counter'; +import * as React from 'react' +import { nanoid } from '@reduxjs/toolkit' +import { Container } from '../common/Container' +import { Counter } from './Counter' export const CounterList = () => { - const [counters, setCounters] = React.useState([]); + const [counters, setCounters] = React.useState([]) if (!counters.length) { return (
No counters, why don't you add one?
- +
- ); + ) } return (
- +
{counters.map((id) => ( - setCounters((prev) => prev.filter((el) => el !== id))} /> + setCounters((prev) => prev.filter((el) => el !== id))} + /> ))}
- ); -}; + ) +} diff --git a/examples/query/react/kitchen-sink/src/features/polling/PollingToggles.tsx b/examples/query/react/kitchen-sink/src/features/polling/PollingToggles.tsx index dca03216bd..c67ddc7910 100644 --- a/examples/query/react/kitchen-sink/src/features/polling/PollingToggles.tsx +++ b/examples/query/react/kitchen-sink/src/features/polling/PollingToggles.tsx @@ -1,47 +1,59 @@ -import * as React from 'react'; -import { useAppDispatch, useTypedSelector } from '../../app/store'; +import * as React from 'react' +import { useAppDispatch, useTypedSelector } from '../../app/store' import { selectGlobalPollingEnabled, selectPollingConfigByApp, toggleGlobalPolling, updatePolling, -} from './pollingSlice'; +} from './pollingSlice' const PollingToggleButton = ({ enabled, onClick, children, }: { - onClick: () => void; - enabled: boolean; - children?: React.ReactNode; + onClick: () => void + enabled: boolean + children?: React.ReactNode }) => { return ( - - ); -}; + ) +} export const PollingToggles = () => { - const dispatch = useAppDispatch(); - const globalPolling = useTypedSelector(selectGlobalPollingEnabled); - const timesPolling = useTypedSelector((state) => selectPollingConfigByApp(state, 'times')); + const dispatch = useAppDispatch() + const globalPolling = useTypedSelector(selectGlobalPollingEnabled) + const timesPolling = useTypedSelector((state) => + selectPollingConfigByApp(state, 'times'), + ) return (
Global Polling Configs
- dispatch(toggleGlobalPolling())}> + dispatch(toggleGlobalPolling())} + > Global dispatch(updatePolling({ app: 'times', enabled: !timesPolling.enabled }))} + onClick={() => + dispatch( + updatePolling({ app: 'times', enabled: !timesPolling.enabled }), + ) + } > Times
- ); -}; + ) +} diff --git a/examples/query/react/kitchen-sink/src/features/polling/pollingSlice.ts b/examples/query/react/kitchen-sink/src/features/polling/pollingSlice.ts index e193c3ba01..0a43c7a474 100644 --- a/examples/query/react/kitchen-sink/src/features/polling/pollingSlice.ts +++ b/examples/query/react/kitchen-sink/src/features/polling/pollingSlice.ts @@ -1,17 +1,17 @@ -import { createSlice, PayloadAction } from '@reduxjs/toolkit'; -import type { RootState } from '../../app/store'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import type { RootState } from '../../app/store' type PollingConfig = { - enabled: boolean; - interval: number; -}; + enabled: boolean + interval: number +} type SliceState = { - enabled: boolean; + enabled: boolean apps: { - [key: string]: PollingConfig; - }; -}; + [key: string]: PollingConfig + } +} const initialState: SliceState = { enabled: true, @@ -29,39 +29,43 @@ const initialState: SliceState = { interval: 0, }, }, -}; +} -type PollingAppKey = keyof typeof initialState['apps']; +type PollingAppKey = keyof (typeof initialState)['apps'] const slice = createSlice({ name: 'polling', initialState, reducers: { toggleGlobalPolling(state) { - state.enabled = !state.enabled; + state.enabled = !state.enabled }, updatePolling( state, { payload, }: PayloadAction<{ - app: PollingAppKey; - enabled?: boolean; - interval?: number; - }> + app: PollingAppKey + enabled?: boolean + interval?: number + }>, ) { - const { app, ...rest } = payload; + const { app, ...rest } = payload state.apps[app] = { ...state.apps[app], ...rest, - }; + } }, }, -}); +}) -export const { toggleGlobalPolling, updatePolling } = slice.actions; +export const { toggleGlobalPolling, updatePolling } = slice.actions -export default slice.reducer; +export default slice.reducer -export const selectGlobalPollingEnabled = (state: RootState) => state.polling.enabled; -export const selectPollingConfigByApp = (state: RootState, app: PollingAppKey) => state.polling.apps[app]; +export const selectGlobalPollingEnabled = (state: RootState) => + state.polling.enabled +export const selectPollingConfigByApp = ( + state: RootState, + app: PollingAppKey, +) => state.polling.apps[app] diff --git a/examples/query/react/kitchen-sink/src/features/time/TimeList.tsx b/examples/query/react/kitchen-sink/src/features/time/TimeList.tsx index 08f3b7f99c..ecca7ca3bf 100644 --- a/examples/query/react/kitchen-sink/src/features/time/TimeList.tsx +++ b/examples/query/react/kitchen-sink/src/features/time/TimeList.tsx @@ -1,10 +1,13 @@ -import * as React from 'react'; -import { nanoid } from '@reduxjs/toolkit'; -import { useEffect } from 'react'; -import { useGetTimeQuery, usePrefetchTime } from '../../app/services/times'; -import { Container } from '../common/Container'; -import { useTypedSelector } from '../../app/store'; -import { selectGlobalPollingEnabled, selectPollingConfigByApp } from '../polling/pollingSlice'; +import * as React from 'react' +import { nanoid } from '@reduxjs/toolkit' +import { useEffect } from 'react' +import { useGetTimeQuery, usePrefetchTime } from '../../app/services/times' +import { Container } from '../common/Container' +import { useTypedSelector } from '../../app/store' +import { + selectGlobalPollingEnabled, + selectPollingConfigByApp, +} from '../polling/pollingSlice' const timezones: Record = { '-12:00': '(GMT -12:00) Eniwetok, Kwajalein', @@ -47,9 +50,13 @@ const timezones: Record = { '+12:75': '(GMT +12:45) Chatham Islands', '+13:00': '(GMT +13:00) Apia, Nukualofa', '+14:00': '(GMT +14:00) Line Islands, Tokelau', -}; +} -const TimeZoneSelector = ({ onChange }: { onChange: (event: React.ChangeEvent) => void }) => { +const TimeZoneSelector = ({ + onChange, +}: { + onChange: (event: React.ChangeEvent) => void +}) => { return ( - ); -}; + ) +} const intervalOptions = [ { label: '0 - Off', value: 0 }, @@ -69,18 +76,20 @@ const intervalOptions = [ { label: '5s', value: 5000 }, { label: '10s', value: 10000 }, { label: '1m', value: 60000 }, -]; +] const TimeDisplay = ({ offset, label }: { offset: string; label: string }) => { - const globalPolling = useTypedSelector(selectGlobalPollingEnabled); - const { enabled: timesPolling } = useTypedSelector((state) => selectPollingConfigByApp(state, 'times')); + const globalPolling = useTypedSelector(selectGlobalPollingEnabled) + const { enabled: timesPolling } = useTypedSelector((state) => + selectPollingConfigByApp(state, 'times'), + ) - const canPoll = globalPolling && timesPolling; + const canPoll = globalPolling && timesPolling - const [pollingInterval, setPollingInterval] = React.useState(0); + const [pollingInterval, setPollingInterval] = React.useState(0) const { data, refetch, isFetching } = useGetTimeQuery(offset, { pollingInterval: canPoll ? pollingInterval : 0, - }); + }) return (
@@ -89,7 +98,12 @@ const TimeDisplay = ({ offset, label }: { offset: string; label: string }) => {

Polling Interval:{' '} - + setPollingInterval(Number(value)) + } + > {intervalOptions.map(({ label, value }) => (

- ); -}; + ) +} export const TimeList = () => { const [times, setTimes] = React.useState<{ [key: string]: string }>({ [nanoid()]: '-08:00', - }); - const [selectedValue, setSelectedValue] = React.useState(''); + }) + const [selectedValue, setSelectedValue] = React.useState('') - const prefetch = usePrefetchTime('getTime'); + const prefetch = usePrefetchTime('getTime') useEffect(() => { setTimeout(() => { - setTimes((prev) => ({ ...prev, [nanoid()]: '+00:00' })); - }, 1000); - }, []); + setTimes((prev) => ({ ...prev, [nanoid()]: '+00:00' })) + }, 1000) + }, []) return ( -

Add some times, even duplicates, and watch them automatically refetch in sync!

+

+ Add some times, even duplicates, and watch them automatically refetch in + sync! +

- Notes: shared queries (aka multiple entries of the same time zone) will share the lowest polling interval - between them that is greater than 0. If all entries are set to 0, it will stop polling. If you have two entries - with a polling time of 5s and one with 0 - off, it will continue at 5s until they are removed or 0'd out. + Notes: shared queries (aka multiple entries of the same time zone) will + share the lowest polling interval between them that is greater than 0. + If all entries are set to 0, it will stop polling. If you have two + entries with a polling time of 5s and one with 0 - off, it will continue + at 5s until they are removed or 0'd out.
- Any new poll starts after the last request has either finished or failed to prevent slow-running requests to - immediately double-trigger. + Any new poll starts after the last request has either finished or failed + to prevent slow-running requests to immediately double-trigger.
* Background flashes green when query is running - +

- setSelectedValue(value)} /> -
@@ -138,5 +166,5 @@ export const TimeList = () => { ))}
- ); -}; + ) +} diff --git a/examples/query/react/kitchen-sink/src/index.tsx b/examples/query/react/kitchen-sink/src/index.tsx index 6df77c3e0a..460d6ad2b6 100644 --- a/examples/query/react/kitchen-sink/src/index.tsx +++ b/examples/query/react/kitchen-sink/src/index.tsx @@ -13,7 +13,7 @@ async function render() { } const rootNode = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, ) rootNode.render( @@ -23,7 +23,7 @@ async function render() { - + , ) } diff --git a/examples/query/react/kitchen-sink/src/mocks/handlers.ts b/examples/query/react/kitchen-sink/src/mocks/handlers.ts index dd5edddee7..5ede1b6f63 100644 --- a/examples/query/react/kitchen-sink/src/mocks/handlers.ts +++ b/examples/query/react/kitchen-sink/src/mocks/handlers.ts @@ -1,113 +1,125 @@ -import { rest } from 'msw'; -import { createEntityAdapter, nanoid } from '@reduxjs/toolkit'; -import { Post } from '../app/services/posts'; +import { rest } from 'msw' +import { createEntityAdapter, nanoid } from '@reduxjs/toolkit' +import { Post } from '../app/services/posts' // We're just going to use a simple in-memory store for both the counter and posts // The entity adapter will handle modifications when triggered by the MSW handlers -let count = 0; -let startingId = 3; // Just a silly counter for usage when adding new posts +let count = 0 +let startingId = 3 // Just a silly counter for usage when adding new posts -const adapter = createEntityAdapter(); +const adapter = createEntityAdapter() -let state = adapter.getInitialState(); +let state = adapter.getInitialState() state = adapter.setAll(state, [ { id: 1, name: 'A sample post', fetched_at: new Date().toUTCString() }, - { id: 2, name: 'A post about rtk-query', fetched_at: new Date().toUTCString() }, -]); + { + id: 2, + name: 'A post about rtk-query', + fetched_at: new Date().toUTCString(), + }, +]) -export { state }; +export { state } // Just use a random id for an auth token -const token = nanoid(); +const token = nanoid() export const handlers = [ rest.get('/time/:offset', (req, res, ctx) => { - const { offset } = req.params as { offset: string }; - const date = new Date(); - const localDate = date.getTime(); // users local time - const localOffset = date.getTimezoneOffset() * 60000; - const formattedOffset = Number(offset.replace(':', '.')); - const target = localDate + localOffset + 3600000 * formattedOffset; - return res(ctx.json({ time: new Date(target).toUTCString() }), ctx.delay(400)); + const { offset } = req.params as { offset: string } + const date = new Date() + const localDate = date.getTime() // users local time + const localOffset = date.getTimezoneOffset() * 60000 + const formattedOffset = Number(offset.replace(':', '.')) + const target = localDate + localOffset + 3600000 * formattedOffset + return res( + ctx.json({ time: new Date(target).toUTCString() }), + ctx.delay(400), + ) }), rest.put<{ amount: number }>('/increment', (req, res, ctx) => { - const { amount } = req.body; - count = count += amount; + const { amount } = req.body + count = count += amount - return res(ctx.json({ count })); + return res(ctx.json({ count })) }), rest.put<{ amount: number }>('/decrement', (req, res, ctx) => { - const { amount } = req.body; - count = count -= amount; + const { amount } = req.body + count = count -= amount - return res(ctx.json({ count })); + return res(ctx.json({ count })) }), rest.get('/count', (req, res, ctx) => { - return res(ctx.json({ count })); + return res(ctx.json({ count })) }), rest.post('/login', (req, res, ctx) => { - return res.once(ctx.json({ message: 'i fail once' }), ctx.status(500)); + return res.once(ctx.json({ message: 'i fail once' }), ctx.status(500)) }), rest.post('/login', (req, res, ctx) => { - return res(ctx.json({ token, user: { first_name: 'Test', last_name: 'User' } })); + return res( + ctx.json({ token, user: { first_name: 'Test', last_name: 'User' } }), + ) }), rest.get('/posts', (req, res, ctx) => { - return res(ctx.json(Object.values(state.entities))); + return res(ctx.json(Object.values(state.entities))) }), rest.post('/posts', (req, res, ctx) => { - let post = req.body as Partial; - startingId += 1; - state = adapter.addOne(state, { ...post, id: startingId } as Post); - return res(ctx.json(Object.values(state.entities)), ctx.delay(400)); + let post = req.body as Partial + startingId += 1 + state = adapter.addOne(state, { ...post, id: startingId } as Post) + return res(ctx.json(Object.values(state.entities)), ctx.delay(400)) }), rest.get('/posts/:id', (req, res, ctx) => { const { id: idParam } = req.params as { id: string } const id = parseInt(idParam, 10) - state = adapter.updateOne(state, { id, changes: { fetched_at: new Date().toUTCString() } }); - return res(ctx.json(state.entities[id]), ctx.delay(400)); + state = adapter.updateOne(state, { + id, + changes: { fetched_at: new Date().toUTCString() }, + }) + return res(ctx.json(state.entities[id]), ctx.delay(400)) }), rest.put('/posts/:id', (req, res, ctx) => { const { id: idParam } = req.params as { id: string } const id = parseInt(idParam, 10) - const changes = req.body as Partial; + const changes = req.body as Partial - state = adapter.updateOne(state, { id, changes }); + state = adapter.updateOne(state, { id, changes }) - return res(ctx.json(state.entities[id]), ctx.delay(400)); + return res(ctx.json(state.entities[id]), ctx.delay(400)) }), rest.delete('/posts/:id', (req, res, ctx) => { const { id: idParam } = req.params as { id: string } const id = parseInt(idParam, 10) - state = adapter.removeOne(state, id); + state = adapter.removeOne(state, id) return res( ctx.json({ id, success: true, }), - ctx.delay(600) - ); + ctx.delay(600), + ) }), rest.get('/error-prone', (req, res, ctx) => { if (Math.random() > 0.1) { - return res(ctx.json({ error: 'failed!' }), ctx.status(500)); + return res(ctx.json({ error: 'failed!' }), ctx.status(500)) } return res( ctx.json({ success: true, - }) - ); + }), + ) }), -]; +] diff --git a/examples/query/react/kitchen-sink/src/mocks/setupTests.tsx b/examples/query/react/kitchen-sink/src/mocks/setupTests.tsx index 899d316d61..eee2de33b0 100644 --- a/examples/query/react/kitchen-sink/src/mocks/setupTests.tsx +++ b/examples/query/react/kitchen-sink/src/mocks/setupTests.tsx @@ -24,7 +24,7 @@ export const setupTests = () => { } function renderWithProvider( children: React.ReactChild, - { route, path }: RenderOptions = { route: '/', path: '' } + { route, path }: RenderOptions = { route: '/', path: '' }, ) { const history = createMemoryHistory() history.push(route) @@ -39,7 +39,7 @@ export const setupTests = () => { children )} - + , ) } diff --git a/examples/query/react/kitchen-sink/src/setupTests.ts b/examples/query/react/kitchen-sink/src/setupTests.ts index 74b1a275a0..2eb59b05d8 100644 --- a/examples/query/react/kitchen-sink/src/setupTests.ts +++ b/examples/query/react/kitchen-sink/src/setupTests.ts @@ -2,4 +2,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/extend-expect'; +import '@testing-library/jest-dom/extend-expect' diff --git a/examples/query/react/kitchen-sink/tsconfig.json b/examples/query/react/kitchen-sink/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/kitchen-sink/tsconfig.json +++ b/examples/query/react/kitchen-sink/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/mutations/public/index.html b/examples/query/react/mutations/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/mutations/public/index.html +++ b/examples/query/react/mutations/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/mutations/src/index.tsx b/examples/query/react/mutations/src/index.tsx index 3854044b5e..ca83c0fe6d 100644 --- a/examples/query/react/mutations/src/index.tsx +++ b/examples/query/react/mutations/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/mutations/src/mocks/db.ts b/examples/query/react/mutations/src/mocks/db.ts index 5ade9028d0..98599624e8 100644 --- a/examples/query/react/mutations/src/mocks/db.ts +++ b/examples/query/react/mutations/src/mocks/db.ts @@ -26,7 +26,7 @@ export const handlers = [ return res( ctx.json({ error: 'Oh no, there was an error, try again.' }), ctx.status(500), - ctx.delay(300) + ctx.delay(300), ) } @@ -44,7 +44,7 @@ export const handlers = [ return res( ctx.json({ error: 'Oh no, there was an error, try again.' }), ctx.status(500), - ctx.delay(300) + ctx.delay(300), ) } diff --git a/examples/query/react/mutations/tsconfig.json b/examples/query/react/mutations/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/mutations/tsconfig.json +++ b/examples/query/react/mutations/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/optimistic-update/public/index.html b/examples/query/react/optimistic-update/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/optimistic-update/public/index.html +++ b/examples/query/react/optimistic-update/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/optimistic-update/src/app/services/posts.ts b/examples/query/react/optimistic-update/src/app/services/posts.ts index 6fa771dbfe..3033e3ad2f 100644 --- a/examples/query/react/optimistic-update/src/app/services/posts.ts +++ b/examples/query/react/optimistic-update/src/app/services/posts.ts @@ -43,7 +43,7 @@ export const api = createApi({ const patchResult = dispatch( api.util.updateQueryData('getPost', id, (draft) => { Object.assign(draft, patch) - }) + }), ) try { await queryFulfilled diff --git a/examples/query/react/optimistic-update/src/index.tsx b/examples/query/react/optimistic-update/src/index.tsx index 5d044d74eb..9440268a89 100644 --- a/examples/query/react/optimistic-update/src/index.tsx +++ b/examples/query/react/optimistic-update/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/optimistic-update/src/mocks/db.ts b/examples/query/react/optimistic-update/src/mocks/db.ts index 73ec3f64a7..98e6857860 100644 --- a/examples/query/react/optimistic-update/src/mocks/db.ts +++ b/examples/query/react/optimistic-update/src/mocks/db.ts @@ -19,7 +19,7 @@ export const handlers = [ return res( ctx.json({ error: 'Oh no, there was an error' }), ctx.status(500), - ctx.delay(400) + ctx.delay(400), ) } diff --git a/examples/query/react/optimistic-update/tsconfig.json b/examples/query/react/optimistic-update/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/optimistic-update/tsconfig.json +++ b/examples/query/react/optimistic-update/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/pagination/public/index.html b/examples/query/react/pagination/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/pagination/public/index.html +++ b/examples/query/react/pagination/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/pagination/src/app/services/posts.ts b/examples/query/react/pagination/src/app/services/posts.ts index 0b50ae3b64..b4863852b2 100644 --- a/examples/query/react/pagination/src/app/services/posts.ts +++ b/examples/query/react/pagination/src/app/services/posts.ts @@ -7,7 +7,7 @@ export interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/pagination/src/features/posts/PostsManager.tsx b/examples/query/react/pagination/src/features/posts/PostsManager.tsx index 9a790c7e9f..52f3b824a9 100644 --- a/examples/query/react/pagination/src/features/posts/PostsManager.tsx +++ b/examples/query/react/pagination/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: Post['status']) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/pagination/src/index.tsx b/examples/query/react/pagination/src/index.tsx index 5d044d74eb..9440268a89 100644 --- a/examples/query/react/pagination/src/index.tsx +++ b/examples/query/react/pagination/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/pagination/src/mocks/db.ts b/examples/query/react/pagination/src/mocks/db.ts index 5dc3d0968b..89703a4617 100644 --- a/examples/query/react/pagination/src/mocks/db.ts +++ b/examples/query/react/pagination/src/mocks/db.ts @@ -50,7 +50,7 @@ export const handlers = [ page, total_pages: Math.ceil(db.post.count() / per_page), total: db.post.count(), - }) + }), ) }), ...db.post.toHandlers('rest'), diff --git a/examples/query/react/pagination/tsconfig.json b/examples/query/react/pagination/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/pagination/tsconfig.json +++ b/examples/query/react/pagination/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/polling/public/index.html b/examples/query/react/polling/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/polling/public/index.html +++ b/examples/query/react/polling/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/polling/src/Pokemon.tsx b/examples/query/react/polling/src/Pokemon.tsx index 342023c135..e572b83cdd 100644 --- a/examples/query/react/polling/src/Pokemon.tsx +++ b/examples/query/react/polling/src/Pokemon.tsx @@ -15,18 +15,13 @@ const getRandomIntervalValue = () => export const Pokemon = ({ name }: { name: PokemonName }) => { const [pollingInterval, setPollingInterval] = React.useState( - getRandomIntervalValue() + getRandomIntervalValue(), ) - const { - data, - error, - isLoading, - isFetching, - refetch, - } = useGetPokemonByNameQuery(name, { - pollingInterval, - }) + const { data, error, isLoading, isFetching, refetch } = + useGetPokemonByNameQuery(name, { + pollingInterval, + }) return (
- + , ) diff --git a/examples/query/react/polling/src/pokemon.data.ts b/examples/query/react/polling/src/pokemon.data.ts index 1617ce9e50..22eb3a0547 100644 --- a/examples/query/react/polling/src/pokemon.data.ts +++ b/examples/query/react/polling/src/pokemon.data.ts @@ -152,4 +152,4 @@ export const POKEMON_NAMES = [ 'mew', ] as const -export type PokemonName = typeof POKEMON_NAMES[number] +export type PokemonName = (typeof POKEMON_NAMES)[number] diff --git a/examples/query/react/polling/tsconfig.json b/examples/query/react/polling/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/polling/tsconfig.json +++ b/examples/query/react/polling/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/examples/query/react/prefetching-automatic-waterfall/public/index.html b/examples/query/react/prefetching-automatic-waterfall/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/prefetching-automatic-waterfall/public/index.html +++ b/examples/query/react/prefetching-automatic-waterfall/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/prefetching-automatic-waterfall/src/app/services/posts.ts b/examples/query/react/prefetching-automatic-waterfall/src/app/services/posts.ts index e8cb02f9e4..d4032ef9cf 100644 --- a/examples/query/react/prefetching-automatic-waterfall/src/app/services/posts.ts +++ b/examples/query/react/prefetching-automatic-waterfall/src/app/services/posts.ts @@ -7,7 +7,7 @@ export interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/prefetching-automatic-waterfall/src/features/posts/PostsManager.tsx b/examples/query/react/prefetching-automatic-waterfall/src/features/posts/PostsManager.tsx index e8cea9b348..eb093dade1 100644 --- a/examples/query/react/prefetching-automatic-waterfall/src/features/posts/PostsManager.tsx +++ b/examples/query/react/prefetching-automatic-waterfall/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: Post['status']) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/prefetching-automatic-waterfall/src/index.tsx b/examples/query/react/prefetching-automatic-waterfall/src/index.tsx index 5d044d74eb..9440268a89 100644 --- a/examples/query/react/prefetching-automatic-waterfall/src/index.tsx +++ b/examples/query/react/prefetching-automatic-waterfall/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/prefetching-automatic-waterfall/src/mocks/db.ts b/examples/query/react/prefetching-automatic-waterfall/src/mocks/db.ts index 5dc3d0968b..89703a4617 100644 --- a/examples/query/react/prefetching-automatic-waterfall/src/mocks/db.ts +++ b/examples/query/react/prefetching-automatic-waterfall/src/mocks/db.ts @@ -50,7 +50,7 @@ export const handlers = [ page, total_pages: Math.ceil(db.post.count() / per_page), total: db.post.count(), - }) + }), ) }), ...db.post.toHandlers('rest'), diff --git a/examples/query/react/prefetching-automatic-waterfall/tsconfig.json b/examples/query/react/prefetching-automatic-waterfall/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/prefetching-automatic-waterfall/tsconfig.json +++ b/examples/query/react/prefetching-automatic-waterfall/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/prefetching-automatic/public/index.html b/examples/query/react/prefetching-automatic/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/prefetching-automatic/public/index.html +++ b/examples/query/react/prefetching-automatic/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/prefetching-automatic/src/app/services/posts.ts b/examples/query/react/prefetching-automatic/src/app/services/posts.ts index e8cb02f9e4..d4032ef9cf 100644 --- a/examples/query/react/prefetching-automatic/src/app/services/posts.ts +++ b/examples/query/react/prefetching-automatic/src/app/services/posts.ts @@ -7,7 +7,7 @@ export interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/prefetching-automatic/src/features/posts/PostsManager.tsx b/examples/query/react/prefetching-automatic/src/features/posts/PostsManager.tsx index ce01a87daf..3435481082 100644 --- a/examples/query/react/prefetching-automatic/src/features/posts/PostsManager.tsx +++ b/examples/query/react/prefetching-automatic/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: Post['status']) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/prefetching-automatic/src/index.tsx b/examples/query/react/prefetching-automatic/src/index.tsx index 5d044d74eb..9440268a89 100644 --- a/examples/query/react/prefetching-automatic/src/index.tsx +++ b/examples/query/react/prefetching-automatic/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/prefetching-automatic/src/mocks/db.ts b/examples/query/react/prefetching-automatic/src/mocks/db.ts index 5dc3d0968b..89703a4617 100644 --- a/examples/query/react/prefetching-automatic/src/mocks/db.ts +++ b/examples/query/react/prefetching-automatic/src/mocks/db.ts @@ -50,7 +50,7 @@ export const handlers = [ page, total_pages: Math.ceil(db.post.count() / per_page), total: db.post.count(), - }) + }), ) }), ...db.post.toHandlers('rest'), diff --git a/examples/query/react/prefetching-automatic/tsconfig.json b/examples/query/react/prefetching-automatic/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/prefetching-automatic/tsconfig.json +++ b/examples/query/react/prefetching-automatic/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/prefetching/public/index.html b/examples/query/react/prefetching/public/index.html index 09e975e218..e65acb3de5 100644 --- a/examples/query/react/prefetching/public/index.html +++ b/examples/query/react/prefetching/public/index.html @@ -1,4 +1,4 @@ - + @@ -41,4 +41,3 @@ --> - diff --git a/examples/query/react/prefetching/src/app/services/posts.ts b/examples/query/react/prefetching/src/app/services/posts.ts index e8cb02f9e4..d4032ef9cf 100644 --- a/examples/query/react/prefetching/src/app/services/posts.ts +++ b/examples/query/react/prefetching/src/app/services/posts.ts @@ -7,7 +7,7 @@ export interface Post { title: string author: string content: string - status: typeof postStatuses[number] + status: (typeof postStatuses)[number] created_at: string updated_at: string } diff --git a/examples/query/react/prefetching/src/features/posts/PostsManager.tsx b/examples/query/react/prefetching/src/features/posts/PostsManager.tsx index 2aaebf2c7c..5999215a98 100644 --- a/examples/query/react/prefetching/src/features/posts/PostsManager.tsx +++ b/examples/query/react/prefetching/src/features/posts/PostsManager.tsx @@ -23,8 +23,8 @@ const getColorForStatus = (status: Post['status']) => { return status === 'draft' ? 'gray' : status === 'pending_review' - ? 'orange' - : 'green' + ? 'orange' + : 'green' } const PostList = () => { diff --git a/examples/query/react/prefetching/src/index.tsx b/examples/query/react/prefetching/src/index.tsx index 5d044d74eb..9440268a89 100644 --- a/examples/query/react/prefetching/src/index.tsx +++ b/examples/query/react/prefetching/src/index.tsx @@ -19,6 +19,6 @@ worker.start({ quiet: true }).then(() => - - ) + , + ), ) diff --git a/examples/query/react/prefetching/src/mocks/db.ts b/examples/query/react/prefetching/src/mocks/db.ts index 5dc3d0968b..89703a4617 100644 --- a/examples/query/react/prefetching/src/mocks/db.ts +++ b/examples/query/react/prefetching/src/mocks/db.ts @@ -50,7 +50,7 @@ export const handlers = [ page, total_pages: Math.ceil(db.post.count() / per_page), total: db.post.count(), - }) + }), ) }), ...db.post.toHandlers('rest'), diff --git a/examples/query/react/prefetching/tsconfig.json b/examples/query/react/prefetching/tsconfig.json index 5f488e8e73..7f331f6806 100644 --- a/examples/query/react/prefetching/tsconfig.json +++ b/examples/query/react/prefetching/tsconfig.json @@ -1,14 +1,9 @@ { - "include": [ - "./src/**/*" - ], + "include": ["./src/**/*"], "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], + "lib": ["dom", "es2015"], "jsx": "react-jsx", "target": "es5", "allowJs": true, @@ -20,6 +15,6 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true - } + "noEmit": true, + }, } diff --git a/examples/query/react/with-apiprovider/public/index.html b/examples/query/react/with-apiprovider/public/index.html index 42ae2d2dcb..efbc007a8b 100644 --- a/examples/query/react/with-apiprovider/public/index.html +++ b/examples/query/react/with-apiprovider/public/index.html @@ -1,17 +1,19 @@ - + - - - - - - - - - - React App - + React App + - - -
- - - - \ No newline at end of file + + diff --git a/examples/query/react/with-apiprovider/src/App.tsx b/examples/query/react/with-apiprovider/src/App.tsx index a91982c4b9..f8ded9f1b6 100644 --- a/examples/query/react/with-apiprovider/src/App.tsx +++ b/examples/query/react/with-apiprovider/src/App.tsx @@ -14,9 +14,8 @@ const api = createApi({ }) function Pokemon() { - const { data, refetch, isFetching } = api.useGetPokemonByNameQuery( - 'bulbasaur' - ) + const { data, refetch, isFetching } = + api.useGetPokemonByNameQuery('bulbasaur') return (
diff --git a/examples/query/react/with-apiprovider/tsconfig.json b/examples/query/react/with-apiprovider/tsconfig.json index d4eea2ea4b..7f331f6806 100644 --- a/examples/query/react/with-apiprovider/tsconfig.json +++ b/examples/query/react/with-apiprovider/tsconfig.json @@ -1,25 +1,20 @@ { - "include": [ - "./src/**/*" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "lib": [ - "dom", - "es2015" - ], - "jsx": "react-jsx", - "target": "es5", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true - } -} \ No newline at end of file + "include": ["./src/**/*"], + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "lib": ["dom", "es2015"], + "jsx": "react-jsx", + "target": "es5", + "allowJs": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + }, +} diff --git a/packages/rtk-codemods/.github/workflows/ci.yml b/packages/rtk-codemods/.github/workflows/ci.yml index ec853b3887..a4dd4e2ed0 100644 --- a/packages/rtk-codemods/.github/workflows/ci.yml +++ b/packages/rtk-codemods/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: - '*' pull_request: {} schedule: - - cron: '0 6 * * 0' # weekly, on sundays + - cron: '0 6 * * 0' # weekly, on sundays jobs: lint: @@ -18,14 +18,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: install dependencies - run: yarn install --frozen-lockfile - - name: linting - run: yarn lint + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: install dependencies + run: yarn install --frozen-lockfile + - name: linting + run: yarn lint test: name: Tests @@ -36,25 +36,25 @@ jobs: node: ['10', '12', '14'] steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - name: install dependencies - run: yarn install --frozen-lockfile - - name: test - run: yarn test + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - name: install dependencies + run: yarn install --frozen-lockfile + - name: test + run: yarn test floating-test: name: Floating dependencies runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: install dependencies - run: yarn install --no-lockfile - - name: test - run: yarn test \ No newline at end of file + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: install dependencies + run: yarn install --no-lockfile + - name: test + run: yarn test diff --git a/packages/rtk-codemods/transforms/createReducerBuilder/README.md b/packages/rtk-codemods/transforms/createReducerBuilder/README.md index 52898146e9..1c91761f45 100644 --- a/packages/rtk-codemods/transforms/createReducerBuilder/README.md +++ b/packages/rtk-codemods/transforms/createReducerBuilder/README.md @@ -39,30 +39,36 @@ node ./bin/cli.js createReducerBuilder path/of/files/ or/some**/*glob.js createReducer(initialState, { [todoAdded]: (state: SliceState, action: PayloadAction) => { // stuff - }, -}); + } +}) createReducer(initialState, { [todoAdded](state: SliceState, action: PayloadAction) { // stuff - }, -}); + } +}) ``` **Output** ([basic-ts.output.ts](transforms\createReducerBuilder__testfixtures__\basic-ts.output.ts)): ```ts createReducer(initialState, (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); -}); + builder.addCase( + todoAdded, + (state: SliceState, action: PayloadAction) => { + // stuff + } + ) +}) createReducer(initialState, (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); -}); + builder.addCase( + todoAdded, + (state: SliceState, action: PayloadAction) => { + // stuff + } + ) +}) ``` --- @@ -88,8 +94,8 @@ createReducer(initialState, { }, todoAdded1f: (state, action) => { //stuff - }, -}); + } +}) createReducer(initialState, { [todoAdded2a]: (state, action) => { @@ -100,8 +106,8 @@ createReducer(initialState, { }, [todoAdded2c]: function (state, action) { // stuff - }, -}); + } +}) ``` **Output** ([basic.output.js](transforms\createReducerBuilder__testfixtures__\basic.output.js)): @@ -110,40 +116,40 @@ createReducer(initialState, { createReducer(initialState, (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff - }); + }) - builder.addCase(todoAdded1b, (state, action) => action.payload); + builder.addCase(todoAdded1b, (state, action) => action.payload) builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1d, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1e, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1f, (state, action) => { //stuff - }); -}); + }) +}) createReducer(initialState, (builder) => { builder.addCase(todoAdded2a, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2b, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2c, (state, action) => { // stuff - }); -}); + }) +}) ``` diff --git a/packages/rtk-codemods/transforms/createSliceBuilder/README.md b/packages/rtk-codemods/transforms/createSliceBuilder/README.md index 5a15c86682..1db6f8f6de 100644 --- a/packages/rtk-codemods/transforms/createSliceBuilder/README.md +++ b/packages/rtk-codemods/transforms/createSliceBuilder/README.md @@ -42,9 +42,9 @@ const slice1 = createSlice({ extraReducers: { [todoAdded]: (state: SliceState, action: PayloadAction) => { // stuff - }, - }, -}); + } + } +}) const slice2 = createSlice({ name: 'b', @@ -52,9 +52,9 @@ const slice2 = createSlice({ extraReducers: { [todoAdded](state: SliceState, action: PayloadAction) { // stuff - }, - }, -}); + } + } +}) ``` **Output** ([basic-ts.output.ts](transforms\createSliceBuilder__testfixtures__\basic-ts.output.ts)): @@ -65,22 +65,28 @@ const slice1 = createSlice({ initialState, extraReducers: (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); - }, -}); + builder.addCase( + todoAdded, + (state: SliceState, action: PayloadAction) => { + // stuff + } + ) + } +}) const slice2 = createSlice({ name: 'b', initialState, extraReducers: (builder) => { - builder.addCase(todoAdded, (state: SliceState, action: PayloadAction) => { - // stuff - }); - }, -}); + builder.addCase( + todoAdded, + (state: SliceState, action: PayloadAction) => { + // stuff + } + ) + } +}) ``` --- @@ -109,9 +115,9 @@ const slice1 = createSlice({ }, todoAdded1f: (state, action) => { //stuff - }, - }, -}); + } + } +}) const slice2 = createSlice({ name: 'b', @@ -125,9 +131,9 @@ const slice2 = createSlice({ }, [todoAdded2c]: function (state, action) { // stuff - }, - }, -}); + } + } +}) ``` **Output** ([basic.output.js](transforms\createSliceBuilder__testfixtures__\basic.output.js)): @@ -140,27 +146,27 @@ const slice1 = createSlice({ extraReducers: (builder) => { builder.addCase(todoAdded1a, (state, action) => { // stuff - }); + }) - builder.addCase(todoAdded1b, (state, action) => action.payload); + builder.addCase(todoAdded1b, (state, action) => action.payload) builder.addCase(todoAdded1c + 'test', (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1d, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1e, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded1f, (state, action) => { //stuff - }); - }, -}); + }) + } +}) const slice2 = createSlice({ name: 'b', @@ -169,17 +175,17 @@ const slice2 = createSlice({ extraReducers: (builder) => { builder.addCase(todoAdded2a, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2b, (state, action) => { // stuff - }); + }) builder.addCase(todoAdded2c, (state, action) => { // stuff - }); - }, -}); + }) + } +}) ``` diff --git a/packages/rtk-query-codegen-openapi/ChangeLog.md b/packages/rtk-query-codegen-openapi/ChangeLog.md index b4dffc2183..8e1b25535c 100644 --- a/packages/rtk-query-codegen-openapi/ChangeLog.md +++ b/packages/rtk-query-codegen-openapi/ChangeLog.md @@ -11,24 +11,28 @@ This version adds a new `mergeReadWriteOnly` configuration option (default to `f ## 1.1.3 - 2023-10-11 ### Added + - Adds a temporary workaround for [4.9.0 and 4.10.0 generate circular types oazapfts/oazapfts#491](https://github.com/oazapfts/oazapfts/issues/491) ## 1.1.2 - 2023-10-11 ### Added -- Support for Read Only Properties in the Open API spec. Previously, this property was ignored. + +- Support for Read Only Properties in the Open API spec. Previously, this property was ignored. - Now if the readOnly property is present and set to `true` in a schema, it will split the type into two types: one with the read only property suffixed as 'Read' and the other without the read only properties, using the same type name as before. - This may cause issues if you had your OpenAPI spec properly typed/configured, as it will remove the read onyl types from your existing type. You will need to switch to the new type suffixed as 'Read' to avoid missing property names. -## 1.1.1 - 2023-10-11 +## 1.1.1 - 2023-10-11 ### Changed + - Codegen: better handling of duplicate param names ([Codegen: better handling of duplicate param names #3780](https://github.com/reduxjs/redux-toolkit/pull/3780)) - If a parameter name is both used in a query and a parameter, it will be prefixed with `query`/`param` now to avoid conflicts -## 1.1.0 - 2023-10-11 +## 1.1.0 - 2023-10-11 ### Added + - Option of generating real TS enums instead of string unions [Adds the option of generating real TS enums instead of string unions #2854](https://github.com/reduxjs/redux-toolkit/pull/2854) - Compatibility with TypeScript 5.x versions as the codegen relies on the TypeScript AST for code generation - As a result also needs a higher TypeScript version to work with (old version range was 4.1-4.5) diff --git a/packages/rtk-query-codegen-openapi/src/generate.ts b/packages/rtk-query-codegen-openapi/src/generate.ts index 6e26697ac1..9c5c00c158 100644 --- a/packages/rtk-query-codegen-openapi/src/generate.ts +++ b/packages/rtk-query-codegen-openapi/src/generate.ts @@ -175,13 +175,13 @@ export async function generateApi( ...apiGen.enumAliases, ...(hooks ? [ - generateReactHooks({ - exportName: generatedApiName, - operationDefinitions, - endpointOverrides, - config: hooks, - }), - ] + generateReactHooks({ + exportName: generatedApiName, + operationDefinitions, + endpointOverrides, + config: hooks, + }), + ] : []), ], factory.createToken(ts.SyntaxKind.EndOfFileToken), @@ -301,7 +301,9 @@ export async function generateApi( const body = apiGen.resolve(requestBody); const schema = apiGen.getSchemaFromContent(body.content); const type = apiGen.getTypeFromSchema(schema); - const schemaName = camelCase((type as any).name || getReferenceName(schema) || ("title" in schema && schema.title) || 'body'); + const schemaName = camelCase( + (type as any).name || getReferenceName(schema) || ('title' in schema && schema.title) || 'body' + ); const name = generateName(schemaName in queryArg ? 'body' : schemaName, 'body'); queryArg[name] = { @@ -335,19 +337,19 @@ export async function generateApi( ? isFlatArg ? withQueryComment({ ...queryArgValues[0].type }, queryArgValues[0], false) : factory.createTypeLiteralNode( - queryArgValues.map((def) => - withQueryComment( - factory.createPropertySignature( - undefined, - propertyName(def.name), - createQuestionToken(!def.required), - def.type - ), - def, - true + queryArgValues.map((def) => + withQueryComment( + factory.createPropertySignature( + undefined, + propertyName(def.name), + createQuestionToken(!def.required), + def.type + ), + def, + true + ) ) ) - ) : factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword) ) ).name @@ -391,18 +393,18 @@ export async function generateApi( return parameters.length === 0 ? undefined : factory.createPropertyAssignment( - factory.createIdentifier(propertyName), - factory.createObjectLiteralExpression( - parameters.map( - (param) => - createPropertyAssignment( - param.originalName, - isFlatArg ? rootObject : accessProperty(rootObject, param.name) - ), - true + factory.createIdentifier(propertyName), + factory.createObjectLiteralExpression( + parameters.map( + (param) => + createPropertyAssignment( + param.originalName, + isFlatArg ? rootObject : accessProperty(rootObject, param.name) + ), + true + ) ) - ) - ); + ); } return factory.createArrowFunction( @@ -423,17 +425,17 @@ export async function generateApi( isQuery && verb.toUpperCase() === 'GET' ? undefined : factory.createPropertyAssignment( - factory.createIdentifier('method'), - factory.createStringLiteral(verb.toUpperCase()) - ), + factory.createIdentifier('method'), + factory.createStringLiteral(verb.toUpperCase()) + ), bodyParameter === undefined ? undefined : factory.createPropertyAssignment( - factory.createIdentifier('body'), - isFlatArg - ? rootObject - : factory.createPropertyAccessExpression(rootObject, factory.createIdentifier(bodyParameter.name)) - ), + factory.createIdentifier('body'), + isFlatArg + ? rootObject + : factory.createPropertyAccessExpression(rootObject, factory.createIdentifier(bodyParameter.name)) + ), createObjectLiteralProperty(pickParams('cookie'), 'cookies'), createObjectLiteralProperty(pickParams('header'), 'headers'), createObjectLiteralProperty(pickParams('query'), 'params'), @@ -445,12 +447,12 @@ export async function generateApi( } // eslint-disable-next-line no-empty-pattern - function generateQueryEndpointProps({ }: { operationDefinition: OperationDefinition }): ObjectPropertyDefinitions { + function generateQueryEndpointProps({}: { operationDefinition: OperationDefinition }): ObjectPropertyDefinitions { return {}; /* TODO needs implementation - skip for now */ } // eslint-disable-next-line no-empty-pattern - function generateMutationEndpointProps({ }: { operationDefinition: OperationDefinition }): ObjectPropertyDefinitions { + function generateMutationEndpointProps({}: { operationDefinition: OperationDefinition }): ObjectPropertyDefinitions { return {}; /* TODO needs implementation - skip for now */ } } @@ -480,16 +482,16 @@ function generatePathExpression( return expressions.length ? factory.createTemplateExpression( - factory.createTemplateHead(head), - expressions.map(([prop, literal], index) => - factory.createTemplateSpan( - isFlatArg ? rootObject : accessProperty(rootObject, prop), - index === expressions.length - 1 - ? factory.createTemplateTail(literal) - : factory.createTemplateMiddle(literal) + factory.createTemplateHead(head), + expressions.map(([prop, literal], index) => + factory.createTemplateSpan( + isFlatArg ? rootObject : accessProperty(rootObject, prop), + index === expressions.length - 1 + ? factory.createTemplateTail(literal) + : factory.createTemplateMiddle(literal) + ) ) ) - ) : factory.createNoSubstitutionTemplateLiteral(head); } @@ -500,13 +502,13 @@ type QueryArgDefinition = { required?: boolean; param?: OpenAPIV3.ParameterObject; } & ( - | { + | { origin: 'param'; param: OpenAPIV3.ParameterObject; } - | { + | { origin: 'body'; body: OpenAPIV3.RequestBodyObject; } - ); +); type QueryArgDefinitions = Record; diff --git a/packages/rtk-query-codegen-openapi/src/types.ts b/packages/rtk-query-codegen-openapi/src/types.ts index bc6fba5d74..701060a6bf 100644 --- a/packages/rtk-query-codegen-openapi/src/types.ts +++ b/packages/rtk-query-codegen-openapi/src/types.ts @@ -2,7 +2,7 @@ import type { OpenAPIV3 } from 'openapi-types'; export type OperationDefinition = { path: string; - verb: typeof operationKeys[number]; + verb: (typeof operationKeys)[number]; pathItem: OpenAPIV3.PathItemObject; operation: OpenAPIV3.OperationObject; }; diff --git a/packages/rtk-query-codegen-openapi/src/utils/getOperationDefinitions.ts b/packages/rtk-query-codegen-openapi/src/utils/getOperationDefinitions.ts index 5cd3854d28..16f1a6f3e7 100644 --- a/packages/rtk-query-codegen-openapi/src/utils/getOperationDefinitions.ts +++ b/packages/rtk-query-codegen-openapi/src/utils/getOperationDefinitions.ts @@ -7,7 +7,7 @@ export function getOperationDefinitions(v3Doc: OpenAPIV3.Document): OperationDef !pathItem ? [] : Object.entries(pathItem) - .filter((arg): arg is [typeof operationKeys[number], OpenAPIV3.OperationObject] => + .filter((arg): arg is [(typeof operationKeys)[number], OpenAPIV3.OperationObject] => operationKeys.includes(arg[0] as any) ) .map(([verb, operation]) => ({ diff --git a/packages/rtk-query-codegen-openapi/src/utils/isQuery.ts b/packages/rtk-query-codegen-openapi/src/utils/isQuery.ts index 8bb779ce17..2cf756e676 100644 --- a/packages/rtk-query-codegen-openapi/src/utils/isQuery.ts +++ b/packages/rtk-query-codegen-openapi/src/utils/isQuery.ts @@ -1,6 +1,6 @@ import type { EndpointOverrides, operationKeys } from '../types'; -export function isQuery(verb: typeof operationKeys[number], overrides: EndpointOverrides | undefined) { +export function isQuery(verb: (typeof operationKeys)[number], overrides: EndpointOverrides | undefined) { if (overrides?.type) { return overrides.type === 'query'; } diff --git a/packages/rtk-query-codegen-openapi/test/generateEndpoints.test.ts b/packages/rtk-query-codegen-openapi/test/generateEndpoints.test.ts index 8171f0ca6f..d922e7ff55 100644 --- a/packages/rtk-query-codegen-openapi/test/generateEndpoints.test.ts +++ b/packages/rtk-query-codegen-openapi/test/generateEndpoints.test.ts @@ -379,7 +379,7 @@ describe('openapi spec', () => { unionUndefined: true, schemaFile: './fixtures/readOnlyWriteOnly.yaml', apiFile: './fixtures/emptyApi.ts', - mergeReadWriteOnly: true + mergeReadWriteOnly: true, }); expect(api).toMatchSnapshot(); }); diff --git a/packages/rtk-query-codegen-openapi/test/tsconfig.json b/packages/rtk-query-codegen-openapi/test/tsconfig.json index 499c1c5631..1c8d5b68ec 100644 --- a/packages/rtk-query-codegen-openapi/test/tsconfig.json +++ b/packages/rtk-query-codegen-openapi/test/tsconfig.json @@ -3,7 +3,7 @@ "lib": ["es2019"], "paths": { "@/*": ["./test/fixtures/*"], - "@rtk-query/codegen-openapi": ["./src"] + "@rtk-query/codegen-openapi": ["./src"], }, "allowSyntheticDefaultImports": true, "esModuleInterop": true, @@ -17,6 +17,6 @@ "resolveJsonModule": true, "types": ["node", "jest"], "allowJs": true, - "checkJs": true - } + "checkJs": true, + }, } diff --git a/packages/rtk-query-codegen-openapi/tsconfig.json b/packages/rtk-query-codegen-openapi/tsconfig.json index 28cad6ed33..6527f11b9d 100644 --- a/packages/rtk-query-codegen-openapi/tsconfig.json +++ b/packages/rtk-query-codegen-openapi/tsconfig.json @@ -66,7 +66,7 @@ /* Advanced Options */ "skipLibCheck": true /* Skip type checking of declaration files. */, - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, }, - "exclude": ["test", "lib"] + "exclude": ["test", "lib"], } diff --git a/packages/rtk-query-graphql-request-base-query/src/GraphqlBaseQueryTypes.ts b/packages/rtk-query-graphql-request-base-query/src/GraphqlBaseQueryTypes.ts index 0c34984567..562d85ae32 100644 --- a/packages/rtk-query-graphql-request-base-query/src/GraphqlBaseQueryTypes.ts +++ b/packages/rtk-query-graphql-request-base-query/src/GraphqlBaseQueryTypes.ts @@ -3,21 +3,24 @@ import type { GraphQLClient, RequestOptions, RequestDocument, - ClientError + ClientError, } from 'graphql-request' export type Document = RequestDocument export type RequestHeaders = RequestOptions['requestHeaders'] export type PrepareHeaders = ( headers: Headers, - api: Pick + api: Pick< + BaseQueryApi, + 'getState' | 'endpoint' | 'type' | 'forced' | 'extra' + >, ) => MaybePromise export type ErrorResponse = { - message: string; - stack: string; - name: string; -}; + message: string + stack: string + name: string +} export type GraphqlRequestBaseQueryArgs = ( | { @@ -26,8 +29,8 @@ export type GraphqlRequestBaseQueryArgs = ( | { client: GraphQLClient } ) & { requestHeaders?: RequestHeaders - prepareHeaders?: PrepareHeaders, - customErrors?: (args: ClientError) => E; + prepareHeaders?: PrepareHeaders + customErrors?: (args: ClientError) => E } export type QueryReturnValue = diff --git a/packages/rtk-query-graphql-request-base-query/src/index.ts b/packages/rtk-query-graphql-request-base-query/src/index.ts index 481ed629ac..b796c5d6d8 100644 --- a/packages/rtk-query-graphql-request-base-query/src/index.ts +++ b/packages/rtk-query-graphql-request-base-query/src/index.ts @@ -10,7 +10,7 @@ import type { } from './GraphqlBaseQueryTypes' export const graphqlRequestBaseQuery = ( - options: GraphqlRequestBaseQueryArgs + options: GraphqlRequestBaseQueryArgs, ): BaseQueryFn< { document: string | DocumentNode; variables?: any }, unknown, @@ -24,7 +24,7 @@ export const graphqlRequestBaseQuery = ( return async ( { document, variables }, - { getState, endpoint, forced, type, signal, extra } + { getState, endpoint, forced, type, signal, extra }, ) => { try { const prepareHeaders: PrepareHeaders = diff --git a/packages/rtk-query-graphql-request-base-query/tsconfig.json b/packages/rtk-query-graphql-request-base-query/tsconfig.json index 98694b0257..076aee3602 100644 --- a/packages/rtk-query-graphql-request-base-query/tsconfig.json +++ b/packages/rtk-query-graphql-request-base-query/tsconfig.json @@ -4,8 +4,8 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */, + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ @@ -25,7 +25,7 @@ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ + "strict": true /* Enable all strict type-checking options. */, // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ @@ -51,7 +51,7 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ @@ -66,10 +66,8 @@ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, }, - "include": [ - "**/*.ts" - ] + "include": ["**/*.ts"], } diff --git a/website/src/css/custom.css b/website/src/css/custom.css index 4a61c52f6d..5bb4d94df8 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -173,12 +173,16 @@ a:visited { transform: rotateZ(180deg); -webkit-transition: -webkit-transform 0.2s linear; transition: -webkit-transform 0.2s linear; - transition-property: transform, -webkit-transform; + transition-property: + transform, + -webkit-transform; transition-duration: 0.2s, 0.2s; transition-timing-function: linear, linear; transition-delay: 0s, 0s; transition: transform 0.2s linear; - transition: transform 0.2s linear, -webkit-transform 0.2s linear; + transition: + transform 0.2s linear, + -webkit-transform 0.2s linear; color: var(--ifm-font-base-color) !important; } diff --git a/website/src/js/monokaiTheme.js b/website/src/js/monokaiTheme.js index e5c47f8be9..94e5cb451c 100644 --- a/website/src/js/monokaiTheme.js +++ b/website/src/js/monokaiTheme.js @@ -1,62 +1,62 @@ module.exports = { plain: { color: '#f8f8f2', - backgroundColor: '#272822' + backgroundColor: '#272822', }, styles: [ { types: ['comment', 'prolog', 'doctype', 'cdata'], style: { - color: '#778090' - } + color: '#778090', + }, }, { types: ['punctuation'], style: { - color: '#F8F8F2' - } + color: '#F8F8F2', + }, }, { types: ['property', 'tag', 'constant', 'symbol', 'deleted'], style: { - color: '#F92672' - } + color: '#F92672', + }, }, { types: ['boolean', 'number'], style: { - color: '#AE81FF' - } + color: '#AE81FF', + }, }, { types: ['selector', 'attr-name', 'string', 'char', 'builtin', 'inserted'], style: { - color: '#a6e22e' - } + color: '#a6e22e', + }, }, { types: ['operator', 'entity', 'url', 'variable'], style: { - color: '#F8F8F2' - } + color: '#F8F8F2', + }, }, { types: ['atrule', 'attr-value', 'function'], style: { - color: '#E6D874' - } + color: '#E6D874', + }, }, { types: ['keyword'], style: { - color: '#F92672' - } + color: '#F92672', + }, }, { types: ['regex', 'important'], style: { - color: '#FD971F' - } - } - ] + color: '#FD971F', + }, + }, + ], } diff --git a/website/src/pages/styles.module.css b/website/src/pages/styles.module.css index e8184048bd..54f977306d 100644 --- a/website/src/pages/styles.module.css +++ b/website/src/pages/styles.module.css @@ -99,7 +99,6 @@ margin-top: 0; } - .errorDetails { color: #ff6464; border-radius: 0.5rem; From efb1ebd35814bfbcd90670ab644572d1886a774e Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Mon, 29 Jan 2024 14:04:55 +0000 Subject: [PATCH 368/368] Fix RetryOptions type test by flipping order --- packages/toolkit/src/query/tests/retry.test-d.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/toolkit/src/query/tests/retry.test-d.ts b/packages/toolkit/src/query/tests/retry.test-d.ts index b9476a13c0..26a9eb210f 100644 --- a/packages/toolkit/src/query/tests/retry.test-d.ts +++ b/packages/toolkit/src/query/tests/retry.test-d.ts @@ -2,11 +2,17 @@ import type { RetryOptions } from '@internal/query/retry' describe('type tests', () => { test('RetryOptions only accepts one of maxRetries or retryCondition', () => { + // Should not complain if only `maxRetries` exists + expectTypeOf({ maxRetries: 5 }).toMatchTypeOf() + + // Should not complain if only `retryCondition` exists + expectTypeOf({ retryCondition: () => false }).toMatchTypeOf() + // Should complain if both `maxRetries` and `retryCondition` exist at once - expectTypeOf().not.toMatchTypeOf({ + expectTypeOf({ maxRetries: 5, retryCondition: () => false, - }) + }).not.toMatchTypeOf() }) })

( - type: T + type: T, ): PayloadActionCreator // @public export function createAction< PA extends PrepareAction, - T extends string = string + T extends string = string, >( type: T, - prepareAction: PA + prepareAction: PA, ): PayloadActionCreator['payload'], T, PA> // @public (undocumented) export function createAsyncThunk( typePrefix: string, payloadCreator: AsyncThunkPayloadCreator, - options?: AsyncThunkOptions + options?: AsyncThunkOptions, ): AsyncThunk // @public (undocumented) export function createAsyncThunk< Returned, ThunkArg, - ThunkApiConfig extends AsyncThunkConfig + ThunkApiConfig extends AsyncThunkConfig, >( typePrefix: string, payloadCreator: AsyncThunkPayloadCreator, - options?: AsyncThunkOptions + options?: AsyncThunkOptions, ): AsyncThunk // @public @@ -287,7 +287,7 @@ export function createEntityAdapter(options?: { // @public export function createImmutableStateInvariantMiddleware( - options?: ImmutableStateInvariantMiddlewareOptions + options?: ImmutableStateInvariantMiddlewareOptions, ): Middleware export { createNextState } @@ -295,41 +295,41 @@ export { createNextState } // @public export function createReducer>( initialState: S | (() => S), - builderCallback: (builder: ActionReducerMapBuilder) => void + builderCallback: (builder: ActionReducerMapBuilder) => void, ): ReducerWithInitialState // @public export function createReducer< S extends NotFunction, - CR extends CaseReducers = CaseReducers + CR extends CaseReducers = CaseReducers, >( initialState: S | (() => S), actionsMap: CR, actionMatchers?: ActionMatcherDescriptionCollection, - defaultCaseReducer?: CaseReducer + defaultCaseReducer?: CaseReducer, ): ReducerWithInitialState export { createSelector } // @public export function createSerializableStateInvariantMiddleware( - options?: SerializableStateInvariantMiddlewareOptions + options?: SerializableStateInvariantMiddlewareOptions, ): Middleware // @public export function createSlice< State, CaseReducers extends SliceCaseReducers, - Name extends string = string + Name extends string = string, >( - options: CreateSliceOptions + options: CreateSliceOptions, ): Slice // @public export interface CreateSliceOptions< State = any, CR extends SliceCaseReducers = SliceCaseReducers, - Name extends string = string + Name extends string = string, > { extraReducers?: | CaseReducers, any> @@ -353,7 +353,7 @@ export { Draft } export interface EnhancedStore< S = any, A extends Action = UnknownAction, - M extends Middlewares = Middlewares + M extends Middlewares = Middlewares, > extends Store { dispatch: Dispatch & DispatchForMiddlewares } @@ -368,7 +368,7 @@ export interface EntityAdapter extends EntityStateAdapter { getSelectors(): EntitySelectors> // (undocumented) getSelectors( - selectState: (state: V) => EntityState + selectState: (state: V) => EntityState, ): EntitySelectors // (undocumented) selectId: IdSelector @@ -406,102 +406,102 @@ export interface EntityStateAdapter { // (undocumented) addMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S // (undocumented) addMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S // (undocumented) addOne>(state: PreventAny, entity: T): S // (undocumented) addOne>( state: PreventAny, - action: PayloadAction + action: PayloadAction, ): S // (undocumented) removeAll>(state: PreventAny): S // (undocumented) removeMany>( state: PreventAny, - keys: readonly EntityId[] + keys: readonly EntityId[], ): S // (undocumented) removeMany>( state: PreventAny, - keys: PayloadAction + keys: PayloadAction, ): S // (undocumented) removeOne>(state: PreventAny, key: EntityId): S // (undocumented) removeOne>( state: PreventAny, - key: PayloadAction + key: PayloadAction, ): S // (undocumented) setAll>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S // (undocumented) setAll>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S // (undocumented) setMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S // (undocumented) setMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S // (undocumented) setOne>(state: PreventAny, entity: T): S // (undocumented) setOne>( state: PreventAny, - action: PayloadAction + action: PayloadAction, ): S // (undocumented) updateMany>( state: PreventAny, - updates: ReadonlyArray> + updates: ReadonlyArray>, ): S // (undocumented) updateMany>( state: PreventAny, - updates: PayloadAction>> + updates: PayloadAction>>, ): S // (undocumented) updateOne>( state: PreventAny, - update: Update + update: Update, ): S // (undocumented) updateOne>( state: PreventAny, - update: PayloadAction> + update: PayloadAction>, ): S // (undocumented) upsertMany>( state: PreventAny, - entities: readonly T[] | Record + entities: readonly T[] | Record, ): S // (undocumented) upsertMany>( state: PreventAny, - entities: PayloadAction> + entities: PayloadAction>, ): S // (undocumented) upsertOne>(state: PreventAny, entity: T): S // (undocumented) upsertOne>( state: PreventAny, - entity: PayloadAction + entity: PayloadAction, ): S } @@ -511,7 +511,7 @@ export function findNonSerializableValue( path?: string, isSerializable?: (value: unknown) => boolean, getEntries?: (value: unknown) => [string, any][], - ignoredPaths?: readonly (string | RegExp)[] + ignoredPaths?: readonly (string | RegExp)[], ): NonSerializableValue | false export { freeze } @@ -523,12 +523,12 @@ export function getDefaultMiddleware< thunk: true immutableCheck: true serializableCheck: true - } + }, >(options?: O): MiddlewareArray | ThunkMiddlewareFor> // @public export function getType( - actionCreator: PayloadActionCreator + actionCreator: PayloadActionCreator, ): T // @public (undocumented) @@ -547,7 +547,7 @@ export interface ImmutableStateInvariantMiddlewareOptions { export function isAllOf, ...Matcher[]]>( ...matchers: Matchers ): ( - action: any + action: any, ) => action is UnionToIntersection> // @public @@ -557,38 +557,38 @@ export function isAnyOf, ...Matcher[]]>( // @public export function isAsyncThunkAction(): ( - action: any + action: any, ) => action is UnknownAsyncThunkAction // @public export function isAsyncThunkAction< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is ActionsFromAsyncThunk // @public export function isAsyncThunkAction( - action: any + action: any, ): action is UnknownAsyncThunkAction export { isDraft } // @public export function isFulfilled(): ( - action: any + action: any, ) => action is UnknownAsyncThunkFulfilledAction // @public export function isFulfilled< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is FulfilledActionFromAsyncThunk // @public export function isFulfilled( - action: any + action: any, ): action is UnknownAsyncThunkFulfilledAction // @public @@ -596,12 +596,12 @@ export function isImmutableDefault(value: unknown): boolean // @public export function isPending(): ( - action: any + action: any, ) => action is UnknownAsyncThunkPendingAction // @public export function isPending< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is PendingActionFromAsyncThunk @@ -617,43 +617,43 @@ export function isPlainObject(value: unknown): value is object // @public export function isRejected(): ( - action: any + action: any, ) => action is UnknownAsyncThunkRejectedAction // @public export function isRejected< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): (action: any) => action is RejectedActionFromAsyncThunk // @public export function isRejected( - action: any + action: any, ): action is UnknownAsyncThunkRejectedAction // @public export function isRejectedWithValue(): ( - action: any + action: any, ) => action is UnknownAsyncThunkRejectedAction // @public export function isRejectedWithValue< - AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]] + AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]], >( ...asyncThunks: AsyncThunks ): ( - action: any + action: any, ) => action is RejectedWithValueActionFromAsyncThunk // @public export function isRejectedWithValue( - action: any + action: any, ): action is UnknownAsyncThunkRejectedAction // @public (undocumented) export class MiddlewareArray< - Middlewares extends Middleware + Middlewares extends Middleware, > extends Array { // (undocumented) static get [Symbol.species](): any @@ -661,7 +661,7 @@ export class MiddlewareArray< constructor(...items: Middlewares[]) // (undocumented) concat>>( - items: AdditionalMiddlewares + items: AdditionalMiddlewares, ): MiddlewareArray // (undocumented) concat>>( @@ -669,7 +669,7 @@ export class MiddlewareArray< ): MiddlewareArray // (undocumented) prepend>>( - items: AdditionalMiddlewares + items: AdditionalMiddlewares, ): MiddlewareArray // (undocumented) prepend>>( @@ -696,7 +696,7 @@ export type PayloadAction< P = void, T extends string = string, M = never, - E = never + E = never, > = { payload: P type: T @@ -715,7 +715,7 @@ export type PayloadAction< export type PayloadActionCreator< P = void, T extends string = string, - PA extends PrepareAction