Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traverse dependency breaking change #180

Open
MartyJRE opened this issue Mar 6, 2024 · 0 comments
Open

traverse dependency breaking change #180

MartyJRE opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@MartyJRE
Copy link

MartyJRE commented Mar 6, 2024

Steps to reproduce

Include a complex object containing symbols in the template, such as forever-agent.

Current Behavior

The traverse library introduced iteration over symbols in version 0.6.8. Previously, they only iterated over strings.
This now breaks during parsing when the template contains a symbol on the line

while (match = templates.exec(item)) {
. Calling RegExp.exec() on a symbol throws an error.

Expected Behavior

It's not clear to me what the expected behavior should be, but I think the type of the item should be checked, as the traverse library previously only provided strings.

Link to reproduction sandbox

https://github.com/MartyJRE/loopback-sandbox-traverse

Additional information

linux x64 16.13.1

[email protected] /home/martin/Documents/Code/loopback-sandbox-traverse
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]

Related Issues

I filed an issue with the traverse library as well, but I'm unsure whether they'll consider this a problem as for them it isn't neceserally a breaking change.

ljharb/js-traverse#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant