Socket
Socket
Sign inDemoInstall

node-execution-context

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.6 to 2.0.7

4

CHANGELOG.md
# CHANGELOG
## 2.0.7 (December 20, 2020)
- Preferring `setImmediate` over `nextTick`.
## 2.0.6 (December 2, 2020)

@@ -4,0 +8,0 @@

4

dist/index.js

@@ -518,3 +518,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

/**
* Suspends a given f unction execution over process next tick.
* Suspends a given function execution over process next tick.
* @param {Function} fn - The function to trigger upon next tick.

@@ -531,3 +531,3 @@ * @param {...any} args - The function arguments to trigger with.

return process.nextTick(function () {
return setImmediate(function () {
return fn.apply(void 0, args);

@@ -534,0 +534,0 @@ });

{
"name": "node-execution-context",
"version": "2.0.6",
"version": "2.0.7",
"description": "Provides execution context wrapper for node JS, can be used to create execution wrapper for handling requests and more",

@@ -5,0 +5,0 @@ "author": "Oded Goldglas <odedglas@gmail.com>",

@@ -14,3 +14,3 @@ const { isUndefined } = require('../lib');

/**
* Suspends a given f unction execution over process next tick.
* Suspends a given function execution over process next tick.
* @param {Function} fn - The function to trigger upon next tick.

@@ -20,3 +20,3 @@ * @param {...any} args - The function arguments to trigger with.

*/
const suspend = (fn, ...args) => process.nextTick(() => fn(...args));
const suspend = (fn, ...args) => setImmediate(() => fn(...args));

@@ -23,0 +23,0 @@ /**

@@ -117,3 +117,3 @@ const asyncHooks = require('async_hooks');

process.nextTick(() => {
setImmediate(() => {
expect(executionMap.get(triggerAsyncId)).toBeUndefined();

@@ -146,3 +146,3 @@ expect(spies.contextMapDelete).toHaveBeenCalledWith(triggerAsyncId);

process.nextTick(() => {
setImmediate(() => {
expect(spies.contextMapDelete).toHaveBeenCalledWith(firstChild);

@@ -149,0 +149,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc