nock 9.6.0 → 9.6.1

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/CONTRIBUTING.md CHANGED
@@ -12,10 +12,11 @@ Please note that this project is released with a [Contributor Code of Conduct](.
12
12
  - [Generate README TOC](#generate-readme-toc)
13
13
  - [Running tests](#running-tests)
14
14
  * [Airplane mode](#airplane-mode)
15
+ - [Becoming a maintainer](#becoming-a-maintainer)
15
16
 
16
17
  <!-- tocstop -->
17
18
 
18
- ### Commit Message conventions
19
+ ## Commit Message conventions
19
20
 
20
21
  `nock` releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release).
21
22
  To automatically calculate the correct version number as well as changelogs,
@@ -36,7 +37,7 @@ Other helpful conventions are
36
37
 
37
38
  The commit message(s) of a pull request can be fixed using the `squash & merge` button.
38
39
 
39
- ### Generate README TOC
40
+ ## Generate README TOC
40
41
 
41
42
  Make sure to update the README's table of contents whenever you update the README using the following npm script.
42
43
 
@@ -44,17 +45,34 @@ Make sure to update the README's table of contents whenever you update the READM
44
45
  $ npm run toc
45
46
  ```
46
47
 
47
- ### Running tests
48
+ ## Running tests
48
49
 
49
50
  ```
50
51
  $ npm test
51
52
  ```
52
53
 
53
- #### Airplane mode
54
+ ### Airplane mode
54
55
 
55
56
  Some of the tests depend on online connectivity. To skip them, set the `AIRPLANE` environment variable to some value.
56
57
 
57
58
  ```
58
59
  $ export AIRPLANE=true
59
60
  $ npm test
60
- ```
61
+ ```
62
+
63
+ ## Becoming a maintainer
64
+
65
+ So you want to do more than file a bug or submit a PR? Awesome!
66
+
67
+ Nock is actively interested in having more maintainers. That means that we would love to have you (yes, you) get more involved if you want to! We don't have strict tests that you need to pass to become a maintainer. Instead, all we want is to find people who are frequent contributors, understand what Nock does, and are eager to help make this tool better.
68
+
69
+ Here are some things you can do today to actively show the Nock team that you're interested in helping out in the long term:
70
+
71
+ * **Triage issues!** We have more issues than we have bandwidth to deal with. For some of these issues, there are no labels, no comments suggesting how the issue could be resolved, and no follow-up after months or years of silence. It would be great if the issues actively reflected the state of the project. Go through old issues and suggesting labels in comments, ask for more information, and generally help out with the resolution process. This would be a great help!
72
+ * **Review PRs.** We have a lot of open PRs! Some of these are probably ready to merge, and some of them probably need more work. Any extra eyes on PRs are encouraged. Comment on code patterns you think need work, suggest extra tests, and let us know if a PR 'LGTM' ("looks good to me"). The more reviewers we have, the faster we can merge issues, the better this project becomes.
73
+ * **Help out!** If someone files a bug and no one has responded yet, see if you can resolve it! Suggest PRs, or file them yourself. While most contributors are going to only be interested in their own bugs, great maintainers help out with other people's bugs. This is one of the best ways to become an expert at Nock (and Node.js, JavaScript, or pretty much any project) - helping others.
74
+ * **Write docs.** Are our docs missing something important? Are they not clear? Could they be better? Open a PR!
75
+ * **Suggest examples.** Right now, we have a few examples, but we could always have more. Submit small example files and tutorials. At some point, we'll have to work on a better way to display these - for now, it's great to show others how to solve difficult mocking problems easily with Nock.
76
+ * **Refactor.** This is one of the hardest things to do, but one of the most useful. Go through the code, and find examples where it could be written better - with better variable names, more useful abstractions, and more elegant patterns. Taking away ten lines of code that are unnecessary is more valuable than submitting a hundred new lines, sometimes. Open a PR or a comment and defend your position; ask for feedback.
77
+
78
+ Once you've been around for a bit, ask a current Maintainer - one of [the team members](https://github.com/orgs/nock/people) - whether you can be elevated to Maintainer status and given permissions to close issues and merge PRs. We're interested in how well you know what Nock is about, and how involved you are in the community - not where you're from, how good your English is, or whether or not you can pass a whiteboard test blindfolded. If you think that you've been helpful, let us know. We're friendly, promise. :)
@@ -125,7 +125,6 @@ function RequestOverrider(req, options, interceptors, remove, cb) {
125
125
  };
126
126
 
127
127
  req.socket = response.socket = Socket({ proto: options.proto });
128
- req.socket.connecting = true;
129
128
 
130
129
  req.write = function(buffer, encoding, callback) {
131
130
  debug('write', arguments);
package/lib/socket.js CHANGED
@@ -22,6 +22,7 @@ function Socket(options) {
22
22
  this.writable = true;
23
23
  this.readable = true;
24
24
  this.destroyed = false;
25
+ this.connecting = false;
25
26
 
26
27
  this.setNoDelay = noop;
27
28
  this.setKeepAlive = noop;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "testing",
8
8
  "isolation"
9
9
  ],
10
- "version": "9.6.0",
10
+ "version": "9.6.1",
11
11
  "author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
12
12
  "contributors": [
13
13
  {
@@ -185,7 +185,7 @@
185
185
  "hyperquest": "^2.1.3",
186
186
  "isomorphic-fetch": "^2.2.0",
187
187
  "markdown-toc": "^1.2.0",
188
- "needle": "^2.2.0",
188
+ "needle": "^2.2.2",
189
189
  "nyc": "^12.0.1",
190
190
  "request": "^2.83.0",
191
191
  "request-promise": "^4.2.2",