From b6a7d375ccd4daaab69ec29899a1e83e2ad0aebf Mon Sep 17 00:00:00 2001 From: Biz Melesse Date: Fri, 17 Jan 2025 13:47:45 -0600 Subject: [PATCH] Fix a bug with async prop value validation --- packages/connect-react/CHANGELOG.md | 4 ++++ packages/connect-react/examples/nextjs/package-lock.json | 2 +- packages/connect-react/package.json | 2 +- packages/connect-react/src/utils/component.ts | 2 +- pnpm-lock.yaml | 9 +++------ 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/connect-react/CHANGELOG.md b/packages/connect-react/CHANGELOG.md index 71c3730977be6..cf34e2edadfe4 100644 --- a/packages/connect-react/CHANGELOG.md +++ b/packages/connect-react/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +# [1.0.0-preview.21] - 2025-01-17 + +- Fix a bug in async prop value validation when the prop is a string + # [1.0.0-preview.20] - 2025-01-16 - Check if a string prop is set instead of inspecting the contents of the string diff --git a/packages/connect-react/examples/nextjs/package-lock.json b/packages/connect-react/examples/nextjs/package-lock.json index f175221cd4da7..1530fd1cb7c98 100644 --- a/packages/connect-react/examples/nextjs/package-lock.json +++ b/packages/connect-react/examples/nextjs/package-lock.json @@ -23,7 +23,7 @@ }, "../..": { "name": "@pipedream/connect-react", - "version": "1.0.0-preview.19", + "version": "1.0.0-preview.20", "license": "MIT", "dependencies": { "@pipedream/sdk": "workspace:^", diff --git a/packages/connect-react/package.json b/packages/connect-react/package.json index 9ef4b1a8dff0f..b440f1fe175b5 100644 --- a/packages/connect-react/package.json +++ b/packages/connect-react/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/connect-react", - "version": "1.0.0-preview.20", + "version": "1.0.0-preview.21", "description": "Pipedream Connect library for React", "files": [ "dist" diff --git a/packages/connect-react/src/utils/component.ts b/packages/connect-react/src/utils/component.ts index 1f1ad30f39e08..c3fe9e212832b 100644 --- a/packages/connect-react/src/utils/component.ts +++ b/packages/connect-react/src/utils/component.ts @@ -98,7 +98,7 @@ export function stringPropErrors(opts: ValidationOpts): prop, value: valueOpt, } = opts - if (!prop.default && (valueOpt == null || typeof value === "undefined")) return [ + if (!prop.default && (valueOpt == null || typeof valueOpt === "undefined")) return [ "required", ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fff5f6ae00a1a..96f5f58bbcf90 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1554,8 +1554,7 @@ importers: components/calllerapi: {} - components/callminer: - specifiers: {} + components/callminer: {} components/callpage: dependencies: @@ -3283,8 +3282,7 @@ importers: components/eodhd_apis: {} - components/epic_games: - specifiers: {} + components/epic_games: {} components/epsy: dependencies: @@ -6030,8 +6028,7 @@ importers: components/logistia_route_planner: {} - components/logo_dev: - specifiers: {} + components/logo_dev: {} components/logoraisr: {}