Skip to content

🐛 replace-require data-type failure #10

@dawsbot

Description

@dawsbot

It's understood that this comes from an assumption about the data-type of an underlying literal. Assuming it's a string when it's not, there are string operations which are called on the data type. Should be fixable with an additional filter.

 ERR /var/folders/tv/fdtq5cgn6zq4bj1_lzvrhl7h0000gn/T/3848786987-<module-name>-<version>/package/test/tasks/version-assets.js Transformation error
Error: {value: [object Object], parentPath: [object Object], name: init, __childCache: null} does not match type Printable
    at Type.Tp.assert (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/ast-types/lib/types.js:60:19)
    at genericPrintNoParens (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:219:26)
    at genericPrint (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:164:9)
    at printRootGenerically (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:105:15)
    at maybeReprint (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:97:16)
    at print (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:75:29)
    at exports.printComments (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/comments.js:324:22)
    at printWithComments (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:61:16)
    at FastPath.call (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/fast-path.js:113:18)
    at genericPrintNoParens (/Users/dawsonbotsford/.config/yarn/global/node_modules/jscodeshift/node_modules/recast/lib/printer.js:867:18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions