Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit d5fcb3b

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 9b58af2 + 803d7c5 commit d5fcb3b

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

publish/scripts/installer.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ var prompt = require('prompt-lite');
44

55
const { execSync } = require('child_process');
66
const semver = require('semver');
7-
const tnsVersionFull = execSync('tns --version', { encoding: 'ascii'});
7+
// In case the current Node.js version is not supported by CLI, a warning in `tns --version` output is shown.
8+
// Sample output:
9+
//
10+
/*Support for Node.js ^8.0.0 is deprecated and will be removed in one of the next releases of NativeScript. Please, upgrade to the latest Node.js LTS version.
11+
12+
6.0.0
13+
*/
14+
// Extract the actual version (6.0.0) from it.
15+
const tnsVersionFull = (execSync('tns --version', { encoding: 'ascii'}).match(/^(?:\d+\.){2}\d+.*?$/m) || [])[0];
816

917
// iOS modern build system is supported from version NativeScript-CLI version 5.2.0
1018
const supportsIOSModernBuildSystem = tnsVersionFull.indexOf("5.2.0-") > -1 || semver.gte(tnsVersionFull, "5.2.0");

src/firebase.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export interface IdTokenResult {
233233

234234
export interface Provider {
235235
id: string;
236+
token?: string;
236237
}
237238

238239
export interface FirebasePasswordLoginOptions {

src/scripts/postinstall.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,7 @@ function coerce(version) {
22512251
if (match == null)
22522252
return null;
22532253

2254-
return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
2254+
return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
22552255
}
22562256

22572257

@@ -4176,7 +4176,15 @@ var prompt = __webpack_require__(/*! prompt-lite */ 1);
41764176

41774177
const { execSync } = __webpack_require__(/*! child_process */ 3);
41784178
const semver = __webpack_require__(/*! semver */ 2);
4179-
const tnsVersionFull = execSync('tns --version', { encoding: 'ascii'});
4179+
// In case the current Node.js version is not supported by CLI, a warning in `tns --version` output is shown.
4180+
// Sample output:
4181+
//
4182+
/*Support for Node.js ^8.0.0 is deprecated and will be removed in one of the next releases of NativeScript. Please, upgrade to the latest Node.js LTS version.
4183+
4184+
6.0.0
4185+
*/
4186+
// Extract the actual version (6.0.0) from it.
4187+
const tnsVersionFull = (execSync('tns --version', { encoding: 'ascii'}).match(/^(?:\d+\.){2}\d+.*?$/m) || [])[0];
41804188

41814189
// iOS modern build system is supported from version NativeScript-CLI version 5.2.0
41824190
const supportsIOSModernBuildSystem = tnsVersionFull.indexOf("5.2.0-") > -1 || semver.gte(tnsVersionFull, "5.2.0");

0 commit comments

Comments
 (0)