Skip to content

Commit

Permalink
fix error in annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLudd committed Feb 5, 2020
1 parent 94d01f7 commit 26c369e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/annotate-config.coffee
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ dirname } = require('path')
{ chain, append, mergeAll } = require 'ramda'
{ chain, identity, append, map, mergeAll } = require 'ramda'
createAnnotation = require './create-annotation'

annotateConfig = (cwd, config, moduleName = '') ->
{ parents = [] } = config
parentAnnotations = chain (p) ->
parentAnnotations = map (p) ->
{ nodeModule, configFile } = p
parentPath = require.resolve("#{nodeModule}/#{configFile}", paths: [ cwd ])
moduleDir = dirname require.resolve("#{nodeModule}/package.json", paths: [ cwd ])
Expand Down
2 changes: 1 addition & 1 deletion lib/create-annotation.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ module.exports = (cwd, config, moduleName = '') ->
base = join(cwd, moduleName)
cleanModules = pickBy both(isNotValue, isLocal), modules
resolvedModules = map(((s) -> require.resolve(s, { paths: [ base ] })), cleanModules)
return Promise.all(map(analyzeFileDependencies, Object.entries(resolvedModules)))
return Promise.all(map(analyzeFileDependencies, Object.entries(resolvedModules))).then(mergeAll)

0 comments on commit 26c369e

Please sign in to comment.