@crawlee/core 4.0.0-beta.198 → 4.0.0-beta.199

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/package.json +7 -7
  2. package/serialization.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/core",
3
- "version": "4.0.0-beta.198",
3
+ "version": "4.0.0-beta.199",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"
@@ -53,10 +53,10 @@
53
53
  "@apify/log": "^3.0.1",
54
54
  "@apify/timeout": "^1.0.1",
55
55
  "@apify/utilities": "^3.0.1",
56
- "@crawlee/fs-storage": "4.0.0-beta.198",
57
- "@crawlee/http-client": "4.0.0-beta.198",
58
- "@crawlee/types": "4.0.0-beta.198",
59
- "@crawlee/utils": "4.0.0-beta.198",
56
+ "@crawlee/fs-storage": "4.0.0-beta.199",
57
+ "@crawlee/http-client": "4.0.0-beta.199",
58
+ "@crawlee/types": "4.0.0-beta.199",
59
+ "@crawlee/utils": "4.0.0-beta.199",
60
60
  "@sapphire/async-queue": "^1.5.5",
61
61
  "@standard-schema/spec": "^1.0.0",
62
62
  "@vladfrangu/async_event_emitter": "^2.4.6",
@@ -64,7 +64,7 @@
64
64
  "csv-stringify": "^6.5.2",
65
65
  "json5": "^2.2.3",
66
66
  "mime-types": "^3.0.1",
67
- "stream-json": "^1.9.1",
67
+ "stream-json": "^3.7.0",
68
68
  "tslib": "^2.8.1",
69
69
  "type-fest": "^4.41.0",
70
70
  "zod": "^4.5.4"
@@ -76,5 +76,5 @@
76
76
  }
77
77
  }
78
78
  },
79
- "gitHead": "889cfffcc20b2803f0d95d7cb006ad1e7f672452"
79
+ "gitHead": "15064bef4a733bffd4db490cc683aee488787c2e"
80
80
  }
package/serialization.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { pipeline as streamPipeline, Readable, Writable } from 'node:stream';
2
2
  import util from 'node:util';
3
3
  import zlib from 'node:zlib';
4
- import StreamArray from 'stream-json/streamers/StreamArray.js';
4
+ import StreamArray from 'stream-json/streamers/stream-array.js';
5
5
  import { z } from 'zod';
6
6
  import { parseArgument, schemas } from './validators.js';
7
7
  const pipeline = util.promisify(streamPipeline);
@@ -76,7 +76,7 @@ export async function serializeArray(data) {
76
76
  export async function deserializeArray(compressedData) {
77
77
  parseArgument(compressedData, uint8ArraySchema);
78
78
  const { chunks, collector } = createChunkCollector({ fromValuesStream: true });
79
- await pipeline(Readable.from([compressedData]), zlib.createGunzip(), StreamArray.withParser(), collector);
79
+ await pipeline(Readable.from([compressedData]), zlib.createGunzip(), StreamArray.withParserAsStream(), collector);
80
80
  return chunks;
81
81
  }
82
82
  /**
@@ -90,7 +90,7 @@ export async function deserializeArray(compressedData) {
90
90
  */
91
91
  export function createDeserialize(compressedData) {
92
92
  parseArgument(compressedData, uint8ArraySchema);
93
- const streamArray = StreamArray.withParser();
93
+ const streamArray = StreamArray.withParserAsStream();
94
94
  const destination = pluckValue(streamArray);
95
95
  streamPipeline(Readable.from([compressedData]), zlib.createGunzip(), destination, (err) => destination.emit(err));
96
96
  return destination;