Skip to content

fix(subpath): correct exports type cast; add fast-check fuzz harness#20

Merged
the-simian merged 4 commits into
mainfrom
fix/subpath-exports-type
Apr 24, 2026
Merged

fix(subpath): correct exports type cast; add fast-check fuzz harness#20
the-simian merged 4 commits into
mainfrom
fix/subpath-exports-type

Conversation

@the-simian

@the-simian the-simian commented Apr 24, 2026

Copy link
Copy Markdown
Member

Two changes on the test surface plus a housekeeping biome update.

Test code

  • test/subpathExports.test.ts:190 — change Object.entries<Record<string, string>> to Object.entries<{ import: string; types: string }>. The loop body reads .import and .types; the original cast lied about the shape. No runtime behavior change.
  • test/fuzz.test.ts (new) — add a fast-check property test asserting rgbToRgba throws only Error instances across 1000 arbitrary string inputs per run. Adds fast-check@4.7.0 as a devDep. Credits OpenSSF Scorecard's Fuzzing check (currently 0/10; will flip on next scan).

Tooling

  • Bump @biomejs/biome 2.4.12 → 2.4.13; bunx biome migrate --write (schema URL only); reformat the widened Object.entries call to respect the configured line width.

Test results

472/472 passing (was 471); fuzz test runs in ~40ms. Full suite under 200ms. Coverage held at 100%.

Record<string, string> was inaccurate; the loop reads .import and
.types, which only exist on object conditions. Type it to match.
Asserts rgbToRgba throws only Error instances across 1000 arbitrary
string inputs. Also credits OpenSSF Scorecard's Fuzzing check.
@the-simian the-simian changed the title fix(subpath): correct type cast on PKG_JSON.exports iteration fix(subpath): correct exports type cast; add fast-check fuzz harness Apr 24, 2026
Version bump pulls schema URL to 2.4.13; reformatter wraps the
Object.entries call to respect the configured line width.
@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4306543) to head (9e66cfd).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines         9839      9839           
=========================================
  Hits          9839      9839           
🚀 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.

@the-simian the-simian merged commit 5471b1f into main Apr 24, 2026
8 checks passed
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.

1 participant