Skip to content

Commit

Permalink
maping fix, config ordering fix, beta.12
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Oct 22, 2014
1 parent b704e6f commit 6e25a6b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ exports.compileDir = function(dir, options) {
else if (format == 'cjs') {
source = source.replace(cjsRequireRegEx, function(statement, singleString, doubleString) {
var name = singleString || doubleString;
name = name.substr(1, name.length - 2);
var mapped = applyMap(name, map, relFile, options.removeJSExtensions);

if (!mapped)
Expand Down
3 changes: 2 additions & 1 deletion lib/config/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ PackageJSON.prototype.write = function() {
if (!hasProperties(pjson.map))
delete pjson.map;

// reuse existing package.json dependencies if possible to maintain ordering
pjson.dependencies = {};
var depValue;
for (var d in this.dependencies) {
var dep = this.dependencies[d];
if (!dep)
continue;
var regName;
// github:some/thing: x.y.z
if (d == dep.name)
Expand Down
2 changes: 1 addition & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function removePackage(name) {

// remove from config.pjson.dependencies
if (config.pjson.dependencies[name] && (removed = true))
delete config.pjson.dependencies[name];
config.pjson.dependencies[name] = undefined;

if (!config.loader.baseMap[name])
return removed;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jspm",
"description": "",
"version": "0.8.0-beta.11",
"version": "0.8.0-beta.12",
"main": "./api.js",
"author": "",
"dependencies": {
Expand Down

0 comments on commit 6e25a6b

Please sign in to comment.