From ed5bf96939b1f589a549d08d311a91fb2457cc5a Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Sat, 21 Jun 2025 15:07:01 +0200 Subject: [PATCH] setup improvements --- .github/workflows/test_backend.yml | 2 +- backend/turbo.json | 13 ++--- bun.lock | 47 ++++++++++++++++--- core/README.md | 10 ++++ core/package.json | 2 +- core/src/config/const.ts | 2 +- core/src/index.ts | 2 +- core/src/{schema => validation}/index.ts | 2 +- .../user.test.ts} | 0 .../user.schema.ts => validation/user.ts} | 0 core/turbo.json | 24 ---------- database/Dockerfile | 5 +- database/README.md | 2 + database/turbo.json | 2 +- dht-node/turbo.json | 4 +- federation/package.json | 5 +- federation/tsconfig.json | 2 +- federation/turbo.json | 4 +- shared/README.md | 13 +++++ shared/package.json | 2 +- shared/turbo.json | 11 ----- turbo.json | 3 +- 22 files changed, 90 insertions(+), 67 deletions(-) create mode 100644 core/README.md rename core/src/{schema => validation}/index.ts (82%) rename core/src/{schema/user.schema.test.ts => validation/user.test.ts} (100%) rename core/src/{schema/user.schema.ts => validation/user.ts} (100%) delete mode 100644 core/turbo.json create mode 100644 shared/README.md diff --git a/.github/workflows/test_backend.yml b/.github/workflows/test_backend.yml index ca3ce0e69..d983f331a 100644 --- a/.github/workflows/test_backend.yml +++ b/.github/workflows/test_backend.yml @@ -57,7 +57,7 @@ jobs: - name: install dependencies run: | - bun install --filter backend --frozen-lockfile + bun install --filter backend --filter core --frozen-lockfile bun install --global --no-save turbo@^2 - name: Backend | Unit tests diff --git a/backend/turbo.json b/backend/turbo.json index fa9af6ce2..822b2765f 100644 --- a/backend/turbo.json +++ b/backend/turbo.json @@ -2,25 +2,22 @@ "extends": ["//"], "tasks": { "seed": { - "dependsOn": ["database#up", "config-schema#build", "database#build"], + "dependsOn": ["database#up", "^build"], "cache": false }, "locales": {}, "locales:fix": {}, "lint": { - "dependsOn": ["locales", "database#build"] + "dependsOn": ["locales"] }, "lint:fix": { - "dependsOn": ["locales:fix", "database#build"] - }, - "typecheck": { - "dependsOn": ["database#build", "config-schema#build"] + "dependsOn": ["locales:fix"] }, "test": { - "dependsOn": ["database#up:backend_test", "config-schema#build", "database#build"] + "dependsOn": ["database#up:backend_test", "^build"] }, "dev": { - "dependsOn": ["database#up"] + "dependsOn": ["database#up", "^build"] }, "start": { "dependsOn": ["database#up", "build"] diff --git a/bun.lock b/bun.lock index dbf19bd65..48ccce4be 100644 --- a/bun.lock +++ b/bun.lock @@ -161,7 +161,7 @@ }, "config-schema": { "name": "config-schema", - "version": "1.0.0", + "version": "2.6.0", "dependencies": { "esbuild": "^0.25.2", "joi": "^17.13.3", @@ -179,7 +179,7 @@ }, "core": { "name": "core", - "version": "1.0.0", + "version": "2.6.0", "dependencies": { "database": "workspace:*", "esbuild": "^0.25.2", @@ -206,7 +206,7 @@ "log4js": "^6.9.1", "mysql2": "^2.3.0", "reflect-metadata": "^0.1.13", - "shared": "workspace:*", + "shared": "*", "source-map-support": "^0.5.21", "ts-mysql-migrate": "^1.0.2", "tsx": "^4.20.3", @@ -293,9 +293,9 @@ "apollo-server-testing": "2.25.2", "await-semaphore": "0.1.3", "class-validator": "^0.13.2", - "config-schema": "workspace:*", + "config-schema": "*", "cors": "2.8.5", - "database": "workspace:*", + "database": "*", "decimal.js-light": "^2.5.1", "dotenv": "10.0.0", "express": "^4.17.21", @@ -319,6 +319,7 @@ "typeorm": "^0.3.25", "typescript": "^4.9.5", "uuid": "8.3.2", + "vitest": "^3.2.4", }, }, "frontend": { @@ -418,7 +419,7 @@ }, "shared": { "name": "shared", - "version": "1.0.0", + "version": "2.6.0", "dependencies": { "esbuild": "^0.25.2", "log4js": "^6.9.1", @@ -3738,6 +3739,8 @@ "federation/ts-jest": ["ts-jest@27.0.5", "", { "dependencies": { "bs-logger": "0.x", "fast-json-stable-stringify": "2.x", "jest-util": "^27.0.0", "json5": "2.x", "lodash": "4.x", "make-error": "1.x", "semver": "7.x", "yargs-parser": "20.x" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", "@types/jest": "^27.0.0", "babel-jest": ">=27.0.0 <28", "jest": "^27.0.0", "typescript": ">=3.8 <5.0" }, "optionalPeers": ["@babel/core", "@types/jest", "babel-jest"], "bin": { "ts-jest": "cli.js" } }, "sha512-lIJApzfTaSSbtlksfFNHkWOzLJuuSm4faFAfo5kvzOiRAuoN4/eKxVJ2zEAho8aecE04qX6K1pAzfH5QHL1/8w=="], + "federation/vitest": ["vitest@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", "@vitest/mocker": "3.2.4", "@vitest/pretty-format": "^3.2.4", "@vitest/runner": "3.2.4", "@vitest/snapshot": "3.2.4", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "debug": "^4.4.1", "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", "picomatch": "^4.0.2", "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.14", "tinypool": "^1.1.1", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "@vitest/browser": "3.2.4", "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/debug", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A=="], + "file-type/get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="], "filelist/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="], @@ -4148,6 +4151,32 @@ "federation/ts-jest/yargs-parser": ["yargs-parser@20.2.9", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="], + "federation/vitest/@types/node": ["@types/node@18.19.96", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-PzBvgsZ7YdFs/Kng1BSW8IGv68/SPcOxYYhT7luxD7QyzIhFS1xPTpfK3K9eHBa7hVwlW+z8nN0mOd515yaduQ=="], + + "federation/vitest/@vitest/expect": ["@vitest/expect@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig=="], + + "federation/vitest/@vitest/mocker": ["@vitest/mocker@3.2.4", "", { "dependencies": { "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ=="], + + "federation/vitest/@vitest/pretty-format": ["@vitest/pretty-format@3.2.4", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA=="], + + "federation/vitest/@vitest/runner": ["@vitest/runner@3.2.4", "", { "dependencies": { "@vitest/utils": "3.2.4", "pathe": "^2.0.3", "strip-literal": "^3.0.0" } }, "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ=="], + + "federation/vitest/@vitest/snapshot": ["@vitest/snapshot@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", "pathe": "^2.0.3" } }, "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ=="], + + "federation/vitest/@vitest/spy": ["@vitest/spy@3.2.4", "", { "dependencies": { "tinyspy": "^4.0.3" } }, "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw=="], + + "federation/vitest/@vitest/utils": ["@vitest/utils@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" } }, "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA=="], + + "federation/vitest/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + + "federation/vitest/pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "federation/vitest/tinypool": ["tinypool@1.1.1", "", {}, "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg=="], + + "federation/vitest/tinyrainbow": ["tinyrainbow@2.0.0", "", {}, "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw=="], + + "federation/vitest/vite-node": ["vite-node@3.2.4", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.1", "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg=="], + "file-type/get-stream/is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="], "filelist/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], @@ -4374,6 +4403,12 @@ "editorconfig/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + "federation/vitest/@vitest/mocker/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "federation/vitest/@vitest/spy/tinyspy": ["tinyspy@4.0.3", "", {}, "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A=="], + + "federation/vitest/@vitest/utils/loupe": ["loupe@3.1.4", "", {}, "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg=="], + "filelist/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "html-to-text/htmlparser2/domutils/dom-serializer": ["dom-serializer@1.4.1", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" } }, "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag=="], diff --git a/core/README.md b/core/README.md new file mode 100644 index 000000000..4a361b0b8 --- /dev/null +++ b/core/README.md @@ -0,0 +1,10 @@ +# core +Gradido Core Code, High-Level Shared Code, with dependencies on other modules + +## Bun-Compatibility +Full bun compatible + +## Validation +All validation logic used across more than one module +Anything more complex than simple zod schemas is implemented here +Tests written for bun \ No newline at end of file diff --git a/core/package.json b/core/package.json index 26ed4e13b..98863bb60 100644 --- a/core/package.json +++ b/core/package.json @@ -1,7 +1,7 @@ { "name": "core", "version": "2.6.0", - "description": "Gradido Core Code, High-Level Shared Code, with dependencies onto other modules", + "description": "Gradido Core Code, High-Level Shared Code, with dependencies on other modules", "main": "./build/index.js", "types": "./src/index.ts", "exports": { diff --git a/core/src/config/const.ts b/core/src/config/const.ts index 9e9fdf08d..1c19265d0 100644 --- a/core/src/config/const.ts +++ b/core/src/config/const.ts @@ -1 +1 @@ -export const LOG4JS_BASE_CATEGORY_NAME = 'shared' \ No newline at end of file +export const LOG4JS_BASE_CATEGORY_NAME = 'core' \ No newline at end of file diff --git a/core/src/index.ts b/core/src/index.ts index 0cd6afc7d..99830d342 100644 --- a/core/src/index.ts +++ b/core/src/index.ts @@ -1 +1 @@ -export * from './schema' \ No newline at end of file +export * from './validation' \ No newline at end of file diff --git a/core/src/schema/index.ts b/core/src/validation/index.ts similarity index 82% rename from core/src/schema/index.ts rename to core/src/validation/index.ts index 6c1cda831..28d7d3d07 100644 --- a/core/src/schema/index.ts +++ b/core/src/validation/index.ts @@ -1,4 +1,4 @@ import { LOG4JS_BASE_CATEGORY_NAME } from '../config/const' export const LOG_CATEGORY_SCHEMA_ALIAS = `${LOG4JS_BASE_CATEGORY_NAME}.schema` -export * from './user.schema' \ No newline at end of file +export * from './user' \ No newline at end of file diff --git a/core/src/schema/user.schema.test.ts b/core/src/validation/user.test.ts similarity index 100% rename from core/src/schema/user.schema.test.ts rename to core/src/validation/user.test.ts diff --git a/core/src/schema/user.schema.ts b/core/src/validation/user.ts similarity index 100% rename from core/src/schema/user.schema.ts rename to core/src/validation/user.ts diff --git a/core/turbo.json b/core/turbo.json deleted file mode 100644 index 9f85ac803..000000000 --- a/core/turbo.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "lint": { - }, - "lint:fix": { - }, - "test": { - "dependsOn": ["config-schema#build"] - }, - "typecheck": { - }, - "dev": { - "dependsOn": ["database#build", "config-schema#build"], - "persistent": true, - "cache": false - }, - "build": { - "dependsOn": ["^build"], - "outputs": ["build/**"], - "cache": true - } - } -} \ No newline at end of file diff --git a/database/Dockerfile b/database/Dockerfile index 5c4e144e5..1ce9843f8 100644 --- a/database/Dockerfile +++ b/database/Dockerfile @@ -64,7 +64,7 @@ RUN bun install --production --no-cache --frozen-lockfile FROM installer as build RUN bun install --no-cache --frozen-lockfile \ - yarn build && yarn typecheck + && yarn build && yarn typecheck ################################################################################## # PRODUCTION IMAGE ############################################################### @@ -72,8 +72,7 @@ RUN bun install --no-cache --frozen-lockfile \ FROM base as production COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/src ./src -COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/migrations ./migrations -COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/entity ./entity +COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/migration ./migration COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/node_modules ./node_modules COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/package.json ./package.json COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig.json diff --git a/database/README.md b/database/README.md index 780545381..fe7ed3631 100644 --- a/database/README.md +++ b/database/README.md @@ -49,3 +49,5 @@ yarn clear ``` +## Tests +Currently written for vitest, but can be transformed into bun test after switching out TypeORM with DrizzleORM \ No newline at end of file diff --git a/database/turbo.json b/database/turbo.json index f0d5ac9a5..8ea6e46f5 100644 --- a/database/turbo.json +++ b/database/turbo.json @@ -21,7 +21,7 @@ "dependsOn": ["build"] }, "test": { - "dependsOn": ["up:test"] + "dependsOn": ["up:test", "^build"] }, "down": { "cache": false, diff --git a/dht-node/turbo.json b/dht-node/turbo.json index 3044e8840..27d8044a8 100644 --- a/dht-node/turbo.json +++ b/dht-node/turbo.json @@ -2,10 +2,10 @@ "extends": ["//"], "tasks": { "test": { - "dependsOn": ["config-schema#build", "database#build", "database#up:dht_test"] + "dependsOn": ["database#up:dht_test", "^build"] }, "dev": { - "dependsOn": ["config-schema#build", "database#build", "database#up"] + "dependsOn": ["database#up", "^build"] }, "start": { "dependsOn": ["database#up", "build"] diff --git a/federation/package.json b/federation/package.json index f2bae7d73..7ee32842c 100644 --- a/federation/package.json +++ b/federation/package.json @@ -14,7 +14,7 @@ "dev": "cross-env TZ=UTC nodemon -w src --ext ts,json,css -r tsconfig-paths/register src/index.ts", "dev:bun": "cross-env TZ=UTC bun --hot src/index.ts", "typecheck": "tsc --noEmit", - "test": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation jest --runInBand --forceExit --detectOpenHandles", + "test": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation vitest run", "test:debug": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation node --inspect-brk node_modules/.bin/jest --bail --runInBand --forceExit --detectOpenHandles", "test:coverage": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation jest --coverage --runInBand --forceExit --detectOpenHandles", "lint": "biome check --error-on-warnings .", @@ -65,7 +65,8 @@ "type-graphql": "^1.1.1", "typeorm": "^0.3.25", "typescript": "^4.9.5", - "uuid": "8.3.2" + "uuid": "8.3.2", + "vitest": "^3.2.4" }, "nodemonConfig": { "ignore": [ diff --git a/federation/tsconfig.json b/federation/tsconfig.json index 2d0e18ed8..86b102fa6 100644 --- a/federation/tsconfig.json +++ b/federation/tsconfig.json @@ -51,7 +51,7 @@ // "@arg/*": ["src/graphql/arg/*"], // "@enum/*": ["src/graphql/enum/*"], // "@model/*": ["src/graphql/model/*"], - "@repository/*": ["src/typeorm/repository/*"], + // "@repository/*": ["src/typeorm/repository/*"], "@test/*": ["test/*"], /* common */ // "@common/*": ["../common/src/*"], diff --git a/federation/turbo.json b/federation/turbo.json index 2533a8de2..77a13a055 100644 --- a/federation/turbo.json +++ b/federation/turbo.json @@ -2,10 +2,10 @@ "extends": ["//"], "tasks": { "test": { - "dependsOn": ["database#up:federation_test", "config-schema#build", "database#build"] + "dependsOn": ["database#up:federation_test", "^build"] }, "dev": { - "dependsOn": ["database#up"] + "dependsOn": ["database#up", "^build"] }, "start": { "dependsOn": ["database#up", "build"] diff --git a/shared/README.md b/shared/README.md new file mode 100644 index 000000000..43517fe98 --- /dev/null +++ b/shared/README.md @@ -0,0 +1,13 @@ +# shared +Gradido Shared Code, Low-Level Shared Code, without dependencies on other modules + +## Bun-Compatibility +Full bun compatible + +## Enums +All enums used across more than one module +Additional with zod Schema but working only with zod v4 and this needs typescript 5 + +## Schemas +All schemas for data validation used across more than one module +Tests written for bun diff --git a/shared/package.json b/shared/package.json index 5c8ba7195..0225a39e5 100644 --- a/shared/package.json +++ b/shared/package.json @@ -1,7 +1,7 @@ { "name": "shared", "version": "2.6.0", - "description": "Gradido Shared Code, Low-Level Shared Code, without dependencies onto other modules", + "description": "Gradido Shared Code, Low-Level Shared Code, without dependencies on other modules", "main": "./build/index.js", "types": "./src/index.ts", "exports": { diff --git a/shared/turbo.json b/shared/turbo.json index 9f85ac803..399303c0c 100644 --- a/shared/turbo.json +++ b/shared/turbo.json @@ -1,20 +1,9 @@ { "extends": ["//"], "tasks": { - "lint": { - }, - "lint:fix": { - }, "test": { "dependsOn": ["config-schema#build"] }, - "typecheck": { - }, - "dev": { - "dependsOn": ["database#build", "config-schema#build"], - "persistent": true, - "cache": false - }, "build": { "dependsOn": ["^build"], "outputs": ["build/**"], diff --git a/turbo.json b/turbo.json index 65b0842a3..f3f8d92d2 100644 --- a/turbo.json +++ b/turbo.json @@ -6,11 +6,12 @@ "lint:fix": { }, "test": { + "dependsOn": ["^build"] }, "typecheck": { }, "dev": { - "dependsOn": ["config-schema#build"], + "dependsOn": ["^build"], "persistent": true, "cache": false },