Repository navigation
chore: pnpm task graph, per-package build scripts and CI cleanup - #2119
Merged
Merged
Conversation
…n demand
- Point workspace `exports` at `src` for better-auth, floci, node-utils, pkg
and vite-plugin-copy-editor; generate `publishConfig.exports` with the new
`scripts/sync-package-files.ts` (Effect CLI), which also copies license files
- Split each package build into `build:package` (compile) and `build`
(compile with workspace dependencies via `pnpm -r --filter "{.}..."`)
- Remove turbo; order builds with `tasks` in pnpm-workspace.yaml
- Stop building packages on install; `scripts/ensure-built.ts` rebuilds
cloudflare-runtime / frontend-frameworks only when stale, before tests,
type checking and website builds
- Make alchemy's build incremental (drop `rm -rf lib` + `--force`) and
remove the unused `publish:packages` script
- CI: build explicitly where needed, drop turbo caches, release uses
`build:pkg`, drop the Go heap limit from preview builds
BlankParticle
force-pushed
the
blank/sync-alchemy-package-exports
branch
from
October 7, 2026 11:52
ae61d8d to
0051f25
Compare
Each package's build:package is now node scripts/build.ts, which declares its steps and hands them to scripts/package-build.ts. The shared module syncs publishConfig.exports and license files, runs the steps, writes the .build-stamp for ensure-built, and prints/records per-step timings to .cache/build-timings.jsonl. Replaces sync-package-files.ts and the prebuild/postbuild hooks.
typescript-api aliases a TypeScript dev build whose tsc bin shadowed the typescript catalog compiler in the root and packages/alchemy. Package builds then mixed 7.0.2 and 7.1-dev, each treating the other's tsbuildinfo as out of date; parallel rebuilds of alchemy OOM-killed the preview build. Patch out the bin so tsc is always the catalog compiler.
Contributor
|
Install the packages built from this commit: alchemypnpm install https://pkg.alchemy.run/alchemy/pr:2119:62aed07@alchemy.run (6)pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@alchemy.run/floci/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:2119:62aed07Transitive Dependencies (18)pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/axiom/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/doppler/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/infisical/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/prisma/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/zerossl/pr:2119:62aed07pnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:2119:62aed07Published |
getExePath refuses to resolve the native executable unless package.json declares a tsc bin, which broke lint:providers. Drop that check in the patch.
BlankParticle
force-pushed
the
blank/sync-alchemy-package-exports
branch
from
October 7, 2026 12:31
e805746 to
e67b01e
Compare
…y via pnpm - package-build: spawn through a shell on Windows, where node_modules/.bin entries are .cmd shims - cloudflare-tools: --concurrency was a turbo flag and now reached vitest; set pnpm's workspace-concurrency through the environment instead
- cloudflare-runtime: realpath the preview test's temp root so Windows 8.3 short paths compare equal - check: one Typecheck step (pnpm typecheck) instead of separate builds - test:cloudflare-packages: ensure:built instead of a second full build
- check.yml: Preflight (format check) gates Typecheck (+ providers lint and type-aware oxlint), Tests and Docs, which then run in parallel. - website.yml: one job decides deploy or destroy from the PR state. - typecheck:cloudflare-packages builds via ensure:built, so the Cloudflare Test step reuses it; ensure-built spawns through a shell on Windows.
Split jobs each repeated checkout + install (~50s) and the preflight gate delayed everything by about a minute. One job ordered format check -> typecheck -> providers lint -> oxlint -> tests -> docs fails fast without the repeated setup.
The root tsc -b already covers cloudflare-runtime and frontend-frameworks' sources; pnpm typecheck now also checks frontend-frameworks' tests, so the Cloudflare matrix drops its Typecheck step.
- package-build: print one '[build <pkg>] <step>: <time>' line per step as it finishes, plus start/done lines, so parallel builds stay readable; name the distilled and declaration steps - prepare runs ensure:built again now that it only rebuilds stale packages; drop the website pre* hooks and the website workflow's build step it covers - check.yml: drop the Typecheck comment
Any label started a preview run and, sharing the push run's concurrency group, cancelled it. Skip the job unless the label is force-ci and give label events their own group.
Contributor
Website Preview DeployedURL: https://pr-2119-alchemy-website-preview.testing-2b2.workers.dev Built from commit This comment updates automatically with each push. |
BlankParticle
marked this pull request as ready for review
October 7, 2026 14:22
BlankParticle
added this pull request to stack #2122
October 7, 2026 14:26
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.
Replace turbo with pnpm 12's task graph, give every package its own build script, rebuild the dist-consumed packages only when stale, and tidy the CI workflows.
Packages
Source exports: better-auth, floci, node-utils, pkg and vite-plugin-copy-editor follow alchemy's layout.
exportspoints atsrc;publishConfig.exportsis generated at build time.Per-package build scripts:
build:packageisnode scripts/build.ts, which declares the package's steps and hands them to the sharedscripts/package-build.ts. It syncspublishConfig.exports, copies LICENSE / NOTICE / THIRD_PARTY_LICENSES / README, runs the steps, writes a.build-stamp, and logs per-step timings (also appended to.cache/build-timings.jsonl). Replacescopy-package-files.tsand alchemy's old build script.Builds include dependencies:
buildrunsbuild:packageover the package and its workspace dependencies, sopnpm buildinpackages/alchemybuilds node-utils, cloudflare-runtime, frontend-frameworks, … first. turbo andturbo.jsonare removed.Staleness-aware builds:
pnpm ensure:builtrebuilds cloudflare-runtime / frontend-frameworks only whendist/is missing or older than their (or their workspace dependencies') sources. It runs on install (prepare) and beforepnpm test/pnpm typecheck.Incremental alchemy build:
rm -rf lib && tsc -b --force→tsc -b. The unusedpublish:packagesscript is removed.One
tsceverywhere: a pnpm patch drops thetscbin from thetypescript-apidev build, which shadowed the catalog compiler in the root andpackages/alchemy. Mixed compiler versions made eachtsc -brebuild the other's output, and parallel alchemy rebuilds OOM-killed preview builds.CI
pnpm typecheckin Check (now also covering frontend-frameworks' tests) instead of once per OS. Test concurrency uses pnpm'sworkspace-concurrency; package builds spawn through a shell on Windows.force-cino longer start or cancel runs.release.ymlbuilds withpnpm build:pkg.claude.ymlis removed.