Code Monkey home page Code Monkey logo

ioc-container's People

Contributors

goodluckhf avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ukitgroup

ioc-container's Issues

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 12.12.1 to 12.12.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Wrong behavior when autoFactory is missing in provider definition

Manifest for reproduction:

[
  {
    token: 'Foo',
    useClass: class {}
  },
  {
    token: 'Bar',
    useClass: class { constructor(Foo) { this.foo = new Foo(); } },
    dependencies: [['Foo', { autoFactory: true }]],
  }
]

In this case, to Bar constructor will be injected an instance of class Foo. As you can remember when we discuss autoFactory implementation I mention this case. There are two possible approaches: silently create a proxy for class Foo or throw validation error. I prefer the first approach because sometimes we want to use a class as autoFactory or sometimes as instance directly from the container (to reduce boilerplate). Generally, as I said, autoFactory should be controlled from the injection plane.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot 📦🚀

useFactory not work without dependencies field

When provider definition contain useFactory without dependencies container compile will fail:

/workdir/node_modules/@ukitgroup/ioc/dist/instance-wrappers/factory-instance-wrapper.js:23
        const resolvedDependencies = this.dependencies.map(dependencyResolver);
                                                       ^

TypeError: Cannot read property 'map' of undefined
    at FactoryInstanceWrapper.createInstance (/workdir/node_modules/@ukitgroup/ioc/dist/instance-wrappers/factory-instance-wrapper.js:23:56)
    at Injector.resolveProvider (/workdir/node_modules/@ukitgroup/ioc/dist/injector.js:46:18)
    at moduleForResolve.getProviders.forEach.provider (/workdir/node_modules/@ukitgroup/ioc/dist/injector.js:19:18)
    at Array.forEach (<anonymous>)
    at Injector.resolveModule (/workdir/node_modules/@ukitgroup/ioc/dist/injector.js:18:41)
    at modules.forEach.currentModule (/workdir/node_modules/@ukitgroup/ioc/dist/injector.js:14:18)
    at Map.forEach (<anonymous>)
    at Injector.resolveGraph (/workdir/node_modules/@ukitgroup/ioc/dist/injector.js:13:22)
    at Container.compile (/workdir/node_modules/@ukitgroup/ioc/dist/container.js:45:18)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/gleb/110/model/domain/connect.js:5:25)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

Provider definition:

{
  token: 'AwesomeProviderForLegacyCode',
  useFactory: () => {
    const feature = require('../legacy/feature');
    if (feature.enabled) {
      return feature;
    }
    return require('../legacy/feature/fallback');
  },
}

I think this case should be cover by validation and by default [] for dependencies.

An in-range update of semantic-release is breaking the build 🚨

The devDependency semantic-release was updated from 15.13.32 to 15.14.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v15.14.0

15.14.0 (2019-12-21)

Features

  • pass envi-ci values to plugins context (a8c747d)
Commits

The new version differs by 2 commits.

  • a8c747d feat: pass envi-ci values to plugins context
  • fc70726 chore: add Mockserver generated file to gitignore

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 6.7.2 to 6.8.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.8.0
  • c5c7086 Fix: ignore aligning single line in key-spacing (fixes #11414) (#12652) (YeonJuan)
  • 9986d9e Chore: add object option test cases in yield-star-spacing (#12679) (YeonJuan)
  • 1713d07 New: Add no-error-on-unmatched-pattern flag (fixes #10587) (#12377) (ncraley)
  • 5c25a26 Update: autofix bug in lines-between-class-members (fixes #12391) (#12632) (YeonJuan)
  • 4b3cc5c Chore: enable prefer-regex-literals in eslint codebase (#12268) (薛定谔的猫)
  • 05faebb Update: improve suggestion testing experience (#12602) (Brad Zacher)
  • 05f7dd5 Update: Add suggestions for no-unsafe-negation (fixes #12591) (#12609) (Milos Djermanovic)
  • d3e43f1 Docs: Update no-multi-assign explanation (#12615) (Yuping Zuo)
  • 272e4db Fix: no-multiple-empty-lines: Adjust reported loc (#12594) (Tobias Bieniek)
  • a258039 Fix: no-restricted-imports schema allows multiple paths/patterns objects (#12639) (Milos Djermanovic)
  • 51f9620 Fix: improve report location for array-bracket-spacing (#12653) (Milos Djermanovic)
  • 45364af Fix: prefer-numeric-literals doesn't check types of literal arguments (#12655) (Milos Djermanovic)
  • e3c570e Docs: Add example for expression option (#12694) (Arnaud Barré)
  • 6b774ef Docs: Add spacing in comments for no-console rule (#12696) (Nikki Nikkhoui)
  • 7171fca Chore: refactor regex in config comment parser (#12662) (Milos Djermanovic)
  • 1600648 Update: Allow $schema in config (#12612) (Yordis Prieto)
  • acc0e47 Update: support .eslintrc.cjs (refs eslint/rfcs#43) (#12321) (Evan Plaice)
  • 49c1658 Chore: remove bundling of ESLint during release (#12676) (Kai Cataldo)
  • 257f3d6 Chore: complete to move to GitHub Actions (#12625) (Toru Nagashima)
  • ab912f0 Docs: 1tbs with allowSingleLine edge cases (refs #12284) (#12314) (Ari Kardasis)
  • dd1c30e Sponsors: Sync README with website (ESLint Jenkins)
  • a230f84 Update: include node version in cache (#12582) (Eric Wang)
  • 8b65f17 Chore: remove references to parser demo (#12644) (Kai Cataldo)
  • e9cef99 Docs: wrap {{}} in raw liquid tags to prevent interpolation (#12643) (Kai Cataldo)
  • e707453 Docs: Fix configuration example in no-restricted-imports (fixes #11717) (#12638) (Milos Djermanovic)
  • 19194ce Chore: Add tests to cover default object options in comma-dangle (#12627) (YeonJuan)
  • 6e36d12 Update: do not recommend require-atomic-updates (refs #11899) (#12599) (Kai Cataldo)
Commits

The new version differs by 29 commits.

  • 9738f8c 6.8.0
  • ba59cbf Build: changelog update for 6.8.0
  • c5c7086 Fix: ignore aligning single line in key-spacing (fixes #11414) (#12652)
  • 9986d9e Chore: add object option test cases in yield-star-spacing (#12679)
  • 1713d07 New: Add no-error-on-unmatched-pattern flag (fixes #10587) (#12377)
  • 5c25a26 Update: autofix bug in lines-between-class-members (fixes #12391) (#12632)
  • 4b3cc5c Chore: enable prefer-regex-literals in eslint codebase (#12268)
  • 05faebb Update: improve suggestion testing experience (#12602)
  • 05f7dd5 Update: Add suggestions for no-unsafe-negation (fixes #12591) (#12609)
  • d3e43f1 Docs: Update no-multi-assign explanation (#12615)
  • 272e4db Fix: no-multiple-empty-lines: Adjust reported loc (#12594)
  • a258039 Fix: no-restricted-imports schema allows multiple paths/patterns objects (#12639)
  • 51f9620 Fix: improve report location for array-bracket-spacing (#12653)
  • 45364af Fix: prefer-numeric-literals doesn't check types of literal arguments (#12655)
  • e3c570e Docs: Add example for expression option (#12694)

There are 29 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.18.2 to 2.19.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 46 commits.

  • 9b76635 Bump to v2.19.0
  • 47a232e [resolvers/webpack] v0.12.0
  • 26ad476 [resolvers/webpack] [deps] update debug, enhanced-resolve, has, interpret, lodash, resolve, semver
  • 3f0e8f3 [resolvers/node] [Deps] update resolve
  • 7190c3e bump utils to v2.5.0
  • a60e5c6 [New] no-commonjs: add allowConditionalRequire option
  • 414c923 [New] enable passing cwd as an option to eslint-import-resolver-webpack
  • 8224e51 [New] order/no-extraneous-dependencies: Alphabetize imports within groups
  • f12ae59 [New] no-duplicates: add a considerQueryString option to handle false positives when using some webpack loaders.
  • 2d3d045 [fix] importType: Accept '@example' as internal
  • 0426f16 [New] order: add pathGroups option to add support to order by paths
  • 99b3fbf [Fix] no-extraneous-dependencies: Add support for export from
  • 21bf8c6 [Fix] no-cycle: should not warn for Flow imports
  • 0cd5e43 [Fix] no-unused-modules: fix crash due to export *
  • 05085bb [flow] no-unused-modules: add flow type support

There are 46 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 12.6.9 to 12.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @typescript-eslint/parser is breaking the build 🚨

The devDependency @typescript-eslint/parser was updated from 2.3.3 to 2.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/parser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.4.0

2.4.0 (2019-10-14)

Bug Fixes

  • eslint-plugin: [promise-function-async] Should not report… (#1023) (514bed9)
  • support long running "watch" lint sessions (#973) (854620e)

Features

  • typescript-estree: support for parsing 3.7 features (#1045) (623febf)
Commits

The new version differs by 8 commits.

  • 111ecc6 chore: publish v2.4.0
  • 623febf feat(typescript-estree): support for parsing 3.7 features (#1045)
  • 854620e fix: support long running "watch" lint sessions (#973)
  • fec73b0 docs: clarify which versions of ESLint are supported (#1073)
  • 5f92b9f docs: add TOC to root README (#838)
  • 526d336 chore: add test for function types & no-restricted-globals rule (#1055)
  • 514bed9 fix(eslint-plugin): [promise-function-async] Should not report… (#1023)
  • a3f84e1 chore(eslint-plugin): Add missing rule function types (#1047)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Incorrect error message when module not found

If moduleA manifest not loaded into container call of diContainer.get('moduleA', 'Foo') will throw not quite correct error:

NotFoundProviderDefinitionError: Cannot find provider. You didn't define provider in manifest or try use private provider from different module
    at Container.get (/projecthome/node_modules/@ukitgroup/ioc/dist/container.js:55:19)
  name: 'NotFoundProviderDefinitionError',
  message:
   'Cannot find provider. You didn\'t define provider in manifest or try use private provider from different module',
  token: 'Foo'

I think we should throw more verbose and soundness error in this situation - something like "module not found".

[Proposal] More readable way to get entities from container

What's about implement something like this through ES6 Proxy?

diContainer.moduleA.componentFoo // like diContainer.get('moduleA', 'componentFoo');

It's can support object destruction (of course it needs access to providers and modules map inside the container):

const { Bar, moduleA: { componentFoo } } = diContainer;

An in-range update of eslint-config-prettier is breaking the build 🚨

The devDependency eslint-config-prettier was updated from 6.7.0 to 6.8.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 3 commits.

  • d6bf4c0 eslint-config-prettier v6.8.0
  • f2736c2 Update npm packages
  • 4d16ebc Disable @typescript-eslint/no-extra-semi (#129)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-prettier is breaking the build 🚨

The devDependency eslint-plugin-prettier was updated from 3.1.1 to 3.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ts-node is breaking the build 🚨

The devDependency ts-node was updated from 8.6.1 to 8.6.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ts-node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for FIx `yn` Dependency

Fixed

  • Downgrade yn due to node engine (#942)
Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/jest is breaking the build 🚨

The devDependency @types/jest was updated from 24.0.23 to 24.0.24.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.