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

@zeit/schemas

Package Overview
Dependencies
Maintainers
185
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeit/schemas - npm Package Compare versions

Comparing version 2.22.0 to 2.23.0

2

package.json
{
"name": "@zeit/schemas",
"version": "2.22.0",
"version": "2.23.0",
"description": "All schemas used for validation that are shared between our projects",

@@ -5,0 +5,0 @@ "scripts": {

@@ -333,12 +333,12 @@ /* eslint camelcase: 0 */

exports.test_dismissedToasts_valid = () => {
assert(ajv.validate(User, { dismissedToasts: {} }));
assert(ajv.validate(User, { dismissedToasts: [] }));
};
exports.test_dismissedToasts_valid = () => {
assert(ajv.validate(User, { dismissedToasts: { exampleToast: { exampleScopeId: 1656442351576 } } }));
assert(ajv.validate(User, { dismissedToasts: [{ name: ' exampleToast', dismissals: [{ scopeId: 'exampleScopeId', createdAt: 1656442351576 }] }] }));
};
exports.test_dismissedToasts_valid = () => {
const isValid = ajv.validate(User, { dismissedToasts: []});
exports.test_dismissedToasts_invalid = () => {
const isValid = ajv.validate(User, { dismissedToasts: [{ name: ' exampleToast', dismissals: [] }] });
assert.strictEqual(isValid, false);
};

@@ -148,11 +148,26 @@ const Username = {

const ToastDismissal = {
type: 'object',
properties: {
scopeId: {
type: 'string'
},
createdAt: {
type: 'number'
}
},
additionalProperties: false
};
// Record<ToastName, Record<Scope, Date>>
const DismissedToasts = {
const DismissedToast = {
type: 'object',
patternProperties: {
'^.*$': {
'^.*$': {
type: 'number'
}
properties: {
name: {
type: 'string'
},
dismissals: {
type: 'array',
minItems: 1,
maxItems: 50,
items: ToastDismissal
}

@@ -163,2 +178,10 @@ },

const DismissedToasts = {
type: 'array',
minItems: 0,
maxItems: 50,
items: DismissedToast,
additionalProperties: false
};
const User = {

@@ -165,0 +188,0 @@ type: 'object',

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