Skip to content

Commit

Permalink
chore: removed legacy context (#431)
Browse files Browse the repository at this point in the history
refs 80206

Co-authored-by: kirrg001 <[email protected]>
  • Loading branch information
kirrg001 and kirrg001 committed Mar 21, 2022
1 parent d0d62a0 commit 53c243b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 353 deletions.
349 changes: 0 additions & 349 deletions packages/core/src/tracing/clsHooked/context-legacy.js

This file was deleted.

5 changes: 1 addition & 4 deletions packages/core/src/tracing/clsHooked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@ const semver = require('semver');
/**
* In order to increase node version support, this loads the version of context
* that is appropriate for the version of on nodejs that is running.
* Node < v8 - uses AsyncWrap and async-hooks-jl
* Node 12.17 - 16.6 - uses native AsyncLocalStorage. See below:
* There is a bug introduced in Node 16.7 which breaks Async LS: https://github.com/nodejs/node/issues/40693
* Node >= v8 - uses native async-hooks
*/
if (process && semver.satisfies(process.versions.node, '12.17 - 16.6')) {
module.exports = require('./async_local_storage_context');
} else if (process && semver.gte(process.versions.node, '8.0.0')) {
module.exports = require('./context');
} else {
module.exports = require('./context-legacy');
module.exports = require('./context');
}

0 comments on commit 53c243b

Please sign in to comment.