From a4a7422bd98c7fadeaa4484b6314d582385a7bc2 Mon Sep 17 00:00:00 2001 From: Vadim Popa Date: Mon, 7 Dec 2015 09:21:53 +0200 Subject: [PATCH 1/2] Fixed jspm/npm#101: mathcing more dependency formats for npm --- lib/npm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index 907b1a8..369f0ec 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -254,7 +254,7 @@ NPMLocation.prototype = { // warn if using jspm-style dependencies at this point for (var d in pjson.dependencies) - if (!pjson.dependencies[d].match(/^(https?|git)[:+]/) && pjson.dependencies[d].indexOf(':') > 0) + if (!pjson.dependencies[d].match(/^(https?|git)[:+]|(.)[:\/]/) && pjson.dependencies[d].indexOf(':') > 0) throw 'Package.json dependency %' + d + '% set to `' + pjson.dependencies[d] + '`, which is not a valid dependency format for npm.' + '\nIt\'s advisable to publish jspm-style packages to GitHub or another `registry` so conventions are clear.'; + '\nTo skip npm compatibility install with %jspm install ' + packageName + '-o "{jspmNodeConversion: false}"%.' From 59047bcb2a37a56922942c578c5228c22e39da2a Mon Sep 17 00:00:00 2001 From: Vadim Popa Date: Mon, 7 Dec 2015 09:23:04 +0200 Subject: [PATCH 2/2] Fixed jspm/npm#101: remove optional check --- lib/npm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index 369f0ec..0842210 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -254,7 +254,7 @@ NPMLocation.prototype = { // warn if using jspm-style dependencies at this point for (var d in pjson.dependencies) - if (!pjson.dependencies[d].match(/^(https?|git)[:+]|(.)[:\/]/) && pjson.dependencies[d].indexOf(':') > 0) + if (!pjson.dependencies[d].match(/^(https?|git)[:+]|(.)[:\/]/)) throw 'Package.json dependency %' + d + '% set to `' + pjson.dependencies[d] + '`, which is not a valid dependency format for npm.' + '\nIt\'s advisable to publish jspm-style packages to GitHub or another `registry` so conventions are clear.'; + '\nTo skip npm compatibility install with %jspm install ' + packageName + '-o "{jspmNodeConversion: false}"%.'