New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

skhema

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skhema - npm Package Compare versions

Comparing version 5.2.8 to 5.2.9-skhema-enum-failure-19a97f9bcf56abdff86747e18731da2f7161d1bf

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## 5.2.9 - 2019-12-02
* Add test to show .filter() not working correctly [StefKors]
## 5.2.8 - 2019-11-27

@@ -9,0 +13,0 @@

2

package.json
{
"name": "skhema",
"version": "5.2.8",
"version": "5.2.9-skhema-enum-failure-19a97f9bcf56abdff86747e18731da2f7161d1bf",
"description": "JSON Schema utility collection",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1046,2 +1046,55 @@ /*

ava.test('.filter() should correctly handle "enums" without modifing them', (test) => {
// Comment
const element = {
id: 'ccdca138-e686-486c-a5df-6661be1102a9',
slug: 'support-thread-test-thread-10eb964c-70e6-4a50-a0d6-364111416cdd',
type: 'support-thread',
active: true,
version: '1.0.0',
name: 'test thread',
tags: [],
markers: [],
created_at: '2019-12-02T11:38:44.949Z',
links: {},
requires: [],
capabilities: [],
data: {
status: 'open'
},
updated_at: null,
linked_at: {
'has attached element': '2019-12-02T11:38:45.071Z'
}
}
const schema = {
type: 'object',
anyOf: [
{
type: 'object',
properties: {
type: {
type: 'string',
enum: [
'support-thread'
]
}
}
}
],
properties: {
type: {
enum: [
'message'
]
}
}
}
const result = skhema.filter(schema, element)
test.deepEqual(result, null)
})
ava.test('.filter() should correctly handle "enum" inside "anyOf" with a non matching element', (test) => {

@@ -1048,0 +1101,0 @@ const element = {

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