Skip to content

Commit 72fd91c

Browse files
authored
chore(javascript): rename foryjs to apache-fory and remove install docs (#2544)
<!-- **Thanks for contributing to Fory.** **If this is your first time opening a PR on fory, you can refer to [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).** Contribution Checklist - The **Apache Fory** community has requirements on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md). - Fory has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here. --> ## Why? <!-- Describe the purpose of this PR. --> ## What does this PR do? <!-- Describe the details of this PR. --> ## Related issues <!-- Is there any related issue? If this PR closes them you say say fix/closes: - #xxxx0 - #xxxx1 - Fixes #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. Delete section if not applicable. --> - [ ] 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. Delete section if not applicable. -->
1 parent bdf7faf commit 72fd91c

File tree

10 files changed

+30
-43
lines changed

10 files changed

+30
-43
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@ libraryDependencies += "org.apache.fory" % "fory-scala_3" % "0.12.0"
162162
pip install pyfory
163163
```
164164

165-
### JavaScript
166-
167-
```bash
168-
npm install @foryjs/fory
169-
```
170-
171165
### Golang
172166

173167
```bash

docs/guide/xlang_serialization_guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ func main() {
109109
**JavaScript**
110110

111111
```javascript
112-
import Fory from "@foryjs/fory";
112+
import Fory from "@apache-fory/fory";
113113

114114
/**
115-
* @foryjs/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
115+
* @apache-fory/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
116116
* Experimental feature, installation success cannot be guaranteed at this moment
117117
* If you are unable to install the module, replace it with `const hps = null;`
118118
**/
119-
import hps from "@foryjs/hps";
119+
import hps from "@apache-fory/hps";
120120

121121
const fory = new Fory({ hps });
122122
const input = fory.serialize("hello fory");
@@ -328,14 +328,14 @@ func main() {
328328
**JavaScript**
329329

330330
```javascript
331-
import Fory, { Type, InternalSerializerType } from "@foryjs/fory";
331+
import Fory, { Type, InternalSerializerType } from "@apache-fory/fory";
332332

333333
/**
334-
* @foryjs/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
334+
* @apache-fory/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
335335
* Experimental feature, installation success cannot be guaranteed at this moment
336336
* If you are unable to install the module, replace it with `const hps = null;`
337337
**/
338-
import hps from "@foryjs/hps";
338+
import hps from "@apache-fory/hps";
339339

340340
// Now we describe data structures using JSON, but in the future, we will use more ways.
341341
const description = Type.object("example.foo", {
@@ -502,13 +502,13 @@ func main() {
502502
**JavaScript**
503503

504504
```javascript
505-
import Fory, { Type } from '@foryjs/fory';
505+
import Fory, { Type } from '@apache-fory/fory';
506506
/**
507-
* @foryjs/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
507+
* @apache-fory/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
508508
* Experimental feature, installation success cannot be guaranteed at this moment
509509
* If you are unable to install the module, replace it with `const hps = null;`
510510
**/
511-
import hps from '@foryjs/hps';
511+
import hps from '@apache-fory/hps';
512512

513513
const description = Type.object('example.foo', {
514514
foo: Type.string(),

javascript/README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,17 @@ Javascript implementation for the Fory protocol.
44

55
The Cross-Language part of the protocol is not stable, so the output of this library may change in the future. Please be cautious when using it in a production environment.
66

7-
## Install
8-
9-
```shell
10-
npm install @foryjs/fory
11-
npm install @foryjs/hps
12-
```
13-
147
## Usage
158

169
```Javascript
17-
import Fory, { Type, InternalSerializerType } from '@foryjs/fory';
10+
import Fory, { Type, InternalSerializerType } from '@apache-fory/fory';
1811

1912
/**
20-
* @foryjs/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
13+
* @apache-fory/hps use v8's fast-calls-api that can be called directly by jit, ensure that the version of Node is 20 or above.
2114
* Experimental feature, installation success cannot be guaranteed at this moment
2215
* If you are unable to install the module, replace it with `const hps = null;`
2316
**/
24-
import hps from '@foryjs/hps';
17+
import hps from '@apache-fory/hps';
2518

2619
// Now we describe data structures using JSON, but in the future, we will use more ways.
2720
const typeInfo = Type.struct('example.foo', {

javascript/benchmark/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* under the License.
1818
*/
1919

20-
const Fory = require("@foryjs/fory");
21-
const utils = require("@foryjs/fory/dist/lib/util");
22-
const hps = require('@foryjs/hps').default;
20+
const Fory = require("@apache-fory/fory");
21+
const utils = require("@apache-fory/fory/dist/lib/util");
22+
const hps = require('@apache-fory/hps').default;
2323
const fory = new Fory.default({ hps, refTracking: false, useSliceString: true });
2424
const Benchmark = require("benchmark");
2525
const protobuf = require("protobufjs");

javascript/benchmark/map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* under the License.
1818
*/
1919

20-
const Fory = require("@foryjs/fory");
20+
const Fory = require("@apache-fory/fory");
2121
const beautify = require("js-beautify");
22-
const hps = require('@foryjs/hps');
22+
const hps = require('@apache-fory/hps');
2323
const fory = new Fory.default({
2424
hps, refTracking: false, useSliceString: true, hooks: {
2525
afterCodeGenerated: (code) => {

javascript/benchmark/platform-buffer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
const { BrowserBuffer } = require('@foryjs/fory/dist/lib/platformBuffer')
20+
const { BrowserBuffer } = require('@apache-fory/fory/dist/lib/platformBuffer')
2121
const Benchmark = require("benchmark");
2222
const { spawn } = require("child_process");
2323

@@ -55,8 +55,8 @@ async function start() {
5555
});
5656
})
5757
.run({ async: false });
58-
console.log("Write operation per second")
59-
console.table(result.writeComparison);
58+
console.log("Write operation per second")
59+
console.table(result.writeComparison);
6060
}
6161

6262
{
@@ -79,8 +79,8 @@ async function start() {
7979
});
8080
})
8181
.run({ async: false });
82-
console.log("toString operation per second")
83-
console.table(result.toStringComparison);
82+
console.log("toString operation per second")
83+
console.table(result.toStringComparison);
8484
}
8585

8686
const args = ['platform-buffer-draw.py', result.writeComparison['browser utf8Write'], result.writeComparison['browser write'], result.writeComparison['native write'], result.toStringComparison['browser toString'], result.toStringComparison['native toString']];

javascript/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

javascript/packages/fory/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@foryjs/fory",
2+
"name": "@apache-fory/fory",
33
"version": "0.13.0.dev",
44
"description": "Apache Fory™ is a blazingly fast multi-language serialization framework powered by jit and zero-copy",
55
"main": "dist/index.js",

javascript/packages/hps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@foryjs/hps",
2+
"name": "@apache-fory/hps",
33
"version": "0.13.0.dev",
44
"description": "Apache Fory™ nodejs high-performance suite",
55
"main": "dist/index.js",

javascript/test/hps.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { BinaryReader } from '@foryjs/fory';
20+
import { BinaryReader } from '@apache-fory/fory';
2121
import hps from '../packages/hps/index';
2222
import { describe, expect, test } from '@jest/globals';
2323

0 commit comments

Comments
 (0)