@graphitation/supermassive
Advanced tools
Comparing version 3.0.0-alpha.4 to 3.0.0-alpha.5
# Change Log - @graphitation/supermassive | ||
This log was last generated on Sun, 10 Sep 2023 20:58:42 GMT and should not be manually modified. | ||
This log was last generated on Mon, 11 Sep 2023 12:05:51 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 3.0.0-alpha.5 | ||
Mon, 11 Sep 2023 12:05:51 GMT | ||
### Changes | ||
- switch to 1-indexed ids for spec type references (vladimir.razuvaev@gmail.com) | ||
## 3.0.0-alpha.4 | ||
Sun, 10 Sep 2023 20:58:42 GMT | ||
Sun, 10 Sep 2023 20:58:53 GMT | ||
@@ -11,0 +19,0 @@ ### Changes |
@@ -97,4 +97,4 @@ "use strict"; | ||
function typeNameFromReference(typeRef) { | ||
if (typeof typeRef === "number" && EncodedSpecTypes[typeRef % NamedTypeMod]) { | ||
return EncodedSpecTypes[typeRef % NamedTypeMod]; | ||
if (typeof typeRef === "number") { | ||
return typeNameFromSpecReference(typeRef); | ||
} | ||
@@ -120,11 +120,11 @@ const ref = decodeRef(typeRef); | ||
var _a; | ||
return typeof typeRef === "number" ? (_a = EncodedSpecTypes[typeRef]) != null ? _a : "(UnknownType)" : typeRef; | ||
return typeof typeRef === "number" ? (_a = EncodedSpecTypes[typeRef - 1]) != null ? _a : "(UnknownType)" : typeRef; | ||
} | ||
function decodeRef(typeRef) { | ||
if (typeof typeRef === "number") { | ||
const stringRef = EncodedSpecTypes[typeRef]; | ||
const stringRef = EncodedSpecTypes[typeRef - 1]; | ||
if (!stringRef) { | ||
const rangeEnd = EncodedSpecTypes.length - 1; | ||
const rangeEnd = EncodedSpecTypes.length; | ||
throw new Error( | ||
`Unexpected type reference: ${typeRef} (expecting string or numeric id in the range 0-${rangeEnd})` | ||
`Unexpected type reference: ${typeRef} (expecting string or numeric id in the range 1:${rangeEnd})` | ||
); | ||
@@ -138,3 +138,6 @@ } | ||
const index = EncodedSpecTypes.indexOf(typeRef); | ||
return index === -1 ? typeRef : index; | ||
return index === -1 ? typeRef : index + 1; | ||
} | ||
function typeNameFromSpecReference(typeRef) { | ||
return decodeRef((typeRef - 1) % NamedTypeMod + 1); | ||
} |
import { DirectiveDefinitionTuple, SchemaDefinitions, TypeDefinitionsRecord } from "../schema/definition"; | ||
export declare function mergeSchemaDefinitions(accumulator: SchemaDefinitions, definitions: SchemaDefinitions[]): SchemaDefinitions | undefined; | ||
export declare function mergeSchemaDefinitions(accumulator: SchemaDefinitions, definitions: SchemaDefinitions[]): SchemaDefinitions; | ||
export declare function mergeDirectives(target: DirectiveDefinitionTuple[], source: DirectiveDefinitionTuple[]): void; | ||
@@ -4,0 +4,0 @@ /** |
@@ -45,2 +45,3 @@ "use strict"; | ||
} | ||
return accumulator; | ||
} | ||
@@ -47,0 +48,0 @@ function mergeDirectives(target, source) { |
{ | ||
"name": "@graphitation/supermassive", | ||
"license": "MIT", | ||
"version": "3.0.0-alpha.4", | ||
"version": "3.0.0-alpha.5", | ||
"main": "./lib/index", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1443209
14299