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

@tinkoff/dippy

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinkoff/dippy - npm Package Compare versions

Comparing version 0.10.5 to 0.10.6

2

lib/ChildContainer.es.js

@@ -12,3 +12,3 @@ import { createToken } from './createToken/createToken.es.js';

this.root = root;
this.register({ provide: DI_TOKEN, useValue: this });
this.register({ provide: DI_TOKEN, useValue: this, scope: Scope.REQUEST });
this.register({ provide: IS_DI_CHILD_CONTAINER_TOKEN, useValue: true });

@@ -15,0 +15,0 @@ }

@@ -16,3 +16,3 @@ 'use strict';

this.root = root;
this.register({ provide: tokens.DI_TOKEN, useValue: this });
this.register({ provide: tokens.DI_TOKEN, useValue: this, scope: constant.Scope.REQUEST });
this.register({ provide: IS_DI_CHILD_CONTAINER_TOKEN, useValue: true });

@@ -19,0 +19,0 @@ }

@@ -1,2 +0,2 @@

import { Errors, Scope } from './constant.es.js';
import { Scope, Errors } from './constant.es.js';
import { createError } from './createError.es.js';

@@ -83,3 +83,3 @@ import { DI_TOKEN } from './tokens.es.js';

// eslint-disable-next-line max-params
function makeRecord(factory, resolvedDeps, scope, multi, stack) {
function makeRecord(factory, resolvedDeps, scope, multi, stack, staticValue) {
return {

@@ -91,2 +91,3 @@ factory,

stack,
staticValue,
};

@@ -99,2 +100,3 @@ }

let scope = (_a = (provider.provide.isModernToken && provider.provide.options.scope)) !== null && _a !== void 0 ? _a : Scope.REQUEST;
let staticValue = false;
if ('useFactory' in provider) {

@@ -128,2 +130,4 @@ factory = (deps) => provider.useFactory(deps);

factory = () => provider.useValue;
// mark record from useValue as static, useful if we need to find collisions only for dynamic dependencies
staticValue = true;
if (provider.scope) {

@@ -136,3 +140,3 @@ scope = provider.scope;

}
return makeRecord(factory, resolvedDeps, scope, false, provider.__stack);
return makeRecord(factory, resolvedDeps, scope, false, provider.__stack, staticValue);
}

@@ -156,3 +160,3 @@ function providerToValue(provider) {

this.fallback = fallback;
this.register({ provide: DI_TOKEN, useValue: this });
this.register({ provide: DI_TOKEN, useValue: this, scope: Scope.SINGLETON });
}

@@ -159,0 +163,0 @@ get(tokenORObject) {

@@ -8,3 +8,4 @@ import type { Provider, ScopeVariants, ProvideDepsIterator } from './Provider';

stack?: string;
staticValue?: boolean;
}
//# sourceMappingURL=Container.h.d.ts.map

@@ -87,3 +87,3 @@ 'use strict';

// eslint-disable-next-line max-params
function makeRecord(factory, resolvedDeps, scope, multi, stack) {
function makeRecord(factory, resolvedDeps, scope, multi, stack, staticValue) {
return {

@@ -95,2 +95,3 @@ factory,

stack,
staticValue,
};

@@ -103,2 +104,3 @@ }

let scope = (_a = (provider.provide.isModernToken && provider.provide.options.scope)) !== null && _a !== void 0 ? _a : constant.Scope.REQUEST;
let staticValue = false;
if ('useFactory' in provider) {

@@ -132,2 +134,4 @@ factory = (deps) => provider.useFactory(deps);

factory = () => provider.useValue;
// mark record from useValue as static, useful if we need to find collisions only for dynamic dependencies
staticValue = true;
if (provider.scope) {

@@ -140,3 +144,3 @@ scope = provider.scope;

}
return makeRecord(factory, resolvedDeps, scope, false, provider.__stack);
return makeRecord(factory, resolvedDeps, scope, false, provider.__stack, staticValue);
}

@@ -160,3 +164,3 @@ function providerToValue(provider) {

this.fallback = fallback;
this.register({ provide: tokens.DI_TOKEN, useValue: this });
this.register({ provide: tokens.DI_TOKEN, useValue: this, scope: constant.Scope.SINGLETON });
}

@@ -163,0 +167,0 @@ get(tokenORObject) {

{
"name": "@tinkoff/dippy",
"version": "0.10.5",
"version": "0.10.6",
"initialVersion": "0.7.27",

@@ -5,0 +5,0 @@ "description": "",

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