Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time to finally allow negative lookbehind? #3890

Open
joshgoebel opened this issue Oct 15, 2023 · 4 comments
Open

Time to finally allow negative lookbehind? #3890

joshgoebel opened this issue Oct 15, 2023 · 4 comments
Labels
discuss/propose Proposal for a new feature/direction enhancement An enhancement or new feature help welcome Could use help from community parser

Comments

@joshgoebel
Copy link
Member

I just checked and the latest versions of Safari (that now support negative lookbehind) [16.4, 16.5, etc] go all the way back to Big Sur, supporting:

  • Big Sur (November 12, 2020)
  • Montery (October 25, 2021)
  • Ventura (October 24, 2022)
  • Sonoma (September 26, 2023)

Big Sur support extends all the way back to Mac's from 2013. I have some sympathy for those who hold off a while on OS releases, but little for those who would avoid installing the newest version of Safari (since often there are security fixes, etc)... so I think if we allow support for negative lookbehind we'd only be dropping support for Mac's 10+ years old or those refusing to upgrade their Safari - in which case I'd suggest they use another browser instead, such as Chrome.

So I say it's time to allow look-behind...

Thoughts, @allejo ?

@joshgoebel joshgoebel added enhancement An enhancement or new feature help welcome Could use help from community parser discuss/propose Proposal for a new feature/direction labels Oct 15, 2023
@allejo
Copy link
Member

allejo commented Oct 19, 2023

As long as the introduction of negative lookbehinds in grammars is introduced in 12.0 and not in our 11.x series, you have my support 👍

Solely on principle for semantic versioning, I'd be hesitant to introduce a breaking change in browser support in a minor release

@kuenzign
Copy link

I have quite a few personal lexers that really require the use of lookbehinds as my current workarounds do not work for all cases. Is there a timeline on when lookbehinds will be allowed?

@joshgoebel
Copy link
Member Author

joshgoebel commented Jan 11, 2024

Well if they are truly personal, just use them... it's only the core library that we aren't allowing them in v11 because of semantic versioning. I haven't had much time lately to do a major release but it's a long weekend so I'll take a look at where we stand with v12...

@allejo The old website handled us being able to publish two major versions at once - and it just did the right thing (pay attention to the new one)... does the new website share this characteristic - what if say we pushed a few 12.0.0-beta or alpha relases? (the old website would also ignore alpha/betas, etc)

@kuenzign
Copy link

Ah it looks like all I needed to do was change the ecmaVersion to 2018 in the config to allow it to work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss/propose Proposal for a new feature/direction enhancement An enhancement or new feature help welcome Could use help from community parser
Projects
None yet
Development

No branches or pull requests

3 participants