test: pin node-opcua to 2.181.0 in test-80 - #308
Merged
Merged
Conversation
node-opcua 2.184.0 ships ESM and uses import.meta.dirname. The test's esbuild CJS bundle turns that into undefined, so node-opcua-nodesets calls path.join(undefined) at startup and test_host fails on every PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
test-80-compression-node-opcuafailstest_hoston ubuntu (Node 22 and 24) for every PR based on currentmain(e.g. #300, #307):The test's
package.jsonused^2.36.0, so CI now installs node-opcua 2.186.x. Starting with 2.184.0, node-opcua ships ESM ("type": "module") and usesimport.meta.dirname. The test bundles it with esbuild into CJS, where that value becomesundefined. This is an upstream change, not a pkg bug.Fix
Pin
node-opcua-address-spaceandnode-opcua-nodesetsto2.181.0, and add a comment inmain.jsthat explains why and when the pin can be removed.This is the same change as in #296, split out so it can land first. #296's CI passes
test_hoston all 6 OS/Node combinations with this pin.