Skip to content

feat: Experimental Vite plugin for auto injecting Spotlight#434

Merged
BYK merged 33 commits intomainfrom
byk/feat/vite-plugin
Jul 19, 2024
Merged

feat: Experimental Vite plugin for auto injecting Spotlight#434
BYK merged 33 commits intomainfrom
byk/feat/vite-plugin

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Jul 5, 2024

This patch creates a new Vite plugin under the main @spotlightjs/spotlight package that automatically injects spotlight for dev mode. It also replaces Vite's error page shown on compilation errors with Spotlight.

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 10:52am

@BYK BYK marked this pull request as ready for review July 11, 2024 21:17
@BYK BYK requested a review from Shubhdeep12 July 18, 2024 02:09
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my previous review and sorry for the delay!

I still think this is a good idea. Only had some concerns around potential API breakage but I might have missed something. Other than that just some suggestions and minor things.

(sorry for the mutiple individual reviews; I rarely use the VSCode review extension but if I do I end up constantly switching between the "add to review" and "leave comment" button 😅 )

EDIT: couldn't resist
image

Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks! All good from my end!

@BYK BYK merged commit a8c09cd into main Jul 19, 2024
@BYK BYK deleted the byk/feat/vite-plugin branch July 19, 2024 11:46
BYK added a commit that referenced this pull request Jul 22, 2024
Fixes up #434.

We sometimes load Spotlight befor a Sentry SDK is loaded which
then bails on running the integration with it, making it lose
most of its appeal. To fix this, this PR adds a retry mechanism
which tries detecting Sentry SDK up to 3 times.

This works on the first try if it's just an ordering problem. It
however would not work where a Sentry SDK is loaded on-demand as
we don't have an "on load event" for Sentry SDK.
BYK added a commit that referenced this pull request Jul 22, 2024
Fixes up #434.

We sometimes load Spotlight befor a Sentry SDK is loaded which
then bails on running the integration with it, making it lose
most of its appeal. To fix this, this PR adds a retry mechanism
which tries detecting Sentry SDK up to 3 times.

This works on the first try if it's just an ordering problem. It
however would not work where a Sentry SDK is loaded on-demand as
we don't have an "on load event" for Sentry SDK.
BYK pushed a commit that referenced this pull request Jul 22, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/astro@2.1.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

- 1. Altered the ssr-page vite plugin in @spotlight/astro to run
spotlight overlay in fullscreen mode in ssr-error page.
        ([#364](#364))
    2.  Closed astro erro overlay.
3. Added a option in sentry integration to open first error encountered
in spotlight automatically.

### Patch Changes

-   Updated dependencies

\[[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd)]:
    -   @spotlightjs/spotlight@2.1.0

## @spotlightjs/overlay@2.1.0

### Minor Changes

- 1. Altered the ssr-page vite plugin in @spotlight/astro to run
spotlight overlay in fullscreen mode in ssr-error page.
        ([#364](#364))
    2.  Closed astro erro overlay.
3. Added a option in sentry integration to open first error encountered
in spotlight automatically.

### Patch Changes

- Added search bar in trace
([#424](#424))

- - Show active span item in trace when span info is opened.
([#437](#437))
- Show active event in DeveloperInfo tab when event is info is opened.

- added traceInfo
([#423](#423))

- Overhaul envelope parsing to be spec compliant
([#439](#439))

## @spotlightjs/sidecar@1.5.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

## @spotlightjs/spotlight@2.1.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

### Patch Changes

-   Updated dependencies

\[[`01321f8824ae133dc02a1d829c25952c884bf631`](01321f8),

[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd),

[`3792a5e742b3888a980a0b865fd23be941809040`](3792a5e),

[`b5249aa761c783739543dc7bf27cdd8d0fe8cebe`](b5249aa),

[`1c7896e02a2b81715c4e5c47cbb2fd6145868ab1`](1c7896e),

[`41d90455fa94df0a01e93fd90574974dfca96764`](41d9045)]:
    -   @spotlightjs/overlay@2.1.0
    -   @spotlightjs/sidecar@1.5.0

## @spotlightjs/electron@1.0.1

### Patch Changes

-   Updated dependencies

\[[`01321f8824ae133dc02a1d829c25952c884bf631`](01321f8),

[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd),

[`3792a5e742b3888a980a0b865fd23be941809040`](3792a5e),

[`b5249aa761c783739543dc7bf27cdd8d0fe8cebe`](b5249aa),

[`1c7896e02a2b81715c4e5c47cbb2fd6145868ab1`](1c7896e),

[`41d90455fa94df0a01e93fd90574974dfca96764`](41d9045)]:
    -   @spotlightjs/overlay@2.1.0
    -   @spotlightjs/sidecar@1.5.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dcramer pushed a commit that referenced this pull request Jun 3, 2025
This patch creates a new Vite plugin under the main
`@spotlightjs/spotlight` package that automatically injects spotlight
for dev mode. It also replaces Vite's error page shown on compilation
errors with Spotlight.
dcramer pushed a commit that referenced this pull request Jun 3, 2025
Fixes up #434.

We sometimes load Spotlight befor a Sentry SDK is loaded which
then bails on running the integration with it, making it lose
most of its appeal. To fix this, this PR adds a retry mechanism
which tries detecting Sentry SDK up to 3 times.

This works on the first try if it's just an ordering problem. It
however would not work where a Sentry SDK is loaded on-demand as
we don't have an "on load event" for Sentry SDK.
dcramer pushed a commit that referenced this pull request Jun 3, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/astro@2.1.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

- 1. Altered the ssr-page vite plugin in @spotlight/astro to run
spotlight overlay in fullscreen mode in ssr-error page.
        ([#364](#364))
    2.  Closed astro erro overlay.
3. Added a option in sentry integration to open first error encountered
in spotlight automatically.

### Patch Changes

-   Updated dependencies

\[[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd)]:
    -   @spotlightjs/spotlight@2.1.0

## @spotlightjs/overlay@2.1.0

### Minor Changes

- 1. Altered the ssr-page vite plugin in @spotlight/astro to run
spotlight overlay in fullscreen mode in ssr-error page.
        ([#364](#364))
    2.  Closed astro erro overlay.
3. Added a option in sentry integration to open first error encountered
in spotlight automatically.

### Patch Changes

- Added search bar in trace
([#424](#424))

- - Show active span item in trace when span info is opened.
([#437](#437))
- Show active event in DeveloperInfo tab when event is info is opened.

- added traceInfo
([#423](#423))

- Overhaul envelope parsing to be spec compliant
([#439](#439))

## @spotlightjs/sidecar@1.5.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

## @spotlightjs/spotlight@2.1.0

### Minor Changes

- A new Vite plugin under the main `@spotlightjs/spotlight` package that
automatically injects spotlight for dev mode.
It ([#434](#434)) also
replaces Vite's error page shown on compilation
    errors with Spotlight.

### Patch Changes

-   Updated dependencies

\[[`01321f8824ae133dc02a1d829c25952c884bf631`](01321f8),

[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd),

[`3792a5e742b3888a980a0b865fd23be941809040`](3792a5e),

[`b5249aa761c783739543dc7bf27cdd8d0fe8cebe`](b5249aa),

[`1c7896e02a2b81715c4e5c47cbb2fd6145868ab1`](1c7896e),

[`41d90455fa94df0a01e93fd90574974dfca96764`](41d9045)]:
    -   @spotlightjs/overlay@2.1.0
    -   @spotlightjs/sidecar@1.5.0

## @spotlightjs/electron@1.0.1

### Patch Changes

-   Updated dependencies

\[[`01321f8824ae133dc02a1d829c25952c884bf631`](01321f8),

[`a8c09cd8629677ab3eed4bf7000de4c7068538ee`](a8c09cd),

[`3792a5e742b3888a980a0b865fd23be941809040`](3792a5e),

[`b5249aa761c783739543dc7bf27cdd8d0fe8cebe`](b5249aa),

[`1c7896e02a2b81715c4e5c47cbb2fd6145868ab1`](1c7896e),

[`41d90455fa94df0a01e93fd90574974dfca96764`](41d9045)]:
    -   @spotlightjs/overlay@2.1.0
    -   @spotlightjs/sidecar@1.5.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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