Migrate to domstack-sync#259
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Replaces the legacy browser-sync integration with @domstack/sync for the dev server and routes build/watch logs through a structured logger created via createLogger. The watch() API gains an onInitialBuild hook so the CLI can render its build tree after watchers are ready and before the dev server starts.
Changes:
- Swap
browser-syncfor@domstack/syncin production deps (and remove@types/browser-sync); start the dev server viacreateServerand shut it down viaawait syncServer.exit(). - Replace
console.log/errorcalls inDomStackwith apino-style logger, exposed/initialized through a newcreateLoggerhelper and aloggerbuild option. - Refactor
watch()to register cpx event listeners up front, awaitPromise.allof watcher readiness, invoke a newonInitialBuild(report)callback, and only then spin up the sync server; update examplepackage.jsons to dropbrowser-sync/npm-run-all2in favor ofdomstack --watch.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds @domstack/sync@^0.0.4, drops browser-sync and @types/browser-sync. |
| index.js | Imports @domstack/sync, adds createLogger/wrapPinoLogger exports, swaps console logs for the structured logger, restructures watch() cpx setup, adds onInitialBuild, and replaces browserSyncServer with #syncServer. |
| lib/builder.js | Documents new optional logger BuildOpts property typed against @domstack/sync. |
| bin.js | Creates a CLI logger, passes it via opts, moves post-initial-build tree/warning output into the new onInitialBuild callback, and routes quit messages through the logger. |
| examples/string-layouts/package.json | Replaces split watch:serve/watch:domstack scripts with domstack --watch; removes browser-sync and npm-run-all2 devDeps. |
| examples/default-layout/package.json | Same example simplification as string-layouts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 28278603139Coverage decreased (-0.5%) to 91.964%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Migrate to a modernized domstack sync from browsersync.