Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Dec 18, 2025

Fixes: #583
See: #432
Signed-off-by: Juan Cruz Viotti [email protected]

@augmentcode
Copy link

augmentcode bot commented Dec 18, 2025

🤖 Augment PR Summary

Summary: This PR fixes CLI handling for schema/instance files that have no filename extension (Issue #583).

Changes:

  • Extend extension parsing to accept an empty extension ("match files with no extension") and emit a warning when enabled.
  • Update directory scanning to treat an empty configured extension as !path.has_extension().
  • Switch JSON input loading to read_yaml_or_json so files can be parsed based on extension or (for unknown/empty extensions) via JSON-first then YAML fallback.
  • Update vendored core dependency, including adding content-based YAML/JSON fallback parsing and a missing Decimal hash case.
  • Add extensive CLI tests across fmt, lint, validate, metaschema, test, bundle, inspect, and compile to cover no-extension and empty-extension scenarios.

Technical Notes: When extension is not recognized (or absent), parsing now tries JSON first and falls back to YAML on JSON parse errors, enabling “extensionless” workflows.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Comment augment review to trigger a new review at any time.

@jviotti jviotti force-pushed the schemas-without-extensions branch 2 times, most recently from 9944f87 to d36f349 Compare December 18, 2025 16:10
@jviotti jviotti force-pushed the schemas-without-extensions branch from d36f349 to fa4a72c Compare December 18, 2025 16:14
@jviotti jviotti merged commit f8839da into main Dec 18, 2025
11 of 12 checks passed
@jviotti jviotti deleted the schemas-without-extensions branch December 18, 2025 16:33
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 19, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | patch | `v13.2.0` -> `v13.2.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sourcemeta/jsonschema (sourcemeta/jsonschema)</summary>

### [`v13.2.1`](https://github.com/sourcemeta/jsonschema/releases/tag/v13.2.1)

[Compare Source](sourcemeta/jsonschema@v13.2.0...v13.2.1)

#### What's Changed

- Gracefully handle input files without extensions by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;584](sourcemeta/jsonschema#584)

**Full Changelog**: <sourcemeta/jsonschema@v13.2.0...v13.2.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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.

jsonschema always detects as JSON when file has no extension

2 participants