Update vendors.

Former-commit-id: a2830d4097d13884391abe792c319bf1e699df08
This commit is contained in:
John-David Dalton
2013-08-21 22:03:31 -07:00
parent 3297c3a2e2
commit aec3318f4c
3 changed files with 134 additions and 121 deletions

View File

@@ -13,7 +13,7 @@
(function (global) {
//"use strict"; don't restore this until the config routine is refactored
var
version = '0.7.4',
version = '0.7.6',
curlName = 'curl',
defineName = 'define',
runModuleAttr = 'data-curl-run',
@@ -303,15 +303,32 @@
// functions that dependencies will use:
function toAbsId (childId) {
return core.toAbsId(childId, def.id, cfg);
function toAbsId (childId, checkPlugins) {
var absId, parts, plugin;
absId = core.toAbsId(childId, def.id, cfg);
if (!checkPlugins) return absId;
parts = pluginParts(absId);
if (!parts.pluginId) return absId;
plugin = cache[parts.pluginId];
// check if plugin supports the normalize method
if ('normalize' in plugin) {
// note: dojo/has may return falsey values (0, actually)
parts.resourceId = plugin['normalize'](parts.resourceId, toAbsId, def.config) || '';
}
else {
parts.resourceId = toAbsId(parts.resourceId);
}
return parts.pluginId + '!' + parts.resourceId;
}
function toUrl (n) {
// the AMD spec states that we should not append an extension
// in this function since it could already be appended.
// we need to use toAbsId in case this is a module id.
return core.resolvePathInfo(toAbsId(n), cfg).url;
return core.resolvePathInfo(toAbsId(n, true), cfg).url;
}
function localRequire (ids, callback, errback) {
@@ -327,7 +344,7 @@
throw new Error('require(id, callback) not allowed');
}
// return resource
rvid = toAbsId(ids);
rvid = toAbsId(ids, true);
childDef = cache[rvid];
if (!(rvid in cache)) {
// this should only happen when devs attempt their own