Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

version conflict report

  • Loading branch information...
commit 3abcfdfb93aaf9f4cb0a2c968ecb48481f515068 2 parents 99ca50c + 02a85e0
@guybedford authored
Showing with 7 additions and 7 deletions.
  1. +5 −5 @.js
  2. +2 −2 README.md
View
10 @.js
@@ -360,7 +360,7 @@ define(['require'], function(req) {
for (var v in loadedVersions[moduleName]) {
haveVersion = v;
if (semver.satisfies(v, versionRange))
- return callback(moduleName, v);
+ return callback(moduleName, v, supportedVersions[supportedVersions.length - 1] == v);
}
}
@@ -373,7 +373,7 @@ define(['require'], function(req) {
self.onVersionConflict(baseName + subPath, versionRange, haveVersion, useVersion);
}
- callback(moduleName, supportedVersions[supportedVersions.length - 1] == useVersion ? '' : useVersion);
+ callback(moduleName, useVersion, supportedVersions[supportedVersions.length - 1] == useVersion);
}
if (build) {
@@ -398,9 +398,9 @@ define(['require'], function(req) {
},
load: function(name, req, load, config) {
var loadedVersions = this.loadedVersions;
- this.getVersion(name, config.isBuild, function(moduleName, version) {
+ this.getVersion(name, config.isBuild, function(moduleName, version, master) {
// load from the expected filename convention
- require([moduleName + (version ? '-' + version : '')], function(m) {
+ require([moduleName + (master ? '' : '-' + version)], function(m) {
loadedVersions[moduleName] = loadedVersions[moduleName] || {};
loadedVersions[moduleName][version] = true;
load(m);
@@ -408,7 +408,7 @@ define(['require'], function(req) {
});
},
write: function(pluginName, name, write) {
- this.getVersion(name, true, function(moduleName, version) {
+ this.getVersion(name, true, function(moduleName, version, master) {
write.asModule(pluginName + '!' + name, "define(['" + moduleName + '-' + version + "'], function(m){ return m; });")
});
}
View
4 README.md
@@ -8,8 +8,8 @@ RequireJS Version Plugin
### Usage
```javascript
define(function(require) {
- var jquery = require('#!jquery ~1.8');
- var csmodule = require('#!cs!csmodule >=2.0 <5');
+ var jquery = require('@!jquery#~1.8');
+ var csmodule = require('@!cs!csmodule#>=2.0 <5');
});
```
Please sign in to comment.
Something went wrong with that request. Please try again.