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

@bcomnes bcomnes commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Migrate to a modernized domstack sync from browsersync.

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

socket-security Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​domstack/​sync@​0.0.47710010090100

View full report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

coveralls commented Jun 2, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28278603139

Coverage decreased (-0.5%) to 91.964%

Details

  • Coverage decreased (-0.5%) 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: 4285
Covered Lines: 4061
Line Coverage: 94.77%
Relevant Branches: 780
Covered Branches: 597
Branch Coverage: 76.54%
Branches in Coverage %: Yes
Coverage Strength: 73.98 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

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.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @fastify/middie is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/@domstack/sync@0.0.4npm/@fastify/middie@9.3.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@fastify/middie@9.3.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

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