mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 01:25:43 -05:00
Adds logging for #18
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
images/*.gif
|
images/*.gif
|
||||||
typings/**
|
|
||||||
.vscode/**
|
.vscode/**
|
||||||
.vscode-test/**
|
.vscode-test/**
|
||||||
out/test/**
|
out/test/**
|
||||||
@@ -8,4 +7,3 @@ src/**
|
|||||||
**/*.map
|
**/*.map
|
||||||
.gitignore
|
.gitignore
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
vsc-extension-quickstart.md
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
## Release Notes
|
## 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
|
### 1.1.0
|
||||||
|
|
||||||
- Adds new `gitlens.showQuickFileHistory` command to show the file history in a quick-pick list (palette)
|
- Adds new `gitlens.showQuickFileHistory` command to show the file history in a quick-pick list (palette)
|
||||||
|
|||||||
30
package.json
30
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlens",
|
"name": "gitlens",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Eric Amodio",
|
"name": "Eric Amodio",
|
||||||
"email": "eamodio@gmail.com"
|
"email": "eamodio@gmail.com"
|
||||||
@@ -379,6 +379,14 @@
|
|||||||
"activationEvents": [
|
"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": {
|
"dependencies": {
|
||||||
"ignore": "^3.2.0",
|
"ignore": "^3.2.0",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
@@ -390,20 +398,12 @@
|
|||||||
"tmp": "^0.0.31"
|
"tmp": "^0.0.31"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mocha": "^3.1.2",
|
"@types/node": "^6.0.51",
|
||||||
"tslint": "^4.0.1",
|
|
||||||
"typescript": "^2.0.10",
|
|
||||||
"vscode": "^1.0.3",
|
|
||||||
"@types/node": "^6.0.50",
|
|
||||||
"@types/mocha": "^2.2.33",
|
"@types/mocha": "^2.2.33",
|
||||||
"@types/tmp": "^0.0.31"
|
"@types/tmp": "^0.0.31",
|
||||||
},
|
"mocha": "^3.1.2",
|
||||||
"scripts": {
|
"tslint": "^4.0.2",
|
||||||
"compile": "tsc -watch -p ./",
|
"typescript": "^2.0.10",
|
||||||
"lint": "tslint --project tslint.json",
|
"vscode": "^1.0.3"
|
||||||
"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 ./"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import { CancellationToken, CodeLens, CodeLensProvider, commands, DocumentSelect
|
|||||||
import { BuiltInCommands, Commands, DocumentSchemes } from './constants';
|
import { BuiltInCommands, Commands, DocumentSchemes } from './constants';
|
||||||
import { CodeLensCommand, CodeLensLocation, IConfig, ICodeLensLanguageLocation } from './configuration';
|
import { CodeLensCommand, CodeLensLocation, IConfig, ICodeLensLanguageLocation } from './configuration';
|
||||||
import GitProvider, { GitCommit, GitUri, IGitBlame, IGitBlameLines } from './gitProvider';
|
import GitProvider, { GitCommit, GitUri, IGitBlame, IGitBlameLines } from './gitProvider';
|
||||||
|
import { Logger } from './logger';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
|
||||||
export class GitRecentChangeCodeLens extends CodeLens {
|
export class GitRecentChangeCodeLens extends CodeLens {
|
||||||
@@ -67,6 +68,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
|
|||||||
if (!blame || !blame.lines.length) return lenses;
|
if (!blame || !blame.lines.length) return lenses;
|
||||||
|
|
||||||
const symbols = values[1] as SymbolInformation[];
|
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));
|
symbols.forEach(sym => this._provideCodeLens(gitUri, document, sym, languageLocations, blame, lenses));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": [
|
"lib": [ "es6" ],
|
||||||
"es6",
|
|
||||||
"es2015"
|
|
||||||
],
|
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
@@ -15,11 +12,7 @@
|
|||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strictNullChecks": false,
|
"strictNullChecks": false,
|
||||||
"target": "es6",
|
"target": "es6"
|
||||||
"typeRoots": [
|
|
||||||
"./node_modules/@types",
|
|
||||||
"./@types"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user