From 4554ab6aefb158f2d0a8a5ae5bb3d748e123fb00 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 5 Sep 2024 09:50:04 +0200 Subject: [PATCH] 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 --- cli/schemas/config-file.v1.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index cc2c1eb6ff..df8177af29 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -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",