1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/src
Thomas Heartman 392beee114
feat: add implicit surrounding ^ and $ to patterns (#4664)
This PR updates the back-end handling of feature naming patterns to add
implicit leading `^`s and trailing `$`s to the regexes when comparing
them.

It also adds tests for the new behavior, both for new flag names and for
examples.

## Discussion points

Regarding stripping incoming ^ and $: We don't actually need to strip
incoming `^`s and `$`s: it appears that `^^^^^x$$$$$` is just as valid
as `^x$`. As such, we can leave that in. However, if we think it's
better to strip, we can do that too.

Second, I'm considering moving the flag naming validation into a
dedicated module to encapsulate everything a little better. Not sure if
this is the time or where it would live, but open to hearing
suggestions.
2023-09-13 10:50:37 +02:00
..
lib feat: add implicit surrounding ^ and $ to patterns (#4664) 2023-09-13 10:50:37 +02:00
mailtemplates
migrations 1-1319: add feature naming pattern descriptions (#4612) 2023-09-06 08:13:28 +00:00
test feat: add implicit surrounding ^ and $ to patterns (#4664) 2023-09-13 10:50:37 +02:00
migrator.ts
server-dev.ts feat: variant with number payload (#4654) 2023-09-11 16:57:42 +03:00
server.ts