fix(javascript): implement TypeMeta resolution and stabilize test environment#3251
fix(javascript): implement TypeMeta resolution and stabilize test environment#3251dheeraj12347 wants to merge 1 commit intoapache:mainfrom
Conversation
41c8abb to
9fc3277
Compare
|
I have successfully rebased this PR onto the latest apache:main. Resolved merge conflicts in TypeMeta and TypeInfo following the recent upstream refactor. Fixed a runtime undefined typeId error in the serializer generator by ensuring proper TypeInfo initialization and Fory instance attachment in tests. Verified that the new cross-language serialization tests for Strings, Lists, and Maps are passing. The PR is now passing all CI checks and is ready for a final review. |
2b11c92 to
cc322b9
Compare
|
@chaokunyang working on those 2 CI ....... hope to fix them ASAP |
a95f966 to
70d9788
Compare
70d9788 to
f9bae1b
Compare
|
@chaokunyang |
Hi, It seems there are many codestyle changes. Can you maintain the original style, otherwise it's diffcult to distinguish which are logical changes @dheeraj12347 |
7b3047a to
00681b2
Compare
00681b2 to
87751ef
Compare
|
Hi @theweipeng and @chaokunyang, I am reaching out for some guidance as I've encountered a few hurdles while trying to clean up this PR according to your feedback. My Current Status: Rebase & Cleanup: I have successfully rebased the branch onto the latest main and narrowed the scope down from 180+ files to the ~24 relevant JavaScript files to remove the noise from benchmarks and documentation. Conflict Resolution: I have manually resolved the conflicts in crossLanguage.test.ts and index.ts. CI Failures: I am working on fixing the Code Style Check (License Headers) and the JavaScript CI (missing @types/jest dependency). Where I am Stuck: After the hard reset to align with the latest main branch, I am seeing some persistent environment issues in my local setup: I am encountering TypeScript compilation errors in the test suite regarding global identifiers (like describe and test). My local classResolver.ts logic was lost during a previous reset, and I am unsure if the version I am restoring is fully compliant with the architectural changes recently merged into main (specifically regarding the ForyField support). Request for Help: Could you provide a quick pointer on: The preferred location or pattern for the ClassResolver/TypeResolver logic within the current javascript/packages/fory structure? If there is a standard tsconfig or package.json template I should follow to ensure the CI environment matches my local dev environment for the test suite? I am committed to getting this merged correctly and appreciate your patience as I navigate the project's standards! Best regards, |


This PR addresses several core issues in the JavaScript implementation of the Fory protocol:
Core API Fixes: Implemented missing getters (getTypeName, getNs, getTypeId, getFieldInfo) in TypeMeta and FieldInfo to resolve compilation errors.
Protocol Logic: Fixed a runtime crash in MapAnySerializer by ensuring tests utilize native ES6 Map objects as required by the implementation.
Environment Stability: Updated tsconfig.json to properly resolve monorepo paths and ensured io.test.ts passes under strict mode using proper type assertions.
Testing: Verified all 27 unit tests pass with strict: true enabled.