Skip to content

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

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

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

Conversation

@jedwards1211

@jedwards1211 jedwards1211 commented Sep 22, 2020

Copy link
Copy Markdown
Contributor

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

huan086 commented Nov 13, 2020

Copy link
Copy Markdown
Contributor

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

@jedwards1211

Copy link
Copy Markdown
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

erikras commented Sep 29, 2021

Copy link
Copy Markdown
Member

Published in v4.20.3.

@jedwards1211

Copy link
Copy Markdown
Contributor Author

Thanks!

@antonvialibri1

antonvialibri1 commented Sep 9, 2022

Copy link
Copy Markdown
Contributor

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