@fluid-experimental/property-changeset 2.0.0-internal.3.0.5 → 2.0.0-internal.3.1.1

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 (113) hide show
  1. package/README.md +1 -0
  2. package/dist/changeset.d.ts +2 -2
  3. package/dist/changeset.d.ts.map +1 -1
  4. package/dist/changeset.js +61 -45
  5. package/dist/changeset.js.map +1 -1
  6. package/dist/changeset_operations/array.d.ts +6 -6
  7. package/dist/changeset_operations/array.d.ts.map +1 -1
  8. package/dist/changeset_operations/array.js +87 -56
  9. package/dist/changeset_operations/array.js.map +1 -1
  10. package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  11. package/dist/changeset_operations/arrayChangesetIterator.js +43 -41
  12. package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
  13. package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
  14. package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
  15. package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
  16. package/dist/changeset_operations/indexedCollection.js +76 -44
  17. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  18. package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
  19. package/dist/changeset_operations/isEmptyChangeset.js +2 -1
  20. package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
  21. package/dist/changeset_operations/operationTypes.d.ts.map +1 -1
  22. package/dist/changeset_operations/operationTypes.js.map +1 -1
  23. package/dist/helpers/typeidHelper.d.ts +10 -10
  24. package/dist/helpers/typeidHelper.d.ts.map +1 -1
  25. package/dist/helpers/typeidHelper.js +19 -17
  26. package/dist/helpers/typeidHelper.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/isReservedKeyword.d.ts.map +1 -1
  30. package/dist/isReservedKeyword.js.map +1 -1
  31. package/dist/pathHelper.d.ts.map +1 -1
  32. package/dist/pathHelper.js +16 -10
  33. package/dist/pathHelper.js.map +1 -1
  34. package/dist/rebase.d.ts.map +1 -1
  35. package/dist/rebase.js +20 -13
  36. package/dist/rebase.js.map +1 -1
  37. package/dist/templateSchema.d.ts.map +1 -1
  38. package/dist/templateSchema.js +10 -11
  39. package/dist/templateSchema.js.map +1 -1
  40. package/dist/templateValidator.d.ts.map +1 -1
  41. package/dist/templateValidator.js +135 -102
  42. package/dist/templateValidator.js.map +1 -1
  43. package/dist/test/array.spec.js +141 -343
  44. package/dist/test/array.spec.js.map +1 -1
  45. package/dist/test/pathHelper.spec.js +299 -166
  46. package/dist/test/pathHelper.spec.js.map +1 -1
  47. package/dist/test/reversibleCs.spec.js.map +1 -1
  48. package/dist/test/schemaValidator.js +3 -1
  49. package/dist/test/schemaValidator.js.map +1 -1
  50. package/dist/test/schemas/badBothPropertiesAndTypeid.js +8 -8
  51. package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
  52. package/dist/test/schemas/badInvalidSemverInTypeid.js +18 -16
  53. package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
  54. package/dist/test/schemas/badMissingSemverInTypeid.js +18 -16
  55. package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
  56. package/dist/test/schemas/badNestedProperties.js +18 -17
  57. package/dist/test/schemas/badNestedProperties.js.map +1 -1
  58. package/dist/test/schemas/badPrimitiveTypeid.js +9 -8
  59. package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
  60. package/dist/test/schemas/badVersionedTypeid.js +19 -17
  61. package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
  62. package/dist/test/schemas/goodColorPalette.js +4 -4
  63. package/dist/test/schemas/goodColorPalette.js.map +1 -1
  64. package/dist/test/schemas/goodDraftAsVersion.js +2 -4
  65. package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
  66. package/dist/test/schemas/goodPointId.js +18 -16
  67. package/dist/test/schemas/goodPointId.js.map +1 -1
  68. package/dist/test/schemas/goodReferenceAndRegular.js +5 -5
  69. package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
  70. package/dist/test/schemas/goodReservedTypes.js +8 -7
  71. package/dist/test/schemas/goodReservedTypes.js.map +1 -1
  72. package/dist/test/schemas/goodUIBorder.js +19 -16
  73. package/dist/test/schemas/goodUIBorder.js.map +1 -1
  74. package/dist/test/tsconfig.tsbuildinfo +1 -1
  75. package/dist/test/validator/templateSyntax.spec.js.map +1 -1
  76. package/dist/test/validator/templateValidator.spec.js +329 -306
  77. package/dist/test/validator/templateValidator.spec.js.map +1 -1
  78. package/dist/test/validator/typeidHelper.spec.js +98 -65
  79. package/dist/test/validator/typeidHelper.spec.js.map +1 -1
  80. package/dist/utils.d.ts +1 -1
  81. package/dist/utils.d.ts.map +1 -1
  82. package/dist/utils.js +149 -95
  83. package/dist/utils.js.map +1 -1
  84. package/dist/validationResultBuilder.d.ts.map +1 -1
  85. package/dist/validationResultBuilder.js.map +1 -1
  86. package/lib/changeset.js +63 -47
  87. package/lib/changeset.js.map +1 -1
  88. package/lib/changeset_operations/array.js +88 -57
  89. package/lib/changeset_operations/array.js.map +1 -1
  90. package/lib/changeset_operations/arrayChangesetIterator.js +43 -41
  91. package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
  92. package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
  93. package/lib/changeset_operations/indexedCollection.js +76 -44
  94. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  95. package/lib/changeset_operations/isEmptyChangeset.js +2 -1
  96. package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
  97. package/lib/changeset_operations/operationTypes.js.map +1 -1
  98. package/lib/helpers/typeidHelper.js +19 -17
  99. package/lib/helpers/typeidHelper.js.map +1 -1
  100. package/lib/index.js.map +1 -1
  101. package/lib/isReservedKeyword.js.map +1 -1
  102. package/lib/pathHelper.js +17 -11
  103. package/lib/pathHelper.js.map +1 -1
  104. package/lib/rebase.js +20 -13
  105. package/lib/rebase.js.map +1 -1
  106. package/lib/templateSchema.js +10 -11
  107. package/lib/templateSchema.js.map +1 -1
  108. package/lib/templateValidator.js +135 -102
  109. package/lib/templateValidator.js.map +1 -1
  110. package/lib/utils.js +149 -95
  111. package/lib/utils.js.map +1 -1
  112. package/lib/validationResultBuilder.js.map +1 -1
  113. package/package.json +100 -100
@@ -178,8 +178,10 @@ const _psetDeepEquals = function (in_source, in_target) {
178
178
  // A template with abstract properties must equal one with an empty properties array
179
179
  // We check the difference in keys between the source and target and if the only difference is the
180
180
  // properties array we check if it's empty. Then we reverse the condition so it work both ways.
181
- if ((isEqual(difference(keysTarget, keysSource), ["properties"]) && !target.properties.length) ||
182
- (isEqual(difference(keysSource, keysTarget), ["properties"]) && !source.properties.length)) {
181
+ if ((isEqual(difference(keysTarget, keysSource), ["properties"]) &&
182
+ !target.properties.length) ||
183
+ (isEqual(difference(keysSource, keysTarget), ["properties"]) &&
184
+ !source.properties.length)) {
183
185
  return _getPSetDeepEqualsResult(true);
184
186
  }
185
187
  return _getPSetDeepEqualsResult(false);
@@ -291,40 +293,42 @@ const _validatePositiveIncrement = function (in_template, in_templatePrevious, i
291
293
  }
292
294
  if (CHANGE_LEVEL[versionDiff] < CHANGE_LEVEL[minimumLevel]) {
293
295
  // Violates rule 6 (warning).
294
- this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 + JSON.stringify({
295
- mutation,
296
- id: idPath.join("."),
297
- level: {
298
- expected: minimumLevel,
299
- actual: versionDiff,
300
- },
301
- version: {
302
- current: in_version,
303
- previous: in_versionPrevious,
304
- },
305
- }));
296
+ this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 +
297
+ JSON.stringify({
298
+ mutation,
299
+ id: idPath.join("."),
300
+ level: {
301
+ expected: minimumLevel,
302
+ actual: versionDiff,
303
+ },
304
+ version: {
305
+ current: in_version,
306
+ previous: in_versionPrevious,
307
+ },
308
+ }));
306
309
  }
307
310
  }
308
311
  else {
309
312
  const sourceObjType = _getType.call(this, sourceObj);
310
313
  const targetObjType = _getType.call(this, targetObj);
311
314
  if (sourceObjType !== targetObjType) {
312
- this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 + JSON.stringify({
313
- mutation: "change",
314
- id: idPath.join("."),
315
- type: {
316
- current: targetObjType,
317
- previous: sourceObjType,
318
- },
319
- level: {
320
- expected: "major",
321
- actual: versionDiff,
322
- },
323
- version: {
324
- current: in_version,
325
- previous: in_versionPrevious,
326
- },
327
- }));
315
+ this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 +
316
+ JSON.stringify({
317
+ mutation: "change",
318
+ id: idPath.join("."),
319
+ type: {
320
+ current: targetObjType,
321
+ previous: sourceObjType,
322
+ },
323
+ level: {
324
+ expected: "major",
325
+ actual: versionDiff,
326
+ },
327
+ version: {
328
+ current: in_version,
329
+ previous: in_versionPrevious,
330
+ },
331
+ }));
328
332
  }
329
333
  if (Array.isArray(sourceObj)) {
330
334
  let targetMap = {};
@@ -342,18 +346,19 @@ const _validatePositiveIncrement = function (in_template, in_templatePrevious, i
342
346
  if (CHANGE_LEVEL[versionDiff] < CHANGE_LEVEL[minimumLevel]) {
343
347
  // Violates rule 5 (warning)
344
348
  idPath.push(Object.keys(targetMap)[0]);
345
- this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 + JSON.stringify({
346
- mutation: "add",
347
- id: idPath.join("."),
348
- level: {
349
- expected: minimumLevel,
350
- actual: versionDiff,
351
- },
352
- version: {
353
- current: in_version,
354
- previous: in_versionPrevious,
355
- },
356
- }));
349
+ this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 +
350
+ JSON.stringify({
351
+ mutation: "add",
352
+ id: idPath.join("."),
353
+ level: {
354
+ expected: minimumLevel,
355
+ actual: versionDiff,
356
+ },
357
+ version: {
358
+ current: in_version,
359
+ previous: in_versionPrevious,
360
+ },
361
+ }));
357
362
  idPath.pop();
358
363
  }
359
364
  }
@@ -374,22 +379,25 @@ const _validatePositiveIncrement = function (in_template, in_templatePrevious, i
374
379
  if (!isEmpty(remainingKeys)) {
375
380
  // Added new keys to the target. This is a MINOR change, unless they new key is a
376
381
  // comment, in which case this is a PATCH level change.
377
- let minimumLevel = remainingKeys.length === 1 && remainingKeys[0] === "annotation" ? "patch" : "minor";
382
+ let minimumLevel = remainingKeys.length === 1 && remainingKeys[0] === "annotation"
383
+ ? "patch"
384
+ : "minor";
378
385
  if (CHANGE_LEVEL[versionDiff] < CHANGE_LEVEL[minimumLevel]) {
379
386
  // Violates rule 5 (warning)
380
387
  idPath.push(remainingKeys[0]);
381
- this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 + JSON.stringify({
382
- mutation: "add",
383
- id: idPath.join("."),
384
- level: {
385
- expected: minimumLevel,
386
- actual: versionDiff,
387
- },
388
- version: {
389
- current: in_version,
390
- previous: in_versionPrevious,
391
- },
392
- }));
388
+ this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 +
389
+ JSON.stringify({
390
+ mutation: "add",
391
+ id: idPath.join("."),
392
+ level: {
393
+ expected: minimumLevel,
394
+ actual: versionDiff,
395
+ },
396
+ version: {
397
+ current: in_version,
398
+ previous: in_versionPrevious,
399
+ },
400
+ }));
393
401
  idPath.pop();
394
402
  }
395
403
  }
@@ -403,22 +411,23 @@ const _validatePositiveIncrement = function (in_template, in_templatePrevious, i
403
411
  if (sourceObj !== targetObj) {
404
412
  let minimumLevel = id === "value" ? "minor" : "major";
405
413
  if (CHANGE_LEVEL[versionDiff] < CHANGE_LEVEL[minimumLevel]) {
406
- this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 + JSON.stringify({
407
- mutation: "change",
408
- id: idPath.join("."),
409
- level: {
410
- expected: minimumLevel,
411
- actual: versionDiff,
412
- },
413
- value: {
414
- current: targetObj,
415
- previous: sourceObj,
416
- },
417
- version: {
418
- current: in_version,
419
- previous: in_versionPrevious,
420
- },
421
- }));
414
+ this._resultBuilder.addWarning(MSG.CHANGE_LEVEL_TOO_LOW_1 +
415
+ JSON.stringify({
416
+ mutation: "change",
417
+ id: idPath.join("."),
418
+ level: {
419
+ expected: minimumLevel,
420
+ actual: versionDiff,
421
+ },
422
+ value: {
423
+ current: targetObj,
424
+ previous: sourceObj,
425
+ },
426
+ version: {
427
+ current: in_version,
428
+ previous: in_versionPrevious,
429
+ },
430
+ }));
422
431
  }
423
432
  }
424
433
  }
@@ -582,30 +591,36 @@ const _validateContextAsync = async function (in_template) {
582
591
  return Promise.reject(new Error(MSG.SET_ONLY_NAMED_PROPS));
583
592
  }
584
593
  // Since context is 'set' the template must eventually inherit from NamedProperty (same as above)
585
- if (includes(in_template.inherits, "NamedProperty") || in_template.inherits === "NamedProperty") {
594
+ if (includes(in_template.inherits, "NamedProperty") ||
595
+ in_template.inherits === "NamedProperty") {
586
596
  return Promise.resolve();
587
597
  }
588
598
  }
589
599
  const typedValuePromise = Promise.all(typedValuePromises);
590
600
  let parents = [];
591
601
  if (in_template.inherits) {
592
- parents = Array.isArray(in_template.inherits) ? in_template.inherits : [in_template.inherits];
602
+ parents = Array.isArray(in_template.inherits)
603
+ ? in_template.inherits
604
+ : [in_template.inherits];
593
605
  }
594
606
  const inheritsPromises = parents.map((typeid) => this._inheritsFromAsync(typeid, "NamedProperty"));
595
607
  // Combine results from inheritsPromises and typedValuePromise
596
608
  inheritsPromises.push(typedValuePromise);
597
- return Promise.all(inheritsPromises).then(function (results) {
609
+ return Promise.all(inheritsPromises)
610
+ .then(function (results) {
598
611
  const foundNamedPropertyDescendant = find(results, (res) => res);
599
612
  if (!foundNamedPropertyDescendant) {
600
613
  return Promise.reject(Error(MSG.SET_ONLY_NAMED_PROPS));
601
614
  }
602
615
  return that._hasSchemaAsync(in_template.typeid);
603
- }).then(function (hasIt) {
616
+ })
617
+ .then(function (hasIt) {
604
618
  if (!hasIt) {
605
619
  return Promise.reject(new Error(MSG.SET_ONLY_NAMED_PROPS));
606
620
  }
607
621
  return that._inheritsFromAsync(in_template.typeid, "NamedProperty");
608
- }).then(async function (res) {
622
+ })
623
+ .then(async function (res) {
609
624
  if (res) {
610
625
  return undefined;
611
626
  }
@@ -656,13 +671,14 @@ const _processValidationResults = function (in_template) {
656
671
  error.message = `typeid should have a pattern like: my.example:point-1.0.0 ${error.data} does not match that pattern`;
657
672
  }
658
673
  else if ("pattern" && regexTypeId.test(error.dataPath)) {
659
- error.message = error.schemaPath === "#/definitions/typed-reference-typeid/pattern"
660
- ? ""
661
- : `${error.dataPath} should follow this pattern: <namespace>:<typeid>-<version> ` +
662
- `(for example: Sample:Rectangle-1.0.0) or match one of the Primitive Types (Float32, Float64, ` +
663
- `Int8, Uint8, Int16, Uint16, Int32, Uint32, Bool, String, Reference, Enum, Int64, Uint64) or ` +
664
- `Reserved Types (BaseProperty, NamedProperty, NodeProperty, NamedNodeProperty, ` +
665
- `RelationshipProperty). '${error.data}' is not valid`;
674
+ error.message =
675
+ error.schemaPath === "#/definitions/typed-reference-typeid/pattern"
676
+ ? ""
677
+ : `${error.dataPath} should follow this pattern: <namespace>:<typeid>-<version> ` +
678
+ `(for example: Sample:Rectangle-1.0.0) or match one of the Primitive Types (Float32, Float64, ` +
679
+ `Int8, Uint8, Int16, Uint16, Int32, Uint32, Bool, String, Reference, Enum, Int64, Uint64) or ` +
680
+ `Reserved Types (BaseProperty, NamedProperty, NodeProperty, NamedNodeProperty, ` +
681
+ `RelationshipProperty). '${error.data}' is not valid`;
666
682
  }
667
683
  break;
668
684
  case "enum":
@@ -728,9 +744,12 @@ const createContextCheckAsyncQueue = function () {
728
744
  const that = this;
729
745
  const contextCheckWorker = function (in_task, in_callback) {
730
746
  const property = in_task.property;
731
- _validateContextAsync.call(that, property).then(function (response) {
747
+ _validateContextAsync
748
+ .call(that, property)
749
+ .then(function (response) {
732
750
  in_callback();
733
- }).catch(function (error) {
751
+ })
752
+ .catch(function (error) {
734
753
  in_callback({ error });
735
754
  });
736
755
  };
@@ -794,11 +813,15 @@ export class TemplateValidator {
794
813
  this._skipSemver = in_params ? !!in_params.skipSemver : false;
795
814
  this._allowDraft = in_params ? !!in_params.allowDraft : false;
796
815
  // Used by validate()
797
- if (in_params && in_params.inheritsFrom !== undefined && in_params.hasSchema !== undefined) {
816
+ if (in_params &&
817
+ in_params.inheritsFrom !== undefined &&
818
+ in_params.hasSchema !== undefined) {
798
819
  this._inheritsFrom = in_params.inheritsFrom;
799
820
  this._hasSchema = in_params.hasSchema;
800
821
  }
801
- else if (in_params && in_params.inheritsFromAsync !== undefined && in_params.hasSchemaAsync !== undefined) {
822
+ else if (in_params &&
823
+ in_params.inheritsFromAsync !== undefined &&
824
+ in_params.hasSchemaAsync !== undefined) {
802
825
  this._inheritsFromAsync = in_params.inheritsFromAsync;
803
826
  this._hasSchemaAsync = in_params.hasSchemaAsync;
804
827
  }
@@ -847,7 +870,8 @@ export class TemplateValidator {
847
870
  validate(in_template, in_templatePrevious) {
848
871
  this._resultBuilder = new ValidationResultBuilder(in_template ? in_template.typeid : "");
849
872
  let isDraft = false;
850
- if (in_template && in_template.typeid &&
873
+ if (in_template &&
874
+ in_template.typeid &&
851
875
  TypeIdHelper.extractVersion(in_template.typeid).version === "draft") {
852
876
  if (this._allowDraft) {
853
877
  isDraft = true;
@@ -883,7 +907,9 @@ export class TemplateValidator {
883
907
  }
884
908
  // semver format validation
885
909
  const version = _validateSemverFormat.call(this, in_template);
886
- const versionPrevious = in_templatePrevious ? _validateSemverFormat.call(this, in_templatePrevious) : null;
910
+ const versionPrevious = in_templatePrevious
911
+ ? _validateSemverFormat.call(this, in_templatePrevious)
912
+ : null;
887
913
  // semver format validation must pass.
888
914
  if (!this._resultBuilder.isValid()) {
889
915
  return this._resultBuilder.result;
@@ -901,10 +927,11 @@ export class TemplateValidator {
901
927
  default:
902
928
  case -1:
903
929
  // previousVersion is greater. Violates rule 3b.
904
- this._resultBuilder.addError(new Error(MSG.VERSION_REGRESSION_1 + JSON.stringify({
905
- current: version,
906
- previous: versionPrevious,
907
- })));
930
+ this._resultBuilder.addError(new Error(MSG.VERSION_REGRESSION_1 +
931
+ JSON.stringify({
932
+ current: version,
933
+ previous: versionPrevious,
934
+ })));
908
935
  break;
909
936
  }
910
937
  }
@@ -957,9 +984,9 @@ export class TemplateValidator {
957
984
  if (!this._resultBuilder.isValid()) {
958
985
  return Promise.resolve(this._resultBuilder.result);
959
986
  }
960
- return (in_templatePrevious) ?
961
- this._validateAsyncWithPreviousSchema(in_template, in_templatePrevious) :
962
- _validateSemanticAndSyntaxAsync.call(this, in_template);
987
+ return in_templatePrevious
988
+ ? this._validateAsyncWithPreviousSchema(in_template, in_templatePrevious)
989
+ : _validateSemanticAndSyntaxAsync.call(this, in_template);
963
990
  }
964
991
  /**
965
992
  * Called by validateAsync if a previous schema is passed in argument
@@ -972,7 +999,10 @@ export class TemplateValidator {
972
999
  */
973
1000
  async _validateAsyncWithPreviousSchema(in_template, in_templatePrevious) {
974
1001
  const that = this;
975
- return _validateSemanticAndSyntaxAsync.call(that, in_template).then(() => _validateSemanticAndSyntaxAsync.call(that, in_templatePrevious)).then(function () {
1002
+ return _validateSemanticAndSyntaxAsync
1003
+ .call(that, in_template)
1004
+ .then(() => _validateSemanticAndSyntaxAsync.call(that, in_templatePrevious))
1005
+ .then(function () {
976
1006
  if (!that._resultBuilder.isValid()) {
977
1007
  // Here the previous template is not valid. Make sure the typeid in the returned info is
978
1008
  // the root of the template that failed validation.
@@ -982,7 +1012,9 @@ export class TemplateValidator {
982
1012
  _validateSkipSemver.call(that, in_template, in_templatePrevious);
983
1013
  }
984
1014
  const version = _validateSemverFormat.call(that, in_template);
985
- const versionPrevious = in_templatePrevious ? _validateSemverFormat.call(that, in_templatePrevious) : null;
1015
+ const versionPrevious = in_templatePrevious
1016
+ ? _validateSemverFormat.call(that, in_templatePrevious)
1017
+ : null;
986
1018
  // Validate that the semver change is valid.
987
1019
  switch (compare(version, versionPrevious)) {
988
1020
  case 0:
@@ -995,10 +1027,11 @@ export class TemplateValidator {
995
1027
  default:
996
1028
  case -1:
997
1029
  // previousVersion is greater. Violates rule 3b.
998
- that._resultBuilder.addError(new Error(MSG.VERSION_REGRESSION_1 + JSON.stringify({
999
- current: version,
1000
- previous: versionPrevious,
1001
- })));
1030
+ that._resultBuilder.addError(new Error(MSG.VERSION_REGRESSION_1 +
1031
+ JSON.stringify({
1032
+ current: version,
1033
+ previous: versionPrevious,
1034
+ })));
1002
1035
  break;
1003
1036
  }
1004
1037
  return that._resultBuilder.result;