Skip to content

Commit

Permalink
fix(@angular/cli): disable Browserslist old data warning
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alan-agius4 authored and mgechev committed Jan 8, 2020
1 parent 6d274ed commit a71e92f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/angular/cli/lib/init.ts
Original file line number Diff line number Diff line change
@@ -76,6 +76,14 @@ if (process.env['NG_CLI_PROFILING']) {
}

(async () => {
/**
* Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
* which is cumbersome considering we pin versions and the warning is not user actionable.
* `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
*/
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';

const disableVersionCheckEnv = process.env['NG_DISABLE_VERSION_CHECK'];
/**
* Disable CLI version mismatch checks and forces usage of the invoked CLI

0 comments on commit a71e92f

Please sign in to comment.