@lvce-editor/search-process 5.0.0 → 5.1.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 +1 -28
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -148,13 +148,6 @@ const getRipGrepPath = () => {
148
148
  return process.env.RIP_GREP_PATH;
149
149
  };
150
150
 
151
- /**
152
- *
153
- * @param {string} command
154
- * @param {string[]} args
155
- * @param {import('execa').Options} options
156
- * @returns
157
- */
158
151
  const exec$1 = async (command, args, options) => {
159
152
  string(command);
160
153
  array(args);
@@ -392,31 +385,11 @@ class TextSearchError extends Error {
392
385
  }
393
386
  }
394
387
 
395
- const withResolvers = () => {
396
- /**
397
- * @type {any}
398
- */
399
- let _resolve;
400
- /**
401
- * @type {any}
402
- */
403
- let _reject;
404
- const promise = new Promise((resolve, reject) => {
405
- _resolve = resolve;
406
- _reject = reject;
407
- });
408
- return {
409
- resolve: _resolve,
410
- reject: _reject,
411
- promise
412
- };
413
- };
414
-
415
388
  const getFirstEvent = (eventEmitter, eventMap) => {
416
389
  const {
417
390
  resolve,
418
391
  promise
419
- } = withResolvers();
392
+ } = Promise.withResolvers();
420
393
  const listenerMap = Object.create(null);
421
394
  const cleanup = value => {
422
395
  for (const event of Object.keys(eventMap)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/search-process",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Search Process",
5
5
  "keywords": [
6
6
  "Lvce Editor",