@@ -23,6 +23,17 @@ const resolvePackage = require('./resolve-package');
2323const { defaultTo } = require ( './constants' ) ;
2424const normalizeBlueprintArgs = require ( './normalize-blueprint-args' ) ;
2525
26+ /**
27+ * If `version` attribute exists in the `blueprint` object and URL is empty, skip. Otherwise resolve the details of
28+ * the blueprint
29+ *
30+ * @param {Object } blueprint - Expected to contain `name`, `options` array, `packageName`, `location`, and `version`
31+ * attributes
32+ * @param {String } url - Optional parameter that links to package
33+ * @param {String } range - Version range i.e. 1.0.2
34+ * @returns {Promise<void> }
35+ * @private
36+ */
2637async function _resolvePackage ( blueprint , url , range ) {
2738 if ( blueprint . version && ! url ) {
2839 return ;
@@ -137,6 +148,7 @@ module.exports = async function emberCliUpdate({
137148 } ) ;
138149 }
139150
151+ // If blueprint is located on disk
140152 if ( blueprint . location && ! packageUrl ) {
141153 let parsedPackage = await parseBlueprintPackage ( {
142154 cwd,
@@ -153,6 +165,9 @@ module.exports = async function emberCliUpdate({
153165 blueprint
154166 } ) ;
155167
168+ // If no base blueprint is found, set the selected one as the base blueprint.
169+ // `glimmer`, `app`, and `addon` blueprints as well as ones whose `isBaseBlueprint` attribute is
170+ // set to true will also have baseBlueprint undefined
156171 if ( ! baseBlueprint ) {
157172 // for non-existing blueprints
158173 blueprint . isBaseBlueprint = true ;
0 commit comments