Skip to content

feat(repo): add @uipath/flow-node-schema package#362

Draft
nikhil-maryala wants to merge 1 commit intomainfrom
feat/flow-schema-package
Draft

feat(repo): add @uipath/flow-node-schema package#362
nikhil-maryala wants to merge 1 commit intomainfrom
feat/flow-schema-package

Conversation

@nikhil-maryala
Copy link

@nikhil-maryala nikhil-maryala commented Mar 18, 2026

Summary

  • New @uipath/flow-node-schema package — standalone Zod schemas for flow/canvas definitions with only zod as a dependency (no React, no UI libs)
  • apollo-react updated — schema files now re-export from @uipath/flow-node-schema, maintaining full backward compatibility for existing consumers
  • Dedicated release workflow.github/workflows/flow-schema-release.yml triggers on changes to packages/flow-node-schema/

Motivation

@uipath/apollo-react exports Zod schemas via @uipath/apollo-react/canvas, but importing from apollo-react drags in React and all its UI dependencies as transitive deps. This doesn't make sense for CLI tools or backend services that only need schema validation.

This PR extracts the schemas into a lightweight package that any consumer can depend on without the React baggage.

What changed

Area Change
packages/flow-node-schema/ New package with all node-definition, node-instance, and toolbar Zod schemas
packages/apollo-react/src/canvas/schema/ All files now re-export from @uipath/flow-node-schema (no breaking changes for existing imports)
packages/apollo-react/package.json Added @uipath/flow-node-schema: workspace:* dependency
.commitlintrc.cjs Added flow-node-schema to allowed scopes
.github/workflows/flow-schema-release.yml Dedicated semantic-release workflow

FormSchema handling

The original node-manifest.ts imported FormSchema from @uipath/apollo-wind (type-only). In flow-node-schema, this is replaced with a generic FormSchemaLike = Record<string, unknown> type. At runtime, z.custom<FormSchema>() and z.custom<FormSchemaLike>() are identical — the difference is purely at the type level.

In apollo-react, NodeManifest is re-exported with the form field narrowed back to the full FormSchema type, preserving backward compatibility.

Usage

// Before (pulls in React + MUI + everything)
import { nodeManifestSchema } from '@uipath/apollo-react/canvas';

// After (only zod as dependency)
import { nodeManifestSchema } from '@uipath/flow-node-schema';

Test plan

  • @uipath/flow-node-schema builds successfully
  • 5 unit tests passing (node manifest, node instance, edge, category manifest validation)
  • @uipath/apollo-react build is unaffected (pre-existing TS error in stories file, not related)
  • flow-node-schema added to commitlint allowed scopes
  • NodeManifest type in apollo-react preserves FormSchema typing
  • Verify downstream consumers can import from @uipath/flow-node-schema

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings March 18, 2026 02:22
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Mar 17, 2026, 08:26:19 PM
apollo-landing 🟢 Ready Preview, Logs Mar 17, 2026, 08:23:28 PM
apollo-ui-react 🟢 Ready Preview, Logs Mar 17, 2026, 08:25:19 PM
apollo-vertex 🟢 Ready Preview, Logs Mar 17, 2026, 08:24:54 PM
apollo-wind 🟢 Ready Preview, Logs Mar 17, 2026, 08:23:38 PM

@github-actions
Copy link

Dependency License Review

  • 1916 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 3 package(s) excluded (see details below)
License distribution
License Packages
MIT 1681
ISC 89
Apache-2.0 56
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Unlicense 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new lightweight @uipath/flow-schema package to host Zod schemas for flow/canvas definitions (with only zod as a runtime dependency), and updates @uipath/apollo-react canvas schema exports to re-export from this new package to avoid pulling React/UI dependencies when consumers only need schema validation.

Changes:

  • Added new packages/flow-schema/ package containing Zod schemas/types for node definitions, node instances, and toolbar configuration.
  • Updated packages/apollo-react/src/canvas/schema/** to re-export schemas/types from @uipath/flow-schema (to preserve existing import paths).
  • Added a dedicated GitHub Actions workflow to release @uipath/flow-schema on changes under packages/flow-schema/.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds workspace link for @uipath/flow-schema and lockfile updates.
packages/flow-schema/package.json New package manifest/scripts for building/testing/publishing the schema package.
packages/flow-schema/tsconfig.json TypeScript config for building declarations for the new package.
packages/flow-schema/rslib.config.ts Rslib build configuration for ESM/CJS outputs.
packages/flow-schema/.releaserc.json Semantic-release config for @uipath/flow-schema.
packages/flow-schema/src/index.ts Public barrel exports for the new package.
packages/flow-schema/src/toolbar.ts New toolbar schemas/types.
packages/flow-schema/src/node-instance/* New node/edge instance schemas/types.
packages/flow-schema/src/node-definition/* New node definition/manifest/constraints/handle/category schemas/types.
packages/apollo-react/package.json Adds @uipath/flow-schema as a workspace dependency.
packages/apollo-react/src/canvas/schema/index.ts Switches canvas schema exports to re-export from @uipath/flow-schema.
packages/apollo-react/src/canvas/schema/toolbar.ts Re-exports toolbar schemas/types from @uipath/flow-schema.
packages/apollo-react/src/canvas/schema/node-instance/* Re-exports node-instance schemas/types from @uipath/flow-schema.
packages/apollo-react/src/canvas/schema/node-definition/* Re-exports node-definition schemas/types from @uipath/flow-schema.
.github/workflows/flow-schema-release.yml Adds a package-scoped release workflow for @uipath/flow-schema.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from 37da184 to c96aed2 Compare March 18, 2026 03:00
Copilot AI review requested due to automatic review settings March 18, 2026 03:01
@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from c96aed2 to 7b26801 Compare March 18, 2026 03:01
@nikhil-maryala nikhil-maryala changed the title feat(repo): add @uipath/flow-schema package feat(repo): add @uipath/flow-node-schema package Mar 18, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts the canvas/flow Zod schemas into a new lightweight workspace package (@uipath/flow-node-schema) and updates @uipath/apollo-react to re-export those schemas so existing import paths keep working while enabling non-React consumers to depend on schemas without pulling UI dependencies.

Changes:

  • Added new packages/flow-node-schema/ package containing node-definition, node-instance, and toolbar schemas + basic Vitest coverage.
  • Updated packages/apollo-react/src/canvas/schema/** to re-export schemas/types from @uipath/flow-node-schema.
  • Added a dedicated GitHub Actions release workflow that triggers on packages/flow-node-schema/** changes.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds workspace link + dependency resolution updates for the new schema package.
packages/flow-node-schema/vitest.config.ts Adds Vitest configuration for the new package.
packages/flow-node-schema/tsconfig.json Adds TypeScript build configuration for the new package output.
packages/flow-node-schema/src/toolbar.ts Defines toolbar-related Zod schemas and exported types.
packages/flow-node-schema/src/node-instance/node.ts Defines node instance schema (UI, display, IO, etc.).
packages/flow-node-schema/src/node-instance/index.ts Re-exports node-instance schemas/types from the package.
packages/flow-node-schema/src/node-instance/edge.ts Defines edge instance schema and type export.
packages/flow-node-schema/src/node-instance/base.ts Defines shared instance schemas (id/version/display).
packages/flow-node-schema/src/node-definition/node-manifest.ts Defines node manifest schemas; introduces FormSchemaLike type to avoid UI deps.
packages/flow-node-schema/src/node-definition/index.ts Re-exports node-definition schemas/types from the package.
packages/flow-node-schema/src/node-definition/handle.ts Defines handle schemas (positions, types, constraints, groups).
packages/flow-node-schema/src/node-definition/constraints.ts Defines connection constraint schemas/types.
packages/flow-node-schema/src/node-definition/category-manifest.ts Defines category manifest schema/type.
packages/flow-node-schema/src/index.ts Package entry exporting node-definition, node-instance, toolbar.
packages/flow-node-schema/src/tests/schemas.test.ts Adds basic schema validation tests for the new package.
packages/flow-node-schema/rslib.config.ts Adds build configuration to emit ESM/CJS + DTS.
packages/flow-node-schema/package.json Declares new package metadata, scripts, and zod-only runtime dependency.
packages/flow-node-schema/.releaserc.json Adds package-scoped semantic-release configuration/tag format.
packages/apollo-react/src/canvas/schema/toolbar.ts Re-exports toolbar schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/node.ts Re-exports node instance schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/index.ts Consolidates node-instance exports via @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/edge.ts Re-exports edge schema/type from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/base.ts Re-exports base instance schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/node-manifest.ts Keeps a local NodeManifest type alias intended to narrow form to FormSchema.
packages/apollo-react/src/canvas/schema/node-definition/index.ts Re-exports node-definition schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/handle.ts Re-exports handle schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/constraints.ts Re-exports constraint schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/category-manifest.ts Re-exports category schema/type from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/index.ts Switches schema barrel export to export * from '@uipath/flow-node-schema'.
packages/apollo-react/package.json Adds @uipath/flow-node-schema workspace dependency.
.github/workflows/flow-schema-release.yml Adds a dedicated release workflow for the new schema package.
.commitlintrc.cjs Adds flow-node-schema as an allowed commitlint scope.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from 7b26801 to ab7a8b3 Compare March 18, 2026 03:08
Copilot AI review requested due to automatic review settings March 18, 2026 03:13
@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from ab7a8b3 to 2df94b3 Compare March 18, 2026 03:13
@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from 2df94b3 to 9c23568 Compare March 18, 2026 03:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts the flow/canvas Zod schemas into a new lightweight package (@uipath/flow-node-schema) so non-UI consumers can validate flow definitions without pulling in @uipath/apollo-react (and its React/MUI dependency tree), while keeping existing apollo-react schema exports working via re-exports.

Changes:

  • Added new packages/flow-node-schema/ package containing node-definition, node-instance, and toolbar schemas + unit tests.
  • Updated packages/apollo-react/src/canvas/schema/** to re-export schemas/types from @uipath/flow-node-schema (with an apollo-react-specific narrowed NodeManifest type).
  • Added a dedicated release workflow for @uipath/flow-node-schema and wired the new package into dependencies/commitlint.

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds the new workspace package + lockfile snapshot updates.
packages/flow-node-schema/package.json Defines the new published package metadata, scripts, and dependencies.
packages/flow-node-schema/.releaserc.json Sets up semantic-release config for the new package.
packages/flow-node-schema/rslib.config.ts Configures Rslib builds (ESM + CJS, DTS).
packages/flow-node-schema/tsconfig.json TypeScript build configuration for the new package.
packages/flow-node-schema/vitest.config.ts Vitest configuration for the new package.
packages/flow-node-schema/src/index.ts Public export surface for the schema package.
packages/flow-node-schema/src/toolbar.ts Adds toolbar-related schemas/types to the new package.
packages/flow-node-schema/src/node-definition/index.ts Barrel exports for node-definition schemas/types.
packages/flow-node-schema/src/node-definition/node-manifest.ts Node manifest schemas/types (with FormSchemaLike).
packages/flow-node-schema/src/node-definition/handle.ts Handle schema definitions (manifest + overrides).
packages/flow-node-schema/src/node-definition/constraints.ts Connection constraint schemas/types.
packages/flow-node-schema/src/node-definition/category-manifest.ts Category manifest schema/type.
packages/flow-node-schema/src/node-instance/index.ts Barrel exports for node-instance schemas/types.
packages/flow-node-schema/src/node-instance/base.ts Shared instance schemas (id/version/display).
packages/flow-node-schema/src/node-instance/node.ts Node instance schema/type.
packages/flow-node-schema/src/node-instance/edge.ts Edge instance schema/type.
packages/flow-node-schema/src/tests/schemas.test.ts Unit tests validating key schemas.
packages/apollo-react/package.json Adds @uipath/flow-node-schema dependency.
packages/apollo-react/src/canvas/schema/toolbar.ts Re-exports toolbar schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/base.ts Re-exports base instance schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/node.ts Re-exports node instance schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/edge.ts Re-exports edge instance schema/type from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-instance/index.ts Re-exports instance schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/category-manifest.ts Re-exports category manifest schema/type from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/constraints.ts Re-exports constraint schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/handle.ts Re-exports handle schemas/types from @uipath/flow-node-schema.
packages/apollo-react/src/canvas/schema/node-definition/index.ts Re-exports most node-definition types/schemas from @uipath/flow-node-schema, while preserving local NodeManifest typing.
packages/apollo-react/src/canvas/schema/node-definition/node-manifest.ts Re-exports manifest schemas, but defines apollo-react NodeManifest with form?: FormSchema.
.github/workflows/flow-node-schema-release.yml Adds a dedicated release workflow scoped to flow-node-schema changes.
.commitlintrc.cjs Adds flow-node-schema to allowed commit scopes.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

Extract Zod schemas from @uipath/apollo-react/canvas into a standalone
@uipath/flow-node-schema package with only zod as a dependency. This
allows CLI tools and non-React consumers to validate flow/canvas
definitions without pulling in React and all UI dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nikhil-maryala nikhil-maryala force-pushed the feat/flow-schema-package branch from 9c23568 to 3d6f784 Compare March 18, 2026 03:22
working-directory: packages/flow-node-schema
run: semantic-release

- name: Commit version bump
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing a separate pipeline for this? Should all work with the normal release pipeline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants