31c3c0c8ee84a5a2649b268efe3c903d8acc9c30
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 12s
CI/CD Pipeline - Apartment API / Run Linting (pull_request) Successful in 9m37s
CI/CD Pipeline - Apartment API / Run Tests (pull_request) Successful in 9m44s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Successful in 2s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Add upsertUnits() to scraperService that performs bulk upserts of apartment unit data using MongoDB bulkWrite with unordered operations. Key behaviors: - Uses unit_code as the unique key for matching existing units - Sets last_scraped timestamp and data_source on every upsert - Uses $setOnInsert for first_seen to preserve original insert time - Handles empty arrays gracefully with early return - Uses ordered:false for parallel execution and partial failure tolerance - Logs result counts (matched, modified, upserted) on success - Propagates errors with detailed logging on failure Includes 23 tests covering bulk operations, upsert behavior, field handling, empty input, error scenarios, and return values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
JavaScript
97.8%
HTML
2.1%