Skip to content

fix(toPath): handle idiomatic JS paths with arbitrary string properties#381

Merged
erikras merged 1 commit intofinal-form:masterfrom
jedwards1211:fix-topath
Jul 6, 2021
Merged

fix(toPath): handle idiomatic JS paths with arbitrary string properties#381
erikras merged 1 commit intofinal-form:masterfrom
jedwards1211:fix-topath

Conversation

@jedwards1211
Copy link
Contributor

@jedwards1211 jedwards1211 commented Sep 22, 2020

fix #380

Since doing this right is non-trivial, I copied over the code from lodash' stringToPath and appended lodash' license to the LICENSE.

Although we could use the lodash.topath, those modular build packages are discouraged and will be removed in v5.

The better alternative, really, is just to depend on lodash and import toPath from it. People are averse to transitive deps but only the code toPath depends on would get bundled, and that code could be shared with any other packages/userland code that rely on toPath, so it can result in smaller overall bundle sizes than duplicating the code or using the lodash.topath modular build package.

@huan086
Copy link
Contributor

huan086 commented Nov 13, 2020

When this is merged, make sure to update final-form-array because it does not handle idiomatic JS paths

@jedwards1211
Copy link
Contributor Author

@erikras do you want me to make changes? What can I do to help get this merged?

@erikras erikras merged commit a3575ef into final-form:master Jul 6, 2021
@erikras
Copy link
Member

erikras commented Sep 29, 2021

Published in v4.20.3.

@jedwards1211
Copy link
Contributor Author

Thanks!

@antonvialibri1
Copy link
Contributor

antonvialibri1 commented Sep 9, 2022

This PR introduced an unwanted breaking change #456, which is fixed by #461 .

@erikras Could you review #461, please?

Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toPath doesn't support quoted strings inside brackets (redux-form did...)

4 participants