Replace reflect-metadata with the @cratis/fundamentals Reflect polyfill#2291
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed
@cratis/arcnow sets up theReflectmetadata API automatically via the polyfill in@cratis/fundamentals— no separatereflect-metadatainstall or import is needed (React Native: reflect-metadata UMD wrapper breaks in Hermes engine, leaving Reflect.getOwnMetadataKeys undefined #2286)Fixed
reflect-metadataUMD wrapper failed partway through initialization and leftReflect.getOwnMetadataKeysundefined (React Native: reflect-metadata UMD wrapper breaks in Hermes engine, leaving Reflect.getOwnMetadataKeys undefined #2286)Removed
reflect-metadatadependency is gone from@cratis/arc.react.mvvm(React Native: reflect-metadata UMD wrapper breaks in Hermes engine, leaving Reflect.getOwnMetadataKeys undefined #2286)