Skip to content

Commit

Permalink
fix(schema): replace regex lookaround with more permissive case (#184)
Browse files Browse the repository at this point in the history
* The dependency version constraint regex used regex lookaround
expressions which are not supported in all browsers, including
Safari. This replaces the expression with a simpler but more
permissive case.

* docs: changelog
  • Loading branch information
eeberhard authored Oct 11, 2024
1 parent b77b48e commit e607dc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions schemas/applications/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Release Versions:

- [2-0-1](#2-0-1)
- [2-0-0](#2-0-0)
- [1-4-2](#1-4-2)
- [1-4-1](#1-4-1)
Expand All @@ -13,6 +14,11 @@ Release Versions:
- [1-1-0](#1-1-0)
- [1-0-0](#1-0-0)

## 2-0-1

This patch replaces the version constraint regex for the package dependencies with a simpler and more permissive case.
The previously used regex lookaround expressions were not supported in all browsers, including Safari.

## 2-0-0

### New features in 2-0-0
Expand Down
4 changes: 2 additions & 2 deletions schemas/applications/schema/application.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "/2-0-0/application.schema.json",
"$id": "/2-0-1/application.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "YAML Application Description",
"description": "An AICA application graph description using YAML syntax.",
Expand Down Expand Up @@ -77,7 +77,7 @@
">= 2.0.0, != 2.0.1, <= 2.0.2"
],
"type": "string",
"pattern": "^(((?<!^), )?((=|!=|<|<=|>|>=|~>) )?(([0-9]+\\.[0-9]+\\.[0-9]+)|((?<=~> )[0-9]+\\.[0-9]+)))+$"
"pattern": "^(\\s*(=|!=|<|<=|>|>=|~>)?\\s*([0-9]+\\.[0-9]+(\\.[0-9]+)?)\\s*,?\\s*)+$"
}
},
"required": [
Expand Down

0 comments on commit e607dc7

Please sign in to comment.