Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/pinia-orm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"tsup": "^8.1.0",
"typescript": "^5.8.2",
"unbuild": "^3.1.0",
"uuid": "^10.0.0",
"uuid": "^11.0.5",
"vite": "^6.0.0",
"vitest": "^3.0.5",
"vue": "^3.5.13"
Expand Down
6 changes: 3 additions & 3 deletions packages/pinia-orm/src/packages/uuid/casts/V1Cast.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { v1 } from 'uuid'
import type { V1Options } from 'uuid'
import type { Version1Options } from 'uuid'
import type { ModelFields } from '../../../../src/model/Model'
import { CastAttribute } from '../../../../src/model/casts/CastAttribute'

export class UidCast extends CastAttribute {
static parameters?: V1Options
static parameters?: Version1Options

/**
* Create a new String attribute instance.
Expand All @@ -13,7 +13,7 @@ export class UidCast extends CastAttribute {
super(attributes)
}

static withParameters (parameters?: V1Options): typeof CastAttribute {
static withParameters (parameters?: Version1Options): typeof CastAttribute {
this.parameters = parameters
return this
}
Expand Down
6 changes: 3 additions & 3 deletions packages/pinia-orm/src/packages/uuid/casts/V4Cast.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { v4 } from 'uuid'
import type { V4Options } from 'uuid'
import type { Version4Options } from 'uuid'
import type { ModelFields } from '../../../../src/model/Model'
import { CastAttribute } from '../../../../src/model/casts/CastAttribute'

export class UidCast extends CastAttribute {
static parameters?: V4Options
static parameters?: Version4Options

/**
* Create a new String attribute instance.
Expand All @@ -13,7 +13,7 @@ export class UidCast extends CastAttribute {
super(attributes)
}

static withParameters (parameters?: V4Options): typeof CastAttribute {
static withParameters (parameters?: Version4Options): typeof CastAttribute {
this.parameters = parameters
return this
}
Expand Down
4 changes: 2 additions & 2 deletions packages/pinia-orm/src/packages/uuid/decorators/UidV1.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { V1Options } from 'uuid'
import type { Version1Options } from 'uuid'
import type { PropertyDecorator } from '../../../../src/decorators'
import { UidCast } from '../casts/V1Cast'

/**
* Create a cast for an attribute property decorator.
*/
export function Uid (options?: V1Options): PropertyDecorator {
export function Uid (options?: Version1Options): PropertyDecorator {
return (target, propertyKey) => {
const self = target.$self()
self.setCast(propertyKey, UidCast.withParameters(options))
Expand Down
4 changes: 2 additions & 2 deletions packages/pinia-orm/src/packages/uuid/decorators/UidV4.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { V4Options } from 'uuid'
import type { Version4Options } from 'uuid'
import type { PropertyDecorator } from '../../../../src/decorators'
import { UidCast } from '../casts/V4Cast'

/**
* Create a cast for an attribute property decorator.
*/
export function Uid (options?: V4Options): PropertyDecorator {
export function Uid (options?: Version4Options): PropertyDecorator {
return (target, propertyKey) => {
const self = target.$self()
self.setCast(propertyKey, UidCast.withParameters(options))
Expand Down
90 changes: 66 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading