@typewirets/inversify 0.2.0-rc.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.2.0
|
|
4
|
-
|
|
5
|
-
- Depends on `@typewirets/core` 0.2.0-rc.1.
|
|
3
|
+
## 0.2.0
|
|
6
4
|
|
|
5
|
+
- Depends on `@typewirets/core` 0.2.0.
|
|
7
6
|
- **Node.js 22 or later is required.** `engines.node` is now `>=22`, because Node.js 20 reached end-of-life on 30 April 2026. CI tests Node.js 22, 24 and 26.
|
|
8
7
|
- **Re-applying a wire after it was resolved builds a fresh value, by design.** The adapter replaces the Inversify binding, and Inversify discards its cached instance, so caching stays Inversify's job. `@typewirets/core`'s `TypeWireContainer` keeps the cached value instead. The README and `bind`'s TSDoc now say so, and a test pins it.
|
|
9
8
|
- **Always `await` `bind` and `apply`.** Inversify 7 has no synchronous unbind, so on an already-bound type the new binding is registered only after the old one is removed. Until then, resolving the type returns the old binding's value.
|
|
@@ -12,9 +11,13 @@
|
|
|
12
11
|
### Also in this release: changes prepared as 0.1.1, which was never published
|
|
13
12
|
|
|
14
13
|
- `InversifyAdapter.bind` now replaces an existing binding for the same type itself, because `@typewirets/core`'s `apply` no longer unbinds before binding. Re-applying a wire still replaces its Inversify binding and discards Inversify's cached instance, as in 0.1.0.
|
|
15
|
-
- Upgrade this adapter together with `@typewirets/core` 0.2.0
|
|
14
|
+
- Upgrade this adapter together with `@typewirets/core` 0.2.0. Adapter 0.1.0 with wires from this core adds a second Inversify binding when a wire is re-applied, because neither side unbinds.
|
|
16
15
|
- **CommonJS `require()` works.** The package is `"type": "module"`, so Node loaded the CommonJS build in `dist/cjs` as an ES module: `require()` from plain Node (TypeScript compiled to CommonJS, ts-node) threw `ReferenceError: exports is not defined`. Bundlers, Jest and ESM `import` were not affected. The build now writes `dist/cjs/package.json` with `{"type":"commonjs"}`.
|
|
17
16
|
|
|
17
|
+
## 0.2.0-rc.1
|
|
18
|
+
|
|
19
|
+
Release candidate for 0.2.0, with the same changes. They are listed under 0.2.0.
|
|
20
|
+
|
|
18
21
|
## 0.1.0
|
|
19
22
|
|
|
20
23
|
- Initial release.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typewirets/inversify",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "InversifyJS adapter for TypeWire dependency injection",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"inversify": "^7.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@typewirets/core": "0.2.0
|
|
57
|
+
"@typewirets/core": "0.2.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "pnpm clean && pnpm --filter '@typewirets/inversify' --parallel '/^build:.*/'",
|