Skip to content

feat: expose API abstractions from webiny/api root#5080

Merged
adrians5j merged 10 commits intonextfrom
adrian/webiny-root-exports-2026-04-08
Apr 8, 2026
Merged

feat: expose API abstractions from webiny/api root#5080
adrians5j merged 10 commits intonextfrom
adrian/webiny-root-exports-2026-04-08

Conversation

@adrians5j
Copy link
Copy Markdown
Member

@adrians5j adrians5j commented Apr 8, 2026

What changed

Users can now import commonly-used API abstractions like Logger, BuildParams, EventPublisher, KeyValueStore, and DomainEvent directly from the root webiny/api path, instead of from separate sub-paths like webiny/api/logger.

Why

The Webiny API package had scattered exports across many sub-paths, making it harder for users to discover and remember the correct import paths. By exposing the most commonly used abstractions from the root webiny/api entry point, the API becomes simpler and more intuitive to use.

How

  1. Added root exports in packages/api-core/src/exports/api.ts for Logger, BuildParams, EventPublisher, KeyValueStore, and DomainEvent.
  2. Updated the GenerateWebinyPkgCommand pipeline (ParseExportsFileService, MergeExportsService) to propagate @deprecated JSDoc comments to generated sub-path exports, marking the old sub-paths as deprecated with guidance to use webiny/api instead.
  3. Regenerated the webiny package exports via yarn webiny-scripts generate-webiny-package.
  4. Updated skill documentation to reflect the new canonical import paths.

Changelog

Consolidated API Exports to Root: Import commonly used abstractions like Logger, BuildParams, EventPublisher, KeyValueStore, and DomainEvent directly from webiny/api. The old sub-path imports are now marked as deprecated.

Squash Merge Commit

feat: expose API abstractions from webiny/api root

@adrians5j adrians5j added this to the 6.2.0 milestone Apr 8, 2026
@adrians5j adrians5j changed the title adrian/webiny-root-exports-2026-04-02 feat: expose API abstractions from webiny/api root Apr 8, 2026
@adrians5j adrians5j merged commit ae49f08 into next Apr 8, 2026
16 checks passed
@adrians5j adrians5j deleted the adrian/webiny-root-exports-2026-04-08 branch April 8, 2026 09:57
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