The GitHub Actions job "Fory CI" on fory.git/main has failed.
Run started by GitHub user theweipeng (triggered by theweipeng).

Head commit for run:
6100ebc79fa392fe1a289c8b7f805273a1b0bf67 / Ayush Kumar 
<[email protected]>
feat(javascript): add float16 support (#3253)

## Why?

Javascript package had the `float16` support but during serialization it
fallbacks to `float32`, much like the `float16` was just a pseudo type
which in real was a `float32`.

## What does this PR do?

### 1. Adds float16(v: number | string) method to the
`BinaryWriterBuilder` class
```js
  float16(v: number | string) {
    return `${this.holder}.float16(${v})`
  }
```

### 2. Updated the `float16` accessor in the Codegen Regsitery
```js
CodegenRegistry.register(TypeId.FLOAT16,
  buildNumberSerializer(
    (builder, accessor) => builder.writer.float16(accessor),
    builder => builder.reader.float16()
  )
);
``` 
### 3. Updated the `writer/number.ts` and added `float16` test suites in
`test/number.test.ts`
## Related Issue
- Closes #3210 

## Does this PR introduce any user-facing change?

* [ ] Does this PR introduce any public API change?
* [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
N/A

---------

Co-authored-by: weipeng <[email protected]>

Report URL: https://github.com/apache/fory/actions/runs/21856048421

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to