-
Notifications
You must be signed in to change notification settings - Fork 559
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
RJS-2739: Upgrade to Realm Core v14.1.0 #6512
Conversation
|
||
itNormalizes( | ||
{ | ||
type: "list", | ||
objectType: "string", | ||
indexed: true, | ||
}, | ||
{ | ||
type: "list", | ||
objectType: "string", | ||
indexed: true, | ||
optional: false, | ||
}, | ||
{ isPrimaryKey: false }, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine, but it also seems unrelated to the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this because the upgrade also included being able to index list of strings. So this tests that the parser also allows this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is testing an enhancement mentioned in the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🙂 Left some suggestions here 👍
67dfe08
to
f560e0f
Compare
2ff005c
to
33146b3
Compare
* Update 'setLogLevel()'. * Update 'setLogger()'. * Fix 'at_since' doc tag. * Integrate feedback Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com> * Assume logger with options for remaining cases. * Update TS docs for 'LogOptions'. --------- Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
e65a1e6
to
eb00687
Compare
packages/realm/src/Logger.ts
Outdated
export enum LogCategory { | ||
/** | ||
* Include logs from all categories. Subcategories are {@link LogCategory.Storage}, | ||
* {@link LogCategory.Sync}, {@link LogCategory.App}, and {@link LogCategory.SDK}. | ||
*/ | ||
Realm = "Realm", | ||
/** | ||
* Log database mutations and query operations. | ||
* Subcategories are {@link LogCategory.Transaction}, {@link LogCategory.Object}, | ||
* {@link LogCategory.Query}, and {@link LogCategory.Notification}. | ||
*/ | ||
Storage = "Realm.Storage", | ||
/** | ||
* Log when creating, advancing, and committing transactions. | ||
*/ | ||
Transaction = "Realm.Storage.Transaction", | ||
/** | ||
* Log query operations. | ||
*/ | ||
Query = "Realm.Storage.Query", | ||
/** | ||
* Log database mutations. | ||
*/ | ||
Object = "Realm.Storage.Object", | ||
/** | ||
* Log notifications of changes to the database. | ||
*/ | ||
Notification = "Realm.Storage.Notification", | ||
/** | ||
* Log activity related to Atlas Device Sync. | ||
* Subcategories are {@link LogCategory.Client} and {@link LogCategory.Server}. | ||
*/ | ||
Sync = "Realm.Sync", | ||
/** | ||
* Log activity related to Atlas Device Sync client operations. | ||
* Subcategories are {@link LogCategory.Session}, {@link LogCategory.Changeset}, | ||
* {@link LogCategory.Network}, and {@link LogCategory.Reset}. | ||
*/ | ||
Client = "Realm.Sync.Client", | ||
/** | ||
* Log connection level activity. | ||
*/ | ||
Session = "Realm.Sync.Client.Session", | ||
/** | ||
* Log when receiving, uploading, and integrating changesets. | ||
*/ | ||
Changeset = "Realm.Sync.Client.Changeset", | ||
/** | ||
* Log low level network activity. | ||
*/ | ||
Network = "Realm.Sync.Client.Network", | ||
/** | ||
* Log client reset operations. | ||
*/ | ||
Reset = "Realm.Sync.Client.Reset", | ||
/** | ||
* Log activity related to Atlas Device Sync server operations. | ||
*/ | ||
Server = "Realm.Sync.Server", | ||
/** | ||
* Log activity at the Atlas App level. | ||
*/ | ||
App = "Realm.App", | ||
/** | ||
* Log activity at the SDK level. | ||
*/ | ||
SDK = "Realm.SDK", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still feel using an enum with the leaf name as key isn't the best API design and would rather that we used a string union here. The main reason being that it's possible for Core to introduce a category that we can't unambiguously express to our users.
I.e. what do we do if core introduces a "Realm.Sync.Server.Changeset" or a "Realm.App.Network" category?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was the right call to remove the needsFileFormatUpgrade
and possibly add it as a follow-up 👍
LGTM with some suggested updates to docs. The biggest thing to decide on tho is whether to change the log categories to a string union.
16e2b2b
to
c3ffbe6
Compare
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
* Suggesting array of categories and string union for LogCategory * Moved documentation onto the type * Moved setLogger using LoggerCallback2 up * Exporting "LogEntry" type * Lint fixing tests
* RJS-2739: Upgrade to Realm Core v14.1.0 --------- Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com> Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
What, How & Why?
This closes #6499
☑️ ToDos
Compatibility
label is updated or copied from previous entryCOMPATIBILITY.md
package.json
s (if updating internal packages)Breaking
label has been applied or is not necessary