A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/9e5b76140ffdb7dcd12aa402793644213fb8c5d7 below:

convert all callback style move usage to promise style · npm/npm@9e5b761 · GitHub

@@ -46,7 +46,7 @@ function moveModuleOnly (from, to, log, done) {

46 46 47 47

log.silly('move', 'move existing destination node_modules away', toModules)

48 48 49 -

move(toModules, tempToModules, removeDestination(done))

49 +

move(toModules, tempToModules).then(removeDestination(done), removeDestination(done))

50 50 51 51

function removeDestination (next) {

52 52

return function (er) {

@@ -62,7 +62,7 @@ function moveModuleOnly (from, to, log, done) {

62 62

function moveToModulesBack (next) {

63 63

return function () {

64 64

log.silly('move', 'move existing destination node_modules back', toModules)

65 -

move(tempToModules, toModules, iferr(done, next))

65 +

move(tempToModules, toModules).then(next, done)

66 66

}

67 67

}

68 68

@@ -76,22 +76,22 @@ function moveModuleOnly (from, to, log, done) {

76 76

function moveNodeModules (next) {

77 77

return function () {

78 78

log.silly('move', 'move source node_modules away', fromModules)

79 -

move(fromModules, tempFromModules, iferr(doMove(next), doMove(moveNodeModulesBack(next))))

79 +

move(fromModules, tempFromModules).then(doMove(moveNodeModulesBack(next)), doMove(next))

80 80

}

81 81

}

82 82 83 83

function doMove (next) {

84 84

return function () {

85 85

log.silly('move', 'move module dir to final dest', from, to)

86 -

move(from, to, iferr(done, next))

86 +

move(from, to).then(next, done)

87 87

}

88 88

}

89 89 90 90

function moveNodeModulesBack (next) {

91 91

return function () {

92 92

mkdirp(from, iferr(done, function () {

93 93

log.silly('move', 'put source node_modules back', fromModules)

94 -

move(tempFromModules, fromModules, iferr(done, next))

94 +

move(tempFromModules, fromModules).then(next, done)

95 95

}))

96 96

}

97 97

}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4