You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue has been identified where the utils.isNode function in AlaSQL does not function as expected when used in conjunction with signal-exit.
The issue is in the way that AlaSQL determines if it is running on Node [1][2][3] depends on utils.global.process.reallyExit being untampered with.
It would appear that signal-exit modifies exit and/or reallyExit to the extent that the utils.isNode returns false.
It is highly likely that any other dependency working around/with exit/reallyExit will have a problem with utils.isNode.
I have only isolated this problem with signal-exit, but I would image that there are many other incompatible dependencies.
Here is a complete MRE Dockerfile.
FROM node:16
WORKDIR /test
RUN npm init -y
RUN npm install [email protected][email protected]# Create the Node.js script inlineRUN echo "const onExit = require('signal-exit');\n\onExit(() => console.log('exit'));\n\const alasql = require('alasql');\n\const utils = alasql.utils;\n\console.log('The current value of utils.isNode is: ', utils.isNode);\n\" > utilsNodeCheck.js
# Run the Node.js scriptCMD ["node", "utilsNodeCheck.js"]
As such, any conditional logic based upon utils.isNode is likely to have incorrect behavior.
This issue boils up to problems such as the inability to import files on your local file system likely including CSV, JSON, TAB, IndexedDB, LocalStorage, and SQLite files.
The error message in such a case would typically be the following: TypeError: Only absolute URLs are supported
The text was updated successfully, but these errors were encountered:
An issue has been identified where the
utils.isNode
function in AlaSQL does not function as expected when used in conjunction with signal-exit.The issue is in the way that AlaSQL determines if it is running on Node [1][2][3] depends on
utils.global.process.reallyExit
being untampered with.It would appear that signal-exit modifies exit and/or reallyExit to the extent that the
utils.isNode
returnsfalse
.It is highly likely that any other dependency working around/with exit/reallyExit will have a problem with
utils.isNode
.I have only isolated this problem with signal-exit, but I would image that there are many other incompatible dependencies.
Here is a complete MRE Dockerfile.
As such, any conditional logic based upon
utils.isNode
is likely to have incorrect behavior.This issue boils up to problems such as the inability to import files on your local file system likely including CSV, JSON, TAB, IndexedDB, LocalStorage, and SQLite files.
The error message in such a case would typically be the following:
TypeError: Only absolute URLs are supported
The text was updated successfully, but these errors were encountered: