Comparing version 4.1.2 to 5.0.0
@@ -0,1 +1,7 @@ | ||
### v5.0.0 (2020-09-01): | ||
* Migrated tests from mocha to jest. | ||
* Update default `uuid` type to be case insensitive. | ||
* Replace travis with github actions for CI. | ||
### v4.1.1 (2019-07-04): | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "obey", | ||
"version": "4.1.2", | ||
"version": "5.0.0", | ||
"description": "Data modelling and validation library", | ||
@@ -8,7 +8,7 @@ "main": "src/index.js", | ||
"clean": "rm -rf node_modules", | ||
"test": "snyk test && npm run lint && npm run cover", | ||
"mocha": "node_modules/.bin/_mocha", | ||
"cover": "node_modules/.bin/istanbul cover node_modules/mocha/bin/_mocha", | ||
"test": "snyk test && npm run lint && npm run jest", | ||
"jest": "NODE_PATH=./ RESOURCES_PATH=./src jest --coverage --forceExit --runInBand --colors", | ||
"jest:watch": "NODE_PATH=./ RESOURCES_PATH=./src jest --watchAll --runInBand --colors", | ||
"lint": "standard ./src ./test --fix", | ||
"ci": "npm run lint && npm run cover" | ||
"ci": "npm run lint && npm run jest" | ||
}, | ||
@@ -33,9 +33,4 @@ "keywords": [ | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^5.2.0", | ||
"sinon": "^7.2.2", | ||
"sinon-chai": "^3.3.0", | ||
"snyk": "^1.165.0", | ||
"jest": "^26.4.2", | ||
"snyk": "^1.387.0", | ||
"standard": "^12.0.1" | ||
@@ -45,6 +40,6 @@ }, | ||
"bluebird": "^3.5.3", | ||
"dot-object": "^1.7.1", | ||
"dot-object": "^2.1.3", | ||
"jexl": "^2.1.1", | ||
"lodash": "^4.17.11" | ||
"lodash": "^4.17.20" | ||
} | ||
} |
const uuid = { | ||
_regex: { | ||
default: /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/ | ||
default: /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, | ||
upper: /^[0-9A-F]{8}-[0-9A-F]{4}-[1-5][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/, | ||
lower: /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/, | ||
}, | ||
@@ -9,2 +11,12 @@ default: context => { | ||
} | ||
}, | ||
upper: context => { | ||
if (context.value == null || !context.value.length || !context.value.toString().match(uuid._regex.upper)) { | ||
context.fail('Value must be a valid UUID with all uppercase letters') | ||
} | ||
}, | ||
lower: context => { | ||
if (context.value == null || !context.value.length || !context.value.toString().match(uuid._regex.lower)) { | ||
context.fail('Value must be a valid UUID with all lowercase letters') | ||
} | ||
} | ||
@@ -11,0 +23,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76913
3
928
+ Addedcommander@6.2.1(transitive)
+ Addeddot-object@2.1.5(transitive)
- Removedcommander@2.20.3(transitive)
- Removeddot-object@1.9.0(transitive)
Updateddot-object@^2.1.3
Updatedlodash@^4.17.20