Skip to content

fix(core): omit undefined headers - #851

Open
kutluhaneth46 wants to merge 2 commits into
sapiom:mainfrom
kutluhaneth46:cursor/fix-omit-undefined-headers-88c1
Open

fix(core): omit undefined headers#851
kutluhaneth46 wants to merge 2 commits into
sapiom:mainfrom
kutluhaneth46:cursor/fix-omit-undefined-headers-88c1

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

  • skip undefined entries while copying headers in setHeader and removeHeader
  • add regression coverage for both header helpers

Tests

  • pnpm --filter @sapiom/core test --runInBand
  • pnpm --filter @sapiom/core typecheck
  • pnpm --filter @sapiom/core lint (passes with 3 existing warnings)
  • pnpm exec prettier --check packages/core/src/utils/utils.ts packages/core/src/utils/utils.test.ts

Fixes #625

@github-actions github-actions Bot added contribution: incomplete Required pull request information is incomplete or ambiguous contributor: external Pull request author does not have write, maintain, or admin access to sapiom-js needs-triage Awaiting maintainer review and classification review: manual External pull request requires maintainer review before automation size: small Review size is at most 100 changed lines area: sdk Changes to SDK core or analytics labels Sep 7, 2026
@kutluhaneth46

Copy link
Copy Markdown
Author

Note on the red test (20.x) / test (22.x) jobs: the failures are in packages/harness (subsession-coordinator.test.tsawaiting-ready vs reserved), which this PR does not touch.

Diff is limited to @sapiom/core header helpers omitting undefined values (+ regression tests). Happy to rebase once the harness flake/regression on main is sorted, or to split/re-run if maintainers prefer.

@kutluhaneth46

Copy link
Copy Markdown
Author

Rebased onto latest main to clear the unrelated subsession-coordinator harness failures (those tests are green on current main). Core change unchanged: omit undefined headers.

@kutluhaneth46

Copy link
Copy Markdown
Author

Follow-up: rebase push is blocked from this token (workflow OAuth scope — updating the branch to current main would introduce .github/workflows/* changes).

The failing harness tests (subsession-coordinator readiness states) are unrelated to this PR’s diff (packages/core header omission only). Those tests are green on current main (e.g. Test workflow on fd9ec19). Please rebase-from-main on the GitHub UI / merge with update-branch if CI needs a fresh run.

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

Labels

area: sdk Changes to SDK core or analytics contribution: incomplete Required pull request information is incomplete or ambiguous contributor: external Pull request author does not have write, maintain, or admin access to sapiom-js needs-triage Awaiting maintainer review and classification review: manual External pull request requires maintainer review before automation size: small Review size is at most 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: core header helpers convert undefined values into empty headers

1 participant