Repository navigation
Give every build variant its own dist subdirectory - #3605
Merged
Merged
Conversation
goastler
force-pushed
the
dist-variant-dirs
branch
from
October 24, 2026 01:55
6530886 to
2b57a36
Compare
goastler
marked this pull request as ready for review
October 24, 2026 01:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed: each kind of build output now gets its own folder under
dist/, its own npm script and its own turbo task. Before, everything was written straight intodist/.dist/esmbuild:esmdist/cjsbuild:cjsdist/types.d.tsonlybuild:types(wastypecheck)dist/tsctsc --buildbuild:tscdist/bundle,dist/bundle-webpackbundle,bundle:iife,bundle:webpackdist/nativebuild:nativebuildis now just a turbo task that runsbuild:esm,build:typesandbuild:native.main/types/exportsin every package point at the new folders..nodefiles are no longer committed.build:nativemakes them: a debug build normally, the fully optimised LTO build whenNODE_ENV=production. Building the native packages now needs a Rust toolchain.Effect: imports work as before, because they go through package exports. Anything that hard-coded a
dist/...path has been updated: Dockerfiles, the CLI bundle's native-file copying, locale catalogue lookup, the client-bundle-example deploy path and the locales workflow. Deep imports intodist/from outside the repo would need updating.Code that found the repo root or the dev TLS certs by counting
../from its own file (provider API, client example server,@prosopo/workspace, the self-hosted env script) now starts from its package folder, using a newpackageDirhelper in@prosopo/util/node. Otherwise it would have looked one folder too low now that builds sit indist/esm.Pairs with prosopo/fingerprintjs#12, which makes the same change in the fingerprintjs submodule.
Tests:
turbo run build, all tasks greendist/esmanddist/nativefolders restored from cachebuild:tscandbuild:cjspackageDir; updated the cert-lookup test in client-example-server.