Skip to content

Conversation

@tim-hm
Copy link
Collaborator

@tim-hm tim-hm commented Nov 11, 2025

No description provided.

Move all API DTOs, shared types, and constants from the nildb package into a dedicated `@nillion/nildb-types` package. This improves code reuse across the monorepo and establishes a clean boundary between API contracts and business logic.
Create a `@nillion/shared` workspace package to house common utilities.  Initially, moved three core utilities from `packages/nildb/src/common/`:

- `cache.ts`: Generic TTL-based cache using Temporal API
- `date.ts`: Date manipulation utilities
- `did-utils.ts`: DID normalization for legacy identifier format support
Given the upgrade path for moving to migrate-mongo requires either a fresh node or a node upgrading from 1.1.2, the did-migration test is no longer applicable.
- Drop redundant `nildb-` prefix in folder names:
  - `packages/nildb` → `packages/api`
  - `packages/nildb-client` → `packages/client`
  - `packages/nildb-types` → `packages/types`
  - Package names remain unchanged (@nillion/nildb, @nillion/nildb-client, etc.)

- Consolidate duplicate HttpClient type exports
  - Extract shared HttpClient type to `packages/client/src/types.ts`
  - Update all client files to import from shared types

- Update all internal references:
  - TypeScript path mappings in tsconfig files
  - Project references in root tsconfig.json
  - Docker build paths in justfile
  - Test fixture environment paths
@tim-hm tim-hm force-pushed the fix/migration-conolisdation-error branch from f7ed2b4 to afe132f Compare November 11, 2025 10:21
@tim-hm tim-hm force-pushed the fix/migration-conolisdation-error branch from afe132f to 871aa98 Compare November 11, 2025 10:22
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 80.79% 1123 / 1390
🔵 Statements 80.39% 1136 / 1413
🔵 Functions 82.34% 569 / 691
🔵 Branches 53.31% 169 / 317
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/api/src/common/types.ts 100% 100% 100% 100%
Generated in workflow #434 for commit 0c69d87 by the Vitest Coverage Report Action

@tim-hm tim-hm force-pushed the fix/migration-conolisdation-error branch from 55e732c to 0c69d87 Compare November 11, 2025 10:42
@tim-hm tim-hm merged commit 1dda343 into main Nov 11, 2025
2 checks passed
@tim-hm tim-hm deleted the fix/migration-conolisdation-error branch November 11, 2025 13:05
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