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
While triaging failures in this PR newrelic/newrelic-node-apollo-server-plugin#75, it was discovered that some versioned tests in the agent were failing. A few fixes were made(#751, newrelic/node-test-utilities#75) but an issue with continuation-local-storage still exists. It appears npm 7 no longer will install dependencies that cannot be fulfilled by engines stanzas.
Expected Behavior
This is a little tricky. The expected behavior is that async-listener(optional dep of continuation-local-storage) is installed. However the version 0.4.5 has an engines stanza as
"engines": {
"node": "<=0.11.8"
},
The reason this is tricky because it appears that pre npm 7 would install this dependency even though the engines range is invalid.
npm 7 output
❯ npm i continuation-local-storage@2.6.2
added 3 packages, and audited 4 packages in 755ms
found 0 vulnerabilities
npm 6 output
npm i continuation-local-storage@2.6.2
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN notsup Unsupported engine for async-listener@0.4.5: wanted: {"node":"<=0.11.8"} (current: {"node":"14.16.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: async-listener@0.4.5
+ continuation-local-storage@2.6.2
added 4 packages from 2 contributors and audited 4 packages in 0.998s
found 0 vulnerabilities
Notice 3 packages on npm 7 vs 4 on npm 6
Steps to Reproduce
Assumption: npm 7 is installed
npm i continuation-local-storage@2.6.2
Your Environment
npm 7
Additional Context
The cls versioned tests will fail with the following error
added 2 packages, and changed 1 package in 703ms
TAP version 13
# Subtest: transaction state
1..1
# Subtest: should be preserved over timers regardless of order required
not ok 1 - Cannot find module 'async-listener' Require stack: - /Users/revans/code/pull-requests/node-newrelic/test/versioned/cls/node_modules/continuation-local-storage/context.js - /Users/revans/code/pull-requests/node-newrelic/test/versioned/cls/cls.tap.js
---
stack: >
Object.<anonymous> (node_modules/continuation-local-storage/context.js:15:32)
Module._compile (/Users/revans/code/pull-requests/node-newrelic/node_modules/source-map-support/source-map-support.js:547:25)
at:
line: 880
column: 15
file: internal/modules/cjs/loader.js
function: Function.Module._resolveFilename
code: MODULE_NOT_FOUND
requireStack:
- /Users/revans/code/pull-requests/node-newrelic/test/versioned/cls/node_modules/continuation-local-storage/context.js
- /Users/revans/code/pull-requests/node-newrelic/test/versioned/cls/cls.tap.js
tapCaught: testFunctionThrow
test: should be preserved over timers regardless of order required
...
1..1
# failed 1 test
not ok 1 - should be preserved over timers regardless of order required # time=23.015ms
# failed 1 test
not ok 1 - transaction state # time=33.641ms
1..1
# failed 1 test
# time=50.258ms
The text was updated successfully, but these errors were encountered:
// load polyfill if native support is unavailable
if (!process.addAsyncListener) require('async-listener');
Looks like that used to exist in 0.x versions that that other package is limited to but certainly doesn't seem to exist anymore.
The latest version of the async-listener seems to have updated engines field of "node": "<=0.11.8 || >0.11.10". If you run the continuation-local-storage version 3.2.1 on Node 16, everything passes fine.
Description
While triaging failures in this PR newrelic/newrelic-node-apollo-server-plugin#75, it was discovered that some versioned tests in the agent were failing. A few fixes were made(#751, newrelic/node-test-utilities#75) but an issue with
continuation-local-storage
still exists. It appears npm 7 no longer will install dependencies that cannot be fulfilled by engines stanzas.Expected Behavior
This is a little tricky. The expected behavior is that
async-listener
(optional dep ofcontinuation-local-storage
) is installed. However the version0.4.5
has an engines stanza asThe reason this is tricky because it appears that pre npm 7 would install this dependency even though the engines range is invalid.
npm 7 output
npm 6 output
Notice 3 packages on npm 7 vs 4 on npm 6
Steps to Reproduce
Assumption: npm 7 is installed
npm i continuation-local-storage@2.6.2
Your Environment
Additional Context
The cls versioned tests will fail with the following error
The text was updated successfully, but these errors were encountered: