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

celebrate

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

celebrate - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

5

lib/index.js

@@ -13,2 +13,3 @@ 'use strict';

Assert.ifError(result.error);
const rules = new Map();

@@ -18,3 +19,3 @@ const keys = Object.keys(schema);

const key = keys[i];
schema[key] = Joi.compile(schema[key]);
rules.set(key, Joi.compile(schema[key]));
}

@@ -24,3 +25,3 @@

return (req, callback) => {
const spec = schema[source];
const spec = rules.get(source);

@@ -27,0 +28,0 @@ if (!spec) {

2

package.json
{
"name": "celebrate",
"version": "5.0.0",
"version": "5.0.1",
"description": "A joi validation middleware for Express.",

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

@@ -12,4 +12,7 @@ ![Celebrate](https://github.com/continuationlabs/celebrate/raw/master/images/logo.png)

`celebrate` uses ["peerDependencies"](https://docs.npmjs.com/files/package.json#peerdependencies) to manage the required version of `joi` it will use. This means that if you're using npm@3, *you must* install a compatible version of `joi` (currently *10.x.x*) as a top level dependency for `celebrate` to work correctly. `celebrate` does *not* install its own copy of `joi` when using npm@3. This is to maximize compatibility and to keep the number of `joi` version mismatch bugs to a minimum.
`celebrate` lists joi as a formal dependency. This means that celebrate will always use a predictable, known version of joi during the validation and compilation steps. There are two reasons for this:
1. To ensure that `celebrate` can always use the latest version of joi as soon as it's published
2. So that `celebrate` can export the version of joi it uses to the consumer to maximize compatibility
Wondering why *another* joi middleware library for Express? Full blog post [here](https://blog.continuation.io/time-to-celebrate/).

@@ -16,0 +19,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