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

incarnate

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

incarnate - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

2

package.json
{
"name": "incarnate",
"version": "5.0.0",
"version": "5.1.0",
"description": "Dependency Injection (DI) with Lifecycle features for JavaScript.",

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

@@ -50,2 +50,8 @@ /**

strict;
/**
* Always call the `factory` when calling `getPath`, even if there is an existing value.
* @type {boolean}
* */
noCache;
}

@@ -6,2 +6,11 @@ import HashMatrix from './HashMatrix';

const STANDARD_DEPENDENCY_NAMES = {
GLOBAL: 'GLOBAL'
};
const STANDARD_DEPENDENCIES = {
[STANDARD_DEPENDENCY_NAMES.GLOBAL]: {
factory: () => window || global
}
};
/**

@@ -13,2 +22,9 @@ * Manage the lifecycle of application dependencies.

static DEFAULT_NAME = 'Incarnate';
/**
* The names of the dependencies supplied with a standard instance of `Incarnate`.
* @type {Object.<string>}
* */
static STANDARD_DEPENDENCY_NAMES = STANDARD_DEPENDENCY_NAMES;
static ERRORS = {

@@ -38,9 +54,10 @@ UNSATISFIED_SHARED_DEPENDENCY: 'UNSATISFIED_SHARED_DEPENDENCY'

if (!(this.subMap instanceof Object)) {
this.subMap = {};
}
if (!(this.hashMatrix instanceof Object)) {
this.hashMatrix = {};
}
this.subMap = {
...STANDARD_DEPENDENCIES,
...this.subMap
};
}

@@ -47,0 +64,0 @@

@@ -78,2 +78,8 @@ import DependencyDeclaration from './DependencyDeclaration';

/**
* Always call the `factory` when calling `getPath`, even if there is an existing value.
* @type {boolean}
* */
noCache;
/**
* @param {DependencyDeclaration} dependencyDeclaration The `DependencyDeclaration` to be resolved.

@@ -198,3 +204,3 @@ * */

if (typeof directValue === 'undefined') {
if (typeof directValue === 'undefined' || this.noCache) {
const resolvedDirectValue = this.resolve();

@@ -201,0 +207,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