Skip to content

Commit

Permalink
Fix TypeFox#26 Upgrade to Monaco 0.10.0
Browse files Browse the repository at this point in the history
Removed CodeAction as it no longer exists in 0.10.0. Also added
additional compilation steps to the Travis build to ensure that the
TypeScript files in both the project and the example can actually be
compiled and built into an example application.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
  • Loading branch information
rcjsuen committed Aug 30, 2017
1 parent efe943c commit a3642f1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ cache:
- example/node_modules
install:
- npm install
- npm run compile
- cd example
- npm install
- npm install
- npm run build
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"dependencies": {
"glob-to-regexp": "^0.3.0",
"monaco-editor": "^0.9.0",
"monaco-editor-core": "^0.9.0",
"monaco-editor": "^0.10.0",
"monaco-editor-core": "^0.10.0",
"vscode-base-languageclient": "^0.0.1-alpha.2"
},
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions src/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@ export class ProtocolToMonacoConverter {
return items.map((codeLens) => this.asCodeLens(codeLens));
}


asCodeActions(commands: Command[]): monaco.languages.CodeAction[] {
return this.asCommands(commands).map((command, score) => ({ command, score }));
}

asCommand(command: Command): monaco.languages.Command {
return {
id: command.command,
Expand Down
2 changes: 1 addition & 1 deletion src/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class MonacoLanguages implements Languages {
return [];
}
const params = this.m2p.asCodeActionParams(model, range, context);
return provider.provideCodeActions(params, token).then(result => this.p2m.asCodeActions(result))
return provider.provideCodeActions(params, token).then(result => this.p2m.asCommands(result));
}
}
}
Expand Down

0 comments on commit a3642f1

Please sign in to comment.