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

dependency-injection-cat

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-injection-cat - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

plugins/typescript/ReportErrorsTypescriptPlugin.js

2

package.json
{
"name": "dependency-injection-cat",
"version": "0.1.5",
"version": "0.1.6",
"main": "index.js",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -9,3 +9,3 @@ "use strict";

default_1.prototype.apply = function (compiler) {
compiler.hooks.afterCompile.tap('Report DI Errors', function (compilation) {
compiler.hooks.thisCompilation.tap('Report DI Errors', function (compilation) {
var message = CompilationContext_1.CompilationContext.getErrorMessage();

@@ -15,3 +15,3 @@ if (message === null) {

}
compilation.errors.push(new CompilationError_1.CompilationError(message));
throw new CompilationError_1.CompilationError(message);
});

@@ -18,0 +18,0 @@ };

@@ -56,3 +56,4 @@ # Dependency Injection Cat

```json
```json5
//tsconfig.json
{

@@ -74,34 +75,36 @@ "compilerOptions": {

module.exports = {
...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
loader: 'babel-loader',
options: {
plugins: [
[
require('dependency-injection-cat/transformers/babel'),
{
//Here is configuration options, see below
}
//...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
loader: 'babel-loader',
options: {
plugins: [
[
require('dependency-injection-cat/transformers/babel'),
{
//Here is configuration options, see below
}
]
]
]
}
}
}
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
}
```
```json5
//tsconfig.json
{
"compilerOptions": {
//Should be specified
"baseUrl": "your base url"
//Should be specified
"baseUrl": "your base url"
}
}
}
```

@@ -118,33 +121,35 @@

module.exports = {
...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
use: {
loader: 'ts-loader',
options: {
getCustomTransformers: (program) => ({
before: [diCatTransformer(program, {
//Here is configuration options, see below
})],
}),
//...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
use: {
loader: 'ts-loader',
options: {
getCustomTransformers: (program) => ({
before: [diCatTransformer(program, {
//Here is configuration options, see below
})],
}),
}
}
}
}
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
}
```
```json5
//tsconfig.json
{
"compilerOptions": {
//Should be specified
"baseUrl": "your base url"
//Should be specified
"baseUrl": "your base url"
}
}
}
```

@@ -160,34 +165,59 @@

module.exports = {
...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
use: {
loader: 'ts-loader',
options: {
compiler: 'ttypescript'
//...
module: {
rules: [
{
test: /\.(t|j)sx?$/,
use: {
loader: 'ts-loader',
options: {
compiler: 'ttypescript'
}
}
}
}
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
},
plugins: [
//Without this plugin, a compilation with DI errors will be successful
new ReportDiErrorsPlugin(),
]
}
```
```json5
//tsconfig.json
{
"compilerOptions": {
//Should be specified
"baseUrl": "your base url",
"plugins": [
{
"transform": "dependency-injection-cat/transformers/typescript",
//Here is configuration options, see below
}
]
//Should be specified
"baseUrl": "your base url",
"plugins": [
{
"transform": "dependency-injection-cat/transformers/typescript",
//Here is configuration options, see below
}
]
}
}
```
#### TTypescript
```json5
//tsconfig.json
{
"compilerOptions": {
//Should be specified
"baseUrl": "your base url",
"plugins": [
{
"transform": "dependency-injection-cat/transformers/typescript",
//Here is configuration options, see below
},
{
"transform": "dependency-injection-cat/plugins/typescript/ReportErrorsTypescriptPlugin"
}
]
}
}

@@ -215,3 +245,3 @@ ```

```typescript
class CatContext<TBeans, TConfig = null>
class CatContext<TBeans, TConfig = null> {}
```

@@ -218,0 +248,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