Skip to content

Releases: ThatsEmbarrassing/bitwise-flag

v2.1.0

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 22 Jun 16:09

Minor Changes

  • e7c5583: add new toJSON method in FlagBox and Flag

  • b9e0d66: Add resolveMask utility, which resolves an array of flag names to their combined bit mask via the registry's combinator. add, remove, toggle, hasAll, hasAny and hasNone now use it internally instead of manual iteration.

    BREAKING CHANGE: passing the same flag twice in one call now does NOT
    cancel it: toggle(flag, "a", "a", "b") !== toggle(flag, "b"). Now it
    just toggles it once: toggle(flag, "a", "a", "b") === toggle(flag, "a", "b").

Patch Changes

  • 7e8399f: Add TBrand generic type to hasAll, hasAny, hasNone and equals operators
  • 7f9dced: Fix NumberCombinator typing to make zero property readonly.
  • be50bd7: Repository now caches keys(), values() and entries() accessors in the constructor instead of re-creating them from the Map on every call.
    FlagBox.toArray() and FlagBox.toObject() now iterate directly instead of chaining callbacks
  • 53ac337: Both BigIntFlagRegistry and NumberFlagRegistry now share a single Combinator instance at the module level instead of allocation a new one per registry instance.
  • c90c94a: Fix both NumberFlagRegistry.parse() and BigIntFlagRegistry.parse() to throw ParseError for empty-string input instrad of silently returning the empty flag.

v2.0.1

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 09 Jun 21:13

Patch Changes

  • cc8f98d: Set minimal engines.node version to 22 (LTS).
  • 0b800dd: Change GITHUB_TOKEN to fine-granted RELEASE_TOKEN
  • 19ca804: Fix Repository.has() to report presence by key registration instead of coercing the stored bit value, so flags with a falsy (0 / 0n) value are no longer treated as absent.
  • b2340de: Fix package metadata; add sideEffects, commitlint and git hooks; normalize repository URL
  • 91de837: Add npm discoverability metadata: description, keywords and homepage.

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

Changelog keeping starts with version 2.0.0. Earlier releases (1.1.0 and
below) predate this file and are not documented here. For step-by-step upgrade
instructions see MIGRATIONS.md.

2.0.0

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 09 Jun 17:41
fix: set explicit return type

1.1.0

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 03 Nov 10:23
0316bdf

1.0.1

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 02 Nov 09:43
54f3ae0

1.0.0

Choose a tag to compare

@ThatsEmbarrassing ThatsEmbarrassing released this 01 Nov 13:45

Initial