Skip to content

Changed fragmenter to ESM and the maintained HTML extractor - #234

Merged
aileen merged 1 commit into
mainfrom
aileen/cut-over-fragmenter-extractor
Aug 18, 2026
Merged

Changed fragmenter to ESM and the maintained HTML extractor#234
aileen merged 1 commit into
mainfrom
aileen/cut-over-fragmenter-extractor

Conversation

@aileen

@aileen aileen commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • convert @tryghost/algolia-fragmenter to a strict-TypeScript, ESM-only package while retaining its deprecated named/default wrappers and exact final Algolia records
  • migrate the fragmenter from the abandoned extractor to the verified public @tryghost/algolia-html-extractor synchronous seam
  • adapt the CommonJS CLI through dynamic import and Netlify through named ESM imports, with the extractor remaining a real transitive dependency
  • enforce dependency-aware clean builds and add Ghost-rendered golden records, packed ESM/declaration/CommonJS-rejection acceptance, and Netlify function tracing

ref #217

Verification

  • pnpm test — 122 tests passed
  • pnpm test:coverage — 94.35% statements, 90.52% branches, 98.27% functions, 94.18% lines
  • strict TypeScript, oxlint, oxfmt, packed ESM consumers, declaration checks, CommonJS rejection, CLI process acceptance, and Netlify function tracing passed on Node 24.18.0
  • clean generated-output probe passed through both the root test lifecycle and pnpm nx run-many -t build
  • independent standards and specification reviews passed with no remaining findings
  • scoped exact-version dry run selected fragmenter 0.3.0, Netlify 0.4.4, and CLI 0.3.3

Release impact

The fragmenter release is the planned breaking pre-1.0 ESM migration. Netlify and the CLI receive direct adapter patches because their module-loading code changes; they are not dependency-only releases. Version 1.0.0 remains reserved for the durable createAlgoliaRecords milestone. No package has been published by this PR branch.

Rollback

The current published fragmenter 0.2.10, Netlify 0.4.3, and CLI 0.3.2 remain the rollback set. Issue #217 should remain open until the selected artifacts are published and verified from clean installs.

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for alg-helpcenter ready!

Name Link
🔨 Latest commit 29e6234
🔍 Latest deploy log https://app.netlify.com/projects/alg-helpcenter/deploys/6a843472290621000803f86d
😎 Deploy Preview https://deploy-preview-234--alg-helpcenter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 29 minutes

Limit details: You’ve used all 2 included reviews currently available under your plan. You completed 56 included PR reviews in the past 7 days; at that activity level, included reviews refill at 2 reviews per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 073fea3d-3862-4325-a6d5-6324ef30c528

📥 Commits

Reviewing files that changed from the base of the PR and between 302e35f and 29e6234.

📒 Files selected for processing (4)
  • .oxfmtrc.json
  • packages/algolia-fragmenter/lib/index.d.mts
  • packages/algolia-fragmenter/lib/index.mjs
  • packages/algolia-fragmenter/package.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e90a30a8-3ed8-4ea4-abd4-983caf6a1880

📥 Commits

Reviewing files that changed from the base of the PR and between 8190398 and 302e35f.

📒 Files selected for processing (9)
  • package.json
  • packages/algolia-fragmenter/package.json
  • packages/algolia-fragmenter/tsconfig.build.json
  • packages/algolia-fragmenter/tsconfig.json
  • packages/algolia-netlify/package.json
  • packages/algolia-netlify/tsconfig.base.json
  • packages/algolia-netlify/tsconfig.functions.json
  • packages/algolia-netlify/tsconfig.package.json
  • packages/algolia-netlify/tsconfig.test.json
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/algolia-fragmenter/tsconfig.build.json
  • package.json
  • packages/algolia-fragmenter/tsconfig.json
  • packages/algolia-netlify/package.json
  • packages/algolia-fragmenter/package.json

Included review availability: 0 reviews are currently available. Based on recent review activity, included reviews refill at 2 per hour.


Walkthrough

The Algolia fragmenter now uses an ESM entry point with TypeScript declarations and workspace-based HTML extractor dependencies. It adds typed fragment and post transformation logic while preserving deprecated compatibility wrappers. Compatibility, package, TypeScript, source-map, and dependency-tracing acceptance tests were added. Algolia and Netlify consumers now use ESM imports and build required workspace packages before validation and packaging.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: ⚪ Minimal · up to 302e3

The PR changes the fragmenter to ESM and updates its CLI and Netlify integrations, with the supplied build, compatibility, packaging, and acceptance checks passing; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the fragmenter ESM migration and replacement with the maintained HTML extractor.
Description check ✅ Passed The description directly explains the ESM migration, extractor replacement, integration updates, testing, and release impact.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aileen/cut-over-fragmenter-extractor

Comment @coderabbitai help to get the list of available commands.

@aileen
aileen force-pushed the aileen/cut-over-fragmenter-extractor branch from d89d920 to 8190398 Compare August 18, 2026 10:00
@aileen aileen changed the title Changed fragmenter to use the maintained HTML extractor Changed fragmenter to ESM and the maintained HTML extractor Aug 18, 2026
@aileen
aileen force-pushed the aileen/cut-over-fragmenter-extractor branch from 8190398 to 302e35f Compare August 18, 2026 10:25
ref [#217](#217)

Converted the fragmenter to strict TypeScript with ESM-only package exports while preserving its deprecated compatibility wrappers and exact final records. Replaced the abandoned extractor, adapted the CLI and Netlify consumers, enforced dependency-aware clean builds, and added packed runtime, declaration, compatibility, and function-tracing acceptance for the planned 0.3.0 release.
@aileen
aileen force-pushed the aileen/cut-over-fragmenter-extractor branch from 302e35f to 29e6234 Compare August 18, 2026 10:31
@aileen
aileen merged commit bfdf972 into main Aug 18, 2026
14 checks passed
@aileen
aileen deleted the aileen/cut-over-fragmenter-extractor branch August 18, 2026 10:33
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