Skip to content

Commit a618f51

Browse files
author
Kelly Selden
committed
detect actual base blueprint version from cache
1 parent b9132c4 commit a618f51

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/get-start-and-end-commands.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ module.exports = function getStartAndEndCommands({
2121
startBlueprint,
2222
endBlueprint
2323
}) {
24-
let isCustomBlueprint = !isDefaultBlueprint(endBlueprint);
25-
2624
let startRange;
2725
let endRange;
28-
if (isCustomBlueprint) {
29-
startRange = endRange = '';
30-
} else {
26+
if (isDefaultBlueprint(endBlueprint)) {
3127
startRange = startBlueprint && startBlueprint.version;
3228
endRange = endBlueprint.version;
29+
} else if (!endBlueprint.isBaseBlueprint && isDefaultBlueprint(baseBlueprint)) {
30+
startRange = endRange = baseBlueprint.version;
31+
} else {
32+
startRange = endRange = '';
3333
}
3434

3535
return {

test/unit/get-start-and-end-commands-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ describe(_getStartAndEndCommands, function() {
286286
name: blueprint,
287287
version: startVersion
288288
},
289-
packageRange: ''
289+
packageRange: '0.0.3'
290290
},
291291
endOptions: {
292292
baseBlueprint,
293293
blueprint: {
294294
name: blueprint,
295295
version: endVersion
296296
},
297-
packageRange: ''
297+
packageRange: '0.0.3'
298298
}
299299
});
300300
});
@@ -673,15 +673,15 @@ describe(_getStartAndEndCommands, function() {
673673
startOptions: {
674674
baseBlueprint,
675675
blueprint: null,
676-
packageRange: ''
676+
packageRange: '0.0.3'
677677
},
678678
endOptions: {
679679
baseBlueprint,
680680
blueprint: {
681681
name: blueprint,
682682
version: endVersion
683683
},
684-
packageRange: ''
684+
packageRange: '0.0.3'
685685
}
686686
});
687687
});

0 commit comments

Comments
 (0)