| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 731e874 commit bb4c293
49 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,7 +72,6 @@ globals: | |||
| 72 | 72 | ||
| 73 | 73 | overrides: | |
| 74 | 74 | - files: | |
| 75 | - - async-hooks/*.js | ||
| 76 | 75 | - es-module/*.js | |
| 77 | 76 | - es-module/*.mjs | |
| 78 | 77 | - internet/*.js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ exports.checkInvocations = function checkInvocations(activity, hooks, stage) { | |||
| 21 | 21 | ||
| 22 | 22 | assert.ok(activity != null, | |
| 23 | 23 | `${stageInfo} Trying to check invocation for an activity, ` + | |
| 24 | - 'but it was empty/undefined.' | ||
| 24 | + 'but it was empty/undefined.', | ||
| 25 | 25 | ); | |
| 26 | 26 | ||
| 27 | 27 | // Check that actual invocations for all hooks match the expected invocations | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ class ActivityCollector { | |||
| 27 | 27 | ondestroy, | |
| 28 | 28 | onpromiseResolve, | |
| 29 | 29 | logid = null, | |
| 30 | - logtype = null | ||
| 30 | + logtype = null, | ||
| 31 | 31 | } = {}) { | |
| 32 | 32 | this._start = start; | |
| 33 | 33 | this._allowNoInit = allowNoInit; | |
@@ -49,7 +49,7 @@ class ActivityCollector { | |||
| 49 | 49 | before: this._before.bind(this), | |
| 50 | 50 | after: this._after.bind(this), | |
| 51 | 51 | destroy: this._destroy.bind(this), | |
| 52 | - promiseResolve: this._promiseResolve.bind(this) | ||
| 52 | + promiseResolve: this._promiseResolve.bind(this), | ||
| 53 | 53 | }); | |
| 54 | 54 | } | |
| 55 | 55 | ||
@@ -181,7 +181,7 @@ class ActivityCollector { | |||
| 181 | 181 | // In some cases (e.g. Timeout) the handle is a function, thus the usual | |
| 182 | 182 | // `typeof handle === 'object' && handle !== null` check can't be used. | |
| 183 | 183 | handleIsObject: handle instanceof Object, | |
| 184 | - handle | ||
| 184 | + handle, | ||
| 185 | 185 | }; | |
| 186 | 186 | this._stamp(activity, 'init'); | |
| 187 | 187 | this._activities.set(uid, activity); | |
@@ -233,7 +233,7 @@ exports = module.exports = function initHooks({ | |||
| 233 | 233 | onpromiseResolve, | |
| 234 | 234 | allowNoInit, | |
| 235 | 235 | logid, | |
| 236 | - logtype | ||
| 236 | + logtype, | ||
| 237 | 237 | } = {}) { | |
| 238 | 238 | return new ActivityCollector(process.hrtime(), { | |
| 239 | 239 | oninit, | |
@@ -243,6 +243,6 @@ exports = module.exports = function initHooks({ | |||
| 243 | 243 | onpromiseResolve, | |
| 244 | 244 | allowNoInit, | |
| 245 | 245 | logid, | |
| 246 | - logtype | ||
| 246 | + logtype, | ||
| 247 | 247 | }); | |
| 248 | 248 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ const hooks = initHooks({ | |||
| 22 | 22 | onbefore, | |
| 23 | 23 | onafter, | |
| 24 | 24 | ondestroy: null, // Intentionally not tested, since it will be removed soon | |
| 25 | - onpromiseResolve | ||
| 25 | + onpromiseResolve, | ||
| 26 | 26 | }); | |
| 27 | 27 | hooks.enable(); | |
| 28 | 28 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ const hooked = {}; | |||
| 12 | 12 | createHook({ | |
| 13 | 13 | init(asyncId, type, triggerAsyncId, resource) { | |
| 14 | 14 | hooked[asyncId] = resource; | |
| 15 | - } | ||
| 15 | + }, | ||
| 16 | 16 | }).enable(); | |
| 17 | 17 | ||
| 18 | 18 | const server = http.createServer((req, res) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ const hooked = {}; | |||
| 13 | 13 | createHook({ | |
| 14 | 14 | init(asyncId, type, triggerAsyncId, resource) { | |
| 15 | 15 | hooked[asyncId] = resource; | |
| 16 | - } | ||
| 16 | + }, | ||
| 17 | 17 | }).enable(); | |
| 18 | 18 | ||
| 19 | 19 | const server = http.createServer((req, res) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ const { readFile } = require('fs'); | |||
| 6 | 6 | const { | |
| 7 | 7 | createHook, | |
| 8 | 8 | executionAsyncResource, | |
| 9 | - AsyncResource | ||
| 9 | + AsyncResource, | ||
| 10 | 10 | } = require('async_hooks'); | |
| 11 | 11 | ||
| 12 | 12 | // Ignore any asyncIds created before our hook is active. | |
@@ -32,7 +32,7 @@ createHook({ | |||
| 32 | 32 | if (asyncId >= firstSeenAsyncId) { | |
| 33 | 33 | afterHook(asyncId); | |
| 34 | 34 | } | |
| 35 | - } | ||
| 35 | + }, | ||
| 36 | 36 | }).enable(); | |
| 37 | 37 | ||
| 38 | 38 | const beforeHook = common.mustCallAtLeast( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ const http = require('http'); | |||
| 7 | 7 | const asyncLocalStorage = new AsyncLocalStorage(); | |
| 8 | 8 | ||
| 9 | 9 | const agent = new http.Agent({ | |
| 10 | - maxSockets: 1 | ||
| 10 | + maxSockets: 1, | ||
| 11 | 11 | }); | |
| 12 | 12 | ||
| 13 | 13 | const N = 3; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ function onPropagate(type, store) { | |||
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | 20 | const als = new AsyncLocalStorage({ | |
| 21 | - onPropagate: common.mustCall(onPropagate, 2) | ||
| 21 | + onPropagate: common.mustCall(onPropagate, 2), | ||
| 22 | 22 | }); | |
| 23 | 23 | ||
| 24 | 24 | const myStore = {}; | |
@@ -40,11 +40,11 @@ als.run(myStore, common.mustCall(() => { | |||
| 40 | 40 | assert.throws(() => new AsyncLocalStorage(15), { | |
| 41 | 41 | message: 'The "options" argument must be of type object. Received type number (15)', | |
| 42 | 42 | code: 'ERR_INVALID_ARG_TYPE', | |
| 43 | - name: 'TypeError' | ||
| 43 | + name: 'TypeError', | ||
| 44 | 44 | }); | |
| 45 | 45 | ||
| 46 | 46 | assert.throws(() => new AsyncLocalStorage({ onPropagate: 'bar' }), { | |
| 47 | 47 | message: 'The "options.onPropagate" property must be of type function. Received type string (\'bar\')', | |
| 48 | 48 | code: 'ERR_INVALID_ARG_TYPE', | |
| 49 | - name: 'TypeError' | ||
| 49 | + name: 'TypeError', | ||
| 50 | 50 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ const then = common.mustCall((cb) => { | |||
| 17 | 17 | ||
| 18 | 18 | function thenable() { | |
| 19 | 19 | return { | |
| 20 | - then | ||
| 20 | + then, | ||
| 21 | 21 | }; | |
| 22 | 22 | } | |
| 23 | 23 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments