-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(angular-cli): Add a postinstall warning for Node 4 deprecation.
BREAKING CHANGE: Node < 6.9 will be deprecated soon, and this will show a warning to users. Moving forward, that warning will be moved to an error with the next release.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-console */ | ||
import {stripIndent} from 'common-tags'; | ||
import {yellow} from 'chalk'; | ||
|
||
const SemVer = require('semver').SemVer; | ||
|
||
const version = new SemVer(process.version); | ||
if (version.compare('6.9.0') < 0) { | ||
console.log(yellow(stripIndent` | ||
We detected that you are using Node v${version.version}. Unfortunately, this version will not | ||
be officially supported when the Angular CLI is released. The official Node version that will | ||
be supported is 6.9 and greater. This beta release (Beta.27) will be the last release to | ||
support Node 4. | ||
This is to ensure that we can provide our users with better support for the upcoming releases. | ||
Many of our dependencies are moving to deprecating Node 4 already and that would mean that we | ||
could not update them to the latest versions which might have bug fixes and new useful features. | ||
As a forewarning, We are also moving to "@angular/cli" with the next release, which will only | ||
support Node 6.9 and greater. This package will be officially deprecated shortly after. | ||
`)); | ||
} |