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

systemic

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemic - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

5

CHANGELOG.md
# Changelog
## 4.1.2
- Fix typescript definitions via . Thanks [PR60](https://github.com/guidesmiths/systemic/pull/60). Thanks [teunmooij](https://github.com/teunmooij).
- Remove unused dev deps
## 4.1.1

@@ -4,0 +9,0 @@

27

index.d.ts

@@ -27,3 +27,3 @@ type RequiredKeys<T> = {

* Systemic component that can be added to the systemic system.
* @templace TComponent The type of the component that will be exposed by the systemic system
* @template TComponent The type of the component that will be exposed by the systemic system
* @template TDependencies The type of the dependencies this component depends on

@@ -44,2 +44,21 @@ */

/**
* Systemic component that can be added to the systemic system.
* @template TComponent The type of the component that will be exposed by the systemic system
* @template TDependencies The type of the dependencies this component depends on
*/
export type CallbackComponent<TComponent, TDependencies extends Record<string, unknown> = {}> = {
/**
* Starts this component
* @param {TDependencies} dependencies The dependencies of this component
* @param callback Callback receives the component after it has been built
*/
start: (dependencies: TDependencies, callback: (err: any, component: TComponent) => void) => void;
/**
* Stops this component
* @param callback Callback is called when the component has been stopped
*/
stop?: (callback: (err?: any) => void) => void;
};
type SimpleDependsOnOption<TSystemic> = keyof TSystemic;

@@ -97,3 +116,3 @@ type MappingDependsOnOption<TDependencyKeys, TSystemic> = TDependencyKeys extends keyof TSystemic

name: S extends keyof T ? never : S, // We don't allow duplicate names
component?: Component<TComponent, TDependencies> | TComponent,
component?: Component<TComponent, TDependencies> | CallbackComponent<TComponent, TDependencies> | TComponent,
options?: { scoped?: boolean }

@@ -115,3 +134,3 @@ ) => SystemicBuild<

name: S,
component: Component<TComponent, TDependencies> | TComponent,
component: Component<TComponent, TDependencies> | CallbackComponent<TComponent, TDependencies> | TComponent,
options?: { scoped?: boolean }

@@ -129,3 +148,3 @@ ) => SystemicBuild<

configure: <TComponent, TDependencies extends Record<string, unknown> = {}>(
component: Component<TComponent, TDependencies> | TComponent
component: Component<TComponent, TDependencies> | CallbackComponent<TComponent, TDependencies> | TComponent
) => SystemicBuild<T & { config: TComponent }, TDependencies>;

@@ -132,0 +151,0 @@

3

package.json
{
"name": "systemic",
"version": "4.1.1",
"version": "4.1.2",
"description": "A minimal dependency injection library for node",

@@ -35,3 +35,2 @@ "main": "index.js",

"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",

@@ -38,0 +37,0 @@ "lint-staged": "^12.3.5",

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