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:
parent
49e3ee010c
commit
4554ab6aef
1 changed files with 5 additions and 0 deletions
|
@ -622,6 +622,11 @@
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "A map of package exports to files in this JSR package.",
|
"description": "A map of package exports to files in this JSR package.",
|
||||||
|
"propertyNames": {
|
||||||
|
"description": "Package export name",
|
||||||
|
"examples": [".", "./foo", "./bar"],
|
||||||
|
"pattern": "^\\.(/.*)?$"
|
||||||
|
},
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^\\.(/.*)?$": {
|
"^\\.(/.*)?$": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
Loading…
Reference in a new issue