Skip to content

Releases: Snapchat/ts-inject

v1.0.0

20 May 20:53
9616a63

Choose a tag to compare

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 C from parent B mutated B's factories so that b.get('svc') after the fork could resolve dependencies through C. Now b.get('svc') always resolves through b itself. Sibling-fork isolation across resolved services still requires copy(['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

20 May 20:50
9616a63

Choose a tag to compare

v1.0.0-alpha.1 Pre-release
Pre-release

Test OIDC

v0.4.0

11 Mar 00:54
1972233

Choose a tag to compare

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

28 Nov 06:40
5b2c728

Choose a tag to compare

What's Changed

  • Fix published provideClass return type inference. by @kburov-sc in #14

Full Changelog: v0.3.1...v0.3.2

Improved docs

20 Nov 22:48
44b4588

Choose a tag to compare

What's Changed

  • Improved docs by @mikalai-snap in #13

Full Changelog: v0.3.0...v0.3.1

v0.3.0

04 Nov 14:00
bb78e35

Choose a tag to compare

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

19 Sep 14:02
d716d2a

Choose a tag to compare

What's Changed

Full Changelog: v0.1.2...v0.2.0

v0.1.2

09 Sep 14:11
3346f61

Choose a tag to compare

What's Changed

Full Changelog: v0.1.1...v0.1.2

Npmjs source link

09 Sep 03:08

Choose a tag to compare

Npmjs source link Pre-release
Pre-release

Full Changelog: v0.1.1...v0.1.2-alpha.1

v0.2.0-alpha.1

08 Sep 23:09

Choose a tag to compare

v0.2.0-alpha.1 Pre-release
Pre-release

Full Changelog: v0.1.1...v0.2.0-alpha.1