![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@testing-initializer/data
Advanced tools
This package allows you to create a @msw/data type-safe database. It will read nested
arrays as a many of
relationship and objects as a one of
relationship.
npm i @testing-initializer/data
or with Yarn:
yarn add @testing-initializer/data
First make you have your types available:
interface User {
id: number
name: string
}
interface ToDo {
id: number
name: string
}
interface Project {
id: number
name: string
date: string
user: User
toDos: ToDo[]
}
interface APITypes {
user: User
toDo: ToDo
project: Project
}
Proceed to create your mock database based on this types.
import { createDatabase, generateId } from "@testing-initializer/data"
const db = createDatabase<APITypes>({
user: {
id: () => generateId("user-pk"),
name: () => `User ${generateId("user-name")}`,
},
toDo: {
id: () => generateId("toDo-pk"),
name: () => `Todo ${generateId("toDo-name")}`,
},
project: {
id: () => generateId("project-pk"),
date: () => new Date().toISOString(),
name: () => `Project ${generateId("project-name")}`,
user: oneOf("user"),
toDos: manyOf("toDo"),
},
})
Now you can use all database methods available in @msw/data:
db.user.create()
db.user.findFirst({ ... })
db.project.findMany({ ... })
This project is licensed under the terms of the MIT license
FAQs
Create a mock type-safe database for integration tests.
The npm package @testing-initializer/data receives a total of 0 weekly downloads. As such, @testing-initializer/data popularity was classified as not popular.
We found that @testing-initializer/data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.