Skip to content

chore: extract capPageViews helper and remove dead writeNamespacedFieldWithinBudget - #124

Merged
alexs-mparticle merged 2 commits into
developmentfrom
chore/storage-cleanup
Aug 19, 2026
Merged

chore: extract capPageViews helper and remove dead writeNamespacedFieldWithinBudget#124
alexs-mparticle merged 2 commits into
developmentfrom
chore/storage-cleanup

Conversation

@alexs-mparticle

Copy link
Copy Markdown
Collaborator

Summary

  • Extracts a capPageViews helper in pageViewStorage.ts to deduplicate the .slice(-PAGE_VIEWS_MAX_COUNT) call that was duplicated in both writePageViews and buildPageEvents
  • Removes writeNamespacedFieldWithinBudget from storage.ts — it became dead code when PR fix: limit page-view history to 25 most-recent records #123 switched writePageViews from the byte-budget eviction strategy to the 25-record count cap

No behavioral changes.

Test plan

  • Lint passes (npm run lint)
  • Build passes (npm run build)
  • Tests pass (npm run test) — pre-existing ERR_REQUIRE_ESM jsdom issue unrelated to this change

🤖 Generated with Claude Code

@alexs-mparticle
alexs-mparticle changed the base branch from main to development August 19, 2026 15:09
@alexs-mparticle
alexs-mparticle merged commit 78b8220 into development Aug 19, 2026
5 checks passed
@mparticle-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.34.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants