Skip to content

Commit 2611525

Browse files
committed
Merge branch 'master' into use-tsserver
2 parents 828bbaf + 1428bbd commit 2611525

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4969
-31
lines changed

dist/client/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const events_1 = require("events");
45
const stream_1 = require("stream");

dist/client/clientResolver.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const client_1 = require("./client");
34
const events = require("events");
45
const path = require("path");

dist/client/findServer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const fs = require("fs");
34
const path = require("path");
45
/** Recursively search all directories rooted at the argument and find all typescript modules */

dist/hyperclickProvider.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const TS_GRAMMARS = new Set(["source.ts", "source.tsx"]);
34
exports.providerName = "typescript-hyperclick-provider";
45
exports.wordRegExp = /([A-Za-z0-9_])+|['"`](\\.|[^'"`\\\\])*['"`]/g;

dist/main/atom/autoCompleteProvider.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const utils_1 = require("./utils");
45
const Atom = require("atom");
@@ -28,7 +29,7 @@ class AutocompleteProvider {
2829
}
2930
}
3031
const client = yield this.clientResolver.get(location.file);
31-
const completions = yield client.executeCompletions(tslib_1.__assign({ prefix }, location));
32+
const completions = yield client.executeCompletions(Object.assign({ prefix }, location));
3233
const suggestions = completions.body.map(entry => ({
3334
text: entry.name,
3435
leftLabel: entry.kind,
@@ -84,13 +85,13 @@ class AutocompleteProvider {
8485
// Get additional details for the first few suggestions
8586
yield this.getAdditionalDetails(suggestions.slice(0, 10), location);
8687
const trimmed = prefix.trim();
87-
return suggestions.map(suggestion => (tslib_1.__assign({ replacementPrefix: getReplacementPrefix(prefix, trimmed, suggestion.text) }, suggestion)));
88+
return suggestions.map(suggestion => (Object.assign({ replacementPrefix: getReplacementPrefix(prefix, trimmed, suggestion.text) }, suggestion)));
8889
});
8990
}
9091
getAdditionalDetails(suggestions, location) {
9192
return tslib_1.__awaiter(this, void 0, void 0, function* () {
9293
if (suggestions.some(s => !s.details)) {
93-
const details = yield this.lastSuggestions.client.executeCompletionDetails(tslib_1.__assign({ entryNames: suggestions.map(s => s.text) }, location));
94+
const details = yield this.lastSuggestions.client.executeCompletionDetails(Object.assign({ entryNames: suggestions.map(s => s.text) }, location));
9495
details.body.forEach((detail, i) => {
9596
const suggestion = suggestions[i];
9697
suggestion.details = detail;

dist/main/atom/commands/build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");

dist/main/atom/commands/checkAllFiles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");

dist/main/atom/commands/clearErrors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const registry_1 = require("./registry");
34
registry_1.commands.set("typescript:clear-errors", deps => {
45
return e => {

dist/main/atom/commands/commands.js

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

dist/main/atom/commands/findReferences.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");

dist/main/atom/commands/formatCode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");
@@ -34,7 +35,7 @@ registry_1.commands.set("typescript:format-code", deps => {
3435
};
3536
// Collect all edits together so we can update everything in a single transaction
3637
for (const range of ranges) {
37-
const result = yield client.executeFormat(tslib_1.__assign({}, range, { options, file: filePath }));
38+
const result = yield client.executeFormat(Object.assign({}, range, { options, file: filePath }));
3839
if (result.body) {
3940
edits.push(...result.body);
4041
}

dist/main/atom/commands/goToDeclaration.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");

dist/main/atom/commands/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// import {simpleSelectionView} from "../views/simpleSelectionView";
1010
// import escapeHtml = require('escape-html');
1111
"use strict";
12+
Object.defineProperty(exports, "__esModule", { value: true });
1213
// Load all the web components
1314
// export * from "../components/componentRegistry";
1415
const registry_1 = require("./registry");

dist/main/atom/commands/registry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
// To allow using dependency injection, but avoid having to type a lot of boilerplate, we have the
34
// individual command files register themselves in the below map. When the package is initializing,
45
// the constructors are passed the deps and return the actual commands handlers.

dist/main/atom/commands/renameRefactor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const registry_1 = require("./registry");
45
const utils_1 = require("../utils");

dist/main/atom/components/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
function __export(m) {
33
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
44
}
5+
Object.defineProperty(exports, "__esModule", { value: true });
56
__export(require("./tsView"));

dist/main/atom/components/statusPanel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const dom = require("jsx-render-dom");
34
const path_1 = require("path");
45
const utils_1 = require("../utils");

dist/main/atom/components/tsView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Some docs
22
// http://www.html5rocks.com/en/tutorials/webcomponents/customelements/ (look at lifecycle callback methods)
33
"use strict";
4+
Object.defineProperty(exports, "__esModule", { value: true });
45
class TsView extends HTMLElement {
56
createdCallback() {
67
var preview = this.innerText;

dist/main/atom/editorSetup.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
function setupEditor(editor) {
4+
const editorView = atom.views.getView(editor);
5+
// Add and remove 'typescript-editor' class from the <atom-text-editor>
6+
// where typescript is active.
7+
editorView.classList.add('typescript-editor');
8+
editor.onDidDestroy(() => {
9+
editorView.classList.remove('typescript-editor');
10+
});
11+
//
12+
// // Quick fix decoration stuff
13+
// var quickFixDecoration: AtomCore.Decoration = null;
14+
// var quickFixMarker: any = null;
15+
// function clearExistingQuickfixDecoration() {
16+
// if (quickFixDecoration) {
17+
// quickFixDecoration.destroy();
18+
// quickFixDecoration = null;
19+
// }
20+
// if (quickFixMarker) {
21+
// quickFixMarker.destroy();
22+
// quickFixMarker = null;
23+
// }
24+
// }
25+
// var queryForQuickFix = debounce((filePathPosition:{filePath:string;position:number}) => {
26+
// parent.getQuickFixes(filePathPosition).then(res=> {
27+
// clearExistingQuickfixDecoration();
28+
// if (res.fixes.length) {
29+
// quickFixMarker = editor.markBufferRange(editor.getSelectedBufferRange());
30+
// quickFixDecoration = editor.decorateMarker(quickFixMarker,
31+
// { type: "line-number", class: "quickfix" });
32+
// }
33+
// })
34+
// }, 500);
35+
// var cursorObserver = editor.onDidChangeCursorPosition(() => {
36+
// try {
37+
// // This line seems to throw an exception sometimes.
38+
// // https://github.com/TypeStrong/atom-typescript/issues/325
39+
// // https://github.com/TypeStrong/atom-typescript/issues/310
40+
// let pathPos = atomUtils.getFilePathPosition();
41+
//
42+
// // TODO: implement quickfix logic for transformed files
43+
// if (isTransformerFile(pathPos.filePath)) {
44+
// clearExistingQuickfixDecoration();
45+
// return;
46+
// }
47+
//
48+
// queryForQuickFix(pathPos);
49+
// }
50+
// catch (ex) {
51+
// clearExistingQuickfixDecoration();
52+
// }
53+
// });
54+
//
55+
//
56+
// /**
57+
// * On final dispose
58+
// */
59+
// var destroyObserver = editor.onDidDestroy(() => {
60+
// // Clear editor observers
61+
// cursorObserver.dispose();
62+
// destroyObserver.dispose();
63+
// });
64+
}
65+
exports.setupEditor = setupEditor;

dist/main/atom/gotoHistory.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
exports.errorsInOpenFiles = { members: [] };
34
exports.buildOutput = { members: [] };
45
exports.referencesOutput = { members: [] };

dist/main/atom/tooltipManager.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Inspiration : https://atom.io/packages/ide-haskell
22
// and https://atom.io/packages/ide-flow
33
"use strict";
4+
Object.defineProperty(exports, "__esModule", { value: true });
45
const tslib_1 = require("tslib");
56
const atomUtils = require("./utils"); ///ts:import:generated
67
const atomts_1 = require("../atomts");
@@ -22,6 +23,9 @@ function attach(editorView, editor) {
2223
var rawView = editorView[0];
2324
// Only on ".ts" files
2425
var filePath = editor.getPath();
26+
if (!filePath) {
27+
return;
28+
}
2529
var filename = path.basename(filePath);
2630
var ext = path.extname(filename);
2731
if (!atomUtils.isAllowedExtension(ext))
@@ -39,7 +43,7 @@ function attach(editorView, editor) {
3943
var lastExprTypeBufferPt;
4044
subscriber.subscribe(scroll, 'mousemove', (e) => {
4145
var pixelPt = pixelPositionFromMouseEvent(editorView, e);
42-
var screenPt = editor.screenPositionForPixelPosition(pixelPt);
46+
var screenPt = editor.element.screenPositionForPixelPosition(pixelPt);
4347
var bufferPt = editor.bufferPositionForScreenPosition(screenPt);
4448
if (lastExprTypeBufferPt && lastExprTypeBufferPt.isEqual(bufferPt) && exprTypeTooltip)
4549
return;
@@ -57,9 +61,9 @@ function attach(editorView, editor) {
5761
if (exprTypeTooltip)
5862
return;
5963
var pixelPt = pixelPositionFromMouseEvent(editorView, e);
60-
pixelPt.top += editor.getScrollTop();
61-
pixelPt.left += editor.getScrollLeft();
62-
var screenPt = editor.screenPositionForPixelPosition(pixelPt);
64+
pixelPt.top += editor.element.getScrollTop();
65+
pixelPt.left += editor.element.getScrollLeft();
66+
var screenPt = editor.element.screenPositionForPixelPosition(pixelPt);
6367
var bufferPt = editor.bufferPositionForScreenPosition(screenPt);
6468
var curCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column]);
6569
var nextCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column + 1]);

dist/main/atom/utils/atom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
2-
const tslib_1 = require("tslib");
2+
Object.defineProperty(exports, "__esModule", { value: true });
33
const Atom = require("atom");
44
const fs = require("fs");
55
const path = require("path");
@@ -68,7 +68,7 @@ function onDiskAndTsRelated(editor) {
6868
exports.onDiskAndTsRelated = onDiskAndTsRelated;
6969
function getFilePathPosition() {
7070
const editor = atom.workspace.getActiveTextEditor();
71-
return tslib_1.__assign({ file: editor.getPath() }, getEditorPosition(editor));
71+
return Object.assign({ file: editor.getPath() }, getEditorPosition(editor));
7272
}
7373
exports.getFilePathPosition = getFilePathPosition;
7474
function getFilePath() {

dist/main/atom/utils/fs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Wraps fs and path into a nice "consistentPath" API
33
*/
44
"use strict";
5+
Object.defineProperty(exports, "__esModule", { value: true });
56
function consistentPath(filePath) {
67
return filePath.split('\\').join('/');
78
}

dist/main/atom/utils/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
function __export(m) {
33
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
44
}
5+
Object.defineProperty(exports, "__esModule", { value: true });
56
__export(require("./atom"));
67
__export(require("./fs"));
78
__export(require("./ts"));

dist/main/atom/utils/ts.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const atom_1 = require("atom");
34
function locationToPoint(loc) {
45
return new atom_1.Point(loc.line - 1, loc.offset - 1);

dist/main/atom/views/lineMessageView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const view = require("./view");
34
var $ = view.$;
45
class LineMessageView extends view.View {

dist/main/atom/views/plainMessageView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const view = require("./view");
34
class PlainMessageView extends view.View {
45
static content() {

dist/main/atom/views/renameView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
2-
const tslib_1 = require("tslib");
2+
Object.defineProperty(exports, "__esModule", { value: true });
33
const view = require("./view");
44
var $ = view.$;
55
var html = require('../../../../views/renameView.html');
@@ -66,7 +66,7 @@ class RenameView extends view.View {
6666
// Show the dialog and resolve the promise with the entered string
6767
showRenameDialog(options) {
6868
return new Promise((resolve, reject) => {
69-
this.renameThis(tslib_1.__assign({}, options, { onCancel: reject, onCommit: resolve }));
69+
this.renameThis(Object.assign({}, options, { onCancel: reject, onCommit: resolve }));
7070
});
7171
}
7272
}

dist/main/atom/views/simpleOverlaySelectionView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Only one of these bad boys is allowed on the screen at one time
44
*/
55
"use strict";
6+
Object.defineProperty(exports, "__esModule", { value: true });
67
var singleton;
78
function default_1(options, editor) {
89
if (!singleton)
@@ -15,7 +16,6 @@ function default_1(options, editor) {
1516
singleton.show();
1617
return singleton;
1718
}
18-
Object.defineProperty(exports, "__esModule", { value: true });
1919
exports.default = default_1;
2020
/**
2121
* Various Utility section

dist/main/atom/views/simpleSelectionView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Only one of these bad boys is allowed on the screen at one time
44
*/
55
"use strict";
6+
Object.defineProperty(exports, "__esModule", { value: true });
67
var singleton;
78
function simpleSelectionView(options) {
89
if (!singleton)

dist/main/atom/views/tooltipView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const view = require("./view");
34
var $ = view.$;
45
class TooltipView extends view.View {

dist/main/atom/views/typeOverlayView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const escapeHtml = require("escape-html");
34
function create(type, comment) {
45
let overlayHTML = `

dist/main/atom/views/view.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const sp = require("atom-space-pen-views");
34
class View extends sp.View {
45
constructor(options) {

dist/main/atomts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const tslib_1 = require("tslib");
34
const Atom = require("atom");
45
const atomConfig = require("./atom/atomConfig");
@@ -25,7 +26,7 @@ const commands_1 = require("./atom/commands");
2526
let linter;
2627
let statusBar;
2728
function activate(state) {
28-
require('atom-package-deps').install('atom-typescript-beta').then(() => {
29+
require('atom-package-deps').install('atom-typescript-beta', true).then(() => {
2930
let statusPriority = 100;
3031
for (const panel of statusBar.getRightTiles()) {
3132
if (panel.getItem().tagName === "GRAMMAR-SELECTOR-STATUS") {

dist/main/errorPusher.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
23
const lodash_1 = require("lodash");
34
const utils_1 = require("./atom/utils");
45
/** Class that collects errors from all of the clients and pushes them to the Linter service */

0 commit comments

Comments
 (0)