clerk / javascript

Official Javascript repository for Clerk authentication
https://clerk.com
MIT License
981 stars 221 forks source link

chore(astro): Optimize stream modification #3673

Closed wobsoriano closed 2 weeks ago

wobsoriano commented 2 weeks ago

Description

This PR tackles ECO-19 and ECO-18 and optimizes stream modification by working directly with the Uint8Array instead of decoding and re-encoding a chunk to check for string (</head>) availability. Introduces TransformStream.

A benchmark between the current implementation and the proposed is available in this gist.

Checklist

Type of change

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 0f5505d1468ef69430e0fbf60602d54dd38d34e3

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

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | @clerk/astro | 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