Skip to content

SyntaxError: Invalid regular expression in Safari #142

@robin-hartmann

Description

@robin-hartmann

Since version 4.0.5 or, to be more precise, since commit 6adcb7d, both formdata-to-blob.js and esm.min.js fail to load in Safari with the error SyntaxError: Invalid regular expression: invalid group specifier name. This is due to the fact that commit 6adcb7d introduced regular expressions for eol normalization, which use lookbehind (?<!).

Sadly, Safari still doesn't support lookbehind in regular expressions. And even worse, this error doesn't happen when the offending code is being executed, but instead, it already happens when the source file containing it is being parsed, which in turn prevents execution of any code in the same source file. I.e., the error happens, even if the offending code is not even being used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions