Skip to content

fix(spec): bundle validators to inline ajv runtime dependencies#5040

Merged
mergify[bot] merged 1 commit intomainfrom
mrgrain/refactor/spec/bundle-validators
Feb 16, 2026
Merged

fix(spec): bundle validators to inline ajv runtime dependencies#5040
mergify[bot] merged 1 commit intomainfrom
mrgrain/refactor/spec/bundle-validators

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Feb 16, 2026

In #5039 we implemented Ajv Standalone validators and moved ajv from 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.

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.
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 16, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 16, 2026

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Feb 16, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 16, 2026

Merging (with squash)...

@mergify mergify bot added the queued label Feb 16, 2026
@mergify mergify bot merged commit f423bb6 into main Feb 16, 2026
42 checks passed
@mergify mergify bot deleted the mrgrain/refactor/spec/bundle-validators branch February 16, 2026 17:02
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 16, 2026

Merge Queue Status

Rule: default-squash


  • Entered queue2026-02-16 17:02 UTC
  • Checks passed · in-place
  • Merged2026-02-16 17:02 UTC · at 7e189b8a0ec70a6407b84b7aaabf3fa6a298fdeb

This pull request spent 8 seconds in the queue, with no time running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • status-success=Integration test (jsii-pacmak)
  • status-success=Unit Tests
  • any of [🛡 GitHub branch protection]:
    • check-success = Integration test (jsii-pacmak)
    • check-neutral = Integration test (jsii-pacmak)
    • check-skipped = Integration test (jsii-pacmak)
  • any of [🛡 GitHub branch protection]:
    • check-success = Build
    • check-neutral = Build
    • check-skipped = Build
  • any of [🛡 GitHub branch protection]:
    • check-success = Unit Tests
    • check-neutral = Unit Tests
    • check-skipped = Unit Tests

@mergify mergify bot removed pr/ready-to-merge This PR is ready to be merged. queued labels Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants