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.

kodiakhq bot and others added 30 commits December 31, 2024 03:55
…typescript-eslint/parser-8.19.0

build(deps-dev): Bump @typescript-eslint/parser from 8.18.2 to 8.19.0
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](open-cli-tools/concurrently@v9.1.1...v9.1.2)

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

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

build(deps-dev): Bump concurrently from 9.1.1 to 9.1.2
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.18.2 to 8.19.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.19.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.19.0

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.18.2 to 8.19.0
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.13 to 4.17.14.
- [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.14

build(deps-dev): Bump @types/lodash from 4.17.13 to 4.17.14
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.19.0 to 8.19.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.19.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.19.1

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.19.0 to 8.19.1
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.7.2...v5.7.3)

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

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

build(deps-dev): Bump typescript from 5.7.2 to 5.7.3
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.19.0 to 8.19.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.19.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.19.1

build(deps-dev): Bump @typescript-eslint/parser from 8.19.0 to 8.19.1
Bumps [@nestjs/swagger](https://github.com/nestjs/swagger) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/nestjs/swagger/releases)
- [Changelog](https://github.com/nestjs/swagger/blob/master/.release-it.json)
- [Commits](nestjs/swagger@8.1.0...8.1.1)

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

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

build(deps): Bump @nestjs/swagger from 8.1.0 to 8.1.1
Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.17.0...v9.18.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.18.0

build(deps-dev): Bump eslint from 9.17.0 to 9.18.0
Bumps [pino-http](https://github.com/pinojs/pino-http) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/pinojs/pino-http/releases)
- [Commits](pinojs/pino-http@v10.3.0...v10.4.0)

---
updated-dependencies:
- dependency-name: pino-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

build(deps): Bump pino-http from 10.3.0 to 10.4.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.19.1 to 8.20.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.20.0/packages/parser)

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

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

build(deps-dev): Bump @typescript-eslint/parser from 8.19.1 to 8.20.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.20.0 to 8.21.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.21.0/packages/parser)

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

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

build(deps-dev): Bump @typescript-eslint/parser from 8.20.0 to 8.21.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.19.1 to 8.22.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.22.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.22.0

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.19.1 to 8.22.0
feat: Add Worker to IngredientsController
Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.18.0...v9.20.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.20.0

build(deps-dev): Bump eslint from 9.18.0 to 9.20.0
dependabot bot and others added 2 commits December 15, 2025 03:07
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](animir/node-rate-limiter-flexible@v9.0.0...v9.0.1)

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

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

build(deps): Bump rate-limiter-flexible from 9.0.0 to 9.0.1
dependabot bot and others added 2 commits December 16, 2025 03:06
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.49.0 to 8.50.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.50.0/packages/parser)

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

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

build(deps-dev): Bump @typescript-eslint/parser from 8.49.0 to 8.50.0
dependabot bot and others added 2 commits December 16, 2025 03:07
Bumps [eslint](https://github.com/eslint/eslint) from 9.39.1 to 9.39.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.1...v9.39.2)

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

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

build(deps-dev): Bump eslint from 9.39.1 to 9.39.2
dependabot bot and others added 2 commits December 17, 2025 03:06
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.49.0 to 8.50.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.50.0/packages/eslint-plugin)

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

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

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.49.0 to 8.50.0
dependabot bot and others added 2 commits December 23, 2025 03:07
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.50.0 to 8.50.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.50.1/packages/parser)

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

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

build(deps-dev): Bump @typescript-eslint/parser from 8.50.0 to 8.50.1
dependabot bot and others added 2 commits December 24, 2025 03:05
Bumps [@nestjs/cache-manager](https://github.com/nestjs/cache-manager) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/nestjs/cache-manager/releases)
- [Commits](nestjs/cache-manager@3.0.1...3.1.0)

---
updated-dependencies:
- dependency-name: "@nestjs/cache-manager"
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…nestjs/cache-manager-3.1.0

build(deps): Bump @nestjs/cache-manager from 3.0.1 to 3.1.0
dependabot bot and others added 2 commits December 24, 2025 03:06
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.50.0 to 8.50.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.50.1/packages/eslint-plugin)

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

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

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.50.0 to 8.50.1
dependabot bot and others added 2 commits December 29, 2025 03:10
Bumps [jsdom](https://github.com/jsdom/jsdom) from 27.3.0 to 27.4.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](jsdom/jsdom@27.3.0...27.4.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 27.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

build(deps): Bump jsdom from 27.3.0 to 27.4.0
dependabot bot and others added 2 commits December 30, 2025 03:06
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.50.1 to 8.51.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.51.0/packages/parser)

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

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

build(deps-dev): Bump @typescript-eslint/parser from 8.50.1 to 8.51.0
dependabot bot and others added 2 commits December 31, 2025 03:05
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.50.1 to 8.51.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.51.0/packages/eslint-plugin)

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

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

build(deps-dev): Bump @typescript-eslint/eslint-plugin from 8.50.1 to 8.51.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