Skip to content

Commit e92f854

Browse files
Update TypeScript to 2.0
Update all TypeScript related dependencies in order to be able to use TypeScript 2.0
1 parent 2c85c90 commit e92f854

7 files changed

+23
-24
lines changed

lib/declarations.ts

-1
Original file line numberDiff line numberDiff line change
@@ -369,4 +369,3 @@ interface IXcprojInfo {
369369
*/
370370
xcprojAvailable: boolean;
371371
}
372-

lib/node-package-manager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class NodePackageManager implements INodePackageManager {
120120
let oldNpmPath: string = undefined;
121121
let callback = (err: Error, data: any) => {
122122
if (oldNpmPath) {
123-
npm.prefix = oldNpmPath;
123+
(<any>npm).prefix = oldNpmPath;
124124
}
125125

126126
if (err) {
@@ -133,7 +133,7 @@ export class NodePackageManager implements INodePackageManager {
133133

134134
if (opts && opts.path) {
135135
oldNpmPath = npm.prefix;
136-
npm.prefix = opts.path;
136+
(<any>npm).prefix = opts.path;
137137
}
138138

139139
let subCommandName: string = opts.subCommandName;

lib/services/analytics-service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ export class AnalyticsService extends AnalyticsServiceBase implements IAnalytics
1010
$prompter: IPrompter,
1111
$userSettingsService: UserSettings.IUserSettingsService,
1212
$analyticsSettingsService: IAnalyticsSettingsService,
13-
$progressIndicator: IProgressIndicator) {
14-
super($logger, $options, $staticConfig, $errors, $prompter, $userSettingsService, $analyticsSettingsService, $progressIndicator);
13+
$progressIndicator: IProgressIndicator,
14+
$osInfo: IOsInfo) {
15+
super($logger, $options, $staticConfig, $errors, $prompter, $userSettingsService, $analyticsSettingsService, $progressIndicator, $osInfo);
1516
}
1617

1718
protected checkConsentCore(trackFeatureUsage: boolean): IFuture<void> {

lib/services/plugin-variables-service.ts

-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,3 @@ export class PluginVariablesService implements IPluginVariablesService {
120120
}
121121
}
122122
$injector.register("pluginVariablesService", PluginVariablesService);
123-

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@
8888
"grunt-contrib-copy": "1.0.0",
8989
"grunt-contrib-watch": "1.0.0",
9090
"grunt-shell": "1.3.0",
91-
"grunt-ts": "5.5.1",
92-
"grunt-tslint": "3.1.0",
91+
"grunt-ts": "6.0.0-beta.3",
92+
"grunt-tslint": "3.3.0",
9393
"istanbul": "0.4.5",
9494
"mocha": "2.5.3",
9595
"mocha-fibers": "https://github.com/NativeScript/mocha-fibers.git",
9696
"mocha-typescript": "^1.0.4",
9797
"should": "7.0.2",
98-
"tslint": "3.11.0",
99-
"typescript": "^1.8.10"
98+
"tslint": "3.15.1",
99+
"typescript": "2.0.7"
100100
},
101101
"license": "Apache-2.0",
102102
"engines": {

test/project-service.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import * as yok from "../lib/common/yok";
22
import * as stubs from "./stubs";
33
import * as constants from "./../lib/constants";
4-
import {ChildProcess} from "../lib/common/child-process";
4+
import { ChildProcess } from "../lib/common/child-process";
55
import * as ProjectServiceLib from "../lib/services/project-service";
6-
import {ProjectNameService} from "../lib/services/project-name-service";
6+
import { ProjectNameService } from "../lib/services/project-name-service";
77
import * as ProjectDataServiceLib from "../lib/services/project-data-service";
88
import * as ProjectDataLib from "../lib/project-data";
99
import * as ProjectHelperLib from "../lib/common/project-helper";
10-
import {StaticConfig} from "../lib/config";
10+
import { StaticConfig } from "../lib/config";
1111
import * as NpmLib from "../lib/node-package-manager";
12-
import {NpmInstallationManager} from "../lib/npm-installation-manager";
12+
import { NpmInstallationManager } from "../lib/npm-installation-manager";
1313
import * as HttpClientLib from "../lib/common/http-client";
14-
import {FileSystem} from "../lib/common/file-system";
14+
import { FileSystem } from "../lib/common/file-system";
1515
import * as path from "path";
1616
import temp = require("temp");
17-
import * as helpers from "../lib/common/helpers";
18-
import {assert} from "chai";
19-
import {Options} from "../lib/options";
20-
import {HostInfo} from "../lib/common/host-info";
21-
import {ProjectTemplatesService} from "../lib/services/project-templates-service";
17+
import helpers = require("../lib/common/helpers");
18+
import { assert } from "chai";
19+
import { Options } from "../lib/options";
20+
import { HostInfo } from "../lib/common/host-info";
21+
import { ProjectTemplatesService } from "../lib/services/project-templates-service";
2222
import Future = require("fibers/future");
2323

2424
let mockProjectNameValidator = {
@@ -52,10 +52,10 @@ class ProjectIntegrationTest {
5252
let defaultTemplatePath = path.join(cacheRoot, packageName);
5353
let latestVersion = npmInstallationManager.getLatestVersion(packageName).wait();
5454

55-
if(!fs.exists(path.join(defaultTemplatePath, latestVersion)).wait()) {
55+
if (!fs.exists(path.join(defaultTemplatePath, latestVersion)).wait()) {
5656
npmInstallationManager.addToCache(packageName, latestVersion).wait();
5757
}
58-
if(!fs.exists(path.join(defaultTemplatePath, latestVersion, "package", "app")).wait()) {
58+
if (!fs.exists(path.join(defaultTemplatePath, latestVersion, "package", "app")).wait()) {
5959
npmInstallationManager.cacheUnpack(packageName, latestVersion).wait();
6060
}
6161

@@ -461,7 +461,7 @@ describe("project upgrade procedure tests", () => {
461461

462462
try {
463463
testInjector.resolve("projectData"); // This should trigger upgrade procedure
464-
} catch(err) {
464+
} catch (err) {
465465
isErrorThrown = true;
466466
let expectedErrorMessage = "No project found at or above '%s' and neither was a --path specified.," + tempFolder;
467467
assert.equal(expectedErrorMessage, err.toString());

0 commit comments

Comments
 (0)