Skip to content

Commit

Permalink
remove periods from schema identifier's
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Jul 21, 2024
1 parent a50f082 commit 4826f07
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/schema/src/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5800,7 +5800,7 @@ export class DateTimeUtc extends transformOrFail(
decode: decodeDateTime,
encode: (dt) => ParseResult.succeed(dateTime.formatIso(dt))
}
).annotations({ identifier: "DateTime.Utc" }) {}
).annotations({ identifier: "DateTimeUtc" }) {}

const timeZoneOffsetArbitrary = (): LazyArbitrary<dateTime.TimeZone.Offset> => (fc) =>
fc.integer({ min: -12 * 60 * 60 * 1000, max: 12 * 60 * 60 * 1000 }).map((offset) => dateTime.zoneMakeOffset(offset))
Expand Down Expand Up @@ -5831,7 +5831,7 @@ export class TimeZoneOffset extends transform(
Number$,
TimeZoneOffsetFromSelf,
{ strict: true, decode: dateTime.zoneMakeOffset, encode: (tz) => tz.offset }
).annotations({ identifier: "TimeZone.Offset" }) {}
).annotations({ identifier: "TimeZoneOffset" }) {}

const timeZoneNamedArbitrary = (): LazyArbitrary<dateTime.TimeZone.Named> => (fc) =>
fc.constantFrom(...Intl.supportedValuesOf("timeZone")).map(dateTime.zoneUnsafeMakeNamed)
Expand Down Expand Up @@ -5870,7 +5870,7 @@ export class TimeZoneNamed extends transformOrFail(
}),
encode: (tz) => ParseResult.succeed(tz.id)
}
).annotations({ identifier: "TimeZone.Named" }) {}
).annotations({ identifier: "TimeZoneNamed" }) {}

/**
* @category api interface
Expand Down Expand Up @@ -5948,7 +5948,7 @@ export class DateTimeZoned extends transformOrFail(
}),
encode: (dt) => ParseResult.succeed(dateTime.zonedToString(dt))
}
).annotations({ identifier: "DateTime.Zoned" }) {}
).annotations({ identifier: "DateTimeZoned" }) {}

/**
* @category Option utils
Expand Down
12 changes: 6 additions & 6 deletions packages/schema/test/Schema/DateTime/DateTime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ describe("DateTime.Utc", () => {
await Util.expectDecodeUnknownFailure(
schema,
"a",
`DateTime.Utc
`DateTimeUtc
└─ Transformation process failure
└─ Expected DateTime.Utc, actual "a"`
└─ Expected DateTimeUtc, actual "a"`
)
})

Expand All @@ -43,16 +43,16 @@ describe("DateTime.Zoned", () => {
await Util.expectDecodeUnknownFailure(
schema,
"1970-01-01T00:00:00.000Z",
`DateTime.Zoned
`DateTimeZoned
└─ Transformation process failure
└─ Expected DateTime.Zoned, actual "1970-01-01T00:00:00.000Z"`
└─ Expected DateTimeZoned, actual "1970-01-01T00:00:00.000Z"`
)
await Util.expectDecodeUnknownFailure(
schema,
"a",
`DateTime.Zoned
`DateTimeZoned
└─ Transformation process failure
└─ Expected DateTime.Zoned, actual "a"`
└─ Expected DateTimeZoned, actual "a"`
)
})

Expand Down

0 comments on commit 4826f07

Please sign in to comment.