@algolia/requester-node-http 5.0.0-alpha.89 → 5.0.0-alpha.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/requester-node-http",
3
- "version": "5.0.0-alpha.89",
3
+ "version": "5.0.0-alpha.90",
4
4
  "description": "Promise-based request library for node using the native http module.",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -20,13 +20,15 @@
20
20
  "test": "jest"
21
21
  },
22
22
  "dependencies": {
23
- "@algolia/client-common": "5.0.0-alpha.89"
23
+ "@algolia/client-common": "5.0.0-alpha.90"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/jest": "29.5.5",
27
- "@types/node": "18.18.5",
26
+ "@babel/preset-env": "7.23.2",
27
+ "@babel/preset-typescript": "7.23.2",
28
+ "@types/jest": "29.5.7",
29
+ "@types/node": "20.8.10",
28
30
  "jest": "29.7.0",
29
- "nock": "13.3.4",
31
+ "nock": "13.3.8",
30
32
  "ts-jest": "29.1.1",
31
33
  "typescript": "5.2.2"
32
34
  },
@@ -151,8 +151,8 @@ describe('status code handling', () => {
151
151
  // create a test response stream that is chunked inside a unicode character
152
152
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
153
153
  function* generate() {
154
- yield data.slice(0, 3);
155
- yield data.slice(3);
154
+ yield data.subarray(0, 3);
155
+ yield data.subarray(3);
156
156
  }
157
157
 
158
158
  const testStream = Readable.from(generate());
@@ -186,7 +186,7 @@ describe('timeout handling', () => {
186
186
  const response = await requester.send({
187
187
  ...timeoutRequest,
188
188
  connectTimeout: 1000,
189
- url: 'http://www.google.com:81',
189
+ url: 'http://localhost:1111/connection_timeout',
190
190
  });
191
191
 
192
192
  const now = Date.now();
@@ -201,7 +201,7 @@ describe('timeout handling', () => {
201
201
  const response = await requester.send({
202
202
  ...timeoutRequest,
203
203
  connectTimeout: 2000,
204
- url: 'http://www.google.com:81',
204
+ url: 'http://localhost:1111/connection_timeout',
205
205
  });
206
206
 
207
207
  const now = Date.now();