@cspell/cspell-pipe 6.26.3 → 6.28.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 (179) hide show
  1. package/dist/cjs/helpers/distribute.js +37 -0
  2. package/dist/cjs/helpers/index.js +17 -0
  3. package/dist/cjs/helpers/interleave.js +22 -0
  4. package/dist/cjs/helpers/iteratorToIterable.js +18 -0
  5. package/dist/cjs/helpers/toArray.js +21 -0
  6. package/dist/cjs/helpers/toAsyncIterable.js +19 -0
  7. package/dist/cjs/helpers/util.js +15 -0
  8. package/dist/cjs/index.js +60 -0
  9. package/dist/cjs/internalTypes.js +3 -0
  10. package/dist/cjs/operators/{append.cjs → append.js} +8 -10
  11. package/dist/cjs/operators/await.js +13 -0
  12. package/dist/cjs/operators/{combine.cjs → combine.js} +5 -4
  13. package/dist/cjs/operators/{concatMap.cjs → concatMap.js} +8 -16
  14. package/dist/cjs/operators/{filter.cjs → filter.js} +8 -10
  15. package/dist/cjs/operators/{first.cjs → first.js} +8 -10
  16. package/dist/cjs/operators/{flatten.cjs → flatten.js} +8 -16
  17. package/dist/cjs/operators/index.js +60 -0
  18. package/dist/cjs/operators/joinStrings.js +28 -0
  19. package/dist/cjs/operators/{last.cjs → last.js} +8 -10
  20. package/dist/cjs/operators/{map.cjs → map.js} +8 -16
  21. package/dist/cjs/operators/{reduce.cjs → reduce.js} +9 -20
  22. package/dist/cjs/operators/{skip.cjs → skip.js} +8 -16
  23. package/dist/cjs/operators/{take.cjs → take.js} +8 -16
  24. package/dist/cjs/operators/{tap.cjs → tap.js} +8 -16
  25. package/dist/cjs/operators/types.js +3 -0
  26. package/dist/cjs/operators/{unique.cjs → unique.js} +8 -16
  27. package/dist/cjs/pipe.js +15 -0
  28. package/dist/cjs/reduce.js +27 -0
  29. package/dist/cjs/sync/index.js +26 -0
  30. package/dist/{cjs/operators/helpers/distribute.d.ts → esm/helpers/distribute.d.mts} +1 -1
  31. package/dist/esm/helpers/distribute.js +0 -1
  32. package/dist/esm/helpers/distribute.mjs +32 -0
  33. package/dist/esm/helpers/index.d.mts +7 -0
  34. package/dist/esm/helpers/index.js +0 -1
  35. package/dist/esm/helpers/index.mjs +6 -0
  36. package/dist/{cjs/operators/helpers/interleave.d.ts → esm/helpers/interleave.d.mts} +1 -1
  37. package/dist/esm/helpers/interleave.js +0 -1
  38. package/dist/esm/helpers/interleave.mjs +17 -0
  39. package/dist/{cjs/operators/helpers/iteratorToIterable.d.ts → esm/helpers/iteratorToIterable.d.mts} +1 -1
  40. package/dist/esm/helpers/iteratorToIterable.js +0 -1
  41. package/dist/esm/helpers/iteratorToIterable.mjs +12 -0
  42. package/dist/{cjs/operators/helpers/toArray.d.ts → esm/helpers/toArray.d.mts} +1 -1
  43. package/dist/esm/helpers/toArray.js +0 -1
  44. package/dist/esm/helpers/toArray.mjs +14 -0
  45. package/dist/{cjs/sync/helpers/toAsyncIterable.d.ts → esm/helpers/toAsyncIterable.d.mts} +2 -2
  46. package/dist/esm/helpers/toAsyncIterable.js +0 -1
  47. package/dist/esm/helpers/toAsyncIterable.mjs +14 -0
  48. package/dist/{cjs/operators/helpers/util.d.ts → esm/helpers/util.d.mts} +2 -2
  49. package/dist/esm/helpers/util.js +0 -1
  50. package/dist/esm/helpers/util.mjs +9 -0
  51. package/dist/esm/index.d.mts +9 -0
  52. package/dist/esm/index.js +0 -1
  53. package/dist/esm/index.mjs +10 -0
  54. package/dist/{cjs/operators/internalTypes.d.ts → esm/internalTypes.d.mts} +1 -1
  55. package/dist/esm/internalTypes.js +0 -1
  56. package/dist/esm/internalTypes.mjs +1 -0
  57. package/dist/{cjs/sync/operators/append.d.ts → esm/operators/append.d.mts} +2 -2
  58. package/dist/esm/operators/append.js +0 -1
  59. package/dist/esm/operators/append.mjs +35 -0
  60. package/dist/{cjs/operators/operators/await.d.ts → esm/operators/await.d.mts} +1 -1
  61. package/dist/esm/operators/await.js +0 -1
  62. package/dist/{cjs/operators/await.cjs → esm/operators/await.mjs} +1 -5
  63. package/dist/{cjs/operators/operators/combine.d.ts → esm/operators/combine.d.mts} +3 -3
  64. package/dist/esm/operators/combine.js +0 -1
  65. package/dist/esm/operators/combine.mjs +18 -0
  66. package/dist/{cjs/operators/operators/concatMap.d.ts → esm/operators/concatMap.d.mts} +1 -1
  67. package/dist/esm/operators/concatMap.js +0 -1
  68. package/dist/esm/operators/concatMap.mjs +18 -0
  69. package/dist/{cjs/operators/operators/filter.d.ts → esm/operators/filter.d.mts} +2 -2
  70. package/dist/esm/operators/filter.js +0 -1
  71. package/dist/esm/operators/filter.mjs +29 -0
  72. package/dist/{cjs/operators/operators/first.d.ts → esm/operators/first.d.mts} +2 -2
  73. package/dist/esm/operators/first.js +0 -1
  74. package/dist/esm/operators/first.mjs +33 -0
  75. package/dist/{cjs/operators/operators/flatten.d.ts → esm/operators/flatten.d.mts} +1 -1
  76. package/dist/esm/operators/flatten.js +0 -1
  77. package/dist/esm/operators/flatten.mjs +18 -0
  78. package/dist/esm/operators/index.d.mts +17 -0
  79. package/dist/esm/operators/index.js +0 -1
  80. package/dist/esm/operators/index.mjs +15 -0
  81. package/dist/{cjs/operators/operators/joinStrings.d.ts → esm/operators/joinStrings.d.mts} +1 -1
  82. package/dist/esm/operators/joinStrings.js +0 -1
  83. package/dist/esm/operators/joinStrings.mjs +21 -0
  84. package/dist/{cjs/operators/operators/last.d.ts → esm/operators/last.d.mts} +2 -2
  85. package/dist/esm/operators/last.js +0 -1
  86. package/dist/esm/operators/last.mjs +38 -0
  87. package/dist/{cjs/operators/operators/map.d.ts → esm/operators/map.d.mts} +1 -1
  88. package/dist/esm/operators/map.js +0 -1
  89. package/dist/esm/operators/map.mjs +18 -0
  90. package/dist/{cjs/operators/operators/reduce.d.ts → esm/operators/reduce.d.mts} +1 -1
  91. package/dist/esm/operators/reduce.js +0 -1
  92. package/dist/esm/operators/reduce.mjs +48 -0
  93. package/dist/{cjs/operators/operators/skip.d.ts → esm/operators/skip.d.mts} +1 -1
  94. package/dist/esm/operators/skip.js +0 -1
  95. package/dist/esm/operators/skip.mjs +26 -0
  96. package/dist/{operators/take.d.ts → esm/operators/take.d.mts} +1 -1
  97. package/dist/esm/operators/take.js +0 -1
  98. package/dist/esm/operators/take.mjs +30 -0
  99. package/dist/{cjs/sync/operators/tap.d.ts → esm/operators/tap.d.mts} +1 -1
  100. package/dist/esm/operators/tap.js +0 -1
  101. package/dist/esm/operators/tap.mjs +35 -0
  102. package/dist/{cjs/operators/operators/types.d.ts → esm/operators/types.d.mts} +1 -1
  103. package/dist/esm/operators/types.js +0 -1
  104. package/dist/esm/operators/types.mjs +1 -0
  105. package/dist/{operators/unique.d.ts → esm/operators/unique.d.mts} +1 -1
  106. package/dist/esm/operators/unique.js +0 -1
  107. package/dist/esm/operators/unique.mjs +52 -0
  108. package/dist/{cjs/operators/pipe.d.ts → esm/pipe.d.mts} +2 -2
  109. package/dist/esm/pipe.js +0 -1
  110. package/dist/esm/pipe.mjs +9 -0
  111. package/dist/{cjs/sync/reduce.d.ts → esm/reduce.d.mts} +2 -2
  112. package/dist/esm/reduce.js +0 -1
  113. package/dist/esm/reduce.mjs +20 -0
  114. package/dist/{cjs/operators/sync/index.d.ts → esm/sync/index.d.mts} +6 -6
  115. package/dist/esm/sync/index.js +0 -1
  116. package/dist/{cjs/sync/sync/index.d.ts → esm/sync/index.mjs} +4 -6
  117. package/package.json +42 -61
  118. package/dist/cjs/index.cjs +0 -644
  119. package/dist/cjs/operators/helpers/index.d.ts +0 -7
  120. package/dist/cjs/operators/helpers/toAsyncIterable.d.ts +0 -11
  121. package/dist/cjs/operators/index.cjs +0 -508
  122. package/dist/cjs/operators/joinStrings.cjs +0 -49
  123. package/dist/cjs/operators/operators/append.d.ts +0 -15
  124. package/dist/cjs/operators/operators/index.d.ts +0 -17
  125. package/dist/cjs/operators/operators/take.d.ts +0 -8
  126. package/dist/cjs/operators/operators/tap.d.ts +0 -19
  127. package/dist/cjs/operators/operators/unique.d.ts +0 -4
  128. package/dist/cjs/operators/types.cjs +0 -2
  129. package/dist/cjs/sync/helpers/distribute.d.ts +0 -13
  130. package/dist/cjs/sync/helpers/index.d.ts +0 -7
  131. package/dist/cjs/sync/helpers/interleave.d.ts +0 -2
  132. package/dist/cjs/sync/helpers/iteratorToIterable.d.ts +0 -3
  133. package/dist/cjs/sync/helpers/toArray.d.ts +0 -6
  134. package/dist/cjs/sync/helpers/util.d.ts +0 -4
  135. package/dist/cjs/sync/index.cjs +0 -245
  136. package/dist/cjs/sync/internalTypes.d.ts +0 -17
  137. package/dist/cjs/sync/operators/await.d.ts +0 -2
  138. package/dist/cjs/sync/operators/combine.d.ts +0 -23
  139. package/dist/cjs/sync/operators/concatMap.d.ts +0 -4
  140. package/dist/cjs/sync/operators/filter.d.ts +0 -10
  141. package/dist/cjs/sync/operators/first.d.ts +0 -10
  142. package/dist/cjs/sync/operators/flatten.d.ts +0 -4
  143. package/dist/cjs/sync/operators/index.d.ts +0 -17
  144. package/dist/cjs/sync/operators/joinStrings.d.ts +0 -4
  145. package/dist/cjs/sync/operators/last.d.ts +0 -10
  146. package/dist/cjs/sync/operators/map.d.ts +0 -4
  147. package/dist/cjs/sync/operators/reduce.d.ts +0 -7
  148. package/dist/cjs/sync/operators/skip.d.ts +0 -4
  149. package/dist/cjs/sync/operators/take.d.ts +0 -8
  150. package/dist/cjs/sync/operators/types.d.ts +0 -4
  151. package/dist/cjs/sync/operators/unique.d.ts +0 -4
  152. package/dist/cjs/sync/pipe.d.ts +0 -20
  153. package/dist/helpers/distribute.d.ts +0 -13
  154. package/dist/helpers/index.d.ts +0 -7
  155. package/dist/helpers/interleave.d.ts +0 -2
  156. package/dist/helpers/iteratorToIterable.d.ts +0 -3
  157. package/dist/helpers/toArray.d.ts +0 -6
  158. package/dist/helpers/toAsyncIterable.d.ts +0 -11
  159. package/dist/helpers/util.d.ts +0 -4
  160. package/dist/index.d.ts +0 -9
  161. package/dist/internalTypes.d.ts +0 -17
  162. package/dist/operators/append.d.ts +0 -15
  163. package/dist/operators/await.d.ts +0 -2
  164. package/dist/operators/combine.d.ts +0 -23
  165. package/dist/operators/concatMap.d.ts +0 -4
  166. package/dist/operators/filter.d.ts +0 -10
  167. package/dist/operators/first.d.ts +0 -10
  168. package/dist/operators/flatten.d.ts +0 -4
  169. package/dist/operators/index.d.ts +0 -17
  170. package/dist/operators/joinStrings.d.ts +0 -4
  171. package/dist/operators/last.d.ts +0 -10
  172. package/dist/operators/map.d.ts +0 -4
  173. package/dist/operators/reduce.d.ts +0 -7
  174. package/dist/operators/skip.d.ts +0 -4
  175. package/dist/operators/tap.d.ts +0 -19
  176. package/dist/operators/types.d.ts +0 -4
  177. package/dist/pipe.d.ts +0 -20
  178. package/dist/reduce.d.ts +0 -16
  179. package/dist/sync/index.d.ts +0 -6
@@ -0,0 +1,52 @@
1
+ import { toPipeFn } from '../helpers/util.mjs';
2
+ export function opUniqueAsync(k) {
3
+ function fnK(k) {
4
+ async function* fn(iter) {
5
+ const s = new Set();
6
+ for await (const v of iter) {
7
+ const kk = k(v);
8
+ if (s.has(kk))
9
+ continue;
10
+ s.add(kk);
11
+ yield v;
12
+ }
13
+ }
14
+ return fn;
15
+ }
16
+ async function* fn(iter) {
17
+ const s = new Set();
18
+ for await (const v of iter) {
19
+ if (s.has(v))
20
+ continue;
21
+ s.add(v);
22
+ yield v;
23
+ }
24
+ }
25
+ return k ? fnK(k) : fn;
26
+ }
27
+ export function opUniqueSync(k) {
28
+ function fnK(key) {
29
+ function* fn(iter) {
30
+ const s = new Set();
31
+ for (const v of iter) {
32
+ const kk = key(v);
33
+ if (s.has(kk))
34
+ continue;
35
+ s.add(kk);
36
+ yield v;
37
+ }
38
+ }
39
+ return fn;
40
+ }
41
+ function* fn(iter) {
42
+ const s = new Set();
43
+ for (const v of iter) {
44
+ if (s.has(v))
45
+ continue;
46
+ s.add(v);
47
+ yield v;
48
+ }
49
+ }
50
+ return k ? fnK(k) : fn;
51
+ }
52
+ export const opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey));
@@ -1,4 +1,4 @@
1
- import type { AnyIterable, PipeAsyncTx, PipeSyncTx } from './internalTypes.js';
1
+ import type { AnyIterable, PipeAsyncTx, PipeSyncTx } from './internalTypes.mjs';
2
2
  export declare function pipeAsync<T>(i: AnyIterable<T>): AsyncIterable<T>;
3
3
  export declare function pipeAsync<T, T0>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0]>): AsyncIterable<T0>;
4
4
  export declare function pipeAsync<T, T0, T1>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1]>): AsyncIterable<T1>;
@@ -17,4 +17,4 @@ export declare function pipeSync<T, T0, T1, T2, T3, T4>(i: Iterable<T>, ...f: Pi
17
17
  export declare function pipeSync<T, T0, T1, T2, T3, T4, T5>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5]>): Iterable<T5>;
18
18
  export declare function pipeSync<T, T0, T1, T2, T3, T4, T5, T6>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): Iterable<T6>;
19
19
  export declare function pipeSync<T, T0, T1, T2, T3, T4, T5, T6, T7>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): Iterable<T7>;
20
- //# sourceMappingURL=pipe.d.ts.map
20
+ //# sourceMappingURL=pipe.d.mts.map
package/dist/esm/pipe.js CHANGED
@@ -7,4 +7,3 @@ export function pipeAsync(i, ...fns) {
7
7
  export function pipeSync(i, ...fns) {
8
8
  return opCombineSync(...fns)(i);
9
9
  }
10
- //# sourceMappingURL=pipe.js.map
@@ -0,0 +1,9 @@
1
+ import { toAsyncIterable } from './helpers/index.mjs';
2
+ import { opCombineAsync, opCombineSync } from './operators/index.mjs';
3
+ export function pipeAsync(i, ...fns) {
4
+ const iter = toAsyncIterable(i);
5
+ return opCombineAsync(...fns)(iter);
6
+ }
7
+ export function pipeSync(i, ...fns) {
8
+ return opCombineSync(...fns)(i);
9
+ }
@@ -1,4 +1,4 @@
1
- import type { AnyIterable } from './internalTypes.js';
1
+ import type { AnyIterable } from './internalTypes.mjs';
2
2
  export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T): T | undefined;
3
3
  export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): T;
4
4
  export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue?: T): T | undefined;
@@ -13,4 +13,4 @@ export declare function reduce<T, U>(iter: Iterable<T>, reduceFn: (prev: U, curr
13
13
  export declare function reduce<T>(iter: AsyncIterable<T>, reduceFn: (prev: T, curr: T) => T): Promise<T | undefined>;
14
14
  export declare function reduce<T>(iter: AsyncIterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): Promise<T>;
15
15
  export declare function reduce<T, U>(iter: AsyncIterable<T>, reduceFn: (prev: U, curr: T) => U, initialValue: U): Promise<U>;
16
- //# sourceMappingURL=reduce.d.ts.map
16
+ //# sourceMappingURL=reduce.d.mts.map
@@ -18,4 +18,3 @@ export async function reduceAsync(iter, reduceFn, initialValue) {
18
18
  export function reduce(iter, reduceFn, initialValue) {
19
19
  return isAsyncIterable(iter) ? reduceAsync(iter, reduceFn, initialValue) : reduceSync(iter, reduceFn, initialValue);
20
20
  }
21
- //# sourceMappingURL=reduce.js.map
@@ -0,0 +1,20 @@
1
+ import { isAsyncIterable } from './helpers/index.mjs';
2
+ import { toArrayAsync } from './helpers/toArray.mjs';
3
+ import { opReduceAsync, opReduceSync } from './operators/index.mjs';
4
+ import { pipeAsync, pipeSync } from './pipe.mjs';
5
+ export function reduceSync(iter, reduceFn, initialValue) {
6
+ const i = initialValue === undefined
7
+ ? pipeSync(iter, opReduceSync(reduceFn))
8
+ : pipeSync(iter, opReduceSync(reduceFn, initialValue));
9
+ return [...i][0];
10
+ }
11
+ export async function reduceAsync(iter, reduceFn, initialValue) {
12
+ const i = initialValue === undefined
13
+ ? pipeAsync(iter, opReduceAsync(reduceFn))
14
+ : pipeAsync(iter, opReduceAsync(reduceFn, initialValue));
15
+ const arr = await toArrayAsync(i);
16
+ return arr[0];
17
+ }
18
+ export function reduce(iter, reduceFn, initialValue) {
19
+ return isAsyncIterable(iter) ? reduceAsync(iter, reduceFn, initialValue) : reduceSync(iter, reduceFn, initialValue);
20
+ }
@@ -1,6 +1,6 @@
1
- export { toArraySync as toArray } from '../helpers/toArray.js';
2
- export type { OperatorSync as Operator } from '../operators/index.js';
3
- export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.js';
4
- export { pipeSync as pipe, pipeSync } from '../pipe.js';
5
- export { reduceSync as reduce } from '../reduce.js';
6
- //# sourceMappingURL=index.d.ts.map
1
+ export { toArraySync as toArray } from '../helpers/toArray.mjs';
2
+ export type { OperatorSync as Operator } from '../operators/index.mjs';
3
+ export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.mjs';
4
+ export { pipeSync as pipe, pipeSync } from '../pipe.mjs';
5
+ export { reduceSync as reduce } from '../reduce.mjs';
6
+ //# sourceMappingURL=index.d.mts.map
@@ -2,4 +2,3 @@ export { toArraySync as toArray } from '../helpers/toArray.js';
2
2
  export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.js';
3
3
  export { pipeSync as pipe, pipeSync } from '../pipe.js';
4
4
  export { reduceSync as reduce } from '../reduce.js';
5
- //# sourceMappingURL=index.js.map
@@ -1,6 +1,4 @@
1
- export { toArraySync as toArray } from '../helpers/toArray.js';
2
- export type { OperatorSync as Operator } from '../operators/index.js';
3
- export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.js';
4
- export { pipeSync as pipe, pipeSync } from '../pipe.js';
5
- export { reduceSync as reduce } from '../reduce.js';
6
- //# sourceMappingURL=index.d.ts.map
1
+ export { toArraySync as toArray } from '../helpers/toArray.mjs';
2
+ export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.mjs';
3
+ export { pipeSync as pipe, pipeSync } from '../pipe.mjs';
4
+ export { reduceSync as reduce } from '../reduce.mjs';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.26.3",
6
+ "version": "6.28.0",
7
7
  "description": "Library to make working with Iterators/AsyncIterators easier.",
8
8
  "keywords": [
9
9
  "cspell",
@@ -16,93 +16,85 @@
16
16
  "author": "Jason Dent <jason@streetsidesoftware.nl>",
17
17
  "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-pipe#readme",
18
18
  "license": "MIT",
19
- "type": "module",
20
- "main": "dist/cjs/index.cjs",
21
- "module": "dist/esm/index.js",
19
+ "type": "commonjs",
20
+ "main": "dist/cjs/index.js",
21
+ "module": "dist/esm/index.mjs",
22
22
  "directories": {
23
23
  "dist": "dist"
24
24
  },
25
25
  "exports": {
26
26
  ".": {
27
- "import": "./dist/esm/index.js",
28
- "require": "./dist/cjs/index.cjs"
27
+ "import": "./dist/esm/index.mjs",
28
+ "require": "./dist/cjs/index.js"
29
29
  },
30
30
  "./index": {
31
- "import": "./dist/esm/index.js",
32
- "require": "./dist/cjs/index.cjs"
31
+ "import": "./dist/esm/index.mjs",
32
+ "require": "./dist/cjs/index.js"
33
33
  },
34
34
  "./index.js": {
35
- "import": "./dist/esm/index.js",
36
- "require": "./dist/cjs/index.cjs"
37
- },
38
- "./index.d.ts": {
39
- "import": "./dist/esm/index.d.ts",
40
- "require": "./dist/cjs/index.d.ts"
35
+ "import": "./dist/esm/index.mjs",
36
+ "require": "./dist/cjs/index.js"
41
37
  },
42
38
  "./operators": {
43
- "import": "./dist/esm/operators/index.js",
44
- "require": "./dist/cjs/operators/index.cjs"
39
+ "import": "./dist/esm/operators/index.mjs",
40
+ "require": "./dist/cjs/operators/index.js"
45
41
  },
46
42
  "./operators/index.js": {
47
- "import": "./dist/esm/operators/index.js",
48
- "require": "./dist/cjs/operators/index.cjs"
49
- },
50
- "./operators/index.d.ts": {
51
- "import": "./dist/esm/operators/index.d.ts",
52
- "require": "./dist/cjs/operators/index.d.ts"
43
+ "import": "./dist/esm/operators/index.mjs",
44
+ "require": "./dist/cjs/operators/index.js"
53
45
  },
54
46
  "./sync": {
55
- "import": "./dist/esm/sync/index.js",
56
- "require": "./dist/cjs/sync/index.cjs"
47
+ "import": "./dist/esm/sync/index.mjs",
48
+ "require": "./dist/cjs/sync/index.js"
57
49
  },
58
50
  "./sync/index": {
59
- "import": "./dist/esm/sync/index.js",
60
- "require": "./dist/cjs/sync/index.cjs"
51
+ "import": "./dist/esm/sync/index.mjs",
52
+ "require": "./dist/cjs/sync/index.js"
61
53
  },
62
54
  "./sync/index.js": {
63
- "import": "./dist/esm/sync/index.js",
64
- "require": "./dist/cjs/sync/index.cjs"
65
- },
66
- "./sync/index.d.ts": {
67
- "import": "./dist/esm/sync/index.d.ts",
68
- "require": "./dist/cjs/sync/index.d.ts"
55
+ "import": "./dist/esm/sync/index.mjs",
56
+ "require": "./dist/cjs/sync/index.js"
69
57
  }
70
58
  },
71
- "types": "dist/index.d.ts",
59
+ "types": "dist/cjs/index.d.ts",
72
60
  "typesVersions": {
73
61
  "*": {
74
- "index.d.ts": [
75
- "dist/index.d.ts"
62
+ "index.js": [
63
+ "dist/cjs/index.d.ts"
76
64
  ],
77
- "dist/index.d.ts": [
78
- "dist/index.d.ts"
65
+ "index.d.ts": [
66
+ "dist/cjs/index.d.ts"
79
67
  ],
80
68
  "operators": [
81
- "dist/operators/index.d.ts"
69
+ "dist/cjs/operators/index.d.ts"
82
70
  ],
83
71
  "operators/*.js": [
84
- "dist/operators/*.d.ts"
72
+ "dist/cjs/operators/*.d.ts"
85
73
  ],
86
74
  "operators/index.d.ts": [
87
- "dist/operators/index.d.ts"
75
+ "dist/cjs/operators/index.d.ts"
88
76
  ],
89
77
  "sync": [
90
- "dist/sync/index.d.ts"
78
+ "dist/cjs/sync/index.d.ts"
79
+ ],
80
+ "sync/index.js": [
81
+ "dist/cjs/sync/index.d.ts"
91
82
  ],
92
83
  "sync/index.d.ts": [
93
- "dist/sync/index.d.ts"
84
+ "dist/cjs/sync/index.d.ts"
94
85
  ],
95
86
  "dist/cjs/index.d.ts": [
96
- "dist/index.d.ts"
87
+ "dist/cjs/index.d.ts"
97
88
  ],
98
89
  "*": [
99
- "dist/*.d.ts",
100
- "dist/*/index.d.ts"
90
+ "dist/cjs/*.d.ts",
91
+ "dist/cjs/*/index.d.ts"
101
92
  ]
102
93
  }
103
94
  },
104
95
  "files": [
105
96
  "dist",
97
+ "!**/*.tsbuildInfo",
106
98
  "!**/__mocks__",
107
99
  "!**/*.spec.*",
108
100
  "!**/*.test.*",
@@ -110,11 +102,9 @@
110
102
  "!**/*.map"
111
103
  ],
112
104
  "scripts": {
113
- "build": "pnpm build:types && pnpm build:esm && pnpm build:cjs",
114
- "build:cjs": "rollup -c rollup.config.mjs",
115
- "build:esm": "tsc -p tsconfig.esm.json",
116
- "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist",
117
- "build-dev": "tsc -p tsconfig.dev.json",
105
+ "build": "tsc -b . && ts2mjs dist/esm",
106
+ "build:cjs": "tsc -p tsconfig.cjs.json",
107
+ "build:esm": "tsc -p tsconfig.esm.json && ts2mjs dist/esm",
118
108
  "watch": "tsc -p . -w",
119
109
  "clean": "shx rm -rf dist coverage .tsbuildinfo",
120
110
  "clean-build": "pnpm run clean && pnpm run build",
@@ -135,16 +125,7 @@
135
125
  "node": ">=14"
136
126
  },
137
127
  "devDependencies": {
138
- "@rollup/plugin-commonjs": "^24.0.1",
139
- "@rollup/plugin-json": "^6.0.0",
140
- "@rollup/plugin-node-resolve": "^15.0.1",
141
- "@rollup/plugin-typescript": "^11.0.0",
142
- "@types/node": "^18.13.0",
143
- "globby": "^13.1.3",
144
- "jest": "^29.4.3",
145
- "rollup": "^3.15.0",
146
- "tslib": "^2.5.0",
147
- "vitest": "^0.28.5"
128
+ "globby": "^13.1.3"
148
129
  },
149
- "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81"
130
+ "gitHead": "1c314413e76908e5fbf61fd2555726112b177c0e"
150
131
  }