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

Support for Node 10.x #108

Merged
merged 2 commits into from
Dec 19, 2021
Merged

Support for Node 10.x #108

merged 2 commits into from
Dec 19, 2021

Conversation

aron
Copy link
Contributor

@aron aron commented Dec 19, 2021

I've run into an issue where version 1.2.0 of opa-wasm has lost support for Node 10. This is due to the change introduced in #45 to check for the wasm.instance.exports.opa_wasm_abi_version. On Node 12+ this value is returned as an object with a numeric value property. On Node 10 it's a numeric literal. This results in an unsupported ABI version undefined error when trying to load any module. Otherwise everything works as expected. I've not looked into detail for the reasons for the change, nothing is mentioned in the NodeJS wasm documentation.

I've opened this PR to fix the issue so that the tool supports Node 10.x, which required a type check on the opa_wasm_abi_version value in opa.js. I understand that Node 10 is an extremely old version that is already past end-of-life so I'm not asking to officially support it but wondered if you'd consider taking on the patch regardless? At Snyk where we use opa-wasm in our CLI we're still currently committed to supporting Node 10 at least for the next quarter while we phase it out.

For the purposes of the PR I've enabled the test matrix to include Node 10, I propose that if you approve the change I'll revert the change to the GitHub action before merging. Cheers.

@aron aron changed the title Feat/node 10 Support for Node 10.x Dec 19, 2021
aron added 2 commits December 19, 2021 00:12
Signed-off-by: Aron Carroll <aron.carroll@snyk.io>
Signed-off-by: Aron Carroll <aron.carroll@snyk.io>
@srenatus srenatus merged commit 714f15c into open-policy-agent:main Dec 19, 2021
@srenatus
Copy link
Contributor

😬 looks like I've misunderstood #107. @aron do we need to do something for util on node 10? (I could also revert #107 ...)

@aron
Copy link
Contributor Author

aron commented Jan 4, 2022

Hey @srenatus, would it be possible to publish a new version (or an alpha/beta release) of the package containing the latest changes for node 10?

@srenatus
Copy link
Contributor

srenatus commented Jan 4, 2022

Will do 👍

@srenatus
Copy link
Contributor

srenatus commented Jan 4, 2022

@aron done!

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.

2 participants