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
Describe the bug
Due to this commit, regexes are now broken.
If your configuration contains a regex, you'll get a proxified regex which seems to be ok but it will crash as soon as you try to use it with an error: TypeError: RegExp.prototype.source getter called on non-RegExp object
Expected behavior
You can put regexes in your config files (in cjs or ts format) and use it in your code
Please tell us about your environment:
node-config version: 3.3.9
node-version: 16.19.1
Other information
A workaround is to enable ALLOW_CONFIG_MUTATIONS but it's not an acceptable solution
The text was updated successfully, but these errors were encountered:
Describe the bug
Due to this commit, regexes are now broken.
If your configuration contains a regex, you'll get a proxified regex which seems to be ok but it will crash as soon as you try to use it with an error:
TypeError: RegExp.prototype.source getter called on non-RegExp object
Expected behavior
You can put regexes in your config files (in cjs or ts format) and use it in your code
Please tell us about your environment:
Other information
A workaround is to enable
ALLOW_CONFIG_MUTATIONS
but it's not an acceptable solutionThe text was updated successfully, but these errors were encountered: