Giter Site home page Giter Site logo

blamer's Introduction

Blamer

Blamer is a tool for get information about author of code from version control system. Supports git and subversion.

Status

NPM version Build Status codecov Code Climate

NPM

Setup

npm install blamer

Usage

import Blamer from 'blamer';

// first parameter in Blamer is type of VCS, can be 'svn' or 'git', 'git' used by default
const blamer = new Blamer('git');

( async () => {
    const result = await blamer.blameByFile('/path/to/file/in/repo');
    console.log("Blame json: %j", result);
    //        will print
    //        Blame json: {"/path/to/file/in/repo": {
    //            "1": {
    //                "rev": "rev",
    //                "author": "author",
    //                "date": "2014-10-15T12:33:31.675393Z",
    //                "line": "1"
    //             }
    //        }
    //   }
})

License

The MIT License

blamer's People

Contributors

dependabot[bot] avatar kucherenko avatar snyk-bot avatar un-def avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

blamer's Issues

Ignore code movements inside a file

What do you think about ignoring moving of snippets of code as well?

with git blame -w -M one would be ignoring movements of functions up and down in the code.

Cannot find module 'node:fs'

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

Cannot find module 'node:fs'
Require stack:
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/blamer/build/main/vcs/git.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/blamer/build/main/blamer.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/blamer/build/main/index.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/@jscpd/finder/dist/hooks/blamer.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/@jscpd/finder/dist/hooks/index.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/node_modules/@jscpd/finder/dist/index.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/dist/index.js
- /tmp/.npm/_npx/66/lib/node_modules/jscpd/bin/jscpd

https://github.com/kucherenko/blamer/blame/2ca7c28bdd8d31bb7d8bd33e8a637c456476a853/src/vcs/git.ts#L4

node version: v14.16.1

https://nodejs.org/api/esm.html#node-imports

node:imports only support by node >=v14.18.0 >=v16.0.0

image

For compatibility with lower versions, please adjust the way the module is introduced. Thank you very much.

Whitespace ommit

This happens on Windows on a git repo.

It should be nice to be able to activate the "-w" option or not (ot just have it enabled by default). Otherwise I get the text "Not committed yet" when is a whitespace issue.

Thanks for this nice plugin.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.