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

Idempotent version of "last n versions" #680

Open
AprilArcus opened this issue Mar 28, 2022 · 5 comments
Open

Idempotent version of "last n versions" #680

AprilArcus opened this issue Mar 28, 2022 · 5 comments

Comments

@AprilArcus
Copy link

"Last n versions" refers to the last n versions as of a "now" which corresponds to the moment the build is initiated. However, once my team cuts a release branch, it is necessary for our set of supported browsers to be frozen at this point. It would simplify matters for us to be able to specify an absolute date which would serve as the "now" against which "last n versions" queries can be evaluated.

@ai
Copy link
Member

ai commented Mar 28, 2022

If you will not change caniuse-lite version (for instance, by locking version in npm lock file) the queries result will not be changed.

Does it works for you?

@AprilArcus
Copy link
Author

Yes, although it is irritating and potentially misleading for other devs when old versions trigger the warning emitted at https://github.com/browserslist/browserslist/blob/4.20.3/node.js#L381-L386

@ai
Copy link
Member

ai commented Apr 25, 2022

We believe that updating browsers twice per year will reduce polyfills and is good for website performance.

You can lock browsers between this updates.

Why do you need to keep browsers locked for now than 6 month?

@AprilArcus
Copy link
Author

We have LTS releases that need to receive security backports for up to a year. The set of browsers that was supported when the LTS was initially released should not change as a result of backporting a security fix, so we want to freeze caniuse-lite in place for the release's entire lifetime.

@ai
Copy link
Member

ai commented Jun 16, 2022

The set of browsers that was supported when the LTS was initially released should not change as a result of backporting a security fix

What do you think about locked browser versions in Browserslist config instead?

npx browserslist "defaults" > .browserslistrc

You will have the config like:

and_chr 102
and_ff 101
and_uc 12.12
android 101
chrome 102
chrome 101
chrome 100
edge 102
edge 101
firefox 101
firefox 100
firefox 91
ios_saf 15.5
ios_saf 15.4

It will be explicit that you are locked with exact versions.

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

No branches or pull requests

2 participants