New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wessberg/di-compiler

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wessberg/di-compiler

The compiler for https://www.npmjs.com/package/@wessberg/di

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

DI-Compiler (The compiler for DI) NPM version

The compiler for DI

Installation

Simply do: npm install @wessberg/di-compiler.

Usage

import {compile, getIntro} from "@wessberg/di-compiler";

// The 'compile' method will upgrade all service registrations and 'get' calls
// throughout the code
const compiled = compile(
	"a_file.ts", `
	class Foo implements IFoo {}
	DIContainer.registerSingleton<IFoo, Foo>();
	`);

// The intro is a map between interface names and the constructor arguments
// of their concrete implementations. Should only be injected once in your code
// and at best in top of your bundle.
const intro = getIntro();

Changelog:

v1.0.8:

  • Bumped CodeAnalyzer dependency to ^v1.0.18

v1.0.7:

  • The Compiler will now recursively parse all imports, rather than just one step up.
  • The Compiler will now also check exports in case modules are exported from another file.

v1.0.6:

  • The Compiler will now parse all imports for classes before proceeding.
  • The Compiler will now check if another global constructor arguments map exists and assign to it if it exists instead of overwriting it.

v1.0.5:

  • Bumped CodeAnalyzer dependency to ^v1.0.17
  • Bumped DI dependency to ^v1.0.16
  • has expressions can now be handled.

v1.0.4:

  • Bumped CodeAnalyzer dependency to ^v1.0.11

v1.0.3:

  • Bumped CodeAnalyzer dependency to ^v1.0.10

v1.0.2:

  • Bumped CodeAnalyzer dependency to ^v1.0.9

v1.0.1:

  • Fixed an issue where the found class declarations would be reset for each new file.

v1.0.0:

  • First release.

Keywords

FAQs

Package last updated on 30 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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