SchemaStore / SchemaStore/schemastore
Path matching too loose
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 2.3k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 124
Description
In cases like this one:
https://github.com/SchemaStore/schemastore/blob/f3183484dbc0ed4504651fd6efc1a6035842823b/src/api/json/catalog.json#L434-L439
The path pattern will match package.json but will also match something-else-package.json.
This is an issue for many other definitions also.
Is that on purpose?
I think it could be fixed by prefixing such paths (that should match fully) with a forward slash, so /package.json but I'm not sure if that would work on Windows also.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced entries in src/api/json/catalog.json at lines 434-439 and inspect how their path patterns are interpreted. Confirm whether package.json also matches something-else-package.json, including on Windows, and consider the proposed leading-slash behavior. Done means exact package paths match without the unintended prefixed-name matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100