Skip to content

Commit

Permalink
Merge pull request #988 from stealjs/npm1
Browse files Browse the repository at this point in the history
Upgrade to steal-npm 1.0.4
  • Loading branch information
matthewp authored Jan 5, 2017
2 parents 567d20f + cf8360b commit baa2fc2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions ext/npm-crawl.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var crawl = {
});
},

dep: function(context, pkg, childPkg, isRoot, skipSettingConfig) {
dep: function(context, pkg, refPkg, childPkg, isRoot, skipSettingConfig) {
var versionAndRange = childPkg.name + "@" + childPkg.version;
if(context.fetchCache[versionAndRange]) {
return context.fetchCache[versionAndRange];
Expand Down Expand Up @@ -98,6 +98,13 @@ var crawl = {
});
}).then(function(localPkg){
if(!skipSettingConfig) {
// When progressively fetching package.jsons, we need to save
// the 'resolutions' so in production we get the *correct*
// version of a dependency.
if(refPkg) {
utils.pkg.saveResolution(context, refPkg, localPkg);
}

// Save package.json!npm load
npmModuleLoad.saveLoadIfNeeded(context);

Expand Down Expand Up @@ -166,7 +173,7 @@ var crawl = {
}, truthy);

return Promise.all(utils.map(needFetching, function(pluginPkg){
return crawl.dep(context, pkg, pluginPkg, isRoot, skipSettingConfig);
return crawl.dep(context, pkg, false, pluginPkg, isRoot, skipSettingConfig);
}));
},
/**
Expand Down
2 changes: 1 addition & 1 deletion ext/npm-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ exports.addExtension = function(System){
return oldNormalize.call(this, name, parentName, parentAddress,
pluginNormalize);
}
return crawl.dep(this.npmContext, parentPkg, depPkg, isRoot)
return crawl.dep(this.npmContext, parentPkg, refPkg, depPkg, isRoot)
.then(createModuleNameAndNormalize);
} else {
return createModuleNameAndNormalize(depPkg);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"saucelabs": "^1.3.0",
"steal-env": "^1.0.0",
"steal-es6-module-loader": "0.17.14",
"steal-npm": "1.0.3",
"steal-npm": "1.0.4",
"steal-qunit": "^1.0.0",
"system-bower": "stealjs/system-bower#v0.2.1",
"system-live-reload": "1.5.3",
Expand Down

0 comments on commit baa2fc2

Please sign in to comment.