Skip to content

Comments

chore: update dependencies#150

Merged
DaxServer merged 1 commit intomainfrom
update-deps
Sep 7, 2025
Merged

chore: update dependencies#150
DaxServer merged 1 commit intomainfrom
update-deps

Conversation

@DaxServer
Copy link
Owner

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Sep 7, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Wikibase constraints API (fetch constraints, validate property/schema, clear cache).
    • Introduced instance-scoped Wikibase routes and enhanced entities endpoints with validation and richer metadata.
    • Responses now include explicit entity type and use datatype consistently; optional includeConstraints on property details.
  • Refactor

    • Unified, structured error responses across Wikibase Instances API.
  • Chores

    • Dependency upgrades across frontend and workspace; CI Bun version bump.
    • Frontend auto-imports: added useTimeAgoIntl.

Walkthrough

Introduces new Wikibase APIs (constraints, entities, instance-scoped), centralizes schemas/handlers, updates types and services (datatype rename, type discriminators), revises instances API error handling and nodemw integration, wires routes in app index, deletes legacy modules/configs, updates tests accordingly, and bumps dependencies and CI Bun version.

Changes

Cohort / File(s) Summary
CI workflows
.github/workflows/test.yml, .github/workflows/typecheck.yml
Bump Bun version from 1.2.20 to 1.2.21.
Lint/format config
backend/eslint.config.ts, backend/prettier.config.ts
Reorder import in ESLint config; remove Prettier config file.
Wikibase constraints API
backend/src/api/wikibase/constraints.ts, backend/tests/api/wikibase/constraints.test.ts
Add constraints API (get constraints, validate property/schema, clear cache) with schemas and CORS/error handling; add integration tests with mocked service.
Wikibase entities routing (consolidated)
backend/src/api/wikibase/routes.ts, backend/src/api/wikibase/schemas.ts, backend/src/api/wikibase/index.ts, backend/src/api/wikibase/handlers.ts
Add entities router under /api/wikibase/entities, shared route schemas, barrel exports, and simple handlers for searches/details.
Instance-scoped Wikibase API
backend/src/api/wikibase/instance-routes.ts, backend/src/index.ts
Add /api/wikibase/:instanceId/... routes including search, details, constraints, and validation; wire into main app.
Remove legacy entities API
backend/src/api/wikibase/entities.ts
Delete previous entities API module.
Instances API enhancements
backend/src/api/wikibase/instances.ts
Standardize error handling via utilities; integrate nodemw client lifecycle; extend request bodies with nodemwConfig and features; adjust route signatures/status usage.
Wikibase services
backend/src/services/wikibase-api.service.ts, backend/src/services/nodemw-wikibase.service.ts, backend/src/services/constraint-validation.service.ts
Add type discriminators (item/property), rename dataType→datatype, adjust search filters, minor catch/param name tweaks in constraint validation.
Types
backend/src/types/wikibase-api.ts
Add type field to ItemDetails/PropertyDetails; rename dataType→datatype across interfaces; update SearchOptions to datatype.
Backend tests updates
backend/tests/api/wikibase/entities.test.ts, backend/tests/api/wikibase/instances.test.ts, backend/tests/services/nodemw-wikibase.service.test.ts, backend/tests/services/wikibase-config.service.test.ts
Update expectations for datatype/type fields, new query params, new error payload shape, and typings; add match metadata; add non-null assertions.
Frontend globals/types
frontend/.eslintrc-auto-import.json, frontend/auto-imports.d.ts
Add global/type declarations for useTimeAgoIntl.
Dependency/version bumps
frontend/package.json, package.json
Bump Vue/PrimeVue/Tailwind and Elysia-related versions; update workspaces catalog; remove root dependency @sinclair/typebox-codegen.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant A as App (Elysia)
  participant W as Wikibase Service
  participant CV as ConstraintValidationService

  rect rgba(230,240,255,0.5)
  note right of A: Entities search/details (/api/wikibase/entities)
  C->>A: GET /properties/search?q=...
  A->>W: searchProperties(instance, q, {limit, offset, language, datatype, autocomplete})
  W-->>A: { results, totalCount, ... }
  A-->>C: 200 { data }
  end

  rect rgba(230,255,230,0.5)
  note right of A: Instance-scoped routes (/api/wikibase/:instanceId)
  C->>A: GET /:instanceId/properties/:propertyId
  A->>W: getProperty(instanceId, propertyId)
  alt includeConstraints=true
    A->>CV: getPropertyConstraints(instanceId, propertyId)
    CV-->>A: constraints[]
    A-->>C: 200 { data: { property + constraints } }
  else
    A-->>C: 200 { data: property }
  end
  end

  rect rgba(255,245,230,0.6)
  note right of A: Constraints API (/api/wikibase/constraints)
  C->>A: POST /validate/property { propertyId, values }
  A->>CV: validateProperty(instance, propertyId, values)
  CV-->>A: { isValid, violations, warnings, suggestions }
  A-->>C: 200 { data }
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d7604d and 6ef68f1.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (26)
  • .github/workflows/test.yml (1 hunks)
  • .github/workflows/typecheck.yml (1 hunks)
  • backend/eslint.config.ts (1 hunks)
  • backend/prettier.config.ts (0 hunks)
  • backend/src/api/wikibase/constraints.ts (1 hunks)
  • backend/src/api/wikibase/entities.ts (0 hunks)
  • backend/src/api/wikibase/handlers.ts (1 hunks)
  • backend/src/api/wikibase/index.ts (1 hunks)
  • backend/src/api/wikibase/instance-routes.ts (1 hunks)
  • backend/src/api/wikibase/instances.ts (10 hunks)
  • backend/src/api/wikibase/routes.ts (1 hunks)
  • backend/src/api/wikibase/schemas.ts (1 hunks)
  • backend/src/index.ts (2 hunks)
  • backend/src/services/constraint-validation.service.ts (2 hunks)
  • backend/src/services/nodemw-wikibase.service.ts (3 hunks)
  • backend/src/services/wikibase-api.service.ts (2 hunks)
  • backend/src/types/wikibase-api.ts (4 hunks)
  • backend/tests/api/wikibase/constraints.test.ts (1 hunks)
  • backend/tests/api/wikibase/entities.test.ts (3 hunks)
  • backend/tests/api/wikibase/instances.test.ts (19 hunks)
  • backend/tests/services/nodemw-wikibase.service.test.ts (4 hunks)
  • backend/tests/services/wikibase-config.service.test.ts (2 hunks)
  • frontend/.eslintrc-auto-import.json (1 hunks)
  • frontend/auto-imports.d.ts (2 hunks)
  • frontend/package.json (3 hunks)
  • package.json (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DaxServer DaxServer merged commit 9033ee4 into main Sep 7, 2025
3 of 6 checks passed
@DaxServer DaxServer deleted the update-deps branch September 7, 2025 13:10
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.

1 participant