This document contains information about how to smoothly migrate the things from a version to another version.
1.x.x
to 2.x.x
The big change is the the data schema -- which should be migrated.
The old ~/.git-stats
format was:
{
"<date>": {
"<remote-url>": {
"<hash>": "<date>"
}
}
}
In the new version, the remote url is not mandatory anymore. The new format is:
{
"commits": {
"<date>": {
"<hash>": 1
}
}
}
This is supposed to change when users install the 2.x.x
versions. However, if
the migration script fails, you can always run it manually:
./scripts/migration/2.0.0.js
This will modify the ~/.git-stats
file.
When using git-stats
as library, things changed too. The old way was:
var GitStats = require("git-stats");
GitStats.ansiCalendar(opts, fn);
In 2.x.x
, GitStats
is a constructor. That allows us to create as many git-stats
instances we want.
var GitStats = require("git-stats");
// Provide a custom data path
var gs1 = new GitStats("path/to/some/data.json");
// Use the default (~/.git-stats)
var gs2 = new GitStats();
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )