Skip to content

Replace reflect-metadata with the @cratis/fundamentals Reflect polyfill#2291

Merged
einari merged 5 commits into
mainfrom
fix/replace-reflect-metadata-with-polyfill
Jun 11, 2026
Merged

Replace reflect-metadata with the @cratis/fundamentals Reflect polyfill#2291
einari merged 5 commits into
mainfrom
fix/replace-reflect-metadata-with-polyfill

Conversation

@einari

@einari einari commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Changed

Fixed

Removed

einari and others added 4 commits June 11, 2026 11:58
Upgrade @cratis/fundamentals to 7.16.0 and side-effect import its Reflect
metadata polyfill from the @cratis/arc entry point, so the Reflect metadata
API is set up automatically for anything that imports @cratis/arc.

Externalize @cratis/fundamentals subpaths in the rollup config and skip
node_modules in the declaration emit so the global-augmenting side-effect
import builds cleanly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the reflect-metadata dependency and all of its imports. The polyfill
provided by @cratis/fundamentals (loaded via @cratis/arc) supplies the same
Reflect metadata API, and unlike reflect-metadata's UMD wrapper it does not
break in the React Native Hermes engine.

Test setup now loads @cratis/fundamentals/reflection so specs that rely on
emitDecoratorMetadata (design:paramtypes) continue to work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the ClearScript-based proxy generator test host to resolve and load
@cratis/fundamentals/reflection instead of reflect-metadata, and stop copying
the no-longer-present reflect-metadata file into the test runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tsyringe's Reflect metadata API is now polyfilled automatically by @cratis/arc,
so the docs no longer instruct installing or importing reflect-metadata.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@einari einari added the minor label Jun 11, 2026
The BehaviorSubject and subscription are handed to the returned
DisposableQueryHealthSubject, which disposes both — the analyzer cannot
see the ownership transfer through the constructor. Suppress CA2000 with a
justification so the Release build (warnings-as-errors) succeeds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@einari einari merged commit dc0c0ba into main Jun 11, 2026
53 checks passed
@einari einari deleted the fix/replace-reflect-metadata-with-polyfill branch June 11, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant