1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(config): validate export names (#25436)

The property names of the `exports` field in `deno.json` was never
validated. The `patternProperties` only validates values, whose property
name matches the regex. It doesn't validate the property names
themselves. That's what `propertyNames` is for.

Related https://github.com/denoland/deno/issues/25435
This commit is contained in:
Marvin Hagemeister 2024-09-05 09:50:04 +02:00 committed by GitHub
parent 49e3ee010c
commit 4554ab6aef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -622,6 +622,11 @@
{
"type": "object",
"description": "A map of package exports to files in this JSR package.",
"propertyNames": {
"description": "Package export name",
"examples": [".", "./foo", "./bar"],
"pattern": "^\\.(/.*)?$"
},
"patternProperties": {
"^\\.(/.*)?$": {
"type": "string",