-
Notifications
You must be signed in to change notification settings - Fork 58
Make v2 compatible with v1 #58
Comments
In reference to your comment and my response here ... I checked MDN if there's a way - and indeed Object.entries does return it in the correct way (converting it to an Array) as defined - and actually enables us to support the old config without to much change to the current code-base. Maybe we really want to go back to the V1 config-syntax just for the sake of keeping things simple and questions at a minimum (even tought it promotes laziness and is kind of dirty in terms of coding standards), stick to the current config with the entries property (V2), a mixture of both removing just the find and replacement properties - or really provide both options. I'd leave it up to @lukastaegert to decide before doing a PR. |
From an API perspective, I see no reason not to support both syntaxes. The plugin could decide depending on the presence of the Apparently there is some demand for the concise old syntax and of course supporting it again would mean that people do not need a migration. |
I would not want to remove the new syntax again as it has been out for some time and it would be REALLY nasty to alienate early adopters. Also, the new syntax is more expressive. |
Alright, also agreed on Object.keys. I'll see what I can do and will submit an PR later on. Update: Andarist was faster then me with PR #61 - I've did a code-review instead 😄 |
V2 seems to have removed this syntax: (PR #53)
I would suggest to revert this change and add special behaviour for the
entries
option if it's an array.The text was updated successfully, but these errors were encountered: