Releases: adonisjs/fold
Releases · adonisjs/fold
Adding support for ESM compatible output
Added a new method useEsm
to the IoC container, which will wrap the output of use
inside an object, which is compatible with ESM module.
ioc.bind('App/Foo', () => {
return 'foo'
})
ioc.use('App/Foo') // 'foo'
ioc.useEsm('App/Foo') // { default: 'foo', __esModule: true }
Moving to Typescript
Finally, the entire codebase has been moved to Typescript with handful of tweaks to the existing logic. Following are big highlights
Features
- Support for method injection using the Typescript
inject
decorator. - Support for tracer that emits the sequence in which values are read from the container.
Fixes
Ioc.fake
now uses the Proxy to have fake work even modules are cached inside Node.js require cache.
Commits
- chore: add reflect-metadata as types to tsconfig.json file e5bdaf6
- docs(readme): add link to api docs a337f26
- chore: move reflect-metadata to dev dependency 0050393
- docs: use markdown plugin for api docs cf25416
- docs: add api docs 9f9c27a
- docs(readme): add usage docs cb60c16
- feat: add support for method injection 7b6085d
- refactor: cleanup code 7da84ae
- feat: implement ioc container 43f6eac
- feat: restart project in typescript 97fcc5f
- fix: package.json & package-lock.json to reduce vulnerabilities (#16) 4a3d453
- chore(package): update files to publish on npm 7d65b63
- chore: remove legacy bin folder to run tests 68b4693
Release 3.0.3
- Add support for
fakes
. Fakes can be used to fake a module when running tests and restore it later to the original value. - Emit lifecycle events. Following events will be emitted
bind:provider - When a provider is binded
provider:resolved - When a provider is resolved via Ioc.use
or Ioc.make
module:resolved - When a module is resolved via Ioc.use
or Ioc.make
extend:provider - When a provider is extended
bind:autoload - When autoloading directory and namespace is set
bind:alias - When a namespace alias is registered
providers:registered - When all providers have been registered
providers:booted - When all providers have been booted