Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(utils.isNode) Incompatibility of utils.isNode Function with signal-exit #1889 #1901

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

vishal6557
Copy link
Contributor

Fix #1889

Thank you for the time you are putting into AlaSQL!

@mathiasrw
Copy link
Member

Love it. Thanks!

@mathiasrw mathiasrw merged commit ce63775 into AlaSQL:develop Mar 18, 2024
10 checks passed
@Warfront1
Copy link

Nice job @vishal6557 and @mathiasrw. 👍

My tests are now passing.
Dockerfile:

FROM node:16
WORKDIR /test
RUN npm init -y
ARG ALASQL_VERSION=4.2.7
RUN npm install alasql@$ALASQL_VERSION [email protected]
# Create the Node.js script inline
RUN 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 script
CMD ["node", "utilsNodeCheck.js"]

CMD:

docker build --build-arg ALASQL_VERSION=4.2.7 -t my-image:4.2.7 . && docker run my-image:4.2.7

Output:
The current value of utils.isNode is: false

CMD:

docker build --build-arg ALASQL_VERSION=4.3.2 -t my-image:4.3.2 . && docker run my-image:4.3.2

Output:
The current value of utils.isNode is: true

Thank you both.

@vishal6557 vishal6557 deleted the issue-1889 branch March 19, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility of utils.isNode Function with signal-exit in AlaSQL
3 participants