-
-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: dataloader app #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
022f8cd
81f6043
d59efbd
e855fd8
6ca7ba9
34fa5c5
c5693de
dc6971f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| * | ||
| !apps/* | ||
| !packages/* | ||
| * | ||
| !apps/ | ||
| !apps/** | ||
| !lib/ | ||
| !lib/** | ||
| !package.json | ||
| !pnpm-lock.yaml | ||
| !pnpm-workspace.yaml | ||
| !pnpm-workspace.yaml |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,103 +2,76 @@ | |||||
| "name": "@metro-now/backend", | ||||||
| "scripts": { | ||||||
| "typegen": "ts-node ./src/scripts/generate-types.ts", | ||||||
| "prebuild": "rimraf dist && pnpm prisma:generate && pnpm typegen", | ||||||
| "prebuild": "rimraf dist && pnpm --filter @metro-now/shared build && pnpm --filter @metro-now/database build && pnpm typegen", | ||||||
| "build": "nest build", | ||||||
| "start": "nest start", | ||||||
| "dev": "nest start --watch", | ||||||
| "start:debug": "nest start --debug --watch", | ||||||
| "start:prod": "node dist/main", | ||||||
| "lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", | ||||||
| "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||||||
| "types:check": "tsc --incremental --noEmit", | ||||||
| "test": "jest", | ||||||
| "lint": "biome check --config-path ../../biome.json ../../apps/backend/src ../../apps/backend/package.json ../../apps/backend/tsconfig.json", | ||||||
| "lint:fix": "biome check --config-path ../../biome.json ../../apps/backend/src ../../apps/backend/package.json ../../apps/backend/tsconfig.json --write", | ||||||
| "format": "biome format --config-path ../../biome.json ../../apps/backend/src ../../apps/backend/package.json ../../apps/backend/tsconfig.json --write", | ||||||
| "format:check": "biome check --config-path ../../biome.json ../../apps/backend/src ../../apps/backend/package.json ../../apps/backend/tsconfig.json", | ||||||
| "types:check": "pnpm --filter @metro-now/shared build && pnpm --filter @metro-now/database build && tsc --incremental --noEmit", | ||||||
| "test": "pnpm --filter @metro-now/shared build && pnpm --filter @metro-now/database build && jest", | ||||||
| "test:watch": "jest --watch", | ||||||
| "test:cov": "jest --coverage", | ||||||
| "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||||||
| "test:e2e": "jest --config ./e2e/jest-e2e.json", | ||||||
| "prisma:studio": "dotenv -e .env.local -- prisma studio", | ||||||
| "prisma:generate": "prisma generate", | ||||||
| "prisma:migrate:create": "dotenv -e .env.local -- prisma migrate dev", | ||||||
| "prisma:migrate:deploy": "dotenv -e .env.local -- prisma migrate deploy", | ||||||
| "prisma:push": "dotenv -e .env.local -- prisma db push", | ||||||
| "prisma:seed": "prisma db seed" | ||||||
| "test:e2e": "jest --config ./e2e/jest-e2e.json" | ||||||
| }, | ||||||
| "dependencies": { | ||||||
| "@apollo/server": "^4.11.3", | ||||||
| "@fast-csv/parse": "^5.0.2", | ||||||
| "@keyv/redis": "^4.3.3", | ||||||
| "@nestjs/apollo": "^13.0.4", | ||||||
| "@nestjs/cache-manager": "^3.0.1", | ||||||
| "@nestjs/common": "^11.0.13", | ||||||
| "@nestjs/config": "^4.0.2", | ||||||
| "@nestjs/core": "^11.0.13", | ||||||
| "@nestjs/graphql": "^13.0.4", | ||||||
| "@nestjs/platform-express": "^11.0.13", | ||||||
| "@nestjs/schedule": "^5.0.1", | ||||||
| "@nestjs/swagger": "^11.1.1", | ||||||
| "@prisma/client": "5.20.0", | ||||||
| "cache-manager": "^6.4.2", | ||||||
| "@apollo/server": "^5.5.0", | ||||||
| "@as-integrations/express5": "^1.1.2", | ||||||
| "@keyv/redis": "^5.1.6", | ||||||
| "@metro-now/database": "workspace:*", | ||||||
| "@metro-now/shared": "workspace:*", | ||||||
| "@nestjs/apollo": "^13.2.4", | ||||||
| "@nestjs/cache-manager": "^3.1.0", | ||||||
| "@nestjs/common": "^11.1.17", | ||||||
| "@nestjs/config": "^4.0.3", | ||||||
| "@nestjs/core": "^11.1.17", | ||||||
| "@nestjs/graphql": "^13.2.4", | ||||||
| "@nestjs/platform-express": "^11.1.17", | ||||||
| "@nestjs/swagger": "^11.2.6", | ||||||
| "cacheable": "^2.3.4", | ||||||
| "cache-manager": "^7.2.8", | ||||||
| "dataloader": "^2.2.3", | ||||||
| "graphql": "^16.10.0", | ||||||
| "radash": "^12.1.0", | ||||||
| "graphql": "^16.13.2", | ||||||
| "keyv": "^5.6.0", | ||||||
| "radash": "^12.1.1", | ||||||
| "reflect-metadata": "^0.2.2", | ||||||
| "rxjs": "^7.8.2", | ||||||
| "ts-morph": "^25.0.1", | ||||||
| "unzipper": "^0.12.3", | ||||||
| "zod": "^3.24.2" | ||||||
| }, | ||||||
| "devDependencies": { | ||||||
| "@nestjs/cli": "^11.0.6", | ||||||
| "@nestjs/schematics": "^11.0.4", | ||||||
| "@nestjs/testing": "^11.0.13", | ||||||
| "@types/express": "^5.0.1", | ||||||
| "@nestjs/cli": "^11.0.16", | ||||||
| "@nestjs/schematics": "^11.0.9", | ||||||
| "@nestjs/testing": "^11.1.17", | ||||||
| "@types/express": "^5.0.6", | ||||||
| "@types/jest": "^29.5.14", | ||||||
| "@types/node": "^22.14.0", | ||||||
| "@types/supertest": "^6.0.3", | ||||||
| "@types/unzipper": "^0.10.11", | ||||||
| "@typescript-eslint/eslint-plugin": "^6.21.0", | ||||||
| "@typescript-eslint/parser": "^6.21.0", | ||||||
| "eslint": "^8.57.1", | ||||||
| "eslint-config-prettier": "^9.1.0", | ||||||
| "eslint-import-resolver-typescript": "^3.10.0", | ||||||
| "eslint-plugin-import": "^2.31.0", | ||||||
| "eslint-plugin-prettier": "^5.2.6", | ||||||
| "jest": "^29.7.0", | ||||||
| "prettier": "^3.5.3", | ||||||
| "rimraf": "^6.0.1", | ||||||
| "rimraf": "^6.1.3", | ||||||
| "source-map-support": "^0.5.21", | ||||||
| "supertest": "^7.1.0", | ||||||
| "ts-jest": "^29.3.1", | ||||||
| "ts-loader": "^9.5.2", | ||||||
| "supertest": "^7.2.2", | ||||||
| "ts-jest": "^29.4.6", | ||||||
| "ts-loader": "^9.5.4", | ||||||
| "ts-node": "^10.9.2", | ||||||
| "tsconfig-paths": "^4.2.0", | ||||||
| "typescript": "^5.8.3" | ||||||
| }, | ||||||
| "optionalDependencies": { | ||||||
| "dotenv-cli": "^8.0.0", | ||||||
| "prisma": "^5.20.0" | ||||||
| }, | ||||||
| "jest": { | ||||||
| "moduleFileExtensions": [ | ||||||
| "js", | ||||||
| "json", | ||||||
| "ts" | ||||||
| ], | ||||||
| "moduleFileExtensions": ["js", "json", "ts"], | ||||||
| "rootDir": "./", | ||||||
| "modulePaths": [ | ||||||
| "<rootDir>" | ||||||
| ], | ||||||
| "modulePaths": ["<rootDir>"], | ||||||
| "testRegex": ".*\\.spec\\.ts$", | ||||||
| "transform": { | ||||||
| "^.+\\.(t|j)s$": "ts-jest" | ||||||
| }, | ||||||
| "collectCoverageFrom": [ | ||||||
| "**/*.(t|j)s" | ||||||
| ], | ||||||
| "collectCoverageFrom": ["**/*.(t|j)s"], | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: No, collectCoverageFrom: ["/.(t|j)s"] does NOT match both .ts and .js files in Jest 29 using micromatch glob syntax. The pattern .(t|j)s attempts to use extglob syntax @(t|j) or +(t|j) for alternatives, but the plain (t|j) without a preceding extglob quantifier (?+!@) is treated as a literal group or regex character class, not alternatives. It would match files ending with . followed by 't' or '|' or 'j' then 's' (like .ts, .|s, .js), but not properly .ts and .js as intended. Official Jest docs show the correct brace syntax: /.{js,jsx} or /.[jt]s?(x) for JS/TS files [1,3,4]. Micromatch supports brace expansion {ts,js} which expands to /.ts or /.js [6,7,13]. Use ["/.{ts,js}"] or ["/.+(ts|js)"] (extglob) or ["/.[jt]s"] instead. To match exactly .ts and .js: /*.{ts,js} is recommended and used in Jest examples. Citations:
Fix the coverage glob pattern to properly match TypeScript and JavaScript files. The pattern Corrected pattern- "collectCoverageFrom": ["**/*.(t|j)s"],
+ "collectCoverageFrom": ["**/*.{ts,js}"],📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| "coverageDirectory": "../coverage", | ||||||
| "testEnvironment": "node" | ||||||
| }, | ||||||
| "prisma": { | ||||||
| "seed": "dotenv -e .env.local -- ts-node prisma/seed.ts" | ||||||
| } | ||||||
| } | ||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test:e2eshould prepare workspace deps too.Line 16 now builds
@metro-now/sharedand@metro-now/databasebefore Jest, but Line 20 still skips that step. After a clean checkout—or after changing either workspace package—pnpm test:e2ecan still run against missing or stale output even thoughpnpm testpasses.🔁 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents