├── .editorconfig ├── .eslintrc ├── .gitignore ├── .idea └── runConfigurations │ ├── Promise_context_convention.xml │ ├── async_context_test_js.xml │ ├── bind_emitter_multiple_tap_js.xml │ ├── bind_emitter_tap_js.xml │ ├── cls_with_net_connection_2.xml │ ├── cls_with_net_connection_value_newContextValue.xml │ ├── dns_tap_js.xml │ ├── fs_tap_js.xml │ ├── http_events_test_js.xml │ ├── interleave_contexts_tap_js.xml │ ├── namespaces_multiple_values_specs_js.xml │ ├── namespaces_multiple_values_tap_js.xml │ ├── namespaces_spec_js.xml │ ├── namespaces_tap_js.xml │ ├── nesting_tap_js.xml │ ├── net_events_spec_js.xml │ ├── net_events_tap_js.xml │ ├── net_events_test_js.xml │ ├── npm_test.xml │ ├── npm_test_mocha.xml │ ├── promise_context_convention_spec_js.xml │ ├── promises_tap_js.xml │ ├── proper_exit_tap_js.xml │ ├── run_tap_tests.xml │ ├── test_async_context_test_js.xml │ ├── test_net_events_test_js.xml │ └── with_http_server_and_client_request.xml ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── context-legacy.js ├── context.js ├── index.js ├── logs ├── async-hook-passing.log ├── async-hook.log ├── async-hook_using_parentid.log ├── async-listener.log ├── http-agent.log ├── namespaces-multiple-values.specs.log └── providers.json ├── package-lock.json ├── package.json └── test ├── async-context.test.js ├── async-no-run-queue-multiple.test.js ├── http-agent-break.test.js ├── http-events.test.js ├── namespaces-multiple-values.test.js ├── namespaces.test.js ├── net-events.test.js ├── net-events2.test.js ├── promise-context-convention.spec.js └── tap ├── async-context.tap.js ├── async-no-run-queue-multiple.tap.js ├── bind-emitter-multiple.tap.js ├── bind-emitter.tap.js ├── bind.tap.js ├── crypto.tap.js ├── dns.tap.js ├── error-handling.tap.js ├── fs.tap.js ├── interleave-contexts.tap.js ├── namespaces-multiple-values.tap.js ├── namespaces.tap.js ├── nesting.tap.js ├── net-events.tap.js ├── promises.tap.js ├── proper-exit.tap.js ├── run-and-return.tap.js ├── simple.tap.js ├── timers.tap.js ├── tracer-scenarios.tap.js └── zlib.tap.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.json] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "mocha": true, 5 | "es6": true 6 | }, 7 | "rules": { 8 | "curly": 0, 9 | "no-lonely-if": 1, 10 | "no-mixed-requires": 0, 11 | "no-underscore-dangle": 0, 12 | "no-unused-vars": [2, { 13 | "vars": "all", 14 | "args": "after-used" 15 | }], 16 | "no-use-before-define": [2, "nofunc"], 17 | "quotes": 0, 18 | "semi": [2, "always"], 19 | "space-infix-ops": 0, 20 | "strict": 0, 21 | "max-len": [1, 160, 2] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/* 3 | !.idea/runConfigurations/ 4 | npm-debug.log 5 | .vscode 6 | -------------------------------------------------------------------------------- /.idea/runConfigurations/Promise_context_convention.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | 9 | 10 | 11 | 12 | bdd 13 | 14 | SUITE 15 | $PROJECT_DIR$/test/promise-context-convention.spec.js 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/runConfigurations/async_context_test_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/async-context.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/bind_emitter_multiple_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/runConfigurations/bind_emitter_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 13 | 18 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/runConfigurations/cls_with_net_connection_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | 9 | 10 | 11 | 12 | bdd 13 | 14 | SUITE 15 | $PROJECT_DIR$/test/net-events2.test.js 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/runConfigurations/cls_with_net_connection_value_newContextValue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | 9 | 10 | 11 | 12 | bdd 13 | 14 | TEST 15 | $PROJECT_DIR$/test/net-events.test.js 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/runConfigurations/dns_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/runConfigurations/fs_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 13 | 16 | 21 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/runConfigurations/http_events_test_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/http-events.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/interleave_contexts_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/runConfigurations/namespaces_multiple_values_specs_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/namespaces-multiple-values.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/namespaces_multiple_values_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/runConfigurations/namespaces_spec_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/namespaces.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/namespaces_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 13 | 18 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/runConfigurations/nesting_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/runConfigurations/net_events_spec_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/net-events.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/net_events_tap_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/runConfigurations/net_events_test_js.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | project 4 | 5 | $PROJECT_DIR$/node_modules/mocha 6 | $PROJECT_DIR$ 7 | true 8 | bdd 9 | 10 | TEST_FILE 11 | $PROJECT_DIR$/test/net-events.test.js 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations/npm_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |