@naturalcycles/nodejs-lib 15.74.1 → 15.75.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.
package/dist/stream/pipeline.js
CHANGED
|
@@ -13,6 +13,7 @@ import { PIPELINE_GRACEFUL_ABORT } from './stream.util.js';
|
|
|
13
13
|
import { transformChunk } from './transform/transformChunk.js';
|
|
14
14
|
import { transformFilterSync } from './transform/transformFilter.js';
|
|
15
15
|
import { transformFlatten, transformFlattenIfNeeded } from './transform/transformFlatten.js';
|
|
16
|
+
// oxlint-disable-next-line import/no-cycle -- intentional cycle
|
|
16
17
|
import { transformFork } from './transform/transformFork.js';
|
|
17
18
|
import { transformLimit } from './transform/transformLimit.js';
|
|
18
19
|
import { transformLogProgress, } from './transform/transformLogProgress.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Transform } from 'node:stream';
|
|
2
2
|
import { createCommonLoggerAtLevel } from '@naturalcycles/js-lib/log';
|
|
3
3
|
import { pDefer } from '@naturalcycles/js-lib/promise/pDefer.js';
|
|
4
|
+
// oxlint-disable-next-line import/no-cycle -- intentional cycle
|
|
4
5
|
import { Pipeline } from '../pipeline.js';
|
|
5
6
|
import { createReadable } from '../readable/createReadable.js';
|
|
6
7
|
/**
|
|
@@ -13,6 +13,9 @@ const AJV_OPTIONS = {
|
|
|
13
13
|
// these are important and kept same as default:
|
|
14
14
|
// https://ajv.js.org/options.html#coercetypes
|
|
15
15
|
coerceTypes: false, // while `false` - it won't mutate your input
|
|
16
|
+
strictTypes: true,
|
|
17
|
+
strictTuples: true,
|
|
18
|
+
allowUnionTypes: true, // supports oneOf/anyOf schemas
|
|
16
19
|
};
|
|
17
20
|
const AJV_NON_MUTATING_OPTIONS = {
|
|
18
21
|
...AJV_OPTIONS,
|
package/package.json
CHANGED
package/src/stream/pipeline.ts
CHANGED
|
@@ -39,6 +39,7 @@ import { PIPELINE_GRACEFUL_ABORT } from './stream.util.js'
|
|
|
39
39
|
import { transformChunk } from './transform/transformChunk.js'
|
|
40
40
|
import { transformFilterSync } from './transform/transformFilter.js'
|
|
41
41
|
import { transformFlatten, transformFlattenIfNeeded } from './transform/transformFlatten.js'
|
|
42
|
+
// oxlint-disable-next-line import/no-cycle -- intentional cycle
|
|
42
43
|
import { transformFork } from './transform/transformFork.js'
|
|
43
44
|
import { transformLimit } from './transform/transformLimit.js'
|
|
44
45
|
import {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Transform } from 'node:stream'
|
|
2
2
|
import { createCommonLoggerAtLevel } from '@naturalcycles/js-lib/log'
|
|
3
3
|
import { type DeferredPromise, pDefer } from '@naturalcycles/js-lib/promise/pDefer.js'
|
|
4
|
+
// oxlint-disable-next-line import/no-cycle -- intentional cycle
|
|
4
5
|
import { Pipeline } from '../pipeline.js'
|
|
5
6
|
import { createReadable } from '../readable/createReadable.js'
|
|
6
7
|
import type { TransformOptions, TransformTyped } from '../stream.model.js'
|
|
@@ -21,6 +21,9 @@ const AJV_OPTIONS: Options = {
|
|
|
21
21
|
// these are important and kept same as default:
|
|
22
22
|
// https://ajv.js.org/options.html#coercetypes
|
|
23
23
|
coerceTypes: false, // while `false` - it won't mutate your input
|
|
24
|
+
strictTypes: true,
|
|
25
|
+
strictTuples: true,
|
|
26
|
+
allowUnionTypes: true, // supports oneOf/anyOf schemas
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
const AJV_NON_MUTATING_OPTIONS: Options = {
|