Skip to content

Commit c31f970

Browse files
authored
docs: format markdown docs (#2354)
## What does this PR do? <!-- Describe the purpose of this PR. --> ## Related issues <!-- Is there any related issue? Please attach here. - #xxxx0 - #xxxx1 - #xxxx2 --> ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fory/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. -->
1 parent 9cab43a commit c31f970

File tree

15 files changed

+564
-558
lines changed

15 files changed

+564
-558
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,5 +327,9 @@ jobs:
327327
uses: actions/setup-python@v5
328328
with:
329329
python-version: 3.8
330+
- name: Use Node.js 20.x
331+
uses: actions/setup-node@v4
332+
with:
333+
node-version: 20.x
330334
- name: Check code style
331335
run: ./ci/run_ci.sh format

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
In addition to cross-language serialization, Fory also features at:
3535

3636
- Drop-in replace Java serialization frameworks such as JDK/Kryo/Hessian, but 100x faster at most, which can greatly improve
37-
the efficiency of high-performance RPC calls, data transfer, and object persistence.
37+
the efficiency of high-performance RPC calls, data transfer, and object persistence.
3838
- **100% compatible** with JDK serialization API with much faster implementation: supporting JDK `writeObject`/`readObject`/`writeReplace`/`readResolve`/`readObjectNoData`/`Externalizable` API.
3939
- Supports **Java 8~21**, Java 17+ `record` is supported too.
4040
- Supports [AOT compilation serialization](docs/guide/graalvm_guide.md) for **GraalVM native image**, and no reflection/serialization json config are needed.
@@ -417,7 +417,7 @@ Static serialization is relatively secure. But dynamic serialization such as For
417417
For example, the deserialization may invoke `init` constructor or `equals`/`hashCode` method, if the method body contains malicious code, the system will be at risk.
418418

419419
Fory provides a class registration option that is enabled by default for such protocols, allowing only deserialization of trusted registered types or built-in types.
420-
**Do not disable class registration unless you can ensure your environment is secure**.
420+
**Do not disable class registration unless you can ensure your environment is secure**.
421421

422422
If this option is disabled, you are responsible for serialization security. You can configure `org.apache.fory.resolver.ClassChecker` by
423423
`ClassResolver#setClassChecker` to control which classes are allowed for serialization.

ci/format.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ format_changed() {
281281
git diff --name-only --diff-filter=ACRM "$MERGEBASE" -- '*.ts' | xargs -P 5 \
282282
node ./javascript/node_modules/.bin/eslint
283283
fi
284+
# Install prettier globally
285+
npm install -g prettier
286+
# Fix markdown files
287+
prettier --write "**/*.md"
284288
popd
285289
fi
286290
}

dart/README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -93,35 +93,35 @@ fory.register($EnumFoo, "example.EnumFoo");
9393

9494
Fory Dart currently supports the following type mappings in XLANG mode:
9595

96-
| Fory Type | Dart Type |
97-
|----------------------------|------------------------------------------------|
98-
| bool | bool |
99-
| int8 | fory.Int8 |
100-
| int16 | fory.Int16 |
101-
| int32 | fory.Int32 |
102-
| var_int32 | fory.Int32 |
103-
| int64 | int |
104-
| var_int64 | int |
105-
| sli_int64 | int |
106-
| float32 | fory.Float32 |
107-
| float64 | double |
108-
| string | String |
109-
| enum | Enum |
110-
| named_enum | Enum |
111-
| named_struct | class |
112-
| list | List |
113-
| set | Set (LinkedHashSet, HashSet, SplayTreeSet) |
114-
| map | Map (LinkedHashMap, HashMap, SplayTreeMap) |
115-
| timestamp | fory.TimeStamp |
116-
| local_date | fory.LocalDate |
117-
| binary | Uint8List |
118-
| bool_array | BoolList |
119-
| int8_array | Int8List |
120-
| int16_array | Int16List |
121-
| int32_array | Int32List |
122-
| int64_array | Int64List |
123-
| float32_array | Float32List |
124-
| float64_array | Float64List |
96+
| Fory Type | Dart Type |
97+
| ------------- | ------------------------------------------ |
98+
| bool | bool |
99+
| int8 | fory.Int8 |
100+
| int16 | fory.Int16 |
101+
| int32 | fory.Int32 |
102+
| var_int32 | fory.Int32 |
103+
| int64 | int |
104+
| var_int64 | int |
105+
| sli_int64 | int |
106+
| float32 | fory.Float32 |
107+
| float64 | double |
108+
| string | String |
109+
| enum | Enum |
110+
| named_enum | Enum |
111+
| named_struct | class |
112+
| list | List |
113+
| set | Set (LinkedHashSet, HashSet, SplayTreeSet) |
114+
| map | Map (LinkedHashMap, HashMap, SplayTreeMap) |
115+
| timestamp | fory.TimeStamp |
116+
| local_date | fory.LocalDate |
117+
| binary | Uint8List |
118+
| bool_array | BoolList |
119+
| int8_array | Int8List |
120+
| int16_array | Int16List |
121+
| int32_array | Int32List |
122+
| int64_array | Int64List |
123+
| float32_array | Float32List |
124+
| float64_array | Float64List |
125125

126126
## Project Structure
127127

dart/packages/fory-test/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Testing Approach
32

43
The test suite is inspired by Fory Java's testing approach and includes:

dart/packages/fory/README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -93,35 +93,35 @@ fory.register($EnumFoo, "example.EnumFoo");
9393

9494
Fory Dart currently supports the following type mappings in XLANG mode:
9595

96-
| Fory Type | Dart Type |
97-
|----------------------------|------------------------------------------------|
98-
| bool | bool |
99-
| int8 | fory.Int8 |
100-
| int16 | fory.Int16 |
101-
| int32 | fory.Int32 |
102-
| var_int32 | fory.Int32 |
103-
| int64 | int |
104-
| var_int64 | int |
105-
| sli_int64 | int |
106-
| float32 | fory.Float32 |
107-
| float64 | double |
108-
| string | String |
109-
| enum | Enum |
110-
| named_enum | Enum |
111-
| named_struct | class |
112-
| list | List |
113-
| set | Set (LinkedHashSet, HashSet, SplayTreeSet) |
114-
| map | Map (LinkedHashMap, HashMap, SplayTreeMap) |
115-
| timestamp | fory.TimeStamp |
116-
| local_date | fory.LocalDate |
117-
| binary | Uint8List |
118-
| bool_array | BoolList |
119-
| int8_array | Int8List |
120-
| int16_array | Int16List |
121-
| int32_array | Int32List |
122-
| int64_array | Int64List |
123-
| float32_array | Float32List |
124-
| float64_array | Float64List |
96+
| Fory Type | Dart Type |
97+
| ------------- | ------------------------------------------ |
98+
| bool | bool |
99+
| int8 | fory.Int8 |
100+
| int16 | fory.Int16 |
101+
| int32 | fory.Int32 |
102+
| var_int32 | fory.Int32 |
103+
| int64 | int |
104+
| var_int64 | int |
105+
| sli_int64 | int |
106+
| float32 | fory.Float32 |
107+
| float64 | double |
108+
| string | String |
109+
| enum | Enum |
110+
| named_enum | Enum |
111+
| named_struct | class |
112+
| list | List |
113+
| set | Set (LinkedHashSet, HashSet, SplayTreeSet) |
114+
| map | Map (LinkedHashMap, HashMap, SplayTreeMap) |
115+
| timestamp | fory.TimeStamp |
116+
| local_date | fory.LocalDate |
117+
| binary | Uint8List |
118+
| bool_array | BoolList |
119+
| int8_array | Int8List |
120+
| int16_array | Int16List |
121+
| int32_array | Int32List |
122+
| int64_array | Int64List |
123+
| float32_array | Float32List |
124+
| float64_array | Float64List |
125125

126126
## Project Structure
127127

0 commit comments

Comments
 (0)