mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-20 17:10:11 -05:00
added support for build metadata in Plugin.versionParse
This commit is contained in:
parent
bedf84cacb
commit
8bfaff0cce
1 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ var Common = require('./Common');
|
|||
*/
|
||||
Plugin.dependencyParse = function(dependency) {
|
||||
if (Common.isString(dependency)) {
|
||||
var pattern = /^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/;
|
||||
var pattern = /^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;
|
||||
|
||||
if (!pattern.test(dependency)) {
|
||||
Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.');
|
||||
|
@ -275,7 +275,7 @@ var Common = require('./Common');
|
|||
* @return {object} The version range parsed into its components.
|
||||
*/
|
||||
Plugin.versionParse = function(range) {
|
||||
var pattern = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-]+)?$/;
|
||||
var pattern = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;
|
||||
|
||||
if (!pattern.test(range)) {
|
||||
Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');
|
||||
|
|
Loading…
Add table
Reference in a new issue