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

Attempt to check cache #6763

Draft
wants to merge 62 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
aa1a4cd
wip
kneth May 30, 2024
46b13f6
Merge branch 'main' of github.com:realm/realm-js into feature/flx-pro…
gagik Jun 14, 2024
b0ea29c
WIP: useProgress
gagik Jun 17, 2024
1112c44
Merge branch 'main' of github.com:realm/realm-js into gagik/progress-…
gagik Jun 18, 2024
350cc26
Merge branch 'main' of github.com:realm/realm-js into gagik/progress-…
gagik Jun 19, 2024
48bef0c
update realm-core
gagik Jun 19, 2024
efd02c9
Merge branch 'main' of github.com:realm/realm-js into gagik/progress-…
gagik Jun 20, 2024
fcbcd02
test
gagik Jun 20, 2024
a17cdde
Merge branch 'main' into gagik/progress-notifications
gagik Jun 20, 2024
34f458f
Use main
gagik Jun 20, 2024
13f2800
build(deps): update package-lock.json and package.json
gagik Jun 20, 2024
ec3e8a4
Check sinon in CI
gagik Jun 21, 2024
468fe72
remove beforeeach import
gagik Jun 21, 2024
eb5f1ce
Add manual closing
gagik Jun 21, 2024
6663726
Check CI fix
gagik Jun 21, 2024
679adc4
Add better tests
gagik Jun 21, 2024
b6d9083
Delete
gagik Jun 21, 2024
1c40fef
test: update flexible.ts and sync-session.ts
gagik Jun 21, 2024
45ff74b
Add deprecation
gagik Jun 21, 2024
83a8e6e
test: update flexible.ts
gagik Jun 24, 2024
49746cd
Add new tests
gagik Jun 24, 2024
5299a60
Readd newlines
gagik Jun 24, 2024
786cad3
build: update package.json
gagik Jun 24, 2024
68ac901
Fix
gagik Jun 24, 2024
ab57ac2
build: update package.json
gagik Jun 24, 2024
4906b48
build: update package.json
gagik Jun 24, 2024
f6066f6
Fix following tests
gagik Jun 24, 2024
b5c128b
update CHANGELOG.md
gagik Jun 24, 2024
9bc1699
Add assert for react native compatibility
gagik Jun 24, 2024
a3f320a
Check with more proper cleanup
gagik Jun 24, 2024
6e6f827
Check more proper cleanup
gagik Jun 24, 2024
b48a661
Add waiting
gagik Jun 24, 2024
9840703
Fix tests
gagik Jun 25, 2024
7dcb1e2
Make tests less flakey
gagik Jun 25, 2024
2156da1
Ensure clear state always
gagik Jun 25, 2024
f2f6177
Merge branch 'main' of github.com:realm/realm-js into gagik/progress-…
gagik Jun 25, 2024
7cee4c5
Fix cleanup ordering for tests
gagik Jun 25, 2024
9f940f9
Remove clearing state
gagik Jun 25, 2024
e52a7ad
Skip tests and see
gagik Jun 25, 2024
245a603
Downgrade sinon to support more platforms
gagik Jun 25, 2024
1908727
Fix lock file
gagik Jun 25, 2024
9dedab3
Unskip tests
gagik Jun 26, 2024
008b473
Use a timeout
gagik Jun 26, 2024
b7586e1
Skip more complex tests
gagik Jun 26, 2024
e31c9b2
Readd simple test
gagik Jun 26, 2024
6355264
Fix file and specify subscription
gagik Jun 26, 2024
4a5eff5
Use immediate stops
gagik Jun 26, 2024
b688477
Use a different path and remove subs
gagik Jun 26, 2024
89fa945
Use a different path
gagik Jun 26, 2024
fe343f7
Move to after
gagik Jun 26, 2024
0995d34
Use sinon-chai
gagik Jun 26, 2024
728b126
Merge branch 'main' of github.com:realm/realm-js into gagik/progress-…
gagik Jun 26, 2024
e403db7
Do a test
gagik Jun 26, 2024
ebacba6
Don't skip test
gagik Jun 26, 2024
e9c891e
Use a different user
gagik Jun 26, 2024
09fc304
Use one user for the test suite
gagik Jun 26, 2024
18e9b93
Don't use relalmOpen
gagik Jun 26, 2024
e4bf0d7
Clear beforeEach
gagik Jun 26, 2024
f49c949
Manual unsubscribe
gagik Jun 26, 2024
08e3e83
Fix package lock
gagik Jun 26, 2024
1964573
Readd tests and manually unsubscribe
gagik Jun 26, 2024
a72bbc2
Comment out unreliable tests
gagik Jun 26, 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
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
## vNext (TBD)

### Deprecations
* None
* The callback for `realm.syncSession.addProgressNotification` will only take a single argument in the future: `estimate` (which supports both partition based and flexible sync). The old callback functionality is deprecated and will be removed. The estimate is roughly equivalent to an estimated value of `transferred / transferable` in the deprecated partition-based sync callback. ([#6256](https://github.com/realm/realm-js/issues/6256))
```ts
/** New callback which supports both flexible and partition-based sync */
realm.syncSession.addProgressNotification(
Realm.ProgressDirection.Upload,
ProgressMode.ReportIndefinitely,
(estimate) => console.log(`progress estimate: ${estimate}/1.0`),
);
/** @deprecated */
realm.syncSession.addProgressNotification(
Realm.ProgressDirection.Upload,
ProgressMode.ReportIndefinitely,
(transferred, transferable) => console.log(`progress: ${(transferred / transferable)}/1.0`),
);
```

### Enhancements
* None
* Added progress notifications support for flexible sync using a new callback argument. ([#6256](https://github.com/realm/realm-js/issues/6256))
```ts
realm.syncSession.addProgressNotification(
Realm.ProgressDirection.Upload,
ProgressMode.ReportIndefinitely,
(estimate) => console.log(`progress: ${estimate}/1.0`)
);
```

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
Expand Down
7 changes: 6 additions & 1 deletion integration-tests/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
"@types/chai-as-promised": "^7.1.5",
"@types/jsrsasign": "^10.5.4",
"@types/mocha": "^10.0.0",
"@types/sinon": "9.0.5",
"@types/sinon-chai": "3.2.12",
"assert": "^2.1.0",
"mocha": "^10.1.0",
"nyc": "^15.1.0",
"platform": "^1.3.6",
Expand All @@ -94,7 +97,9 @@
"chai": "4.3.6",
"chai-as-promised": "^7.1.1",
"jsrsasign": "^11.0.0",
"node-fetch": "^3.3.2"
"node-fetch": "^3.3.2",
"sinon": "9.2.4",
"sinon-chai": "3.7.0"
},
"files": [
"/src"
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/tests/src/setup-globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ import chai from "chai";
// See https://stackoverflow.com/a/45882252
chai.config.truncateThreshold = 0;

import sinonChai from "sinon-chai";
chai.use(sinonChai);

import chaiAsPromised from "chai-as-promised";
chai.use(chaiAsPromised);

Expand Down
Loading
Loading