Skip to content

More server events improvments - #104

Merged
tobiaslins merged 4 commits into
serverside-eventsfrom
further-server-improvments
Oct 3, 2023
Merged

More server events improvments#104
tobiaslins merged 4 commits into
serverside-eventsfrom
further-server-improvments

Conversation

@tobiaslins

Copy link
Copy Markdown
Collaborator
  • Allow to disable logs using environment variable VERCEL_WEB_ANALYTICS_DISABLE_LOGS Fixes #ALY-951
  • Throw error when importing track from @vercel/analytics instead of @vercel/analytics/server. This only logs a warning when on production.
image - Throw an error when `/server` is imported on a client component (using `server-only` package)

@tobiaslins
tobiaslins requested a review from a team October 3, 2023 08:31
@vercel

vercel Bot commented Oct 3, 2023

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
analytics-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 1:15pm

@orca-security-us orca-security-us Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@feugy feugy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving with a nit

Comment thread packages/web/src/server/index.ts Outdated
Comment thread packages/web/src/server/index.ts Outdated
Co-Authored-By: Damien Simonin Feugas <damien.feugas@gmail.com>
@tobiaslins
tobiaslins merged commit 7cacf8a into serverside-events Oct 3, 2023
@tobiaslins
tobiaslins deleted the further-server-improvments branch October 3, 2023 13:14
tobiaslins added a commit that referenced this pull request Oct 6, 2023
* Add support for server-side events

* Push version to 1.1.0-beta.1

* Better typings for headers & request

* Push to 1.1.0-beta.2

Allow to be used in non-vercel environments with better typings

* Remove strict from test project again

* Add server-actions and RSC example

* Improved server side events (#92)

* Add more error logs

* rename to withSessionContext

* Throw error when no headers are found

* update version

* Update packages/web/src/server/index.ts

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>

* Update packages/web/src/server/index.ts

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>

---------

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>

* Fix missing referrer (#95)

* Add more error logs

* rename to withSessionContext

* Throw error when no headers are found

* update version

* Test redirects

* Add missing export for AnalyticsProps (#94)

* Add missing export for AnalyticsProps and export like on react

* Bump version

* add debug log

* Update index.ts

* Use request url as fallback

* Track more events in middleware

* Add request to middleware

* Update route.ts

* Fixes

---------

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>

* Overhaul server-side events internals (#103)

* Use `@vercel/request-context`

* Fix next.js demo

* Update test.ts

* update next

* Update error logs

* Fix example

* Remove unnecessary whitespace

* More server events improvments (#104)

* Allow to disable logs using environment variable

Fixes #ALY-951

* Show warning/error when wrong track import is used

* Simplify code

Co-Authored-By: Damien Simonin Feugas <damien.feugas@gmail.com>

* Push version

---------

Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>

* Add support for `waitUntil` if available (#105)

* Forward cookies to pass deployment protection when authed

* Cleanup

* Pass cookie & use new endpoint to support deployment protection (#106)

* Pass cookie and use endpoint from context

* Update package.json

* Prepare release

* Update middleware example & nextjs

---------

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>
Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.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.

2 participants