Skip to content

feat: observe option — observe build conditions + compiler componentNames - #357

Merged
ryansolid merged 3 commits into
nextfrom
observe-option
Sep 11, 2026
Merged

feat: observe option — observe build conditions + compiler componentNames#357
ryansolid merged 3 commits into
nextfrom
observe-option

Conversation

@ryansolid

@ryansolid ryansolid commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

New observe: true option for production observability builds:

  • Adds the observe export condition to every environment — client and server, resolve.conditions and resolve.externalConditions — and inlines the core runtime (and its consumers, via the semi-framework crawl) for server builds, the same way the dev posture does, so one build is loaded end to end rather than the app's solid-js resolving the observe build while an externalized consumer's import "solid-js" lands on Node's prod copy.
  • Turns on the compiler's componentNames option, so component owner labels (<Home>) survive minification in diagnostic ownerPaths and attribution chains. The dev posture also gets componentNames (a lazy() or HMR wrapper otherwise hides the tag name).
  • Under vite dev the development condition still wins (solid-js nests it above observe).

Verified on a Sentry adapter spike: with the local plugin and compilers linked, a minified vite build resolves the observe runtime and reports <Router> › … › <Layout> › … › <Show> › … › <For> instead of mangled names.

Gating

Depended on solidjs/solid#3340 (componentNames in @solidjs/compiler / @solidjs/babel-plugin), released in Solid 2.0.0-rc.8. The second commit rides rc.8 (catalog, release-age excludes, lockfile) and requires @solidjs/compiler / @solidjs/babel-plugin ^2.0.0-rc.8, since an older compiler rejects the unknown option. Verified against the published rc.8: the vite-8 example (cypress) passes, and an observe: true build of it emits createComponent(Count, {}, "Count") on the observe runtime. Ready for review.

Co-authored with Claude via Cursor.

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9ab6443

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/vite-plugin@357

commit: 9ab6443

ryansolid and others added 2 commits September 11, 2026 09:17
…ames

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…lers

Catalog and release-age excludes to rc.8. @solidjs/compiler and
@solidjs/babel-plugin ^2.0.0-rc.8: the observe option passes
componentNames, which older compilers reject as an unknown option.
Verified the vite-8 example (cypress) and an observe build against the
published rc.8: createComponent(Count, {}, "Count") in the bundle.

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@socket-security

socket-security Bot commented Sep 11, 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
Updated@​solidjs/​diagnostics@​2.0.0-rc.7 ⏵ 2.0.0-rc.87810010094 +1100
Updated@​solidjs/​compiler@​2.0.0-rc.7 ⏵ 2.0.0-rc.889 +9100100 +194 +1100

View full report

@socket-security

socket-security Bot commented Sep 11, 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 Medium
Low adoption: npm @solidjs/compiler-darwin-arm64

Location: Package overview

From: pnpm-lock.yamlnpm/@solidjs/compiler@2.0.0-rc.8npm/@solidjs/compiler-darwin-arm64@2.0.0-rc.8

ℹ Read more on: This package | This alert | What are unpopular packages?

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: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@solidjs/compiler-darwin-arm64@2.0.0-rc.8. 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.

Warn Medium
Low adoption: npm @solidjs/compiler-darwin-x64

Location: Package overview

From: pnpm-lock.yamlnpm/@solidjs/compiler@2.0.0-rc.8npm/@solidjs/compiler-darwin-x64@2.0.0-rc.8

ℹ Read more on: This package | This alert | What are unpopular packages?

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: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@solidjs/compiler-darwin-x64@2.0.0-rc.8. 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.

Warn Medium
Low adoption: npm @solidjs/compiler-win32-x64-msvc

Location: Package overview

From: pnpm-lock.yamlnpm/@solidjs/compiler@2.0.0-rc.8npm/@solidjs/compiler-win32-x64-msvc@2.0.0-rc.8

ℹ Read more on: This package | This alert | What are unpopular packages?

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: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@solidjs/compiler-win32-x64-msvc@2.0.0-rc.8. 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

@ryansolid
ryansolid marked this pull request as ready for review September 11, 2026 16:27
Co-authored-by: Cursor <cursoragent@cursor.com>
@ryansolid
ryansolid merged commit 952e34e into next Sep 11, 2026
6 checks passed
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.

1 participant