-
Notifications
You must be signed in to change notification settings - Fork 524
Description
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:
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!