diff --git a/packages/abstractions/package.json b/packages/abstractions/package.json index dfaadcf64..1e6fcd709 100644 --- a/packages/abstractions/package.json +++ b/packages/abstractions/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-abstractions", - "version": "1.0.0-preview.47", + "version": "1.0.0-preview.48", "description": "Core abstractions for kiota generated libraries in TypeScript and JavaScript", "main": "dist/cjs/src/index.js", "module": "dist/es/src/index.js", diff --git a/packages/abstractions/src/serialization/untypedBoolean.ts b/packages/abstractions/src/serialization/untypedBoolean.ts index e6d2a61c2..469858294 100644 --- a/packages/abstractions/src/serialization/untypedBoolean.ts +++ b/packages/abstractions/src/serialization/untypedBoolean.ts @@ -5,7 +5,8 @@ export interface UntypedBoolean extends UntypedNode { } export function isUntypedBoolean(node: UntypedNode): node is UntypedBoolean { - return typeof (node as UntypedBoolean)?.value === "boolean"; + const proposedNode = node as UntypedBoolean; + return proposedNode && typeof proposedNode.value === "boolean"; } export function createUntypedBoolean(value: boolean): UntypedBoolean { diff --git a/packages/abstractions/src/serialization/untypedNumber.ts b/packages/abstractions/src/serialization/untypedNumber.ts index af34eaca2..ec225cd4d 100644 --- a/packages/abstractions/src/serialization/untypedNumber.ts +++ b/packages/abstractions/src/serialization/untypedNumber.ts @@ -5,7 +5,8 @@ export interface UntypedNumber extends UntypedNode { } export function isUntypedNumber(node: UntypedNode): node is UntypedNumber { - return typeof (node as UntypedNumber)?.value === "number"; + const proposedNode = node as UntypedNumber; + return proposedNode && typeof proposedNode.value === "number"; } export function createUntypedNumber(value: number): UntypedNumber { diff --git a/packages/abstractions/src/serialization/untypedObject.ts b/packages/abstractions/src/serialization/untypedObject.ts index 491facc92..c3022a917 100644 --- a/packages/abstractions/src/serialization/untypedObject.ts +++ b/packages/abstractions/src/serialization/untypedObject.ts @@ -5,11 +5,12 @@ export interface UntypedObject extends UntypedNode { } export function isUntypedObject(node: UntypedNode): node is UntypedObject { - const value = (node as UntypedObject)?.value; + const proposedNode = node as UntypedObject; return ( - value instanceof Object && - value instanceof Array === false && - Object.values(value).every((item) => isUntypedNode(item)) + proposedNode && + proposedNode.value instanceof Object && + proposedNode.value instanceof Array === false && + Object.values(proposedNode.value).every((item) => isUntypedNode(item)) ); } diff --git a/packages/abstractions/src/serialization/untypedString.ts b/packages/abstractions/src/serialization/untypedString.ts index aa65d6c2a..57c7b9234 100644 --- a/packages/abstractions/src/serialization/untypedString.ts +++ b/packages/abstractions/src/serialization/untypedString.ts @@ -5,7 +5,8 @@ export interface UntypedString extends UntypedNode { } export function isUntypedString(node: UntypedNode): node is UntypedString { - return typeof (node as UntypedString)?.value === "string"; + const proposedNode = node as UntypedString; + return proposedNode && typeof proposedNode.value === "string"; } export function createUntypedString(value: string): UntypedString { diff --git a/packages/authentication/azure/package.json b/packages/authentication/azure/package.json index 6a355c27e..62e883df9 100644 --- a/packages/authentication/azure/package.json +++ b/packages/authentication/azure/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-authentication-azure", - "version": "1.0.0-preview.42", + "version": "1.0.0-preview.43", "description": "Authentication provider for Kiota using Azure Identity", "main": "dist/cjs/src/index.js", "module": "dist/es/src/index.js", @@ -30,7 +30,7 @@ "homepage": "https://github.com/microsoft/kiota-typescript#readme", "dependencies": { "@azure/core-auth": "^1.5.0", - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "@opentelemetry/api": "^1.7.0", "tslib": "^2.6.2" }, diff --git a/packages/authentication/spfx/package.json b/packages/authentication/spfx/package.json index 4a17696a7..2f5a0d859 100644 --- a/packages/authentication/spfx/package.json +++ b/packages/authentication/spfx/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-authentication-spfx", - "version": "1.0.0-preview.37", + "version": "1.0.0-preview.38", "description": "Authentication provider for using Kiota in SPFx solutions", "main": "dist/cjs/src/index.js", "module": "dist/es/src/index.js", @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/microsoft/kiota-typescript#readme", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "@microsoft/sp-http": "^1.15.2", "@opentelemetry/api": "^1.7.0", "tslib": "^2.6.2" diff --git a/packages/http/fetch/package.json b/packages/http/fetch/package.json index 74efcfb44..6bd63ccc0 100644 --- a/packages/http/fetch/package.json +++ b/packages/http/fetch/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-http-fetchlibrary", - "version": "1.0.0-preview.46", + "version": "1.0.0-preview.47", "description": "Kiota request adapter implementation with fetch", "keywords": [ "Kiota", @@ -38,7 +38,7 @@ "test:cjs": "mocha 'dist/cjs/test/common/**/*.js' && mocha 'dist/cjs/test/node/**/*.js'" }, "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "@opentelemetry/api": "^1.7.0", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" diff --git a/packages/serialization/form/package.json b/packages/serialization/form/package.json index 0e655bfcb..cc37d6192 100644 --- a/packages/serialization/form/package.json +++ b/packages/serialization/form/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-serialization-form", - "version": "1.0.0-preview.36", + "version": "1.0.0-preview.37", "description": "Implementation of Kiota Serialization interfaces for URI from encoded", "main": "dist/cjs/src/index.js", "browser": { @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/microsoft/kiota-typescript#readme", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" }, diff --git a/packages/serialization/json/package.json b/packages/serialization/json/package.json index 5f35f5adc..aaef5c5e2 100644 --- a/packages/serialization/json/package.json +++ b/packages/serialization/json/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-serialization-json", - "version": "1.0.0-preview.47", + "version": "1.0.0-preview.48", "description": "Implementation of Kiota Serialization interfaces for JSON", "main": "dist/cjs/src/index.js", "browser": { @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/microsoft/kiota-typescript#readme", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" }, diff --git a/packages/serialization/multipart/package.json b/packages/serialization/multipart/package.json index d73c8e88a..3794a4864 100644 --- a/packages/serialization/multipart/package.json +++ b/packages/serialization/multipart/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-serialization-multipart", - "version": "1.0.0-preview.26", + "version": "1.0.0-preview.27", "description": "Implementation of Kiota Serialization interfaces for multipart form data", "main": "dist/cjs/src/index.js", "module": "dist/es/src/index.js", @@ -40,7 +40,7 @@ "tslib": "^2.6.2" }, "devDependencies": { - "@microsoft/kiota-serialization-json": "^1.0.0-preview.47" + "@microsoft/kiota-serialization-json": "^1.0.0-preview.48" }, "publishConfig": { "access": "public" diff --git a/packages/serialization/text/package.json b/packages/serialization/text/package.json index f3fe6fdf9..5929e9fba 100644 --- a/packages/serialization/text/package.json +++ b/packages/serialization/text/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/kiota-serialization-text", - "version": "1.0.0-preview.44", + "version": "1.0.0-preview.45", "description": "Implementation of Kiota Serialization interfaces for text", "main": "dist/cjs/src/index.js", "browser": { @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/microsoft/kiota-typescript#readme", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.47", + "@microsoft/kiota-abstractions": "^1.0.0-preview.48", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" },