Skip to content

Restore renamed PrefetchedDocumentLoader fields as deprecated aliases - #179

Merged
rubensworks merged 2 commits into
masterfrom
claude/restore-deprecated-statics
Nov 7, 2026
Merged

rubensworks merged 2 commits into
masterfrom
claude/restore-deprecated-statics

Conversation

@rubensworks

Copy link
Copy Markdown
Member

a4d841d (bumping @rubensworks/eslint-config to 3.1.0) renamed three public static fields of PrefetchedDocumentLoader to camelCase:

Old name New name
CJS_MAJOR_VERSION cjsMajorVersion
CONTEXT_URL contextUrl
CONTEXT_PATTERN contextPattern

This hasn't been released yet, but it would break dependents that use the old names. componentsjs-generator 4.2.0 reads PrefetchedDocumentLoader.CONTEXT_URL, so with the current master it gets undefined and generates components/context.jsonld files that start with null instead of the Components.js context URL. Every component file that uses such a context then fails to load with errors like Invalid predicate IRI: requireName. I ran into this when installing master into Comunica: no engine config could be compiled anymore.

This adds the old names back as deprecated aliases of the new ones, so this can be released as a minor version. These three fields are the only public members that a4d841d renamed; the other renames are private fields and generic type parameters.

It also fixes a test from #178 that ended while one of its imports was still being parsed, which made Jest report an import after its environment was torn down. The test now waits for that import to end.

Verification

  • With these aliases, master works in Comunica again: all engine configs compile, and the compiled engines are identical across runs.
  • yarn lint, yarn build and yarn test:jest (872 tests, 100% coverage) pass.

Generated by Claude Code

Bumping @rubensworks/eslint-config renamed the public static fields
CJS_MAJOR_VERSION, CONTEXT_URL and CONTEXT_PATTERN to camelCase, which
breaks dependents that still use the old names. For example,
componentsjs-generator 4.2.0 reads PrefetchedDocumentLoader.CONTEXT_URL,
so it now generates contexts with null instead of the Components.js
context URL, after which no config that uses those contexts can be
loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeSuG8npLjD7EpaYC6LCWE
The test ended as soon as the unknown import failed, while the slow import
was still being parsed, so it was parsed after the Jest environment had
been torn down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeSuG8npLjD7EpaYC6LCWE
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 42389418008

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 3 of 3 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1532
Covered Lines: 1532
Line Coverage: 100.0%
Relevant Branches: 1262
Covered Branches: 1262
Branch Coverage: 100.0%
Branches in Coverage %: Yes
Coverage Strength: 1079.29 hits per line

💛 - Coveralls

@rubensworks
rubensworks merged commit 62d4e48 into master Nov 7, 2026
22 checks passed
@rubensworks
rubensworks deleted the claude/restore-deprecated-statics branch November 7, 2026 16:09
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