Skip to content

Migrate to domstack-sync#259

Open
bcomnes wants to merge 1 commit into
masterfrom
domstack-sync
Open

Migrate to domstack-sync#259
bcomnes wants to merge 1 commit into
masterfrom
domstack-sync

Conversation

@bcomnes
Copy link
Copy Markdown
Owner

@bcomnes bcomnes commented Jun 2, 2026

Migrate to a modernized domstack sync from browsersync.

Copilot AI review requested due to automatic review settings June 2, 2026 04:50
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 2, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​domstack/​sync@​0.0.47710010090100
Addedwrite-package@​7.2.09910010080100
Addedtypescript@​6.0.3100100909590

View full report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-sync for @domstack/sync in production deps (and remove @types/browser-sync); start the dev server via createServer and shut it down via await syncServer.exit().
  • Replace console.log/error calls in DomStack with a pino-style logger, exposed/initialized through a new createLogger helper and a logger build option.
  • Refactor watch() to register cpx event listeners up front, await Promise.all of watcher readiness, invoke a new onInitialBuild(report) callback, and only then spin up the sync server; update example package.jsons to drop browser-sync/npm-run-all2 in favor of domstack --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.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 26799314656

Coverage increased (+0.4%) to 92.27%

Details

  • Coverage increased (+0.4%) from the base build.
  • Patch coverage: 16 uncovered changes across 1 file (46 of 62 lines covered, 74.19%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
index.js 61 45 73.77%
Total (2 files) 62 46 74.19%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4147
Covered Lines: 3930
Line Coverage: 94.77%
Relevant Branches: 756
Covered Branches: 594
Branch Coverage: 78.57%
Branches in Coverage %: Yes
Coverage Strength: 73.72 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants