Skip to content

Commit

Permalink
Merge pull request #1184 from stealjs/copy-versions-to-local
Browse files Browse the repository at this point in the history
Copy `versions` to local loader
  • Loading branch information
matthewp authored May 2, 2017
2 parents 933bd12 + 1772e27 commit 57e2ede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ext/npm-convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function convertToPackage(context, npmPkg, index) {
var nameAndVersion = pkg.name+"@"+pkg.version;
var localPkg;
if(!packages[nameAndVersion]) {
crawl.setVersionsConfig(context, pkg, pkg.version);
if(pkg.browser){
delete pkg.browser.transform;
}
Expand Down
5 changes: 4 additions & 1 deletion ext/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ exports.translate = function(load){

var resavePackageInfo = isNode && loader.isEnv &&
!loader.isEnv("production");

var prevPackages = loader.npmContext && loader.npmContext.pkgInfo;
var versions = loader.npmContext && loader.npmContext.versions;

var context = {
packages: [],
pkgInfo: [],
Expand All @@ -33,7 +36,7 @@ exports.translate = function(load){
paths: {},
// paths that are currently be loaded
loadingPaths: {},
versions: {},
versions: utils.extend({}, versions),
// A map of packages to its parents. This is used so that
// we can find a package by name and get its parent packages,
// in order to load bare module specifiers that refer to packages
Expand Down

0 comments on commit 57e2ede

Please sign in to comment.