Skip to content

refactor(function): compress via CompressionStream - #35

Merged
Kikobeats merged 2 commits into
masterfrom
refactor/function-compression-stream
Sep 8, 2026
Merged

refactor(function): compress via CompressionStream#35
Kikobeats merged 2 commits into
masterfrom
refactor/function-compression-stream

Conversation

@Kikobeats

Copy link
Copy Markdown
Member

Summary

  • Compress function bodies with native CompressionStream: br# when brotli is available, gz# in Chrome.
  • Drop lz-ts; the API already accepts both prefixes.

Test plan

  • packages/function compress tests (brotli happy path + gzip fallback)
  • Browser bundle still builds (pnpm --filter @microlink/function build)

Made with Cursor

Prefer native brotli and fall back to gzip so Chrome works
without shipping lz-ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1b4cd4e3-d23e-4758-9340-75708eec984f

📥 Commits

Reviewing files that changed from the base of the PR and between 9ba77d7 and 1ac210a.

📒 Files selected for processing (4)
  • packages/function/README.md
  • packages/function/package.json
  • packages/function/src/index.js
  • packages/function/test/compress.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7d3a227. Configure here.

Comment thread packages/function/src/index.js Outdated
Uint8Array#toBase64 is not on Node 24, which CI and engines allow.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34240008394

Warning

No base build found for commit 9ba77d7 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 77.924%

Details

  • Patch coverage: 3 uncovered changes across 1 file (21 of 24 lines covered, 87.5%).

Uncovered Changes

File Changed Covered %
packages/function/src/index.js 24 21 87.5%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 4888
Covered Lines: 3814
Line Coverage: 78.03%
Relevant Branches: 824
Covered Branches: 637
Branch Coverage: 77.31%
Branches in Coverage %: Yes
Coverage Strength: 24.08 hits per line

💛 - Coveralls

@Kikobeats
Kikobeats merged commit ac362f7 into master Sep 8, 2026
9 checks passed
@Kikobeats
Kikobeats deleted the refactor/function-compression-stream branch September 8, 2026 14:57
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