Skip to content

test(build): validate packaged bundle PURE annotations and improve no…#575

Merged
nev21 merged 1 commit into
mainfrom
nev21/pureAnnotations
May 29, 2026
Merged

test(build): validate packaged bundle PURE annotations and improve no…#575
nev21 merged 1 commit into
mainfrom
nev21/pureAnnotations

Conversation

@nev21

@nev21 nev21 commented May 29, 2026

Copy link
Copy Markdown
Contributor

…rmalization

  • add a generated-artifact validation script at bundle-pure-annotations-check.js to scan packaged JavaScript under bundle and dist outputs
  • fail when PURE annotations have whitespace after opening parenthesis, and report file plus line for quick diagnosis
  • add progress logging to show discovered files and each file being processed
  • run the new validation as part of size-check in package.json
  • widen the PURE annotation normalization spacing matcher in rollup.config.js to tolerate larger whitespace ranges before rewriting to canonical form

@nev21 nev21 added this to the 0.15.0 milestone May 29, 2026
Copilot AI review requested due to automatic review settings May 29, 2026 07:01
@nev21 nev21 requested review from a team as code owners May 29, 2026 07:01
@nev21 nev21 force-pushed the nev21/pureAnnotations branch from d463391 to 3e13f00 Compare May 29, 2026 07:04
…rmalization

- add a generated-artifact validation script at bundle-pure-annotations-check.js to scan packaged JavaScript under bundle and dist outputs
- fail when PURE annotations have whitespace after opening parenthesis, and report file plus line for quick diagnosis
- add progress logging to show discovered files and each file being processed
- run the new validation as part of size-check in package.json
- widen the PURE annotation normalization spacing matcher in rollup.config.js to tolerate larger whitespace ranges before rewriting to canonical form

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a post-build validation script that scans generated bundle/dist JS for malformed PURE annotations (whitespace between ( and the comment), wires it into size-check, and widens the rollup normalization regex to match more whitespace variants.

Changes:

  • New lib/test/bundle-pure-annotations-check.js script recursively scans lib/bundle and lib/dist .js files.
  • size-check npm script now also runs the new validator.
  • fixPureAnnotations() regex broadened to allow up to 5 whitespace chars (including newlines) at each spot.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Chains the new PURE annotation checker into size-check.
lib/test/bundle-pure-annotations-check.js New validator scanning generated JS for invalid PURE annotation spacing.
lib/rollup.config.js Widens normalization regex from [ \t]{0,n} to \s{0,5}.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.35%. Comparing base (124d67f) to head (3e13f00).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #575   +/-   ##
=======================================
  Coverage   99.35%   99.35%           
=======================================
  Files         165      165           
  Lines        5089     5089           
  Branches     1116     1118    +2     
=======================================
  Hits         5056     5056           
  Misses         33       33           
🚀 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.

@nev21 nev21 enabled auto-merge (squash) May 29, 2026 07:06

@nevware21-bot nevware21-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by nevware21-bot

@nev21 nev21 merged commit 87cb303 into main May 29, 2026
10 checks passed
@nev21 nev21 deleted the nev21/pureAnnotations branch May 29, 2026 07:15
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.

3 participants