Skip to content

Conversation

@philipbrembeck
Copy link
Contributor

@philipbrembeck philipbrembeck commented Mar 27, 2025

Summary by Sourcery

Refactor and improve the ingredients classification process with enhanced error handling, worker-based processing, and dependency updates

New Features:

  • Added a worker-based approach for ingredient classification to improve performance
  • Implemented fallback mechanism for translation failures
  • Added concurrency scripts for development workflows

Enhancements:

  • Improved error handling in translation process
  • Moved sophisticated ingredient matching to a separate worker thread
  • Updated project dependencies to latest versions
  • Simplified translation error management

CI:

  • Added concurrently script for running multiple development checks
  • Improved lint and test script integration

Tests:

  • Updated unit tests to reflect new error handling behavior
  • Added more robust test scenarios for translation failures

Chores:

  • Updated package.json scripts
  • Upgraded NestJS and related dependencies
  • Cleaned up OpenAPI specification
  • Updated Dockerfile to use corepack

Note

Adds Redis-backed caching and rate limiting, moves ingredient classification to a worker with translation fallback, and caches product data across sources with input validation and updated health/docs.

  • Platform:
    • Redis Integration: Add RedisModule with RedisService, CacheService, and config (REDIS_* env). Use cache keys and thundering-herd locks.
    • Rate Limiting: New RedisRateLimiterMiddleware with in-memory fallback; applied globally (excludes health).
    • Health: Add Redis health indicator to /health.
  • Ingredients:
    • V1 Worker: Offload classification to ingredient.worker (worker_threads).
    • Translation: Cache DeepL responses; on failure, proceed with untranslated input; adjust tests accordingly.
  • Product:
    • Caching & Fetch: Cache grade, OpenFoodFacts, PETA, and OpenEANDB responses; parallelize fetch; add barcode validation; update tests.
  • API Docs:
    • Update OpenAPI: improved v1 ingredients 200 description, add local server, health examples; minor tag tweaks.
  • Ops/Build:
    • Docker: enable corepack.
    • Env: add REDIS_HOST/PORT/PASSWORD.
    • Scripts: add process:all, check.
  • Dependencies:
    • Bump NestJS/JS libs; add redis, rate-limiter-flexible, concurrently, etc.

Written by Cursor Bugbot for commit 0228cf8. Configure here.

dependabot bot and others added 30 commits February 17, 2025 03:20
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.14 to 4.17.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…types/lodash-4.17.15

build(deps-dev): Bump @types/lodash from 4.17.14 to 4.17.15
Bumps [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-import-resolver-typescript@v3.7.0...v3.8.0)

---
updated-dependencies:
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-import-resolver-typescript-3.8.0

build(deps-dev): Bump eslint-import-resolver-typescript from 3.7.0 to 3.8.0
Bumps [@nestjs/schematics](https://github.com/nestjs/schematics) from 11.0.0 to 11.0.1.
- [Release notes](https://github.com/nestjs/schematics/releases)
- [Changelog](https://github.com/nestjs/schematics/blob/master/.release-it.json)
- [Commits](nestjs/schematics@11.0.0...11.0.1)

---
updated-dependencies:
- dependency-name: "@nestjs/schematics"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs/schematics-11.0.1

build(deps-dev): Bump @nestjs/schematics from 11.0.0 to 11.0.1
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.24.0 to 8.24.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/eslint-plugin-8.24.1

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.24.0 to 8.24.1
Bumps [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-import-resolver-typescript@v3.8.0...v3.8.1)

---
updated-dependencies:
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-import-resolver-typescript-3.8.1

build(deps-dev): Bump eslint-import-resolver-typescript from 3.8.0 to 3.8.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.24.0 to 8.24.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/parser-8.24.1

build(deps-dev): Bump @typescript-eslint/parser from 8.24.0 to 8.24.1
Bumps [@nestjs/cli](https://github.com/nestjs/nest-cli) from 11.0.2 to 11.0.3.
- [Release notes](https://github.com/nestjs/nest-cli/releases)
- [Changelog](https://github.com/nestjs/nest-cli/blob/master/.release-it.json)
- [Commits](nestjs/nest-cli@11.0.2...11.0.3)

---
updated-dependencies:
- dependency-name: "@nestjs/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs/cli-11.0.3

build(deps-dev): Bump @nestjs/cli from 11.0.2 to 11.0.3
Bumps [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-import-resolver-typescript@v3.8.1...v3.8.2)

---
updated-dependencies:
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-import-resolver-typescript-3.8.2

build(deps-dev): Bump eslint-import-resolver-typescript from 3.8.1 to 3.8.2
Bumps [@nestjs/cli](https://github.com/nestjs/nest-cli) from 11.0.3 to 11.0.4.
- [Release notes](https://github.com/nestjs/nest-cli/releases)
- [Changelog](https://github.com/nestjs/nest-cli/blob/master/.release-it.json)
- [Commits](nestjs/nest-cli@11.0.3...11.0.4)

---
updated-dependencies:
- dependency-name: "@nestjs/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs/cli-11.0.4

build(deps-dev): Bump @nestjs/cli from 11.0.3 to 11.0.4
Bumps [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-import-resolver-typescript@v3.8.2...v3.8.3)

---
updated-dependencies:
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-import-resolver-typescript-3.8.3

build(deps-dev): Bump eslint-import-resolver-typescript from 3.8.2 to 3.8.3
Bumps [nestjs-pino](https://github.com/iamolegga/nestjs-pino) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/iamolegga/nestjs-pino/releases)
- [Commits](iamolegga/nestjs-pino@4.3.0...4.3.1)

---
updated-dependencies:
- dependency-name: nestjs-pino
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs-pino-4.3.1

build(deps): Bump nestjs-pino from 4.3.0 to 4.3.1
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.5 to 29.2.6.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v29.2.5...v29.2.6)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ts-jest-29.2.6

build(deps-dev): Bump ts-jest from 29.2.5 to 29.2.6
Bumps [eslint](https://github.com/eslint/eslint) from 9.20.1 to 9.21.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.20.1...v9.21.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-9.21.0

build(deps-dev): Bump eslint from 9.20.1 to 9.21.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.24.1 to 8.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.25.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/eslint-plugin-8.25.0

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.24.1 to 8.25.0
Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.8.1 to 7.8.2.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/7.8.2/CHANGELOG.md)
- [Commits](ReactiveX/rxjs@7.8.1...7.8.2)

---
updated-dependencies:
- dependency-name: rxjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…rxjs-7.8.2

build(deps): Bump rxjs from 7.8.1 to 7.8.2
dependabot bot and others added 2 commits January 16, 2026 03:23
Bumps [@nestjs/cli](https://github.com/nestjs/nest-cli) from 11.0.14 to 11.0.16.
- [Release notes](https://github.com/nestjs/nest-cli/releases)
- [Commits](nestjs/nest-cli@11.0.14...11.0.16)

---
updated-dependencies:
- dependency-name: "@nestjs/cli"
  dependency-version: 11.0.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs/cli-11.0.16

build(deps-dev): Bump @nestjs/cli from 11.0.14 to 11.0.16
dependabot bot and others added 2 commits January 20, 2026 03:24
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.53.0 to 8.53.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.53.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.53.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/parser-8.53.1

build(deps-dev): Bump @typescript-eslint/parser from 8.53.0 to 8.53.1
dependabot bot and others added 2 commits January 21, 2026 03:24
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.53.0 to 8.53.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.53.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.53.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/eslint-plugin-8.53.1

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.53.0 to 8.53.1
dependabot bot and others added 2 commits January 22, 2026 03:23
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…lodash-4.17.23

build(deps): Bump lodash from 4.17.21 to 4.17.23
dependabot bot and others added 2 commits January 26, 2026 03:27
Bumps [axios](https://github.com/axios/axios) from 1.13.2 to 1.13.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.13.2...v1.13.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…axios-1.13.3

build(deps): Bump axios from 1.13.2 to 1.13.3
dependabot bot and others added 2 commits January 26, 2026 03:27
Bumps [cheerio](https://github.com/cheeriojs/cheerio) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/cheeriojs/cheerio/releases)
- [Commits](cheeriojs/cheerio@v1.1.2...v1.2.0)

---
updated-dependencies:
- dependency-name: cheerio
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…cheerio-1.2.0

build(deps): Bump cheerio from 1.1.2 to 1.2.0
dependabot bot and others added 2 commits January 27, 2026 03:21
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.53.1 to 8.54.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.54.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/parser-8.54.0

build(deps-dev): Bump @typescript-eslint/parser from 8.53.1 to 8.54.0
dependabot bot and others added 2 commits January 28, 2026 03:24
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.53.1 to 8.54.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.54.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/eslint-plugin-8.54.0

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.53.1 to 8.54.0
dependabot bot and others added 2 commits January 28, 2026 03:24
Bumps [axios](https://github.com/axios/axios) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.13.3...v1.13.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…axios-1.13.4

build(deps): Bump axios from 1.13.3 to 1.13.4
dependabot bot and others added 2 commits February 2, 2026 03:26
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 9.0.1 to 9.1.0.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](animir/node-rate-limiter-flexible@v9.0.1...v9.1.0)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-version: 9.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…rate-limiter-flexible-9.1.0

build(deps): Bump rate-limiter-flexible from 9.0.1 to 9.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants