Skip to content

Commit f4e7f7a

Browse files
fix: tolerate Browserslist data-age warning in build script
scripts/build.js treats any babel stderr output (other than Node/babel deprecation warnings) as a build failure. When caniuse-lite ages past ~6 months, Browserslist prints a "browsers data is N months old" notice to stderr, which fails `yarn build:stable` in CI for reasons unrelated to the actual change. Add `Browserslist` to the ignore pattern so this informational notice is not treated as a failure. The companion caniuse-lite refresh fixes the current instance; this prevents the build from breaking again as the data ages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e162de7 commit f4e7f7a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/build.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ async function run(argv) {
7777

7878
try {
7979
const { stderr, stdout } = await exec(command, { env: { ...process.env, ...env } });
80-
// Don't treat Node/babel deprecation warnings on stderr as failure
81-
if (stderr && !/DeprecationWarning|url\.parse/.test(stderr)) {
80+
// Don't treat Node/babel deprecation warnings or Browserslist data-age
81+
// notices (e.g. "caniuse-lite is N months old") on stderr as failure
82+
if (stderr && !/DeprecationWarning|url\.parse|Browserslist/.test(stderr)) {
8283
throw new Error(`'${command}' failed with \n${stderr}`);
8384
}
8485
if (verbose) {

0 commit comments

Comments
 (0)