Upgrade Prettier in Xplat to version 1.19.1

Summary:
Upgrades Prettier in Xplat to 1.19.1
Ignores upgrading packages on already on versions greater than 1.19.1

Changelog: [Internal]

allow-large-files
bypass-lint

(Note: this ignores all push blocking failures!)

Reviewed By: gkz, cpojer

Differential Revision: D20879147

fbshipit-source-id: 0deee7ac941e91e1c3c3a1e7d3d3ed20de1d657d
This commit is contained in:
George Zahariev
2020-04-09 11:01:58 -07:00
committed by Facebook GitHub Bot
parent cd13c99d00
commit cd347a7e0e
35 changed files with 150 additions and 171 deletions
@@ -82,14 +82,10 @@ function getJavaValueForProp(
: `"${typeAnnotation.default}"`;
return `value == null ? ${defaultValueString} : (String) value`;
case 'Int32TypeAnnotation':
return `value == null ? ${
typeAnnotation.default
} : ((Double) value).intValue()`;
return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`;
case 'DoubleTypeAnnotation':
if (prop.optional) {
return `value == null ? ${
typeAnnotation.default
}f : ((Double) value).doubleValue()`;
return `value == null ? ${typeAnnotation.default}f : ((Double) value).doubleValue()`;
} else {
return 'value == null ? Double.NaN : ((Double) value).doubleValue()';
}
@@ -97,9 +93,7 @@ function getJavaValueForProp(
if (typeAnnotation.default === null) {
return 'value == null ? null : ((Double) value).floatValue()';
} else if (prop.optional) {
return `value == null ? ${
typeAnnotation.default
}f : ((Double) value).floatValue()`;
return `value == null ? ${typeAnnotation.default}f : ((Double) value).floatValue()`;
} else {
return 'value == null ? Float.NaN : ((Double) value).floatValue()';
}
@@ -126,9 +120,7 @@ function getJavaValueForProp(
case 'StringEnumTypeAnnotation':
return '(String) value';
case 'Int32EnumTypeAnnotation':
return `value == null ? ${
typeAnnotation.default
} : ((Double) value).intValue()`;
return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`;
default:
(typeAnnotation: empty);
throw new Error('Received invalid typeAnnotation');