Skip to content

Commit

Permalink
Merge pull request #582 from streamich/next
Browse files Browse the repository at this point in the history
next major release
  • Loading branch information
streamich authored Apr 20, 2024
2 parents dcf1086 + 02c58ab commit c4fcbf8
Show file tree
Hide file tree
Showing 718 changed files with 677 additions and 42,634 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js CI

on:
pull_request:
branches: [ master ]
branches: [ master, next ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn build:all
- run: yarn lint
- run: yarn prettier:check
- run: yarn test:cli:pointer
Expand All @@ -45,17 +45,4 @@ jobs:
- run: yarn demo:json-patch
- run: yarn demo:json-pointer
- run: yarn typedoc
e2e-rx-rpc:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn test:reactive-rpc

3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [ master, next ]

jobs:
release:
Expand All @@ -29,7 +29,6 @@ jobs:
- run: yarn test:cli:pack
- run: yarn demo:json-patch
- run: yarn demo:json-pointer
- run: yarn test:reactive-rpc
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ merging of changes in JSON data models, avoiding conflicts between replicas.
- Very fast binary tree (Radix, AVL, Red-black*, Splay) implementations in JavaScript.
- Very fast JSON Patch (and JSON Pointer) implementation in JavaScript, including many non-standard operations, and JSON Predicate implementation.
- Very fast JSON Expression implementation in JavaScript.
- JSON Reactive RPC protocol (RPC with server push) implementation, for real-time collaborative apps.


[json-joy]: https://jsonjoy.com
2 changes: 1 addition & 1 deletion bin/jj.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/jj");
require("../lib/json-cli/jj");
2 changes: 1 addition & 1 deletion bin/json-pack-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-pack-test");
require("../lib/json-cli/json-pack-test");
2 changes: 1 addition & 1 deletion bin/json-pack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-pack");
require("../lib/json-cli/json-pack");
2 changes: 1 addition & 1 deletion bin/json-patch-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-patch-test");
require("../lib/json-cli/json-patch-test");
2 changes: 1 addition & 1 deletion bin/json-patch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-patch");
require("../lib/json-cli/json-patch");
2 changes: 1 addition & 1 deletion bin/json-pointer-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-pointer-test");
require("../lib/json-cli/json-pointer-test");
2 changes: 1 addition & 1 deletion bin/json-pointer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-pointer");
require("../lib/json-cli/json-pointer");
2 changes: 1 addition & 1 deletion bin/json-unpack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line import/no-unassigned-import
require("../es2020/json-cli/json-unpack");
require("../lib/json-cli/json-unpack");
135 changes: 62 additions & 73 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,66 @@
{
"name": "json-joy",
"version": "11.2.0",
"description": "",
"description": "Collection of libraries for building collaborative editing apps.",
"author": {
"name": "streamich",
"url": "https://github.com/streamich"
},
"homepage": "https://github.com/streamich/json-joy",
"repository": "streamich/json-joy",
"license": "Apache-2.0",
"funding": "https://github.com/sponsors/streamich",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/streamich"
},
"engines": {
"node": ">=10.0"
},
"keywords": [
"collaborative",
"multiplayer",
"local-first",
"localfirst",
"crdt",
"rdt",
"ot",
"operational-transformation",
"replicated",
"sync",
"synchronization",
"distributed-state",
"marshaling",
"serializations",
"json-patch",
"json-binary",
"json-brand",
"json-cli",
"json-clone",
"json-crdt-patch",
"json-crdt-extensions",
"json-crdt-peritext-ui",
"json-crdt",
"json-equal",
"json-expression",
"json-hash",
"json-ot",
"json-pack",
"json-patch-multicore",
"json-patch-ot",
"json-patch",
"json-pointer",
"json-random",
"json-schema",
"json-size",
"json-stable",
"json-text",
"json-type",
"json-type-value",
"json-walk"
],
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"bin": {
"jj": "./bin/jj.js",
"json-pack": "./bin/json-pack.js",
Expand All @@ -27,10 +73,7 @@
},
"files": [
"LICENSE",
"lib/",
"es6/",
"es2020/",
"esm/"
"lib/"
],
"scripts": {
"prettier": "prettier --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"",
Expand All @@ -39,33 +82,26 @@
"lint:fix": "yarn tslint --fix",
"tslint": "tslint 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .",
"clean": "rimraf lib es6 es2019 es2020 esm typedocs coverage gh-pages yarn-error.log",
"build:cjs": "tsc --project tsconfig.build.json",
"build:es6": "tsc --project tsconfig.build.json --module commonjs --target es6 --outDir es6",
"build:es2020": "tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir es2020",
"build:esm": "tsc --project tsconfig.build.json --module ESNext --target ESNEXT --outDir esm",
"build:all": "concurrently \"yarn build:cjs\" \"yarn build:es6\" \"yarn build:es2020\" \"yarn build:esm\"",
"build:es2020": "tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib",
"build:all": "concurrently \"yarn build:es2020\"",
"build": "yarn build:es2020",
"jest": "node -r ts-node/register ./node_modules/.bin/jest",
"test": "jest --maxWorkers 7",
"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",
"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",
"test:ci": "yarn jest --maxWorkers 3 --no-cache",
"test:cli": "yarn test:cli:pointer && yarn test:cli:patch && yarn test:cli:pack",
"test:cli:pointer": "./bin/json-pointer-test.js ./bin/json-pointer.js",
"test:cli:patch": "./bin/json-patch-test.js ./bin/json-patch.js",
"test:cli:pack": "./bin/json-pack-test.js ./bin/json-pack.js",
"test:reactive-rpc": "node -r ts-node/register/transpile-only src/reactive-rpc/__tests__/e2e/run.ts",
"test:reactive-rpc:jest": "TEST_E2E=1 jest --maxWorkers 1 --no-cache src/reactive-rpc/__tests__/e2e/",
"demo:json-patch": "ts-node src/json-patch/__demos__/json-patch.ts",
"demo:json-pointer": "ts-node src/json-pointer/__demos__/json-pointer.ts",
"demo:reactive-rpc:server": "ts-node src/reactive-rpc/__demos__/server.ts",
"coverage": "yarn test --collectCoverage",
"typedoc": "typedoc",
"build:pages": "rimraf gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage",
"deploy:pages": "gh-pages -d gh-pages",
"publish-coverage-and-typedocs": "yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages",
"jj": "ts-node src/json-cli/jj.ts"
},
"keywords": [],
"peerDependencies": {
"quill-delta": "^5",
"rxjs": "7",
Expand All @@ -80,6 +116,9 @@
}
},
"dependencies": {
"@jsonjoy.com/base64": "^1.1.1",
"@jsonjoy.com/json-pack": "^1.0.2",
"@jsonjoy.com/util": "^1.0.0",
"arg": "^5.0.2",
"hyperdyperid": "^1.2.0",
"multibase": "^4.0.6",
Expand All @@ -89,74 +128,36 @@
"@automerge/automerge": "2.1.7",
"@collabs/collabs": "0.13.4",
"@exodus/schemasafe": "^1.0.0-rc.6",
"@msgpack/msgpack": "^3.0.0-beta2",
"@redis/client": "^1.5.12",
"@shelacek/ubjson": "^1.1.1",
"@types/benchmark": "^2.1.2",
"@types/jest": "^29.5.12",
"@types/quill": "^2.0.10",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"@types/quill": "^2.0.14",
"ajv": "^8.11.0",
"app-root-path": "^3.1.0",
"axios": "^1.3.5",
"base64-js": "^1.5.1",
"benchmark": "^2.1.4",
"bson": "^5.4.0",
"cbor": "^8.1.0",
"cbor-js": "^0.1.0",
"cbor-sync": "^1.0.4",
"cbor-x": "^1.3.0",
"cborg": "^2.0.3",
"concurrently": "^8.0.1",
"diamond-types-node": "1.0.2",
"editing-traces": "https://github.com/streamich/editing-traces#6494020428530a6e382378b98d1d7e31334e2d7b",
"eventsource": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"fast-equals": "^5.0.1",
"fast-json-patch": "^3.0.0-1",
"fast-safe-stringify": "^2.1.1",
"fast-stable-stringify": "^1.0.0",
"fastest-stable-stringify": "^2.0.2",
"find-my-way": "^7.6.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"gh-pages": "^5.0.0",
"html-webpack-plugin": "^5.5.1",
"husky": "^8.0.3",
"ion-js": "^4.3.0",
"isomorphic-ws": "^5.0.0",
"jest": "^29.7.0",
"js-base64": "^3.7.2",
"js-sdsl": "^4.4.0",
"jsbi": "^4.3.0",
"json-crdt-traces": "https://github.com/streamich/json-crdt-traces#ec825401dc05cbb74b9e0b3c4d6527399f54d54d",
"json-logic-js": "^2.0.1",
"json-pack-napi": "^0.0.2",
"load-script": "^2.0.0",
"lodash": "^4.17.21",
"loro-crdt": "^0.4.1",
"markdown-it": "^13.0.1",
"memfs": "^4.8.1",
"messagepack": "^1.1.12",
"msgpack-lite": "^0.1.26",
"msgpack5": "^6.0.2",
"msgpackr": "^1.6.0",
"nodemon": "^3.0.0",
"ot-text": "^1.0.2",
"ot-text-unicode": "^4.0.0",
"p4-css": "^1.5.1",
"pako": "^2.0.4",
"prettier": "^3.2.5",
"pretty-quick": "^3.1.3",
"quill-delta": "^5.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redis-parser": "^3.0.0",
"rimraf": "^5.0.0",
"rope.js": "0.1.0",
"rxjs": "^7.5.5",
"safe-stable-stringify": "^2.3.1",
"secure-json-parse": "^2.4.0",
"sorted-btree": "^1.8.1",
"tinybench": "^2.4.0",
"ts-jest": "^29.1.2",
Expand All @@ -165,19 +166,14 @@
"tslib": "^2.6.2",
"tslint": "^6.1.3",
"tslint-config-common": "^1.6.2",
"typedoc": "^0.25.12",
"typescript": "^5.3.3",
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.23.0",
"webpack": "^5.84.1",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^4.15.0",
"websocket": "^1.0.34",
"ws": "^8.14.2",
"typedoc": "^0.25.13",
"typescript": "^5.4.4",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"yjs": "13.6.9",
"ywasm": "0.16.10"
},
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"jest": {
"verbose": true,
"testEnvironmentOptions": {
Expand Down Expand Up @@ -213,32 +209,25 @@
"scopes": [
"",
"demo",
"json-binary",
"json-brand",
"json-cli",
"json-clone",
"json-crdt-patch",
"json-crdt-extensions",
"json-crdt-peritext-ui",
"json-crdt",
"json-equal",
"json-expression",
"json-hash",
"json-ot",
"json-pack",
"json-patch-multicore",
"json-patch-ot",
"json-patch",
"json-pointer",
"json-random",
"json-schema",
"json-size",
"json-stable",
"json-text",
"json-type",
"json-type-value",
"json-walk",
"reactive-rpc",
"util"
]
}
Expand Down
5 changes: 0 additions & 5 deletions src/__tests__/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,3 @@ yarn test:cli:pointer
yarn test:cli:patch
yarn test:cli:pack
```

### Reactive-RPC

`/src/__tests__/reactive-rcp/` folder contains E2E tests for Reactive-RPC server
and its clients. See [README](./reactive-rpc/README.md) for more info.
4 changes: 2 additions & 2 deletions src/__tests__/msgpack-documents.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {JsonPackExtension, JsonPackValue} from '../json-pack/msgpack';
import {encodeFull} from '../json-pack/msgpack/util';
import {JsonPackExtension, JsonPackValue} from '@jsonjoy.com/json-pack/lib/msgpack';
import {encodeFull} from '@jsonjoy.com/json-pack/lib/msgpack/util';

export interface JsonDocument {
name: string;
Expand Down
Loading

0 comments on commit c4fcbf8

Please sign in to comment.