JSON schema fixes#852
Merged
Merged
Conversation
This already happens in the prs
Contributor
There was a problem hiding this comment.
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 optionaltoJSONSchemaparams with a wrappedoverridehandler. - Update CLI dynamic import to use
file://URLs; adddebounceMSsupport 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 |
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.
No description provided.