Skip to content

Version 8 is not compatible with Safari 16.3 and below #615

@gzurbach

Description

@gzurbach

Howdy!

We've recently upgraded JSDiff from version 7.0.0 to 8.0.1 in our project.

Shortly after, we began receiving reports from customers that our web app was broken. After some investigation, we found that the issue affects users on legacy browsers, specifically Safari 14, 15, and 16.

The root cause appears to be this regular expression: https://github.com/kpdecker/jsdiff/blob/27e6c81b2fbbe057cb6d296be0995c4140a2a815/src/diff/sentence.ts#L6C1-L6C45

Testing the regex shows a warning:

Image

Which is confirmed by caniuse which shows that lookbehind assertions are not supported in those versions of Safari.

We recommend either updating the release notes to clearly indicate that legacy browser support has been dropped, or modifying the regex to maintain compatibility.

Thanks again for maintaining such a great library!

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