♻️ Cross-platform pages commands and unify workspace config#859
Merged
Conversation
- Replace shell command wrappers with Bun scripts - Add safer clean-images reference checks and dry-run support - Document deploy target setup and image cleanup preview
- Wire Bun snapshot updates into external link tracking - Replace shell find usage in pages path tests - Document test:update for refreshing external-links.txt
- Add missing `preview` task to turbo.json (root `bun preview` was failing with "Could not find task") - Split per-package turbo settings into Package Configurations with `extends: ["//"]` so `web#build` inherits `^build` and avoids future internal-dep drift - Move build dependency from `lint` to the type-aware `check` task; rename `lint:check` to `check` and pair with `check:watch` - Make `test` cacheable by default, keeping `cache: false` only for state-dependent `api#test` - Replace broad `globalDependencies: [".env"]` with per-task `env` keys on web build/check - Centralize shared dependency versions via bun catalog (SSOT) - Add lint/format scripts to api, `format:js` to eslint-config, consolidate `engines` to root - Remove dead test scripts from @repo/shared
- Make bun test:update work via UPDATE_SNAPSHOTS env wrapper (bun strips test flags from argv) - Add bun turbo check step to CI and drop stale GA4 env var - Restore .env to turbo globalDependencies so local builds invalidate cache on env change - Exclude generated types from api generate inputs to stabilize cache key - Drop dead outputs from pages test task (validation no longer writes the snapshot) - Harden deploy: drop rsync -u and use cwd + relative source for cross-platform - Guard clean-images run() against spawn failure and match srcset comma references - Align add-size-to-img entrypoint error handling and update stale pages README
- Move the Breaking changes log out of the root README into CHANGELOG.md (curated highlights; GitHub Releases holds the full history), linked from the README - Consolidate root commands into cross-cutting aggregators plus a --filter note, and complete each app command list (add bun format and :watch variants) - Add a command-oriented Workflow to the pages README (dev -> size images -> validate -> clean -> deploy) - Replace the duplicated shared-imports block in the root README with a pointer to packages/shared - Trim per-package READMEs to package-specific content and drop command lists duplicated in the root README - Keep package-unique docs (pages QA details, api CLI/test notes, shared usage examples, web architecture/layer rules) - Fix stale apps/web link in the shared README (../apps/web -> ../../apps/web)
…or cached graph tasks - Present `bun --filter <pkg> <script>` as the primary day-to-day form; demote Turbo to dependency-aware/cached graph tasks (generate via bun --filter, Turbo version kept as the cached option) - Use `bun run <script>` (not bare `bun <script>`) for root scripts: bare `bun build`/`bun test` launch Bun's built-in bundler/test runner instead of the package script - Document scoped graph tasks as `bun turbo run <task> --filter <pkg>` (bare `turbo <task>` clashes with built-ins like `generate`) - Switch CI build/check/test to `turbo run`; standardize --filter on the space form
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
- Replace `bun run clean-images -n` with `--dry-run` everywhere; drop the short alias for CLI consistency - Switch the docs snippet in public/index.html from `bun` to `bun run` to match the standard form
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.
Overview
Replace
apps/pagesshell scripts with Node-standard.jsversions so the commands work on every platform Bun supports. While we're touching the toolchain, also reorganize the monorepo's turbo config, adopt the catalog protocol, and clean up the CI workflow so each layer owns its own concerns.Changes
Cross-platform pages commands
commands/clean-images.sh→clean-images.jscommands/deploy.js(replacesdeploy.sh)commands/update-snapshots.js—bun test --update-snapshotsstrips the flag fromprocess.argv, so the update signal is forwarded throughUPDATE_SNAPSHOTS=1tests/path.test.js— replaceexecSync('find ...')with recursivereaddirtests/external-links.txtis missing (previously it silently wrote the file and passed). Runbun run test:updateto create the snapshot.Turbo config relocation
api#generate,pages#build,web#build,web#lint,pages#test) into each package's ownturbo.jsonturbo.jsonkeeps only the task-graph skeleton (build/check/dev/preview/test/lint/format)lint:check→check(svelte-check is type-checking, not lint)Catalog protocol
package.jsonworkspaces.catalogCI
bun turbo build→bun turbo run build(bareturboshorthand clashes withgenerate)checkstep so type errors are caught in CIPUBLIC_GA4_MEASUREMENT_IDsecret referenceDocs
CHANGELOG.mdfrom the root READMEbun run clean-images --dry-runreplaces the-nshort flag (dropped for CLI consistency) in the README andpublic/index.htmlpublic/index.htmlfrombuntobun runCompatibility
bun run testwill needbun run test:update; CI may also need one re-run.clean-images -nis gone; useclean-images --dry-run