![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.
An architecture unit test framework for Typescript
npm install --save-dev tsarch
The project has currently two perspectives on architecture: file based architecture tests and slice based architecture tests.
// imports and applies the jest extensions
import "tsarch/dist/jest"
// imports the files entrypoint
import {filesOfProject} from "tsarch"
describe("architecture", ()=> {
// architecture tests can take a while to finish
jest.setTimeout(60000);
// we use async await in combination with jest since this project uses asynchronous calls
it("business logic should not depend on the ui", async ()=> {
const rule = filesOfProject()
.inFolder("business")
.shouldNot()
.dependOnFiles()
.inFolder("ui")
await expect(rule).toPassAsync()
})
it("business logic should be cycle free", async ()=> {
const rule = filesOfProject()
.inFolder("business")
.should()
.beFreeOfCycles()
await expect(rule).toPassAsync()
})
})
An example without jest and further examples of the usage can be found in the integration tests
in test/files/integration
.
Assume that you have an architecture diagram (Plant Uml) as part of your documentation
in the docs
folder of your project.
import "tsarch/dist/jest"
import {slicesOfProject} from "tsarch"
import * as path from "path"
describe("architecture", ()=> {
jest.setTimeout(60000);
it('the architecture adheres to the config', async () => {
const diagramLocation = path.resolve('docs', 'components.puml');
const rule = await slicesOfProject()
.definedBy('src/(**)/')
.should()
.adhereToDiagramInFile(diagramLocation)
await expect(rule).toPassAsync()
});
})
An example without jest and further examples of the usage can be found in the integration tests
in test/slices/integration
.
The path of the project is always relative to a given tsconfig.json
.
If no tsconfig.json
is given ts-arch
tries to find one in a parent
folder, e.g. if your tsconfig.json
is in the same folder as your src
folder, then all the paths
begin with src/...
FAQs
It's a library for checking architecture conventions in TypeScript&JavaScript projects using any test framework. You check dependencies between files, folders and slices, check for cyclic dependencies and more. It's similar to ArchUnit but for TS/JS proje
The npm package tsarch receives a total of 11,586 weekly downloads. As such, tsarch popularity was classified as popular.
We found that tsarch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.