Skip to content

Latest commit

 

History

History
252 lines (151 loc) · 16 KB

File metadata and controls

252 lines (151 loc) · 16 KB

@endo/patterns

1.9.0

Minor Changes

  • #3067 8195a5a Thanks @gibson042! - - Updates containerHasSplit to consider copyArray elements in forward order, better aligning with intuition.

Patch Changes

  • #3127 6ada52b Thanks @turadg! - Remove stale runtime dependencies from package manifests.

  • Updated dependencies [6ada52b]:

    • @endo/marshal@1.9.1
    • @endo/pass-style@1.7.1

1.8.0

Minor Changes

  • #3082 98f77e9 Thanks @boneskull! - @endo/patterns now exports a new getNamedMethodGuards(interfaceGuard) that returns that interface guard's record of method guards. The motivation is to support interface inheritance expressed by patterns like

    const I2 = M.interface('I2', {
      ...getNamedMethodGuards(I1),
      doMore: M.call().returns(M.any()),
    });

    See @endo/exo's exo-wobbly-point.test.js to see it in action together with an experiment in class inheritance.

  • #3008 d83b1ab Thanks @kriskowal! - - Relaxes dependence on a global, post-lockdown harden function by taking a dependency on the new @endo/harden package. Consequently, bundles will now entrain a harden implementation that is superfluous if the bundled program is guaranteed to run in a post-lockdown HardenedJS environment. To compensate, use bundle-source with -C hardened or the analogous feature for packaging conditions with your preferred bundler tool. This will hollow out @endo/harden and defer exclusively to the global harden.

Patch Changes

  • #3082 98f77e9 Thanks @boneskull! - The sloppy option for @endo/patterns interface guards is deprecated. Use defaultGuards instead.

  • #3065 c488503 Thanks @gibson042! - - containerHasSplit now hardens its output(s) when working with copyArrays, ensuring that each output is itself a copyArray instance.

  • Updated dependencies [2e00276, 029dcc4, 2e00276, d83b1ab, 98f77e9]:

    • @endo/errors@1.3.0
    • @endo/harden@1.1.0
    • @endo/common@1.3.0
    • @endo/eventual-send@1.4.0
    • @endo/marshal@1.9.0
    • @endo/pass-style@1.7.0
    • @endo/promise-kit@1.2.0

1.7.0 (2025-07-12)

  • @endo/marshal introduces an environment variable config option ENDO_RANK_STRINGS to change the rank ordering of strings from the current (incorrect) ordering by UTF-16 code unit used by JavaScript's < and .sort() operations to (correct and OCapN-conformant) ordering by Unicode code point. It currently defaults to "utf16-code-unit-order", matching the previously-unconditional behavior.
    • @endo/patterns provides a compareKeys partial order that delegates some ordering, including strings, to the rank ordering provided by @endo/marshal. So when the ENDO_RANK_STRINGS default is not overridden, then compareKeys also follows the (incorrect) UTF-16 code unit order. But when it is overridden, then compareKeys also follows the (correct) Unicode code-point order.
  • In errors explaining why a specimen does not match a pattern, sometimes the error message contains a quoted form of a nested pattern. This quoting was done with q, producing an uninformative rendering of these nested patterns. Now this quoting is done with qp, which renders these nested patterns into readable Justin source code.

1.6.1 (2025-06-17)

Bug Fixes

1.6.0 (2025-06-02)

Features

Bug Fixes

  • pass-style: rename passable "Primitive" to ocapn "Atom" (#2791) (4c2d33c)

1.5.0 (2025-03-24)

  • New pattern: M.containerHas(elementPatt, bound = 1n) motivated to support want patterns in Zoe, to pull out only bound number of elements that match elementPatt. bound must be a positive bigint.
  • Closely related, @endo/patterns now exports containerHasSplit to support ERTP's use of M.containerHas on non-fungible (set, copySet) and semifungible (copyBag) assets, respectively. See Agoric/agoric-sdk#10952 .

1.4.8 (2025-01-24)

Note: Version bump only for package @endo/patterns

1.4.7 (2024-11-13)

Note: Version bump only for package @endo/patterns

1.4.6 (2024-10-22)

Bug Fixes

  • patterns: Version 1.4.5 (5cdb873)

1.4.5 (2024-10-22)

Also erroneously published as 2.0.0

Bug Fixes

  • marshal: Update compareRank to terminate comparability at the first remotable (#2597) (1dea84d), closes #2588

1.4.4 (2024-10-10)

Note: Version bump only for package @endo/patterns

1.4.3 (2024-08-27)

Note: Version bump only for package @endo/patterns

1.4.2 (2024-08-01)

Note: Version bump only for package @endo/patterns

1.4.1 (2024-07-30)

Note: Version bump only for package @endo/patterns

1.4.0 (2024-05-07)

  • Passable is now an accurate type instead of any. Downstream type checking may require changes (example)
  • Some downstream types that take or return Passable were changed to any to defer downstream work to accomodate.

1.3.1 (2024-04-04)

Bug Fixes

  • wrap a raw tag in `` so it won't confuse vitepress (0bc9430)

1.3.0 (2024-03-20)

Features

  • ses-ava: import test from @endo/ses-ava/prepare-endo.js (#2133) (9d3a7ce)

1.2.0 (2024-02-23)

  • Add M.tagged(tagPattern, payloadPattern) for making patterns that match Passable Tagged objects.

1.1.1 (2024-02-15)

Bug Fixes

  • Add repository directory to all package descriptors (e5f36e7)
  • patterns,exo: Tolerate old guard format (#2038) (d5b31d9)

1.1.0 (2024-01-18)

Features

  • types: generic Passable (ae6ad15)

Bug Fixes

  • common: fix @endo/common integration breakage (#1963) (73b5059)

1.0.1 (2023-12-20)

Note: Version bump only for package @endo/patterns

1.0.0 (2023-12-12)

⚠ BREAKING CHANGES

  • patterns: tag and retype guards

Features

  • defaultGuards: absorb sloppy and raw (58a3d42)
  • defendSyncMethod: implement raw exo methods (c8126dc)
  • exo: opt out individual arguments (bf593d8)
  • patterns: export kindOf (#1834) (f746e99)

Bug Fixes

  • Adjust type generation in release process and CI (9465be3)
  • exo: allow richer behaviorMethods (fde26da)
  • exo: tighten typing (c50ee18)
  • Import types explicitly throughout (631d087)
  • patterns: M.rawValue() -> M.raw() (5b94530)
  • patterns: pass type parameter from interface guard to payload (7d294eb)
  • patterns: remove defaultGuards: 'never' for undefined (77d04b2)
  • patterns: tag and retype guards (3e514c5)
  • review suggestions (25ded7a)

0.2.6 (2023-09-12)

  • Adds support for CopyMap patterns (e.g., matches(specimen, makeCopyMap([]))).

0.2.5 (2023-08-07)

Bug Fixes

  • ses: normalize bestEffortsStringify property order (137daff)

0.2.4 (2023-08-07)

Bug Fixes

  • ses: normalize bestEffortsStringify property order (137daff)

0.2.3 (2023-07-19)

Features

  • ses: Add assert.raw for embedding unquoted strings in details (652df0c)
  • types: parameterize InterfaceGuard (645a7a8)

Bug Fixes

  • mismatch errors should not redact the pattern (a95e7fb)
  • patterns: Allow matches(nonKey, key) to reject successfully (cebc442)
  • patterns: Implement M.null() and M.undefined() as Key Patterns (88f3ce9), closes #1601

0.2.2 (2023-04-20)

Bug Fixes

  • patterns: correct types (b73622b)

0.2.1 (2023-04-14)

Bug Fixes

  • copy collection param type defaults (98634b0)
  • sync with shadows in agoric-sdk (19e2833)

0.2.0 (2023-03-07)

⚠ BREAKING CHANGES

  • rename 'fit' to 'mustMatch' (#1464)

Features

  • exo: start migrating exo from @agoric/store (#1459) (a882b7c)
  • patterns: Start migrating patterns from @agoric/store to new @endo/patterns (#1451) (69b61e3)

Bug Fixes

Miscellaneous Chores