Skip to content

v2.9.0 - Reduce frequency of data staleness warnings

Choose a tag to compare

@tonypconway tonypconway released this 03 Dec 15:47
· 209 commits to main since this release
226fd01

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() or getAllVersions() functions are called - previously they were shown whenever the module was loaded, which meant many browserslist consumers were seeing the warning despite not targeting Baseline, especially those who were consuming browserslist in a pre-compiled format via next.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 months or newly available in a browserslist query.
    • The module data must be more than 2 months old.
  • Introduces suppression options for these warning via the options objects and environment variables:
    • Adds a new suppressWarnings boolean to the getCompatibleVersions() and getAllVersions()
    • Respects the existing BROWSERSLIST_IGNORE_OLD_DATA environment variable.
    • Respects a new BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA environment variable.
  • 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.