From a91afffbb2529bd97313b520668cfd53f58f3b1f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 23 Nov 2016 18:42:48 -0500 Subject: [PATCH] Adds logging for #18 --- .vscodeignore | 2 -- CHANGELOG.md | 5 +++++ package.json | 28 ++++++++++++++-------------- src/gitCodeLensProvider.ts | 2 ++ tsconfig.json | 11 ++--------- vsc-extension-quickstart.md | 33 --------------------------------- 6 files changed, 23 insertions(+), 58 deletions(-) delete mode 100644 vsc-extension-quickstart.md diff --git a/.vscodeignore b/.vscodeignore index 20a6c06..be250dd 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,5 +1,4 @@ images/*.gif -typings/** .vscode/** .vscode-test/** out/test/** @@ -8,4 +7,3 @@ src/** **/*.map .gitignore tsconfig.json -vsc-extension-quickstart.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca8370..f5de4f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ --- ## Release Notes +### 1.1.1 + + - Allows `gitlens.showQuickRepoHistory` command to run without an open editor (falls back to the folder repository) + - Adds logging for tracking [#18](https://github.com/eamodio/vscode-gitlens/issues/18) - GitLens only displayed for some files + ### 1.1.0 - Adds new `gitlens.showQuickFileHistory` command to show the file history in a quick-pick list (palette) diff --git a/package.json b/package.json index 607f331..a1ba95d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitlens", - "version": "1.1.0", + "version": "1.1.1", "author": { "name": "Eric Amodio", "email": "eamodio@gmail.com" @@ -379,6 +379,14 @@ "activationEvents": [ "*" ], + "scripts": { + "compile": "tsc -watch -p ./", + "lint": "tslint --project tslint.json", + "pack": "git clean -xdf && npm install && vsce package", + "postinstall": "node ./node_modules/vscode/bin/install", + "pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish", + "vscode:prepublish": "tsc -p ./" + }, "dependencies": { "ignore": "^3.2.0", "lodash.debounce": "^4.0.8", @@ -390,20 +398,12 @@ "tmp": "^0.0.31" }, "devDependencies": { + "@types/node": "^6.0.51", + "@types/mocha": "^2.2.33", + "@types/tmp": "^0.0.31", "mocha": "^3.1.2", - "tslint": "^4.0.1", + "tslint": "^4.0.2", "typescript": "^2.0.10", - "vscode": "^1.0.3", - "@types/node": "^6.0.50", - "@types/mocha": "^2.2.33", - "@types/tmp": "^0.0.31" - }, - "scripts": { - "compile": "tsc -watch -p ./", - "lint": "tslint --project tslint.json", - "pack": "git clean -xdf && npm install && vsce package", - "postinstall": "node ./node_modules/vscode/bin/install", - "pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish", - "vscode:prepublish": "tsc -p ./" + "vscode": "^1.0.3" } } \ No newline at end of file diff --git a/src/gitCodeLensProvider.ts b/src/gitCodeLensProvider.ts index ecb48ce..7ce24c3 100644 --- a/src/gitCodeLensProvider.ts +++ b/src/gitCodeLensProvider.ts @@ -4,6 +4,7 @@ import { CancellationToken, CodeLens, CodeLensProvider, commands, DocumentSelect import { BuiltInCommands, Commands, DocumentSchemes } from './constants'; import { CodeLensCommand, CodeLensLocation, IConfig, ICodeLensLanguageLocation } from './configuration'; import GitProvider, { GitCommit, GitUri, IGitBlame, IGitBlameLines } from './gitProvider'; +import { Logger } from './logger'; import * as moment from 'moment'; export class GitRecentChangeCodeLens extends CodeLens { @@ -67,6 +68,7 @@ export default class GitCodeLensProvider implements CodeLensProvider { if (!blame || !blame.lines.length) return lenses; const symbols = values[1] as SymbolInformation[]; + Logger.log('GitCodeLensProvider.provideCodeLenses:', `${symbols.length} symbol(s) found`); symbols.forEach(sym => this._provideCodeLens(gitUri, document, sym, languageLocations, blame, lenses)); } diff --git a/tsconfig.json b/tsconfig.json index be0af14..fcdeece 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,6 @@ { "compilerOptions": { - "lib": [ - "es6", - "es2015" - ], + "lib": [ "es6" ], "module": "commonjs", "noFallthroughCasesInSwitch": true, "noImplicitAny": true, @@ -15,11 +12,7 @@ "rootDir": ".", "sourceMap": true, "strictNullChecks": false, - "target": "es6", - "typeRoots": [ - "./node_modules/@types", - "./@types" - ] + "target": "es6" }, "exclude": [ "node_modules", diff --git a/vsc-extension-quickstart.md b/vsc-extension-quickstart.md deleted file mode 100644 index 6cdea2b..0000000 --- a/vsc-extension-quickstart.md +++ /dev/null @@ -1,33 +0,0 @@ -# Welcome to your first VS Code Extension - -## What's in the folder -* This folder contains all of the files necessary for your extension -* `package.json` - this is the manifest file in which you declare your extension and command. -The sample plugin registers a command and defines its title and command name. With this information -VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. -The file exports one function, `activate`, which is called the very first time your extension is -activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. -We pass the function containing the implementation of the command as the second parameter to -`registerCommand`. - -## Get up and running straight away -* press `F5` to open a new window with your extension loaded -* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World` -* set breakpoints in your code inside `src/extension.ts` to debug your extension -* find output from your extension in the debug console - -## Make changes -* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts` -* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes - -## Explore the API -* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts` - -## Run tests -* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests` -* press `F5` to run the tests in a new window with your extension loaded -* see the output of the test result in the debug console -* make changes to `test/extension.test.ts` or create new test files inside the `test` folder - * by convention, the test runner will only consider files matching the name pattern `**.test.ts` - * you can create folders inside the `test` folder to structure your tests any way you want \ No newline at end of file