Migrate to domstack-sync#259
Open
bcomnes wants to merge 1 commit into
Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
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 26799314656Coverage increased (+0.4%) to 92.27%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
Migrate to a modernized domstack sync from browsersync.