quicktype-core 23.1.1 → 23.1.2

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.
@@ -204,7 +204,7 @@ class CPlusPlusRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
204
204
  // };
205
205
  //
206
206
  // checking to see if the collapse of the variant has
207
- // occured and then doing the isCycleBreakerType check
207
+ // occurred and then doing the isCycleBreakerType check
208
208
  // on the single type the variant would contain seems
209
209
  // to solve the problem. But does this point to a problem
210
210
  // with the core library or with the CPlusPlus package
@@ -733,7 +733,7 @@ class CPlusPlusRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
733
733
  if (constraints === undefined)
734
734
  return;
735
735
  const { minMax, minMaxLength, pattern } = constraints;
736
- // TODO is there a better way to check if property.type is an interger or a number?
736
+ // TODO is there a better way to check if property.type is an integer or a number?
737
737
  const cppType = this.cppType(property.type, {
738
738
  needsForwardIndirection: true,
739
739
  needsOptionalIndirection: true,
@@ -1171,7 +1171,7 @@ class CPlusPlusRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
1171
1171
  this.forEachEnumCase(e, "none", (name, jsonName) => {
1172
1172
  this.emitLine("case ", ourQualifier, enumName, "::", name, ": j = ", this._stringType.wrapEncodingChange([ourQualifier], this._stringType.getType(), this.NarrowString.getType(), [this._stringType.createStringLiteral([(0, Strings_1.stringEscape)(jsonName)])]), "; break;");
1173
1173
  });
1174
- this.emitLine(`default: throw std::runtime_error("Unexpected value in enumeration \\"${enumName}\\": " + std::to_string(static_cast<int>(x)));`);
1174
+ this.emitLine(`default: throw std::runtime_error("Unexpected value in enumeration \\"`, enumName, `\\": " + std::to_string(static_cast<int>(x)));`);
1175
1175
  });
1176
1176
  });
1177
1177
  }
@@ -128,7 +128,7 @@ function expandStrings(ctx, graph, inference) {
128
128
  const transformations = mappedStringTypes.transformations;
129
129
  // FIXME: This is probably wrong, or at least overly conservative. This is for the case
130
130
  // where some attributes are identity ones, i.e. where we can't merge the primitive types,
131
- // like it happens in the line after the `if`. The case where this occured was with URI
131
+ // like it happens in the line after the `if`. The case where this occurred was with URI
132
132
  // attributes: we had two separate string types with different URI attributes, but because
133
133
  // both are rewritten via `getPrimitiveType` below without any attributes, they end up
134
134
  // being the same string type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quicktype-core",
3
- "version": "23.1.1",
3
+ "version": "23.1.2",
4
4
  "description": "The quicktype engine as a library",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",