You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove outdated constraint validation from depends field pattern in library.properties schema
A regular expression is employed in the library.properties JSON schemas to validate the format of the contents of the
depends field. Previously, this regular expression was configured to validate the syntax of the optional version
constraint.
The constraint system has recently been made much more capable through the addition of support for more syntax. The
regular expression did not have support for that syntax, which caused valid data to fail validation.
Expanding the already complex and lengthy regular expression to comprehensively validate the full range of constraint
forms possible
with the new syntax would not be feasible or maintainable.
The new approach is to validate it directly via Go code using the same `go.bug.st/relaxed-semver` module used by
Arduino CLI and `arduino/libraries-repository-engine` to handle the version constraints in this field. The schema will
continue to provide a general validation on the `depends` field format.
Copy file name to clipboardExpand all lines: etc/schemas/arduino-library-properties-definitions-schema.json
+2-2
Original file line number
Diff line number
Diff line change
@@ -493,8 +493,8 @@
493
493
"type": "string"
494
494
},
495
495
{
496
-
"$comment": "Based on #/definitions/propertiesObjects/name/base/definitions/patternObjects/allowedCharacters and general-definitions-schema.json#/definitions/patternObjects/relaxedSemver",
Copy file name to clipboardExpand all lines: internal/rule/schema/schemadata/bindata.go
+2-2
Original file line number
Diff line number
Diff line change
@@ -1911,8 +1911,8 @@ var _arduinoLibraryPropertiesDefinitionsSchemaJson = []byte(`{
1911
1911
"type": "string"
1912
1912
},
1913
1913
{
1914
-
"$comment": "Based on #/definitions/propertiesObjects/name/base/definitions/patternObjects/allowedCharacters and general-definitions-schema.json#/definitions/patternObjects/relaxedSemver",
0 commit comments