Skip to content

Commit cdfbf05

Browse files
committed
Merge branch 'master' into use-tsserver
1 parent 828bbaf commit cdfbf05

Some content is hidden

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

45 files changed

+99
-56
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/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/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 */

dist/main/lang/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
'use strict';
15+
Object.defineProperty(exports, "__esModule", { value: true });
1516
const path = require("path");
1617
function mapValues(map) {
1718
return Object.keys(map).reduce((result, key) => {

dist/main/tsconfig/formatting.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
/**
34
* Maintainance:
45
* When a new option is added add it to:

dist/main/typescriptBuffer.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
// A class to keep all changes to the buffer in sync with tsserver. This is mainly used with
45
// the editor panes, but is also useful for editor-less buffer changes (renameRefactor).
@@ -45,7 +46,7 @@ class TypescriptBuffer {
4546
endLine: start.row + oldExtent.row + 1,
4647
endOffset: (oldExtent.row === 0 ? start.column + oldExtent.column : oldExtent.column) + 1
4748
};
48-
yield client.executeChange(tslib_1.__assign({}, end, { file: filePath, line: start.row + 1, offset: start.column + 1, insertString: newText }));
49+
yield client.executeChange(Object.assign({}, end, { file: filePath, line: start.row + 1, offset: start.column + 1, insertString: newText }));
4950
}
5051
this.events.emit("changed");
5152
});

dist/main/typescriptEditorPane.js

Lines changed: 6 additions & 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 atom_space_pen_views_1 = require("atom-space-pen-views");
45
const atom_1 = require("atom");
@@ -112,12 +113,17 @@ class TypescriptEditorPane {
112113
.on("opened", this.onOpened)
113114
.on("saved", this.onSaved);
114115
this.isTypescript = isTypescriptGrammar(editor.getGrammar());
116+
// Add 'typescript-editor' class to the <atom-text-editor> where typescript is active.
117+
if (this.isTypescript) {
118+
this.editor.element.classList.add('typescript-editor');
119+
}
115120
this.subscriptions.add(editor.onDidChangeGrammar(grammar => {
116121
this.isTypescript = isTypescriptGrammar(grammar);
117122
}));
118123
this.setupTooltipView();
119124
}
120125
dispose() {
126+
this.editor.element.classList.remove('typescript-editor');
121127
this.subscriptions.dispose();
122128
this.opts.onDispose(this);
123129
}

dist/main/utils/fsUtil.js

Whitespace-only changes.

lib/main/atom/tooltipManager.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export function attach(editorView: JQuery, editor: AtomCore.IEditor) {
2424

2525
// Only on ".ts" files
2626
var filePath = editor.getPath();
27+
if (!filePath) {
28+
return;
29+
}
2730
var filename = path.basename(filePath);
2831
var ext = path.extname(filename);
2932
if (!atomUtils.isAllowedExtension(ext)) return;
@@ -44,7 +47,7 @@ export function attach(editorView: JQuery, editor: AtomCore.IEditor) {
4447

4548
subscriber.subscribe(scroll, 'mousemove', (e) => {
4649
var pixelPt = pixelPositionFromMouseEvent(editorView, e)
47-
var screenPt = editor.screenPositionForPixelPosition(pixelPt)
50+
var screenPt = editor.element.screenPositionForPixelPosition(pixelPt)
4851
var bufferPt = editor.bufferPositionForScreenPosition(screenPt)
4952
if (lastExprTypeBufferPt && lastExprTypeBufferPt.isEqual(bufferPt) && exprTypeTooltip)
5053
return;
@@ -66,9 +69,9 @@ export function attach(editorView: JQuery, editor: AtomCore.IEditor) {
6669
if (exprTypeTooltip) return;
6770

6871
var pixelPt = pixelPositionFromMouseEvent(editorView, e);
69-
pixelPt.top += editor.getScrollTop();
70-
pixelPt.left += editor.getScrollLeft();
71-
var screenPt = editor.screenPositionForPixelPosition(pixelPt);
72+
pixelPt.top += editor.element.getScrollTop();
73+
pixelPt.left += editor.element.getScrollLeft();
74+
var screenPt = editor.element.screenPositionForPixelPosition(pixelPt);
7275
var bufferPt = editor.bufferPositionForScreenPosition(screenPt);
7376
var curCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column]);
7477
var nextCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column + 1]);

0 commit comments

Comments
 (0)