@dxos/util 0.6.12-main.ed7cda7 → 0.6.12-staging.0b4bb48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/lib/browser/index.mjs +92 -92
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +83 -83
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/types/src/complex.d.ts +8 -8
  8. package/dist/types/src/complex.d.ts.map +1 -1
  9. package/dist/types/src/index.d.ts +4 -4
  10. package/dist/types/src/index.d.ts.map +1 -1
  11. package/dist/types/src/params.d.ts.map +1 -1
  12. package/dist/types/src/platform.test.d.ts +2 -0
  13. package/dist/types/src/platform.test.d.ts.map +1 -0
  14. package/dist/types/src/weak.d.ts +4 -4
  15. package/dist/types/src/weak.d.ts.map +1 -1
  16. package/package.json +7 -8
  17. package/src/array.test.ts +2 -1
  18. package/src/bitfield.test.ts +2 -1
  19. package/src/callback.test.ts +2 -1
  20. package/src/complex.test.ts +2 -1
  21. package/src/complex.ts +8 -8
  22. package/src/defer.test.ts +2 -1
  23. package/src/human-hash.test.ts +2 -1
  24. package/src/index.ts +4 -4
  25. package/src/join-tables.test.ts +2 -1
  26. package/src/order.test.ts +2 -1
  27. package/src/params.test.ts +2 -1
  28. package/src/params.ts +0 -2
  29. package/src/platform.test.ts +17 -0
  30. package/src/reducers.test.ts +2 -1
  31. package/src/safe-instanceof.test.ts +2 -1
  32. package/src/sort.test.ts +2 -1
  33. package/src/tracer.test.ts +2 -1
  34. package/src/types.test.ts +2 -1
  35. package/src/typings.d.ts +5 -0
  36. package/src/uint8array.test.ts +2 -1
  37. package/src/weak.test.ts +8 -4
  38. package/src/weak.ts +4 -4
  39. package/dist/lib/node-esm/index.mjs +0 -1978
  40. package/dist/lib/node-esm/index.mjs.map +0 -7
  41. package/dist/lib/node-esm/meta.json +0 -1
  42. package/dist/types/src/platform.browser.test.d.ts +0 -2
  43. package/dist/types/src/platform.browser.test.d.ts.map +0 -1
  44. package/dist/types/src/platform.node.test.d.ts +0 -2
  45. package/dist/types/src/platform.node.test.d.ts.map +0 -1
  46. package/src/platform.browser.test.ts +0 -11
  47. package/src/platform.node.test.ts +0 -11
@@ -1 +1 @@
1
- {"inputs":{"packages/common/util/src/array.ts":{"bytes":5726,"imports":[],"format":"esm"},"packages/common/util/src/assign.ts":{"bytes":3457,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/binder.ts":{"bytes":1363,"imports":[{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/bitfield.ts":{"bytes":8574,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/callback.ts":{"bytes":5305,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/callback-collection.ts":{"bytes":3247,"imports":[],"format":"esm"},"packages/common/util/src/chunk-array.ts":{"bytes":1248,"imports":[],"format":"esm"},"packages/common/util/src/circular-buffer.ts":{"bytes":6398,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/complex.ts":{"bytes":22029,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/explicit-resource-management-polyfill.ts":{"bytes":1482,"imports":[]},"packages/common/util/src/defer.ts":{"bytes":3771,"imports":[{"path":"packages/common/util/src/explicit-resource-management-polyfill.ts","kind":"import-statement","original":"./explicit-resource-management-polyfill"}],"format":"esm"},"packages/common/util/src/defer-function.ts":{"bytes":1619,"imports":[],"format":"esm"},"packages/common/util/src/entry.ts":{"bytes":3103,"imports":[],"format":"esm"},"packages/common/util/src/for-each-async.ts":{"bytes":826,"imports":[],"format":"esm"},"packages/common/util/src/human-hash.ts":{"bytes":20242,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/interval.ts":{"bytes":1876,"imports":[],"format":"esm"},"packages/common/util/src/map.ts":{"bytes":1546,"imports":[],"format":"esm"},"packages/common/util/src/instance-id.ts":{"bytes":4306,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/join-tables.ts":{"bytes":3140,"imports":[],"format":"esm"},"packages/common/util/src/uint8array.ts":{"bytes":3822,"imports":[],"format":"esm"},"packages/common/util/src/json.ts":{"bytes":13862,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/common/util/src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"packages/common/util/src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"packages/common/util/src/map-values.ts":{"bytes":10764,"imports":[],"format":"esm"},"packages/common/util/src/order.ts":{"bytes":5060,"imports":[],"format":"esm"},"packages/common/util/src/params.ts":{"bytes":6681,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"xcase","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/pick.ts":{"bytes":2839,"imports":[],"format":"esm"},"packages/common/util/src/platform.ts":{"bytes":11348,"imports":[],"format":"esm"},"packages/common/util/src/random.ts":{"bytes":1344,"imports":[],"format":"esm"},"packages/common/util/src/range.ts":{"bytes":2016,"imports":[],"format":"esm"},"packages/common/util/src/reducers.ts":{"bytes":12989,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/safe-await.ts":{"bytes":2916,"imports":[],"format":"esm"},"packages/common/util/src/safe-instanceof.ts":{"bytes":2749,"imports":[],"format":"esm"},"packages/common/util/src/safe-parse-json.ts":{"bytes":1381,"imports":[],"format":"esm"},"packages/common/util/src/sliding-window-summary.ts":{"bytes":7614,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/common/util/src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"packages/common/util/src/sort.ts":{"bytes":4004,"imports":[],"format":"esm"},"packages/common/util/src/sum.ts":{"bytes":720,"imports":[],"format":"esm"},"packages/common/util/src/throw-unhandled-error.ts":{"bytes":1216,"imports":[],"format":"esm"},"packages/common/util/src/to-fallback.ts":{"bytes":12288,"imports":[],"format":"esm"},"packages/common/util/src/tracer.ts":{"bytes":7302,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/types.ts":{"bytes":8669,"imports":[],"format":"esm"},"packages/common/util/src/weak.ts":{"bytes":9764,"imports":[],"format":"esm"},"packages/common/util/src/index.ts":{"bytes":4004,"imports":[{"path":"packages/common/util/src/array.ts","kind":"import-statement","original":"./array"},{"path":"packages/common/util/src/assign.ts","kind":"import-statement","original":"./assign"},{"path":"packages/common/util/src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"packages/common/util/src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"packages/common/util/src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"packages/common/util/src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"packages/common/util/src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"packages/common/util/src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"packages/common/util/src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"packages/common/util/src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"packages/common/util/src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"packages/common/util/src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"packages/common/util/src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"packages/common/util/src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"packages/common/util/src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"packages/common/util/src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"packages/common/util/src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"packages/common/util/src/json.ts","kind":"import-statement","original":"./json"},{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"},{"path":"packages/common/util/src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"packages/common/util/src/order.ts","kind":"import-statement","original":"./order"},{"path":"packages/common/util/src/params.ts","kind":"import-statement","original":"./params"},{"path":"packages/common/util/src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"packages/common/util/src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/util/src/random.ts","kind":"import-statement","original":"./random"},{"path":"packages/common/util/src/range.ts","kind":"import-statement","original":"./range"},{"path":"packages/common/util/src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"packages/common/util/src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"packages/common/util/src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"packages/common/util/src/safe-parse-json.ts","kind":"import-statement","original":"./safe-parse-json"},{"path":"packages/common/util/src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"packages/common/util/src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"packages/common/util/src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"packages/common/util/src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"packages/common/util/src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"packages/common/util/src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"packages/common/util/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/common/util/src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"packages/common/util/src/weak.ts","kind":"import-statement","original":"./weak"}],"format":"esm"}},"outputs":{"packages/common/util/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":110404},"packages/common/util/dist/lib/node/index.cjs":{"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"xcase","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","ParamKeyAnnotation","Params","SlidingWindowSummary","Tracer","WeakDictionary","accessBy","arrayMove","arrayToBuffer","arrayToString","arraysEqual","boolGuard","bufferToArray","chunkArray","compareMulti","compareObject","compareScalar","compareString","createBinder","createBucketReducer","createGroupReducer","createSetDispatch","deepMapValues","deepMapValuesAsync","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entry","exponentialBackoffInterval","forEachAsync","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersection","iosCheck","isNode","isNotFalsy","isNotNullOrUndefined","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","keyToEmoji","keyToFallback","keyToHue","makeMap","makeSet","mapValues","median","mobileAndTabletCheck","nonNullable","numericalValues","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","safariCheck","safeAwaitAll","safeInstanceof","safeParseInt","safeParseJson","setDeep","stringToArray","stripUndefinedValues","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer"],"entryPoint":"packages/common/util/src/index.ts","inputs":{"packages/common/util/src/array.ts":{"bytesInOutput":804},"packages/common/util/src/index.ts":{"bytesInOutput":0},"packages/common/util/src/assign.ts":{"bytesInOutput":619},"packages/common/util/src/binder.ts":{"bytesInOutput":139},"packages/common/util/src/bitfield.ts":{"bytesInOutput":1911},"packages/common/util/src/callback.ts":{"bytesInOutput":1113},"packages/common/util/src/callback-collection.ts":{"bytesInOutput":558},"packages/common/util/src/chunk-array.ts":{"bytesInOutput":173},"packages/common/util/src/circular-buffer.ts":{"bytesInOutput":1539},"packages/common/util/src/complex.ts":{"bytesInOutput":4413},"packages/common/util/src/explicit-resource-management-polyfill.ts":{"bytesInOutput":100},"packages/common/util/src/defer.ts":{"bytesInOutput":546},"packages/common/util/src/defer-function.ts":{"bytesInOutput":72},"packages/common/util/src/entry.ts":{"bytesInOutput":471},"packages/common/util/src/for-each-async.ts":{"bytesInOutput":62},"packages/common/util/src/human-hash.ts":{"bytesInOutput":5662},"packages/common/util/src/interval.ts":{"bytesInOutput":290},"packages/common/util/src/map.ts":{"bytesInOutput":193},"packages/common/util/src/instance-id.ts":{"bytesInOutput":771},"packages/common/util/src/join-tables.ts":{"bytesInOutput":493},"packages/common/util/src/json.ts":{"bytesInOutput":2946},"packages/common/util/src/uint8array.ts":{"bytesInOutput":562},"packages/common/util/src/map-values.ts":{"bytesInOutput":2144},"packages/common/util/src/order.ts":{"bytesInOutput":676},"packages/common/util/src/params.ts":{"bytesInOutput":1307},"packages/common/util/src/pick.ts":{"bytesInOutput":321},"packages/common/util/src/platform.ts":{"bytesInOutput":3211},"packages/common/util/src/random.ts":{"bytesInOutput":144},"packages/common/util/src/range.ts":{"bytesInOutput":283},"packages/common/util/src/reducers.ts":{"bytesInOutput":2326},"packages/common/util/src/safe-await.ts":{"bytesInOutput":345},"packages/common/util/src/safe-instanceof.ts":{"bytesInOutput":371},"packages/common/util/src/safe-parse-json.ts":{"bytesInOutput":157},"packages/common/util/src/sliding-window-summary.ts":{"bytesInOutput":1802},"packages/common/util/src/sort.ts":{"bytesInOutput":643},"packages/common/util/src/sum.ts":{"bytesInOutput":57},"packages/common/util/src/throw-unhandled-error.ts":{"bytesInOutput":90},"packages/common/util/src/to-fallback.ts":{"bytesInOutput":4082},"packages/common/util/src/tracer.ts":{"bytesInOutput":1426},"packages/common/util/src/types.ts":{"bytesInOutput":1092},"packages/common/util/src/weak.ts":{"bytesInOutput":2069}},"bytes":49277}}}
1
+ {"inputs":{"packages/common/util/src/array.ts":{"bytes":5726,"imports":[],"format":"esm"},"packages/common/util/src/assign.ts":{"bytes":3457,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/binder.ts":{"bytes":1363,"imports":[{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/bitfield.ts":{"bytes":8574,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/callback.ts":{"bytes":5305,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/circular-buffer.ts":{"bytes":6398,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/complex.ts":{"bytes":22085,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/explicit-resource-management-polyfill.ts":{"bytes":1482,"imports":[]},"packages/common/util/src/defer.ts":{"bytes":3771,"imports":[{"path":"packages/common/util/src/explicit-resource-management-polyfill.ts","kind":"import-statement","original":"./explicit-resource-management-polyfill"}],"format":"esm"},"packages/common/util/src/defer-function.ts":{"bytes":1619,"imports":[],"format":"esm"},"packages/common/util/src/entry.ts":{"bytes":3103,"imports":[],"format":"esm"},"packages/common/util/src/for-each-async.ts":{"bytes":826,"imports":[],"format":"esm"},"packages/common/util/src/human-hash.ts":{"bytes":20242,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/interval.ts":{"bytes":1876,"imports":[],"format":"esm"},"packages/common/util/src/map.ts":{"bytes":1546,"imports":[],"format":"esm"},"packages/common/util/src/instance-id.ts":{"bytes":4306,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/join-tables.ts":{"bytes":3140,"imports":[],"format":"esm"},"packages/common/util/src/uint8array.ts":{"bytes":3822,"imports":[],"format":"esm"},"packages/common/util/src/json.ts":{"bytes":13862,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/common/util/src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"packages/common/util/src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"packages/common/util/src/map-values.ts":{"bytes":10764,"imports":[],"format":"esm"},"packages/common/util/src/order.ts":{"bytes":5060,"imports":[],"format":"esm"},"packages/common/util/src/params.ts":{"bytes":6677,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"xcase","kind":"import-statement","external":true}],"format":"esm"},"packages/common/util/src/pick.ts":{"bytes":2839,"imports":[],"format":"esm"},"packages/common/util/src/platform.ts":{"bytes":11348,"imports":[],"format":"esm"},"packages/common/util/src/random.ts":{"bytes":1344,"imports":[],"format":"esm"},"packages/common/util/src/range.ts":{"bytes":2016,"imports":[],"format":"esm"},"packages/common/util/src/reducers.ts":{"bytes":12989,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/safe-await.ts":{"bytes":2916,"imports":[],"format":"esm"},"packages/common/util/src/safe-instanceof.ts":{"bytes":2749,"imports":[],"format":"esm"},"packages/common/util/src/safe-parse-json.ts":{"bytes":1381,"imports":[],"format":"esm"},"packages/common/util/src/sort.ts":{"bytes":4004,"imports":[],"format":"esm"},"packages/common/util/src/throw-unhandled-error.ts":{"bytes":1216,"imports":[],"format":"esm"},"packages/common/util/src/to-fallback.ts":{"bytes":12288,"imports":[],"format":"esm"},"packages/common/util/src/tracer.ts":{"bytes":7302,"imports":[{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"packages/common/util/src/types.ts":{"bytes":8669,"imports":[],"format":"esm"},"packages/common/util/src/sum.ts":{"bytes":720,"imports":[],"format":"esm"},"packages/common/util/src/weak.ts":{"bytes":9792,"imports":[],"format":"esm"},"packages/common/util/src/sliding-window-summary.ts":{"bytes":7614,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/common/util/src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"packages/common/util/src/callback-collection.ts":{"bytes":3247,"imports":[],"format":"esm"},"packages/common/util/src/chunk-array.ts":{"bytes":1248,"imports":[],"format":"esm"},"packages/common/util/src/index.ts":{"bytes":4004,"imports":[{"path":"packages/common/util/src/array.ts","kind":"import-statement","original":"./array"},{"path":"packages/common/util/src/assign.ts","kind":"import-statement","original":"./assign"},{"path":"packages/common/util/src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"packages/common/util/src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"packages/common/util/src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"packages/common/util/src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"packages/common/util/src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"packages/common/util/src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"packages/common/util/src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"packages/common/util/src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"packages/common/util/src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"packages/common/util/src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"packages/common/util/src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"packages/common/util/src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"packages/common/util/src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"packages/common/util/src/json.ts","kind":"import-statement","original":"./json"},{"path":"packages/common/util/src/map.ts","kind":"import-statement","original":"./map"},{"path":"packages/common/util/src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"packages/common/util/src/order.ts","kind":"import-statement","original":"./order"},{"path":"packages/common/util/src/params.ts","kind":"import-statement","original":"./params"},{"path":"packages/common/util/src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"packages/common/util/src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/util/src/random.ts","kind":"import-statement","original":"./random"},{"path":"packages/common/util/src/range.ts","kind":"import-statement","original":"./range"},{"path":"packages/common/util/src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"packages/common/util/src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"packages/common/util/src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"packages/common/util/src/safe-parse-json.ts","kind":"import-statement","original":"./safe-parse-json"},{"path":"packages/common/util/src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"packages/common/util/src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"packages/common/util/src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"packages/common/util/src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"packages/common/util/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/common/util/src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"packages/common/util/src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"packages/common/util/src/weak.ts","kind":"import-statement","original":"./weak"},{"path":"packages/common/util/src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"packages/common/util/src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"packages/common/util/src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"}],"format":"esm"}},"outputs":{"packages/common/util/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":110462},"packages/common/util/dist/lib/node/index.cjs":{"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"xcase","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","ParamKeyAnnotation","Params","SlidingWindowSummary","Tracer","WeakDictionary","accessBy","arrayMove","arrayToBuffer","arrayToString","arraysEqual","boolGuard","bufferToArray","chunkArray","compareMulti","compareObject","compareScalar","compareString","createBinder","createBucketReducer","createGroupReducer","createSetDispatch","deepMapValues","deepMapValuesAsync","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entry","exponentialBackoffInterval","forEachAsync","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersection","iosCheck","isNode","isNotFalsy","isNotNullOrUndefined","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","keyToEmoji","keyToFallback","keyToHue","makeMap","makeSet","mapValues","median","mobileAndTabletCheck","nonNullable","numericalValues","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","safariCheck","safeAwaitAll","safeInstanceof","safeParseInt","safeParseJson","setDeep","stringToArray","stripUndefinedValues","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer"],"entryPoint":"packages/common/util/src/index.ts","inputs":{"packages/common/util/src/array.ts":{"bytesInOutput":804},"packages/common/util/src/index.ts":{"bytesInOutput":0},"packages/common/util/src/assign.ts":{"bytesInOutput":619},"packages/common/util/src/binder.ts":{"bytesInOutput":139},"packages/common/util/src/bitfield.ts":{"bytesInOutput":1911},"packages/common/util/src/callback.ts":{"bytesInOutput":1113},"packages/common/util/src/circular-buffer.ts":{"bytesInOutput":1539},"packages/common/util/src/complex.ts":{"bytesInOutput":4413},"packages/common/util/src/explicit-resource-management-polyfill.ts":{"bytesInOutput":100},"packages/common/util/src/defer.ts":{"bytesInOutput":546},"packages/common/util/src/defer-function.ts":{"bytesInOutput":72},"packages/common/util/src/entry.ts":{"bytesInOutput":471},"packages/common/util/src/for-each-async.ts":{"bytesInOutput":62},"packages/common/util/src/human-hash.ts":{"bytesInOutput":5662},"packages/common/util/src/interval.ts":{"bytesInOutput":290},"packages/common/util/src/map.ts":{"bytesInOutput":193},"packages/common/util/src/instance-id.ts":{"bytesInOutput":771},"packages/common/util/src/join-tables.ts":{"bytesInOutput":493},"packages/common/util/src/json.ts":{"bytesInOutput":2946},"packages/common/util/src/uint8array.ts":{"bytesInOutput":562},"packages/common/util/src/map-values.ts":{"bytesInOutput":2144},"packages/common/util/src/order.ts":{"bytesInOutput":676},"packages/common/util/src/params.ts":{"bytesInOutput":1307},"packages/common/util/src/pick.ts":{"bytesInOutput":321},"packages/common/util/src/platform.ts":{"bytesInOutput":3211},"packages/common/util/src/random.ts":{"bytesInOutput":144},"packages/common/util/src/range.ts":{"bytesInOutput":283},"packages/common/util/src/reducers.ts":{"bytesInOutput":2326},"packages/common/util/src/safe-await.ts":{"bytesInOutput":345},"packages/common/util/src/safe-instanceof.ts":{"bytesInOutput":371},"packages/common/util/src/safe-parse-json.ts":{"bytesInOutput":157},"packages/common/util/src/sort.ts":{"bytesInOutput":643},"packages/common/util/src/throw-unhandled-error.ts":{"bytesInOutput":90},"packages/common/util/src/to-fallback.ts":{"bytesInOutput":4082},"packages/common/util/src/tracer.ts":{"bytesInOutput":1426},"packages/common/util/src/types.ts":{"bytesInOutput":1092},"packages/common/util/src/sum.ts":{"bytesInOutput":57},"packages/common/util/src/weak.ts":{"bytesInOutput":2069},"packages/common/util/src/sliding-window-summary.ts":{"bytesInOutput":1802},"packages/common/util/src/callback-collection.ts":{"bytesInOutput":558},"packages/common/util/src/chunk-array.ts":{"bytesInOutput":173}},"bytes":49277}}}
@@ -24,10 +24,10 @@ export declare class ComplexSet<T> implements Set<T> {
24
24
  forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
25
25
  has(value: T): boolean;
26
26
  get size(): number;
27
- [Symbol.iterator](): SetIterator<T>;
28
- entries(): SetIterator<[T, T]>;
29
- keys(): SetIterator<T>;
30
- values(): SetIterator<T>;
27
+ [Symbol.iterator](): IterableIterator<T>;
28
+ entries(): IterableIterator<[T, T]>;
29
+ keys(): IterableIterator<T>;
30
+ values(): IterableIterator<T>;
31
31
  get [Symbol.toStringTag](): string;
32
32
  union<U>(other: ReadonlySetLike<U>): Set<T | U>;
33
33
  intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
@@ -65,10 +65,10 @@ export declare class ComplexMap<K, V> implements Map<K, V> {
65
65
  has(key: K): boolean;
66
66
  set(key: K, value: V): this;
67
67
  get size(): number;
68
- [Symbol.iterator](): SetIterator<[K, V]>;
69
- entries(): SetIterator<[K, V]>;
70
- keys(): SetIterator<K>;
71
- values(): SetIterator<V>;
68
+ [Symbol.iterator](): IterableIterator<[K, V]>;
69
+ entries(): IterableIterator<[K, V]>;
70
+ keys(): IterableIterator<K>;
71
+ values(): IterableIterator<V>;
72
72
  mapValues<R>(mapper: (v: V, k: K) => R): ComplexMap<K, R>;
73
73
  get [Symbol.toStringTag](): string;
74
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../src/complex.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,MAAM,SAAS,GAAG,MAAM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AC,CAAC,IAAI,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAElH;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,iBAAiB,mBAAmB,CAAC,CAAC,CAAC,KAAG,qBAAqB,CAAC,CAAC,CAKvF,CAAC"}
@@ -3,8 +3,6 @@ export * from './assign';
3
3
  export * from './binder';
4
4
  export * from './bitfield';
5
5
  export * from './callback';
6
- export * from './callback-collection';
7
- export * from './chunk-array';
8
6
  export * from './circular-buffer';
9
7
  export * from './complex';
10
8
  export * from './defer';
@@ -28,13 +26,15 @@ export * from './reducers';
28
26
  export * from './safe-await';
29
27
  export * from './safe-instanceof';
30
28
  export * from './safe-parse-json';
31
- export * from './sliding-window-summary';
32
29
  export * from './sort';
33
- export * from './sum';
34
30
  export * from './throw-unhandled-error';
35
31
  export * from './to-fallback';
36
32
  export * from './tracer';
37
33
  export * from './types';
38
34
  export * from './uint8array';
35
+ export * from './sum';
39
36
  export * from './weak';
37
+ export * from './sliding-window-summary';
38
+ export * from './callback-collection';
39
+ export * from './chunk-array';
40
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,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C;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/params.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,KAAK,sBAAsB,GAAG,MAAM,CAAC;AAIrC,eAAO,MAAM,kBAAkB,UACrB,sBAAsB,MAC7B,CAAC,SAAS,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CACC,CAAC;AAExD;;GAEG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IAqBlB;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,GAAG;CAYjC"}
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/params.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,KAAK,sBAAsB,GAAG,MAAM,CAAC;AAErC,eAAO,MAAM,kBAAkB,UACrB,sBAAsB,MAC7B,CAAC,SAAS,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CACC,CAAC;AAExD;;GAEG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IAqBlB;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,GAAG;CAYjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=platform.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.test.d.ts","sourceRoot":"","sources":["../../../src/platform.test.ts"],"names":[],"mappings":""}
@@ -5,10 +5,10 @@ export declare class WeakDictionary<K, V extends object> implements Map<K, V> {
5
5
  private readonly _internal;
6
6
  private readonly _finalization;
7
7
  constructor(entries?: [K, V][]);
8
- entries(): SetIterator<[K, V]>;
9
- keys(): SetIterator<K>;
10
- values(): SetIterator<V>;
11
- [Symbol.iterator](): SetIterator<[K, V]>;
8
+ entries(): IterableIterator<[K, V]>;
9
+ keys(): IterableIterator<K>;
10
+ values(): IterableIterator<V>;
11
+ [Symbol.iterator](): IterableIterator<[K, V]>;
12
12
  get [Symbol.toStringTag](): string;
13
13
  get size(): number;
14
14
  get(key: K): V | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"weak.d.ts","sourceRoot":"","sources":["../../../src/weak.ts"],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CAAC,EAAE,CAAC,SAAS,MAAM,CAAE,YAAW,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4B;IACtD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAE3B;gBAES,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;IAK7B,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAMpC,IAAI,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAI1B,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAU7B,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAM9C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAI1B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAM3B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAIpB,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAQvB,KAAK,IAAI,IAAI;IAWb,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI;IAapF,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,WAAW;CAGpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/util",
3
- "version": "0.6.12-main.ed7cda7",
3
+ "version": "0.6.12-staging.0b4bb48",
4
4
  "description": "Temporary bucket for misc functions, which should graduate into separate packages.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,8 +10,7 @@
10
10
  ".": {
11
11
  "browser": "./dist/lib/browser/index.mjs",
12
12
  "node": {
13
- "require": "./dist/lib/node/index.cjs",
14
- "default": "./dist/lib/node-esm/index.mjs"
13
+ "default": "./dist/lib/node/index.cjs"
15
14
  },
16
15
  "types": "./dist/types/src/index.d.ts"
17
16
  }
@@ -27,13 +26,13 @@
27
26
  "dependencies": {
28
27
  "@effect/schema": "^0.67.16",
29
28
  "xcase": "^2.0.1",
30
- "@dxos/debug": "0.6.12-main.ed7cda7",
31
- "@dxos/invariant": "0.6.12-main.ed7cda7",
32
- "@dxos/keys": "0.6.12-main.ed7cda7",
33
- "@dxos/node-std": "0.6.12-main.ed7cda7"
29
+ "@dxos/debug": "0.6.12-staging.0b4bb48",
30
+ "@dxos/invariant": "0.6.12-staging.0b4bb48",
31
+ "@dxos/keys": "0.6.12-staging.0b4bb48",
32
+ "@dxos/node-std": "0.6.12-staging.0b4bb48"
34
33
  },
35
34
  "devDependencies": {
36
- "@dxos/crypto": "0.6.12-main.ed7cda7"
35
+ "@dxos/crypto": "0.6.12-staging.0b4bb48"
37
36
  },
38
37
  "publishConfig": {
39
38
  "access": "public"
package/src/array.test.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { diff, intersection, distinctBy } from './array';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { BitField } from './bitfield';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { createSetDispatch } from './callback';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- import { expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { test } from 'vitest';
6
7
 
7
8
  import { PublicKey } from '@dxos/keys';
8
9
 
package/src/complex.ts CHANGED
@@ -78,21 +78,21 @@ export class ComplexSet<T> implements Set<T> {
78
78
  return this._values.size;
79
79
  }
80
80
 
81
- [Symbol.iterator](): SetIterator<T> {
81
+ [Symbol.iterator](): IterableIterator<T> {
82
82
  return this._values.values();
83
83
  }
84
84
 
85
- *entries(): SetIterator<[T, T]> {
85
+ *entries(): IterableIterator<[T, T]> {
86
86
  for (const value of this._values.values()) {
87
87
  yield [value, value];
88
88
  }
89
89
  }
90
90
 
91
- keys(): SetIterator<T> {
91
+ keys(): IterableIterator<T> {
92
92
  return this[Symbol.iterator]();
93
93
  }
94
94
 
95
- values(): SetIterator<T> {
95
+ values(): IterableIterator<T> {
96
96
  return this[Symbol.iterator]();
97
97
  }
98
98
 
@@ -218,22 +218,22 @@ export class ComplexMap<K, V> implements Map<K, V> {
218
218
  return this._keys.size;
219
219
  }
220
220
 
221
- *[Symbol.iterator](): SetIterator<[K, V]> {
221
+ *[Symbol.iterator](): IterableIterator<[K, V]> {
222
222
  for (const [primitive, key] of this._keys) {
223
223
  const value = this._values.get(primitive) ?? raise(new Error('Map corrupted.'));
224
224
  yield [key, value];
225
225
  }
226
226
  }
227
227
 
228
- entries(): SetIterator<[K, V]> {
228
+ entries(): IterableIterator<[K, V]> {
229
229
  return this[Symbol.iterator]();
230
230
  }
231
231
 
232
- keys(): SetIterator<K> {
232
+ keys(): IterableIterator<K> {
233
233
  return this._keys.values();
234
234
  }
235
235
 
236
- values(): SetIterator<V> {
236
+ values(): IterableIterator<V> {
237
237
  return this._values.values();
238
238
  }
239
239
 
package/src/defer.test.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { defer, deferAsync } from './defer';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- import { expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { test } from 'vitest';
6
7
 
7
8
  import { createKeyPair, createId } from '@dxos/crypto';
8
9
  import { PublicKey } from '@dxos/keys';
package/src/index.ts CHANGED
@@ -7,8 +7,6 @@ export * from './assign';
7
7
  export * from './binder';
8
8
  export * from './bitfield';
9
9
  export * from './callback';
10
- export * from './callback-collection';
11
- export * from './chunk-array';
12
10
  export * from './circular-buffer';
13
11
  export * from './complex';
14
12
  export * from './defer';
@@ -32,12 +30,14 @@ export * from './reducers';
32
30
  export * from './safe-await';
33
31
  export * from './safe-instanceof';
34
32
  export * from './safe-parse-json';
35
- export * from './sliding-window-summary';
36
33
  export * from './sort';
37
- export * from './sum';
38
34
  export * from './throw-unhandled-error';
39
35
  export * from './to-fallback';
40
36
  export * from './tracer';
41
37
  export * from './types';
42
38
  export * from './uint8array';
39
+ export * from './sum';
43
40
  export * from './weak';
41
+ export * from './sliding-window-summary';
42
+ export * from './callback-collection';
43
+ export * from './chunk-array';
@@ -2,7 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { joinTables } from './join-tables';
8
9
 
package/src/order.test.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { inferObjectOrder, inferRecordOrder } from './order';
8
9
 
@@ -3,7 +3,8 @@
3
3
  //
4
4
 
5
5
  import { Schema as S } from '@effect/schema';
6
- import { describe, expect, test } from 'vitest';
6
+ import { expect } from 'chai';
7
+ import { describe, test } from 'vitest';
7
8
 
8
9
  import { ParamKeyAnnotation, Params } from './params';
9
10
 
package/src/params.ts CHANGED
@@ -13,9 +13,7 @@ import { decamelize } from 'xcase';
13
13
  // TODO(burdon): Change annotations.
14
14
 
15
15
  type ParamKeyAnnotationType = string;
16
-
17
16
  const ParamKeyAnnotationId = Symbol.for('@dxos/schema/annotation/ParamKeyAnnotation');
18
-
19
17
  export const ParamKeyAnnotation =
20
18
  (value: ParamKeyAnnotationType) =>
21
19
  <S extends Annotable.All>(self: S): Annotable.Self<S> =>
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2020 DXOS.org
3
+ //
4
+
5
+ import { expect } from 'chai';
6
+ import { test } from 'vitest';
7
+
8
+ import { isNode } from './platform';
9
+
10
+ // TODO(dmaretskyi): Broken with vitest conversion.
11
+ test.skip('knows when running in node', () => {
12
+ if (mochaExecutor.environment === 'nodejs') {
13
+ expect(isNode()).to.be.true;
14
+ } else {
15
+ expect(isNode()).to.be.false;
16
+ }
17
+ });
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { median, numericalValues } from './reducers';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { safeInstanceof } from './safe-instanceof';
8
9
 
package/src/sort.test.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { compareMulti, compareScalar, compareObject, compareString } from './sort';
8
9
 
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { createBucketReducer, numericalValues, reduceGroupBy, reduceSeries, reduceSet } from './reducers';
8
9
  import { Tracer } from './tracer';
package/src/types.test.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { describe, test } from 'vitest';
6
7
 
7
8
  import { nonNullable } from './types';
8
9
 
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ declare module 'xcase';
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { test, expect, describe } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { test, describe } from 'vitest';
6
7
 
7
8
  import { arrayToBuffer, arrayToString, bufferToArray, stringToArray } from './uint8array';
8
9
 
package/src/weak.test.ts CHANGED
@@ -2,14 +2,16 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { test, expect, describe } from 'vitest';
5
+ import { expect } from 'chai';
6
+ import { test, describe } from 'vitest';
7
+ import waitForExpect from 'wait-for-expect';
6
8
 
7
9
  import { WeakDictionary } from './weak';
8
10
 
9
11
  describe('WeakDictionary', () => {
10
12
  // Skipped because it takes a long time for garbage collection to kick in (~8 sec)
11
13
  // but it works otherwise.
12
- test.skip('unref item gets garbage collected', { timeout: 20_000 }, async () => {
14
+ test.skip('unref item gets garbage collected', async () => {
13
15
  const map = new WeakDictionary<string, any>();
14
16
  const key = 'key';
15
17
 
@@ -30,8 +32,10 @@ describe('WeakDictionary', () => {
30
32
 
31
33
  setValue();
32
34
  // Garbage collection should remove the item because no references exist.
33
- await expect.poll(() => map.size, { timeout: 20_000 }).toEqual(0);
35
+ await waitForExpect(() => {
36
+ expect(map.size).to.equal(0);
37
+ }, 20000);
34
38
 
35
39
  expect(map.has(key)).to.equal(false);
36
- });
40
+ }, 20_000);
37
41
  });
package/src/weak.ts CHANGED
@@ -16,17 +16,17 @@ export class WeakDictionary<K, V extends object> implements Map<K, V> {
16
16
  entries?.forEach(([key, value]) => this._register(key, value));
17
17
  }
18
18
 
19
- *entries(): SetIterator<[K, V]> {
19
+ *entries(): IterableIterator<[K, V]> {
20
20
  for (const [key, value] of this._internal) {
21
21
  yield [key, value.deref()!];
22
22
  }
23
23
  }
24
24
 
25
- keys(): SetIterator<K> {
25
+ keys(): IterableIterator<K> {
26
26
  return this._internal.keys();
27
27
  }
28
28
 
29
- *values(): SetIterator<V> {
29
+ *values(): IterableIterator<V> {
30
30
  for (const value of this._internal.values()) {
31
31
  const deref = value.deref();
32
32
  if (!deref) {
@@ -36,7 +36,7 @@ export class WeakDictionary<K, V extends object> implements Map<K, V> {
36
36
  }
37
37
  }
38
38
 
39
- *[Symbol.iterator](): SetIterator<[K, V]> {
39
+ *[Symbol.iterator](): IterableIterator<[K, V]> {
40
40
  for (const [key, value] of this._internal) {
41
41
  yield [key, value.deref()!];
42
42
  }