@florajs/datasource-solr 3.0.0 → 4.0.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/index.js +4 -2
  2. package/package.json +11 -11
package/index.js CHANGED
@@ -238,14 +238,16 @@ function querySolr(requestUrl, params, requestOptions, agent) {
238
238
  });
239
239
  });
240
240
 
241
- req.setTimeout(requestOptions.requestTimeout, () => req.abort());
242
-
243
241
  req.write(querystring.stringify(params)); // add params to POST body
244
242
 
245
243
  req.on('error', (err) => {
246
244
  err.message = `Solr error: ${err.message} (${options.host})`;
247
245
  reject(err);
248
246
  });
247
+ req.on('timeout', () => {
248
+ req.destroy();
249
+ reject(new Error('Request timed out'));
250
+ });
249
251
 
250
252
  req.end();
251
253
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florajs/datasource-solr",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Solr connection for Flora",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,23 +37,23 @@
37
37
  }
38
38
  ],
39
39
  "engines": {
40
- "node": ">=12"
40
+ "node": ">=14"
41
41
  },
42
42
  "dependencies": {
43
43
  "@florajs/errors": "^3.0.0",
44
44
  "lodash": "^4.17.21"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/chai": "^4.3.0",
48
- "@types/mocha": "^9.0.0",
47
+ "@types/chai": "^4.3.4",
48
+ "@types/mocha": "^10.0.0",
49
49
  "@types/nock": "^11.1.0",
50
- "chai": "^4.3.4",
51
- "eslint": "^8.6.0",
52
- "eslint-config-prettier": "^8.3.0",
53
- "eslint-plugin-prettier": "^4.0.0",
54
- "mocha": "^9.1.3",
55
- "nock": "^13.2.1",
50
+ "chai": "^4.3.7",
51
+ "eslint": "^8.27.0",
52
+ "eslint-config-prettier": "^8.5.0",
53
+ "eslint-plugin-prettier": "^4.2.1",
54
+ "mocha": "^10.1.0",
55
+ "nock": "^13.2.9",
56
56
  "pre-commit": "^1.2.2",
57
- "prettier": "^2.5.1"
57
+ "prettier": "^2.7.1"
58
58
  }
59
59
  }