Skip to content

Commit de0fed2

Browse files
committed
Add BROWSERSLIST_TRACE_WARNING env
1 parent 7e95bf3 commit de0fed2

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,12 @@ with [environment variables]:
711711
BROWSERSLIST_ROOT_PATH=. npx webpack
712712
```
713713
714+
* `BROWSERSLIST_TRACE_WARNING` to find the source of update db warning.
715+
716+
```sh
717+
BROWSERSLIST_TRACE_WARNING=1 npx webpack
718+
```
719+
714720
[environment variables]: https://en.wikipedia.org/wiki/Environment_variable
715721
716722
### `browserslist.coverage()`

‎node.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ module.exports = {
477477
var monthsPassed = getMonthsPassed(latest)
478478

479479
if (latest !== 0 && monthsPassed >= 6) {
480+
if (process.env.BROWSERSLIST_TRACE_WARNING) {
481+
console.info('Last browser release in DB: ' + String(new Date(latest)))
482+
console.trace()
483+
}
484+
480485
var months = monthsPassed + ' ' + (monthsPassed > 1 ? 'months' : 'month')
481486
console.warn(
482487
'Browserslist: browsers data (caniuse-lite) is ' +

0 commit comments

Comments
 (0)