Skip to content

es6 & TS 2.6 upgrade #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"publisher": "Telerik",
"bugs": "https://github.com/NativeScript/nativescript-vscode-extension/issues",
"engines": {
"vscode": "^1.7.0"
"vscode": "^1.19.0"
},
"homepage": "https://www.nativescript.org/",
"categories": [
Expand All @@ -25,26 +25,24 @@
],
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"vscode-chrome-debug-core": "3.9.1",
"vscode-chrome-debug-core": "~3.9.0",
"node-ipc": "8.10.3",
"source-map": "0.5.6",
"source-map": "0.6.1",
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",
"universal-analytics": "0.4.13",
"vscode-debugadapter": "1.19.0",
"vscode-debugprotocol": "1.19.0"
"vscode-debugadapter": "1.26.0",
"vscode-debugprotocol": "1.26.0"
},
"devDependencies": {
"@types/es6-collections": "0.5.30",
"@types/es6-promise": "0.0.32",
"@types/mocha": "2.2.41",
"@types/node": "6.0.46",
"@types/source-map": "~0.1.0",
"chrome-remote-debug-protocol": "git://github.com/roblourens/chrome-remote-debug-protocol.git",
"mocha": "2.5.3",
"typescript": "~2.4.0",
"vsce": "1.22.0",
"vscode": "1.1.0",
"vscode-debugadapter-testsupport": "1.19.0"
"typescript": "2.6.2",
"vsce": "~1.36.0",
"vscode": "~1.1.10",
"vscode-debugadapter-testsupport": "1.26.0"
},
"scripts": {
"clean": "git clean -fdx",
Expand Down
8 changes: 0 additions & 8 deletions src/custom-typings/es6-impl/es6-impl.d.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/debug-adapter/adapter/adapterProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export class AdapterProxy {
.filter(transformer => request.command in transformer)
.reduce(
(p, transformer) => p.then(() => transformer[request.command](request.arguments, request.seq)),
Promise.resolve<void>());
Promise.resolve());
}

/**
* Pass the response body back through the transformers in reverse order. They modify the body in place.
*/
private transformResponse(request: DebugProtocol.Request, body: any): Promise<void> {
if (!body) {
return Promise.resolve<void>();
return Promise.resolve();
}

const bodyTransformMethodName = request.command + 'Response';
Expand All @@ -58,7 +58,7 @@ export class AdapterProxy {
.filter(transformer => bodyTransformMethodName in transformer)
.reduce(
(p, transformer) => p.then(() => transformer[bodyTransformMethodName](body, request.seq)),
Promise.resolve<void>());
Promise.resolve());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/debug-adapter/connection/iosConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class IosConnection implements INSDebugConnection {
}

public enable() : Promise<void> {
return Promise.resolve<void>();
return Promise.resolve();
}

public close(): void {
Expand Down
10 changes: 5 additions & 5 deletions src/debug-adapter/webKitDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
private clearTargetContext(): void {
this._scriptsById = new Map<WebKitProtocol.Debugger.ScriptId, WebKitProtocol.Debugger.Script>();
this._committedBreakpointsByUrl = new Map<string, WebKitProtocol.Debugger.BreakpointId[]>();
this._setBreakpointsRequestQ = Promise.resolve<void>();
this._setBreakpointsRequestQ = Promise.resolve();
this._lastOutputEvent = null;
this.fireEvent({ seq: 0, type: 'event', event: 'clearTargetContext'});
}
Expand Down Expand Up @@ -368,7 +368,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
this._webKitConnection = null;
}

return Promise.resolve<void>();
return Promise.resolve();
}

public setBreakpoints(args: DebugProtocol.ISetBreakpointsArgs): Promise<DebugProtocol.ISetBreakpointsResponseBody> {
Expand Down Expand Up @@ -403,7 +403,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {

private _clearAllBreakpoints(url: string): Promise<void> {
if (!this._committedBreakpointsByUrl.has(url)) {
return Promise.resolve<void>();
return Promise.resolve();
}

// Remove breakpoints one at a time. Seems like it would be ok to send the removes all at once,
Expand All @@ -412,7 +412,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
// does not break there.
return this._committedBreakpointsByUrl.get(url).reduce((p, bpId) => {
return p.then(() => this._webKitConnection.debugger_removeBreakpoint(bpId)).then(() => { });
}, Promise.resolve<void>()).then(() => {
}, Promise.resolve()).then(() => {
this._committedBreakpointsByUrl.set(url, null);
});
}
Expand Down Expand Up @@ -621,7 +621,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
return { variables };
});
} else {
return Promise.resolve();
return Promise.resolve(null);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/tests/nsDebugClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class NsDebugClient extends DebugClient {
this.onNextTime(event).then(e => this.onNthTime(--n, event));
}

public assertSetBreakpoints(path: string, breakpoints: { line: number, condition?: string }[]): Promise<{}> {
public assertSetBreakpoints(path: string, breakpoints: { line: number, condition?: string }[]): Promise<void> {
return this.setBreakpointsRequest({
lines: breakpoints.map(b => b.line),
breakpoints: breakpoints,
Expand Down
7 changes: 5 additions & 2 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
Expand All @@ -10,9 +10,12 @@
"outDir": "../out",
"allowJs": true
},
"exclude": [
"node_modules",
"tests"
],
"files": [
// typescript definitions
"custom-typings/es6-impl/es6-impl.d.ts",
"custom-typings/universal-analytics/ua.d.ts",
"custom-typings/debugProtocolExtensions.d.ts",
"custom-typings/webKitProtocol.d.ts",
Expand Down