refactor(stream): Stand on promise-kit dependency
MODIFY
packages/stream/index.js
packages/stream/index.js
/// <reference types="ses"/>
import { E } from '@endo/eventual-send';
+import { makePromiseKit } from '@endo/promise-kit';
/**
* @template T
@@ -27,22 +28,6 @@ import { E } from '@endo/eventual-send';
// making it useless.
const freeze = /** @type {<T>(v: T | Readonly<T>) => T} */ (Object.freeze);
-/**
- * @template T
- * @returns {PromiseKit<T>}
- */
-const makePromiseKit = () => {
- let resolve;
- let reject;
- const promise = new Promise((res, rej) => {
- resolve = res;
- reject = rej;
- });
- assert(resolve !== undefined);
- assert(reject !== undefined);
- return harden({ promise, resolve, reject });
-};
-
/**
* @template T
* @returns {import('./types.js').AsyncQueue<T>}

MODIFY
packages/stream/package.json
packages/stream/package.json
},
"dependencies": {
"@endo/eventual-send": "^0.15.3",
+ "@endo/promise-kit": "^0.2.41",
"ses": "^0.15.15"
},
"devDependencies": {

refactor(stream): Stand on promise-kit dependency (#1190)