@lvce-editor/ipc 13.8.0 → 14.0.0

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 (2) hide show
  1. package/dist/index.js +3 -15
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -533,23 +533,11 @@ const IpcChildWithModuleWorker$1 = {
533
533
  wrap: wrap$f
534
534
  };
535
535
 
536
- const withResolvers = () => {
537
- let _resolve;
538
- const promise = new Promise(resolve => {
539
- _resolve = resolve;
540
- });
541
- return {
542
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
543
- resolve: _resolve,
544
- promise
545
- };
546
- };
547
-
548
536
  const waitForFirstMessage = async port => {
549
537
  const {
550
538
  resolve,
551
539
  promise
552
- } = withResolvers();
540
+ } = Promise.withResolvers();
553
541
  port.addEventListener('message', resolve, {
554
542
  once: true
555
543
  });
@@ -832,7 +820,7 @@ const getFirstEvent = (eventEmitter, eventMap) => {
832
820
  const {
833
821
  resolve,
834
822
  promise
835
- } = withResolvers();
823
+ } = Promise.withResolvers();
836
824
  const listenerMap = Object.create(null);
837
825
  const cleanup = value => {
838
826
  for (const event of Object.keys(eventMap)) {
@@ -1088,7 +1076,7 @@ const getFirstUtilityProcessEvent = async utilityProcess => {
1088
1076
  const {
1089
1077
  resolve,
1090
1078
  promise
1091
- } = withResolvers();
1079
+ } = Promise.withResolvers();
1092
1080
  let stdout = '';
1093
1081
  let stderr = '';
1094
1082
  const cleanup = value => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/ipc",
3
- "version": "13.8.0",
3
+ "version": "14.0.0",
4
4
  "description": "Inter Process Communication for Lvce Editor",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@lvce-editor/assert": "^1.3.0",
19
19
  "@lvce-editor/verror": "^1.6.0",
20
- "@lvce-editor/web-socket-server": "^1.4.0"
20
+ "@lvce-editor/web-socket-server": "^2.0.0"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=22"