Commit 4f54443
committed
fix: warnings for Node.js version should be shown once
Currently when you are using a deprecated Node.js version, CLI prints warnings twice.
The problem is that there are two places in the code where we check Node.js version:
- In `tns` executable file - the code in it is pure ES5 and the idea is to stop users which have very old Node.js versions, whcih do not support ES6 syntax (CLI is transpiled to ES6 syntax).
- In `nativescript-cli` file - we call `initializeService.initialize`, which also checks Node.js version and prints the warnings
However, we do not need the warnings in both places. Separate the logic, so in `tns` file we'll just check if we should stop the users, i.e. it will take care only of versions which are not supported.
In `nativescript-cli` we'll continue calling initialize, which will take care of the warnings (in case there are such). This way the warning for not supported version will be printed only once.1 parent 6d274fe commit 4f54443
1 file changed
+0
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 49 | | |
55 | 50 | | |
56 | 51 | | |
| |||
0 commit comments