Releases: Snapchat/ts-inject
v1.0.0
What's Changed
- Make Container.provides() chain O(N) instead of O(N²) by @kburov-sc in #19
Highlights
First 1.0 release. The Container / PartialContainer engine was rewritten for asymptotic correctness. Most consumers won't need code changes — see Behavior change below if your code reads from a parent container after forking a child.
Behavior change
- Parent containers are now self-consistent snapshots after a fork. Previously, building a child container
Cfrom parentBmutatedB's factories so thatb.get('svc')after the fork could resolve dependencies throughC. Nowb.get('svc')always resolves throughbitself. Sibling-fork isolation across resolved services still requirescopy(['token']), unchanged.
Performance
Long Container.provides() / PartialContainer.provides() chains were O(N²); they're now O(N), and Container.get() is O(1) per lookup regardless of chain depth.
| N services | Container chain construction | PartialContainer chain construction |
|---|---|---|
| 800 | 32ms → 4ms | 14ms → 3ms |
| 8000 | 10.3s → 0.5s | 5.2s → 0.5s |
Hot read-path full sweep on an 800-deep chain drops ~27× (1.9 ms → 0.07 ms). Details and reproduction: benchmarks/INVESTIGATION.md (npm run bench).
Full Changelog: v0.4.0...v1.0.0
v1.0.0-alpha.1
Test OIDC
v0.4.0
What's Changed
- Shift docs focus to streamlined providesValue/providesClass APIs by @kburov-sc in #17
- Add inline (token, factory) overloads to provides() and append() by @kburov-sc in #18
Full Changelog: v0.3.2...v0.4.0
v0.3.2
What's Changed
- Fix published provideClass return type inference. by @kburov-sc in #14
Full Changelog: v0.3.1...v0.3.2
Improved docs
v0.3.0
What's Changed
- Make ClassInjectable infer dependency types. Update docs with an example that compiles. by @kburov-sc in #9
- Added InjectableCompat by @mikalai-snap in #11
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- Partial container API improvements by @kburov-sc in #6
Full Changelog: v0.1.2...v0.2.0
v0.1.2
Npmjs source link
Full Changelog: v0.1.1...v0.1.2-alpha.1
v0.2.0-alpha.1
Full Changelog: v0.1.1...v0.2.0-alpha.1