Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: continue node binding #43

Draft
wants to merge 72 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8ec15a4
chore: move `prefer_small_random`
darkskygit Jul 9, 2024
023b243
feat: fix test runner in new node version
darkskygit Jul 1, 2024
67db981
feat: impl common fn for array
darkskygit Jul 1, 2024
31397fb
chore: reorganize yjs's type define
darkskygit Jul 1, 2024
d8e7892
chore: rename export name similar to yjs
darkskygit Jul 1, 2024
043f144
feat: add utils for updates
darkskygit Jul 2, 2024
c2e3f52
feat: export more funcs
darkskygit Jul 2, 2024
53853f4
feat: export new utils functions
darkskygit Jul 2, 2024
9f2873d
feat: impl iterator for array
darkskygit Jul 2, 2024
5759562
feat: match more func signature
darkskygit Jul 3, 2024
d47d6e8
test: integrate yarray test
darkskygit Jul 3, 2024
7c861a2
fix: either type cannot match after rename
darkskygit Jul 3, 2024
ac3cff4
chore: match client id behaver
darkskygit Jul 4, 2024
471fcfd
feat: deep compare for doc
darkskygit Jul 4, 2024
412f844
feat: impl yjs apis
darkskygit Jul 4, 2024
ac0f325
chore: integrate ava tester
darkskygit Jul 5, 2024
ddd2ca5
fix: make map.insert's behaver same as yjs
darkskygit Jul 5, 2024
dff610c
chore: copy new test from yjs
darkskygit Jul 8, 2024
ff50679
feat: add some compatibility for yjs's api
darkskygit Jul 8, 2024
85fc8ae
feat: compare ids & test typing fix
darkskygit Jul 8, 2024
097c82f
feat: improve create text & map error handle
darkskygit Jul 8, 2024
fc4120b
feat: cascade Insert correctly
darkskygit Jul 8, 2024
b123a45
feat: map api simulate
darkskygit Jul 9, 2024
b60c673
feat: fix more tests
darkskygit Jul 9, 2024
4bd4ec8
chore: organize y-protocol typing
darkskygit Jul 9, 2024
3567b64
feat: init awaress binding
darkskygit Jul 11, 2024
dda49f7
feat: awareness states
darkskygit Jul 11, 2024
7de07e2
chore: update deps
darkskygit Aug 19, 2024
8db17b1
feat: add un-integrated yarray api support
darkskygit Aug 19, 2024
fcd1c69
chore: enable more test case
darkskygit Aug 20, 2024
30f1e5b
chore: rename output
darkskygit Jul 29, 2024
ceef5e0
feat: switch to js wrapper
darkskygit Aug 29, 2024
42102e3
feat: y protocol
darkskygit Aug 30, 2024
fbbb5b1
feat: state differ
darkskygit Aug 30, 2024
4813061
feat: update event in js level
darkskygit Aug 30, 2024
257b2db
feat: replace yprotocol
darkskygit Sep 2, 2024
711da92
chore: fix generate typing
darkskygit Sep 2, 2024
4ca6803
feat: rename protocol
darkskygit Sep 2, 2024
06e97a4
feat: add protocol wrapper
darkskygit Sep 3, 2024
a4c6561
fix: trigger diff logic
darkskygit Sep 3, 2024
34e8cd2
feat: apply update
darkskygit Sep 3, 2024
78f8549
fix: get ytype
darkskygit Sep 3, 2024
9a3ce67
feat: enable more test
darkskygit Sep 4, 2024
c697b52
chore: impl ytype convert
darkskygit Sep 4, 2024
8036477
feat: integrate mixed ytype convert
darkskygit Sep 4, 2024
f8ad20e
fix: should skip deleted items at find index
darkskygit Sep 4, 2024
2f408e8
feat: distinguish between null and undefined
darkskygit Sep 5, 2024
3f26852
feat: improve test helper's assert & typing
darkskygit Sep 5, 2024
3987535
feat: enable more array test
darkskygit Sep 5, 2024
a96bed7
feat: remove node test
darkskygit Sep 5, 2024
2d18777
feat: should return undefined if value not exists
darkskygit Sep 5, 2024
b81a19a
chore: fix typing
darkskygit Sep 6, 2024
482aa2e
feat: item id getter of array
darkskygit Sep 6, 2024
dcc90a4
feat: cascading value convert
darkskygit Sep 6, 2024
b83841f
feat: rename toJSON
darkskygit Sep 6, 2024
02e7006
feat: improve abstract type check
darkskygit Sep 6, 2024
55018ac
feat: merge MixedYType converter
darkskygit Sep 6, 2024
affb613
feat: enable more test case
darkskygit Sep 9, 2024
5643c3c
feat: improve map callback typing
darkskygit Sep 9, 2024
570b0e5
chore: cleanup codes
darkskygit Sep 9, 2024
4edaef1
chore: cleanup import
darkskygit Sep 9, 2024
7ea2197
feat: reorganize utils
darkskygit Sep 9, 2024
856669d
chore: cleanup codes
darkskygit Sep 9, 2024
c78da2a
chore: copy new tests from yjs
darkskygit Sep 10, 2024
391bd7b
feat: improve source bundle
darkskygit Sep 10, 2024
1b561c8
feat: bundle ts after build binding
darkskygit Sep 10, 2024
4f6ee2e
chore: fix build warning
darkskygit Sep 10, 2024
f4354f4
chore: split project
darkskygit Sep 10, 2024
a9ae042
feat: split modules
darkskygit Sep 11, 2024
8e4dcdc
feat: make client id conflict behavior same as yjs
darkskygit Sep 12, 2024
e6a7f02
feat: allow empty root id
darkskygit Sep 12, 2024
e95bef9
fix: ci
darkskygit Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/y-octo-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: y-octo.${{ matrix.settings.target }}.node
path: ./y-octo-node/*.node
path: ./y-octo-node/dist
if-no-files-found: error

test-node:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: y-octo.${{ matrix.settings.target }}.node
path: ./y-octo-node
path: ./y-octo-node/dist
- name: Run node binding tests
run: ls -lah & ls -lah tests
working-directory: y-octo-node
Expand Down
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ target
y-octo/README.md
.cargo
vendor
index.d.ts
index.js
yocto.d.ts
yocto.js
.coverage
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

members = [
"y-octo",
"y-octo-node",
"y-octo-node/native",
"y-octo-utils",
"y-octo-utils/yrs-is-unsafe",
]
Expand Down
86 changes: 45 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"format:rs": "cargo +nightly-2024-07-06 fmt --all"
},
"devDependencies": {
"@taplo/cli": "^0.5.2",
"@taplo/cli": "^0.7.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.0",
"npm-run-all": "^4.1.5",
Expand All @@ -41,45 +41,49 @@
]
},
"resolutions": {
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@latest",
"arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@latest",
"available-typed-arrays": "npm:@nolyfill/available-typed-arrays@latest",
"define-properties": "npm:@nolyfill/define-properties@latest",
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@latest",
"function-bind": "npm:@nolyfill/function-bind@latest",
"function.prototype.name": "npm:@nolyfill/function.prototype.name@latest",
"get-symbol-description": "npm:@nolyfill/get-symbol-description@latest",
"globalthis": "npm:@nolyfill/globalthis@latest",
"gopd": "npm:@nolyfill/gopd@latest",
"has": "npm:@nolyfill/has@latest",
"has-property-descriptors": "npm:@nolyfill/has-property-descriptors@latest",
"has-proto": "npm:@nolyfill/has-proto@latest",
"has-symbols": "npm:@nolyfill/has-symbols@latest",
"has-tostringtag": "npm:@nolyfill/has-tostringtag@latest",
"internal-slot": "npm:@nolyfill/internal-slot@latest",
"is-array-buffer": "npm:@nolyfill/is-array-buffer@latest",
"is-date-object": "npm:@nolyfill/is-date-object@latest",
"is-regex": "npm:@nolyfill/is-regex@latest",
"is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@latest",
"is-string": "npm:@nolyfill/is-string@latest",
"is-symbol": "npm:@nolyfill/is-symbol@latest",
"is-weakref": "npm:@nolyfill/is-weakref@latest",
"object-keys": "npm:@nolyfill/object-keys@latest",
"object.assign": "npm:@nolyfill/object.assign@latest",
"regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@latest",
"safe-array-concat": "npm:@nolyfill/safe-array-concat@latest",
"safe-regex-test": "npm:@nolyfill/safe-regex-test@latest",
"side-channel": "npm:@nolyfill/side-channel@latest",
"string.prototype.padend": "npm:@nolyfill/string.prototype.padend@latest",
"string.prototype.trim": "npm:@nolyfill/string.prototype.trim@latest",
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@latest",
"string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@latest",
"typed-array-buffer": "npm:@nolyfill/typed-array-buffer@latest",
"typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@latest",
"typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@latest",
"typed-array-length": "npm:@nolyfill/typed-array-length@latest",
"unbox-primitive": "npm:@nolyfill/unbox-primitive@latest",
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@latest",
"which-typed-array": "npm:@nolyfill/which-typed-array@latest"
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@^1",
"arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@^1",
"available-typed-arrays": "npm:@nolyfill/available-typed-arrays@^1",
"define-properties": "npm:@nolyfill/define-properties@^1",
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@^1",
"function-bind": "npm:@nolyfill/function-bind@^1",
"function.prototype.name": "npm:@nolyfill/function.prototype.name@^1",
"get-symbol-description": "npm:@nolyfill/get-symbol-description@^1",
"globalthis": "npm:@nolyfill/globalthis@^1",
"gopd": "npm:@nolyfill/gopd@^1",
"has-property-descriptors": "npm:@nolyfill/has-property-descriptors@^1",
"has-proto": "npm:@nolyfill/has-proto@^1",
"has-symbols": "npm:@nolyfill/has-symbols@^1",
"has-tostringtag": "npm:@nolyfill/has-tostringtag@^1",
"hasown": "npm:@nolyfill/hasown@^1",
"internal-slot": "npm:@nolyfill/internal-slot@^1",
"is-array-buffer": "npm:@nolyfill/is-array-buffer@^1",
"is-core-module": "npm:@nolyfill/is-core-module@^1",
"is-date-object": "npm:@nolyfill/is-date-object@^1",
"is-regex": "npm:@nolyfill/is-regex@^1",
"is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@^1",
"is-string": "npm:@nolyfill/is-string@^1",
"is-symbol": "npm:@nolyfill/is-symbol@^1",
"is-typed-array": "npm:@nolyfill/is-typed-array@^1",
"is-weakref": "npm:@nolyfill/is-weakref@^1",
"isarray": "npm:@nolyfill/isarray@^1",
"object-keys": "npm:@nolyfill/object-keys@^1",
"object.assign": "npm:@nolyfill/object.assign@^1",
"regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@^1",
"safe-array-concat": "npm:@nolyfill/safe-array-concat@^1",
"safe-regex-test": "npm:@nolyfill/safe-regex-test@^1",
"set-function-length": "npm:@nolyfill/set-function-length@^1",
"side-channel": "npm:@nolyfill/side-channel@^1",
"string.prototype.padend": "npm:@nolyfill/string.prototype.padend@^1",
"string.prototype.trim": "npm:@nolyfill/string.prototype.trim@^1",
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1",
"string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@^1",
"typed-array-buffer": "npm:@nolyfill/typed-array-buffer@^1",
"typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@^1",
"typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@^1",
"typed-array-length": "npm:@nolyfill/typed-array-length@^1",
"unbox-primitive": "npm:@nolyfill/unbox-primitive@^1",
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@^1",
"which-typed-array": "npm:@nolyfill/which-typed-array@^1"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

// Projects
"composite": true,
"incremental": true,
// "incremental": true,

// Completeness
"skipLibCheck": true, // skip all type checks for .d.ts files
Expand Down
1 change: 1 addition & 0 deletions y-octo-node/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/lib
*.node
.coverage
48 changes: 0 additions & 48 deletions y-octo-node/index.d.ts

This file was deleted.

Loading
Loading