Socket
Socket
Sign inDemoInstall

sdic

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.8.1

7

container.js

@@ -342,2 +342,9 @@ const fs = require('fs');

// flush instances with old dependency
Object.keys(factories).forEach((key) => {
if (factories[key].dependencies.includes(name)) {
delete factories[key].instance;
}
});
container.register(name, fn, opts);

@@ -344,0 +351,0 @@ },

2

package.json
{
"name": "sdic",
"version": "1.8.0",
"version": "1.8.1",
"description": "Simple dependency injection container",

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

@@ -66,2 +66,10 @@ const expect = require('chai').expect;

it('should properly use overrriden module', () => {
container.register('dependencyModule', () => 'original');
container.register('parentModule', (dependencyModule) => dependencyModule);
expect(container.get('parentModule')).to.equal('original');
container.override('dependencyModule', () => 'overriden');
expect(container.get('parentModule')).to.equal('overriden');
});
describe('should be able to handle circular dependencies', () => {

@@ -68,0 +76,0 @@ it('when resolving cache flag', () => {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc