Skip to content

JSON schema fixes#852

Merged
johngeorgewright merged 5 commits into
masterfrom
dynamic-schema
Mar 13, 2026
Merged

JSON schema fixes#852
johngeorgewright merged 5 commits into
masterfrom
dynamic-schema

Conversation

@johngeorgewright

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 13, 2026 14:45
This already happens in the prs
@johngeorgewright johngeorgewright merged commit 5b0cf03 into master Mar 13, 2026
5 checks passed
@johngeorgewright johngeorgewright deleted the dynamic-schema branch March 13, 2026 14:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the JSON schema generation behavior and fixtures, including new rule/variable schema shapes, improved CLI module loading, and configuration/publishing adjustments.

Changes:

  • Extend fixture data/rules to cover variable templates and strict object payloads, updating schema snapshots accordingly.
  • Refactor dataJSONSchema(s) to accept optional toJSONSchema params with a wrapped override handler.
  • Update CLI dynamic import to use file:// URLs; add debounceMS support to filesystem watcher options; adjust publishing/release configuration.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/json-schema/test/fixtures/data.ts Expands fixture payload/rules to exercise stricter object payloads and variable-driven templates.
packages/json-schema/test/snapshots/index.test.ts.snap Updates expected JSON schema output for new fixture shapes and override behavior.
packages/json-schema/src/index.ts Adds configurable toJSONSchema params and refactors override handling (incl. switch unwrapping).
packages/json-schema/src/cli.ts Uses pathToFileURL() for robust dynamic imports across platforms/runtimes.
packages/json-schema/package.json Removes package metadata/bin entry from this package.
packages/json-schema/deno.json Adds es-toolkit import mapping; stops publishing package.json.
packages/fs/src/watch.ts Adds debounceMS option and avoids passing non-fs options to fs.watch.
.github/workflows/release.yml Removes test workflow dependency from the release workflow.
Comments suppressed due to low confidence (1)

packages/json-schema/deno.json:1

  • The PR title indicates “JSON schema fixes”, but this change (combined with deleting packages/json-schema/package.json) alters publishing/package composition. If this is intentional, the PR title/description should be updated to reflect the packaging/release impact; otherwise, consider splitting these changes into a separate PR to keep scope aligned.
{

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

Comment on lines +81 to +85
export type ToJSONSchemaParams = _ToJSONSchemaParams & {
override?: (
...args: Parameters<Required<_ToJSONSchemaParams>['override']>
) => void | boolean
}
@@ -1,3 +1,4 @@
import { omit } from '@es-toolkit/es-toolkit'
}
},
},
...(params && omit(params, ['override'])),
Comment on lines 7 to 10
jobs:
release-test:
if: github.actor != 'renovate[bot]'
uses: ./.github/workflows/test.yml

release-github:
name: Github Release
needs: [release-test]
runs-on: ubuntu-latest
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.

2 participants