fix(hcl): remove zod dependency and use jsonobject#88
Merged
Conversation
bbckr
commented
Jun 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the zod dependency from scaffolder-backend-module-hcl by switching the Scaffolder action schemas to plain JSON Schema objects, avoiding runtime failures when a consuming Backstage app resolves Zod v4 (per issue #87).
Changes:
- Replaced Zod-based action schemas with JSON Schema objects and removed in-handler Zod parsing.
- Added lightweight schema validation tests using
jsonschema.validate. - Dropped
zodfrom the plugin package dependencies (and corresponding lock entry).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| yarn.lock | Removes the unused zod@^3.23.8 lock entry after dependency removal. |
| plugins/scaffolder-backend-module-hcl/src/actions/hcl/hcl.ts | Replaces Zod schemas with JSON Schema and normalizes options via defaultOptions. |
| plugins/scaffolder-backend-module-hcl/src/actions/hcl/hcl.test.ts | Adds JSON Schema validation tests for the action input schema. |
| plugins/scaffolder-backend-module-hcl/package.json | Removes zod dependency from the plugin package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
colinodell
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to issue #87.
Rather than fixing zod version incompatibility, we should just remove the zod dependency entirely because we were actually validating the schema twice - once with zod and once with Backstage's built in schema validation. So instead we will just use a plain json schema object.