Pārlūkot izejas kodu

Updates to latest typescript & eslint

main
Eric Amodio pirms 5 gadiem
vecāks
revīzija
8cbfc0c49a
3 mainītis faili ar 21 papildinājumiem un 17 dzēšanām
  1. +10
    -10
      package-lock.json
  2. +2
    -2
      package.json
  3. +9
    -5
      src/trackers/documentTracker.ts

+ 10
- 10
package-lock.json Parādīt failu

@ -2884,9 +2884,9 @@
"dev": true
},
"eslint": {
"version": "5.15.3",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.3.tgz",
"integrity": "sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
"integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@ -2909,7 +2909,7 @@
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"inquirer": "^6.2.2",
"js-yaml": "^3.12.0",
"js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
@ -7385,9 +7385,9 @@
}
},
"parent-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz",
"integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
"requires": {
"callsites": "^3.0.0"
@ -10065,9 +10065,9 @@
"dev": true
},
"typescript": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz",
"integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
"integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
"dev": true
},
"typescript-eslint-parser": {

+ 2
- 2
package.json Parādīt failu

@ -4998,7 +4998,7 @@
"clean-webpack-plugin": "2.0.1",
"circular-dependency-plugin": "5.0.2",
"css-loader": "2.1.1",
"eslint": "5.15.3",
"eslint": "5.16.0",
"eslint-cli": "1.1.1",
"eslint-config-prettier": "4.1.0",
"eslint-loader": "2.1.2",
@ -5014,7 +5014,7 @@
"sass-loader": "7.1.0",
"terser-webpack-plugin": "1.2.3",
"ts-loader": "5.3.3",
"typescript": "3.2.4",
"typescript": "3.4.1",
"vsce": "1.59.0",
"vscode": "1.1.33",
"webpack": "4.29.6",

+ 9
- 5
src/trackers/documentTracker.ts Parādīt failu

@ -235,18 +235,19 @@ export class DocumentTracker implements Disposable {
}
private async _add(documentOrId: TextDocument | Uri): Promise<TrackedDocument<T>> {
let document;
if (documentOrId instanceof GitUri) {
try {
documentOrId = await workspace.openTextDocument(documentOrId.documentUri({ useVersionedPath: true }));
document = await workspace.openTextDocument(documentOrId.documentUri({ useVersionedPath: true }));
}
catch (ex) {
const msg = ex.toString();
if (msg.includes('File seems to be binary and cannot be opened as text')) {
documentOrId = new BinaryTextDocument(documentOrId);
document = new BinaryTextDocument(documentOrId);
}
else if (msg.includes('File not found')) {
// If we can't find the file, assume it is because the file has been renamed or deleted at some point
documentOrId = new MissingRevisionTextDocument(documentOrId);
document = new MissingRevisionTextDocument(documentOrId);
// const [fileName, repoPath] = await Container.git.findWorkingFileName(documentOrId, undefined, ref);
// if (fileName === undefined) throw new Error(`Failed to add tracking for document: ${documentOrId}`);
@ -259,10 +260,13 @@ export class DocumentTracker implements Disposable {
}
}
else if (documentOrId instanceof Uri) {
documentOrId = await workspace.openTextDocument(documentOrId);
document = await workspace.openTextDocument(documentOrId);
}
else {
document = documentOrId;
}
const doc = await this.addCore(documentOrId);
const doc = await this.addCore(document);
await doc.ensureInitialized();
return doc;

Notiek ielāde…
Atcelt
Saglabāt