Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

obey

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obey - npm Package Compare versions

Comparing version 4.1.2 to 5.0.0

.github/workflows/nodejs.yml

6

CHANGELOG.md

@@ -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 @@

23

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc