fix(spec): bundle validators to inline ajv runtime dependencies#5040
Merged
mergify[bot] merged 1 commit intomainfrom Feb 16, 2026
Merged
fix(spec): bundle validators to inline ajv runtime dependencies#5040mergify[bot] merged 1 commit intomainfrom
mergify[bot] merged 1 commit intomainfrom
Conversation
Use esbuild to bundle the generated validator code, inlining all ajv runtime dependencies. This removes ajv as a runtime dependency of the @jsii/spec package.
otaviomacedo
approved these changes
Feb 16, 2026
Contributor
|
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Contributor
|
Merging (with squash)... |
Contributor
Merge Queue StatusRule:
This pull request spent 8 seconds in the queue, with no time running CI. Required conditions to merge
|
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.
In #5039 we implemented Ajv Standalone validators and moved
ajvfrom a runtime dependency to a dev dependency in@jsii/spec. However, the generated validators still require ajv runtime utilities, causing the package to fail when used.This change fixes the issue by using esbuild to bundle the generated validator code at build time, inlining all ajv runtime dependencies directly into
lib/validators.js. The result is a fully self-contained validators file that works without ajv installed at runtime.Manually verified that the package works correctly after this change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.