v2.9.0 - Reduce frequency of data staleness warnings
This version introduces a number of changes to data staleness warnings in response to #105 , #107 and #109
- Data staleness warnings are now only shown if the
getCompatibleVersions()orgetAllVersions()functions are called - previously they were shown whenever the module was loaded, which meant manybrowserslistconsumers were seeing the warning despite not targeting Baseline, especially those who were consumingbrowserslistin a pre-compiled format vianext.js. - Adds new conditions for these warnings to be displayed which should only warn users for whom data freshness is critical:
- The feature cut off data must be within the last two months, i.e.
widelyAvailableOnDate: today + >2 years and 4 monthsornewly availablein abrowserslistquery. - The module data must be more than 2 months old.
- The feature cut off data must be within the last two months, i.e.
- Introduces suppression options for these warning via the
optionsobjects and environment variables:- Adds a new
suppressWarningsboolean to thegetCompatibleVersions()andgetAllVersions() - Respects the existing
BROWSERSLIST_IGNORE_OLD_DATAenvironment variable. - Respects a new
BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATAenvironment variable.
- Adds a new
- Adds explanatory text to the README for how to avoid such warnings when reproducible builds are a requirement.
- Change warning text to be package manager agnostic and mention the possibility of pre-compiled data.