Skip to content

Commit c4fcbf8

Browse files
authored
Merge pull request #582 from streamich/next
next major release
2 parents dcf1086 + 02c58ab commit c4fcbf8

File tree

718 files changed

+677
-42634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

718 files changed

+677
-42634
lines changed

.github/workflows/pr.yml

+3-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Node.js CI
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master, next ]
66

77
concurrency:
88
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -36,7 +36,7 @@ jobs:
3636
node-version: ${{ matrix.node-version }}
3737
cache: yarn
3838
- run: yarn install --frozen-lockfile
39-
- run: yarn build
39+
- run: yarn build:all
4040
- run: yarn lint
4141
- run: yarn prettier:check
4242
- run: yarn test:cli:pointer
@@ -45,17 +45,4 @@ jobs:
4545
- run: yarn demo:json-patch
4646
- run: yarn demo:json-pointer
4747
- run: yarn typedoc
48-
e2e-rx-rpc:
49-
runs-on: ubuntu-latest
50-
strategy:
51-
matrix:
52-
node-version: [20.x]
53-
steps:
54-
- uses: actions/checkout@v3
55-
- name: Use Node.js ${{ matrix.node-version }}
56-
uses: actions/setup-node@v3
57-
with:
58-
node-version: ${{ matrix.node-version }}
59-
cache: yarn
60-
- run: yarn install --frozen-lockfile
61-
- run: yarn test:reactive-rpc
48+

.github/workflows/release.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, next ]
66

77
jobs:
88
release:
@@ -29,7 +29,6 @@ jobs:
2929
- run: yarn test:cli:pack
3030
- run: yarn demo:json-patch
3131
- run: yarn demo:json-pointer
32-
- run: yarn test:reactive-rpc
3332
- name: Semantic Release
3433
uses: cycjimmy/semantic-release-action@v4
3534
env:

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ merging of changes in JSON data models, avoiding conflicts between replicas.
4646
- Very fast binary tree (Radix, AVL, Red-black*, Splay) implementations in JavaScript.
4747
- Very fast JSON Patch (and JSON Pointer) implementation in JavaScript, including many non-standard operations, and JSON Predicate implementation.
4848
- Very fast JSON Expression implementation in JavaScript.
49-
- JSON Reactive RPC protocol (RPC with server push) implementation, for real-time collaborative apps.
5049

5150

5251
[json-joy]: https://jsonjoy.com

bin/jj.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/jj");
4+
require("../lib/json-cli/jj");

bin/json-pack-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-pack-test");
4+
require("../lib/json-cli/json-pack-test");

bin/json-pack.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-pack");
4+
require("../lib/json-cli/json-pack");

bin/json-patch-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-patch-test");
4+
require("../lib/json-cli/json-patch-test");

bin/json-patch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-patch");
4+
require("../lib/json-cli/json-patch");

bin/json-pointer-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-pointer-test");
4+
require("../lib/json-cli/json-pointer-test");

bin/json-pointer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-pointer");
4+
require("../lib/json-cli/json-pointer");

bin/json-unpack.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

33
// eslint-disable-next-line import/no-unassigned-import
4-
require("../es2020/json-cli/json-unpack");
4+
require("../lib/json-cli/json-unpack");

package.json

+62-73
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,66 @@
11
{
22
"name": "json-joy",
33
"version": "11.2.0",
4-
"description": "",
4+
"description": "Collection of libraries for building collaborative editing apps.",
55
"author": {
66
"name": "streamich",
77
"url": "https://github.com/streamich"
88
},
99
"homepage": "https://github.com/streamich/json-joy",
1010
"repository": "streamich/json-joy",
1111
"license": "Apache-2.0",
12-
"funding": "https://github.com/sponsors/streamich",
12+
"funding": {
13+
"type": "github",
14+
"url": "https://github.com/sponsors/streamich"
15+
},
1316
"engines": {
1417
"node": ">=10.0"
1518
},
19+
"keywords": [
20+
"collaborative",
21+
"multiplayer",
22+
"local-first",
23+
"localfirst",
24+
"crdt",
25+
"rdt",
26+
"ot",
27+
"operational-transformation",
28+
"replicated",
29+
"sync",
30+
"synchronization",
31+
"distributed-state",
32+
"marshaling",
33+
"serializations",
34+
"json-patch",
35+
"json-binary",
36+
"json-brand",
37+
"json-cli",
38+
"json-clone",
39+
"json-crdt-patch",
40+
"json-crdt-extensions",
41+
"json-crdt-peritext-ui",
42+
"json-crdt",
43+
"json-equal",
44+
"json-expression",
45+
"json-hash",
46+
"json-ot",
47+
"json-pack",
48+
"json-patch-multicore",
49+
"json-patch-ot",
50+
"json-patch",
51+
"json-pointer",
52+
"json-random",
53+
"json-schema",
54+
"json-size",
55+
"json-stable",
56+
"json-text",
57+
"json-type",
58+
"json-type-value",
59+
"json-walk"
60+
],
1661
"main": "lib/index.js",
17-
"module": "esm/index.js",
62+
"types": "lib/index.d.ts",
63+
"typings": "lib/index.d.ts",
1864
"bin": {
1965
"jj": "./bin/jj.js",
2066
"json-pack": "./bin/json-pack.js",
@@ -27,10 +73,7 @@
2773
},
2874
"files": [
2975
"LICENSE",
30-
"lib/",
31-
"es6/",
32-
"es2020/",
33-
"esm/"
76+
"lib/"
3477
],
3578
"scripts": {
3679
"prettier": "prettier --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"",
@@ -39,33 +82,26 @@
3982
"lint:fix": "yarn tslint --fix",
4083
"tslint": "tslint 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .",
4184
"clean": "rimraf lib es6 es2019 es2020 esm typedocs coverage gh-pages yarn-error.log",
42-
"build:cjs": "tsc --project tsconfig.build.json",
43-
"build:es6": "tsc --project tsconfig.build.json --module commonjs --target es6 --outDir es6",
44-
"build:es2020": "tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir es2020",
45-
"build:esm": "tsc --project tsconfig.build.json --module ESNext --target ESNEXT --outDir esm",
46-
"build:all": "concurrently \"yarn build:cjs\" \"yarn build:es6\" \"yarn build:es2020\" \"yarn build:esm\"",
85+
"build:es2020": "tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib",
86+
"build:all": "concurrently \"yarn build:es2020\"",
4787
"build": "yarn build:es2020",
4888
"jest": "node -r ts-node/register ./node_modules/.bin/jest",
4989
"test": "jest --maxWorkers 7",
50-
"test:all": "yarn lint && yarn test && yarn build:all && yarn test:cli:pointer && yarn test:cli:patch && yarn test:cli:pack && yarn test:reactive-rpc && yarn demo:json-patch && yarn demo:json-pointer",
90+
"test:all": "yarn lint && yarn test && yarn build:all && yarn test:cli:pointer && yarn test:cli:patch && yarn test:cli:pack && yarn demo:json-patch && yarn demo:json-pointer",
5191
"test:ci": "yarn jest --maxWorkers 3 --no-cache",
5292
"test:cli": "yarn test:cli:pointer && yarn test:cli:patch && yarn test:cli:pack",
5393
"test:cli:pointer": "./bin/json-pointer-test.js ./bin/json-pointer.js",
5494
"test:cli:patch": "./bin/json-patch-test.js ./bin/json-patch.js",
5595
"test:cli:pack": "./bin/json-pack-test.js ./bin/json-pack.js",
56-
"test:reactive-rpc": "node -r ts-node/register/transpile-only src/reactive-rpc/__tests__/e2e/run.ts",
57-
"test:reactive-rpc:jest": "TEST_E2E=1 jest --maxWorkers 1 --no-cache src/reactive-rpc/__tests__/e2e/",
5896
"demo:json-patch": "ts-node src/json-patch/__demos__/json-patch.ts",
5997
"demo:json-pointer": "ts-node src/json-pointer/__demos__/json-pointer.ts",
60-
"demo:reactive-rpc:server": "ts-node src/reactive-rpc/__demos__/server.ts",
6198
"coverage": "yarn test --collectCoverage",
6299
"typedoc": "typedoc",
63100
"build:pages": "rimraf gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage",
64101
"deploy:pages": "gh-pages -d gh-pages",
65102
"publish-coverage-and-typedocs": "yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages",
66103
"jj": "ts-node src/json-cli/jj.ts"
67104
},
68-
"keywords": [],
69105
"peerDependencies": {
70106
"quill-delta": "^5",
71107
"rxjs": "7",
@@ -80,6 +116,9 @@
80116
}
81117
},
82118
"dependencies": {
119+
"@jsonjoy.com/base64": "^1.1.1",
120+
"@jsonjoy.com/json-pack": "^1.0.2",
121+
"@jsonjoy.com/util": "^1.0.0",
83122
"arg": "^5.0.2",
84123
"hyperdyperid": "^1.2.0",
85124
"multibase": "^4.0.6",
@@ -89,74 +128,36 @@
89128
"@automerge/automerge": "2.1.7",
90129
"@collabs/collabs": "0.13.4",
91130
"@exodus/schemasafe": "^1.0.0-rc.6",
92-
"@msgpack/msgpack": "^3.0.0-beta2",
93-
"@redis/client": "^1.5.12",
94-
"@shelacek/ubjson": "^1.1.1",
95131
"@types/benchmark": "^2.1.2",
96132
"@types/jest": "^29.5.12",
97-
"@types/quill": "^2.0.10",
98-
"@types/react": "^18.2.7",
99-
"@types/react-dom": "^18.2.4",
133+
"@types/quill": "^2.0.14",
100134
"ajv": "^8.11.0",
101135
"app-root-path": "^3.1.0",
102136
"axios": "^1.3.5",
103-
"base64-js": "^1.5.1",
104137
"benchmark": "^2.1.4",
105-
"bson": "^5.4.0",
106-
"cbor": "^8.1.0",
107-
"cbor-js": "^0.1.0",
108-
"cbor-sync": "^1.0.4",
109-
"cbor-x": "^1.3.0",
110-
"cborg": "^2.0.3",
111138
"concurrently": "^8.0.1",
112139
"diamond-types-node": "1.0.2",
113140
"editing-traces": "https://github.com/streamich/editing-traces#6494020428530a6e382378b98d1d7e31334e2d7b",
114-
"eventsource": "^2.0.2",
115-
"fast-deep-equal": "^3.1.3",
116-
"fast-equals": "^5.0.1",
117141
"fast-json-patch": "^3.0.0-1",
118-
"fast-safe-stringify": "^2.1.1",
119-
"fast-stable-stringify": "^1.0.0",
120-
"fastest-stable-stringify": "^2.0.2",
121-
"find-my-way": "^7.6.0",
122142
"fork-ts-checker-webpack-plugin": "^8.0.0",
123143
"gh-pages": "^5.0.0",
124144
"html-webpack-plugin": "^5.5.1",
125145
"husky": "^8.0.3",
126-
"ion-js": "^4.3.0",
127146
"isomorphic-ws": "^5.0.0",
128147
"jest": "^29.7.0",
129-
"js-base64": "^3.7.2",
130148
"js-sdsl": "^4.4.0",
131-
"jsbi": "^4.3.0",
132149
"json-crdt-traces": "https://github.com/streamich/json-crdt-traces#ec825401dc05cbb74b9e0b3c4d6527399f54d54d",
133150
"json-logic-js": "^2.0.1",
134-
"json-pack-napi": "^0.0.2",
135-
"load-script": "^2.0.0",
136-
"lodash": "^4.17.21",
137151
"loro-crdt": "^0.4.1",
138-
"markdown-it": "^13.0.1",
139-
"memfs": "^4.8.1",
140-
"messagepack": "^1.1.12",
141-
"msgpack-lite": "^0.1.26",
142-
"msgpack5": "^6.0.2",
143-
"msgpackr": "^1.6.0",
144152
"nodemon": "^3.0.0",
145153
"ot-text": "^1.0.2",
146154
"ot-text-unicode": "^4.0.0",
147155
"p4-css": "^1.5.1",
148-
"pako": "^2.0.4",
149156
"prettier": "^3.2.5",
150157
"pretty-quick": "^3.1.3",
151158
"quill-delta": "^5.0.0",
152-
"react": "^18.2.0",
153-
"react-dom": "^18.2.0",
154-
"redis-parser": "^3.0.0",
155159
"rimraf": "^5.0.0",
156160
"rope.js": "0.1.0",
157-
"rxjs": "^7.5.5",
158-
"safe-stable-stringify": "^2.3.1",
159-
"secure-json-parse": "^2.4.0",
160161
"sorted-btree": "^1.8.1",
161162
"tinybench": "^2.4.0",
162163
"ts-jest": "^29.1.2",
@@ -165,19 +166,14 @@
165166
"tslib": "^2.6.2",
166167
"tslint": "^6.1.3",
167168
"tslint-config-common": "^1.6.2",
168-
"typedoc": "^0.25.12",
169-
"typescript": "^5.3.3",
170-
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.23.0",
171-
"webpack": "^5.84.1",
172-
"webpack-cli": "^5.1.1",
173-
"webpack-dev-server": "^4.15.0",
174-
"websocket": "^1.0.34",
175-
"ws": "^8.14.2",
169+
"typedoc": "^0.25.13",
170+
"typescript": "^5.4.4",
171+
"webpack": "^5.91.0",
172+
"webpack-cli": "^5.1.4",
173+
"webpack-dev-server": "^5.0.4",
176174
"yjs": "13.6.9",
177175
"ywasm": "0.16.10"
178176
},
179-
"types": "lib/index.d.ts",
180-
"typings": "lib/index.d.ts",
181177
"jest": {
182178
"verbose": true,
183179
"testEnvironmentOptions": {
@@ -213,32 +209,25 @@
213209
"scopes": [
214210
"",
215211
"demo",
216-
"json-binary",
217-
"json-brand",
218212
"json-cli",
219213
"json-clone",
220214
"json-crdt-patch",
221215
"json-crdt-extensions",
222216
"json-crdt-peritext-ui",
223217
"json-crdt",
224-
"json-equal",
225218
"json-expression",
226219
"json-hash",
227220
"json-ot",
228-
"json-pack",
229-
"json-patch-multicore",
230221
"json-patch-ot",
231222
"json-patch",
232223
"json-pointer",
233-
"json-random",
234224
"json-schema",
235225
"json-size",
236226
"json-stable",
237227
"json-text",
238228
"json-type",
239229
"json-type-value",
240230
"json-walk",
241-
"reactive-rpc",
242231
"util"
243232
]
244233
}

src/__tests__/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,3 @@ yarn test:cli:pointer
5656
yarn test:cli:patch
5757
yarn test:cli:pack
5858
```
59-
60-
### Reactive-RPC
61-
62-
`/src/__tests__/reactive-rcp/` folder contains E2E tests for Reactive-RPC server
63-
and its clients. See [README](./reactive-rpc/README.md) for more info.

src/__tests__/msgpack-documents.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {JsonPackExtension, JsonPackValue} from '../json-pack/msgpack';
2-
import {encodeFull} from '../json-pack/msgpack/util';
1+
import {JsonPackExtension, JsonPackValue} from '@jsonjoy.com/json-pack/lib/msgpack';
2+
import {encodeFull} from '@jsonjoy.com/json-pack/lib/msgpack/util';
33

44
export interface JsonDocument {
55
name: string;

0 commit comments

Comments
 (0)