From a3a4c2f438aeb04894efc3ece66ba23adc443400 Mon Sep 17 00:00:00 2001 From: Rohin Bhargava Date: Fri, 22 Nov 2024 18:08:21 -0500 Subject: [PATCH] fix(cli): remove default float min max (#5258) * use convertDouble for float conversion * update snapshot tests * update cli version * chore: update changelog --------- Co-authored-by: fern-bot --- fern/pages/changelogs/cli/2024-11-22.mdx | 4 ++ packages/cli/cli/versions.yml | 7 ++++ .../csharp-grpc-proto-exhaustive.json | 40 ++++--------------- .../__snapshots__/csharp-grpc-proto.json | 10 +---- .../__test__/__snapshots__/object.json | 5 +-- .../ir-to-fdr-converter/convertTypeShape.ts | 7 +--- 6 files changed, 23 insertions(+), 50 deletions(-) create mode 100644 fern/pages/changelogs/cli/2024-11-22.mdx diff --git a/fern/pages/changelogs/cli/2024-11-22.mdx b/fern/pages/changelogs/cli/2024-11-22.mdx new file mode 100644 index 00000000000..9b452701ba4 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-11-22.mdx @@ -0,0 +1,4 @@ +## 0.45.0-rc54 +**`(internal):`** Removes errant minimum and maximums for 'float' types for docs. + + diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index ebad321e126..0cf25f2d321 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,10 @@ +- changelogEntry: + - summary: | + Removes errant minimum and maximums for 'float' types for docs. + type: internal + irVersion: 53 + version: 0.45.0-rc54 + - changelogEntry: - summary: | Add support for the `smart-casing` flags in the IR commands. diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json index 86c8f3a7075..634f816b847 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json @@ -22,10 +22,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -111,10 +108,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -215,10 +209,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -371,10 +362,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -548,10 +536,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -565,10 +550,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -1507,10 +1489,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -1701,10 +1680,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json index 16a7d804025..c8de10bcf11 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json @@ -71,10 +71,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } @@ -244,10 +241,7 @@ "itemType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json index 36bc6e5b4e6..aaa0e393f32 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json @@ -246,10 +246,7 @@ "valueType": { "type": "primitive", "value": { - "type": "double", - "minimum": 2.2250738585072014e-308, - "maximum": 1.7976931348623157e+308, - "default": 0 + "type": "double" } } }, diff --git a/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts b/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts index 91a24768e80..476327f9eb0 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts +++ b/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts @@ -196,12 +196,7 @@ export function convertTypeReference(irTypeReference: Ir.types.TypeReference): F float: () => { // TODO: Add support for float types in FDR. We render them as double for now // (they have the same JSON representation). - return { - type: "double", - minimum: 2.2250738585072014e-308, - maximum: 1.7976931348623157e308, - default: 0.0 - }; + return convertDouble(primitive.v2); }, double: () => { return convertDouble(primitive.v2);