@hestia-earth/schema-convert 33.4.0 → 33.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/json.js +2 -1
  2. package/package.json +1 -1
package/json.js CHANGED
@@ -353,8 +353,9 @@ var schemaRefValue = function (value, type) {
353
353
  ? { term: { name: value } }
354
354
  : { id: value };
355
355
  };
356
+ var isSemver = function (value) { return value.match(/^[\d]+\.[\d]+\.[\d]+$/) !== null; };
356
357
  var cleanStringValue = function (value) {
357
- return (value.match(/^[\d]+\.[\d]+\.[\d]+$/) === null ? value.replace(/\.0$/, '') : value).trim();
358
+ return ((0, utils_1.isNumber)(value) && !isSemver(value) ? value.replace(/\.0$/, '') : value).trim();
358
359
  };
359
360
  exports.cleanStringValue = cleanStringValue;
360
361
  var propertyTypeToValue = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/schema-convert",
3
- "version": "33.4.0",
3
+ "version": "33.5.0",
4
4
  "description": "HESTIA Schema Converters",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",