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

@contember/dic

Package Overview
Dependencies
Maintainers
5
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/dic - npm Package Compare versions

Comparing version 1.3.0-alpha.1 to 1.3.0-alpha.2

16

dist/src/Container.js

@@ -75,3 +75,5 @@ "use strict";

if (this.level === 0) {
this.setups.forEach(it => it());
const setups = this.setups;
this.setups = [];
setups.forEach(it => it());
}

@@ -90,7 +92,9 @@ return service;

}
this.setups.push(() => {
for (const setup of definition.setup) {
setup(service, accessors);
}
});
if (definition.setup.length > 0) {
this.setups.push(() => {
for (const setup of definition.setup) {
setup(service, accessors);
}
});
}
const service = definition.factory(accessors);

@@ -97,0 +101,0 @@ return service;

{
"name": "@contember/dic",
"version": "1.3.0-alpha.1",
"version": "1.3.0-alpha.2",
"license": "Apache-2.0",

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

@@ -33,3 +33,3 @@ export type ServiceName = string

name: N extends keyof M ? N : 'Service with this name does not exist',
factory: ServiceFactory<M & {inner: T}, T> | ServiceDefinition<M, T>,
factory: ServiceFactory<M & { inner: T }, T> | ServiceDefinition<M, T>,
): Builder<M> {

@@ -106,3 +106,5 @@ const currentFactory = this.factories[name]

if (this.level === 0) {
this.setups.forEach(it => it())
const setups = this.setups
this.setups = []
setups.forEach(it => it())
}

@@ -125,7 +127,9 @@ return service

}
this.setups.push(() => {
for (const setup of definition.setup) {
setup(service, accessors)
}
})
if (definition.setup.length > 0) {
this.setups.push(() => {
for (const setup of definition.setup) {
setup(service, accessors)
}
})
}
const service = definition.factory(accessors)

@@ -132,0 +136,0 @@ return service

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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