Skip to content

Releases: gonuit/dart_objectid

v4.0.3

Choose a tag to compare

@gonuit gonuit released this 01 Apr 20:40

Changes

  • Updated dependencies and README.
  • Updated benchmark results.

Full Changelog: v4.0.2...v4.0.3

v4.0.2

Choose a tag to compare

@gonuit gonuit released this 01 Apr 20:20

What's Changed

  • Fix ObjectId.fromHexString(…) on web by @JonasWanke in #5
    • Rewrote ObjectId.fromHexString to parse hex directly into bytes, avoiding 32-bit bitwise limitation on web and improving performance (~4x faster).
  • Fixed ObjectId.fromValues web support by replacing >> 32 with integer division in toProcessUniqueBytes.
  • Fixed Random.secure() fallback in FallbackProcessUnique to catch all exceptions, enabling Node.js compatibility.
  • Added CI pipeline with formatting, analysis, and tests on VM, Chrome, and Node.js.

New Contributors

Full Changelog: v4.0.1...v4.0.2

v4.0.1

Choose a tag to compare

@gonuit gonuit released this 01 Apr 20:19

Changes

  • Removed deprecated implementation related to dart:js_util.
    • Process unique on the web platform is now based on Random.secured().

Full Changelog: v4.0.0...v4.0.1

v4.0.0

Choose a tag to compare

@gonuit gonuit released this 07 Mar 02:05

Changes

  • Migrated from deprecated dart:html to dart:js_util.

Full Changelog: v.3.1.0...v4.0.0

v3.1.0

Choose a tag to compare

@gonuit gonuit released this 07 Mar 02:05

Changes:

  • Added the ObjectId.toJson() method to enable straightforward serialization of ObjectId instances. You can now serialize an ObjectId simply by calling jsonEncode or using the built-in JsonEncoder.
  • Added the ObjectId.fromJson(String json) factory constructor. This serves as an alias to the existing ObjectId.fromHexString constructor, clearly indicating the intention to deserialize from a JSON value.

Resolves #3

v3.0.0

Choose a tag to compare

@gonuit gonuit released this 26 Jun 11:39

Changes:

  • ⚠️ The strict runtime type checking in the equals operator has been removed. Now all classes that extend ObjectId and have the same value will be matched by this operator.
    class MyObjectId extends ObjectId {}
    const hexString = '606eed9d7203bfbbb7fffffe';
    ObjectId.fromHexString(hexString) == MyObjectId.fromHexString(hexString); // true
  • Updated dart sdk constraints to match new requirements.
  • Updated package dependencies
    • Replaced the code analysis rules defined by the effective_dart package with the lints package.
  • Removed unnecessary (for packages) pubspec.lock file.

Full Changelog: v2.1.0...v3.0.0

v2.1.0

Choose a tag to compare

@gonuit gonuit released this 16 Mar 19:45

Changes

  • Constants ObjectId.byteLength and ObjectId.hexStringLength are now publicly available.

v2.0.0

Choose a tag to compare

@gonuit gonuit released this 08 Apr 12:44

Changes:

  • Stable nullsafety release
  • Fixed a bug that caused the counter value to overflow at 0xfffffe.
    • Enabled counter overflow unit test.
  • toString method now instead of runtimeType(hexString), returns objectid's hexString.
    /// Before:
    print(ObjectId()) // => "ObjectId(606eed9d7203bfbbb7fffffe)"
    /// Now:
    print(ObjectId()) // => "606eed9d7203bfbbb7fffffe"
    TIP:
    If you still want to use the toString method with runtimeType, you can override the ObjectId class. Example:
    class MyObjectId extends ObjectId {
      @override
      String toString() => '$runtimeType($hexString)';
    }

2.0.0-nullsafety.0

2.0.0-nullsafety.0 Pre-release
Pre-release

Choose a tag to compare

@gonuit gonuit released this 23 Feb 22:34
07c115a

Changes:

  • Initial move towards null safety
  • Updated changelog (removed release dates)