feat(repo): add @uipath/flow-node-schema package#362
feat(repo): add @uipath/flow-node-schema package#362nikhil-maryala wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
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-schemaon changes underpackages/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.
packages/apollo-react/src/canvas/schema/node-definition/node-manifest.ts
Outdated
Show resolved
Hide resolved
37da184 to
c96aed2
Compare
c96aed2 to
7b26801
Compare
There was a problem hiding this comment.
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.
packages/apollo-react/src/canvas/schema/node-definition/index.ts
Outdated
Show resolved
Hide resolved
7b26801 to
ab7a8b3
Compare
ab7a8b3 to
2df94b3
Compare
2df94b3 to
9c23568
Compare
There was a problem hiding this comment.
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 narrowedNodeManifesttype). - Added a dedicated release workflow for
@uipath/flow-node-schemaand 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.
packages/apollo-react/src/canvas/schema/node-definition/node-manifest.ts
Outdated
Show resolved
Hide resolved
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>
9c23568 to
3d6f784
Compare
| working-directory: packages/flow-node-schema | ||
| run: semantic-release | ||
|
|
||
| - name: Commit version bump |
There was a problem hiding this comment.
why are we doing a separate pipeline for this? Should all work with the normal release pipeline
Summary
@uipath/flow-node-schemapackage — standalone Zod schemas for flow/canvas definitions with onlyzodas a dependency (no React, no UI libs)apollo-reactupdated — schema files now re-export from@uipath/flow-node-schema, maintaining full backward compatibility for existing consumers.github/workflows/flow-schema-release.ymltriggers on changes topackages/flow-node-schema/Motivation
@uipath/apollo-reactexports 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
packages/flow-node-schema/packages/apollo-react/src/canvas/schema/@uipath/flow-node-schema(no breaking changes for existing imports)packages/apollo-react/package.json@uipath/flow-node-schema: workspace:*dependency.commitlintrc.cjsflow-node-schemato allowed scopes.github/workflows/flow-schema-release.ymlFormSchemahandlingThe original
node-manifest.tsimportedFormSchemafrom@uipath/apollo-wind(type-only). Inflow-node-schema, this is replaced with a genericFormSchemaLike = Record<string, unknown>type. At runtime,z.custom<FormSchema>()andz.custom<FormSchemaLike>()are identical — the difference is purely at the type level.In
apollo-react,NodeManifestis re-exported with theformfield narrowed back to the fullFormSchematype, preserving backward compatibility.Usage
Test plan
@uipath/flow-node-schemabuilds successfully@uipath/apollo-reactbuild is unaffected (pre-existing TS error in stories file, not related)flow-node-schemaadded to commitlint allowed scopesNodeManifesttype in apollo-react preservesFormSchematyping@uipath/flow-node-schema🤖 Generated with Claude Code