You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
php-transformer was split to Packagist in #802 with .github/workflows/php-transformer-split.yml and a .gitattributes that keeps the dist lean. figma-transformer never got the same treatment. It has a package-root composer.json (psr-4 → src/) but no .gitattributes and no split mirror, so there is no published package to install.
Consumers therefore vendor the entire monorepo. static-site-importer/composer.json declares an inline type: package entry pointing at https://github.com/Automattic/blocks-engine/archive/refs/tags/figma-transformer-v0.1.3.zip with psr-4 rooted at figma-transformer/src/.
Measured cost in a shipped product
The published static-site-importer v1.8.1 release asset is 8,191,363 bytes (6.77MB of compressed entries, 28.36MB expanded, 3,080 files). Breaking the archive down by compressed size:
fixtures/ 3095.5KB 1067 files <- Figma test fixtures
php-transformer/ 764.6KB 448 files <- complete duplicate copy, including its tests
packages/ 456.8KB 392 files <- the JS engine
figma-transformer/ 704.8KB 154 files <- the only part anyone installs it for
docs/ scripts/ tests/ CONTEXT.md CONTRIBUTING.md ~54KB
~4.37MB of the 6.77MB compressed package — 63% — is Figma fixtures, a duplicate php-transformer tree, and a JavaScript engine. The duplicate php-transformer copy is 448 files against the real package's 261, because it predates the #802 export-ignore and still carries tests/.
What the consumer actually needs from all of it is one class. The only FigmaTransformer\* reference in SSI's runtime PHP is Compression\ZstdCommandDecoder, in includes/class-static-site-importer-figma-import.php.
Scope
Add figma-transformer/.gitattributes mirroring the php-transformer one: export-ignore tests/, dev tooling, homeboy.json, composer.lock.
Let consumers drop the inline repositories entry and require the real package.
Acceptance
The installed vendor directory contains figma PHP source plus docs/contracts only — no fixtures/, no packages/, no nested php-transformer/.
git archive of the split prefix carries no test or fixture trees.
The figma import path still resolves Compression\ZstdCommandDecoder and the fig fixture e2e passes.
Downstream, the static-site-importer release asset drops below 3MB.
Note for the consumer migration
static-site-importer.php already probes both layouts when bootstrapping — vendor/automattic/blocks-engine-figma-transformer/figma-transformer/figma-transformer.php and .../blocks-engine-figma-transformer/figma-transformer.php. The split package shape is already anticipated by the loader, so the consumer side should be close to a dependency swap.
AI assistance disclosure: this issue was investigated and drafted by Claude Sonnet 4.6 running in Claude Code, operated by @chubes4. The AI inspected blocks-engine at trunk (f8e12d04), static-site-importer at main (52d589f), and the published v1.8.1 release asset, and computed the archive breakdowns quoted above by reading the ZIP central directory. Reviewed by a human before posting.
Problem
php-transformerwas split to Packagist in #802 with.github/workflows/php-transformer-split.ymland a.gitattributesthat keeps the dist lean.figma-transformernever got the same treatment. It has a package-rootcomposer.json(psr-4→src/) but no.gitattributesand no split mirror, so there is no published package to install.Consumers therefore vendor the entire monorepo.
static-site-importer/composer.jsondeclares an inlinetype: packageentry pointing athttps://github.com/Automattic/blocks-engine/archive/refs/tags/figma-transformer-v0.1.3.zipwithpsr-4rooted atfigma-transformer/src/.Measured cost in a shipped product
The published
static-site-importerv1.8.1 release asset is 8,191,363 bytes (6.77MB of compressed entries, 28.36MB expanded, 3,080 files). Breaking the archive down by compressed size:Inside the figma vendor directory:
~4.37MB of the 6.77MB compressed package — 63% — is Figma fixtures, a duplicate php-transformer tree, and a JavaScript engine. The duplicate php-transformer copy is 448 files against the real package's 261, because it predates the #802 export-ignore and still carries
tests/.What the consumer actually needs from all of it is one class. The only
FigmaTransformer\*reference in SSI's runtime PHP isCompression\ZstdCommandDecoder, inincludes/class-static-site-importer-figma-import.php.Scope
figma-transformer/.gitattributesmirroring the php-transformer one: export-ignoretests/, dev tooling,homeboy.json,composer.lock.figma-transformer, publishingautomattic/blocks-engine-figma-transformerfrom a split repo so the package root isfigma-transformer/rather than the monorepo root.repositoriesentry and require the real package.Acceptance
docs/contractsonly — nofixtures/, nopackages/, no nestedphp-transformer/.git archiveof the split prefix carries no test or fixture trees.Compression\ZstdCommandDecoderand the fig fixture e2e passes.static-site-importerrelease asset drops below 3MB.Note for the consumer migration
static-site-importer.phpalready probes both layouts when bootstrapping —vendor/automattic/blocks-engine-figma-transformer/figma-transformer/figma-transformer.phpand.../blocks-engine-figma-transformer/figma-transformer.php. The split package shape is already anticipated by the loader, so the consumer side should be close to a dependency swap.Downstream tracker: Automattic/static-site-importer#1397. Sibling packaging cleanup for php-transformer: #1359.
AI assistance disclosure: this issue was investigated and drafted by Claude Sonnet 4.6 running in Claude Code, operated by @chubes4. The AI inspected
blocks-engineattrunk(f8e12d04),static-site-importeratmain(52d589f), and the published v1.8.1 release asset, and computed the archive breakdowns quoted above by reading the ZIP central directory. Reviewed by a human before posting.