Skip to content

docs(HF-282): auto-derive function & language counts in docs#1715

Open
marcin-kordas-hoc wants to merge 2 commits into
developfrom
feat/hf-282-docs-counts
Open

docs(HF-282): auto-derive function & language counts in docs#1715
marcin-kordas-hoc wants to merge 2 commits into
developfrom
feat/hf-282-docs-counts

Conversation

@marcin-kordas-hoc

@marcin-kordas-hoc marcin-kordas-hoc commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What & why

The docs stated a hardcoded count of built-in functions ("~400"/"400+") and languages ("17"/"18") that drifts from reality. The function count already auto-derived via {{ $page.functionsCount }}; this adds the parallel {{ $page.languagesCount }} and swaps the remaining hardcoded counts to the interpolated variables.

How

  • docs/.vuepress/config.js: derive languagesCount once at config load from the i18n export barrel src/i18n/languages/index.ts (whitespace-tolerant regex + fail-loud guard so a barrel reformat can never silently publish "0 languages"); inject $page.languagesCount.
  • Docs: ~400/400+{{ $page.functionsCount }} (index, ai-sdk, mcp-server, langchain); 17/18{{ $page.languagesCount }} (index, built-in-functions, i18n-features, localizing-functions).
  • README.md (not a VuePress page): manual over 400 + 18 (drift-resistant).

Verification

docs:build renders the real counts (functions / languages), including inside markdown link text, with no un-rendered {{ }} in the built output. Docs-only + docs-build-config → no CHANGELOG per DEV_DOCS DoD.

Known nuance

README.md counts remain hand-maintained (not a VuePress page); the localizing-functions.md language table rows are also hand-maintained. "over 400" is chosen so the function line does not restale as functions grow.


Note

Low Risk
Documentation and VuePress config only; no runtime library or API behavior changes.

Overview
Stops hardcoded built-in function (~400/400+) and language (17/18) figures in the docs from drifting as the library grows.

VuePress now derives languagesCount at config load by counting export { default as … } lines in src/i18n/languages/index.ts, exposes it as {{ $page.languagesCount }} (alongside the existing {{ $page.functionsCount }} from registered functions), and fails the build if the count is 0 so a barrel format change cannot silently publish wrong numbers. Guide/home and integration preview pages swap remaining literals for those placeholders.

README.md (not a VuePress page) is updated manually to “over 400” functions and 18 languages so GitHub copy stays roughly accurate without templating.

Reviewed by Cursor Bugbot for commit 7b655fe. Bugbot is set up for automated code reviews on this repo. Configure here.

The function count already auto-derived via {{ $page.functionsCount }};
add a parallel {{ $page.languagesCount }} sourced from the i18n export
barrel (src/i18n/languages/index.ts), and swap the remaining hardcoded
counts to the interpolated variables.

- config.js: derive languagesCount once at module load from the barrel
  (whitespace-tolerant regex + fail-loud guard so a barrel reformat can
  never silently publish "0 languages"); inject $page.languagesCount.
- docs: ~400/400+ -> {{ $page.functionsCount }} (index, ai-sdk,
  mcp-server, langchain); 17/18 -> {{ $page.languagesCount }}
  (index, built-in-functions, i18n-features, localizing-functions).
- README (not a VuePress page): manual "over 400" + "18" (drift-resistant).

Verified via docs:build: renders 418 functions / 18 languages, incl.
inside markdown link text, with no un-rendered mustache in dist.
Docs-only + docs-build-config: no CHANGELOG per DEV_DOCS DoD.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for hyperformula-dev-docs ready!

Name Link
🔨 Latest commit 7b655fe
🔍 Latest deploy log https://app.netlify.com/projects/hyperformula-dev-docs/deploys/6a6572c324d0a50008567c94
😎 Deploy Preview https://deploy-preview-1715--hyperformula-dev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@qunabu

qunabu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Performance comparison of head (7b655fe) vs base (23a7437)

                                     testName |    base |    head | change
--------------------------------------------------------------------------
                                      Sheet A |  498.99 |  510.38 | +2.28%
                                      Sheet B |  165.13 |  167.75 | +1.59%
                                      Sheet T |  146.62 |  145.79 | -0.57%
                                Column ranges |  530.87 |  528.53 | -0.44%
                                Sorted lookup | 15476.4 | 15588.2 | +0.72%
Sheet A:  change value, add/remove row/column |   19.52 |   18.12 | -7.17%
 Sheet B: change value, add/remove row/column |  163.31 |  154.74 | -5.25%
                   Column ranges - add column |   169.1 |  166.07 | -1.79%
                Column ranges - without batch |  520.44 |  504.68 | -3.03%
                        Column ranges - batch |  131.73 |  126.66 | -3.85%

@marcin-kordas-hoc
marcin-kordas-hoc marked this pull request as ready for review July 24, 2026 11:38
@marcin-kordas-hoc

Copy link
Copy Markdown
Collaborator Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9974cda. Configure here.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.21%. Comparing base (23a7437) to head (7b655fe).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1715   +/-   ##
========================================
  Coverage    97.21%   97.21%           
========================================
  Files          178      178           
  Lines        15611    15611           
  Branches      3460     3429   -31     
========================================
  Hits         15177    15177           
+ Misses         434      426    -8     
- Partials         0        8    +8     

see 5 files with indirect coverage changes

🚀 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.

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.

2 participants