Skip to content

Commit 8830a06

Browse files
committed
snapshot
1 parent 24fc3a7 commit 8830a06

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

dist/r.js

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.0.1+ Sat, 09 Jun 2012 05:20:58 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.0.1+ Sat, 09 Jun 2012 18:38:26 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -20,7 +20,7 @@ var requirejs, require, define;
2020

2121
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
2222
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode,
23-
version = '2.0.1+ Sat, 09 Jun 2012 05:20:58 GMT',
23+
version = '2.0.1+ Sat, 09 Jun 2012 18:38:26 GMT',
2424
jsSuffixRegExp = /\.js$/,
2525
commandOption = '',
2626
useLibLoaded = {},
@@ -16312,7 +16312,11 @@ function (lang, logger, file, parse, optimize, pragma,
1631216312
errMessage = '',
1631316313
failedPluginMap = {},
1631416314
failedPluginIds = [],
16315-
errIds = [];
16315+
errIds = [],
16316+
errUrlMap = {},
16317+
errUrlConflicts = {},
16318+
hasErrUrl = false,
16319+
errUrl, prop;
1631616320

1631716321
//Reset some state set up in requirePatch.js, and clean up require's
1631816322
//current context.
@@ -16358,6 +16362,21 @@ function (lang, logger, file, parse, optimize, pragma,
1635816362
if (registry.hasOwnProperty(id) && id.indexOf('_@r') !== 0) {
1635916363
if (id.indexOf('_unnormalized') === -1) {
1636016364
errIds.push(id);
16365+
errUrl = registry[id].map.url;
16366+
16367+
if (errUrlMap[errUrl]) {
16368+
hasErrUrl = true;
16369+
//This error module has the same URL as another
16370+
//error module, could be misconfiguration.
16371+
if (!errUrlConflicts[errUrl]) {
16372+
errUrlConflicts[errUrl] = [];
16373+
//Store the original module that had the same URL.
16374+
errUrlConflicts[errUrl].push(errUrlMap[errUrl]);
16375+
}
16376+
errUrlConflicts[errUrl].push(id);
16377+
} else {
16378+
errUrlMap[errUrl] = id;
16379+
}
1636116380
}
1636216381

1636316382
//Look for plugins that did not call load()
@@ -16379,6 +16398,18 @@ function (lang, logger, file, parse, optimize, pragma,
1637916398
failedPluginIds.join(', ') + '\n';
1638016399
}
1638116400
errMessage += 'Module loading did not complete for: ' + errIds.join(', ');
16401+
16402+
if (hasErrUrl) {
16403+
errMessage += '\nThe following modules share the same URL. This ' +
16404+
'could be a misconfiguration if that URL only has ' +
16405+
'one anonymous module in it:';
16406+
for (prop in errUrlConflicts) {
16407+
if (errUrlConflicts.hasOwnProperty(prop)) {
16408+
errMessage += '\n' + prop + ': ' +
16409+
errUrlConflicts[prop].join(', ');
16410+
}
16411+
}
16412+
}
1638216413
throw new Error(errMessage);
1638316414
}
1638416415

0 commit comments

Comments
 (0)