angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.77k stars 11.97k forks source link

Android versions missing from `.browserslistrc` #26834

Closed johnnygerard closed 2 weeks ago

johnnygerard commented 9 months ago

Command

generate

Is this a regression?

The previous version in which this bug was not present was

No response

Description

Running ng g config browserslist produces the current .browserslistrc:

last 2 Chrome versions
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR

It looks like last 2 ChromeAndroid versions is missing.

Here are relevant links from angular.io:

Minimal Reproduction

$ ng g config browserslist
$ cat .browserslistrc

Exception or Error

N/A

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 17.0.7
Node: 20.10.0
Package Manager: npm 10.2.5
OS: linux x64

Angular: <error>
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.7 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            17.0.7 (cli-only)
@angular-devkit/schematics      17.0.7 (cli-only)
@angular/cli                    17.0.7 (cli-only)
@schematics/angular             17.0.7 (cli-only)
rxjs                            7.8.1 (cli-only)
typescript                      <error>
zone.js                         <error>

Anything else relevant?

No response

alan-agius4 commented 9 months ago

last 2 Chrome versions should also cover support for Andriod as these versions are typically the same and have the same set of features. Esbuild does not different between Chrome and Chrome for Andriod.

See: https://esbuild.github.io/api/#target

johnnygerard commented 9 months ago

Your link does not mention Browserslist versions.

last 2 Chrome versions targets Chrome desktop versions only. This can be verified on Browserslist.

Current versions:

Current versions

With ChromeAndroid:

Updated versions

alan-agius4 commented 9 months ago

The browserslist results are transformed to esbuild targets which does differentiate between Chrome for Android and Desktop.

We could add last 2 ChromeAndroid versions to the browserslist, but this is redundant as functionality wise, adding last 2 ChromeAndroid versions to your browserslist will not do anything to the output.

johnnygerard commented 9 months ago

@alan-agius4 Thank you for clarifying.

alan-agius4 commented 9 months ago

On second thoughts, let’s add it to avoid future confusion 😀.

MrJithil commented 3 weeks ago

Thought to kick start my contributions in this repo from the good first issue. Thanks @johnnygerard and @alan-agius4 for the opportunity.