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
I'm using i18next-parser and I would like to remove unused keys, but exclude some patterns.
To Reproduce
With boolean value, it works. But when I try to use regex pattern, it fails. keepRemoved: ["\binterval\w*\b"],
It throws error [error] TypeError: pattern.test is not a function
From docs keepRemoved: false, // Keep keys from the catalog that are no longer in code // You may either specify a boolean to keep or discard all removed keys. // You may also specify an array of patterns: the keys from the catalog that are no long in the code but match one of the patterns will be kept. // The patterns are applied to the full key including the namespace, the parent keys and the separators.
Your Environment
runtime version: i.e. node v16.15.1
i18next version: i.e. 20.3.2
os: Linux
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
I'm using i18next-parser and I would like to remove unused keys, but exclude some patterns.
To Reproduce
With boolean value, it works. But when I try to use regex pattern, it fails.
keepRemoved: ["\binterval\w*\b"],
It throws error
[error] TypeError: pattern.test is not a function
From docs
keepRemoved: false, // Keep keys from the catalog that are no longer in code // You may either specify a boolean to keep or discard all removed keys. // You may also specify an array of patterns: the keys from the catalog that are no long in the code but match one of the patterns will be kept. // The patterns are applied to the full key including the namespace, the parent keys and the separators.
Your Environment
The text was updated successfully, but these errors were encountered: