Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Oct 2, 2025

Bump the minimum Firefox version to 79. Emscripten unconditionally now depends on some ES6 syntax availability, so Emscripten output no longer runs in older Firefoxes.

I did go through the exercise of fixing Emscripten to be able to support Firefox 68ESR, which looks like this: main...juj:emscripten:firefox_68esr_support

I can alternatively post that as a PR, and work to fix Firefox support down to 65. But I get an impression that bumping the version might be preferred.

…w depends on some ES6 syntax availability, so Emscripten output no longer runs in older Firefoxes.
@juj juj changed the title Bump the minimum Firefox version to 78. Bump the minimum Firefox version to 79. Oct 2, 2025
@juj juj force-pushed the bump_minimum_firefox_version branch from 2b07a62 to c269686 Compare October 2, 2025 15:04
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping the ff version seems like a good idea (assuming there are not many folks out there using versions older than 79?)

However, I'm a little confused about the ES6 thing? We have support for transpiling ES6 features away, right? If we bump this version do we no longer need the trasnpilation stuff? Can we just remove it? Was it broken for some reason?

@sbc100
Copy link
Collaborator

sbc100 commented Oct 2, 2025

Do we not have other targets that don't have ES6 support? What about our min node version: 12.22.9?

@juj
Copy link
Collaborator Author

juj commented Oct 2, 2025

We have support for transpiling ES6 features away, right? If we bump this version do we no longer need the trasnpilation stuff? Can we just remove it? Was it broken for some reason?

We have, but it is unfortunately spotty with its coverage. E.g. file packager and .html shells do not get it.

My expectation is that ES6 will not be the only time in the timeline of the web where new language features will be introduced. So having Babel around might be useful as a tool to opt-in to new features in the future?

Though when such a future happens, we will have to be more careful about extending Babel coverage to file packager and other parts as well.

@sbc100
Copy link
Collaborator

sbc100 commented Oct 2, 2025

It seems like if we really want to move to ES6 we would need to bump a lot more versions:

  if settings.POLYFILL:                                                                                   
    # Emscripten requires certain ES6+ constructs by default in library code                              
    # - (various ES6 operators available in all browsers listed below)                                    
    # - https://caniuse.com/mdn-javascript_operators_nullish_coalescing:                                  
    #                                          FF:72 CHROME:80 SAFARI:13.1 NODE:14                        
    # - https://caniuse.com/mdn-javascript_operators_optional_chaining:                                   
    #                                          FF:74 CHROME:80 SAFARI:13.1 NODE:14                        
    # - https://caniuse.com/mdn-javascript_operators_logical_or_assignment:                               
    #                                          FF:79 CHROME:85 SAFARI:14 NODE:16                          
    # Taking the highest requirements gives is our minimum:                                               
    #                             Max Version: FF:79 CHROME:85 SAFARI:14 NODE:16                          
    # TODO: replace this with feature matrix in the future.                                               
    settings.TRANSPILE = (settings.MIN_FIREFOX_VERSION < 79 or                                            
                          settings.MIN_CHROME_VERSION < 85 or                                             
                          settings.MIN_SAFARI_VERSION < 140000 or                                         
                          settings.MIN_NODE_VERSION < 160000)     

Basically every single one of those would need updating.

Given that, I don't think bumping the FF version alone here makes sense and I think removing ES6 constructs from the non-babel places is probably the best short term solution (along with better test coverage).

I think test-node-compat in .circleci/config.yml is the best way to ensure we have coverage here. There is a list of tests there that we run under the oldest supported node version.

@juj
Copy link
Collaborator Author

juj commented Oct 2, 2025

Given that, I don't think bumping the FF version alone here makes sense and I think removing ES6 constructs from the non-babel places is probably the best short term solution (along with better test coverage).

Ok, I will remove the non-Babel constructs from the code and update with Firefox 65 coverage.

@juj
Copy link
Collaborator Author

juj commented Oct 2, 2025

Do we not have other targets that don't have ES6 support? What about our min node version: 12.22.9?

I don't know, I have had cycles to investigate Firefox only so far. Google suggests "Node.js 12 doesn't understand ES6 syntax like optional chaining, export & import."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants