Skip to content

Conversation

@LayerDynamics
Copy link
Owner

No description provided.

@LayerDynamics LayerDynamics requested a review from Copilot May 14, 2025 12:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors several modules and updates the project version while improving tests and decorator patterns. Key changes include:

  • Bumping the application version and updating related tests.
  • Refactoring decorators (OneToMany, ManyToOne, Audited, Versioned) to support new overloads and improved type safety.
  • Updating query builder vector search syntaxes and refining TTL handling in caching.

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/version.ts Version bump from 0.1.0 to 0.1.1
src/tests/unit/realtime/WebSocketServer.test.ts Migration to StandardWebSocketClient and added error handling in message parsing
src/tests/unit/caching/DenoKVCache.test.ts Enhanced TTL tests with connection handling improvements
src/query/QueryBuilder.ts Updated default SQL syntaxes and removed customFormatter
src/models/User.ts, ModelRegistry.ts Type safety improvements for relation definitions
src/graphql/GraphQLSchema.ts Handling of symbol-based property keys in schema generation
src/decorators/*.ts Refactored decorators to improve overload signatures and internal practices
src/caching/DenoKVCache.ts Refined TTL conversion and options assignment
.history/* Removal of outdated historical model versions
Comments suppressed due to low confidence (4)

src/query/QueryBuilder.ts:315

  • Removing the customFormatter function eliminates warnings for unconfigured vector operations; consider providing alternative documentation or logging to notify users when vector operations are not configured.
customFormatter: (_op, paramIndex) => {

src/graphql/GraphQLSchema.ts:51

  • [nitpick] Ensure the regex used to convert symbol property keys covers all expected symbol formats; additional tests might help verify that no unexpected values pass through.
const fieldName = typeof relation.propertyKey === 'symbol' ? relation.propertyKey.toString().replace(/Symbol\(|\)/g, '') : relation.propertyKey;

src/caching/DenoKVCache.ts:27

  • Document that defaultTtl is provided in seconds and is multiplied by 1000 to convert to milliseconds; this will avoid potential confusion about TTL units.
const expireIn = ttl !== undefined ? ttl : this.defaultTtl !== undefined ? this.defaultTtl * 1000 : undefined;

src/decorators/ManyToOne.ts:47

  • [nitpick] For consistency with the OneToMany decorator which uses a local variable (_propertyKey), consider aligning the naming conventions in ManyToOne to improve clarity and maintainability.
propertyKey,

@LayerDynamics LayerDynamics merged commit b67acf7 into main May 14, 2025
2 of 4 checks passed
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