New Upstream Snapshot - node-request-capture-har

Ready changes

Summary

Merged new upstream version: 1.2.2+git20170327.1.f07b9c6 (was: 1.2.2).

Resulting package

Built on 2023-01-19T17:05 (took 8m5s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots node-request-capture-har

Lintian Result

Diff

diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index c6c8b36..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 8fa5f4e..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.idea
-output
-node_modules
-request-har-capture.test.js
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 8252805..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
-  - "stable"
-script: "npm run travis"
diff --git a/README.md b/README.md
index 15c1e84..eb7f848 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 > Wrapper for [`request` module](https://www.npmjs.com/package/request) that saves all network traffic data as a HAR file.
 
-[![Build Status](https://travis-ci.org/paulirish/request-capture-har.png)](https://travis-ci.org/paulirish/request-capture-har) [![NPM request-capture-har package](https://img.shields.io/npm/v/request-capture-har.svg)](https://npmjs.org/package/request-capture-har)
+[![Build Status](https://travis-ci.org/paulirish/request-capture-har.svg?branch=master)](https://travis-ci.org/paulirish/request-capture-har) [![NPM request-capture-har package](https://img.shields.io/npm/v/request-capture-har.svg)](https://npmjs.org/package/request-capture-har)
 
 **Compatibility**
 
@@ -26,7 +26,7 @@ requestCaptureHar.request(uri, options, callback);
 requestCaptureHar.saveHar(`network-waterfall_${new Date().toISOString()}.har`);
 
 // You can also clear any collected traffic
-requestCaptureHar.clearHar();
+requestCaptureHar.clear();
 ```
 
 This repo is a fork of [larsthorup's `node-request-har-capture`](https://github.com/larsthorup/node-request-har-capture). Instead of monkey-patching `request-promise`, the API allows you to pass in the general `request` module. We also added better support for transfer timings.
diff --git a/debian/changelog b/debian/changelog
index 138567f..8ec2060 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-request-capture-har (1.2.2+git20170327.1.f07b9c6-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 19 Jan 2023 17:00:44 -0000
+
 node-request-capture-har (1.2.2-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/package.json b/package.json
index 28df7be..d993193 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
   "description": "Wrapper for request module that saves all traffic as a HAR file, useful for auto mocking a client",
   "main": "request-capture-har.js",
   "scripts": {
-    "test": "semistandard",
+    "test": "semistandard && ava",
     "travis": "npm test && node request-capture-har.js"
   },
   "repository": {
@@ -26,6 +26,8 @@
     "request-capture-har.js"
   ],
   "devDependencies": {
+    "ava": "^0.18.2",
+    "request": "^2.81.0",
     "semistandard": "^8.0.0"
   }
 }
diff --git a/request-capture-har.js b/request-capture-har.js
index a996520..3ebb0d7 100644
--- a/request-capture-har.js
+++ b/request-capture-har.js
@@ -72,6 +72,8 @@ HarWrapper.prototype.saveHar = function (fileName) {
 
 HarWrapper.prototype.buildTimings = function (entry, response) {
   var startTs = response.request.startTime;
+  if (!startTs) return;
+
   var endTs = startTs + response.elapsedTime;
   var totalTime = endTs - startTs;
 
diff --git a/test/istanbul.conf.js b/test/istanbul.conf.js
deleted file mode 100644
index 4ed915d..0000000
--- a/test/istanbul.conf.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = {
-  verbose: false,
-  reporting: {
-    print: 'none',
-    dir: './output/coverage',
-    reports: [
-      'lcov',
-      'json',
-      'text-summary'
-    ]
-  }
-};
diff --git a/test/mocha.main.js b/test/mocha.main.js
deleted file mode 100644
index 6e6f0e5..0000000
--- a/test/mocha.main.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var chai = require('chai');
-chai.should();

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details