T001–T006: Phase 1 setup (workspace, Biome, TS, Vitest, layer boundary enforcement)
This commit is contained in:
8
packages/domain/package.json
Normal file
8
packages/domain/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "@initiative/domain",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts"
|
||||
}
|
||||
16
packages/domain/src/__tests__/layer-boundaries.test.ts
Normal file
16
packages/domain/src/__tests__/layer-boundaries.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { checkLayerBoundaries } from "../../../../scripts/check-layer-boundaries.mjs";
|
||||
|
||||
describe("layer boundaries", () => {
|
||||
it("domain and application packages have no forbidden imports", () => {
|
||||
const violations = checkLayerBoundaries();
|
||||
if (violations.length > 0) {
|
||||
const messages = violations.map(
|
||||
(v) =>
|
||||
`${v.file}:${v.line} imports "${v.importPath}" (forbidden: ${v.forbidden})`,
|
||||
);
|
||||
throw new Error(`Layer boundary violations:\n ${messages.join("\n ")}`);
|
||||
}
|
||||
expect(violations).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
1
packages/domain/src/index.ts
Normal file
1
packages/domain/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
10
packages/domain/tsconfig.json
Normal file
10
packages/domain/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/__tests__"]
|
||||
}
|
||||
Reference in New Issue
Block a user