Skip to content

traverse dependency breaking change #180

Open
@MartyJRE

Description

@MartyJRE

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions