Skip to content

♻️ remove export of internal Undefined sentinel#58

Merged
techouse merged 1 commit into
mainfrom
chore/api-cleanup
Jun 21, 2026
Merged

♻️ remove export of internal Undefined sentinel#58
techouse merged 1 commit into
mainfrom
chore/api-cleanup

Conversation

@techouse

Copy link
Copy Markdown
Owner

This pull request introduces a breaking change by removing the internal Undefined sentinel from the public API, and updates documentation, examples, and tests to reflect this change. The main impact is that users can no longer import or rely on Undefined from the public package interface.

Breaking API change:

  • The internal Undefined sentinel is no longer exported from the public API (qs_dart.dart). Users who need it must now import it directly from src/models/undefined.dart. [1] [2]

Documentation and example updates:

  • Removed all usage and documentation of Undefined from README.md, example/example.dart, and test/unit/example.dart to align with the new API. [1] [2] [3] [4] [5] [6]

Test and import adjustments:

  • Updated test files to import Undefined from its internal location, ensuring tests continue to work for internal use. [1] [2] [3]

@techouse techouse self-assigned this Jun 21, 2026
@techouse techouse added the enhancement New feature or request label Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7a23ca44-a394-4ac2-9923-e0bde590303e

📥 Commits

Reviewing files that changed from the base of the PR and between 1afe7e2 and 25928a9.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • README.md
  • example/example.dart
  • lib/qs_dart.dart
  • test/unit/encode_test.dart
  • test/unit/example.dart
  • test/unit/extensions/extensions_test.dart
  • test/unit/utils_test.dart
💤 Files with no reviewable changes (4)
  • lib/qs_dart.dart
  • test/unit/example.dart
  • README.md
  • example/example.dart

Walkthrough

Removes the Undefined sentinel type from the library's public API by deleting its re-export from lib/qs_dart.dart. Tests that reference Undefined are updated to import it directly from the internal model path. Related examples and README documentation demonstrating Undefined-based omission behaviour are removed. A breaking-change entry is added to CHANGELOG.md.

Changes

Remove Undefined from public API

Layer / File(s) Summary
Public API re-export removal and changelog
lib/qs_dart.dart, CHANGELOG.md
Removes export 'src/models/undefined.dart' from the library's top-level exports and records the breaking change under a new 1.8.0-dev section.
Test import updates and Undefined example removal
test/unit/encode_test.dart, test/unit/utils_test.dart, test/unit/extensions/extensions_test.dart, test/unit/example.dart, example/example.dart
Adds direct imports of Undefined from the internal model path in all affected test files. Removes assertions and filter switch branches that relied on Undefined producing omitted keys.
README Undefined example removal
README.md
Removes the paragraph describing Undefined-omission behaviour and the corresponding 'b' prefix case from the EncodeOptions.filter code example.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • Copilot

Poem

🐇 The Undefined hath left the stage,
No longer public, sage by sage,
Internal paths now hold its lore,
The API is clean once more.
Hop hop hooray, less exports to mind! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly outlines the breaking change, documentation updates, and test adjustments, but does not follow the repository's required template structure with sections like 'Type of change', 'How Has This Been Tested?', and 'Checklist'. Restructure the description to follow the repository template with mandatory sections: Type of change, How Has This Been Tested?, and Checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the export of the internal Undefined sentinel from the public API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/api-cleanup

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 and usage tips.

@codacy-production

codacy-production Bot commented Jun 21, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1afe7e2) Report Missing Report Missing Report Missing
Head commit (25928a9) 1423 (+0) 1391 (+0) 97.75% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#58) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (1afe7e2) to head (25928a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #58   +/-   ##
=======================================
  Coverage   97.75%   97.75%           
=======================================
  Files          20       20           
  Lines        1423     1423           
=======================================
  Hits         1391     1391           
  Misses         32       32           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@techouse techouse merged commit 87d41c2 into main Jun 21, 2026
18 checks passed
@techouse techouse deleted the chore/api-cleanup branch June 21, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant