mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
Aligned “lodash” version with other dependencies, so that it gets deduplicated
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import maxBy from 'lodash.maxby'
|
||||
import orderBy from 'lodash.orderby'
|
||||
import uniqBy from 'lodash.uniqby'
|
||||
import _ from 'lodash'
|
||||
|
||||
import { logger } from '../../logger'
|
||||
|
||||
@@ -147,7 +145,7 @@ function upsert (arr, key, newval) {
|
||||
}
|
||||
|
||||
function prettyPrintCommitHistory (commitArr) {
|
||||
const commit = maxBy(commitArr, 'seq')
|
||||
const commit = _.maxBy(commitArr, 'seq')
|
||||
let line = ''
|
||||
commitArr.forEach(function (c) {
|
||||
if (c === commit) {
|
||||
@@ -171,7 +169,7 @@ function prettyPrintCommitHistory (commitArr) {
|
||||
const nextCommit = commits[commit.parent]
|
||||
upsert(commitArr, commit, nextCommit)
|
||||
}
|
||||
commitArr = uniqBy(commitArr, 'id')
|
||||
commitArr = _.uniqBy(commitArr, 'id')
|
||||
prettyPrintCommitHistory(commitArr)
|
||||
}
|
||||
|
||||
@@ -204,7 +202,7 @@ export const getCommitsArray = function () {
|
||||
return commits[key]
|
||||
})
|
||||
commitArr.forEach(function (o) { logger.debug(o.id) })
|
||||
return orderBy(commitArr, ['seq'], ['desc'])
|
||||
return _.orderBy(commitArr, ['seq'], ['desc'])
|
||||
}
|
||||
export const getCurrentBranch = function () { return curBranch }
|
||||
export const getDirection = function () { return direction }
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import * as d3 from 'd3'
|
||||
import assign from 'lodash.assign'
|
||||
import _ from 'lodash'
|
||||
|
||||
import db from './gitGraphAst'
|
||||
import gitGraphParser from './parser/gitGraph'
|
||||
@@ -252,7 +252,7 @@ export const draw = function (txt, id, ver) {
|
||||
// Parse the graph definition
|
||||
parser.parse(txt + '\n')
|
||||
|
||||
config = assign(config, apiConfig, db.getOptions())
|
||||
config = _.assign(config, apiConfig, db.getOptions())
|
||||
logger.debug('effective options', config)
|
||||
const direction = db.getDirection()
|
||||
allCommitsDict = db.getCommits()
|
||||
|
Reference in New Issue
Block a user