dc-polyfill
Advanced tools
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Debug Test (Node 18)", | ||
| "type": "node", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/test/diagnostics-channel-store-has-subscribers.spec.js", | ||
| "console": "integratedTerminal", | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "runtimeExecutable": "/Users/ugaitz.urien/.nvm/versions/node/v18.20.8/bin/node", | ||
| "runtimeArgs": ["--expose-gc"] | ||
| }, | ||
| { | ||
| "name": "Debug Test (Node 12)", | ||
| "type": "node", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/test/diagnostics-channel-store-has-subscribers.spec.js", | ||
| "console": "integratedTerminal", | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "runtimeExecutable": "/Users/ugaitz.urien/.nvm/versions/node/v12.22.12/bin/node", | ||
| "runtimeArgs": ["--expose-gc"] | ||
| }, | ||
| { | ||
| "name": "Debug All Tests (Node 12)", | ||
| "type": "node", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/test.sh", | ||
| "console": "integratedTerminal", | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "runtimeExecutable": "/Users/ugaitz.urien/.nvm/versions/node/v12.22.12/bin/node", | ||
| "runtimeArgs": ["--expose-gc"] | ||
| } | ||
| ] | ||
| } |
+1
-1
| { | ||
| "name": "dc-polyfill", | ||
| "version": "0.1.9", | ||
| "version": "0.1.10", | ||
| "description": "A polyfill for the internal diagnostics_channel module", | ||
@@ -5,0 +5,0 @@ "main": "dc-polyfill.js", |
@@ -1,2 +0,6 @@ | ||
| const { ReflectApply } = require('./primordials.js'); | ||
| const { | ||
| ReflectApply, | ||
| ObjectDefineProperty, | ||
| ObjectGetOwnPropertyDescriptor | ||
| } = require('./primordials.js'); | ||
@@ -51,2 +55,10 @@ module.exports = function (unpatched) { | ||
| if (!ObjectGetOwnPropertyDescriptor(ch, 'hasSubscribers')) { | ||
| ObjectDefineProperty(ch, 'hasSubscribers', { | ||
| get: function() { | ||
| return this.__proto__.hasSubscribers || ch._stores.size > 0; | ||
| } | ||
| }); | ||
| } | ||
| channels.add(ch); | ||
@@ -53,0 +65,0 @@ |
@@ -30,3 +30,5 @@ // There's a bug where a newly created channel is immediately garbage collected | ||
| if (subscribers.length > 1) return true; | ||
| if (subscribers.length < 1) return false; | ||
| const stores = ch._stores; | ||
| if (stores.size > 0) return true; | ||
| if (subscribers.length < 1 ) return false; | ||
| if (subscribers[0] === PHONY_SUBSCRIBE) return false; | ||
@@ -33,0 +35,0 @@ return true; |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
26727
6.45%20
5.26%665
7.61%