Skip to content

[Storage] Lazy-load git API modules - #3840

Merged
adamziel merged 1 commit into
trunkfrom
stack/pr3725-07-lazy-storage-git-apis
Jun 30, 2026
Merged

[Storage] Lazy-load git API modules#3840
adamziel merged 1 commit into
trunkfrom
stack/pr3725-07-lazy-storage-git-apis

Conversation

@adamziel

@adamziel adamziel commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

What it does

Lazy-loads the git-heavy implementation modules behind the public @wp-playground/storage git APIs.

The exported functions keep the same async API surface, but git-sparse-checkout and git-create-dotgit-directory are loaded only when one of the git APIs is called.

Rationale

This avoids making every browser consumer of @wp-playground/storage pay the git implementation cost up front.

Measured with:

npm exec nx run playground-storage:build:bundle:production
Build Initial index.js Gzip
origin/trunk 363.40 kB 91.87 kB
This branch 25.28 kB 6.77 kB
Change -338.12 kB -85.10 kB

Testing instructions

npx nx run playground-storage:test
npx nx run playground-storage:build
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 79f252f to 9f80af4 Compare June 27, 2026 22:38
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from 31aef8b to 8c232d8 Compare June 27, 2026 22:38
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 9f80af4 to aeb84ed Compare June 27, 2026 23:00
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from 8c232d8 to 82bff3f Compare June 27, 2026 23:00
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from aeb84ed to 0600248 Compare June 27, 2026 23:30
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from 82bff3f to ca6b947 Compare June 27, 2026 23:30
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 0600248 to 0651d8c Compare June 27, 2026 23:56
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from ca6b947 to a178720 Compare June 27, 2026 23:57
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 0651d8c to 129e81c Compare June 28, 2026 00:21
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from a178720 to bc60909 Compare June 28, 2026 00:21
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 129e81c to c9f9c82 Compare June 28, 2026 00:52
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from bc60909 to cecd855 Compare June 28, 2026 00:53
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from c9f9c82 to aab7496 Compare June 28, 2026 01:20
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from cecd855 to 51628b3 Compare June 28, 2026 01:20
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from aab7496 to 6fc3cf0 Compare June 28, 2026 01:56
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from 51628b3 to c1b4da3 Compare June 28, 2026 01:56
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 6fc3cf0 to 939889b Compare June 28, 2026 21:39
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from c1b4da3 to 658c058 Compare June 28, 2026 21:39
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 939889b to e737fe5 Compare June 28, 2026 22:03
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch 2 times, most recently from 1ac9c7e to 4c4568e Compare June 28, 2026 23:19
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch 2 times, most recently from b413091 to 12b9519 Compare June 29, 2026 08:51
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch 2 times, most recently from eaf4bc3 to d300d1c Compare June 29, 2026 15:00
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch 2 times, most recently from 4465b4f to 8e542fc Compare June 30, 2026 09:58
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from d300d1c to 644d191 Compare June 30, 2026 09:58
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 8e542fc to e35c1f3 Compare June 30, 2026 10:07
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch 2 times, most recently from 19690a3 to b62a26e Compare June 30, 2026 11:01
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch 2 times, most recently from 49dae72 to 818eb87 Compare June 30, 2026 11:35
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from b62a26e to 19fe975 Compare June 30, 2026 11:35
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 818eb87 to 48cab9c Compare June 30, 2026 12:16
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from 19fe975 to bfeb6ff Compare June 30, 2026 12:16
@adamziel
adamziel force-pushed the stack/pr3725-06-dotgit-materialization branch from 48cab9c to c4c4a7b Compare June 30, 2026 12:59
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from bfeb6ff to a46ffa5 Compare June 30, 2026 12:59
@adamziel adamziel changed the title Lazy-load storage git APIs Jun 30, 2026
@adamziel
adamziel force-pushed the stack/pr3725-07-lazy-storage-git-apis branch from a46ffa5 to cd62283 Compare June 30, 2026 14:09
@adamziel
adamziel changed the base branch from stack/pr3725-06-dotgit-materialization to trunk June 30, 2026 14:09
@adamziel
adamziel requested review from a team and brandonpayton June 30, 2026 14:09
@adamziel
adamziel merged commit ad08dec into trunk Jun 30, 2026
204 of 206 checks passed
@adamziel
adamziel deleted the stack/pr3725-07-lazy-storage-git-apis branch June 30, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment