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

derby

Package Overview
Dependencies
Maintainers
4
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derby - npm Package Compare versions

Comparing version 0.10.18 to 0.10.19

24

lib/components.js

@@ -347,3 +347,5 @@ /*

function createFactory(constructor) {
return (constructor.prototype.singleton) ?
// DEPRECATED: constructor.prototype.singleton is deprecated. "singleton"
// static property on the constructor is preferred
return (constructor.singleton || constructor.prototype.singleton) ?
new SingletonComponentFactory(constructor) :

@@ -401,6 +403,12 @@ new ComponentFactory(constructor);

function noop() {}
function SingletonComponentFactory(constructor) {
this.constructor = constructor;
this.component = null;
// Disable component from being destroyed, since it is intended to
// be used multiple times
constructor.prototype.destroy = noop;
}
SingletonComponentFactory.prototype.isSingleton = true;
SingletonComponentFactory.prototype.init = function(context) {

@@ -410,4 +418,4 @@ if (!this.component) this.component = new this.constructor();

};
// Don't call the create method for singleton components
SingletonComponentFactory.prototype.create = function() {};
// Don't call the init or create methods for singleton components
SingletonComponentFactory.prototype.create = noop;

@@ -431,2 +439,12 @@ function isBasePrototype(object) {

var rootPrototype = getRootPrototype(constructor.prototype);
// This guard is a workaroud to a bug that has occurred in Chakra when
// app.component() is invoked twice on the same constructor. In that case,
// the `instanceof Component` check in extendComponent incorrectly returns
// false after the prototype has already been set to `Component.prototype`.
// Then, this code proceeds to set the prototype of Component.prototype
// to itself, which throws a "Cyclic __proto__ value" error.
// https://github.com/Microsoft/ChakraCore/issues/5915
if (rootPrototype === Component.prototype) return;
// Establish inheritance with the pattern that Node's util.inherits() uses

@@ -433,0 +451,0 @@ // if Object.setPrototypeOf() is available (all modern browsers & IE11).

4

lib/Page.js

@@ -273,5 +273,3 @@ var derbyTemplates = require('derby-templates');

var component = node.$component;
if (component && !component.singleton) {
component.destroy();
}
if (component) component.destroy();
var destroyListeners = node.$destroyListeners;

@@ -278,0 +276,0 @@ if (destroyListeners) {

{
"name": "derby",
"description": "MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers.",
"version": "0.10.18",
"version": "0.10.19",
"homepage": "http://derbyjs.com/",

@@ -6,0 +6,0 @@ "repository": {

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