Skip to content

feat(auto_source): expand JsonState framework globals - #317

Merged
gildesmarais merged 1 commit into
masterfrom
feat/json-state-extension-matcher
Mar 9, 2026
Merged

gildesmarais merged 1 commit into
masterfrom
feat/json-state-extension-matcher

Conversation

@gildesmarais

@gildesmarais gildesmarais commented Mar 9, 2026

Copy link
Copy Markdown
Member

This pull request expands the support for detecting and extracting article data from various JavaScript framework global state variables embedded in HTML. The main change is the addition of several new global assignment patterns in the JsonState scraper, along with new tests and a fixture to ensure these are correctly handled.

Enhancements to framework global state detection:

  • Expanded the GLOBAL_ASSIGNMENT_PATTERNS in JsonState to include detection for Redux, Apollo, Remix, SvelteKit, Gatsby, Ember, and Angular global state variables, in addition to existing patterns.

Testing improvements:

  • Added a new fixture file redux.html containing a sample of Redux-style preloaded state for testing.
  • Added new tests to verify that the scraper detects articles in the new global state patterns, specifically for Redux preloaded state. [1] [2]

@gildesmarais
gildesmarais force-pushed the feat/json-state-extension-matcher branch from 4f309aa to 4c4748c Compare March 9, 2026 21:00
@gildesmarais gildesmarais changed the title feat(auto-source): expand JsonState framework globals feat(auto_source): expand JsonState framework globals Mar 9, 2026
@gildesmarais
gildesmarais marked this pull request as ready for review March 9, 2026 21:03
@gildesmarais
gildesmarais merged commit c81315e into master Mar 9, 2026
10 checks passed
@gildesmarais
gildesmarais deleted the feat/json-state-extension-matcher branch March 9, 2026 21:03
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