Skip to content

chore(stdlib): depend on @webiny/di 2.0 - #46

Merged
adrians5j merged 1 commit into
mainfrom
chore/webiny-di-2
Oct 9, 2026
Merged

adrians5j merged 1 commit into
mainfrom
chore/webiny-di-2

Conversation

@adrians5j

Copy link
Copy Markdown
Member

Moves @webiny/di from ^1.1.0 to ^2.0.0.

Why

Webiny is moving to @webiny/di 2.0 (webiny/di#19). That release changes how singletons are built across child containers and adds inContainerScope().

stdlib's abstractions are typed against its own copy of @webiny/di, and TypeScript treats a 1.x Abstraction and a 2.x one as different types. So Webiny packages that register stdlib features stop type-checking until stdlib moves to 2.0 as well. For example, api-sync-to-opensearch passes stdlib's Env as a dependency.

Release

The changeset is a patch (0.0.21). Consumers pin stdlib with ^0.0.x ranges, and ^0.0.17 matches only 0.0.17, so nobody picks this up without bumping on purpose. The changeset notes that stdlib now targets @webiny/di 2.x.

Checks

  • The full pre-commit chain passes on @webiny/di 2.0: adio, format, lint, typecheck, build, and test:coverage (519 tests). None of stdlib's singletons rely on the old behaviour.
  • I tested it against webiny-js, using a branch with @webiny/di ^2.0.0 and this build of stdlib:
    • the full webiny-js build passes;
    • api-sync-to-opensearch (4 tests) and api-sync-pg-to-opensearch (6) pass;
    • api-sync-ddb-to-opensearch passes except one test that needs a real OpenSearch, which wasn't available locally.

After merge

Once 0.0.21 is published, webiny-js bumps @webiny/stdlib to ^0.0.21 in the same PR as @webiny/di ^2.0.0.

Workspace: wby-next11 · STORAGE PER REQ

🤖 Generated with Claude Code

Webiny moves to @webiny/di 2.0, which changes how singletons are built
across child containers. stdlib's abstractions are typed against its own
@webiny/di copy, and TypeScript treats a 1.x Abstraction and a 2.x one as
different types, so Webiny packages that register stdlib features stop
type-checking until stdlib moves too.

Released as a 0.0.x patch: consumers pin stdlib with ^0.0.x ranges, which
match a single version, so nobody picks this up without bumping on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adrians5j
adrians5j merged commit d0ca623 into main Oct 9, 2026
16 checks passed
@adrians5j
adrians5j deleted the chore/webiny-di-2 branch October 9, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant