Skip to content

Commit 67da7fe

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular/cli): disable Browserslist old data warning
Set the `BROWSERSLIST_IGNORE_OLD_DATA` enviorment variable to disable Browserslist old data warning `Browserslist: caniuse-lite is outdated. Please run next command `npm update` See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
1 parent 98f0f7f commit 67da7fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/angular/cli/lib/init.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ function _fromPackageJson(cwd = process.cwd()): SemVer | null {
3939
return null;
4040
}
4141

42+
/**
43+
* Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
44+
* which is cumbersome considering we pin versions and the warning is not user actionable.
45+
* `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
46+
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
47+
*/
48+
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
49+
4250
// Check if we need to profile this CLI run.
4351
if (process.env['NG_CLI_PROFILING']) {
4452
let profiler: {

0 commit comments

Comments
 (0)